import type { SessionArtifact, TurnResult } from "./experiment.js"; export type MisinterpretationCategory = "intent-confusion" | "missing-context" | "governance-confusion" | "vocabulary-mismatch" | "none"; /** Snapshot of the repository state before the agent acts. */ export type RepositoryStateSnapshot = { /** Whether the directory was already a SYNTH project. */ initialized: boolean; /** Top-level files and directories present. */ files: string[]; /** Lifecycle phase reported by synth status, if any. */ phase?: string; /** Any warnings or blockers visible to the agent. */ notices?: string[]; }; /** The agent's model of the project at a point in time. */ export type AgentModel = { understoodAs: string; confidence: number; unknowns: string[]; }; /** A single change in the agent's interpretation after consuming evidence. */ export type InterpretationChange = { turn: number; command: string; evidenceConsumed: string[]; from: AgentModel; to: AgentModel; /** Whether this change moved the model toward the intended interpretation. */ aligned: boolean; }; /** An intervention is any action or evidence that corrected the agent's model. */ export type Intervention = { turn: number; command: string; description: string; category?: MisinterpretationCategory; }; /** Success conditions for the session, derived from the scenario. */ export type SuccessConditions = { inspectedBeforeActing: boolean; usedGovernedPath: boolean; reachedCorrectInterpretation: boolean; remainingUnknownsAcceptable: boolean; }; /** Canonical evidence artifact for a first-contact session. */ export type FirstContactEvidence = { schemaVersion: "1.0.0"; sessionId: string; scenarioId: string; humanPrompt: string; repositoryState: RepositoryStateSnapshot; agentInitialModel: AgentModel; evidenceConsumed: TurnResult[]; interpretationChanges: InterpretationChange[]; interventions: Intervention[]; finalModel: AgentModel; misinterpretationCategories: MisinterpretationCategory[]; successConditions: SuccessConditions; }; /** * Extract a canonical FirstContactEvidence artifact from a session artifact. * * This is a pure projection: it does not run any new commands, it only * restructures the captured trajectory into the evidence model. */ export declare function extractFirstContactEvidence(artifact: SessionArtifact): FirstContactEvidence; /** * Persist a FirstContactEvidence artifact to disk. * * Returns the path of the written file. */ export declare function saveFirstContactEvidence(evidence: FirstContactEvidence, outputDir: string, filename?: string): Promise;