/** * Standard CLI tool response helpers. */ type ToolErrorResponse = { content: [{ type: "text"; text: string; }]; isError: true; }; export declare function jsonResult(data: unknown): { content: { type: "text"; text: string; }[]; }; /** * Build a code-tagged CLI command error response. * * Every error surfaced to the caller carries a stable `[CODE]` prefix so * clients can programmatically distinguish error classes. * * @param code Stable upper-case error code (e.g. `"NOT_FOUND"`, `"INVALID_INPUT"`). * @param message Human-readable description. * @param cause Optional underlying error — appended as `" — "` when present. */ export declare function toolError(code: string, message: string, cause?: unknown): ToolErrorResponse; /** * Fallback error helper for truly unknown exceptions caught at the top-level. * * Prefer `toolError(code, ...)` for known error conditions, or * `formatError(DagError)` for typed DAG errors. Use `errorResult` only * in generic `catch (err)` blocks where the error type is not known. */ export declare function errorResult(err: unknown): ToolErrorResponse; export {}; //# sourceMappingURL=tool-response.d.ts.map