mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 14:30:42 +00:00
Carries forward two BlueBubbles observability/security fixes from #73241 so this PR is a strict superset of the competing implementation. - Promote attachment download failures from logVerbose to runtime.error alongside a verbose copy. Previously, BB attachment download failures (pinned-dispatcher compat bugs, BB server 500s, transient network errors) were invisible at default log level — agents only saw the `<media:image> (1 image)` placeholder text with nothing in the log pointing at the actual failure. - Extend sanitizeForLog to redact `?password=…` / `?token=…` / `?api_key=…` / `?secret=…` query params and `Authorization: Bearer …` headers before they reach the log sink. BB uses query-string auth by default, so error chains carrying captured request URLs were vulnerable to leaking the API password into log aggregators (CWE-532). - Move the changelog entry to the bottom of `## Unreleased` → `### Changes`. Insertions at the top of that section are the most common cause of CHANGELOG conflicts on long-lived PRs; bottom position keeps the diff context stable. Both behavioral changes originated in @zqchris's PR #73241; attribution preserved in the CHANGELOG entry.
BlueBubbles extension (developer reference)
This package contains the BlueBubbles external channel plugin for OpenClaw.
If you’re looking for how to use BlueBubbles as an agent/tool user, see:
skills/bluebubbles/SKILL.md
Layout
- Package entry:
index.ts. - Channel implementation:
src/channel.ts. - Webhook handling:
src/monitor.ts(register per-account route viaregisterPluginHttpRoute). - REST helpers:
src/send.ts+src/probe.ts. - Runtime bridge:
src/runtime.ts(set viaapi.runtime). - Catalog entry for setup selection:
src/channels/plugins/catalog.ts.
Internal helpers (use these, not raw API calls)
probeBlueBubblesinsrc/probe.tsfor health checks.sendMessageBlueBubblesinsrc/send.tsfor text delivery.resolveChatGuidForTargetinsrc/send.tsfor chat lookup.sendBlueBubblesReactioninsrc/reactions.tsfor tapbacks.sendBlueBubblesTyping+markBlueBubblesChatReadinsrc/chat.ts.downloadBlueBubblesAttachmentinsrc/attachments.tsfor inbound media.buildBlueBubblesApiUrl+blueBubblesFetchWithTimeoutinsrc/types.tsfor shared REST plumbing.
Webhooks
- BlueBubbles posts JSON to the gateway HTTP server.
- Normalize sender/chat IDs defensively (payloads vary by version).
- Skip messages marked as from self.
- Route into core reply pipeline via the plugin runtime (
api.runtime) andopenclaw/plugin-sdkhelpers. - For attachments/stickers, use
<media:...>placeholders when text is empty and attach media paths viaMediaUrl(s)in the inbound context.
Config (core)
channels.bluebubbles.serverUrl(base URL),channels.bluebubbles.password,channels.bluebubbles.webhookPath.- Action gating:
channels.bluebubbles.actions.reactions(default true).
Message tool notes
- Reactions: the
reactaction requires atarget(phone number or chat identifier) in addition tomessageId. Example:action=react target=+15551234567 messageId=ABC123 emoji=❤️