/** * Solution persistence for compound extraction. * * Extracted from compound-extractor.ts — saving extracted solutions, * updating re-extraction counters, and managing extraction state. */ import type { ExtractedSolution } from './extraction-gates.js'; export interface LastExtraction { lastCommitSha: string; lastExtractedAt: string; extractionsToday: number; todayDate: string; } /** Load last extraction state */ export declare function loadLastExtraction(): LastExtraction; /** Save last extraction state */ export declare function saveLastExtraction(state: LastExtraction): void; /** Save an extracted solution as experiment */ export declare function saveExtractedSolution(sol: ExtractedSolution, _sessionId: string): string | null; /** * Increment reExtracted counter on existing solution that matches given tags. */ export declare function updateReExtractedCounter(tags: string[]): void; /** * Observability: detect references to existing solutions in new content → emit acted_on. */ export declare function emitCompoundExtractActedOn(sessionId: string, newSolutionName: string, newContent: string, newSupersedes: string | null): void;