Commit Graph

13981 Commits

Author SHA1 Message Date
Nimrod Gutman b84a130788
fix(release): preserve shipped channel surfaces in npm tar (#52913)
* fix(channels): ship official channel catalog (#52838)

* fix(release): keep shipped bundles in npm tar (#52838)

* build(release): fix rebased release-check helpers (#52838)
2026-03-23 17:39:22 +02:00
Vincent Koc 7299b42e2a fix(config): keep built-in auto-enable idempotent 2026-03-23 08:34:37 -07:00
Vincent Koc e68cbea5b4
fix(config): keep built-in channels out of plugin allowlists (#52964)
* fix(config): keep built-in channels out of plugin allowlists

* docs(changelog): note doctor whatsapp allowlist fix

* docs(changelog): move doctor whatsapp fix to top
2026-03-23 08:26:51 -07:00
Vincent Koc 70b235f312 fix(release): ship bundled plugins in pack artifacts 2026-03-23 08:22:00 -07:00
Vincent Koc 31675d65d4
fix(agents): preserve anthropic thinking block order (#52961) 2026-03-23 08:18:15 -07:00
Sathvik Veerapaneni d2e8ed3632
fix: keep session transcript pointers fresh after compaction (#50688)
Co-authored-by: Frank Yang <frank.ekn@gmail.com>
2026-03-23 22:58:07 +08:00
Peter Steinberger 05e31eb9ff test: stabilize channel ci gate 2026-03-23 14:32:10 +00:00
wangchunyue 4e849ac127
fix: ensure env proxy dispatcher before MiniMax and OpenAI Codex OAuth flows (openclaw#52228)
Verified:
- pnpm install --frozen-lockfile
- NPM_CONFIG_CACHE=/tmp/openclaw-npm-cache-52228 pnpm build
- pnpm check
- pnpm test:macmini (failed on inherited pre-existing plugin contract test: src/plugins/contracts/registry.contract.test.ts missing deepseek in bundled provider contract registry outside this PR surface)

Co-authored-by: openperf <80630709+openperf@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-23 09:26:34 -05:00
Peter Steinberger b393effba6 test: harden channel suite isolation 2026-03-23 12:57:43 +00:00
Peter Steinberger 949d6be1d1
test: fix status plugin pagination expectation 2026-03-23 05:51:19 -07:00
Peter Steinberger 383c61e305
test: stabilize gateway thread harness 2026-03-23 05:44:34 -07:00
Peter Steinberger 41850c3880
refactor: isolate attempt context engine thread helpers 2026-03-23 05:27:44 -07:00
Peter Steinberger 76dc854963
test: remove replaced spawn-workspace monolith 2026-03-23 05:21:59 -07:00
Peter Steinberger 4e661d5c4b
test: split attempt spawn-workspace thread fixtures 2026-03-23 05:21:59 -07:00
Peter Steinberger 9f2330363e fix: refactor deepseek bundled plugin (#48762) (thanks @07akioni) 2026-03-23 05:06:07 -07:00
Bakhtier Sizhaev a0cb443aa3
fix: document Telegram asDocument alias (#52461) (thanks @bakhtiersizhaev)
* feat(telegram): add asDocument param to message tool

Adds `asDocument` as a user-facing alias for the existing `forceDocument`
parameter in the message tool. When set to `true`, media files (images,
videos, GIFs) are sent via `sendDocument` instead of `sendPhoto`/
`sendVideo`/`sendAnimation`, preserving the original file quality
without Telegram compression.

This is useful when agents need to deliver high-resolution images or
uncompressed files to users via Telegram.

`asDocument` is intentionally an alias rather than a replacement — the
existing `forceDocument` continues to work unchanged.

Changes:
- src/agents/tools/message-tool.ts: add asDocument to send schema
- src/agents/tools/telegram-actions.ts: OR asDocument into forceDocument
- src/infra/outbound/message-action-runner.ts: same OR logic for outbound path
- extensions/telegram/src/channel-actions.ts: read and forward asDocument
- src/channels/plugins/actions/actions.test.ts: add test case

* fix: restore channel-actions.ts to main version (rebase conflict fix)

* fix(test): match asDocument test payload to actual params structure

* fix(telegram): preserve forceDocument alias semantics

* fix: document Telegram asDocument alias (#52461) (thanks @bakhtiersizhaev)

---------

Co-authored-by: Бахтиер Сижаев <bkh@MacBook-Air.local>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-23 17:32:46 +05:30
Peter Steinberger 47db5abece
test: inject thread-safe base seams 2026-03-23 04:59:15 -07:00
Peter Steinberger e84ca730a3 test: stabilize e2e module isolation 2026-03-23 11:46:54 +00:00
Peter Steinberger 4f92eaad37
test: inject image-tool provider deps for raw threads 2026-03-23 04:40:58 -07:00
Peter Steinberger a6c7ad84ba
build: prepare 2026.3.23 2026-03-23 04:40:13 -07:00
Peter Steinberger 6a3d4f9fad
test: isolate pi model and reset-model thread fixtures 2026-03-23 04:36:06 -07:00
Peter Steinberger 6bcd9a801a
test: inject thread-safe gateway and ACP seams 2026-03-23 04:34:42 -07:00
Peter Steinberger d841d02439 ci: stabilize windows and bun unit lanes 2026-03-23 11:28:25 +00:00
Peter Steinberger adf63eba9f test: raise timeout for slow provider auth normalization 2026-03-23 11:19:26 +00:00
Peter Steinberger f182c3a292
test: inject thread-safe deps for agent tools 2026-03-23 04:16:53 -07:00
Peter Steinberger fc9739313c test: harden channel suite isolation 2026-03-23 11:09:12 +00:00
Peter Steinberger e7d11f6c33
build: prepare 2026.3.22 2026-03-23 04:08:15 -07:00
Peter Steinberger 6f048f59cb test: stabilize trigger handling and hook e2e tests 2026-03-23 11:06:24 +00:00
Peter Steinberger b9efba1faf test: target gemini 3.1 flash alias 2026-03-23 10:59:12 +00:00
Peter Steinberger 4dcc39c25c test: snapshot ci timeout investigation 2026-03-23 10:44:34 +00:00
Peter Steinberger 6e012d7feb
test: inject model runtime hooks for thread-safe tests 2026-03-23 03:25:42 -07:00
Peter Steinberger 2df10e81c8
test: isolate server-context browser harness imports 2026-03-23 03:23:30 -07:00
Peter Steinberger a0ad47440a test: stabilize live provider docker probes 2026-03-23 10:16:06 +00:00
Peter Steinberger 3ff2f85bad
fix: stop browser server tests from launching real chrome 2026-03-23 03:15:02 -07:00
Peter Steinberger 203eebec2f
test: split pi embedded model thread fixtures 2026-03-23 02:54:10 -07:00
Peter Steinberger 8067ae50fa fix: restore provider runtime lazy boundary 2026-03-23 09:35:18 +00:00
Peter Steinberger d8d545bac1
build: prepare 2026.3.22-beta.1 2026-03-23 02:34:30 -07:00
Julia Bush e94ebfa084
fix: harden gateway SIGTERM shutdown (#51242) (thanks @juliabush)
* fix: increase shutdown timeout to avoid SIGTERM hang

* fix(telegram): abort polling fetch on shutdown to prevent SIGTERM hang

* fix(gateway): enforce hard exit on shutdown timeout for SIGTERM

* fix: tighten gateway shutdown watchdog

* fix: harden gateway SIGTERM shutdown (#51242) (thanks @juliabush)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-23 15:01:42 +05:30
Peter Steinberger 75b65c2a35 fix: restore provider runtime lazy boundary 2026-03-23 09:24:20 +00:00
Peter Steinberger 7a92d43d9a
test: isolate pi embedded model thread fixtures 2026-03-23 02:22:31 -07:00
Peter Steinberger 7ba28d6dba fix: repair runtime seams after rebase 2026-03-23 09:14:17 +00:00
Peter Steinberger 2a06097184
test: update codex test fixtures to gpt-5.4 2026-03-23 02:14:00 -07:00
RichardCao a835c200f3
fix(status): recompute fallback context window (#51795)
* fix(status): recompute fallback context window

* fix(status): keep live context token caps on fallback

* fix(status): preserve fallback runtime context windows

* fix(status): preserve configured fallback context caps

* fix(status): keep provider-aware transcript context lookups

* fix(status): preserve explicit fallback context caps

* fix(status): clamp fallback configured context caps

* fix(status): keep raw runtime slash ids

* fix(status): refresh plugin-sdk api baseline

* fix(status): preserve fallback context lookup

* test(status): refresh plugin-sdk api baseline

* fix(status): keep runtime slash-id context lookup

---------

Co-authored-by: create <create@createdeMacBook-Pro.local>
Co-authored-by: Frank Yang <frank.ekn@gmail.com>
Co-authored-by: RichardCao <RichardCao@users.noreply.github.com>
2026-03-23 17:08:48 +08:00
Frank Yang b186d9847c
fix(memory-core): register memory tools independently to prevent coupled failure (#52668)
Merged via admin squash because current required CI failures are inherited from base and match latest `main` failures outside this PR's `memory-core` surface.

Prepared head SHA: df7f968581
Co-authored-by: artwalker <44759507+artwalker@users.noreply.github.com>
Reviewed-by: @frankekn
2026-03-23 17:05:37 +08:00
Peter Steinberger a381e0d115 style: format image-generation runtime tests 2026-03-23 09:04:36 +00:00
Peter Steinberger a4367eb656
test: finish no-isolate suite hardening 2026-03-23 02:02:03 -07:00
Peter Steinberger 4ea014d581 fix: align websocket stream fallback types 2026-03-23 08:59:16 +00:00
Peter Steinberger fb602c9b02 test: harden ci isolated mocks 2026-03-23 08:53:35 +00:00
Peter Steinberger d44a399ae0
fix: alphabetize web search provider listings 2026-03-23 01:46:47 -07:00
Peter Steinberger 7cee097df9
test: harden no-isolate mocked module resets 2026-03-23 01:33:47 -07:00
Peter Steinberger abf2157b18
fix: sync agent and autoreply e2e updates 2026-03-23 01:33:40 -07:00
Peter Steinberger f64f3fdb53
test: isolate base vitest thread blockers 2026-03-23 01:26:31 -07:00
Peter Steinberger 94f397bc5f
test: stop leaking image workspace temp dirs 2026-03-23 01:23:10 -07:00
Onur Solmaz fe459c9084
ACPX: align pinned runtime version (#52730)
* ACPX: align pinned runtime version

* ACPX: drop version example from help text
2026-03-23 09:21:57 +01:00
Vincent Koc 6c60a3773a chore(plugins): remove opik investigation checkpoints 2026-03-23 01:21:19 -07:00
Peter Steinberger db5369f5f9
test: harden isolated test mocks 2026-03-23 01:13:08 -07:00
Peter Steinberger a60672b708 test: fix channel summary registry setup 2026-03-23 08:07:44 +00:00
Vincent Koc d22279d2e8 fix(plugins): preserve live hook registry during gateway runs 2026-03-23 01:05:13 -07:00
Peter Steinberger 9105b3723d
test: harden no-isolate test module resets 2026-03-23 01:02:16 -07:00
Peter Steinberger 771a78cc77 test: stabilize ci test harnesses 2026-03-23 07:58:34 +00:00
Peter Steinberger dc90d3b1d3
refactor(media): share local file access guards 2026-03-23 00:58:23 -07:00
Peter Steinberger eac93507c3
fix(browser): enforce node browser proxy allowProfiles 2026-03-23 00:56:44 -07:00
Peter Steinberger 3fd5d13315 test: fix ci docs drift and bun qr exit handling 2026-03-23 07:41:23 +00:00
Peter Steinberger ff54c02b7d test: narrow live transcript scaffolding strip 2026-03-23 07:41:18 +00:00
Peter Steinberger fe5819887b
refactor(gateway): centralize discovery target handling 2026-03-23 00:38:31 -07:00
Peter Steinberger 5f05c92922
test: harden no-isolate reply teardown 2026-03-23 00:37:32 -07:00
Peter Steinberger 93880717f1
fix(media): harden secondary local path seams 2026-03-23 00:29:46 -07:00
Peter Steinberger 4fd7feb0fd
fix(media): block remote-host file URLs in loaders 2026-03-23 00:29:46 -07:00
Peter Steinberger abbd1b6b8a
feat: add slash plugin installs 2026-03-23 00:29:20 -07:00
Peter Steinberger deecf68b59
fix(gateway): fail closed on unresolved discovery endpoints 2026-03-23 00:27:37 -07:00
Vincent Koc 83e715cdaa fix(plugin-sdk): normalize hashed diagnostic event exports 2026-03-23 00:24:47 -07:00
Vincent Koc b23e9c577d fix(plugin-sdk): resolve hashed diagnostic events chunks 2026-03-23 00:18:19 -07:00
Peter Steinberger 04c69ea3a0
refactor: reuse canonical setup bootstrap profile 2026-03-23 00:15:55 -07:00
Peter Steinberger 6686f1cb2c
refactor: centralize bootstrap profile handling 2026-03-23 00:15:55 -07:00
scoootscooob 43557668d2 Infra: support shell carrier allow-always approvals 2026-03-23 00:14:58 -07:00
Peter Steinberger fe3663a9fe
refactor: remove embedded runner cwd mutation 2026-03-23 00:11:55 -07:00
Peter Steinberger 4a26f10f68
docs: sync minimax m2.7 references 2026-03-23 00:02:35 -07:00
Peter Steinberger 80cd8cd6be
refactor: unify minimax model and failover live policies 2026-03-23 00:02:35 -07:00
Peter Steinberger a600c72ed7
fix: bind bootstrap setup codes to node profile 2026-03-22 23:57:15 -07:00
scoootscooob 4580d585ff Gateway: resolve fallback plugin context lazily 2026-03-22 23:52:21 -07:00
Peter Steinberger 47186c50a2 fix(ci): restore stale guardrails and baselines 2026-03-23 06:50:23 +00:00
Peter Steinberger 202b588db5
fix: harden plugin docker e2e 2026-03-22 23:42:34 -07:00
Peter Steinberger d2a1b24b83 test: honor env auth in gateway live probes 2026-03-23 06:42:09 +00:00
Peter Steinberger 37c2166f52
test: finish base vitest thread fixture fixes 2026-03-22 23:37:31 -07:00
Peter Steinberger 3fac0d11fa
test: fix base vitest thread regressions 2026-03-22 23:37:31 -07:00
Peter Steinberger c42cb1ca66
refactor: audit synology dangerous name matching 2026-03-22 23:32:22 -07:00
Peter Steinberger 677a821a2f
refactor: centralize synology dangerous name matching 2026-03-22 23:32:21 -07:00
Peter Steinberger cef7d14861
refactor(exec): rename wrapper plans for trust semantics 2026-03-22 23:18:54 -07:00
Peter Steinberger 0b40ec38ab
refactor(exec): share wrapper trust planning 2026-03-22 23:18:54 -07:00
Peter Steinberger 6ba5595004
refactor(exec): make dispatch wrapper semantics spec-driven 2026-03-22 23:18:54 -07:00
Peter Steinberger c041f8587b
refactor(exec): split wrapper resolution modules 2026-03-22 23:18:54 -07:00
Peter Steinberger 55ad5d7bd7
fix(security): harden explicit-proxy SSRF pinning 2026-03-22 23:05:42 -07:00
Peter Steinberger f52eb934d6
fix(security): unify dispatch wrapper approval hardening 2026-03-22 23:01:49 -07:00
Peter Steinberger 72e58ca260
test(models): refresh example model fixtures 2026-03-22 23:00:18 -07:00
Peter Steinberger 4d50084c6e
fix(exec): escape invisible approval filler chars 2026-03-22 22:52:14 -07:00
Peter Steinberger c036e4d176
fix: restrict remote marketplace plugin sources 2026-03-22 22:47:08 -07:00
Peter Steinberger 09faed6bd8
fix(gateway): gate internal command persistence mutations 2026-03-22 22:46:49 -07:00
Peter Steinberger 81445a9010
fix(media): bound remote error-body snippet reads 2026-03-22 22:43:42 -07:00
Vincent Koc fd5555d5be fix(runtime): make dist-runtime staging idempotent 2026-03-22 22:41:27 -07:00
Peter Steinberger a55f371cc5 fix(ci): skip docs-only preflight pnpm audit 2026-03-23 05:29:27 +00:00
Vincent Koc be3a2e2eb6 fix(plugin-sdk): fall back to src root alias files 2026-03-22 22:26:18 -07:00
Peter Steinberger 39409b6a6d
fix(security): unwrap time dispatch wrappers 2026-03-22 22:25:57 -07:00
Peter Steinberger af9de86286 perf: trim vitest hot imports and refresh manifests 2026-03-23 05:25:05 +00:00
Peter Steinberger 7fcbf383d8
fix(ci): write dist build stamp after builds 2026-03-22 22:23:25 -07:00
Peter Steinberger ea579ef858
fix(gateway): preserve async hook ingress provenance 2026-03-22 22:21:49 -07:00
Peter Steinberger c5a941a506
refactor!: remove moltbot state-dir migration fallback 2026-03-22 22:19:35 -07:00
Peter Steinberger 6b9915a106
refactor!: drop legacy CLAWDBOT env compatibility 2026-03-22 22:13:39 -07:00
oliviareid-svg 5ff60cc39f
fix(build): add stable memory-cli dist entry (#51759)
Co-authored-by: oliviareid-svg <269669958+oliviareid-svg@users.noreply.github.com>
Co-authored-by: Frank <vibespecs@gmail.com>
2026-03-23 13:11:06 +08:00
Rick_Xu 2fe1ff8ea8
Usage: include reset and deleted session archives (#43215)
Merged via squash.

Prepared head SHA: 49ed6c2fa3
Co-authored-by: rcrick <23069968+rcrick@users.noreply.github.com>
Co-authored-by: frankekn <4488090+frankekn@users.noreply.github.com>
Reviewed-by: @frankekn
2026-03-23 13:10:26 +08:00
Peter Steinberger 30ed4342b3
fix(agents): deny local MEDIA paths for MCP results 2026-03-22 22:10:13 -07:00
Vincent Koc d43e26e399 fix(web-search): mark DuckDuckGo experimental 2026-03-22 22:07:53 -07:00
Peter Steinberger 8791aaae2b
refactor: extract gateway install token helpers 2026-03-22 22:05:56 -07:00
Peter Steinberger c15282062f
refactor: split durable service env helpers 2026-03-22 22:05:56 -07:00
Vincent Koc c6ca11e5a5
feat(web-search): add DuckDuckGo bundled plugin (#52629)
* feat(web-search): add DuckDuckGo bundled plugin

* chore(changelog): restore main changelog

* fix(web-search): harden DuckDuckGo challenge detection
2026-03-22 22:05:33 -07:00
Peter Steinberger dc6c22b812 fix: narrow exec exit failure kind typing 2026-03-23 04:58:46 +00:00
Kevin ONeill dd860e76aa fix: normalize env var keys and isolate tests from real .env
- Apply normalizeEnvVarKey({ portable: true }) before security
  filtering, matching the established pattern in env-vars.ts.
  Rejects non-portable key names (spaces, special chars) that
  would produce invalid plist/systemd syntax.

- Isolate existing tests from the developer's real ~/.openclaw/.env
  by providing a temp HOME directory, preventing flaky failures
  when the test machine has a populated .env file.
2026-03-22 21:55:58 -07:00
Kevin ONeill 77ec7b4adf fix: include .env file vars in gateway service environment on install
When building the gateway install plan, read and parse
~/.openclaw/.env (or $OPENCLAW_STATE_DIR/.env) and merge those
key-value pairs into the service environment at the lowest
priority — below config env vars, auth-profile refs, and the
core service environment (HOME, PATH, OPENCLAW_*).

This ensures that user-defined secrets stored in .env (e.g.
BRAVE_API_KEY, OPENROUTER_API_KEY, DISCORD_BOT_TOKEN) are
embedded in the LaunchAgent plist (macOS), systemd unit (Linux),
and Scheduled Task (Windows) at install time, rather than
relying solely on the gateway process loading them via
dotenv.config() at startup.

Previously, on macOS the LaunchAgent plist never included .env
vars, which meant:
- launchctl print did not show user secrets (hard to debug)
- Child processes spawned before dotenv loaded had no access
- If the same key existed in both .env and the plist, the stale
  plist value won via dotenv override:false semantics

Dangerous host env vars (NODE_OPTIONS, LD_PRELOAD, etc.) are
filtered using the same security policy applied to config env
vars.

Fixes #37101
Relates to #22663
2026-03-22 21:55:58 -07:00
Vincent Koc 3afb6a2b95 fix(exec): accept runtime failure kind in formatter 2026-03-22 21:54:02 -07:00
Peter Steinberger 97e4f37171 fix: keep status --json stdout clean (#52449) (thanks @cgdusek) 2026-03-22 21:51:08 -07:00
Charles Dusek 03c4bacbfb fix(cli): route deferred plugin logs to stderr in status --json 2026-03-22 21:51:08 -07:00
Charles Dusek 0e1da034c2 fix(cli): route plugin logs to stderr during --json output 2026-03-22 21:51:08 -07:00
Peter Steinberger e001e8f2f8 test: isolate exec foreground failure coverage 2026-03-23 04:47:12 +00:00
Peter Steinberger 8e568142f6 refactor: extract exec outcome and tool result helpers 2026-03-23 04:47:12 +00:00
Vincent Koc 5f746422aa fix(plugin-sdk): fast-path root diagnostic subscriptions 2026-03-22 21:07:11 -07:00
Vincent Koc faae3e155d fix(whatsapp): remove outbound runtime cycle 2026-03-22 21:04:14 -07:00
Vincent Koc 1042b59471
feat(web-search): add bundled Exa plugin (#52617) 2026-03-22 20:57:33 -07:00
Vincent Koc f69062c16e fix(plugin-sdk): export line runtime subpath 2026-03-22 20:39:16 -07:00
Vincent Koc 8b667cbe44 fix(build): repair stale plugin sdk surfaces 2026-03-22 20:36:28 -07:00
Vincent Koc 1354f37c88
fix(plugins): route keyed queue imports through core (#52608) 2026-03-22 20:35:28 -07:00
Vincent Koc 04cd389ef8 fix(ci): repair voice-call typing and provider contracts 2026-03-22 20:17:01 -07:00
Vincent Koc d949dffc6e fix(ci): repair tts and matrix refactor fallout 2026-03-22 20:12:01 -07:00
Vincent Koc 59105fd614 fix(ci): restore plugin manifests and boundary tests 2026-03-22 20:01:25 -07:00
Vincent Koc ac0fd26e16 fix(ci): resync generated baselines and line runtime seam 2026-03-22 19:53:26 -07:00
Vincent Koc 32fdd21c80 fix(acp): preserve hidden thought replay on session load 2026-03-22 19:48:19 -07:00
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
Vincent Koc 645c9210b3 style(format): fix provider test formatting drift 2026-03-22 18:25:55 -07:00
Vincent Koc 0a329b2c9f Revert "style(format): fix check drift in provider tests"
This reverts commit 2619f5fe55.
2026-03-22 18:25:07 -07:00
Vincent Koc 2619f5fe55 style(format): fix check drift in provider tests 2026-03-22 18:24:40 -07:00
Vincent Koc 125e778fe6 perf(reply): split payload dedupe helpers 2026-03-22 18:22:56 -07:00
Vincent Koc 6fde263046 fix(ci): refresh bundled plugin metadata 2026-03-22 18:19:49 -07:00
Vincent Koc a753ee064d fix(agents): centralize moonshot compat and xai fast remaps 2026-03-22 18:17:02 -07:00
Vincent Koc cbf9cd0acb fix(ci): repair main checks 2026-03-22 18:13:14 -07:00
Vincent Koc b5b193d5ca fix(moonshot): refresh kimi k2 catalog 2026-03-22 18:00:51 -07:00
Vincent Koc 3dcc802fe5 refactor(media): move deepgram and groq providers into plugins 2026-03-22 17:57:31 -07:00
Vincent Koc 0f54ca20aa refactor(image-generation): move provider builders into plugins 2026-03-22 17:57:31 -07:00
Josh Lehman 3fe96c7b9e
device-pair: align internal command checks 2026-03-22 17:56:33 -07:00
Vincent Koc a61e5d17f0
deps: update fast-xml-parser and markdown-it (#52541)
* style: format test files

* deps: bump fast-xml-parser override
2026-03-22 17:55:47 -07:00
Vincent Koc dc2013aae5 perf(reply): lazy-load followup context lookup 2026-03-22 17:55:14 -07:00
Vincent Koc e3c7a05cb5 fix(cli): remove duplicate test runtime keys 2026-03-22 17:52:05 -07:00
Vincent Koc de6bf58e79 refactor(tts): move speech providers into plugins 2026-03-22 17:48:59 -07:00
Vincent Koc 1d08ad4bac refactor(tts): remove legacy core speech builders 2026-03-22 17:48:09 -07:00
Peter Steinberger 100d9a7a23 refactor: share boundary open and gateway test helpers 2026-03-23 00:37:05 +00:00
Peter Steinberger 976eefe373
test: align cli runtime mocks with output runtime 2026-03-22 17:32:20 -07:00
Peter Steinberger 7bd12f4b37 test: fix rebased directory runtime mock (#52428) (thanks @karanuppal) 2026-03-22 16:56:19 -07:00
Peter Steinberger aaa6068c08 test: stabilize json runtime captures (#52428) (thanks @karanuppal) 2026-03-22 16:56:19 -07:00
Peter Steinberger a2999c6cfb test: normalize rebase fallout (#52428) (thanks @karanuppal) 2026-03-22 16:56:19 -07:00
Peter Steinberger a5ace56a19 test: align rebased expectations and typecheck (#52428) (thanks @karanuppal) 2026-03-22 16:56:19 -07:00
Peter Steinberger 38ee17145b fix: restore rebase regression coverage (#52428) (thanks @karanuppal) 2026-03-22 16:56:19 -07:00
Peter Steinberger b00306a75b test: fix post-rebase test drift (#52428) 2026-03-22 16:56:19 -07:00
Peter Steinberger 797f3cc377 fix: stabilize stale buffer sweep landing (#52428) (thanks @karanuppal) 2026-03-22 16:56:19 -07:00
Peter Steinberger f76e653776 fix: guard stale chat buffer sweep (#52428) (thanks @karanuppal) 2026-03-22 16:56:19 -07:00
Karan Uppal 550deb8c18 fix: sweep stale chatRunState buffers for stuck runs
emitChatFinal frees buffers on clean run completion, and the
maintenance timer sweeps abortedRuns after ABORTED_RUN_TTL_MS. But
runs that get stuck (e.g. LLM timeout without triggering clean
lifecycle end) are never aborted and their string buffers persist
indefinitely. This is the direct trigger for the StringAdd_CheckNone
OOM crash reported in the issue.

Add a stale buffer sweep in the maintenance timer that cleans up
buffers, deltaSentAt, and deltaLastBroadcastLen for any run not
updated within ABORTED_RUN_TTL_MS, regardless of abort status.

Closes #51821
2026-03-22 16:56:19 -07:00
Peter Steinberger 165aeccd24 test: align memory cli json assertions 2026-03-22 23:46:54 +00:00
Peter Steinberger 4e531d382b fix(ci): restore cli runtime mocks and timeout exits 2026-03-22 23:43:58 +00:00
Peter Steinberger 85f8437399 test: fix remaining tsgo issues after payload output refactor 2026-03-22 23:39:07 +00:00
Peter Steinberger ac8e81a5cd refactor: compose account security warning helpers 2026-03-22 23:37:12 +00:00
Peter Steinberger 39faf4725d refactor: share warning collector projections 2026-03-22 23:37:12 +00:00
Peter Steinberger f0ab31366c refactor: share async computed channel status adapters 2026-03-22 23:37:12 +00:00
Peter Steinberger 72bfaf6ee2 refactor: share computed channel status adapters 2026-03-22 23:37:12 +00:00
Peter Steinberger 023394bc0b fix(plugin-sdk): keep testing barrel narrow 2026-03-22 23:30:59 +00:00
Peter Steinberger bca7787f92 style: fix rebased format drift 2026-03-22 23:26:21 +00:00
Peter Steinberger 63130118ba test: fix rebased gateway and binding baselines (#52491) 2026-03-22 23:22:48 +00:00
Peter Steinberger d73852ff21 fix: land plugin discovery missing-entry handling (#52491) (thanks @hclsys) 2026-03-22 23:22:48 +00:00
Peter Steinberger 4ee41cc6f3 refactor(cli): separate json payload output from logging 2026-03-22 23:19:17 +00:00
Peter Steinberger 274af0486a
perf: trim more vitest thread pins 2026-03-22 16:18:26 -07:00
Peter Steinberger 6245b4f3d8 test: import vi in gateway chat server test 2026-03-22 23:17:05 +00:00
HCL 4f11982ae6 fix: emit warn diagnostic for I/O errors, keep silent only for ENOENT
Address Codex P1 + Greptile P2: the previous commit collapsed both
"path" (ENOENT) and "io" (EACCES/EMFILE) into silent null returns.

Now:
- reason="path" (missing file): return null silently — not a security issue
- reason="io" (permission/disk): push warn diagnostic — surface anomaly
  without aborting gateway
- reason="validation" (path escape): push error diagnostic — security violation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: HCL <chenglunhu@gmail.com>
2026-03-22 16:13:54 -07:00
HCL 8701a224f8 fix(plugins): distinguish missing entry file from security violation
resolvePackageEntrySource() treats all openBoundaryFileSync failures
as path-escape security violations. When an extension entry file is
simply missing (ENOENT, reason="path"), the gateway emits "extension
entry escapes package directory" and aborts — crashing in a loop.

Root cause: src/plugins/discovery.ts:478 checks !opened.ok but never
inspects opened.reason. SafeOpenSyncResult already distinguishes
"path" (ENOENT) from "validation" (actual path escape).

Fix: only push the security diagnostic when opened.reason is
"validation". For "path" or "io" failures, return null to skip the
entry silently — a missing file is not a security violation.

Closes #52445

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: HCL <chenglunhu@gmail.com>
2026-03-22 16:13:54 -07:00
Codex 8c7d603f25 fix(gateway): keep status helpers resilient to netif failures 2026-03-22 16:09:43 -07:00
Vincent Koc c0cbc7403b test(env): normalize path expectations on windows 2026-03-22 16:08:49 -07:00
Peter Steinberger ec51ee1af5
test: harden gateway no-isolate coverage 2026-03-22 16:08:22 -07:00
Peter Steinberger 1eba6f830c test: remove stale plugin registry helper 2026-03-22 23:07:32 +00:00
Peter Steinberger d84b3f5d5d
test: fix conversation binding registry stub 2026-03-22 16:02:13 -07:00
Peter Steinberger f8ff2a4f38 test: fix gate after main drift 2026-03-22 23:00:02 +00:00
Vincent Koc 5c8e1275a0 feat(minimax): add missing pi catalog models 2026-03-22 15:55:20 -07:00
Peter Steinberger 1ad47b8fa1 test: harden path resolution test helpers 2026-03-22 22:47:58 +00:00
Peter Steinberger 5a8f77aa6a refactor: adopt chat plugin builder in zalouser 2026-03-22 22:45:06 +00:00
Charles Dusek 81b498b2b6 fix(cli): keep JSON payloads on stdout when logs route to stderr 2026-03-22 15:43:48 -07:00
Charles Dusek 5bba1b45bc fix(cli): bypass patched console.log for JSON payloads in --json mode 2026-03-22 15:43:48 -07:00
Charles Dusek ebb4cc0128 fix(cli): route logs to stderr in --json mode to keep stdout clean 2026-03-22 15:43:48 -07:00
Vincent Koc b93a045a96 docs(agents): update steering semantics 2026-03-22 15:40:56 -07:00
Vincent Koc 6e7855fdf5 feat(xai): support fast mode 2026-03-22 15:40:56 -07:00
Vincent Koc 9c0983618e feat(models): sync pi provider catalogs 2026-03-22 15:40:56 -07:00
Peter Steinberger 77cbbae81b test: fix ci drift after main rebase 2026-03-22 22:38:27 +00:00
Roger Deng c3f1d43a10 test: align chrome launch args fixture with current browser profile type 2026-03-22 15:37:19 -07:00
Roger Deng 72d775e069 fix: stop forcing an extra blank tab on browser launch 2026-03-22 15:37:19 -07:00
Peter Steinberger 58c3f8673a test: fix full gate after runtime lazy-load 2026-03-22 22:33:07 +00:00
Peter Steinberger 6df6a691fc perf: lazy-load plugin runtime heavy surfaces 2026-03-22 22:33:07 +00:00
scoootscooob d9de38e0f8 Reply: tighten media dedupe and OpenAI ratio claims 2026-03-22 15:26:45 -07:00
Peter Steinberger 24b9baebab
fix: preserve runtime path env in secrets snapshots 2026-03-22 15:25:58 -07:00
Peter Steinberger 47e8ffc2e9 test: repair current main gate regressions 2026-03-22 22:22:46 +00:00