import { type RuntimeDecision } from "../runtime/client.js";
export type ExecutionLifecycle = "idle" | "packet-created" | "queued" | "running" | "blocked" | "failed" | "completed";
export interface ExecutionArtifacts {
    [key: string]: string[];
}
export interface ExecutionStateEvent {
    revision: number;
    operationId: string | null;
    type: string;
    lifecycle: ExecutionLifecycle;
    task: string | null;
    sourceCommand: string | null;
    reason: string | null;
    nextCommand: string | null;
    blockedBy: string[];
    artifacts: ExecutionArtifacts;
    recordedAt: string;
}
export interface ExecutionStateRecord {
    artifactType: "kiwi-control/execution-state";
    version: 1;
    revision: number;
    operationId: string | null;
    task: string | null;
    sourceCommand: string | null;
    lifecycle: ExecutionLifecycle;
    reason: string | null;
    nextCommand: string | null;
    blockedBy: string[];
    lastUpdatedAt: string | null;
    artifacts: ExecutionArtifacts;
    lastEvent: ExecutionStateEvent | null;
}
export interface RecordExecutionStateOptions {
    type: string;
    lifecycle: ExecutionLifecycle;
    task?: string | null;
    sourceCommand?: string | null;
    reason?: string | null;
    nextCommand?: string | null;
    blockedBy?: string[];
    artifacts?: ExecutionArtifacts;
    operationId?: string | null;
    reuseOperation?: boolean;
    clearTask?: boolean;
    decision?: RuntimeDecision | null;
}
export declare function executionStatePath(targetRoot: string): string;
export declare function executionEventsPath(targetRoot: string): string;
export declare function emptyExecutionState(): ExecutionStateRecord;
export declare function loadExecutionState(targetRoot: string, options?: {
    allowLegacyFallback?: boolean;
}): Promise<ExecutionStateRecord>;
export declare function recordExecutionState(targetRoot: string, options: RecordExecutionStateOptions): Promise<ExecutionStateRecord>;
export declare function persistExecutionState(targetRoot: string, state: ExecutionStateRecord): Promise<string>;
export declare function readExecutionStateRevision(targetRoot: string): Promise<number>;
//# sourceMappingURL=execution-state.d.ts.map