Commit Graph

1972 Commits

Author SHA1 Message Date
Peter Steinberger
3b878e6b86 refactor: move approval auth and payload hooks to generic channel capabilities 2026-03-30 08:46:44 +09:00
Peter Steinberger
193f781fad fix: stabilize ci and serial test gate 2026-03-30 00:43:01 +01:00
Peter Steinberger
5dae663ea4 refactor(nodes): remove nodes.run execution path 2026-03-30 00:41:06 +01:00
Peter Steinberger
15c3aa82bf refactor: unify approval forwarding and rendering 2026-03-30 08:28:33 +09:00
Peter Steinberger
8720070fe0 refactor: rename channel approval capabilities 2026-03-30 08:28:33 +09:00
Peter Steinberger
89a4f2a34e refactor(config): centralize runtime config state 2026-03-30 00:17:23 +01:00
Peter Steinberger
52fb4a149a refactor: share approval interactive renderers 2026-03-30 08:03:59 +09:00
Peter Steinberger
69eea2cb80 refactor: split approval auth delivery and rendering 2026-03-30 07:36:18 +09:00
Peter Steinberger
27519cf061 refactor: centralize node identity resolution 2026-03-29 23:14:22 +01:00
Peter Steinberger
6d9a7224aa refactor: unify approval command authorization 2026-03-30 07:06:29 +09:00
Peter Steinberger
168ab94eee refactor(config): pin runtime snapshot and drop ttl cache 2026-03-29 22:57:31 +01:00
Peter Steinberger
3ec000b995 refactor: align same-chat approval routing 2026-03-30 06:52:28 +09:00
Peter Steinberger
2e0682d930 refactor: finish decoupling plugin sdk seams 2026-03-29 22:42:06 +01:00
Peter Steinberger
574d3c5213 fix: make same-chat approvals work across channels 2026-03-30 06:35:04 +09:00
Peter Steinberger
1ca01b738b fix: stabilize exec approval approver routing 2026-03-30 06:25:03 +09:00
Peter Steinberger
276ccd2583 fix(exec): default implicit target to auto 2026-03-30 06:03:08 +09:00
Peter Steinberger
d014f173f1 test: trim stale legacy coverage and repair mocks 2026-03-29 22:00:56 +01:00
Peter Steinberger
cce6d3bbb7 fix: resolve CI type and lint regressions 2026-03-30 04:51:33 +09:00
Peter Steinberger
855878b4f0 fix: stabilize serial test suite 2026-03-30 04:46:04 +09:00
Robin Waslander
77555d6c85 fix(infra): classify SQLite transient errors as non-fatal in unhandled rejection handler (#57018)
Add isTransientSqliteError() covering SQLITE_CANTOPEN, SQLITE_BUSY,
SQLITE_LOCKED, and SQLITE_IOERR via named codes, numeric errcodes
(node:sqlite), and message-string fallback. Combine with existing
network transient check so both families are treated as non-fatal
in the global unhandled rejection handler.

Prevents crash loop under launchd on macOS when SQLite files are
temporarily unavailable.

Fixes #34678
2026-03-29 21:29:38 +02:00
George Zhang
e133924047 [codex] harden clawhub plugin publishing and install (#56870)
* fix: harden clawhub plugin publishing and install

* fix(process): preserve windows shim exit success
2026-03-29 11:59:19 -07: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
c48e0f8e6a style: normalize import order and formatting 2026-03-29 16:33:22 +09:00
Vignesh Natarajan
e816d0968a Status: suppress false dual-stack loopback port warning (#53398) 2026-03-28 23:25:02 -07:00
Shen Yiming
eee8e9679e fix(clawhub): sanitize archive temp filenames (openclaw#56779)
Verified:
- pnpm build
- pnpm check
- pnpm test

Co-authored-by: soimy <1550237+soimy@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-29 00:38:03 -05:00
Peter Steinberger
148a65fe90 refactor: share webhook channel status helpers 2026-03-29 02:11:22 +01:00
Peter Steinberger
9e1b524a00 fix: break mattermost runtime cycle 2026-03-29 00:43:58 +00:00
Robin Waslander
17479ceb43 fix(auto-reply): suppress JSON-wrapped NO_REPLY payloads before channel delivery (#56612)
Add shared isSilentReplyPayloadText() detector that catches both bare
NO_REPLY tokens and JSON {"action":"NO_REPLY"} envelopes. Apply at the
reply directive parser, reply normalizer, and embedded agent payload
builder so the control payload is stripped before any channel sees it.

Preserves media when text is only a silent control envelope.

Fixes #37727
2026-03-28 22:07:24 +01:00
Peter Steinberger
02d4c1f2c3 refactor: derive channel metadata from plugin manifests 2026-03-28 17:17:10 +00:00
Tak Hoffman
54313a8730 fix(dev): rebuild dist after HEAD changes (#56510) 2026-03-28 11:49:09 -05:00
Peter Steinberger
107969c725 test: silence warning filter stderr 2026-03-28 11:57:27 +00:00
Peter Steinberger
a955537a61 fix: slim provider sdk surfaces 2026-03-28 09:35:42 +00:00
Peter Steinberger
1d6ba41762 test: stabilize snapshot and typing helpers 2026-03-28 09:35:42 +00:00
Peter Steinberger
1c833b1eb5 test: align outbound telegram bootstrap mocks 2026-03-28 08:10:47 +00:00
Peter Steinberger
06fba21a9d test(acp): cover persisted generic conversation binds 2026-03-28 05:53:07 +00:00
Peter Steinberger
83135c31c9 refactor(acp): extract generic current conversation binding store 2026-03-28 05:53:07 +00:00
Gustavo Madeira Santana
1e4241c34a Matrix: fix directory auth and credentials fallback 2026-03-28 01:52:55 -04:00
Peter Steinberger
23f0486810 fix: stabilize plugin startup boundaries 2026-03-28 05:22:26 +00:00
Tak Hoffman
742e0c8597 fix(regression): track outbound bootstrap by channel surface 2026-03-27 23:24:51 -05:00
Gustavo Madeira Santana
392724ae57 Plugins: reuse shared bootstrap registry resolution 2026-03-28 00:19:33 -04:00
Tak Hoffman
d50526dddc fix(regression): use active channel registry for generic bindings 2026-03-27 23:08:56 -05:00
Peter Steinberger
dee2bde2f5 test(acp): cover generic conversation binds 2026-03-28 03:53:38 +00:00
Peter Steinberger
d0d4b73d25 refactor(acp): centralize conversation binding context 2026-03-28 03:53:38 +00:00
Tak Hoffman
39048e054d fix(regression): invalidate remote skill snapshots on disconnect 2026-03-27 20:24:15 -05:00
Tak Hoffman
a9e9c7cbfd fix: use session origin delivery metadata in outbound targets 2026-03-27 20:21:06 -05:00
Peter Steinberger
d38ec0c9c9 test: dedupe loader heartbeat and audit cases 2026-03-28 00:53:34 +00:00
Peter Steinberger
6a039bca30 test: dedupe loader and audit suites 2026-03-28 00:46:53 +00:00
Peter Steinberger
b4fe0faf1b test: dedupe config and utility suites 2026-03-28 00:46:53 +00:00
Peter Steinberger
fef688fb7a test: dedupe utility and config suites 2026-03-28 00:26:55 +00:00