export type SelfUpgradeWatchOptions = { cwd: string; port: number; hostname: string; /** Currently-loaded version to compare against — defaults to PLUGIN_VERSION, overridable for tests. */ currentVersion: string; checkIntervalMs?: number; /** Injectable for tests — defaults to spawning a real detached `serve` re-invocation. */ onNewerVersionDetected?: (installedVersion: string) => void; }; /** Re-reads the installed package.json fresh off disk — never the require-cached copy. */ export declare function readInstalledVersion(): string; /** * Registers a periodic check; returns an unregister function (clears the * interval). Stops itself after the first detected mismatch — only ever * triggers one respawn per process. */ export declare function registerSelfUpgradeWatch(opts: SelfUpgradeWatchOptions): () => void;