import type { TurnContext } from "../core/types.js"; import type { HandoffEvalScenario } from "./handoff-scenarios.js"; import type { InterviewEvalScenario } from "./scenarios.js"; interface SessionJsonlEntry { type: string; id?: string; parentId?: string; timestamp?: string; customType?: string; content?: string; details?: { questions?: unknown; answers?: unknown; cancelled?: boolean; durationMs?: number; handoff?: unknown; }; message?: { role?: string; content?: Array<{ type: string; text?: string; thinking?: string; toolCallId?: string; toolName?: string; name?: string; arguments?: Record; }>; provider?: string; model?: string; usage?: { input?: number; output?: number; totalTokens?: number; cost?: { total?: number; }; }; stopReason?: string; details?: { questions?: unknown; answers?: unknown; cancelled?: boolean; durationMs?: number; handoff?: unknown; }; }; } export interface SessionTurnSlice { sessionFile: string; sessionDir: string; project: string; turnIndex: number; userPrompts: string[]; assistantText: string; assistantModel: string; assistantProvider: string; toolCalls: string[]; toolResults: string[]; touchedFiles: string[]; diagnostics: string[]; occurredAt: string; messageCount: number; hasCompaction: boolean; turnCount: number; } export interface ReplayHandoffRef { sessionDir: string; sessionFile: string; answerId?: string; occurredAt?: string; observedHandoff?: string; handoffExecutionContract?: string[]; handoffPriorityOrder?: string[]; handoffRelevantSkills?: string[]; observedFirstReply?: string; observedFirstReplyModel?: string; observedFirstReplyProvider?: string; } export interface ReplayHandoffExtractionOptions { maxScenarios?: number; projectFilter?: string[]; } export interface ReplayInterviewRef { sessionDir: string; sessionFile: string; turnIndex: number; occurredAt: string; assistantModel: string; assistantProvider: string; } export interface ReplayInterviewEvalScenario extends InterviewEvalScenario { replayRef: ReplayInterviewRef; } /** * Frozen replay fixtures capture live dogfood failures that we want to keep in * the replay corpus even if the exact session artifact is noisy or incomplete. * * This mono case came from a real live pi-interview dogfood run where the user * selected both Council → Pair and Campaign. The resulting first reply loaded * rules, spun up council-style work, and never normalized the orchestration * into one coherent execution contract. */ export declare const FROZEN_HANDOFF_REPLAY_SCENARIOS: HandoffEvalScenario[]; export declare function listSessionDirs(): Promise; export declare function listSessionFiles(dirName: string): Promise; export declare function parseSessionJsonl(filePath: string): Promise; export declare function extractTurnSlices(entries: SessionJsonlEntry[], sessionFile: string, sessionDir: string): SessionTurnSlice[]; export declare function sliceToTurnContext(slice: SessionTurnSlice): TurnContext; export interface ReplayExtractionOptions { maxTurnsPerSession?: number; minAssistantLength?: number; preferDeepSessions?: boolean; projectFilter?: string[]; } export interface ReplayInterviewExtractionOptions extends ReplayExtractionOptions { maxScenarios?: number; } export declare function extractReplayFixtures(options?: ReplayExtractionOptions): Promise; export declare function sliceToInterviewReplayScenario(slice: SessionTurnSlice): ReplayInterviewEvalScenario; export declare function extractInterviewReplayScenariosFromSlices(slices: SessionTurnSlice[]): ReplayInterviewEvalScenario[]; export declare function extractInterviewReplayScenarios(options?: ReplayInterviewExtractionOptions): Promise; export declare function extractHandoffReplayScenariosFromEntries(entries: SessionJsonlEntry[], sessionFile: string, sessionDir: string): HandoffEvalScenario[]; export declare function extractHandoffReplayScenarios(options?: ReplayHandoffExtractionOptions): Promise; export {}; //# sourceMappingURL=session-replay.d.ts.map