From 93e3a291c25f9c9bd6dd336d6c36fa07016d1709 Mon Sep 17 00:00:00 2001 From: agentiknet Date: Tue, 1 Dec 2026 04:36:04 +0100 Subject: [PATCH] docs(runtime): fs file_delete pitfall matches the truthful description --- .changeset/fs-pitfall-wording.md | 5 +++++ packages/runtime/src/tool-docs/fs.ts | 2 +- packages/runtime/src/tool-help-family.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/fs-pitfall-wording.md diff --git a/.changeset/fs-pitfall-wording.md b/.changeset/fs-pitfall-wording.md new file mode 100644 index 000000000..95cbcb9b0 --- /dev/null +++ b/.changeset/fs-pitfall-wording.md @@ -0,0 +1,5 @@ +--- +"@agentproto/runtime": patch +--- + +Update the `file_delete` pitfall in the fs family doc now that the tool description is truthful, and fix the `isKnownDaemonTool` doc comment. diff --git a/packages/runtime/src/tool-docs/fs.ts b/packages/runtime/src/tool-docs/fs.ts index 4281302d0..4bfcd1049 100644 --- a/packages/runtime/src/tool-docs/fs.ts +++ b/packages/runtime/src/tool-docs/fs.ts @@ -119,7 +119,7 @@ export const fsToolDoc = defineToolFamilyDoc({ ], returns: "The text `ok`, also when the path did not exist.", pitfalls: [ - "The description says \"file or empty directory\" but the removal is recursive and forced: a directory is deleted with everything in it, and a missing path is not an error.", + "A directory is deleted recursively, with everything in it, and a missing path is not an error.", "There is no trash and no confirmation: check the path with `directory_list` first.", ], }, diff --git a/packages/runtime/src/tool-help-family.ts b/packages/runtime/src/tool-help-family.ts index 4e0f700fc..d5a096d50 100644 --- a/packages/runtime/src/tool-help-family.ts +++ b/packages/runtime/src/tool-help-family.ts @@ -50,7 +50,7 @@ export function suggestToolNames(name: string, limit = MAX_TOOL_SUGGESTIONS): st .map(entry => entry.tool) } -/** True when `name` is a real daemon tool (so a missing doc is not a wrong name). */ +/** True when `name` is a real daemon tool name. Public helper; the help paths no longer call it, since every tool has a family doc. */ export function isKnownDaemonTool(name: string): boolean { return (DAEMON_TOOL_NAMES as readonly string[]).includes(name) }