import { HomeReleaseStore, type HomeReleaseState } from "./home-release-store.js"; import { type NodeRuntimeRef, type ReleaseRef } from "./release-ref.js"; import { SharedReleaseStore } from "./shared-release-store.js"; export interface RuntimeHomeMigrationOptions { niubotHome: string; runtimePath: string; node: NodeRuntimeRef; sharedStore: SharedReleaseStore; env: NodeJS.ProcessEnv; verify?: (packageDirectory: string, version: string) => void | Promise; } export interface CompletedRuntimeHomeMigration { homeStore: HomeReleaseStore; sharedRef: Extract; state: HomeReleaseState; } export interface CompleteRuntimeHomeMigrationOptions extends RuntimeHomeMigrationOptions { settleMs?: number; retryMs?: number; timeoutMs?: number; sleep?: (milliseconds: number) => Promise; acquireRestartLock?: () => () => void; } /** * Finish legacy adoption after the Engine is serving normally. An update * started by an older runtime still owns the home transaction while the new * Engine boots, so wait for that transaction to commit instead of requiring a * second user restart. */ export declare function completeRuntimeHomeMigrationAfterStartup(options: CompleteRuntimeHomeMigrationOptions): Promise;