/** * Progressive disclosure at the MCP boundary. * * There is exactly one place every tool result passes through, so that is where * this attaches -- rather than each of the ninety-odd tools deciding for itself * whether its output is too big, which is how a policy becomes ninety * inconsistent policies. * * The hooks cannot do this job. A PreToolUse hook can refuse a call but cannot * see its output; a PostToolUse hook sees the output only after the host has * already put it in context, and no hook can replace a built-in tool's result * (anthropics/claude-code#32105). Our OWN tool results are the part we control * completely, and they are the ones users route their large reads through. * * The real work lives in hooks-core/disclose.mjs and hooks-core/expand.mjs, * imported dynamically for the same reasons as the wiki routes: they are plain * ESM the clients execute with no build step, and a missing graph must degrade * to "return the output unchanged" rather than break a tool call. */ interface ToolResult { content?: Array<{ type: string; text?: string; }>; isError?: boolean; _meta?: Record; } /** * Replaces an oversized tool result with a preview and a pointer. * * Errors pass through untouched: a truncated failure is a support ticket, and * the whole value of an error message is the part a size policy would cut. */ export declare function discloseResult(toolName: string, args: Record | undefined, result: ToolResult, costMs?: number): Promise; /** Follows a pointer: serves from the store, records the miss, and promotes. */ export declare function expandRef(input: { ref: string; section?: string; reason?: string; claim?: string; anchor?: string; }): Promise; /** The tool definition, kept next to the implementation it describes. */ export declare const EXPAND_TOOL: { readonly name: "expand"; readonly description: string; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly ref: { readonly type: "string"; readonly description: "The reference printed in the preview"; }; readonly section: { readonly type: "string"; readonly description: "Which omitted section you needed (e.g. \"passing tests\", \"library and runtime frames\")"; }; readonly reason: { readonly type: "string"; readonly description: "Why the preview was not enough, if no single section covers it"; }; readonly claim: { readonly type: "string"; readonly description: "What the expanded content established, to carry forward as a finding"; }; readonly anchor: { readonly type: "string"; readonly description: "The file that claim is about"; }; }; readonly required: readonly ["ref"]; }; }; export {}; //# sourceMappingURL=disclosure.d.ts.map