jiarung
d03e7ae8ed
fix(usage-log): serialise concurrent writes with per-file promise queue
...
Fire-and-forget callers (attempt.ts) can trigger two concurrent
recordTokenUsage() calls for the same workspaceDir. The previous
read-modify-write pattern had no locking, so the last writer silently
overwrote the first, losing that run's entry.
Fix: keep a Map<file, Promise<void>> write queue so each write awaits
the previous one. The queue slot is replaced with a no-throw wrapper so
a failed write does not stall future writes.
Added a concurrent-write test (20 parallel calls) that asserts no
record is lost.
2026-03-13 09:37:25 +00:00
jiarung
83a566ce99
style(usage-log): apply oxfmt formatting to test file
2026-03-13 09:24:36 +00:00
jiarung
b5cf5aa59f
fix(usage-log): add curly braces to satisfy oxlint curly rule
2026-03-13 09:00:56 +00:00
jiarung
feefa8568f
test(usage-log): add unit tests for recordTokenUsage IO fields
2026-03-13 08:43:18 +00:00
jiarung
8cbc05ae1f
feat(usage-log): record inputTokens, outputTokens, cacheReadTokens, cacheWriteTokens
...
The recordTokenUsage function previously only persisted the aggregate tokensUsed
total, discarding the input/output breakdown that was already available via
getUsageTotals(). This meant token-usage.json had no per-record IO split,
making it impossible to analyse input vs output token costs in dashboards.
Changes:
- Add inputTokens, outputTokens, cacheReadTokens, cacheWriteTokens optional
fields to TokenUsageRecord type in usage-log.ts (new file)
- Write these fields (when non-zero) into each usage entry
- Fields are omitted (not null) when unavailable, keeping existing records valid
- Wire up recordTokenUsage() call in attempt.ts after llm_output hook
This is a purely additive change; existing consumers that only read tokensUsed
are unaffected.
2026-03-13 06:35:38 +00:00
Frank Yang
fa6ff39b9b
fix: recover outbound plugins from the active registry
2026-03-13 14:32:07 +08:00
Peter Steinberger
a0f09a4589
test: fix windows startup fallback mock typing
2026-03-13 05:00:55 +00:00
Peter Steinberger
32d8ec9482
fix: harden windows gateway fallback launch
2026-03-13 04:58:35 +00:00
Josh Lehman
6d0939d84e
fix: handle Discord gateway metadata fetch failures ( #44397 )
...
Merged via squash.
Prepared head SHA: edd17c0effe4f90887ac94ce549f44a69fe19eb2
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-03-12 21:52:17 -07:00
Ayaan Zaidi
8023f4c701
fix(telegram): thread media transport policy into SSRF ( #44639 )
...
* fix(telegram): preserve media download transport policy
* refactor(telegram): thread media transport policy
* fix(telegram): sync fallback media policy
* fix: note telegram media transport fix (#44639 )
2026-03-13 10:11:43 +05:30
Peter Steinberger
c38e7b0270
test(utils): await temp dir cleanup in async tests
2026-03-13 04:38:46 +00:00
Efe Büken
771066d122
fix(compaction): use full-session token count for post-compaction sanity check ( #28347 )
...
Merged via squash.
Prepared head SHA: cf4eab1c51e6b8890e23c2d7172313c40cd2fe04
Co-authored-by: efe-arv <259833796+efe-arv@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-03-12 21:26:30 -07:00
Peter Steinberger
fc2b796f02
test(proxy): make env proxy tests windows-safe
2026-03-13 04:17:10 +00:00
Peter Steinberger
6472949f25
fix(plugins): normalize bundled provider ids
2026-03-13 04:10:06 +00:00
Cypherm
61d219cb39
feat: show status reaction during context compaction ( #35474 )
...
Merged via squash.
Prepared head SHA: 145a7b7c4e1939718c41a300899ae813bd9c511b
Co-authored-by: Cypherm <28184436+Cypherm@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-03-12 21:06:15 -07:00
Peter Steinberger
c52f23f794
test(qmd): make windows cli fixtures explicit
2026-03-13 03:37:41 +00:00
Peter Steinberger
f803215474
fix(ci): restore full gate
2026-03-13 03:34:47 +00:00
Peter Steinberger
0f290fe6d6
fix: narrow Slack outbound blocks opt type
2026-03-13 03:29:00 +00:00
scoootscooob
17c954c46e
fix(acp): preserve final assistant message snapshot before end_turn ( #44597 )
...
Process messageData via handleDeltaEvent for both delta and final states
before resolving the turn, so ACP clients no longer drop the last visible
assistant text when the gateway sends the final message body on the
terminal chat event.
Closes #15377
Based on #17615
Co-authored-by: PJ Eby <3527052+pjeby@users.noreply.github.com>
2026-03-12 20:23:57 -07:00
Peter Steinberger
2201d533fd
fix: enable fast mode for isolated cron runs
2026-03-13 03:21:57 +00:00
Vincent Koc
42efd98ff8
Slack: support Block Kit payloads in agent replies ( #44592 )
...
* Slack: route reply blocks through outbound adapter
* Slack: cover Block Kit outbound payloads
* Changelog: add Slack Block Kit agent reply entry
2026-03-12 23:18:59 -04:00
Peter Steinberger
433e65711f
fix: fall back to a startup entry for windows gateway install
2026-03-13 03:18:17 +00:00
Peter Steinberger
a60a4b4b5e
test(gateway): avoid hoisted reply mock tdz
2026-03-13 03:17:51 +00:00
Peter Steinberger
0979264ed5
test(qmd): make windows cli fixtures explicit
2026-03-13 03:13:56 +00:00
Peter Steinberger
496ca3a637
fix(feishu): fail closed on webhook signature checks
2026-03-13 03:13:56 +00:00
Peter Steinberger
ec3c20d96d
test: harden plugin fixture permissions on macos
2026-03-13 03:13:25 +00:00
Peter Steinberger
fb9984a774
fix(memory): stop forcing Windows qmd cmd shims
2026-03-13 03:09:14 +00:00
Ayaan Zaidi
ff2368af57
fix: stop false cron payload-kind warnings in doctor ( #44012 ) (thanks @shuicici)
2026-03-13 08:38:52 +05:30
shuicici
42613b9baa
fix(cron): compare raw value not trimmed in normalizePayloadKind
2026-03-13 08:38:52 +05:30
shuicici
3e2c776aaf
fix(cron): avoid false legacy payload kind migrations
2026-03-13 08:38:52 +05:30
Peter Steinberger
21fa50f564
test: harden plugin env-scoped fixtures
2026-03-13 03:01:47 +00:00
Peter Steinberger
6b14e6b55b
test(commands): align slash-command config persistence coverage
2026-03-13 02:51:55 +00:00
Peter Steinberger
7dc447f79f
fix(gateway): strip unbound scopes for shared-auth connects
2026-03-13 02:51:55 +00:00
Peter Steinberger
b858d6c3a9
fix: clarify windows onboarding gateway health
2026-03-13 02:40:40 +00:00
Dinakar Sarbada
23c7fc745f
refactor(agents): replace console.warn with SubsystemLogger in compaction-safeguard.ts ( #9974 )
...
Merged via squash.
Prepared head SHA: 35dcc5ba354ad7f058d796846bda9d1f8a416e04
Co-authored-by: dinakars777 <250428393+dinakars777@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-03-12 19:34:55 -07:00
Peter Steinberger
c8439f6587
fix: import oauth types from the oauth entrypoint
2026-03-13 02:17:00 +00:00
Peter Steinberger
296a106f49
test: stabilize hooks loader log assertion on Windows
2026-03-13 02:17:00 +00:00
Peter Steinberger
0068f55dd8
fix(memory): fail closed for Windows qmd wrappers
2026-03-13 01:56:20 +00:00
Peter Steinberger
ddeb423944
fix: quiet Telegram command overflow retry logs
2026-03-13 01:45:56 +00:00
Peter Steinberger
de3e6a8c5b
fix(routing): require ids for slack and msteams allowlists
2026-03-13 01:44:42 +00:00
Peter Steinberger
f36d8c09f1
feat(zalouser): audit mutable group allowlists
2026-03-13 01:44:42 +00:00
Peter Steinberger
88244c0942
refactor(zalouser): reuse shared name matching helper
2026-03-13 01:44:42 +00:00
Peter Steinberger
72ba05504e
test: resolve rebase conflicts in gateway coverage
2026-03-13 01:38:19 +00:00
Nachx639
e951a42bcb
fix(mac): adopt canonical session key and add reset triggers ( #10898 )
...
Add shared native chat handling for /new, /reset, and /clear.
This also aligns main session key handling in the shared chat UI and includes follow-up test and CI fixes needed to keep the branch mergeable.
Co-authored-by: Nachx639 <71144023+Nachx639@users.noreply.github.com>
Co-authored-by: Luke <92253590+ImLukeF@users.noreply.github.com>
2026-03-13 12:35:39 +11:00
Peter Steinberger
268a8592de
fix: avoid ineffective dynamic imports
2026-03-13 01:33:37 +00:00
Peter Steinberger
c80da4e72f
refactor: validate provider plugin metadata
2026-03-13 01:19:35 +00:00
Peter Steinberger
87ad1ce9b1
refactor: add non-interactive provider plugin setup
2026-03-13 01:19:35 +00:00
Vincent Koc
f12cd92bb3
Merge branch 'main' of https://github.com/openclaw/openclaw
...
* 'main' of https://github.com/openclaw/openclaw :
build: update deps and fix vitest 4 regressions
2026-03-12 21:04:02 -04:00
Peter Steinberger
4dd4e36450
build: update deps and fix vitest 4 regressions
2026-03-13 01:02:00 +00:00
Vincent Koc
8661c271e9
Gateway: preserve trusted-proxy browser scopes
2026-03-12 21:00:43 -04:00