Mainstream messaging
BlueBubbles से आ रहे हैं
बंडल किया गया imessage Plugin अब JSON-RPC पर steipete/imsg चलाकर BlueBubbles (react, edit, unsend, reply, sendWithEffect, समूह प्रबंधन, अटैचमेंट) जैसी ही निजी API सतह तक पहुँचता है। अगर आप पहले से imsg इंस्टॉल किए हुए Mac चला रहे हैं, तो आप BlueBubbles server हटा सकते हैं और Plugin को सीधे Messages.app से बात करने दे सकते हैं।
BlueBubbles support हटा दिया गया था। OpenClaw केवल imsg के माध्यम से iMessage support करता है। यह गाइड पुराने channels.bluebubbles configs को channels.imessage में migrate करने के लिए है; कोई दूसरा supported migration path नहीं है।
Migration checklist
जब आपको अपनी पुरानी BlueBubbles config पहले से पता हो और आप सबसे छोटा सुरक्षित path चाहते हों, तो इस checklist का उपयोग करें:
- उस Mac पर सीधे
imsgverify करें जो Messages.app चलाता है (imsg chats,imsg history,imsg send, औरimsg rpc --help)। channels.bluebubblesसे behavior keys कोchannels.imessageमें copy करें:dmPolicy,allowFrom,groupPolicy,groupAllowFrom,groups,includeAttachments,attachmentRoots,mediaMaxMb,textChunkLimit,coalesceSameSenderDms, औरactions।- ऐसे transport keys हटाएँ जो अब मौजूद नहीं हैं:
serverUrl,password, webhook URLs, और BlueBubbles server setup। - अगर Gateway Messages Mac पर नहीं चल रहा है, तो
channels.imessage.cliPathको SSH wrapper पर set करें और remote attachment fetches के लिएremoteHostset करें। - Gateway बंद होने पर,
channels.imessageenable करें, फिरopenclaw channels status --probe --channel imessageचलाएँ। - एक DM, एक allowed group, enabled होने पर attachments, और हर private API action test करें जिसका agent से उपयोग करवाने की अपेक्षा है।
- iMessage path verify होने के बाद BlueBubbles server और पुरानी
channels.bluebubblesconfig delete करें।
यह migration कब सही है
- आप उसी Mac पर (या SSH से reachable Mac पर) पहले से
imsgचला रहे हैं जहाँ Messages.app signed in है। - आप एक moving part कम चाहते हैं — अलग BlueBubbles server नहीं, authenticate करने के लिए REST endpoint नहीं, webhook plumbing नहीं। server + client app + helper के बजाय एक single CLI binary।
- आप supported macOS /
imsgbuild पर हैं जहाँ private API probeavailable: truereport करता है।
imsg क्या करता है
imsg Messages के लिए एक local macOS CLI है। OpenClaw imsg rpc को child process के रूप में start करता है और stdin/stdout पर JSON-RPC से बात करता है। expose करने के लिए कोई HTTP server, webhook URL, background daemon, launch agent, या port नहीं है।
- Reads, read-only SQLite handle का उपयोग करके
~/Library/Messages/chat.dbसे आते हैं। - Live inbound messages
imsg watch/watch.subscribeसे आते हैं, जो polling fallback के साथchat.dbfilesystem events को follow करता है। - Sends, normal text और file sends के लिए Messages.app automation का उपयोग करते हैं।
- Advanced actions,
imsghelper को Messages.app में inject करने के लिएimsg launchका उपयोग करते हैं। यही read receipts, typing indicators, rich sends, edit, unsend, threaded reply, tapbacks, और group management unlock करता है। - Linux builds copied
chat.dbinspect कर सकते हैं, लेकिन send नहीं कर सकते, live Mac database watch नहीं कर सकते, या Messages.app drive नहीं कर सकते। OpenClaw iMessage के लिए, signed-in Mac पर या उस Mac तक SSH wrapper के माध्यम सेimsgचलाएँ।
शुरू करने से पहले
-
Messages.app चलाने वाले Mac पर
imsginstall करें:bash brew install steipete/tap/imsgimsg --versionimsg chats --limit 3अगर
imsg chatsunable to open database file, empty output, याauthorization deniedके साथ fail होता है, तो उस terminal, editor, Node process, Gateway service, या SSH parent process को Full Disk Access दें जोimsglaunch करता है, फिर उस parent process को reopen करें। -
OpenClaw config बदलने से पहले read, watch, send, और RPC surfaces verify करें:
bash imsg chats --limit 10 --json | jq -simsg history --chat-id 42 --limit 10 --attachments --json | jq -simsg watch --chat-id 42 --reactions --jsonimsg send --chat-id 42 --text "OpenClaw imsg test"imsg rpc --help42कोimsg chatsसे मिले वास्तविक chat id से replace करें। Sending के लिए Messages.app की Automation permission चाहिए। अगर OpenClaw SSH के through चलेगा, तो ये commands उसी SSH wrapper या user context के through चलाएँ जिसे OpenClaw use करेगा। अगर reads/probes काम करते हैं लेकिन sends AppleEvents-1743के साथ fail होते हैं, तो check करें कि Automation/usr/libexec/sshd-keygen-wrapperपर landed हुई है या नहीं; SSH wrapper sends fail with AppleEvents -1743 देखें। -
Advanced actions की जरूरत होने पर private API bridge enable करें:
bash imsg launchimsg status --jsonimsg launchके लिए SIP disabled होना जरूरी है। Basic send, history, और watchimsg launchके बिना काम करते हैं; advanced actions नहीं करते। -
enabled
channels.imessageconfig जोड़ने के बाद, OpenClaw के through bridge verify करें:bash openclaw channels status --probeआपको
imessage.privateApi.available: trueचाहिए। अगर यहfalsereport करता है, तो पहले उसे fix करें — Capability detection देखें।channels status --probeकेवल configured, enabled accounts को probe करता है। -
अपनी config snapshot करें:
bash cp ~/.openclaw/openclaw.json5 ~/.openclaw/openclaw.json5.bak
Config translation
iMessage और BlueBubbles बहुत सारी channel-level config साझा करते हैं। जो keys बदलती हैं वे अधिकतर transport (REST server बनाम local CLI) हैं। Behavior keys (dmPolicy, groupPolicy, allowFrom, आदि) का meaning वही रहता है।
| BlueBubbles | बंडल किया गया iMessage | टिप्पणियाँ |
|---|---|---|
channels.bluebubbles.enabled |
channels.imessage.enabled |
वही अर्थ-विन्यास। |
channels.bluebubbles.serverUrl |
(हटाया गया) | कोई REST सर्वर नहीं — plugin imsg rpc को stdio पर चलाता है। |
channels.bluebubbles.password |
(हटाया गया) | कोई webhook प्रमाणीकरण आवश्यक नहीं। |
| (अंतर्निहित) | channels.imessage.cliPath |
imsg का पथ (डिफ़ॉल्ट imsg); SSH के लिए wrapper script इस्तेमाल करें। |
| (अंतर्निहित) | channels.imessage.dbPath |
वैकल्पिक Messages.app chat.db ओवरराइड; छोड़े जाने पर स्वतः पता लगाया जाता है। |
| (अंतर्निहित) | channels.imessage.remoteHost |
host या user@host — केवल तब आवश्यक जब cliPath एक SSH wrapper हो और आप SCP attachment fetches चाहते हों। |
channels.bluebubbles.dmPolicy |
channels.imessage.dmPolicy |
वही मान (pairing / allowlist / open / disabled)। |
channels.bluebubbles.allowFrom |
channels.imessage.allowFrom |
Pairing अनुमोदन handle के आधार पर आगे आते हैं, token के आधार पर नहीं। |
channels.bluebubbles.groupPolicy |
channels.imessage.groupPolicy |
वही मान (allowlist / open / disabled)। |
channels.bluebubbles.groupAllowFrom |
channels.imessage.groupAllowFrom |
वही। |
channels.bluebubbles.groups |
channels.imessage.groups |
इसे ज्यों का त्यों कॉपी करें, किसी भी groups: { "*": { ... } } wildcard प्रविष्टि सहित। प्रति-group requireMention, tools, toolsBySender आगे आते हैं। groupPolicy: "allowlist" के साथ, खाली या अनुपस्थित groups ब्लॉक हर group message को चुपचाप छोड़ देता है — नीचे "Group registry footgun" देखें। |
channels.bluebubbles.sendReadReceipts |
channels.imessage.sendReadReceipts |
डिफ़ॉल्ट true। बंडल किए गए plugin के साथ यह केवल तब चलता है जब private API probe चालू हो। |
channels.bluebubbles.includeAttachments |
channels.imessage.includeAttachments |
वही आकार, वही डिफ़ॉल्ट रूप से बंद। यदि BlueBubbles पर आपके attachments आ रहे थे, तो आपको iMessage ब्लॉक पर इसे स्पष्ट रूप से फिर सेट करना होगा — यह अंतर्निहित रूप से आगे नहीं आता, और जब तक आप ऐसा नहीं करते, आने वाली photos/media बिना किसी Inbound message log line के चुपचाप छोड़ दी जाएँगी। |
channels.bluebubbles.attachmentRoots |
channels.imessage.attachmentRoots |
स्थानीय roots; वही wildcard नियम। |
| (लागू नहीं) | channels.imessage.remoteAttachmentRoots |
केवल तब इस्तेमाल होता है जब SCP fetches के लिए remoteHost सेट हो। |
channels.bluebubbles.mediaMaxMb |
channels.imessage.mediaMaxMb |
iMessage पर डिफ़ॉल्ट 16 MB (BlueBubbles का डिफ़ॉल्ट 8 MB था)। यदि आप निचली सीमा बनाए रखना चाहते हैं, तो स्पष्ट रूप से सेट करें। |
channels.bluebubbles.textChunkLimit |
channels.imessage.textChunkLimit |
दोनों पर डिफ़ॉल्ट 4000। |
channels.bluebubbles.coalesceSameSenderDms |
channels.imessage.coalesceSameSenderDms |
वही opt-in। केवल DM — group chats दोनों channels पर तत्काल प्रति-message dispatch रखते हैं। स्पष्ट messages.inbound.byChannel.imessage या global messages.inbound.debounceMs के बिना सक्षम होने पर डिफ़ॉल्ट inbound debounce को 7000 ms तक बढ़ाता है। iMessage docs § Coalescing split-send DMs देखें। |
channels.bluebubbles.enrichGroupParticipantsFromContacts |
(लागू नहीं) | iMessage पहले से ही sender display names को chat.db से पढ़ता है। |
channels.bluebubbles.actions.* |
channels.imessage.actions.* |
प्रति-action toggles: reactions, edit, unsend, reply, sendWithEffect, renameGroup, setGroupIcon, addParticipant, removeParticipant, leaveGroup, sendAttachment। |
Multi-account configs (channels.bluebubbles.accounts.*) एक-से-एक channels.imessage.accounts.* में बदलते हैं।
Group registry footgun
बंडल किया गया iMessage plugin दो अलग-अलग group allowlist gates को क्रम से चलाता है। group message के agent तक पहुँचने के लिए दोनों का पास होना आवश्यक है:
- Sender / chat-target allowlist (
channels.imessage.groupAllowFrom) —isAllowedIMessageSenderद्वारा जाँचा जाता है। आने वाले messages को sender handle,chat_guid,chat_identifier, याchat_idसे match करता है। BlueBubbles जैसा ही आकार। - Group registry (
channels.imessage.groups) —inbound-processing.ts:199सेresolveChannelGroupPolicyद्वारा जाँचा जाता है।groupPolicy: "allowlist"के साथ, इस gate को इनमें से कोई एक चाहिए:- एक
groups: { "*": { ... } }wildcard प्रविष्टि (allowAll = trueसेट करती है), या groupsके अंतर्गत एक स्पष्ट प्रति-chat_idप्रविष्टि।
- एक
यदि gate 1 पास होता है लेकिन gate 2 fail होता है, तो message छोड़ दिया जाता है। plugin दो warn-level संकेत emit करता है, इसलिए यह अब डिफ़ॉल्ट log level पर silent नहीं रहता:
- प्रति account एक बार startup
warn, जबgroupPolicy: "allowlist"सेट हो लेकिनchannels.imessage.groupsखाली हो (कोई"*"wildcard नहीं, कोई प्रति-chat_idप्रविष्टि नहीं) — किसी भी message के आने से पहले fire होता है। - प्रति-
chat_idएक बारwarn, जब runtime पर पहली बार कोई विशिष्ट group छोड़ा जाता है, जिसमें chat_id और उसे allow करने के लिएgroupsमें जोड़ने वाली सटीक key बताई जाती है।
DMs काम करना जारी रखते हैं क्योंकि वे अलग code path लेते हैं।
यह सबसे आम BlueBubbles → bundled-iMessage migration failure mode है: ऑपरेटर groupAllowFrom और groupPolicy कॉपी करते हैं, लेकिन groups block छोड़ देते हैं, क्योंकि BlueBubbles का groups: { "*": { "requireMention": true } } किसी असंबंधित mention setting जैसा दिखता है। यह असल में registry gate के लिए load-bearing है।
groupPolicy: "allowlist" के बाद group messages चालू रखने के लिए न्यूनतम config:
{ channels: { imessage: { groupPolicy: "allowlist", groupAllowFrom: ["+15555550123", "chat_guid:any;-;..."], groups: { "*": { requireMention: true }, }, }, },}* के अंतर्गत requireMention: true तब harmless है जब कोई mention patterns configured नहीं हैं: runtime canDetectMention = false सेट करता है और inbound-processing.ts:512 पर mention drop को short-circuit कर देता है। Mention patterns configured होने पर (agents.list[].groupChat.mentionPatterns), यह expected तरीके से काम करता है।
अगर gateway logs में imessage: dropping group message from chat_id=<id> या startup line imessage: groupPolicy="allowlist" but channels.imessage.groups is empty दिखे, तो gate 2 drop कर रहा है — groups block जोड़ें।
चरण-दर-चरण
-
मौजूदा BlueBubbles block के साथ एक iMessage block जोड़ें। जब तक Gateway अभी भी BlueBubbles traffic route कर रहा है, इसे disabled रखें:
json5 { channels: { bluebubbles: { enabled: true, // ... existing config ... }, imessage: { enabled: false, cliPath: "/opt/homebrew/bin/imsg", dmPolicy: "pairing", allowFrom: ["+15555550123"], // copy from bluebubbles.allowFrom groupPolicy: "allowlist", groupAllowFrom: [], // copy from bluebubbles.groupAllowFrom groups: { "*": { requireMention: true } }, // copy from bluebubbles.groups — silently drops groups if missing, see "Group registry footgun" above actions: { reactions: true, edit: true, unsend: true, reply: true, sendWithEffect: true, sendAttachment: true, }, }, },} -
Traffic महत्वपूर्ण होने से पहले probe करें — Gateway रोकें, iMessage block को temporarily enable करें, और CLI से confirm करें कि iMessage healthy report करता है:
bash openclaw gateway stop# edit config: channels.imessage.enabled = trueopenclaw channels status --probe --channel imessage # expect imessage.privateApi.available: truechannels status --probeकेवल configured, enabled accounts को probe करता है। जब तक आप जानबूझकर दोनों channel monitors चलाना नहीं चाहते, BlueBubbles और iMessage दोनों enabled रखकर Gateway restart न करें। अगर आप तुरंत cut over नहीं कर रहे हैं, तो Gateway restart करने से पहलेchannels.imessage.enabledको वापसfalseपर सेट करें। OpenClaw traffic enable करने से पहले Mac validate करने के लिए शुरू करने से पहले में directimsgcommands का उपयोग करें। -
Cut over करें। Enabled iMessage account healthy report करने के बाद, BlueBubbles config हटाएं और iMessage enabled रखें:
json5 { channels: { imessage: { enabled: true /* ... */ }, },}gateway restart करें। Inbound iMessage traffic अब bundled plugin से होकर flow करता है।
-
DMs verify करें। Agent को direct message भेजें; confirm करें कि reply पहुंचता है।
-
Groups अलग से verify करें। DMs और groups अलग code paths लेते हैं — DM success यह prove नहीं करता कि groups route हो रहे हैं। Agent को paired group chat में message भेजें और confirm करें कि reply पहुंचता है। अगर group silent हो जाता है (कोई agent reply नहीं, कोई error नहीं), तो gateway log में
imessage: dropping group message from chat_id=<id>या startup कीimessage: groupPolicy="allowlist" but channels.imessage.groups is emptyline देखें — दोनों default log level पर fire होती हैं। अगर इनमें से कोई दिखे, तो आपकाgroupsblock missing या empty है — ऊपर "Group registry footgun" देखें। -
Action surface verify करें — paired DM से, agent से react, edit, unsend, reply, photo भेजने, और (group में) group rename करने / participant add या remove करने को कहें। हर action Messages.app में natively land होना चाहिए। अगर कोई "iMessage
<action>requires the imsg private API bridge" throw करता है, तोimsg launchफिर से चलाएं औरchannels status --proberefresh करें। -
iMessage DMs, groups, और actions verify हो जाने के बाद BlueBubbles server और config हटाएं। OpenClaw
channels.bluebubblesका उपयोग नहीं करेगा।
Action parity एक नज़र में
| Action | legacy BlueBubbles | bundled iMessage |
|---|---|---|
| Text भेजें / SMS fallback | ✅ | ✅ |
| Media भेजें (photo, video, file, voice) | ✅ | ✅ |
Threaded reply (reply_to_guid) |
✅ | ✅ (#51892 को बंद करता है) |
Tapback (react) |
✅ | ✅ |
| Edit / unsend (macOS 13+ recipients) | ✅ | ✅ |
| Screen effect के साथ भेजें | ✅ | ✅ (#9394 का हिस्सा बंद करता है) |
| Rich text bold / italic / underline / strikethrough | ✅ | ✅ (attributedBody के जरिए typed-run formatting) |
| Group rename करें / group icon set करें | ✅ | ✅ |
| Participant add / remove करें, group छोड़ें | ✅ | ✅ |
| Read receipts और typing indicator | ✅ | ✅ (private API probe पर gated) |
| Same-sender DM coalescing | ✅ | ✅ (केवल DM; channels.imessage.coalesceSameSenderDms के जरिए opt-in) |
| Restart के बाद inbound recovery | ✅ (Webhook replay + history fetch) | ✅ (automatic: since_rowid + dedupe के जरिए missed replay; local पर wider window) |
iMessage gateway down रहने के दौरान missed messages recover करता है: startup पर यह imsg watch.subscribe since_rowid के जरिए last dispatched rowid से replay करता है और GUID से dedupe करता है, जबकि stale-backlog age fence Push-flush "backlog bomb" को suppress करता है। यह imsg RPC connection पर चलता है, इसलिए remote SSH cliPath setups के लिए भी काम करता है; local setups को wider recovery window मिलती है क्योंकि वे chat.db पढ़ सकते हैं। Bridge या gateway restart के बाद inbound recovery देखें।
Pairing, sessions, और ACP bindings
- Pairing approvals handle के हिसाब से carry over होते हैं। आपको known senders को फिर से approve करने की जरूरत नहीं है —
channels.imessage.allowFromवही+15555550123/user@example.comstrings पहचानता है जो BlueBubbles ने उपयोग की थीं। - Sessions per agent + chat scoped रहती हैं। DMs default
session.dmScope=mainके अंतर्गत agent main session में collapse होते हैं; group sessions perchat_idisolated रहती हैं। Session keys अलग हैं (agent:<id>:imessage:group:<chat_id>बनाम BlueBubbles equivalent) — BlueBubbles session keys के अंतर्गत पुरानी conversation history iMessage sessions में carry नहीं होती। - ACP bindings जो
match.channel: "bluebubbles"reference करती हैं, उन्हें"imessage"पर update करना होगा।match.peer.idshapes (chat_id:,chat_guid:,chat_identifier:, bare handle) identical हैं।
कोई rollback channel नहीं
Switch back करने के लिए कोई supported BlueBubbles runtime नहीं है। अगर iMessage verification fail होता है, तो channels.imessage.enabled: false सेट करें, Gateway restart करें, imsg blocker fix करें, और cutover retry करें।
Reply cache SQLite plugin state में रहता है। openclaw doctor --fix मौजूद होने पर पुराने imessage/reply-cache.jsonl sidecar को import और archive करता है।
संबंधित
- BlueBubbles removal और imsg iMessage path — संक्षिप्त announcement और operator summary।
- iMessage — पूरा iMessage channel reference, जिसमें
imsg launchsetup और capability detection शामिल हैं। /channels/bluebubbles— legacy URL जो इस migration guide पर redirect करता है।- Pairing — DM authentication और pairing flow।
- Channel Routing — gateway outbound replies के लिए channel कैसे चुनता है।