import { OrchestratorTree, type NodeStatus } from "./orchestrator-tree.js"; import type { RunManifest, RunOutcome } from "./transcript-archive-types.js"; /** * Tail entries appended per phase leaf. The tree's tail buffer keeps the * NEWEST 2048 entries (live semantics: trim oldest) — wrong direction for * replay, where the head of the transcript is the valuable part. We * head-truncate the digest BEFORE appending so the buffer never trims. */ export declare const REPLAY_TAIL_BUDGET = 1500; /** Map a run outcome to a tree node status (root node). */ export declare function mapOutcomeToStatus(outcome: RunOutcome): NodeStatus; /** * Map an archived phase verdict to a leaf node status. Verdicts come from * orchestrator phase-end events: "approved" | "revision" | "n/a" | "error" | * "cancelled" | "halted" (plus free-form legacy strings). */ export declare function mapVerdictToStatus(verdict: string, runOutcome: RunOutcome): NodeStatus; export interface ReplayResult { tree: OrchestratorTree; rootId: string; } /** * Build a detached OrchestratorTree mirroring one archived run: root node = * the run, one leaf per phase attempt, tails from the gunzipped phase * digests, timestamps backfilled from the archive so elapsed times render * frozen (formatMetrics uses `endedAt ?? Date.now()`). */ export declare function hydrateRunTree(manifest: RunManifest, runDir: string): ReplayResult;