/** * crew#1155 (PRODUCT-WORKS J6): the installed MCP tools a chat seat may use, and the ONE way it * reaches them. * * A chat turn is a governed answer step. Like every governed worker, its seat holds a capability * token bound to its unit (`WICKED_MCP_TOKEN`) and the broker's address (`WICKED_CREW_URL`), and it * reaches an upstream MCP tool only through garden's shim (`scripts/mcp/shim.py`), which sends the * token to `POST /mcp/tools` / `POST /mcp/call`. The broker judges every call for the unit (phase * role, seat, the run's mode, first use), runs it, scrubs and records it. Nothing here grants * anything: a write tool, or a server's first use, still waits for the operator. * * What was missing was the seat KNOWING that. Its only native MCP tool is the engine's `ask` (every * other `mcp__*` tool is fenced by the gate hook, core#657), so asked to "use unit-convert's * convert_length" it looked at its native tools and answered that none existed. Every answer step * now carries this block: what is installed, and the exact command (a command, not a noun). */ import type { McpCallableTool } from '../mcp/registry.js'; /** At most this many tools are named; the rest are counted (the shim's `list` has them all). */ export declare const CHAT_MCP_TOOLS_SHOWN = 30; /** A tool description is cut to this many characters, on one line. */ export declare const CHAT_MCP_DESCRIPTION_CHARS = 160; /** The launcher every governed seat has (garden's skills say the same). */ export declare const CHAT_MCP_SHIM = "\"$WICKED_GARDEN_ROOT/scripts/wicked-garden\" run scripts/mcp/shim.py"; /** At most this many characters of a tool name are shown (the subject stays exact in the JSON). */ export declare const CHAT_MCP_NAME_CHARS = 128; /** * The block for an answer step's instructions, or `null` when no tool is callable (no server * installed, or every one disabled): a chat with nothing installed reads exactly as before. * * The tools' names and descriptions come from the upstream servers, so they are UNTRUSTED: they * ride as an escaped JSON data block the seat is told never to take instructions from, never as * prose of the instructions themselves (codex review on #1156). */ export declare function chatMcpToolsStatement(tools: readonly McpCallableTool[]): string | null; /** * The block for the daemon's registry, read now. A registry that cannot be read leaves the block * out (the chat still answers; the shim's own `list` reports the registry error to the seat). */ export declare function chatMcpToolsFor(registry: { callableTools(): Promise; } | undefined): Promise; //# sourceMappingURL=chat-mcp.d.ts.map