/** * Synthesis — periodic reflect & realign checkpoint SSOT. * Slice counter + feature flag + `.xray/state/synthesis-checkpoint.json`. * PR2 wires pre-tool gate deny via delegation-gate.ts. */ export declare const SYNTHESIS_PRIMITIVE = "synthesis"; export type ExecutionSliceKind = 'gate' | 'turn' | 'todo_completed'; export interface SynthesisConfig { enabled: boolean; every_n_gates: number; every_n_turns: number; every_n_todos_completed: number; } export interface SynthesisSliceCounters { gates: number; turns: number; todosCompleted: number; } export interface SynthesisCheckpointState { version: 1; sessionId: string; slicesSinceLastSynthesis: SynthesisSliceCounters; lifetimeSlices: SynthesisSliceCounters; synthesisDue: boolean; dueReason: string | null; lastSynthesisAt: string | null; lastSliceAt: string; synthesisCount: number; } export interface RecordSliceResult { state: SynthesisCheckpointState; becameDue: boolean; dueReason: string | null; } export interface SynthesisDueEvaluation { due: boolean; reason: string | null; } export declare function synthesisCheckpointPath(projectRoot?: string): string; export declare function defaultSynthesisConfig(): SynthesisConfig; export declare function loadSynthesisConfig(projectRoot?: string): SynthesisConfig; export declare function createInitialSynthesisState(sessionId: string): SynthesisCheckpointState; export declare function loadSynthesisCheckpointState(projectRoot?: string): SynthesisCheckpointState | null; export declare function saveSynthesisCheckpointState(state: SynthesisCheckpointState, projectRoot?: string): string; export declare function evaluateSynthesisDue(counters: SynthesisSliceCounters, config: SynthesisConfig): SynthesisDueEvaluation; export declare function recordExecutionSlice(kind: ExecutionSliceKind, ctx: { projectRoot?: string; sessionId: string | null; }): RecordSliceResult | null; export declare function completeSynthesisCheckpoint(projectRoot?: string, sessionId?: string | null): SynthesisCheckpointState | null; export declare function isSynthesisCheckpointDue(projectRoot?: string, sessionId?: string | null): boolean; export declare function getSynthesisDueReason(projectRoot?: string, sessionId?: string | null): string | null; /** Session bound to an active synthesis checkpoint (for MCP when host omits sessionId). */ export declare function getSynthesisCheckpointSessionId(projectRoot?: string): string | null;