/** Renew cadence — well under the 5-min lease so a renewed lease always has minutes of headroom (a * missed tick still has time to recover before the lease expires). */ export declare const DEFAULT_LEASE_RENEW_INTERVAL_MS = 120000; export interface LeaseRenewerDeps { /** The run being kept alive (for correlation/logging). */ runId: string; /** Extend the lease; resolves true while we still hold it, false once it's definitively lost * (brokered: `RunnerControlClient.renewLease` → `POST /renew`). */ renew: () => Promise; /** Fired exactly once the first time the lease is seen to be lost. */ onLost: () => void; intervalMs?: number; } export declare class LeaseRenewer { private readonly deps; private timer; private firing; private lost; private stopped; constructor(deps: LeaseRenewerDeps); /** Begin periodic lease renewal. */ start(): void; /** Stop renewing and drain any in-flight renew. Idempotent. */ stop(): Promise; /** Whether the lease was definitively lost (the orchestrator may read this to shape the outcome). */ isLost(): boolean; /** True once the renewer should no longer act. A method (re-evaluated after an `await`) so `stop()` * can flip `stopped` mid-tick. */ private done; private tick; }