diff --git a/packages/core/src/tools/descriptions/task/task_output.txt b/packages/core/src/tools/descriptions/task/task_output.txt new file mode 100644 index 0000000..61c5227 --- /dev/null +++ b/packages/core/src/tools/descriptions/task/task_output.txt @@ -0,0 +1,7 @@ +- Retrieves output from a running or completed task (background shell, agent, or remote session) +- Takes a task_id parameter identifying the task +- Returns the task output along with status information +- Use block=true (default) to wait for task completion +- Use block=false for non-blocking check of current status +- Task IDs can be found using the /tasks command +- Works with all task types: background shells, async agents, and remote sessions diff --git a/packages/core/src/tools/task/task_output.ts b/packages/core/src/tools/task/task_output.ts index 673522f..da32573 100644 --- a/packages/core/src/tools/task/task_output.ts +++ b/packages/core/src/tools/task/task_output.ts @@ -1,5 +1,6 @@ import type { ToolWithMetadata } from '../types.js'; import { getAgentManager } from '../../agent/manager.js'; +import { loadDescription } from '../load_description.js'; /** * TaskOutput 工具 @@ -7,15 +8,7 @@ import { getAgentManager } from '../../agent/manager.js'; */ export const taskOutputTool: ToolWithMetadata = { name: 'task_output', - description: `获取后台运行的 Agent 执行结果。 - -当使用 task 工具的 run_in_background 参数启动后台 Agent 后, -使用此工具查询执行状态和结果。 - -使用示例: -- 查询结果(阻塞等待): task_output({ task_id: "abc123" }) -- 检查状态(不阻塞): task_output({ task_id: "abc123", block: false }) -- 设置超时: task_output({ task_id: "abc123", timeout: 60000 })`, + description: loadDescription('task_output'), parameters: { task_id: { type: 'string',