Commit Graph

13647 Commits

Author SHA1 Message Date
Vincent Koc
742c005ac8 fix(acp): preserve hidden thought chunks from gateway chat 2026-03-22 19:43:19 -07:00
Vincent Koc
a83b7bca15 refactor(plugin-sdk): route core provider and telegram seams through sdk barrels 2026-03-22 19:43:19 -07:00
Vincent Koc
02f8a86e5c refactor(kilocode): route shared model constants through core seam 2026-03-22 19:43:19 -07:00
Vincent Koc
3ad652fa9e fix(build): restore plugin-sdk and line compat after refactor 2026-03-22 19:37:27 -07:00
Vincent Koc
c0933e2fc8 perf(reply): lazy-load session store writes 2026-03-22 19:32:24 -07:00
Peter Steinberger
f8731b3d9d fix: finish exec tool failure landing (#52508) (thanks @martingarramon) 2026-03-22 19:19:07 -07:00
Martin Garramon
22c75a55b0 fix(exec): return plain-text tool result on failure instead of raw JSON
When an exec command fails (e.g. timeout), the tool previously rejected
with an Error, which the tool adapter caught and wrapped in a JSON object
({ status, tool, error }). The model then received this raw JSON as the
tool result and could parrot it verbatim to the user.

Now exec failures resolve with a proper tool result containing the error
as human-readable text in content[], matching the success path structure.
The model sees plain text it can naturally incorporate into its reply.

Also fixes a pre-existing format issue in update-cli.test.ts.

Fixes #52484

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 19:19:07 -07:00
Peter Steinberger
24f77d7457 fix: finish gateway probe auth landing (#52513) (thanks @CodeForgeNet) 2026-03-22 19:14:44 -07:00
Peter Steinberger
a02499b335 fix: finish gateway probe auth landing (#52513) (thanks @CodeForgeNet) 2026-03-22 19:14:44 -07:00
CodeForgeNet
b2107d3503 fix(status): await resolveGatewayProbeAuthResolution in scan.shared
Function is now async after switching to resolveGatewayProbeAuthSafeWithSecretInputs.
Missing await caused TS error: Property 'auth' does not exist on type 'Promise<...>'.
2026-03-22 19:14:44 -07:00
CodeForgeNet
52acc57a61 fix(status): resolve only selected probe-auth branch and fix plain status path
Address two Codex P1/P2 issues:

1. (P1) Plain 'openclaw status' and 'openclaw status --json' still went
   through the sync resolveGatewayProbeAuthSafe path in
   status.gateway-probe.ts, which cannot expand SecretRef objects.
   Switched to async resolveGatewayProbeAuthSafeWithSecretInputs.

2. (P2) status-all.ts was eagerly resolving both local and remote probe
   auth before deciding which to use. A stale SecretRef in the unused
   branch could abort the command. Collapsed to a single resolution
   call using the correct mode upfront.

Updated status.scan.test.ts to use mockResolvedValue since
resolveGatewayProbeAuthResolution is now async.
2026-03-22 19:14:44 -07:00
CodeForgeNet
3595ecba45 fix(gateway): pass process.env in status command probe auth to resolve SecretRef
Fixes #52360

resolveGatewayProbeAuthSafe was called from status-all.ts without an
env argument, causing the credential resolution chain to fall back to
an empty object instead of process.env. This made env-backed SecretRef
tokens (gateway.auth.token, Telegram botToken, etc.) appear unresolved
in the status command path even when the runtime was healthy.

Added process.env as default fallback in buildGatewayProbeCredentialPolicy
and passed env explicitly from status-all.ts callers.

Related: #33070, #38973, #39415, #46014, #49730
2026-03-22 19:14:44 -07:00
Vincent Koc
042669d8c8 refactor(plugins): finish provider and whatsapp cleanup 2026-03-22 19:13:25 -07:00
Vincent Koc
2131981230 refactor(plugins): move remaining channel and provider ownership out of src 2026-03-22 19:13:25 -07:00
Vincent Koc
7bfa261c42 perf(reply): lazy-load media path normalization 2026-03-22 19:12:44 -07:00
Peter Steinberger
f04b49ee3e test: fix provider config typing drift 2026-03-22 19:10:43 -07:00
Peter Steinberger
74cb08bede fix(plugins): accept media-understanding id hints 2026-03-23 02:08:49 +00:00
Peter Steinberger
9aafff7378 fix: restore main gate after type updates 2026-03-22 19:08:08 -07:00
Peter Steinberger
96d61aa50c refactor: harden generated-file guards and provider ids 2026-03-22 19:08:08 -07:00
Vincent Koc
2fcd6507ec perf(reply): narrow queue imports 2026-03-22 19:05:12 -07:00
Vincent Koc
3392558b42 perf(reply): split usage line helpers 2026-03-22 19:00:35 -07:00
Peter Steinberger
562e4a1791 refactor(outbound): split delivery queue storage and recovery 2026-03-23 01:57:56 +00:00
Peter Steinberger
5051a37de4 test: fix googlechat security typing drift 2026-03-22 18:57:44 -07:00
Peter Steinberger
e5be5c1b99 style: format plugin sdk helper updates 2026-03-23 01:56:01 +00:00
Peter Steinberger
5c8ea0a175 refactor: share channel setup status helpers 2026-03-23 01:56:01 +00:00
Peter Steinberger
583bea001c refactor: share parsed channel allowlist prompts 2026-03-23 01:56:01 +00:00
Peter Steinberger
7d032ed38c refactor: add provider onboarding preset appliers 2026-03-23 01:56:00 +00:00
Peter Steinberger
956fe72b39 refactor: extract single-provider plugin entry helper 2026-03-23 01:56:00 +00:00
Peter Steinberger
54213b587f refactor: reuse shared cli runtime test mocks 2026-03-23 01:53:28 +00:00
Peter Steinberger
2e6f2b0f07 test: centralize cli runtime capture helpers 2026-03-23 01:53:28 +00:00
Vincent Koc
a960cba2db perf(reply): lazy-load context token lookup 2026-03-22 18:52:53 -07:00
Vincent Koc
7d8daa7173 perf(reply): lazy-load usage cost resolution 2026-03-22 18:48:42 -07:00
Peter Steinberger
ee1001d0ae test: slim outbound test import graphs 2026-03-22 18:47:35 -07:00
Vincent Koc
263d5ea687 perf(reply): lazy-load runner execution and memory 2026-03-22 18:44:17 -07:00
Peter Steinberger
29f3b7f6eb fix: harden image auth env lookups (#52552) (thanks @vincentkoc) 2026-03-22 18:42:18 -07:00
Vincent Koc
654089320b fix(image): deprecate legacy skill and clarify auth 2026-03-22 18:42:18 -07:00
Stephen Schoettler
b07312c55b fix(delivery-queue): increment retryCount on deadline-deferred entries
Codex P1: entries deferred by the recovery time budget kept retryCount=0
forever, so they could loop across restarts without ever reaching MAX_RETRIES.

After breaking on deadline, call failDelivery() for all remaining entries
so retryCount is incremented. Entries stay in queue until MAX_RETRIES is
reached and they are pruned normally.

Also updates the maxRecoveryMs test to assert retryCount=1 on deferred entries.
2026-03-22 18:39:24 -07:00
Stephen Schoettler
329e539796 test(delivery-queue): align test assertion with 'next startup' log message 2026-03-22 18:39:24 -07:00
Stephen Schoettler
ca778b3f3c fix(browser): add ChildProcessWithoutNullStreams cast for @types/node compat
The stdio tuple overload resolves differently across @types/node versions
(v20 vs v24/v25). Cast the spawn() result to ChildProcessWithoutNullStreams
to ensure proc.stderr?.on/off type-checks regardless of installed @types/node.
2026-03-22 18:39:24 -07:00
Stephen Schoettler
a05a251be0 fix(delivery-queue): align test assertion and JSDoc with 'next startup' log message 2026-03-22 18:39:24 -07:00
Stephen Schoettler
20f758d4cb fix(delivery-queue): break immediately on deadline instead of failing all remaining entries
P1-C: After now >= deadline, the old code would iterate all remaining queue
entries and call failDelivery() on each — O(n) work that nullified the
maxRecoveryMs wall-clock cap on large queues.

Fix: break out of the recovery loop immediately when the deadline is exceeded.
Remaining entries are picked up on next startup unchanged (retryCount not
incremented). The deadline means 'stop here', not 'fail everything remaining'.
2026-03-22 18:39:24 -07:00
Stephen Schoettler
4e92807f10 fix(delivery-queue): increment retryCount on deferred entries when time budget exceeded
When delivery recovery ran out of the 60s time budget, remaining pending
entries were silently deferred to the next restart with no retryCount
increment. This caused them to loop forever across restarts, never hitting
MAX_RETRIES and never moving to failed/.

Fix: call failDelivery() on each remaining entry before breaking out of
the recovery loop (both the deadline check and the backoff-exceeds-deadline
check). This increments retryCount so that entries eventually exhaust
MAX_RETRIES and are permanently skipped.

Fixes #24353
2026-03-22 18:39:24 -07:00
Stephen Schoettler
5e64265537 fix(browser): prevent stdio buffer blocking in Docker environments 2026-03-22 18:39:24 -07:00
Stephen Schoettler
69217164f7 fix: add null guards to usage sort comparators
Prevents crash when totals is undefined in byModel/byProvider/byAgent
sort comparators. Fixes 'Cannot read properties of undefined (reading
totalTokens)' crash that causes context overflow in active sessions.
2026-03-22 18:39:24 -07:00
Peter Steinberger
75835fc664 test: restore runtime-aware cli mocks 2026-03-22 18:35:37 -07:00
Peter Steinberger
c43bfcbbec refactor: split best-effort network display discovery 2026-03-22 18:35:37 -07:00
Peter Steinberger
39752e7921 test: slim outbound context fixtures 2026-03-22 18:35:19 -07:00
Vincent Koc
2db10fb1d4 perf(reply): lazy-load embedded queue steering 2026-03-22 18:32:31 -07:00
Vincent Koc
d1404014d9 perf(reply): split runner auth profile seam 2026-03-22 18:29:09 -07:00
Peter Steinberger
ecdf5d457a test: fix latest main test regressions 2026-03-22 18:28:13 -07:00