fix: 修正 WaterFlow Skill/Tool 兼容性问题 + 类型声明完善

Skill 格式修正:
- allowed_tools → allowed-tools (kebab-case)
- user_invocable → user-invocable (kebab-case)
- persona skill name: graph_memory_persona → persona (匹配目录名)
- task skill name: graph_memory_task → task (匹配目录名)

Tool 接口优化:
- installTrulyMEM: require() → ESM dynamic import
- handler: 添加 abort 信号检查
- graph_database: _platform 类型 any → Platform
- graph_database: 修复 fs null 检查和 ArrayBuffer 类型转换

类型声明完善:
- waterflow.d.ts 从 193 行扩展到 400+ 行
- 添加 SchemaType, ToolFeatures, ToolMetadata 等完整类型
- 添加 network, tools, builtinTools 等缺失字段
- 添加 waterflow/runtime/core/tools/builtin 模块声明
- 添加 waterflow/runtime/core/tools/tool_registry 模块声明

清理:
- 删除 TRACKING.md, 重构.md, migration_plan.md, todo_progress.md
- 删除 docs/integration/waterflow-design.md
This commit is contained in:
root
2026-04-16 15:16:55 +08:00
parent 13e3c662ac
commit 56e787a5a8
12 changed files with 576 additions and 1603 deletions

View File

@ -1,9 +1,9 @@
---
name: graph_memory_task
name: task
description: 管理连续性任务 - 创建、更新、删除任务节点
when_to_use: 需要创建或管理长期任务时
context: inline
allowed_tools:
allowed-tools:
- builtin:graph_memory
arguments:
- name: action
@ -28,7 +28,7 @@ arguments:
- name: info_node
type: string
description: 信息节点 (用于 link_info)
user_invocable: true
user-invocable: true
---
# GraphMemory Task 任务管理