import type { NdjsonParallelMetadata, NdjsonWorkflowStackEntry } from '../../shared/utils/types.js'; export declare const MAX_PROMPT_LINE_OWNERSHIP_ENTRIES = 10000; export declare const MAX_AMBIGUOUS_PROMPT_LINE_OWNERSHIP_ENTRIES = 1000; export declare const MAX_OCCURRENCE_PROMPT_COUNT = 64; export declare const MAX_OCCURRENCE_PROMPT_BODY_BYTES: number; export interface RunJudgeStage { readonly stage: number; readonly method: string; readonly status: string; readonly response: string; } export interface RunLogEvent { readonly type: string; readonly timestamp?: string; readonly step?: string; readonly phase?: number; readonly phaseName?: string; readonly phaseExecutionId?: string; readonly iteration?: number; readonly persona?: string; readonly workflow?: string; readonly childWorkflow?: string; readonly callInstance?: string; readonly stack?: readonly NdjsonWorkflowStackEntry[]; readonly parallel?: NdjsonParallelMetadata; readonly status?: string; readonly provider?: string; readonly providerSource?: string; readonly model?: string; readonly modelSource?: string; readonly matchedRuleIndex?: number; readonly matchedRuleMethod?: string; readonly matchMethod?: string; readonly returnValue?: string; readonly stage?: number; readonly method?: string; readonly response?: string; readonly judgeStage?: RunJudgeStage; readonly judgeStages?: readonly RunJudgeStage[]; readonly content?: string; readonly error?: string; readonly reason?: string; readonly preview?: string; readonly previewTruncated?: boolean; readonly occurrenceId?: string; } export interface RunLogGraphSummary { /** * Canonical occurrence snapshots in newest-first order, matching `events` * and `history` in the run detail DTO. */ readonly occurrences: readonly RunLogEvent[]; readonly totalOccurrences: number; readonly truncated: boolean; } export interface RunLogScanStats { readonly bytesRead: number; readonly totalBytesRead: number; readonly reusedBytes: number; } export interface RunLogArtifacts { readonly events: readonly RunLogEvent[]; readonly history: readonly RunLogEvent[]; readonly historyTruncated: boolean; readonly graphSummary: RunLogGraphSummary; readonly warnings: readonly string[]; } export interface RunPromptArtifact { readonly timestamp?: string; readonly step?: string; readonly phase?: number; readonly phaseName?: string; readonly phaseExecutionId?: string; readonly iteration?: number; readonly workflow?: string; readonly systemPrompt?: string; readonly userInstruction?: string; readonly instruction?: string; } export interface RunPromptReadResult { readonly prompts: readonly RunPromptArtifact[]; readonly promptsTruncated: boolean; readonly omittedPromptCount: number; } export type RunLogArtifactsDiagnostics = RunLogArtifacts & { readonly scan: RunLogScanStats; }; export interface RunOccurrenceLifecycle { readonly occurrenceId: string; readonly path: string; readonly startLine: number; readonly endLine?: number; /** * Line-level ownership assigned while the source log is indexed. An absent * entry is not considered safe for a prompt read because it may have been * evicted or may belong to a legacy/incomplete cache. */ readonly promptLineOwnership: ReadonlyMap; /** Ambiguous phase lines are retained in a separate bounded index. */ readonly ambiguousPromptLines: ReadonlyMap; readonly promptOwnershipSchemaVersion: number; readonly promptOwnershipComplete: boolean; /** * A second lifecycle boundary reused this identity before the first one * closed. The source range is no longer trustworthy, so prompt reads must * fail closed instead of scanning through the later lifecycle. */ readonly ambiguous?: boolean; } /** * Returns the source log and line boundary assigned while indexing an * occurrence. This is kept out of the run-detail DTO and is used only by the * on-demand prompt reader; an ambiguous lifecycle is returned explicitly so * that reader can fail closed. */ export declare function getRunOccurrenceLifecycle(cacheKey: string, occurrenceId: string): RunOccurrenceLifecycle | undefined; /** * Reads prompt bodies only for one already-validated occurrence. Prompt text * is intentionally not part of the bounded run-detail cache or SSE snapshot. */ export declare function readRunOccurrencePrompts(paths: readonly string[], occurrence: Pick, verifySnapshot: () => Promise, lifecycle?: RunOccurrenceLifecycle): Promise; export declare function readRunLogArtifacts(cacheKey: string, paths: readonly string[], verifySnapshot: () => Promise): Promise; /** * Test/diagnostic seam for proving incremental scanning without exposing * implementation counters through the Web UI run detail DTO. */ export declare function readRunLogArtifactsForDiagnostics(cacheKey: string, paths: readonly string[], verifySnapshot: () => Promise): Promise; //# sourceMappingURL=run-log-cache.d.ts.map