Commit Graph

39092 Commits

Author SHA1 Message Date
Vincent Koc
5230b09ca9 fix(line): send quick-reply-only payloads 2026-05-01 05:06:11 -07:00
Vincent Koc
6776129315 fix(telegram): send interactive-only button replies 2026-05-01 05:06:11 -07:00
Vincent Koc
778b49b8fd fix(slack): send block-only slash replies 2026-05-01 05:06:10 -07:00
Vincent Koc
6dac51569e fix(discord): send component-only native replies 2026-05-01 05:06:10 -07:00
Vincent Koc
c7a91f9632 fix(onboard): run noninteractive migration imports 2026-05-01 05:06:09 -07:00
Vincent Koc
6fb9e9e558 fix(gateway): preflight strict agent delivery 2026-05-01 05:06:09 -07:00
Peter Steinberger
8be40059fe refactor: trim agent test helper exports 2026-05-01 13:03:36 +01:00
Alex Knight
6f819280a3 fix: async transcript I/O to unblock gateway event loop (#75595)
* fix: async transcript I/O to unblock gateway event loop

Two related fixes for event-loop starvation caused by synchronous file
operations on session transcript files during gateway hot paths.

## sessions.list: yield between transcript reads (#75330)

Extract filterAndSortSessionEntries() from listSessionsFromStore() and
add a new listSessionsFromStoreAsync() that yields to the event loop
via setImmediate every 10 session rows. The sessions.list RPC handler
now uses the async version.

The synchronous version is kept for callers that need it (sessions-
resolve visibility checks, embedded backends, subagent tools).

The dominant blocker is readSessionTitleFieldsFromTranscript(), which
performs fs.statSync + fs.openSync + fs.readSync (head) + fs.readSync
(tail) for every session row that requests derived titles or last-
message previews. With 100+ sessions, this blocks the event loop for
32-64 seconds, starving WebSocket heartbeats, channel I/O, and
concurrent RPC.

## session compaction: async file copy (#75414)

Add captureCompactionCheckpointSnapshotAsync() using fs.promises for
stat, copyFile, and unlink instead of fsSync equivalents. Switch both
compact.ts and compact.queued.ts to the async version.

The synchronous copyFileSync of large transcript files (20MB+ observed
in production) was blocking the event loop for the entire copy duration
— one reporter measured a 43-minute event loop block from a single
compaction checkpoint capture.

Refs: #75330, #75414

* test: cover async transcript I/O responsiveness

* fix: avoid sync checkpoint metadata reads
2026-05-01 22:03:24 +10:00
Peter Steinberger
32359e667b fix: allow doctor repair size drops 2026-05-01 13:02:24 +01:00
Peter Steinberger
2fbe808a32 refactor: trim gateway test helper exports 2026-05-01 12:58:58 +01:00
Vincent Koc
c3bac63c1b fix(test): tolerate channel readiness degradation 2026-05-01 04:56:13 -07:00
Vincent Koc
2ea47988dd fix(test): satisfy plugin smoke lint 2026-05-01 04:56:13 -07:00
Vincent Koc
578178faa4 fix(plugins): scope requested speech providers 2026-05-01 04:56:13 -07:00
Vincent Koc
f4fb9eb3ce docs(changelog): credit plugin runtime smoke fix 2026-05-01 04:56:12 -07:00
Vincent Koc
a0f1293505 test(e2e): harden bundled plugin runtime smoke 2026-05-01 04:56:12 -07:00
Vincent Koc
132b3e3940 fix(plugins): preserve requested speech fallback 2026-05-01 04:56:12 -07:00
Vincent Koc
e11787a564 test(e2e): configure tts provider sections in matrix 2026-05-01 04:56:11 -07:00
Vincent Koc
f8f719ee23 test(e2e): isolate plugin matrix runtime deps 2026-05-01 04:56:11 -07:00
Vincent Koc
200443e1b3 test(e2e): skip lazy tool catalog probes 2026-05-01 04:56:11 -07:00
Vincent Koc
4ce031fd1a test(e2e): share runtime deps across matrix probes 2026-05-01 04:56:10 -07:00
Vincent Koc
1b1b1b41a3 test(e2e): give plugin runtime RPCs more headroom 2026-05-01 04:56:10 -07:00
Vincent Koc
bcaf980015 test(e2e): account for lazy plugin commands in smoke 2026-05-01 04:56:10 -07:00
Vincent Koc
ac0e3013ab test(e2e): satisfy runtime smoke lint 2026-05-01 04:56:09 -07:00
Vincent Koc
942d46a4d5 test(e2e): assert canonical TTS provider in smoke 2026-05-01 04:56:09 -07:00
Vincent Koc
c1fec482e8 test(e2e): tolerate missing pgrep in runtime smoke 2026-05-01 04:56:09 -07:00
Vincent Koc
54e2f4dc28 test(e2e): let channel runtime smoke load channels 2026-05-01 04:56:09 -07:00
Vincent Koc
93222c5f12 test(e2e): activate channel rows for runtime smoke 2026-05-01 04:56:08 -07:00
Vincent Koc
22fa77de31 test(e2e): add bundled plugin runtime smoke 2026-05-01 04:56:08 -07:00
Vincent Koc
aaa2f32175 fix(app): retry device tokens on pinned gateways (#75537) 2026-05-01 04:55:59 -07:00
Peter Steinberger
74bd209f48 refactor: trim auto reply test helper exports 2026-05-01 12:55:28 +01:00
Peter Steinberger
25f832531c build: refresh a2ui bundle hash 2026-05-01 12:53:57 +01:00
Peter Steinberger
c6a12a6fd2 fix: show google meet twilio call diagnostics 2026-05-01 12:52:29 +01:00
Peter Steinberger
8e5c2efb8d refactor: trim test utility exports 2026-05-01 12:51:56 +01:00
Peter Steinberger
1d47974f89 fix: default Discord voice to explicit opt-in 2026-05-01 12:49:24 +01:00
Peter Steinberger
2ea00e1c35 refactor: delete unused repo scan helper 2026-05-01 12:48:46 +01:00
Peter Steinberger
0b4bc78496 refactor: trim cron test helper exports 2026-05-01 12:45:27 +01:00
Alex Knight
e1a7c5b860 fix: handle EPIPE errors on child process stdin writes (#75602)
Fix three child-process stdin write paths that let async EPIPE errors
escape to uncaughtException and crash the gateway.

extensions/imessage/src/client.ts (the actual #75438 crash path):
- Add child.stdin.on('error') listener in start() to catch async EPIPE
  and reject all pending requests via failAll().
- Add write callback to request() stdin.write() that rejects the
  specific pending request on error, instead of leaving it hanging
  until timeout.

src/agents/mcp-stdio-transport.ts:
- Fix write callback race in send(): previously resolved the promise
  immediately when write() returned true, then the write callback with
  EPIPE would fire after the promise was already fulfilled. Now always
  settles the promise from the write callback so the outcome is known
  before resolving.

src/process/exec.ts:
- Add stdin.on('error') before writing input so EPIPE from a
  prematurely-exited child is swallowed — the process exit handler
  reports the real status.

One reporter observed a gateway crash after 10.5 hours of stable
uptime — a single EPIPE on an iMessage RPC child process stdin write
killed the gateway with code 1.

Fixes: #75438
2026-05-01 21:45:12 +10:00
Peter Steinberger
72f6016ce5 fix(agents): dedupe messaging tool replies by route 2026-05-01 12:44:44 +01:00
Peter Steinberger
e073485c23 chore: sync whatsapp dependency lockfile 2026-05-01 12:43:48 +01:00
Peter Steinberger
040f533f60 chore: update dependencies 2026-05-01 12:43:17 +01:00
Peter Steinberger
666ab0a00b ci: stop parity gate on pull requests 2026-05-01 12:42:33 +01:00
Peter Steinberger
29d9a30497 refactor: trim command test helper exports 2026-05-01 12:42:16 +01:00
Peter Steinberger
7b3dfbf214 refactor: trim cli program test exports 2026-05-01 12:39:10 +01:00
Peter Steinberger
42aaf0c98a Prefer Codex native workspace tools (#75308)
Summary:
- The PR adds Codex dynamic-tool profile config defaulting to `native-first`, filters duplicate workspace/process/planning tools from Codex app-server thread payloads, keeps managed `web_search`, updates docs/manifest/config baselines/changelog, and adds regression tests.

ClawSweeper fixups:
- Included follow-up commit: test(codex): pin native-first tool catalog
- Included follow-up commit: chore(config): refresh generated schema baseline
- Included follow-up commit: chore: add codex native-first changelog
- Included follow-up commit: chore: move native-first changelog entry
- Included follow-up commit: chore: refresh config baseline after rebase

Validation:
- ClawSweeper review passed for head 30e5cecfb7.
- Required merge gates passed before the squash merge.

Prepared head SHA: 30e5cecfb7
Review: https://github.com/openclaw/openclaw/pull/75308#issuecomment-4356919781

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: pashpashpash <nik@vault77.ai>
2026-05-01 11:36:17 +00:00
Peter Steinberger
ec69c07b27 fix: send twilio notify twiml directly 2026-05-01 12:35:40 +01:00
Peter Steinberger
050f0f50c9 refactor: trim cli test helper exports 2026-05-01 12:31:52 +01:00
Peter Steinberger
4a4353e33f fix: recover Discord voice auto-join after resume 2026-05-01 12:28:57 +01:00
Peter Steinberger
7719dd8804 test: use built-in OpenAI provider in Windows smoke 2026-05-01 12:28:23 +01:00
Peter Steinberger
12fbdd4ede refactor: delete unused contract test helpers 2026-05-01 12:26:37 +01:00
Alex Knight
524528944f fix(agents): trim trailing assistant turns and rewrite blank user messages in session repair (#75606)
* fix(agents): trim trailing assistant turns and rewrite blank user messages in session repair

Session-file repair now:
- Trims trailing assistant messages so the JSONL never ends on
  role=assistant, preventing the Anthropic 400 prefill-loop that
  fires when thinking is enabled. (#75271)
- Rewrites blank-only user messages to a synthetic '(continue)'
  placeholder instead of dropping them, so strict providers
  (Qwen/mlx-vlm, Anthropic) no longer reject transcripts missing
  a user turn. (#75313)

Closes #75271, closes #75313.

* refactor: clean up comments in session-file repair

* fix(agents): preserve trailing assistant tool-call turns during session trim

Mirror the outbound guard (stripTrailingAssistantPrefillTurns):
skip assistant entries containing toolCall/toolUse/functionCall
blocks so transcript repair can synthesize missing tool results.

Addresses PR review feedback from clawsweeper on #75606.
2026-05-01 21:24:50 +10:00