From 436cd39d14d395fe7612b5648369739966e7c3b3 Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Fri, 3 Jul 2026 18:42:23 +0000 Subject: [PATCH] chore: generate --- packages/codemode/src/tool-runtime.ts | 6 ++++-- packages/opencode/src/tool/registry.ts | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/codemode/src/tool-runtime.ts b/packages/codemode/src/tool-runtime.ts index d79d0182b5..da9f749499 100644 --- a/packages/codemode/src/tool-runtime.ts +++ b/packages/codemode/src/tool-runtime.ts @@ -467,7 +467,9 @@ export const discoveryPlan = ( : complete ? "Execute JavaScript in a confined runtime. Inside this program, `tools` contains only the host-provided tools listed below; surrounding agent tools are not available unless listed here." : "Execute JavaScript in a confined runtime. Inside this program, `tools` contains only the host-provided tools listed or searchable below; surrounding agent tools are not available unless listed here.", - ...(empty ? [] : ["Do not infer or normalize tool names; use only exact signatures shown below or returned by search."]), + ...(empty + ? [] + : ["Do not infer or normalize tool names; use only exact signatures shown below or returned by search."]), ] // The search step exists only when search is advertised (PARTIAL catalog); a COMPLETE @@ -481,7 +483,7 @@ export const discoveryPlan = ( ...(complete ? [ "1. Pick a tool from the list under `## Available tools` - each line is the exact call signature; use it as-is rather than guessing segments.", - '2. Call it using the exact signature shown; bracket notation and quotes are part of the path.', + "2. Call it using the exact signature shown; bracket notation and quotes are part of the path.", '3. Parse text results: `const data = typeof res === "string" ? JSON.parse(res) : res` - most tools return JSON as a string.', "4. Return only the fields you need: `return { : data. }` - raw payloads get truncated and waste context.", ] diff --git a/packages/opencode/src/tool/registry.ts b/packages/opencode/src/tool/registry.ts index d933fd0105..15acc757f3 100644 --- a/packages/opencode/src/tool/registry.ts +++ b/packages/opencode/src/tool/registry.ts @@ -280,10 +280,7 @@ const layer = Layer.effect( const ruleset = Permission.merge(input.agent.permission, input.permission ?? []) const tools = Permission.visibleTools(yield* mcp.tools(), ruleset) if (Object.keys(tools).length === 0) return - return codeMode.describeCatalog( - tools, - Object.keys(yield* mcp.clients()).map(McpCatalog.sanitize), - ) + return codeMode.describeCatalog(tools, Object.keys(yield* mcp.clients()).map(McpCatalog.sanitize)) }) const tools: Interface["tools"] = Effect.fn("ToolRegistry.tools")(function* (input) { @@ -300,7 +297,9 @@ const layer = Layer.effect( return true }) - const codeModeDescription = filtered.some((tool) => tool.id === "execute") ? yield* describeCodeMode(input) : undefined + const codeModeDescription = filtered.some((tool) => tool.id === "execute") + ? yield* describeCodeMode(input) + : undefined const visible = filtered.filter((tool) => tool.id !== "execute" || codeModeDescription) return yield* Effect.forEach(