declare const lockPath: () => string; declare const shouldCheck: (now: number) => boolean; declare const recordCheck: (now: number, latest: string | null) => void; declare const fetchLatest: () => Promise; declare const cachedNewerVersion: () => string | null; declare const newer: (a: string, b: string) => boolean; declare const isNpmGlobalInstall: () => boolean; type SelfUpdateResult = { readonly ok: true; } | { readonly ok: false; readonly reason: "locked" | "npm-failed"; readonly stderrTail?: string; }; declare const runSelfUpdate: () => SelfUpdateResult; /** Detached, TTL'd: never blocks the calling turn. Safe to call from every command. */ declare const maybeSpawnBackgroundUpdate: () => Promise; /** 426 from the server: update NOW, then re-exec the (new) global bin with the original args. */ declare const handle426AndReexec: (argv: string[]) => never; /** * 426 in a hook context: hint + detached background update, never block or * re-exec — the hook has a hard timeout and Claude/Codex inject its stdout * as context, so a synchronous npm install here would block the user's turn. * Returns whether a background update was actually spawned, so callers can * pick an honest agent-facing hint (a gated spawn means nothing is updating — * the user has to run the install themselves). */ declare const handle426InHook: () => boolean; export { lockPath, shouldCheck, recordCheck, fetchLatest, newer, isNpmGlobalInstall, runSelfUpdate, maybeSpawnBackgroundUpdate, handle426AndReexec, handle426InHook, cachedNewerVersion, };