import { StructuralPattern } from "./semantic-patterns.js"; export interface SessionInference { sessionId: string; timestamp: string; span: { from: string; to: string; }; problems: string[]; approaches: string[]; wrongTurns: string[]; solutions: string[]; reasoningChain: ReasoningLink[]; patterns: StructuralPattern[]; metrics: SessionMetrics; /** Signals this session already named. Session JSON stores this list. */ matched_primitives?: string[]; /** Same list after load, so callers can read either field. */ matchedPrimitives?: string[]; /** Inference operation this session was captured from. A second completion of the same id does not write another file. */ operationId?: string; } export interface ReasoningLink { from: string; to: string; reasoning: string; } export interface SessionMetrics { commits: number; filesChanged: number; insertions: number; deletions: number; filesAdded: number; filesDeleted: number; uniqueDirs: number; } /** Date stamp plus the operation id. Callers do not append a HEAD suffix. */ export declare function mintSessionId(now?: Date, distinct?: string): string; export declare function captureSessionInference(fromRef: string, toRef: string): SessionInference | null; export declare function saveSessionInference(inference: SessionInference, outputDir?: string): string; export interface OperationCaptureInput { operationId: string; promptsDir: string; inferenceDir: string; signalNames: readonly string[]; } /** * One corpus session for a finished inference operation. * Speech comes from that run's prompt result text. No speech, no file. * Does not grade. The caller runs the cycle before it returns. */ export declare function captureCompletedInferenceOperation(input: OperationCaptureInput): string | null; /** Id, or that id with hyphens read as spaces. Same hit `patternsFromGit` stores for the proposal generator. */ export declare function reflectionSessionId(relativePath: string): string; /** Reflection markdown is the speech. No session file is written. */ export declare function captureReflectionInference(input: { relativePath: string; text: string; modifiedAt: Date; signalNames: readonly string[]; }): SessionInference | null; /** The gauge file. One session log per reflection, skipped when that id is already on disk. */ export declare function saveReflectionSession(session: SessionInference, inferenceDir: string): string | null;