chore: generate
This commit is contained in:
@@ -467,7 +467,9 @@ export const discoveryPlan = <R>(
|
|||||||
: complete
|
: 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 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.",
|
: "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
|
// The search step exists only when search is advertised (PARTIAL catalog); a COMPLETE
|
||||||
@@ -481,7 +483,7 @@ export const discoveryPlan = <R>(
|
|||||||
...(complete
|
...(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.",
|
"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.',
|
'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.",
|
"4. Return only the fields you need: `return { <field>: data.<field> }` - raw payloads get truncated and waste context.",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -280,10 +280,7 @@ const layer = Layer.effect(
|
|||||||
const ruleset = Permission.merge(input.agent.permission, input.permission ?? [])
|
const ruleset = Permission.merge(input.agent.permission, input.permission ?? [])
|
||||||
const tools = Permission.visibleTools(yield* mcp.tools(), ruleset)
|
const tools = Permission.visibleTools(yield* mcp.tools(), ruleset)
|
||||||
if (Object.keys(tools).length === 0) return
|
if (Object.keys(tools).length === 0) return
|
||||||
return codeMode.describeCatalog(
|
return codeMode.describeCatalog(tools, Object.keys(yield* mcp.clients()).map(McpCatalog.sanitize))
|
||||||
tools,
|
|
||||||
Object.keys(yield* mcp.clients()).map(McpCatalog.sanitize),
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const tools: Interface["tools"] = Effect.fn("ToolRegistry.tools")(function* (input) {
|
const tools: Interface["tools"] = Effect.fn("ToolRegistry.tools")(function* (input) {
|
||||||
@@ -300,7 +297,9 @@ const layer = Layer.effect(
|
|||||||
return true
|
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)
|
const visible = filtered.filter((tool) => tool.id !== "execute" || codeModeDescription)
|
||||||
|
|
||||||
return yield* Effect.forEach(
|
return yield* Effect.forEach(
|
||||||
|
|||||||
Reference in New Issue
Block a user