refactor: unify tool reason requirements

This commit is contained in:
2026-10-28 16:43:04 +08:00
parent 7d47a2df86
commit c3050b602b
20 changed files with 97 additions and 46 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
import { toolReason } from "../tool-reason.js";
import { tool } from "../tool.js";
import { getInternalBridgeConfig } from "../internalBridge.js";
import { newExecutionPlanSchema } from "../../src/routes/executionPlan.js";
@@ -8,7 +9,7 @@ export default tool({
request_id: tool.schema.string().describe("Stable UUID idempotency key for this plan revision"),
schema: tool.schema.enum(["execution-plan@2"]),
title: tool.schema.string(),
reason: tool.schema.string().describe("Why the plan or node status changed"),
reason: toolReason.max(1000).describe("One concise sentence explaining why the plan or node status changed."),
nodes: tool.schema.array(tool.schema.object({
id: tool.schema.string(), title: tool.schema.string(),
status: tool.schema.enum(["pending", "running", "waiting", "completed", "failed", "skipped", "cancelled"]),