import type { AgentToolResult } from '@earendil-works/pi-agent-core'; import type { ExtensionFactory } from '@earendil-works/pi-coding-agent'; /** * Extract a concise, bounded parameter contract from a tool's JSON Schema so the model * can self-correct invalid or missing arguments on the very next turn. */ export declare function formatCompactParameterHint(schema: unknown, maxChars?: number): string; /** * Append actionable auth or parameter recovery hints to MCP tool error text. */ export declare function enhanceMcpToolError(params: { toolName: string; serverName?: string; errorText: string; parameters?: unknown; }): string; /** * Format a parsed JSON value into a valid, compact structural preview so the model sees * record counts, field names, and intact sample objects instead of mangled string slices. */ export declare function buildJsonStructuralPreview(parsed: unknown, fullOutputPath?: string): string | undefined; type McpToolResultLike = Pick, 'content'> & { details?: TDetails; structuredContent?: unknown; isError?: boolean; }; /** * Compact oversized MCP JSON results into valid structural previews while preserving * `structuredContent` untouched for `codemode` scripts and non-text blocks (e.g. images). */ export declare function compactLargeMcpJsonResult>(result: T, options?: { jsonCompactThresholdChars?: number; maxFullFileReadBytes?: number; }): Promise; /** * Extension hook catching pre-execution Ajv/schema validation failures and server `isError` * results on `mcp__*` tools, enriching them with actionable parameter or auth recovery hints. */ export declare function createXopcMcpErrorRecoveryExtension(): ExtensionFactory; export {};