import { a as SourceReplyDeliveryMode, n as GetReplyOptions, u as ReplyPayload } from "./types-CgXdquv1.js"; import { n as MsgContext, t as FinalizedMsgContext } from "./templating-BLkCZBKN.js"; import { Fn as SilentReplyConversationType, i as OpenClawConfig } from "./types.openclaw-Dkap9jPv.js"; import { v as HumanDelayConfig } from "./types.base-bTa1ro6X.js"; import { n as ReplyDispatchKind, r as ReplyDispatcher, t as ReplyDispatchBeforeDeliver } from "./reply-dispatcher.types-D6zjGnXN.js"; import { r as TypingCallbacks, t as ResponsePrefixContext } from "./response-prefix-template-CYdaTWLL.js"; //#region src/auto-reply/reply/abort.runtime-types.d.ts type FastAbortResult = { handled: boolean; aborted: boolean; stoppedSubagents?: number; }; type TryFastAbortFromMessage = (params: { ctx: FinalizedMsgContext; cfg: OpenClawConfig; }) => Promise; type FormatAbortReplyText = (stoppedSubagents?: number) => string; //#endregion //#region src/auto-reply/reply/get-reply.types.d.ts type GetReplyFromConfig = (ctx: MsgContext, opts?: GetReplyOptions, configOverride?: OpenClawConfig) => Promise; //#endregion //#region src/auto-reply/reply/dispatch-from-config.types.d.ts type DispatchFromConfigResult = { queuedFinal: boolean; counts: Record; failedCounts?: Partial>; sourceReplyDeliveryMode?: SourceReplyDeliveryMode; beforeAgentRunBlocked?: boolean; }; type DispatchFromConfigParams = { ctx: FinalizedMsgContext; cfg: OpenClawConfig; dispatcher: ReplyDispatcher; replyOptions?: Omit; replyResolver?: GetReplyFromConfig; fastAbortResolver?: TryFastAbortFromMessage; formatAbortReplyTextResolver?: FormatAbortReplyText; /** Optional patch applied to the already loaded config before reply resolution. */ configOverride?: OpenClawConfig; }; type DispatchReplyFromConfig = (params: DispatchFromConfigParams) => Promise; //#endregion //#region src/auto-reply/reply/normalize-reply.d.ts type NormalizeReplySkipReason = "empty" | "silent" | "heartbeat"; //#endregion //#region src/auto-reply/reply/reply-dispatcher.d.ts type ReplyDispatchErrorHandler = (err: unknown, info: { kind: ReplyDispatchKind; }) => void; type ReplyDispatchSkipHandler = (payload: ReplyPayload, info: { kind: ReplyDispatchKind; reason: NormalizeReplySkipReason; }) => void; type ReplyDispatchDeliverer = (payload: ReplyPayload, info: { kind: ReplyDispatchKind; }) => Promise; type ReplyDispatcherOptions = { deliver: ReplyDispatchDeliverer; silentReplyContext?: { cfg?: OpenClawConfig; sessionKey?: string; surface?: string; conversationType?: SilentReplyConversationType; }; responsePrefix?: string; transformReplyPayload?: (payload: ReplyPayload) => ReplyPayload | null; /** Static context for response prefix template interpolation. */ responsePrefixContext?: ResponsePrefixContext; /** Dynamic context provider for response prefix template interpolation. * Called at normalization time, after model selection is complete. */ responsePrefixContextProvider?: () => ResponsePrefixContext; onHeartbeatStrip?: () => void; onIdle?: () => void; onError?: ReplyDispatchErrorHandler; onSkip?: ReplyDispatchSkipHandler; /** Human-like delay between block replies for natural rhythm. */ humanDelay?: HumanDelayConfig; beforeDeliver?: ReplyDispatchBeforeDeliver; }; type ReplyDispatcherWithTypingOptions = Omit & { typingCallbacks?: TypingCallbacks; onReplyStart?: () => Promise | void; onIdle?: () => void; onSettled?: () => unknown; onFreshSettledDelivery?: () => unknown; /** Called when the typing controller is cleaned up (e.g., on NO_REPLY). */ onCleanup?: () => void; }; type ReplyDispatcherWithTypingResult = { dispatcher: ReplyDispatcher; replyOptions: Pick; markDispatchIdle: () => void; /** Signal that the model run is complete so the typing controller can stop. */ markRunComplete: () => void; }; declare function createReplyDispatcher(options: ReplyDispatcherOptions): ReplyDispatcher; declare function createReplyDispatcherWithTyping(options: ReplyDispatcherWithTypingOptions): ReplyDispatcherWithTypingResult; //#endregion //#region src/auto-reply/reply/provider-dispatcher.types.d.ts type DispatchReplyContext = MsgContext | FinalizedMsgContext; type DispatchReplyOptions = Omit; type DispatchReplyWithBufferedBlockDispatcher = (params: { ctx: DispatchReplyContext; cfg: OpenClawConfig; dispatcherOptions: ReplyDispatcherWithTypingOptions; replyOptions?: DispatchReplyOptions; replyResolver?: GetReplyFromConfig; }) => Promise; type DispatchReplyWithDispatcher = (params: { ctx: DispatchReplyContext; cfg: OpenClawConfig; dispatcherOptions: ReplyDispatcherOptions; replyOptions?: DispatchReplyOptions; replyResolver?: GetReplyFromConfig; }) => Promise; //#endregion export { createReplyDispatcher as a, DispatchReplyFromConfig as c, ReplyDispatcherWithTypingOptions as i, GetReplyFromConfig as l, DispatchReplyWithDispatcher as n, createReplyDispatcherWithTyping as o, ReplyDispatcherOptions as r, DispatchFromConfigResult as s, DispatchReplyWithBufferedBlockDispatcher as t };