import type { SessionLog } from '../../shared/utils/index.js'; import type { LiveInterventionState } from '../../core/workflow/live-intervention/types.js'; export declare const MAX_RUN_REPORT_BYTES: number; export interface RunSummary { readonly slug: string; readonly task: string; readonly workflow: string; readonly status: string; readonly startTime: string; } type SessionHistoryEntry = SessionLog['history'][number]; interface StepLogEntry { readonly step: string; readonly persona: string; readonly status: string; readonly content: string; readonly timestamp?: string; readonly iteration?: number; readonly workflow?: SessionHistoryEntry['workflow']; readonly stack?: SessionHistoryEntry['stack']; } interface ReportEntry { readonly filename: string; readonly content: string; readonly sizeBytes?: number; readonly totalBytes?: number; readonly offset?: number; readonly returnedBytes?: number; readonly nextOffset?: number | null; readonly truncated?: boolean; readonly direction?: 'forward'; } export interface RunSessionContext { readonly task: string; readonly workflow: string; readonly status: string; readonly currentStep?: string; readonly currentIteration?: number; readonly currentStepStartedAt?: string; readonly currentStepExecutionCount?: number; readonly phase?: 1 | 2 | 3; readonly stepLogs: readonly StepLogEntry[]; readonly reports: readonly ReportEntry[]; readonly liveIntervention?: LiveInterventionState; } export interface RunPaths { readonly logsDir: string; readonly reportsDir: string; } interface LiveInterventionReportFallback { readonly reports: RunSessionContext['reports']; readonly onFallback?: () => void; } export declare function listRecentRuns(cwd: string): RunSummary[]; export declare function findRunForTask(cwd: string, taskContent: string): string | null; export declare function getRunPaths(cwd: string, slug: string): RunPaths; export interface RunSessionReadOptions { view?: 'summary' | 'log' | 'report' | 'instructions' | 'task'; instructionId?: number; stepIndex?: number; report?: string; limit?: number; offset?: number; maxBytes: number; liveInterventionProjectCwd?: string; } export declare function loadRunSessionPage(cwd: string, slug: string, options: RunSessionReadOptions): Record; export declare function loadRunSessionContext(cwd: string, slug: string, options?: { reportNames?: readonly string[]; liveInterventionProjectCwd?: string; liveInterventionReportFallback?: LiveInterventionReportFallback; }): RunSessionContext; export declare function loadPreviousOrderContent(cwd: string, taskContent: string): string | null; export declare function formatRunSessionForPrompt(ctx: RunSessionContext): { runTask: string; runWorkflow: string; runStatus: string; runCurrentStep: string; runPhase: string; runStepLogs: string; runReports: string; runLiveIntervention: string; }; export {}; //# sourceMappingURL=runSessionReader.d.ts.map