/** Same schedule as the IM outbox. Six attempts, then giving_up. */ export declare const BRIDGE_CALLBACK_BACKOFF_SECONDS: readonly [1, 5, 30, 300, 1800, 7200]; export declare const BRIDGE_CALLBACK_MAX_ATTEMPTS: 6; export declare const BRIDGE_CALLBACK_TIMEOUT_MS = 10000; export type BridgeCallbackType = 'run.started' | 'run.completed' | 'run.failed' | 'run.cancelled' | 'run.waiting_approval' | 'run.progress'; /** Test hook. Production uses the wall clock and a 10 second gap. */ export declare function __setBridgeClockForTests(fn: (() => number) | null): void; /** Queue run.started once the job is running. No-op for poll-only peers. */ export declare function enqueueBridgeStarted(jobId: number): void; /** Queue the terminal event that matches the job row. Does not change the job. */ export declare function enqueueBridgeTerminal(jobId: number): void; /** Startup: a reaped running bridge job becomes run.failed / bridge_restarted. */ export declare function enqueueRestartedBridgeFailures(): number; export declare function requeueStuckBridgeCallbacks(): number; /** Test hook: deliver the same stored body and eventId again. */ export declare function requeueCallbackByEventIdForTests(eventId: string): boolean; export interface DeliverOptions { caPem?: string; /** Override the outbox backoff for this call. Production omits it. */ backoffSeconds?: readonly number[]; limit?: number; } /** Deliver callbacks that are due. Returns how many rows were claimed. */ export declare function deliverDueCallbacks(opts?: DeliverOptions): Promise; /** * Visible assistant text arrived. Empty text is ignored by the caller. * The text is not an argument: the contract has no summary field, so the * body stays on the common fields and cannot carry tool parameters. * The first note for a job always emits; later notes wait 10 seconds. */ export declare function noteBridgeProgress(jobId: number): void; export declare function enqueueBridgeWaitingApproval(runId: string): void; /** Top-level bridge approvals only. Tool name and input stay off the callback. */ export declare function ensureBridgeApprovalListener(): void; export declare function startBridgeCallbackWorker(): void; export declare function stopBridgeCallbackWorkerForTests(): void; //# sourceMappingURL=bridge-callback.d.ts.map