export interface HoldAwakeOpts { /** URL to hold open — the daemon's own `${public_url}/hold`. */ readonly url: string; /** Delay before re-opening a dropped connection while still held. */ readonly reconnectDelayMs?: number; /** * How long a prime()'s acquire lingers after establishment before * auto-releasing. Long enough for the dispatched wake's own acquire to * take over the refcount. */ readonly primeGraceMs?: number; /** * Called when a hold attempt fails while still held (never for * deliberate release/stop aborts). Receives the consecutive-failure * count so callers can rate-limit their logging. */ readonly onError?: (error: unknown, consecutiveFailures: number) => void; } export interface HoldAwake { acquire(): void; release(): void; /** * Acquire and resolve once the hold connection is established (or after * timeoutMs if it can't be). The acquire auto-releases after primeGraceMs; * never rejects. Used by the server to delay webhook acks until the * machine is provably held. */ prime(timeoutMs: number): Promise; /** Abort any open connection and prevent reconnects. Idempotent. */ stop(): Promise; } export declare function createHoldAwake(opts: HoldAwakeOpts): HoldAwake; //# sourceMappingURL=hold-awake.d.ts.map