import type { ReplyPayload } from "../../auto-reply/reply-payload.js"; import type { FinalizedMsgContext } from "../../auto-reply/templating.js"; import type { KlawConfig } from "../../config/types.klaw.js"; import { type DeliverOutboundPayloadsParams, type DurableFinalDeliveryRequirement, type DurableFinalDeliveryRequirements } from "../../infra/outbound/deliver.js"; import type { ChannelDeliveryInfo, ChannelDeliveryResult } from "./types.js"; export type DurableInboundReplyDeliveryOptions = Pick & { to?: string | null; replyToId?: string | null; requiredCapabilities?: DurableFinalDeliveryRequirements; }; export type DurableInboundReplyDeliveryParams = DurableInboundReplyDeliveryOptions & { cfg: KlawConfig; channel: string; accountId?: string; agentId: string; ctxPayload: FinalizedMsgContext; payload: ReplyPayload; info: ChannelDeliveryInfo; }; export 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; }; export declare function resolveDurableInboundReplyToId(params: Pick): string | null | undefined; export declare function isDurableInboundReplyDeliveryHandled(result: DurableInboundReplyDeliveryResult): result is Extract; export declare function throwIfDurableInboundReplyDeliveryFailed(result: DurableInboundReplyDeliveryResult): void; export declare function deliverInboundReplyWithMessageSendContext(params: DurableInboundReplyDeliveryParams): Promise; /** @deprecated Use `deliverInboundReplyWithMessageSendContext`. */ export declare const deliverDurableInboundReplyPayload: typeof deliverInboundReplyWithMessageSendContext;