import type { UpdateHoldoffGate } from './auto-update-jitter.js'; import type { LastUpdateCheck } from './state.js'; import type { ResolvedAutoUpdateConfig } from '../config.js'; /** * Re-resolve the CURRENT npm channel target after the hold-off, mapping to the * version to apply or null when there is nothing to apply now (withdrawn / * rolled back / caught up). Private to the runner — a one-line adapter over the * already-public `checkForNpmVersionUpdate`, not part of the daemon's API. */ export declare function resolveCurrentNpmTarget(log: (msg: string) => void, allowPrerelease: boolean, channel?: string): Promise; /** Git counterpart to {@link resolveCurrentNpmTarget}: the current ref tip, or * null when it no longer points ahead of the running commit. Runner-private. */ export declare function resolveCurrentGitTarget(au: ResolvedAutoUpdateConfig, log: (msg: string) => void): Promise; export interface NpmUpdateRunCheckDeps { /** null = version-check-only (auto-apply disabled): detect + record, never apply. */ gate: UpdateHoldoffGate | null; log: (msg: string) => void; lastUpdateCheck: LastUpdateCheck; allowPrerelease: boolean; channel?: string; nodeRole: 'edge' | 'core'; /** Trigger the supervised restart after a successful install. */ onRestart: () => Promise; } /** * Build the npm-mode polling `runCheck`. Always refreshes `lastUpdateCheck` (so * `/api/status` is current even when auto-apply is off); when a gate is present * and an update is available, routes the apply through it — including the * post-hold-off revalidation that skips a version withdrawn during the wait. */ export declare function createNpmUpdateRunCheck(deps: NpmUpdateRunCheckDeps): () => Promise; export interface GitUpdateRunCheckDeps { gate: UpdateHoldoffGate; log: (msg: string) => void; lastUpdateCheck: LastUpdateCheck; au: ResolvedAutoUpdateConfig; onRestart: () => Promise; } /** * Build the git-mode polling `runCheck`. Detects the remote ref tip, refreshes * `lastUpdateCheck`, and on an available commit routes the apply through the * gate — re-resolving the ref AFTER the hold-off so the CURRENT tip is applied, * not the commit captured before the (possibly long) wait. */ export declare function createGitUpdateRunCheck(deps: GitUpdateRunCheckDeps): () => Promise; //# sourceMappingURL=auto-update-runner.d.ts.map