88 Commits

Author SHA1 Message Date
Peter Steinberger
c1ef5748eb
refactor: enforce scoped plugin sdk imports 2026-03-16 23:15:24 -07:00
Peter Steinberger
14d6b762fb
build: remove ineffective dynamic import shims 2026-03-16 23:11:59 -07:00
Vincent Koc
efaa4dc5b3 Tests: stabilize bundled native command regressions 2026-03-16 23:01:57 -07:00
Peter Steinberger
5dd2245094
refactor: restore public sdk seams after rebase 2026-03-16 22:51:46 -07:00
Peter Steinberger
f2bd76cd1a
refactor: finalize plugin sdk legacy boundary cleanup 2026-03-16 22:51:46 -07:00
Josh Lehman
61ccc5bede
chore: fix formatting drift in extension sources (#48758) 2026-03-16 22:43:21 -07:00
Vincent Koc
6c866b8543
Tests: centralize contract coverage follow-ups (#48751)
* Plugins: harden global contract coverage

* Channels: tighten global contract coverage

* Channels: centralize inbound contract coverage

* Channels: move inbound contract helpers into core

* Tests: rename local inbound context checks

* Tests: stabilize contract runner profile

* Tests: split scoped contract lanes

* Channels: move inbound dispatch testkit into contracts

* Plugins: share provider contract registry helpers

* Plugins: reuse provider contract registry helpers
2026-03-16 22:26:55 -07:00
Vincent Koc
0bf11c1d69 Tests: guard channel setup import seams 2026-03-16 22:26:20 -07:00
Peter Steinberger
7e9c46d7dd refactor(whatsapp): share plugin base config 2026-03-17 05:18:16 +00:00
Vincent Koc
21f5675f03 Setup: trim channel setup import cycles 2026-03-16 21:50:36 -07:00
Peter Steinberger
dde89d2a83
refactor: isolate provider sdk auth and model helpers 2026-03-16 21:47:28 -07:00
Peter Steinberger
0cfc80b81c
refactor: finish public plugin sdk boundary seams 2026-03-16 21:33:59 -07:00
Peter Steinberger
73703d977c
refactor: remove onboard auth compat barrels 2026-03-16 21:33:41 -07:00
Peter Steinberger
631f6f47cf
fix(extensions): restore setup and catalog tests 2026-03-16 21:31:00 -07:00
Vincent Koc
529272d338 WhatsApp: lazy-load channel auth helpers 2026-03-16 21:19:38 -07:00
Peter Steinberger
9ebe38b6e3
refactor: untangle remaining plugin sdk boundaries 2026-03-16 21:16:32 -07:00
Peter Steinberger
f4fa84aea7
feat(plugins): tighten media runtime integration 2026-03-16 21:13:51 -07:00
Peter Steinberger
c51842660f refactor(setup): support account-scoped default patches 2026-03-17 04:09:49 +00:00
Peter Steinberger
ba79d90313 refactor(whatsapp): share plugin base config 2026-03-17 04:08:58 +00:00
Ayaan Zaidi
5f5b409fe9
fix: remove duplicate whatsapp dm policy import 2026-03-17 08:56:11 +05:30
Peter Steinberger
2497b8147e
refactor: add shared setup sdk subpath 2026-03-16 20:17:13 -07:00
Peter Steinberger
7c2c20a62f
refactor: untangle bundled channel sdk bridges 2026-03-16 19:58:23 -07:00
lishuaigit
76500c7a78
fix: detect Ollama "prompt too long" as context overflow error (#34019)
Merged via squash.

Prepared head SHA: 825a402f0fe7d521902291e7dd6dbb288699224e
Co-authored-by: lishuaigit <7495165+lishuaigit@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-03-16 18:57:33 -07:00
Peter Steinberger
b230e524a5 refactor(whatsapp): reuse shared normalize helpers 2026-03-17 01:43:56 +00:00
Peter Steinberger
e554eee541
refactor: route bundled channel setup helpers through private sdk bridges 2026-03-16 18:35:20 -07:00
Tak Hoffman
4863b651c6 docs: rename onboarding user-facing wizard copy
Co-authored-by: Tak <contact-redacted@example.com>
2026-03-16 19:50:31 -05:00
sparkyrider
10ef58dd69
fix(whatsapp): restore implicit reply mentions for LID identities (#48494)
Threads selfLid from the Baileys socket through the inbound WhatsApp
pipeline and adds LID-format matching to the implicit mention check
in group gating, so reply-to-bot detection works when WhatsApp sends
the quoted sender in @lid format.

Also fixes the device-suffix stripping regex (was a silent no-op).

Closes #23029

Co-authored-by: sparkyrider <sparkyrider@users.noreply.github.com>
Reviewed-by: @ademczuk
2026-03-16 22:44:35 +01:00
Gustavo Madeira Santana
92700940d9
Plugin SDK: restore scoped imports for bundled channels 2026-03-16 09:51:36 +00:00
Vincent Koc
70aa9204c0 Channels: centralize inbound context contracts 2026-03-16 02:06:21 -07:00
Vincent Koc
79a8905fa4 Channels: centralize group policy contracts 2026-03-16 02:06:21 -07:00
Vincent Koc
4aae0d4c9d Channels: centralize outbound payload contracts 2026-03-16 02:06:21 -07:00
Peter Steinberger
7e74adef91
refactor: shrink public channel plugin sdk surfaces 2026-03-16 01:34:22 -07:00
Peter Steinberger
2054cb9431
refactor: move remaining channel seams into plugins 2026-03-15 23:47:30 -07:00
Peter Steinberger
d163278e9c
refactor: move channel delivery and ACP seams into plugins 2026-03-15 23:25:20 -07:00
Peter Steinberger
656848dcd7
refactor: rename setup wizard surfaces 2026-03-15 21:40:31 -07:00
Peter Steinberger
53ccc78c63
refactor: rename setup helper surfaces 2026-03-15 21:06:55 -07:00
Peter Steinberger
77d0ff629c
refactor: rename channel setup flow seam 2026-03-15 20:44:25 -07:00
Peter Steinberger
b580d142cd
refactor(plugins): split lightweight channel setup modules 2026-03-15 19:38:19 -07:00
Peter Steinberger
d56559bad7 fix: repair node24 ci type drift 2026-03-16 01:15:31 +00:00
Vincent Koc
7a93f7d9df WhatsApp: lazy-load setup wizard surface 2026-03-15 18:09:05 -07:00
Peter Steinberger
0da588d2d2
refactor: move whatsapp to setup wizard 2026-03-15 17:57:03 -07:00
Peter Steinberger
4eee827dce
Channels: use owned helper imports 2026-03-15 15:59:12 -07:00
Nimrod Gutman
e2dac5d5cb
fix(plugins): load bundled extensions from dist (#47560) 2026-03-15 21:16:27 +02:00
Peter Steinberger
87c4ae36b4
refactor: drop deprecated whatsapp mention pattern sdk helper 2026-03-15 08:50:31 -07:00
Peter Steinberger
b2e9221a8c
test(whatsapp): fix stale append inbox expectation 2026-03-15 07:57:26 -07:00
Jason
9d3e653ec9
fix(web): handle 515 Stream Error during WhatsApp QR pairing (#27910)
* fix(web): handle 515 Stream Error during WhatsApp QR pairing

getStatusCode() never unwrapped the lastDisconnect wrapper object,
so login.errorStatus was always undefined and the 515 restart path
in restartLoginSocket was dead code.

- Add err.error?.output?.statusCode fallback to getStatusCode()
- Export waitForCredsSaveQueue() so callers can await pending creds
- Await creds flush in restartLoginSocket before creating new socket

Fixes #3942

* test: update session mock for getStatusCode unwrap + waitForCredsSaveQueue

Mirror the getStatusCode fix (err.error?.output?.statusCode fallback)
in the test mock and export waitForCredsSaveQueue so restartLoginSocket
tests work correctly.

* fix(web): scope creds save queue per-authDir to avoid cross-account blocking

The credential save queue was a single global promise chain shared by all
WhatsApp accounts. In multi-account setups, a slow save on one account
blocked credential writes and 515 restart recovery for unrelated accounts.

Replace the global queue with a per-authDir Map so each account's creds
serialize independently. waitForCredsSaveQueue() now accepts an optional
authDir to wait on a single account's queue, or waits on all when omitted.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test: use real Baileys v7 error shape in 515 restart test

The test was using { output: { statusCode: 515 } } which was already
handled before the fix. Updated to use the actual Baileys v7 shape
{ error: { output: { statusCode: 515 } } } to cover the new fallback
path in getStatusCode.

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

* fix(web): bound credential-queue wait during 515 restart

Prevents restartLoginSocket from blocking indefinitely if a queued
saveCreds() promise stalls (e.g. hung filesystem write).

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: clear flush timeout handle and assert creds queue in test

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: evict settled credsSaveQueues entries to prevent unbounded growth

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: share WhatsApp 515 creds flush handling (#27910) (thanks @asyncjason)

---------

Co-authored-by: Jason Separovic <jason@wilma.dog>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-15 17:00:07 +05:30
Ted Li
843e3c1efb
fix(whatsapp): restore append recency filter lost in extensions refactor, handle Long timestamps (#42588)
Merged via squash.

Prepared head SHA: 8ce59bb7153c1717dad4022e1cfd94857be53324
Co-authored-by: MonkeyLeeT <6754057+MonkeyLeeT@users.noreply.github.com>
Co-authored-by: scoootscooob <167050519+scoootscooob@users.noreply.github.com>
Reviewed-by: @scoootscooob
2026-03-15 03:03:31 -07:00
scoootscooob
d9c285e930
Fix configure startup stalls from outbound send-deps imports (#46301)
* fix: avoid configure startup plugin stalls

* fix: credit configure startup changelog entry
2026-03-14 09:58:03 -07:00
Nimrod Gutman
9aac55d306
Add /btw side questions (#45444)
* feat(agent): add /btw side questions

* fix(agent): gate and log /btw reviews

* feat(btw): isolate side-question delivery

* test(reply): update route reply runtime mocks

* fix(btw): complete side-result delivery across clients

* fix(gateway): handle streamed btw side results

* fix(telegram): unblock btw side questions

* fix(reply): make external btw replies explicit

* fix(chat): keep btw side results ephemeral in internal history

* fix(btw): address remaining review feedback

* fix(chat): preserve btw history on mobile refresh

* fix(acp): keep btw replies out of prompt history

* refactor(btw): narrow side questions to live channels

* fix(btw): preserve channel typing indicators

* fix(btw): keep side questions isolated in chat

* fix(outbound): restore typed channel send deps

* fix(btw): avoid blocking replies on transcript persistence

* fix(btw): keep side questions fast

* docs(commands): document btw slash command

* docs(changelog): add btw side questions entry

* test(outbound): align session transcript mocks
2026-03-14 17:27:54 +02:00
scoootscooob
439c21e078
refactor: remove channel shim directories, point all imports to extensions (#45967)
* refactor: remove channel shim directories, point all imports to extensions

Delete the 6 backward-compat shim directories (src/telegram, src/discord,
src/slack, src/signal, src/imessage, src/web) that were re-exporting from
extensions. Update all 112+ source files to import directly from
extensions/{channel}/src/ instead of through the shims.

Also:
- Move src/channels/telegram/ (allow-from, api) to extensions/telegram/src/
- Fix outbound adapters to use resolveOutboundSendDep (fixes 5 pre-existing TS errors)
- Update cross-extension imports (src/web/media.js → extensions/whatsapp/src/media.js)
- Update vitest, tsdown, knip, labeler, and script configs for new paths
- Update guard test allowlists for extension paths

After this, src/ has zero channel-specific implementation code — only the
generic plugin framework remains.

* fix: update raw-fetch guard allowlist line numbers after shim removal

* refactor: document direct extension channel imports

* test: mock transcript module in delivery helpers
2026-03-14 03:43:07 -07:00