import { RunDiskStore } from '../../store/run/disk.js';
import { type CostInfo, type TokenUsage } from '../../types/common/index.js';
import type { RunId, SessionId, TenantId } from '../../types/ids/index.js';
import type { Message } from '../../types/message/index.js';
import type { EmergencySaveData } from '../../types/run/emergency.js';
import type { Run, RunPersistenceConfig, StopReason } from '../../types/run/index.js';
import type { ProjectId, ThreadId } from '../../types/session/ids.js';
export declare class RunPersistence {
    private run;
    private runStore;
    private pricing?;
    private log;
    private readonly _sessionId;
    private readonly _threadId;
    private readonly _tenantId;
    private readonly _projectId;
    constructor(config: RunPersistenceConfig);
    get id(): RunId;
    get sessionId(): SessionId;
    get threadId(): ThreadId;
    get tenantId(): TenantId;
    get projectId(): ProjectId;
    get status(): import("../../types/common/index.js").AgentStatus;
    get stopReason(): StopReason | undefined;
    get messages(): Message[];
    get tokenUsage(): TokenUsage;
    get costInfo(): CostInfo;
    get currentIteration(): number;
    getRun(): Readonly<Run>;
    getSession(): Readonly<Run>;
    getRunStore(): RunDiskStore;
    getRunDir(): string | null;
    init(): Promise<void>;
    markRunning(): void;
    markCompleted(stopReason?: StopReason): void;
    markFailed(error: string): void;
    markCancelled(): void;
    setStopReason(reason: StopReason): void;
    setLastError(error: string): void;
    incrementIteration(): number;
    pushMessage(message: Message): void;
    accumulateUsage(usage: TokenUsage): void;
    private resolveResult;
    toEmergencySnapshot(signal: string): EmergencySaveData;
    persist(): Promise<void>;
}
//# sourceMappingURL=persistence.d.ts.map