import { type InboxItem } from '../inbox/wake-queue.service.js'; export declare const DEFAULT_RESTART_IDLE_TIMEOUT_MS: number; export declare const DEFAULT_RESTART_DRAIN_TIMEOUT_MS: number; export declare const RESTART_IDLE_POLL_MS = 1000; export interface RestartBlocker { agentId: string; item: InboxItem; } export type RestartBlockedReason = 'became_busy' | 'drain_timeout' | 'idle_timeout'; export declare class RestartBlockedError extends Error { readonly blockers: RestartBlocker[]; readonly reason: RestartBlockedReason; constructor(blockers: RestartBlocker[], reason: RestartBlockedReason, message: string); } export interface RestartDrainResult { fallbackToIdle: boolean; interruptedCount?: number; mode: 'drain-active'; requestedCount: number; resumedCount: number; status: 'succeeded'; } export declare function waitForRestartIdle(timeoutMs: number): Promise; export declare function waitForRestartDrain(input?: { continueOnTimeout?: boolean; drainTimeoutMs?: number; markerTtlMs?: number; onInitialRunning?: (blockers: RestartBlocker[]) => void; }): Promise; export declare function listRestartBlockers(options?: { statuses?: InboxItem['handling']['status'][]; }): Promise; export declare function recoverInterruptedRestartItems(blockers: RestartBlocker[]): Promise; export declare function countRequeuedItems(blockers: RestartBlocker[]): Promise; export declare function restartBlockedError(blockers: RestartBlocker[], prefix: string, reason: RestartBlockedReason): RestartBlockedError; export declare function formatBlocker({ agentId, item }: RestartBlocker): string; export declare function restartBlockerInfo({ agentId, item }: RestartBlocker): { agentId: string; itemId: string; since: string; status: InboxItem['handling']['status']; summary?: string; workerId?: string; }; //# sourceMappingURL=restart-gate.d.ts.map