import type { DmPolicy, GroupPolicy } from "openclaw/plugin-sdk/setup"; import { fetchWithSsrFGuard, type SsrFPolicy } from "openclaw/plugin-sdk/ssrf-runtime"; export type { SsrFPolicy } from "openclaw/plugin-sdk/ssrf-runtime"; export type { DmPolicy, GroupPolicy } from "openclaw/plugin-sdk/setup"; export type BlueBubblesGroupConfig = { /** If true, only respond in this group when mentioned. */ requireMention?: boolean; /** Optional tool policy overrides for this group. */ tools?: { allow?: string[]; deny?: string[]; }; }; export type BlueBubblesAccountConfig = { /** Optional display name for this account (used in CLI/UI lists). */ name?: string; /** Optional provider capability tags used for agent/runtime guidance. */ capabilities?: string[]; /** Allow channel-initiated config writes (default: true). */ configWrites?: boolean; /** If false, do not start this BlueBubbles account. Default: true. */ enabled?: boolean; /** Base URL for the BlueBubbles API. */ serverUrl?: string; /** Password for BlueBubbles API authentication. */ password?: string; /** Webhook path for the gateway HTTP server. */ webhookPath?: string; /** Direct message access policy (default: pairing). */ dmPolicy?: DmPolicy; allowFrom?: Array; /** Optional allowlist for group senders. */ groupAllowFrom?: Array; /** Group message handling policy. */ groupPolicy?: GroupPolicy; /** Enrich unnamed group participants with local macOS Contacts names after gating. Default: true. */ enrichGroupParticipantsFromContacts?: boolean; /** Max group messages to keep as history context (0 disables). */ historyLimit?: number; /** Max DM turns to keep as history context. */ dmHistoryLimit?: number; /** Per-DM config overrides keyed by user ID. */ dms?: Record; /** Outbound text chunk size (chars). Default: 4000. */ textChunkLimit?: number; /** Chunking mode: "newline" (default) splits on every newline; "length" splits by size. */ chunkMode?: "length" | "newline"; blockStreaming?: boolean; /** Merge streamed block replies before sending. */ blockStreamingCoalesce?: Record; /** Max outbound media size in MB. */ mediaMaxMb?: number; /** * Explicit allowlist of local directory roots permitted for outbound media paths. * Local paths are rejected unless they resolve under one of these roots. */ mediaLocalRoots?: string[]; /** Send read receipts for incoming messages (default: true). */ sendReadReceipts?: boolean; /** Allow fetching from private/internal IP addresses (e.g. localhost). Required for same-host BlueBubbles setups. */ allowPrivateNetwork?: boolean; /** Per-group configuration keyed by chat GUID or identifier. */ groups?: Record; /** Channel health monitor overrides for this channel/account. */ healthMonitor?: { enabled?: boolean; }; }; export type BlueBubblesActionConfig = { reactions?: boolean; edit?: boolean; unsend?: boolean; reply?: boolean; sendWithEffect?: boolean; renameGroup?: boolean; addParticipant?: boolean; removeParticipant?: boolean; leaveGroup?: boolean; sendAttachment?: boolean; }; export type BlueBubblesConfig = { /** Optional per-account BlueBubbles configuration (multi-account). */ accounts?: Record; /** Optional default account id when multiple accounts are configured. */ defaultAccount?: string; /** Per-action tool gating (default: true for all). */ actions?: BlueBubblesActionConfig; } & BlueBubblesAccountConfig; export type BlueBubblesSendTarget = { kind: "chat_id"; chatId: number; } | { kind: "chat_guid"; chatGuid: string; } | { kind: "chat_identifier"; chatIdentifier: string; } | { kind: "handle"; address: string; service?: "imessage" | "sms" | "auto"; }; export type BlueBubblesAttachment = { guid?: string; uti?: string; mimeType?: string; transferName?: string; totalBytes?: number; height?: number; width?: number; originalROWID?: number; }; export declare function normalizeBlueBubblesServerUrl(raw: string): string; export declare function buildBlueBubblesApiUrl(params: { baseUrl: string; path: string; password?: string; }): string; /** @internal Replace the SSRF fetch guard in tests. */ export declare function _setFetchGuardForTesting(impl: typeof fetchWithSsrFGuard | null): void; export declare function blueBubblesFetchWithTimeout(url: string, init: RequestInit, timeoutMs?: number, ssrfPolicy?: SsrFPolicy): Promise;