/** Readiness budget the broker grants a lifecycle request that does not size one itself. */ export declare const DEFAULT_READINESS_TIMEOUT_MS = 10000; export declare const MIN_READINESS_TIMEOUT_MS = 4000; export declare const MAX_READINESS_TIMEOUT_MS = 60000; export declare function isValidReadinessTimeoutMs(value: unknown): value is number; export declare const READINESS_TIMEOUT_INVALID_MESSAGE = "readinessTimeoutMs must be an integer between 4000 and 60000."; /** * Sleep until the duration elapses or the caller cancels the wait. Queue admission * uses this so a granted or refused waiter does not retain its cutoff timer for the * rest of the readiness budget. */ export declare function cancellableSleep(ms: number, signal?: AbortSignal): Promise; /** * Whether a broker operation waits in the host-startup admission queue before it runs. * Only these spawn a host, so only these can be parked behind a full queue; the other * lifecycle operations start their readiness clock as soon as they are received. */ export declare function isStartupLifecycleOperation(operation: string): boolean; /** * Bounded time a lifecycle startup may wait for a host-startup admission slot. It * is the readiness budget itself: a startup still queued after that long has spent * the whole window the request was sized for, so refusing it beats launching a host * that is already late. */ export declare function startupQueueWaitMs(requestedReadinessTimeoutMs: number): number; /** * Broker-side wall clock a lifecycle startup may consume: the admission wait plus * the readiness budget, which is granted fresh at admission and so is never shortened * by queueing. Callers MUST size their own request deadline against this rather than * `readinessTimeoutMs` alone, or a request admitted late fails client-side while the * broker keeps running it to a durably persisted terminal result. */ export declare function lifecycleStartupBudgetMs(requestedReadinessTimeoutMs: number): number; /** * Request deadline a caller MUST grant a broker operation, or `undefined` when the * operation carries no readiness budget of its own and the client default already * covers it. * * A request that omits `readinessTimeoutMs` is sized against the broker's default * rather than left unextended: the broker queues it for exactly as long as one that * asked, so the common path would otherwise fail client-side while the broker runs * the startup to a durably persisted terminal result. */ export declare function lifecycleRequestTimeoutMs(operation: string, input: Record): number | undefined;