Commit Graph

306 Commits

Author SHA1 Message Date
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
Peter Steinberger 587e18cd3f chore: prepare 2026.3.28-beta.1 release 2026-03-28 22:24:51 +00:00
Peter Steinberger 8a24cbf450 chore: bump version to 2026.3.28 2026-03-28 22:05:21 +00:00
Peter Steinberger 61936938e9 refactor: move test harnesses off infra runtime 2026-03-28 06:52:06 +00:00
Peter Steinberger 4beb231fd8 refactor: move heartbeat helpers onto channel runtime 2026-03-28 04:09:25 +00:00
Peter Steinberger faae213ab7 refactor: route whatsapp monitor through channel runtime 2026-03-28 03:48:57 +00:00
Peter Steinberger 12b7327e16 refactor: move secure random helpers onto core sdk 2026-03-28 03:06:06 +00:00
Peter Steinberger b34b03dd9e refactor: move channel dedupe helpers onto core sdk 2026-03-28 02:58:45 +00:00
Peter Steinberger 491969efb0 refactor: route channel activity through channel runtime 2026-03-28 02:53:03 +00:00
Peter Steinberger 00dcfa1b3d refactor: move channel backoff helpers onto runtime-env 2026-03-28 02:48:35 +00:00
Tak Hoffman 3143cf86e8
fix(regression): restore whatsapp cold-runtime chunking 2026-03-27 21:23:18 -05:00
Peter Steinberger 72ba2b3653 chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
Peter Steinberger 4ca07559ab refactor: move provider seams behind plugin sdk surfaces 2026-03-27 23:26:26 +00:00
Peter Steinberger 992b30604d refactor: move extension-owned tests to extensions 2026-03-27 21:37:09 +00:00
Peter Steinberger ed055f44ae refactor: route plugin runtime through bundled seams 2026-03-27 16:40:27 +00:00