import { type ServiceScope } from "./tui/commands.js"; export interface DetachedUpdateOptions { installSpec: string; configPath: string; parentPid: number; cliArgs: string[]; nodeLoaderArgs?: string[]; cwd: string; env: NodeJS.ProcessEnv; timeoutMs?: number; } export interface DetachedUpdateResult { started: boolean; scriptPath: string; logPath: string; pid?: number; message: string; } /** A manifest alone is not enough: only a process actually launched by its manager may rely on auto-restart. */ export declare function resolveManagedServiceScope(installedScope: ServiceScope | null, platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv, pid?: number): ServiceScope | null; export declare function resolveManagedServiceScopeCandidates(installedScopes: ServiceScope[], platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv, pid?: number): ServiceScope | null; export declare function isStableServiceEntrypoint(entrypoint: string | null, stableBin: string | null): boolean; export declare function checkManagedServiceUpdatePreflight(): { ok: true; } | { ok: false; message: string; }; export declare function shouldUseSystemdRunForDetachedUpdate(serviceScope: ServiceScope | null): boolean; /** Exported so the safety-critical update flow can be exercised without starting a detached process. */ export declare function buildDetachedUpdateHelperScript(opts: DetachedUpdateOptions, logPath: string, serviceScope: ServiceScope | null, updateUtilsPath?: string): string; export declare function startDetachedUpdateHelper(opts: DetachedUpdateOptions): DetachedUpdateResult; export declare function canUseDetachedUpdateHelper(): boolean;