import { t as FinalizedMsgContext } from "./templating-BLkCZBKN.js"; import { i as OpenClawConfig } from "./types.openclaw-Dkap9jPv.js"; import { t as DiagnosticTraceContext } from "./diagnostic-trace-context-DKGBqNVx.js"; import { n as InternalHookEventType, r as InternalHookHandler, t as InternalHookEvent } from "./internal-hook-types-CKIMi9vm.js"; import { Gt as PluginHookMessageContext, Kt as PluginHookMessageReceivedEvent, Ut as PluginHookInboundClaimContext, Wt as PluginHookInboundClaimEvent, Yt as PluginHookMessageSentEvent } from "./hook-types-Ddb7SJ-d.js"; import { a as resetGlobalHookRunner, i as initializeGlobalHookRunner } from "./hook-runner-global-CcSaZgww.js"; import { C as isMessageSentEvent, D as setInternalHooksEnabled, E as registerInternalHook, O as triggerInternalHook, S as isMessageReceivedEvent, T as isSessionPatchEvent, _ as getRegisteredEventKeys, a as MessagePreprocessedHookContext, b as isGatewayStartupEvent, c as MessageReceivedHookEvent, d as MessageTranscribedHookContext, f as MessageTranscribedHookEvent, g as createInternalHookEvent, h as clearInternalHooks, i as GatewayStartupHookEvent, k as unregisterInternalHook, l as MessageSentHookContext, m as SessionPatchHookEvent, n as AgentBootstrapHookEvent, o as MessagePreprocessedHookEvent, p as SessionPatchHookContext, r as GatewayStartupHookContext, s as MessageReceivedHookContext, t as AgentBootstrapHookContext, u as MessageSentHookEvent, v as hasInternalHookListeners, w as isMessageTranscribedEvent, x as isMessagePreprocessedEvent, y as isAgentBootstrapEvent } from "./internal-hooks-Cd407IgK.js"; //#region src/hooks/fire-and-forget.d.ts type FireAndForgetBoundedHookOptions = { maxConcurrency?: number; maxQueue?: number; timeoutMs?: number; }; declare function formatHookErrorForLog(err: unknown): string; declare function fireAndForgetHook(task: Promise, label: string, logger?: (message: string) => void): void; declare function fireAndForgetBoundedHook(task: () => Promise, label: string, logger?: (message: string) => void, options?: FireAndForgetBoundedHookOptions): void; //#endregion //#region src/hooks/message-hook-mappers.d.ts type CanonicalInboundMessageHookContext = { from: string; to?: string; content: string; body?: string; bodyForAgent?: string; transcript?: string; timestamp?: number; channelId: string; accountId?: string; conversationId?: string; sessionKey?: string; runId?: string; messageId?: string; senderId?: string; senderName?: string; senderUsername?: string; senderE164?: string; provider?: string; surface?: string; threadId?: string | number; mediaPath?: string; mediaUrl?: string; mediaType?: string; mediaPaths?: string[]; mediaUrls?: string[]; mediaTypes?: string[]; originatingChannel?: string; originatingTo?: string; guildId?: string; channelName?: string; isGroup: boolean; groupId?: string; topicName?: string; trace?: DiagnosticTraceContext; callDepth?: number; }; type CanonicalSentMessageHookContext = { to: string; content: string; success: boolean; error?: string; channelId: string; accountId?: string; conversationId?: string; sessionKey?: string; runId?: string; messageId?: string; trace?: DiagnosticTraceContext; callDepth?: number; isGroup?: boolean; groupId?: string; }; declare function deriveInboundMessageHookContext(ctx: FinalizedMsgContext, overrides?: { content?: string; messageId?: string; }): CanonicalInboundMessageHookContext; declare function buildCanonicalSentMessageHookContext(params: { to: string; content: string; success: boolean; error?: string; channelId: string; accountId?: string; conversationId?: string; sessionKey?: string; runId?: string; messageId?: string; trace?: DiagnosticTraceContext; callDepth?: number; isGroup?: boolean; groupId?: string; }): CanonicalSentMessageHookContext; declare function toPluginMessageContext(canonical: CanonicalInboundMessageHookContext | CanonicalSentMessageHookContext): PluginHookMessageContext; declare function toPluginInboundClaimContext(canonical: CanonicalInboundMessageHookContext): PluginHookInboundClaimContext; declare function toPluginInboundClaimEvent(canonical: CanonicalInboundMessageHookContext, extras?: { commandAuthorized?: boolean; wasMentioned?: boolean; }): PluginHookInboundClaimEvent; declare function toPluginMessageReceivedEvent(canonical: CanonicalInboundMessageHookContext): PluginHookMessageReceivedEvent; declare function toPluginMessageSentEvent(canonical: CanonicalSentMessageHookContext): PluginHookMessageSentEvent; declare function toInternalMessageReceivedContext(canonical: CanonicalInboundMessageHookContext): MessageReceivedHookContext; declare function toInternalMessageTranscribedContext(canonical: CanonicalInboundMessageHookContext, cfg: OpenClawConfig): MessageTranscribedHookContext & { cfg: OpenClawConfig; }; declare function toInternalMessagePreprocessedContext(canonical: CanonicalInboundMessageHookContext, cfg: OpenClawConfig): MessagePreprocessedHookContext & { cfg: OpenClawConfig; }; declare function toInternalMessageSentContext(canonical: CanonicalSentMessageHookContext): MessageSentHookContext; //#endregion export { AgentBootstrapHookContext, AgentBootstrapHookEvent, CanonicalInboundMessageHookContext, CanonicalSentMessageHookContext, FireAndForgetBoundedHookOptions, GatewayStartupHookContext, GatewayStartupHookEvent, type InternalHookEvent, type InternalHookEventType, type InternalHookHandler, MessagePreprocessedHookContext, MessagePreprocessedHookEvent, MessageReceivedHookContext, MessageReceivedHookEvent, MessageSentHookContext, MessageSentHookEvent, MessageTranscribedHookContext, MessageTranscribedHookEvent, SessionPatchHookContext, SessionPatchHookEvent, buildCanonicalSentMessageHookContext, clearInternalHooks, createInternalHookEvent, deriveInboundMessageHookContext, fireAndForgetBoundedHook, fireAndForgetHook, formatHookErrorForLog, getRegisteredEventKeys, hasInternalHookListeners, initializeGlobalHookRunner, isAgentBootstrapEvent, isGatewayStartupEvent, isMessagePreprocessedEvent, isMessageReceivedEvent, isMessageSentEvent, isMessageTranscribedEvent, isSessionPatchEvent, registerInternalHook, resetGlobalHookRunner, setInternalHooksEnabled, toInternalMessagePreprocessedContext, toInternalMessageReceivedContext, toInternalMessageSentContext, toInternalMessageTranscribedContext, toPluginInboundClaimContext, toPluginInboundClaimEvent, toPluginMessageContext, toPluginMessageReceivedEvent, toPluginMessageSentEvent, triggerInternalHook, unregisterInternalHook };