export type LocalOperationStatus = 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'interrupted'; export interface LocalOperationError { code: string; message: string; retryable: boolean; } export interface LocalOperation { id: string; type: string; scope: string; resourceRevision?: string; status: LocalOperationStatus; phase: string; progress: number; message: string; cancellable: boolean; result?: TResult; error?: LocalOperationError; createdAt: string; updatedAt: string; } export type LocalOperationProgress = Pick & { resourceRevision?: string; }; type OperationListener = (operation: LocalOperation) => void; /** * Durable, project-local operation registry used by the OSS notebook runtime. * * Jobs remain in-process, but their lifecycle is independent from a mounted * page. A browser can navigate away, reconnect to progress, or retry after a * runtime restart without coupling the work to React component state. */ export declare class LocalOperationCoordinator { private readonly db; private readonly listeners; private readonly controllers; private closed; constructor(dbPath: string); create(input: { type: string; scope: string; resourceRevision?: string; phase?: string; message?: string; cancellable?: boolean; }): LocalOperation; run(operationId: string, task: (signal: AbortSignal, report: (progress: Partial) => void) => Promise): Promise | null>; cancel(operationId: string): LocalOperation | null; get(operationId: string): LocalOperation | null; list(limit?: number): LocalOperation[]; subscribe(listener: OperationListener): () => void; close(): void; private update; private persist; private emit; private prune; } export {}; //# sourceMappingURL=local-operation-coordinator.d.ts.map