/** * Standard MCP response formatters. * * Uses compact JSON (no indentation) to minimize token count for LLM consumers. * Errors keep minimal formatting for readability in tool-call error surfaces. */ export type ContentItem = { type: "text"; text: string; }; export interface ToolResult { /** Required: MCP SDK's CallToolResult extends Result which has an index signature. */ [key: string]: unknown; content: ContentItem[]; isError?: boolean; structuredContent?: Record; } /** * Coerce registry list payloads into the `{ items, total?, page? }` shape expected by * `harness_list`'s output schema and MCP `structuredContent` (objects only — raw arrays * cannot be sent as structured content). * * Harness Code endpoints such as `pr_activity` return a top-level JSON array; without * this step, clients that require structured output fail with output validation errors. */ export declare function normalizeHarnessListPayload(result: unknown, options?: { page?: number; }): unknown; export declare function jsonResult(data: unknown): ToolResult; export declare function errorResult(message: string): ToolResult; //# sourceMappingURL=response-formatter.d.ts.map