import { z } from "zod"; export type ToolResult = { content: Array<{ type: "text"; text: string; }>; structuredContent: Record; isError?: boolean; }; /** Emit structuredContent in addition to text content. Clients with an * outputSchema validate structuredContent; the LLM sees the same JSON in * `content`. `success === false` sets `isError` per the MCP spec. */ /** * The error object every tool reports, as a schema. * * Loose on purpose. `errorResult` attaches `details` whenever a HilError * carries any, and the daemon decides what goes in there — a tool that * declared `{code, message, hint}` and nothing else rejected its own error * the first time one arrived with details, which is how a path-allowlist * refusal came back as "structured content does not match the tool's output * schema" instead of as the refusal. */ export declare const ErrorSchema: z.ZodObject<{ code: z.ZodString; message: z.ZodString; hint: z.ZodOptional>; details: z.ZodOptional>; }, z.core.$loose>; export declare function jsonResponse(data: object): ToolResult; export declare function ok(data?: Record): ToolResult; export declare function err(message: string, extra?: Record): ToolResult; /** Uniform error envelope for thrown errors: * `{ success: false, error: { code, message, hint? } }`. A HilError keeps its * daemon-supplied code and hint; anything else becomes code "INTERNAL". */ export declare function errorResult(e: unknown): ToolResult; /** Alias — later chunks of the v10 plan import this name for `errorResult`. */ export declare const toolError: typeof errorResult;