export type SessionMode = "init" | "resume"; export interface SessionArtifact { sessionId: string; previousSessionId: string | null; mode: SessionMode; startedAt: string; endedAt: string | null; agentVersion: string; progress: { featuresAttempted: string[]; featuresPassed: string[]; featuresFailed: string[]; summary: string; }; environment: { workingDirectory: string; gitCommitHash: string | null; gitBranch: string | null; serverRunning: boolean; lastSmokeTestPassed: boolean; lastSmokeTestAt: string | null; }; nextSession: { suggestedFirstAction: string; blockers: string[]; nextFeatureId: string | null; }; handoffNotes: string; } export declare class SessionBridge { private readonly artifactDir; private currentSessionId; private previousSessionId; private startedAt; private opened; constructor(artifactDir: string); /** * Called at the very start of any session. * Returns 'init' if no prior artifact exists, 'resume' if one does. */ open(): Promise<{ mode: SessionMode; artifact: SessionArtifact | null; }>; /** * Writes the artifact to disk at session end. * Throws if session was never opened. */ close(progress: SessionArtifact["progress"], handoffNotes: string, environment?: Partial, nextSession?: Partial): Promise; /** * Returns the last N artifacts for debugging/inspection. * Sorted newest first by timestamp (not by filename). */ history(n?: number): Promise; /** * Returns a compact string summary suitable for injecting into a new agent's context. * Deterministic and token-efficient. * * All artifact-sourced text is sanitized before injection. */ contextSummary(): Promise; private readAllArtifacts; private findLatestArtifact; } //# sourceMappingURL=SessionBridge.d.ts.map