import { i as OpenClawConfig } from "../../types.openclaw-fYj4Ft14.js"; import { $n as PluginRuntime } from "../../types-C_nat0ED.js"; import { n as RuntimeEnv } from "../../runtime-Bxifh4bY.js"; import { t as DEFAULT_ACCOUNT_ID } from "../../account-id-Dh6XMgGH.js"; import { P as MessageReceipt } from "../../types-D2PiVSt3.js"; import { v as ChannelMessageActionAdapter } from "../../types.core-BdBUJhNx.js"; import { n as ChannelRuntimeSurface } from "../../channel-runtime-surface.types-CouuvmKm.js"; import { t as ChannelPlugin } from "../../types.plugin-DKwujMQc.js"; import { r as buildChannelConfigSchema } from "../../config-schema-jXAeMqcd.js"; import { d as getChatChannelMeta } from "../../core-DoD-jZTD.js"; import { D as resolveChannelMediaMaxBytes } from "../../media-runtime-DB1tFsVm.js"; import { t as PAIRING_APPROVED_MESSAGE } from "../../pairing-message-CFjlYpMw.js"; import { c as collectStatusIssuesFromLastError, r as buildComputedAccountStatusSnapshot } from "../../status-helpers-DDjLuHV9.js"; import { i as IMessageConfigSchema } from "../../bundled-channel-config-schema-De4GXSSH.js"; import { g as formatTrimmedAllowFromEntries } from "../../channel-config-helpers-o-5U1Gl8.js"; import { t as chunkTextForOutbound } from "../../text-chunking-CuFAtrpW.js"; import { a as looksLikeIMessageTargetId, o as normalizeIMessageMessagingTarget, r as probeIMessage, s as ResolvedIMessageAccount, t as IMessageProbe } from "../../probe-f5_ulm9n.js"; import { d as resolveIMessageGroupRequireMention, f as resolveIMessageGroupToolPolicy, n as IMessageService, u as parseIMessageTarget } from "../../targets-Ce8w4k5y.js"; //#region extensions/imessage/src/config-accessors.d.ts declare function resolveIMessageConfigAllowFrom(params: { cfg: OpenClawConfig; accountId?: string | null; }): string[]; declare function resolveIMessageConfigDefaultTo(params: { cfg: OpenClawConfig; accountId?: string | null; }): string | undefined; //#endregion //#region extensions/imessage/src/monitor/types.d.ts type MonitorIMessageOpts = { runtime?: RuntimeEnv; abortSignal?: AbortSignal; cliPath?: string; dbPath?: string; accountId?: string; config?: OpenClawConfig; allowFrom?: Array; groupAllowFrom?: Array; includeAttachments?: boolean; mediaMaxMb?: number; requireMention?: boolean; /** * Surface for registering channel runtime contexts (e.g. the approval native * runtime). Threaded through from the gateway via ChannelGatewayAccountContext. */ channelRuntime?: ChannelRuntimeSurface; }; //#endregion //#region extensions/imessage/src/monitor/monitor-provider.d.ts declare function monitorIMessageProvider(opts?: MonitorIMessageOpts): Promise; //#endregion //#region extensions/imessage/src/client.d.ts type IMessageRpcNotification = { method: string; params?: unknown; }; type IMessageRpcClientOptions = { cliPath?: string; dbPath?: string; runtime?: RuntimeEnv; onNotification?: (msg: IMessageRpcNotification) => void; }; declare class IMessageRpcClient { private readonly cliPath; private readonly dbPath?; private readonly runtime?; private readonly onNotification?; private readonly pending; private readonly closed; private closedResolve; private child; private stdoutBuffer; private readonly stdoutDecoder; private nextId; private publicProcessError; constructor(opts?: IMessageRpcClientOptions); start(): Promise; stop(): Promise; waitForClose(): Promise; request(method: string, params?: Record, opts?: { timeoutMs?: number; }): Promise; private handleStdoutChunk; private flushStdoutBuffer; private handleStdoutLine; private handleLine; private recordProcessDiagnostic; private buildCloseError; private failAll; } //#endregion //#region extensions/imessage/src/send.d.ts type ParsedIMessageTarget = ReturnType; type IMessageSendOpts = { cliPath?: string; dbPath?: string; service?: IMessageService; region?: string; accountId?: string; replyToId?: string; mediaUrl?: string; mediaLocalRoots?: readonly string[]; mediaReadFile?: (filePath: string) => Promise; audioAsVoice?: boolean; maxBytes?: number; timeoutMs?: number; chatId?: number; client?: IMessageRpcClient; config: OpenClawConfig; account?: ResolvedIMessageAccount; resolveAttachmentImpl?: (mediaUrl: string, maxBytes: number, options?: { localRoots?: readonly string[]; readFile?: (filePath: string) => Promise; }) => Promise<{ path: string; contentType?: string; }>; createClient?: (params: { cliPath: string; dbPath?: string; }) => Promise; runCliJson?: (args: readonly string[]) => Promise>; resolveMessageGuidImpl?: (params: { dbPath?: string; messageId: string; }) => Promise | string | null; resolveSentMessageGuidImpl?: (params: { dbPath?: string; target: ParsedIMessageTarget; text: string; sentAfterMs?: number; }) => Promise | string | null; }; type IMessageSendResult = { /** * Generic identifier returned by the bridge. May be a GUID string, a * numeric ROWID stringified, or the literal "ok"/"unknown" placeholders * when the bridge declines to return one. Most callers (reply cache, echo * cache, receipts) want this field — it is the broadest match for * downstream lookups. */ messageId: string; /** * GUID-only identifier suitable for matching inbound `reacted_to_guid` * fields. Undefined when the bridge returned only a numeric ROWID or * placeholder. Approval-reaction bindings MUST use this field so the * outbound key matches what the inbound tapback will surface. */ guid?: string; sentText: string; echoText?: string; receipt: MessageReceipt; }; declare function sendMessageIMessage(to: string, text: string, opts: IMessageSendOpts): Promise; //#endregion //#region extensions/imessage/src/actions.d.ts declare const imessageMessageActions: ChannelMessageActionAdapter; //#endregion //#region extensions/imessage/src/runtime.d.ts declare const clearIMessageRuntime: () => void, getIMessageRuntime: () => PluginRuntime, setIMessageRuntime: (next: PluginRuntime) => void, getOptionalIMessageRuntime: () => PluginRuntime | null; //#endregion //#region extensions/imessage/runtime-api.d.ts type IMessageAccountConfig = Omit["imessage"]>, "accounts" | "defaultAccount">; //#endregion export { type ChannelPlugin, DEFAULT_ACCOUNT_ID, IMessageAccountConfig, IMessageConfigSchema, type IMessageProbe, type MonitorIMessageOpts, PAIRING_APPROVED_MESSAGE, buildChannelConfigSchema, buildComputedAccountStatusSnapshot, chunkTextForOutbound, collectStatusIssuesFromLastError, formatTrimmedAllowFromEntries, getChatChannelMeta, imessageMessageActions, looksLikeIMessageTargetId, monitorIMessageProvider, normalizeIMessageMessagingTarget, probeIMessage, resolveChannelMediaMaxBytes, resolveIMessageConfigAllowFrom, resolveIMessageConfigDefaultTo, resolveIMessageGroupRequireMention, resolveIMessageGroupToolPolicy, sendMessageIMessage, setIMessageRuntime };