Commit Graph

320 Commits

Author SHA1 Message Date
Vincent Koc
568859e1fb test(extensions): avoid barrel testing helpers in media tests 2026-04-03 21:23:47 +09:00
Peter Steinberger
f59d0eac68 refactor(plugin-runtime): remove plugin-specific core seams 2026-04-03 13:08:39 +01:00
Peter Steinberger
52225db134 fix(ci): reuse sdk tool auth error for whatsapp 2026-04-03 11:35:45 +01:00
Peter Steinberger
2766c27b2a refactor(plugin-sdk): genericize web channel runtime seams 2026-04-03 11:17:28 +01:00
Peter Steinberger
f2d7a825b1 refactor(plugin-sdk): remove channel-specific sdk seams 2026-04-03 10:45:10 +01:00
Marcus Castro
d2d9a928b1 WhatsApp: honor block streaming config (#60069) 2026-04-03 03:12:37 -03:00
Peter Steinberger
847faa3d04 test: trim extension test import churn 2026-04-03 04:41:08 +01:00
Peter Steinberger
bff6025bde test: refresh generated baselines 2026-04-03 04:54:59 +09:00
Peter Steinberger
04cf29f613 refactor: speed up whatsapp inbound dispatch tests 2026-04-03 04:34:58 +09:00
Gustavo Madeira Santana
9786946b2d fix(matrix): restore guided setup flow (#59462)
Merged via squash.

Prepared head SHA: 9b29023c68
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-02 02:15:32 -04:00
Marcus Castro
e1c96785ac fix(whatsapp): gate connect-time presence on selfChatMode to preserve phone notifications (#59410) 2026-04-02 01:40:06 -03:00
bobbyt74
cae1d9bc6d fix(whatsapp): add HTML/XML/CSS to MIME map + fallback for unknown media types (#51562)
Merged via squash.

Prepared head SHA: 83f2eabd49
Co-authored-by: bobbyt74 <262672147+bobbyt74@users.noreply.github.com>
Co-authored-by: mcaxtr <7562095+mcaxtr@users.noreply.github.com>
Reviewed-by: @mcaxtr
2026-04-02 00:25:12 -03:00
Vincent Koc
76c4ecd651 perf(test): narrow sdk seams for channel hotspots 2026-04-01 23:14:48 +09:00
Peter Steinberger
8988894ff7 build: prepare 2026.4.1-beta.1 release 2026-04-01 15:09:19 +01:00
Marcus Castro
ac6db066d3 feat(whatsapp): add reaction guidance levels (#58622)
* WhatsApp: add reaction guidance policy

* WhatsApp: expose reaction guidance to agents
2026-04-01 01:42:10 -03:00
Owen Wang
21403a3898 fix(whatsapp): pass Timestamp to finalizeInboundContext (#58590)
Merged via squash.

Prepared head SHA: 74aa9a1408
Co-authored-by: Maninae <9339187+Maninae@users.noreply.github.com>
Co-authored-by: mcaxtr <7562095+mcaxtr@users.noreply.github.com>
Reviewed-by: @mcaxtr
2026-04-01 01:02:23 -03:00
Peter Steinberger
219116e862 test: drop redundant status-issues skip checks 2026-04-01 02:32:55 +01:00
Peter Steinberger
5b8f0cf1d5 test: centralize inbound contract suites 2026-04-01 02:04:53 +01:00
Peter Steinberger
051e31fb55 test: centralize outbound payload contracts 2026-04-01 02:01:48 +01:00
Peter Steinberger
2db2b078ca test: remove extension group policy wrappers 2026-04-01 01:57:18 +01:00
Peter Steinberger
ba5b373ad4 test: centralize channel catalog contracts 2026-04-01 01:51:26 +01:00
Peter Steinberger
b910cc5869 test: remove extension manifest and core-extension wrappers 2026-04-01 01:44:43 +01:00
Peter Steinberger
9ea7e06460 build: bump version to 2026.4.1 2026-03-31 22:53:17 +01:00
Peter Steinberger
213a704b71 fix: unblock 2026.3.31 release preflight 2026-03-31 21:54:12 +01:00
Peter Steinberger
2a60e34f2a build: prepare 2026.3.31 stable release 2026-03-31 21:32:38 +01:00
Peter Steinberger
91be36ca4f build: prepare 2026.3.31-beta.1 release 2026-03-31 19:32:49 +01:00
Peter Steinberger
1a4c9c3e85 fix: repair extension media ci coverage 2026-03-31 16:47:13 +01:00
Peter Steinberger
7d2b4ed4e1 fix: restore whatsapp runtime seams 2026-03-31 16:47:13 +01:00
Peter Steinberger
6eddd55393 test: accept media loader option expansion 2026-03-31 16:47:13 +01:00
Peter Steinberger
43ef8a5a86 refactor(media): centralize outbound access plumbing 2026-04-01 00:32:53 +09:00
Vincent Koc
c416527df6 fix(whatsapp): restore runtime send and action seam 2026-04-01 00:25:35 +09:00
Peter Steinberger
015ab98591 fix: restore ci status fast path and whatsapp tests 2026-03-31 16:21:55 +01:00
Peter Steinberger
3bb02d3338 fix(media): align outbound sends with fs read capability 2026-04-01 00:07:50 +09:00
Peter Steinberger
c425ef3e74 build: bump version to 2026.3.31 2026-03-31 15:48:00 +01:00
Peter Steinberger
0ed7f1fd22 refactor: remove core WhatsApp runtime channel seam 2026-03-31 15:17:13 +01:00
Vincent Koc
5b7443d175 perf(whatsapp): narrow reply chunking imports 2026-03-31 22:25:14 +09:00
Vincent Koc
d369c9373b perf(whatsapp): avoid module resets in poll adapter test 2026-03-31 22:06:01 +09:00
Neerav Makwana
763d5cea44 fix: hydrate WhatsApp participating groups on connect (#58007) (thanks @neeravmakwana)
* Web: hydrate participating groups on connect

* Web: avoid blocking inbox listeners during group hydration
2026-03-31 10:09:18 +05:30
Peter Steinberger
f7285e0a9e test: speed up extension suites 2026-03-31 02:25:02 +01:00
Gustavo Madeira Santana
9d05db7be7 WhatsApp: move heartbeat recipient test into plugin 2026-03-30 00:46:50 -04:00
Gustavo Madeira Santana
aaf47ca54b WhatsApp: align deliver-reply test mocks with imports 2026-03-29 23:36:38 -04:00
Vincent Koc
d28349c48e fix(test): align channel mocks with runtime exports 2026-03-30 12:08:27 +09:00
Peter Steinberger
f3bf7fe53a chore: bump version to 2026.3.30 2026-03-30 09:28:29 +09:00
Peter Steinberger
c2cbdea28c refactor: add approval auth capabilities to more channels 2026-03-30 09:04:08 +09:00
Peter Steinberger
8861cdbb6f refactor(plugin-sdk): untangle extension test seams 2026-03-29 23:43:53 +01:00
Marcus Castro
34648235a3 WhatsApp: use shared resolveReactionMessageId for context-aware reactions (#57226)
Wire the shared resolveReactionMessageId helper into the WhatsApp
channel adapter, matching the pattern already used by Telegram, Signal,
and Discord. The model can now react to the current inbound message
without explicitly providing a messageId.

Safety guards:
- Only falls back to context when the source is WhatsApp
- Suppresses fallback when targeting a different chat (normalized comparison)
- Throws ToolInputError (400) instead of plain Error (500) when messageId
  is missing, preserving gateway error mapping
2026-03-29 15:42:19 -03:00
Peter Steinberger
f1af7d66d2 chore: bump version to 2026.3.29 2026-03-29 14:33:12 +01:00
Thomas M
0a01386756 fix: canonicalize session keys at write time (#30654) (thanks @thomasxm)
* fix: canonicalize session keys at write time to prevent orphaned sessions (#29683)

resolveSessionKey() uses hardcoded DEFAULT_AGENT_ID="main", but all read
paths canonicalize via cfg. When the configured default agent differs
(e.g. "ops" with mainKey "work"), writes produce "agent:main:main" while
reads look up "agent:ops:work", orphaning transcripts on every restart.

Fix all three write-path call sites by wrapping with
canonicalizeMainSessionAlias:
- initSessionState (auto-reply/reply/session.ts)
- runWebHeartbeatOnce (web/auto-reply/heartbeat-runner.ts)
- resolveCronAgentSessionKey (cron/isolated-agent/session-key.ts)

Add startup migration (migrateOrphanedSessionKeys) to rename existing
orphaned keys to canonical form, merging by most-recent updatedAt.

* fix: address review — track agent IDs in migration map, align snapshot key

P1: migrateOrphanedSessionKeys now tracks agentId alongside each store
path in a Map instead of inferring from the filesystem path. This
correctly handles custom session.store templates outside the default
agents/<id>/ layout.

P2: Pass the already-canonicalized sessionKey to getSessionSnapshot so
the heartbeat snapshot reads/restores use the same key as the write path.

* fix: log migration results at all early return points

migrateOrphanedSessionKeys runs before detectLegacyStateMigrations, so
it can canonicalize legacy keys (e.g. "main" → "agent:main:main") before
the legacy detector sees them. This caused the early return path to skip
logging, breaking doctor-state-migrations tests that assert log.info was
called.

Extract logMigrationResults helper and call it at every return point.

* fix: handle shared stores and ~ expansion in migration

P1: When session.store has no {agentId}, all agents resolve to the same
file. Track all agentIds per store path (Map<path, Set<id>>) and run
canonicalization once per agent. Skip cross-agent "agent:main:*"
remapping when "main" is a legitimate configured agent sharing the store,
to avoid merging its data into another agent's namespace.

P2: Use expandHomePrefix (environment-aware ~ resolution) instead of
os.homedir() in resolveStorePathFromTemplate, matching the runtime
resolveStorePath behavior for OPENCLAW_HOME/HOME overrides.

* fix: narrow cross-agent remap to provable orphan aliases only

Only remap agent:main:* keys where the suffix is a main session alias
("main" or the configured mainKey). Other agent:main:* keys — hooks,
subagents, cron sessions, per-sender keys — may be intentional
cross-agent references and must not be silently moved into another
agent's namespace.

* fix: run orphan-key session migration at gateway startup (#29683)

* fix: canonicalize cross-agent legacy main aliases in session keys (#29683)

* fix: guard shared-store migration against cross-agent legacy alias remap (#29683)

* refactor: split session-key migration out of pr 30654

---------

Co-authored-by: Your Name <your_email@example.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-29 18:59:25 +05:30
Peter Steinberger
8e0ab35b0e refactor(plugins): decouple bundled plugin runtime loading 2026-03-29 09:10:38 +01:00
Peter Steinberger
f9b1079283 build: cut 2026.3.28 stable 2026-03-29 02:33:41 +01:00