import type { EffectRecord, IterationMetadata } from "../../runtime/types"; import type { JournalEvent, RunMetadata, StoredTaskResult } from "../../storage/types"; import { type StateCacheSnapshot } from "./runSupport"; type RunLifecycleState = "created" | "waiting" | "completed" | "halted" | "failed"; export interface TaskListEntry { effectId: string; taskId: string; stepId: string; status: string; kind?: string; label?: string; labels?: string[]; taskDefRef: string | null; inputsRef: string | null; resultRef: string | null; stdoutRef: string | null; stderrRef: string | null; requestedAt?: string; resolvedAt?: string; } export declare function buildEffectIndexSafe(runDir: string, command: string, events?: JournalEvent[]): Promise; export declare function readRunMetadataSafe(runDir: string, command: string): Promise; export declare function loadJournalSafe(runDir: string, command: string): Promise; export declare function readStateCacheSafe(runDir: string, command: string): Promise; export declare function toTaskListEntry(record: EffectRecord, runDir: string): TaskListEntry; export declare function findLastLifecycleEvent(events: JournalEvent[]): JournalEvent | undefined; export declare function countPendingByKind(records: EffectRecord[]): Record; export declare function loadTaskResultPreview(runDir: string, effectId: string, record: EffectRecord): Promise<{ result?: StoredTaskResult; large: boolean; }>; export declare function deriveRunState(lastLifecycleEventType: JournalEvent["type"] | undefined, pendingTotal: number): RunLifecycleState; export declare function deriveRunReason(lastLifecycleEventType: JournalEvent["type"] | undefined): string | null; export declare function formatLastEventSummary(event?: JournalEvent): string; export declare function mergeMetadataSources(metadata: IterationMetadata | undefined, options: { snapshot?: StateCacheSnapshot | null; pendingByKind?: Record; }): IterationMetadata | undefined; export declare function formatIterationMetadata(metadata?: IterationMetadata): { textParts: string[]; jsonMetadata?: IterationMetadata; }; export declare function serializeJournalEvent(event: JournalEvent, runDir: string): { seq: number; ulid: string; type: string; recordedAt: string; filename: string; path: string | undefined; data: Record; }; export declare function ensureIterationMetadata(data: Record): Record; export declare function formatEventLine(event: JournalEvent): string; export declare function formatSeq(seq: number): string; export {}; //# sourceMappingURL=runState.d.ts.map