From 856c9a6f3d050cd3302b421b2ef56e41fe7a7022 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Tue, 5 May 2026 11:46:02 +0800 Subject: [PATCH] Fix agent tool result typing --- dist/index.js | 4 ++-- index.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/index.js b/dist/index.js index 61db4be..e4645b1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -107,7 +107,7 @@ function createXWorkmateArtifactsTool(api, ctx) { config: ctx.config ?? api.config, pluginConfig: api.pluginConfig, }); - return { content: [{ type: "text", text: payload.manifestMarkdown }] }; + return { content: [{ type: "text", text: payload.manifestMarkdown }], details: {} }; } if (action === "read") { const payload = await readXWorkmateArtifact({ @@ -125,7 +125,7 @@ function createXWorkmateArtifactsTool(api, ctx) { : `\`${artifact.relativePath}\` is larger than maxInlineBytes; use the workspace path to download it directly.`, ].join("\n") : payload.manifestMarkdown; - return { content: [{ type: "text", text }] }; + return { content: [{ type: "text", text }], details: {} }; } throw new Error("action must be list or read"); }, diff --git a/index.ts b/index.ts index 9859ed4..ec5fcb7 100644 --- a/index.ts +++ b/index.ts @@ -126,7 +126,7 @@ function createXWorkmateArtifactsTool( config: ctx.config ?? api.config, pluginConfig: api.pluginConfig, }); - return { content: [{ type: "text", text: payload.manifestMarkdown }] }; + return { content: [{ type: "text", text: payload.manifestMarkdown }], details: {} }; } if (action === "read") { const payload = await readXWorkmateArtifact({ @@ -144,9 +144,9 @@ function createXWorkmateArtifactsTool( : `\`${artifact.relativePath}\` is larger than maxInlineBytes; use the workspace path to download it directly.`, ].join("\n") : payload.manifestMarkdown; - return { content: [{ type: "text", text }] }; + return { content: [{ type: "text", text }], details: {} }; } throw new Error("action must be list or read"); }, - } as AnyAgentTool; + } as unknown as AnyAgentTool; }