import { r as KlawConfig } from "./types.klaw-xKUw_Rz7.js"; import { s as ReplyPayload } from "./get-reply-options.types-CS-CA1Iq.js"; import { t as FinalizedMsgContext } from "./templating-B8JLQEN3.js"; import { N as MessageReceipt } from "./types-CPrjYzuc.js"; import { i as createChannelReplyPipeline, n as CreateChannelReplyPipelineParams } from "./reply-pipeline-BJbW2NFd.js"; import { n as DurableFinalDeliveryRequirement, r as DurableFinalDeliveryRequirements, t as DeliverOutboundPayloadsParams } from "./deliver-CwujvoXi.js"; import { A as SenderFacts, C as NormalizedTurnInput, D as RouteFacts, E as ReplyPlanFacts, F as recordChannelBotPairLoopAndCheckSuppression, M as ChannelBotLoopProtectionFacts, N as clearChannelBotPairLoopGuardForTests, O as RunChannelTurnParams, P as listTrackedChannelBotPairsForTests, S as MessageFacts, T as PreparedChannelTurn, _ as ChannelTurnResult, a as ChannelDeliveryResult, b as DispatchedChannelTurnResult, c as ChannelTurnAdapter, d as ChannelTurnDroppedHistoryOptions, f as ChannelTurnHistoryFinalizeOptions, g as ChannelTurnResolved, h as ChannelTurnReplyPipelineOptions, i as ChannelDeliveryIntent, j as SupplementalContextFacts, k as RunResolvedChannelTurnParams, l as ChannelTurnAdmission, m as ChannelTurnRecordOptions, n as AssembledChannelTurn, o as ChannelEventClass, p as ChannelTurnLogEvent, r as ChannelDeliveryInfo, s as ChannelEventDeliveryAdapter, t as AccessFacts, u as ChannelTurnDispatcherOptions, w as PreflightFacts, x as InboundMediaFacts, y as ConversationFacts } from "./types-D30xjkkK.js"; import { i as filterChannelInboundSupplementalContext, r as buildChannelInboundEventContext, t as BuildChannelInboundEventContextParams } from "./context-DZObMCCS.js"; import { n as createChannelHistoryWindow, t as ChannelHistoryWindow } from "./history-window-qz4dLEkI.js"; import { a as hasVisibleChannelTurnDispatch, i as hasFinalChannelTurnDispatch, n as ChannelTurnVisibleDeliverySignals, o as resolveChannelTurnDispatchCounts, r as EMPTY_CHANNEL_TURN_DISPATCH_COUNTS, t as ChannelTurnDispatchResultLike } from "./dispatch-result-NL50C8I0.js"; //#region src/channels/turn/durable-delivery.d.ts type DurableInboundReplyDeliveryOptions = Pick & { to?: string | null; replyToId?: string | null; requiredCapabilities?: DurableFinalDeliveryRequirements; }; type DurableInboundReplyDeliveryParams = DurableInboundReplyDeliveryOptions & { cfg: KlawConfig; channel: string; accountId?: string; agentId: string; ctxPayload: FinalizedMsgContext; payload: ReplyPayload; info: ChannelDeliveryInfo; }; type DurableInboundReplyDeliveryResult = { status: "not_applicable"; reason: "non_final"; } | { status: "unsupported"; reason: "missing_channel" | "missing_target" | "missing_outbound_handler" | "capability_mismatch"; capability?: DurableFinalDeliveryRequirement; } | { status: "handled_visible"; delivery: ChannelDeliveryResult; } | { status: "handled_no_send"; reason: "no_visible_result"; delivery: ChannelDeliveryResult; } | { status: "failed"; error: unknown; }; declare function isDurableInboundReplyDeliveryHandled(result: DurableInboundReplyDeliveryResult): result is Extract; declare function throwIfDurableInboundReplyDeliveryFailed(result: DurableInboundReplyDeliveryResult): void; declare function deliverInboundReplyWithMessageSendContext(params: DurableInboundReplyDeliveryParams): Promise; /** @deprecated Use `deliverInboundReplyWithMessageSendContext`. */ declare const deliverDurableInboundReplyPayload: typeof deliverInboundReplyWithMessageSendContext; //#endregion //#region src/channels/turn/delivery-result.d.ts declare function createChannelDeliveryResultFromReceipt(params: { receipt: MessageReceipt; threadId?: string; replyToId?: string; visibleReplySent?: boolean; deliveryIntent?: ChannelDeliveryIntent; }): ChannelDeliveryResult; declare namespace kernel_d_exports { export { AccessFacts, AssembledChannelTurn, BuildChannelInboundEventContextParams, ChannelBotLoopProtectionFacts, ChannelDeliveryInfo, ChannelDeliveryResult, ChannelEventClass, ChannelEventDeliveryAdapter, ChannelHistoryWindow, ChannelTurnAdapter, ChannelTurnAdmission, ChannelTurnDispatchResultLike, ChannelTurnDispatcherOptions, ChannelTurnDroppedHistoryOptions, ChannelTurnHistoryFinalizeOptions, ChannelTurnLogEvent, ChannelTurnRecordOptions, ChannelTurnReplyPipelineOptions, ChannelTurnResolved, ChannelTurnResult, ChannelTurnVisibleDeliverySignals, ConversationFacts, DispatchedChannelTurnResult, DurableInboundReplyDeliveryOptions, DurableInboundReplyDeliveryParams, DurableInboundReplyDeliveryResult, EMPTY_CHANNEL_TURN_DISPATCH_COUNTS, InboundMediaFacts, MessageFacts, NormalizedTurnInput, PreflightFacts, PreparedChannelTurn, ReplyPlanFacts, RouteFacts, RunChannelTurnParams, RunResolvedChannelTurnParams, SenderFacts, SupplementalContextFacts, buildChannelInboundEventContext, clearChannelBotPairLoopGuardForTests, createChannelDeliveryResultFromReceipt, createChannelHistoryWindow, createChannelTurnReplyPipeline, createNoopChannelEventDeliveryAdapter, deliverDurableInboundReplyPayload, deliverInboundReplyWithMessageSendContext, dispatchAssembledChannelTurn, filterChannelInboundSupplementalContext, hasFinalChannelTurnDispatch, hasVisibleChannelTurnDispatch, isDurableInboundReplyDeliveryHandled, listTrackedChannelBotPairsForTests, recordChannelBotPairLoopAndCheckSuppression, recordDroppedChannelTurnHistory, resolveChannelTurnDispatchCounts, runChannelTurn, runPreparedChannelTurn, runResolvedChannelTurn, throwIfDurableInboundReplyDeliveryFailed }; } /** * @deprecated Compatibility assembly for legacy buffered reply dispatchers. * New channel plugins should expose `defineChannelMessageAdapter(...)` from * `klaw/plugin-sdk/channel-message` and route send/receive behavior through * the message lifecycle helpers. */ declare function createChannelTurnReplyPipeline(params: CreateChannelReplyPipelineParams): ReturnType; declare function createNoopChannelEventDeliveryAdapter(): ChannelEventDeliveryAdapter; declare function recordDroppedChannelTurnHistory(params: { input: NormalizedTurnInput; preflight: PreflightFacts; admission?: ChannelTurnAdmission; }): Promise; type AssembledChannelTurnWithBotLoopProtection = AssembledChannelTurn & { botLoopProtection: NonNullable; }; type AssembledChannelTurnWithoutBotLoopProtection = Omit & { botLoopProtection?: undefined; }; declare function dispatchAssembledChannelTurn(params: AssembledChannelTurnWithBotLoopProtection): Promise; declare function dispatchAssembledChannelTurn(params: AssembledChannelTurnWithoutBotLoopProtection): Promise; declare function dispatchAssembledChannelTurn(params: AssembledChannelTurn): Promise; type PreparedChannelTurnWithBotLoopProtection = PreparedChannelTurn & { botLoopProtection: NonNullable["botLoopProtection"]>; }; type PreparedChannelTurnWithoutBotLoopProtection = Omit, "botLoopProtection"> & { botLoopProtection?: undefined; }; declare function runPreparedChannelTurn(params: PreparedChannelTurnWithBotLoopProtection): Promise>; declare function runPreparedChannelTurn(params: PreparedChannelTurnWithoutBotLoopProtection): Promise>; declare function runPreparedChannelTurn(params: PreparedChannelTurn): Promise>; declare function runChannelTurn(params: RunChannelTurnParams): Promise>; declare function runResolvedChannelTurn(params: RunResolvedChannelTurnParams): Promise>; //#endregion export { runPreparedChannelTurn as a, DurableInboundReplyDeliveryParams as c, runChannelTurn as i, DurableInboundReplyDeliveryResult as l, kernel_d_exports as n, runResolvedChannelTurn as o, recordDroppedChannelTurnHistory as r, DurableInboundReplyDeliveryOptions as s, dispatchAssembledChannelTurn as t, deliverInboundReplyWithMessageSendContext as u };