import { b as ReplyPayloadDelivery, c as MessagePresentation, n as InteractiveReply } from "./payload-BoZF5rJz.js"; import { u as ReplyPayload$1 } from "./types-CgXdquv1.js"; import { Fn as SilentReplyConversationType, i as OpenClawConfig } from "./types.openclaw-Dkap9jPv.js"; import { T as ReplyToMode } from "./types.base-bTa1ro6X.js"; import { t as OutboundMediaAccess } from "./load-options-CTuppEe4.js"; import { t as OutboundSendDeps } from "./send-deps-BaEC80iY.js"; import { b as OutboundDeliveryResult, d as OutboundDeliveryFormattingOptions, t as ChannelDeliveryCapabilities, u as OutboundIdentity, x as OutboundPayloadDeliveryOutcome } from "./outbound.types-ylohpEJA.js"; import { a as OutboundChannel, c as DeliveryMirror, i as QueuedReplyPayloadSendingHook, o as OutboundSessionContext, r as QueuedRenderedMessageBatchPlan } from "./delivery-queue-BmVIZw-x.js"; import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload"; //#region src/infra/outbound/payloads.d.ts type NormalizedOutboundPayload = { text: string; mediaUrls: string[]; audioAsVoice?: boolean; presentation?: MessagePresentation; delivery?: ReplyPayloadDelivery; interactive?: InteractiveReply; channelData?: Record; /** Hook-only content for audio-only TTS payloads. Never used as channel text/caption. */ hookContent?: string; }; type OutboundPayloadJson = { text: string; mediaUrl: string | null; mediaUrls?: string[]; audioAsVoice?: boolean; presentation?: MessagePresentation; delivery?: ReplyPayloadDelivery; interactive?: InteractiveReply; channelData?: Record; }; type OutboundPayloadPlan = { sourceIndex: number; payload: ReplyPayload$1; parts: ReturnType; hasPresentation: boolean; hasInteractive: boolean; hasChannelData: boolean; }; type OutboundPayloadPlanContext = { cfg?: OpenClawConfig; sessionKey?: string; surface?: string; conversationType?: SilentReplyConversationType; extractMarkdownImages?: boolean; }; declare function createOutboundPayloadPlan(payloads: readonly ReplyPayload$1[], context?: OutboundPayloadPlanContext): OutboundPayloadPlan[]; declare function projectOutboundPayloadPlanForDelivery(plan: readonly OutboundPayloadPlan[]): ReplyPayload$1[]; declare function projectOutboundPayloadPlanForJson(plan: readonly OutboundPayloadPlan[]): OutboundPayloadJson[]; //#endregion //#region src/infra/outbound/deliver.d.ts type OutboundDeliveryQueuePolicy = "required" | "best_effort"; type OutboundDeliveryIntent = { id: string; channel: Exclude; to: string; accountId?: string; queuePolicy: OutboundDeliveryQueuePolicy; }; type DurableFinalDeliveryRequirement = keyof NonNullable; type DurableFinalDeliveryRequirements = Partial>; type DeliverOutboundPayloadsCoreParams = { cfg: OpenClawConfig; channel: Exclude; to: string; accountId?: string; payloads: ReplyPayload$1[]; replyToId?: string | null; replyToMode?: ReplyToMode; formatting?: OutboundDeliveryFormattingOptions; threadId?: string | number | null; identity?: OutboundIdentity; deps?: OutboundSendDeps; mediaAccess?: OutboundMediaAccess; gifPlayback?: boolean; forceDocument?: boolean; replyPayloadSendingHook?: QueuedReplyPayloadSendingHook; abortSignal?: AbortSignal; bestEffort?: boolean; onError?: (err: unknown, payload: NormalizedOutboundPayload) => void; onPayload?: (payload: NormalizedOutboundPayload) => void; onPayloadDeliveryOutcome?: (outcome: OutboundPayloadDeliveryOutcome) => void; /** Session/agent context used for hooks and media local-root scoping. */ session?: OutboundSessionContext; mirror?: DeliveryMirror; silent?: boolean; gatewayClientScopes?: readonly string[]; }; /** * @deprecated Direct outbound delivery is compatibility/runtime substrate. * New message lifecycle code should use `sendDurableMessageBatch` from * `src/channels/message/send.ts` or `deliverInboundReplyWithMessageSendContext` * from `src/channels/turn/durable-delivery.ts`. Keep direct use only for * outbound substrate, recovery, and compatibility paths. */ type DeliverOutboundPayloadsParams = DeliverOutboundPayloadsCoreParams & { /** @internal Skip write-ahead queue (used by crash-recovery to avoid re-enqueueing). */skipQueue?: boolean; /** @internal Let recovery run commit hooks after it has acked the recovered queue entry. */ deferCommitHooks?: boolean; queuePolicy?: OutboundDeliveryQueuePolicy; renderedBatchPlan?: QueuedRenderedMessageBatchPlan; onDeliveryIntent?: (intent: OutboundDeliveryIntent) => void; }; /** * @deprecated Direct outbound delivery is compatibility/runtime substrate. * New message lifecycle code should use `sendDurableMessageBatch` from * `src/channels/message/send.ts` or `deliverInboundReplyWithMessageSendContext` * from `src/channels/turn/durable-delivery.ts`. Keep direct use only for * outbound substrate, recovery, and compatibility paths. */ declare function deliverOutboundPayloads(params: DeliverOutboundPayloadsParams): Promise; //#endregion export { OutboundDeliveryQueuePolicy as a, projectOutboundPayloadPlanForDelivery as c, OutboundDeliveryIntent as i, projectOutboundPayloadPlanForJson as l, DurableFinalDeliveryRequirement as n, deliverOutboundPayloads as o, DurableFinalDeliveryRequirements as r, createOutboundPayloadPlan as s, DeliverOutboundPayloadsParams as t };