import type { ChainServerDrivenContinuationDeps, ContinuationDispatchBudget } from "../production-agent.js"; /** * The subset of `ChainServerDrivenContinuationDeps` this stage needs, * already resolved to their non-optional defaults (mirrors how * `chainServerDrivenContinuation` builds its local `d` object). */ export type ContinuationDispatchRetryDeps = Required>; /** * Attempts to deliver one background-continuation dispatch, retrying with * backoff up to `dispatchBudget.maxDispatchAttempts` times. * * Moved verbatim out of `chainServerDrivenContinuation`'s "TRANSACTIONAL * HANDOFF" section — behavior, ordering, and error handling unchanged. The * caller is still responsible for: minting `nextRunId`, inserting the * successor row, building `dispatchBody`, and handling the * deferred-recovery / fatal-error paths after this returns. * * `isLoopProtectionDispatchError` and `maxNestedSelfDispatchDepth` are * passed in (rather than imported) so this module has no runtime import * back on `production-agent.js` — only the type-only import above, which * TypeScript erases. */ export declare function attemptContinuationDispatch(params: { event: unknown; chainViaDurableBackground: boolean; backgroundContinuationCount: number; nextRunId: string; nextRowInserted: boolean; continuationDispatchPath: string; dispatchBody: Record; dispatchBudget: ContinuationDispatchBudget; isLoopProtectionDispatchError: (err: unknown) => boolean; maxNestedSelfDispatchDepth: number; deps: ContinuationDispatchRetryDeps; }): Promise<{ dispatched: boolean; lastDispatchErr: unknown; nestedDepthExceeded: boolean; }>; //# sourceMappingURL=continuation-dispatch-retry.d.ts.map