Commit Graph

249 Commits

Author SHA1 Message Date
Jacob Tomlinson
f8c9863078 bluebubbles: honor reaction mention gating (#55283) 2026-03-26 17:42:19 +00:00
Jacob Tomlinson
5e08ce36d5 fix(bluebubbles): throttle webhook auth guesses (#55133)
* fix(bluebubbles): throttle webhook auth guesses

* test(bluebubbles): isolate attachment ssrf config

* test(bluebubbles): hoist attachment mocks

* docs: refresh bluebubbles config baseline

* fix(bluebubbles): trust proxied webhook client IPs

* fix(bluebubbles): honor trusted proxy webhook IPs

* fix(bluebubbles): honor real-ip fallback for webhooks
2026-03-26 14:54:03 +00:00
Tyler Yust
2513a8d852 fix(bluebubbles): refactor sendMessageBlueBubbles to use resolveBlueBubblesServerAccount and enhance private network handling in tests 2026-03-26 07:21:48 -07:00
Tyler Yust
cc077ef1ef fix(bluebubbles): enable group participant enrichment by default, add fallback fetch and handle field aliases 2026-03-26 05:45:41 -07:00
Tak Hoffman
b529d13477 test: fix bluebubbles attachment ssrf expectations 2026-03-26 07:25:14 -05:00
Tyler Yust
e43600c9e5 fix(bluebubbles): auto-allow private network for local serverUrl and add allowPrivateNetwork to channel schema 2026-03-26 04:55:46 -07:00
Tyler Yust
4c85fd8569 BlueBubbles: enrich group participants with local Contacts names (#54984)
* BlueBubbles: enrich group participants with Contacts names

* BlueBubbles: gate contact enrichment behind opt in config
2026-03-26 18:38:37 +09:00
Jacob Tomlinson
f92c92515b fix(extensions): route fetch calls through fetchWithSsrFGuard (#53929)
* fix(extensions): route fetch calls through fetchWithSsrFGuard

Replace raw fetch() with fetchWithSsrFGuard in BlueBubbles, Mattermost,
Nextcloud Talk, and Thread Ownership extensions so outbound requests go
through the shared DNS-pinning and network-policy layer.

BlueBubbles: thread allowPrivateNetwork from account config through all
fetch call sites (send, chat, reactions, history, probe, attachments,
multipart). Add _setFetchGuardForTesting hook for test overrides.

Mattermost: add guardedFetchImpl wrapper in createMattermostClient that
buffers the response body before releasing the dispatcher. Handle
null-body status codes (204/304).

Nextcloud Talk: wrap both sendMessage and sendReaction with
fetchWithSsrFGuard and try/finally release.

Thread Ownership: add fetchWithSsrFGuard and ssrfPolicyFromAllowPrivateNetwork
to the plugin SDK surface; use allowPrivateNetwork:true for the
Docker-internal forwarder.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(extensions): improve null-body handling and test harness cleanup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(bluebubbles): default to strict SSRF policy when allowPrivateNetwork is unset

Callers that omit allowPrivateNetwork previously got undefined policy,
which caused blueBubblesFetchWithTimeout to fall through to raw fetch
and bypass the SSRF guard entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(bluebubbles): thread allowPrivateNetwork through action and monitor call sites

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(mattermost,nextcloud-talk): add allowPrivateNetwork config for self-hosted/LAN deployments

* fix: regenerate config docs baseline for new allowPrivateNetwork fields

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 02:04:54 -07:00
Peter Steinberger
bc8622c659 test: collapse helper extension test suites 2026-03-25 05:21:16 +00:00
Peter Steinberger
8a463e7aa9 test: collapse helper plugin test suites 2026-03-25 04:52:36 +00:00
Peter Steinberger
bcd61f0a38 refactor: dedupe helpers and source seams 2026-03-24 21:00:36 +00:00
Peter Steinberger
dc90d3b1d3 refactor(media): share local file access guards 2026-03-23 00:58:23 -07:00
Peter Steinberger
5c8ea0a175 refactor: share channel setup status helpers 2026-03-23 01:56:01 +00:00
Peter Steinberger
583bea001c refactor: share parsed channel allowlist prompts 2026-03-23 01:56:01 +00:00
Peter Steinberger
39faf4725d refactor: share warning collector projections 2026-03-22 23:37:12 +00:00
Peter Steinberger
72bfaf6ee2 refactor: share computed channel status adapters 2026-03-22 23:37:12 +00:00
Peter Steinberger
4cc0d05cfb refactor: share channel runtime state defaults 2026-03-22 23:37:12 +00:00
Peter Steinberger
7f65b3463b refactor: simplify chat plugin pairing configs 2026-03-22 22:45:06 +00:00
Peter Steinberger
8395d5cca2 refactor: adopt chat plugin builder in bluebubbles 2026-03-22 22:11:00 +00:00
Peter Steinberger
87b2672126 refactor: centralize computed channel status adapters 2026-03-22 21:37:31 +00:00
Peter Steinberger
87722d6327 refactor: extend shared account status snapshot helpers 2026-03-22 20:55:16 +00:00
Peter Steinberger
00b2f10dec refactor: share account snapshot descriptions 2026-03-22 20:55:16 +00:00
Peter Steinberger
822c68a2d0 test: remove remaining account helper boilerplate 2026-03-22 20:34:09 +00:00
Peter Steinberger
fa13c2960e refactor: share scoped account accessor adapters 2026-03-22 20:30:21 +00:00
Peter Steinberger
bddb6fca7b refactor: share remaining account config helpers 2026-03-22 19:45:59 +00:00
Peter Steinberger
017d295edb refactor: adopt shared account merge helpers 2026-03-22 19:01:52 +00:00
Peter Steinberger
36feecf018 refactor(test): dedupe bluebubbles webhook auth helpers 2026-03-22 03:24:22 +00:00
Peter Steinberger
6c4eced494 refactor(test): dedupe bluebubbles webhook helpers 2026-03-22 03:15:48 +00:00
Peter Steinberger
b1ab7ba3ac refactor(test): trim bluebubbles webhook fixtures 2026-03-22 02:41:44 +00:00
Peter Steinberger
4f210e98a5 refactor(test): dedupe bluebubbles monitor helpers 2026-03-22 02:18:00 +00:00
Peter Steinberger
17713ec988 refactor(test): dedupe bluebubbles webhook tests 2026-03-22 01:30:22 +00:00
Vincent Koc
2b4c3c2057 fix(plugin-sdk): remove relative extension boundary escapes (#51939)
* fix(plugin-sdk): remove relative extension boundary escapes

* Gate new plugin-sdk subpaths on host version

* Add changelog entry for #51939

* Fix local staging for plugin-sdk host version gate

* Raise host floor for line and googlechat plugins

---------

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-21 20:03:18 -05:00
Peter Steinberger
30ad059da8 refactor(test): dedupe setup wizard helpers 2026-03-22 00:16:31 +00:00
Peter Steinberger
57fa59ab92 refactor(test): dedupe setup wizard test helpers 2026-03-21 23:41:54 +00:00
Josh Lehman
2364e45fe4 test: align extension runtime mocks with plugin-sdk (#51289)
* test: align extension runtime mocks with plugin-sdk

Update stale extension tests to mock the plugin-sdk runtime barrels that production code now imports, and harden the Signal tool-result harness around system-event assertions so the channels lane matches current extension boundaries.

Regeneration-Prompt: |
  Verify the failing channels-lane tests against current origin/main in an isolated worktree before changing anything. If the failures reproduce on main, keep the fix test-only unless production behavior is clearly wrong. Recent extension refactors moved Telegram, WhatsApp, and Signal code onto plugin-sdk runtime barrels, so update stale tests that still mock old core module paths to intercept the seams production code now uses. For Signal reaction notifications, avoid brittle assertions that depend on shared queued system-event state when a direct harness spy on enqueue behavior is sufficient. Preserve scope: only touch the failing tests and their local harness, then rerun the reproduced targeted tests plus the full channels lane and repo check gate.

* test: fix extension test drift on main

* fix: lazy-load bundled web search plugin registry

* test: make matrix sweeper failure injection portable

* fix: split heavy matrix runtime-api seams

* fix: simplify bundled web search id lookup

* test: tolerate windows env key casing
2026-03-20 15:59:53 -07:00
Peter Steinberger
62ddc9d9e0 refactor: consolidate plugin sdk surface 2026-03-20 19:24:10 +00:00
Tyler Yust
a290f5e50f fix: persist outbound sends and skip stale cron deliveries (#50092)
* fix(bluebubbles): auto-create chats for new numbers, persist outbound messages to session transcripts

Two fixes for BlueBubbles message tool behavior:

1. **Attachment sends to new phone numbers**: sendBlueBubblesAttachment now
   auto-creates a new DM chat (via /api/v1/chat/new) when no existing chat
   is found for a handle target, matching the behavior already present in
   sendMessageBlueBubbles for text sends. The existing createNewChatWithMessage
   is refactored into a reusable createChatForHandle that returns the chatGuid.

2. **Outbound message session persistence**: Ensures outbound messages sent
   via the message tool are reliably tracked in session transcripts:
   - ensureOutboundSessionEntry now falls back to directly creating a session
     store entry when recordSessionMetaFromInbound returns null, guaranteeing
     a sessionId exists for the subsequent mirror append.
   - appendAssistantMessageToSessionTranscript now normalizes the session key
     (lowercased) when looking up the store, preventing case mismatches
     between the store keys and the mirror sessionKey.

Tests added for all changes.

* test(slack): verify outbound session tracking and new target sends for Slack

The shared infrastructure changes from the BlueBubbles fix (session key
normalization in transcript.ts and fallback session entry creation in
outbound-session.ts) already cover Slack. Slack's sendMessageSlack uses
conversations.open to auto-create DM channels for new user targets.

Add tests confirming:
- Slack user DM and channel session route resolution (outbound.test.ts)
- Slack session key normalization for transcript append (sessions.test.ts)
- Slack outbound sendText/sendMedia to new user and channel targets (channel.test.ts)

* fix(cron): skip stale delayed deliveries

* fix: prep PR #50092
2026-03-19 11:40:34 +09:00
Peter Steinberger
c70837f07d refactor: converge plugin sdk channel helpers 2026-03-19 00:25:19 +00:00
Peter Steinberger
07d9f725b6 refactor: unify plugin sdk primitives 2026-03-18 23:58:56 +00:00
Vincent Koc
757c2cc2de fix(release): isolate bundled config docs loading 2026-03-18 16:01:43 -07:00
Peter Steinberger
8d73bc77fa refactor: deduplicate reply payload helpers 2026-03-18 17:30:25 +00:00
Peter Steinberger
27f655ed11 refactor: deduplicate channel runtime helpers 2026-03-18 16:37:27 +00:00
Peter Steinberger
861fcb1575 fix: restore rebased full gate 2026-03-18 15:34:27 +00:00
Vincent Koc
6e723dfd69 Plugins: internalize medium extension SDK imports 2026-03-17 23:09:26 -07:00
Peter Steinberger
05603e4e6c refactor: deduplicate channel config adapters 2026-03-18 04:51:29 +00:00
Gustavo Madeira Santana
e93412b5ce Outbound: move target resolution heuristics behind plugins 2026-03-18 04:24:54 +00:00
Gustavo Madeira Santana
0f7cd59824 BlueBubbles: move outbound session routing behind plugin boundary 2026-03-18 04:09:48 +00:00
Peter Steinberger
1a9114a169 refactor: deduplicate setup wizard helpers 2026-03-18 03:58:22 +00:00
Gustavo Madeira Santana
a8f433d611 BlueBubbles: move group policy behind plugin boundary 2026-03-18 03:40:42 +00:00
Peter Steinberger
9350cb19dd refactor: deduplicate plugin setup and channel config helpers 2026-03-18 03:28:05 +00:00