import { type RunState } from "./schema.ts"; declare const productiveRunLeaseBrand: unique symbol; export interface ProductiveRunLease { readonly [productiveRunLeaseBrand]: true; } export type LifecycleLockOptions = { readonly purpose?: "productive"; readonly productiveRunLease?: ProductiveRunLease; } | { readonly purpose: "status" | "abort"; readonly productiveRunLease?: never; }; export interface LifecycleLock { readonly productiveRunLeaseActive: boolean; } export declare class RunStateHandle { state: RunState; readonly path: string; private writes; private readonly root; private readonly requestId; private readonly replace; constructor(state: RunState, path: string, replace: (contents: string) => Promise); save(): Promise; } export declare class FileRunStore { private readonly agentDir?; private readonly onStateSaved?; private readonly productiveRunLeases; constructor(agentDir?: string, onStateSaved?: (state: RunState) => void); stateDirectory(root: string): string; statePath(root: string, id: string): string; private lockPath; private productiveRunPath; private assertSafeDestination; withProductiveRunLease(root: string, operation: (lease: ProductiveRunLease) => Promise): Promise; hasProductiveRunLease(root: string): Promise; withLock(root: string, operation: (lifecycle: LifecycleLock) => Promise, options?: LifecycleLockOptions): Promise; create(state: RunState): Promise; load(root: string, id: string): Promise; list(root: string): Promise<{ states: RunStateHandle[]; invalidIds: string[]; }>; private handle; } export {};