import { type Server } from 'node:net'; import type { MigrationEvidence, RemoteMigrationClaim } from './migration-pull'; export declare const DEFAULT_LIFECYCLE_HELPER_SOCKET = "/run/forgezero-lifecycle/helper.sock"; export interface LifecycleProfile { /** Root-owned systemd units whose normal stop path performs application drain. */ apiUnits: readonly string[]; /** Root-owned database service stopped only at the final retirement stage. */ databaseUnit?: string; /** Loopback health endpoint for the API on this compute. */ apiHealthUrl: string; /** Loopback health endpoint for the database member on this compute. */ databaseHealthUrl?: string; /** Ports that must be reachable on every signed controller-provided private peer. */ databasePorts?: readonly number[]; } export interface LifecycleCommandResult { exitCode: number; stdout: string; stderr: string; } export type LifecycleExec = (argv: readonly string[]) => Promise; export declare function validateLifecycleProfile(profile: LifecycleProfile): void; export declare function loadLifecycleProfile(path: string): LifecycleProfile; export declare const spawnLifecycleCommand: LifecycleExec; export declare function executeLifecycleAction(profile: LifecycleProfile, claim: RemoteMigrationClaim, exec?: LifecycleExec, tcpProbe?: (host: string, port: number) => Promise, fetcher?: typeof fetch): Promise; export declare function startLifecycleHelper(options: { profile: LifecycleProfile; socketPath?: string; exec?: LifecycleExec; tcpProbe?: (host: string, port: number) => Promise; fetch?: typeof fetch; }): { server: Server; stop(): Promise; }; export declare function requestLifecycleAction(claim: RemoteMigrationClaim, socketPath?: string): Promise;