import type { CallbackDeliveryOptions } from "./callback-outbox-policy.js"; import type { CallbackOutboxLane } from "./callback-outbox-settlement.js"; import { type CallbackEnvelopeV1, type CallbackRouteV1 } from "./callback-transport.js"; import { type AgentMessage, type Conversation } from "./protocol.js"; export interface CallbackPreparationOptions extends CallbackDeliveryOptions { statePath: string; messageJson?: string; log?: string; conversationOverride?: unknown; callbackDeliveryKind?: string; allowTerminalCompletionRecoveryStatus?: boolean; closeTerminalBridgeOnDone?: boolean; disableCallbackRetry?: boolean; preserveMessageId?: boolean; recordOnly?: boolean; recoverMissingOutbox?: boolean; recoverTerminalCompletion?: boolean; retryPending?: boolean; /** Internal durable lane; ordinary callbacks use the lifecycle lane. */ callbackOutboxLane?: CallbackOutboxLane; } export interface CallbackGatewayRouteCandidate { gatewayUrl?: unknown; token?: unknown; } export declare function resolveCallbackGatewayRoute(...candidates: CallbackGatewayRouteCandidate[]): { gatewayUrl: string | undefined; token: string; } | { gatewayUrl: string | undefined; token: undefined; }; export declare function resolveManagedCallbackRoute(input: { options: CallbackPreparationOptions; conversation: Conversation; inheritedDelivery?: Record; }): CallbackRouteV1 | undefined; export declare function resolvedDeliveryOptions(input: { options: CallbackPreparationOptions; conversation: Conversation; inheritedDelivery?: Record; callbackRoute?: CallbackRouteV1; }): CallbackPreparationOptions; export declare function createManagedCallbackEnvelope(route: CallbackRouteV1, conversation: Conversation, message: AgentMessage): CallbackEnvelopeV1; export declare function assertImmutableCallbackTransport(inheritedDelivery: Record | undefined, route: CallbackRouteV1 | undefined, envelope: CallbackEnvelopeV1 | undefined, messageId: string): void; export declare function assertDispatchCallbackRouteAuthority(conversation: Conversation, route: CallbackRouteV1 | undefined): void;