import { r as KlawConfig } from "./types.klaw-xKUw_Rz7.js"; import { m as resolveStorePath } from "./store-CGcilHJ_.js"; import { t as FinalizedMsgContext } from "./templating-B8JLQEN3.js"; import { t as OutboundReplyPayload } from "./reply-payload-BEbdg63T.js"; import { t as finalizeInboundContext } from "./inbound-context-DlPUv4cf.js"; import { a as resolveEnvelopeFormatOptions, n as formatAgentEnvelope } from "./envelope-DGk7PaA0.js"; import { t as DispatchReplyWithBufferedBlockDispatcher } from "./provider-dispatcher.types-Ddx7dYu6.js"; import { t as recordInboundSession } from "./session-DflxSRHV.js"; //#region src/plugin-sdk/direct-dm.d.ts type DirectDmRoutePeer = { kind: "direct"; id: string; }; type DirectDmRoute = { agentId: string; sessionKey: string; accountId?: string; }; type DirectDmRuntime = { channel: { routing: { resolveAgentRoute: (params: { cfg: KlawConfig; channel: string; accountId: string; peer: DirectDmRoutePeer; }) => DirectDmRoute; }; session: { resolveStorePath: typeof resolveStorePath; readSessionUpdatedAt: (params: { storePath: string; sessionKey: string; }) => number | undefined; recordInboundSession: typeof recordInboundSession; }; reply: { resolveEnvelopeFormatOptions: (cfg: KlawConfig) => ReturnType; formatAgentEnvelope: typeof formatAgentEnvelope; finalizeInboundContext: typeof finalizeInboundContext; dispatchReplyWithBufferedBlockDispatcher: DispatchReplyWithBufferedBlockDispatcher; }; }; }; /** Route, envelope, record, and dispatch one direct-DM turn through the standard pipeline. */ declare function dispatchInboundDirectDmWithRuntime(params: { cfg: KlawConfig; runtime: DirectDmRuntime; channel: string; channelLabel: string; accountId: string; peer: DirectDmRoutePeer; senderId: string; senderAddress: string; recipientAddress: string; conversationLabel: string; rawBody: string; messageId: string; timestamp?: number; commandAuthorized?: boolean; bodyForAgent?: string; commandBody?: string; provider?: string; surface?: string; originatingChannel?: string; originatingTo?: string; extraContext?: Record; deliver: (payload: OutboundReplyPayload) => Promise; onRecordError: (err: unknown) => void; onDispatchError: (err: unknown, info: { kind: string; }) => void; }): Promise<{ route: DirectDmRoute; storePath: string; ctxPayload: FinalizedMsgContext; }>; //#endregion export { dispatchInboundDirectDmWithRuntime as t };