import type { BuiltinWorkflowCatalog } from "./catalog.js"; import { WorkflowRunStore } from "./store.js"; export type LegacySourceMigrationQueue = { repairCanonicalWorkflowSourceRun(options: { runId: string; workflowName: string; workflowSourceRef: string; runnerId: string; claimToken: string; leaseMs: number; }): "unchanged" | "claimed" | false; claimLegacyWorkflowSourceRun(options: { runId: string; workflowName: string; oldWorkflowPath: string; workflowSourceRef: string; runnerId: string; claimToken: string; leaseMs: number; }): boolean; parkWorkflowRun(options: { runId: string; claimToken: string; }): boolean; getWorkflowRun(runId: string): { status: "claimed" | "parked" | "done"; } | undefined; setWorkflowRunOriginSession?(runId: string, originSessionId: string): boolean; }; export type LegacySourceMigrationResult = { migratedRunIds: string[]; blocked: { runId: string; reason: string; }[]; }; /** One bounded migration for nonterminal runs created before canonical sources. */ export declare function migrateLegacyWorkflowSources(options: { catalog: BuiltinWorkflowCatalog; store?: WorkflowRunStore; queue?: LegacySourceMigrationQueue; }): Promise;