import { loadConfig, loadNetworkConfig } from '../config.js'; import { performNpmUpdate, performNpmUpdateEdge } from '../daemon/auto-update.js'; import { resolveStandaloneInstall } from '../daemon/state.js'; import type { RunDoctorOptions } from '../doctor/index.js'; import type { DoctorDeps, DoctorReport } from '../doctor/types.js'; import { getCurrentCliVersion } from './npm-version.js'; import { stopDaemonIfRunning } from './stop-daemon.js'; export type LoadedManualUpdateConfig = Awaited>; export type ManualUpdateState = { config: LoadedManualUpdateConfig; context: { installMode: 'npm' | 'source'; allowPrerelease: boolean; channel?: string; }; }; export type ManualUpdatePreflightResult = { status: 'ok'; warnings?: string[]; } | { status: 'blocked'; findings: Array<{ check: string; message: string; advisory?: string; }>; }; export type ManualUpdateInstallResult = 'updated' | 'failed' | 'daemon-running'; export type ManualUpdateDoctorOps = { createProductionDeps: (options?: { apiPort?: number; }) => DoctorDeps; runDoctor: (deps: DoctorDeps, options?: RunDoctorOptions) => Promise; }; export type ManualUpdateInstallerOps = { applyCore: typeof performNpmUpdate; applyEdge: typeof performNpmUpdateEdge; currentCliVersion: typeof getCurrentCliVersion; stopDaemon: typeof stopDaemonIfRunning; }; /** Resolve real local-over-network update policy independently of the polling enabled gate. */ export declare function loadManualUpdateState(deps?: { loadConfig?: () => Promise; loadNetworkConfig?: typeof loadNetworkConfig; resolveInstallMode?: typeof resolveStandaloneInstall; }): Promise; export declare function runDefaultUpdatePreflight(config: LoadedManualUpdateConfig, doctorOps?: ManualUpdateDoctorOps): Promise; /** Apply the role-specific installer, then stop the old daemon only after success. */ export declare function applyManualUpdate(config: LoadedManualUpdateConfig, version: string, log: (message: string) => void, ops?: ManualUpdateInstallerOps): Promise; //# sourceMappingURL=manual-update.d.ts.map