chore: generate

This commit is contained in:
opencode-agent[bot] 2026-07-03 18:42:23 +00:00
commit 436cd39d14
2 changed files with 8 additions and 7 deletions

View file

@ -467,7 +467,9 @@ export const discoveryPlan = <R>(
: 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 = <R>(
...(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 { <field>: data.<field> }` - raw payloads get truncated and waste context.",
]

View file

@ -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(