import type { Message } from "@earendil-works/pi-ai"; import type { TraceStructuredOutput } from "../types/output.js"; /** * Strip markdown code block fences from the start/end of a string when the * ENTIRE string is wrapped in a fence. Returns the original string if no * complete fence is found. * * Matches: * ^\s*```(?:\w+)?\s*\n ... \n\s*```\s*$ * * Uses a greedy inner capture so nested fences are preserved. */ export declare function unwrapMarkdownCodeBlock(text: string): string; /** * Extract a structured JSON output block from the end of an assistant's text for trace flow. * * Looks for a final ```json ... ``` code block, parses it, and validates * against the TraceStructuredOutput schema. Returns undefined when the block * is missing, malformed, or fails validation. */ export declare function extractTraceStructuredOutput(text: string): TraceStructuredOutput | undefined; /** * Automatically resolve tool_ids to verbatim args + output */ export declare function resolveToolEvidence(toolIds: string[], messages: Message[], parentBranch: unknown[]): string; //# sourceMappingURL=trace-output.d.ts.map