/** * Synthesis consult receipt SSOT — outcome-based completion for s.N todos. * Receipts live at `.xray/state/synthesis-consult-{todoId}.json`. */ export type SynthesisConsultVerdict = 'PASS' | 'CONDITIONAL' | 'FAIL' | 'UNREVIEWED'; export interface SynthesisConsultReceipt { sessionId: string; subagent: string; verdict: SynthesisConsultVerdict; topRisks: string[]; hardeningNote: string; todoId?: string; recordedAt?: string; /** Synthesis plan generation this receipt belongs to. A previous cycle's PASS cannot clear the next s.N. */ cycleId?: string; } export declare function isSynthesisConsultTodoId(todoId: string): boolean; export declare function synthesisConsultReceiptPath(todoId: string, projectRoot?: string): string; export declare function loadSynthesisConsultReceipt(todoId: string, projectRoot?: string): SynthesisConsultReceipt | null; export declare function writeSynthesisConsultReceipt(todoId: string, receipt: SynthesisConsultReceipt, projectRoot?: string): string; /** Only a real approve (PASS) completes a consult todo. */ export declare function consultVerdictBlocksCompletion(verdict: SynthesisConsultVerdict | null | undefined): boolean; export declare function validateSynthesisConsultReceipt(receipt: SynthesisConsultReceipt, todoId: string, expected?: { sessionId?: string | null; subagent?: string; cycleId?: string; }): boolean; export declare function hasValidSynthesisConsultReceipt(todoId: string, projectRoot?: string, expected?: { sessionId?: string | null; subagent?: string; cycleId?: string; }): boolean; export declare function parseConsultVerdictFromText(text: string): SynthesisConsultVerdict | null; export declare function extractTopRisksFromText(text: string, max?: number): string[]; export declare function extractHardeningNoteFromText(text: string, maxChars?: number): string; export declare function coerceToolOutputText(output: unknown): string; export declare function buildReceiptFromConsultOutput(todoId: string, subagent: string, sessionId: string, outputText: string): SynthesisConsultReceipt | null; export declare function tryRecordSynthesisConsultReceipt(todoId: string, subagent: string, sessionId: string, output: unknown, projectRoot?: string): SynthesisConsultReceipt | null;