import { type ServerSettingsService } from '../settings/settings.service.js'; import { compareRuntimeVersions, npmDistTagLookup, npmTagForReleaseTrack, runtimeUpgradeCheckError, type RuntimeDistTagLookup } from './runtime-release.js'; import { type RuntimeReleaseTrack, type RuntimeUpgradeApplyResponse, type RuntimeUpgradeCheckError, type RuntimeUpgradeGate, type RuntimeUpgradeOperation as RuntimeUpgradeOperationType, type RuntimeUpgradeStatusResponse } from '../../shared/runtime-upgrade.js'; export { compareRuntimeVersions, npmDistTagLookup, npmTagForReleaseTrack, runtimeUpgradeCheckError, }; export type { RuntimeDistTagLookup }; export interface RuntimeUpgradeServiceOptions { checkStore?: RuntimeUpgradeCheckStore; checkTtlMs?: number; distTagLookup?: RuntimeDistTagLookup; now?: () => Date; operationStore?: RuntimeUpgradeOperationStore; packageName?: string; packageVersion?: () => Promise; settings?: ServerSettingsService; } export interface RuntimeUpgradeWorkerOptions { dashboardHost?: string; dashboardPort?: number; idleTimeoutMs?: number; logPath?: string; npmCommand?: string; packageName?: string; previousStartedAt?: string; previousVersion?: string; releaseTrack: RuntimeReleaseTrack; targetVersion: string; verifyTimeoutMs?: number; } export interface PreparedRuntimeUpgrade { response: RuntimeUpgradeApplyResponse; spawn: () => Promise; } interface RuntimeUpgradeCheckCache { checkedAt: string; checkError?: RuntimeUpgradeCheckError; latestOnTrack?: string; releaseTrack: RuntimeReleaseTrack; } export interface RuntimeUpgradeWorkerSpawnPlanInput { animactlScript: string; animaHome: string; dashboardHost: string; dashboardPort: number; env?: NodeJS.ProcessEnv; logPath: string; nodePath: string; nowMs?: number; platform?: NodeJS.Platform; previousStartedAt?: string; previousVersion: string; releaseTrack: RuntimeReleaseTrack; targetVersion: string; } export interface RuntimeUpgradeWorkerSpawnPlan { args: string[]; command: string; cwd: string; detached: boolean; env: NodeJS.ProcessEnv; stdio: 'ignore' | 'log'; waitForExit: boolean; } export declare class RuntimeUpgradeConflictError extends Error { } export declare class RuntimeUpgradeUnavailableError extends Error { } export declare class RuntimeUpgradeService { private readonly checkStore; private readonly checkTtlMs; private readonly distTagLookup; private readonly now; private readonly operationStore; private readonly packageName; private readonly packageVersion; private readonly settings; constructor(options?: RuntimeUpgradeServiceOptions); status(): Promise; checkNow(): Promise; prepareApply(input: { animactlScript: string; dashboardHost?: string; dashboardPort?: number; logPath?: string; previousStartedAt?: string; }): Promise; private refreshCheckCache; private statusFromCheck; private operationForStatus; } export declare class RuntimeUpgradeCheckStore { private readonly file; read(): Promise; write(check: RuntimeUpgradeCheckCache): Promise; } export declare class RuntimeUpgradeOperationStore { private readonly file; read(): Promise; write(operation: RuntimeUpgradeOperationType): Promise; } export declare const defaultRuntimeUpgradeCheckStore: RuntimeUpgradeCheckStore; export declare const defaultRuntimeUpgradeOperationStore: RuntimeUpgradeOperationStore; export declare const defaultRuntimeUpgradeService: RuntimeUpgradeService; export declare function runRuntimeUpgradeWorker(options: RuntimeUpgradeWorkerOptions): Promise; export declare function runtimeUpgradeGate(): Promise; export declare function runtimeUpgradeWorkerSpawnPlan(input: RuntimeUpgradeWorkerSpawnPlanInput): RuntimeUpgradeWorkerSpawnPlan; //# sourceMappingURL=runtime-upgrade.d.ts.map