Commit Graph

23229 Commits

Author SHA1 Message Date
Peter Steinberger 579334f9f8 fix: preserve agent provider params on config writes 2026-04-29 13:02:24 +01:00
Masato Hoshino 016f5ae862 test(plugins): cover dead-PID stale runtime-deps lock removal
Adds focused regression coverage for dead owner PID runtime-deps install locks so stale lock recovery remains PID-first and does not wait on age when the recorded owner process is gone.

Co-authored-by: masatohoshino <g515hoshino@gmail.com>
2026-04-29 12:51:14 +01:00
Peter Steinberger 84d8d5d5e7 test(gateway): name sessions helper for deadcode guard 2026-04-29 12:47:25 +01:00
Peter Steinberger 027337df79 test: fix github copilot discovery contract mock 2026-04-29 12:41:24 +01:00
Peter Steinberger 0207f9ceec refactor: split gateway sessions tests 2026-04-29 12:40:50 +01:00
Peter Steinberger de0f54b54a test(security): isolate windows acl user fallback 2026-04-29 12:36:28 +01:00
Peter Steinberger d8b9ace39c fix(ci): repair github copilot setup types 2026-04-29 12:31:17 +01:00
Peter Steinberger f79553bef6 fix(auth): scope external CLI auth status overlays (#74156)
* fix(auth): scope external CLI auth status overlays

* fix: pass external auth config to overlays

* fix(auth): keep no-prompt CLI reads file-only

* docs: update clawsweeper app wording
2026-04-29 12:23:50 +01:00
Peter Steinberger 8f6c72823e fix(ci): repair main typecheck after merges 2026-04-29 12:22:42 +01:00
Max Caldar 4d73cd52dc fix(plugins): mirror core root-package deps used by core dist code (#74213)
Extend MIRRORED_CORE_RUNTIME_DEP_NAMES from ["semver", "tslog"] to
also include @agentclientprotocol/sdk, @lydell/node-pty, croner,
dotenv, jiti, json5, jszip, markdown-it, tar, and web-push.

These are all declared as direct dependencies in the openclaw root
package.json and imported by core source code (src/acp/*, src/cron/*,
src/config/*, src/infra/{archive,backup,dotenv,push-web}.ts,
src/markdown/ir.ts, src/plugin-sdk/root-alias.cjs,
src/plugins/jiti-loader-cache.ts, src/process/supervisor/adapters/pty.ts,
etc), but the existing collectMirroredPackageRuntimeDeps allowlist only
covered semver and tslog.

The dynamic collectRootDistMirroredRuntimeDeps scan does pick up
imports that have an extension package.json owner (for example
memory-core declares chokidar, matrix declares jiti and markdown-it).
For deps with no extension owner, or for setups where the owning
extension is not enabled, those imports never make it into the
runtime-deps mirror and Node fails to resolve them at runtime, e.g.:

    Cannot find package 'chokidar' imported from
    .../plugin-runtime-deps/openclaw-<ver>/dist/qmd-manager-...js

Also add a static drift guard test that walks src/ for value imports of
root-package runtime deps and fails when one is neither in
MIRRORED_CORE_RUNTIME_DEP_NAMES nor declared by any extension's
package.json (with an explicit allowlist for known-transitive or
build/type-only imports such as chalk, ipaddr.js, file-type,
proxy-agent, typescript, qrcode). The guard caught @lydell/node-pty
during this change.

Refs #74199.
2026-04-29 07:19:39 -04:00
Peter Steinberger dc9f1b8525 fix(telegram): honor managed proxy env 2026-04-29 12:18:49 +01:00
Ayaan Zaidi 1f9fafb288 fix(configure): use manifest model catalogs in picker 2026-04-29 16:48:18 +05:30
Ayaan Zaidi 22c42b6b30 fix(github-copilot): reuse existing auth profiles 2026-04-29 16:48:18 +05:30
Roger Deng d4e52f4542 fix(tui): resync streaming watchdog after reconnect (#74224)
* fix(tui): resync streaming watchdog after reconnect

* fix(tui): keep reconnect history fallback armed

* fix(tui): tighten reconnect watchdog recovery
2026-04-29 07:17:18 -04:00
Logan Ye d2db67e693 fix(cron): catch croner parse errors in cron.add and cron.update handlers (#74193)
* fix(cron): catch croner parse errors in cron.add and cron.update handlers

* fix(cron): narrow catch to TypeError/RangeError only; add braces for linter
2026-04-29 07:16:37 -04:00
Logan Ye ef7c528c8a fix(agents): recognize flat JSON billing payloads and snake_case error codes (#74188)
* fix(agents): recognize flat JSON billing payloads and snake_case error codes

Two independent fixes for billing error detection:

1. isErrorPayloadObject/parseApiErrorInfo now recognize flat JSON like
   {"error":"string_code","message":"..."} where error is a string code
   at the top level, not just nested {"error":{"type":"...","message":"..."}}
   envelopes.

2. isBillingErrorMessage now matches "insufficient_balance" (underscore)
   and "Insufficient MBT balance" (one word between insufficient/balance)
   via two new patterns in the billing pattern list.

Together these prevent raw JSON from leaking to user-facing chat when
providers return 402-style flat payloads.

Fixes #74079

* fix(agents): remove redundant billing pattern and fix misleading regex comment
2026-04-29 07:15:45 -04:00
Peter Steinberger 1f8ccf2d2a refactor(gateway): reuse chat state registries 2026-04-29 12:14:59 +01:00
Peter Steinberger 34ec184dcb refactor: reuse shared dedupe helpers 2026-04-29 12:14:59 +01:00
Peter Steinberger 81ad827380 refactor(plugin-sdk): extract shared dedupe helpers 2026-04-29 12:14:59 +01:00
bitloi dce2513db2 fix(agents): preserve CLI wake-up session metadata (#74171)
* Fix CLI wake-up resume metadata

* Rerun CI

* ci: re-trigger parity gate
2026-04-29 07:14:48 -04:00
Peter Steinberger 1d494af03a refactor: simplify gateway and e2e test helpers 2026-04-29 12:14:19 +01:00
Vincent Koc 6d7a77dcf9 fix(tui): recover stale streaming status after unbound final (#73749)
* fix(tui): clear stale streaming after unbound final events

* fix(clownfish): address review for ghcrawl-156749-autonomous-smoke (1)

* fix(tui): address stale streaming review
2026-04-29 04:12:25 -07:00
Peter Steinberger fce62c6129 fix(ci): classify gateway agent helper as test-only 2026-04-29 11:59:44 +01:00
Peter Steinberger bdcd543ed7 fix(gateway): bypass proxies for localhost control plane 2026-04-29 11:59:33 +01:00
Peter Steinberger e6cd90e3fd fix(agents): keep OAuth auth read-through 2026-04-29 11:54:28 +01:00
Peter Steinberger 4f73baf7d7 refactor(test): split e2e fixture helpers 2026-04-29 11:49:45 +01:00
Deepak Jain 0c9f84451a feat(config): add reasoningDefault to agents.defaults
Add reasoningDefault support under agents.defaults and preserve the existing per-agent/session/inline override order.

Includes authorization gating for configured reasoning state, /status coverage, config schema/docs baseline updates, and regression tests for the reply and status paths. Also carries the related cron startup-run preservation fix and CI test stabilization needed for this PR branch.

Validated locally with pnpm check:changed, the focused Vitest bundle for touched gateway/cron/auto-reply/plugin-sdk/tooling tests, pnpm config:docs:check, and git diff --check. GitHub checks are green on the merged head; Greptile latest visible review is 4/5 with no P0/P1 findings.
2026-04-29 05:47:18 -05:00
Peter Steinberger 7be65cd798 test: cover session-scoped model overrides (#74265) 2026-04-29 11:46:53 +01:00
Peter Steinberger 6b4873d0c1 ci: split plugin contract shards 2026-04-29 11:44:32 +01:00
Peter Steinberger 69e6f65237 test: avoid CI lint false positive in ACP config mock 2026-04-29 11:35:34 +01:00
Peter Steinberger 38fdb42069 chore: remove unused internal entrypoints 2026-04-29 11:35:34 +01:00
Peter Steinberger 93d5cd1015 fix: honor configured xhigh thinking compat (#74273)
* fix: honor configured xhigh thinking compat

* test: update agent command model selection mock
2026-04-29 11:35:03 +01:00
Peter Steinberger 99950c7f12 fix(doctor): use lightweight gateway liveness check 2026-04-29 11:32:02 +01:00
Peter Steinberger a1197b9075 test: remove unused ACP mock parameter 2026-04-29 11:24:47 +01:00
Peter Steinberger 20ed597495 fix: restore verbose command and ACP cleanup controls 2026-04-29 11:20:11 +01:00
Vincent Koc ae57eb635c fix(gateway): reduce session-store clone memory growth
## Summary
- Addresses the remaining Gateway RSS/session-accumulation path tracked by #54155.
- Narrows the fix to the structuredClone/session-store cache memory growth described in #45438.
- Preserves prior report context from #57699, #62717, #66886, #69977, and #70717 as validation evidence.

## Validation
- pnpm -s vitest run src/config/sessions/store.pruning.test.ts src/config/sessions/store.pruning.integration.test.ts src/gateway/sessions-resolve-store.test.ts
- pnpm check:changed

## Credit
Thanks @the-lobsternaut for #54155 and @markus-lassfolk plus the #45438 commenters for isolating the structuredClone/native-memory behavior.

ProjectClownfish replacement details:
- Cluster: ghcrawl-156648-autonomous-smoke
- Source PRs: none
- Credit: Credit #54155 reporter @the-lobsternaut for the multi-day Gateway RSS/session-accumulation report.; Credit #45438 reporter @markus-lassfolk and commenters for isolating the structuredClone/session-store native-memory path.; Preserve prior closed-report context from #57699, #62717, #66886, #69977, and #70717 in the PR body as reproduction evidence, not as new close targets.
- Validation: pnpm -s vitest run src/config/sessions/store.pruning.test.ts src/config/sessions/store.pruning.integration.test.ts src/gateway/sessions-resolve-store.test.ts; pnpm check:changed
2026-04-29 03:19:13 -07:00
Vincent Koc 0f6fea813c test(gateway): allow cold plugin route dispatch 2026-04-29 03:17:41 -07:00
Peter Steinberger 923837accd test: wait for deferred gateway agent dispatch 2026-04-29 11:13:30 +01:00
Peter Steinberger e1fd27fb24 feat(messages): add global visible replies mode 2026-04-29 11:06:39 +01:00
Super Zheng 1c45592e62 perf(plugins): add O(1) fast-path for empty plugin loads 2026-04-29 03:04:21 -07:00
Peter Steinberger 48683a7f71 ci: split auto-reply reply routing shard 2026-04-29 11:03:55 +01:00
Super Zheng d33c3f7da6 perf(catalog): cache manifest built-in model suppression resolver (#74236)
* perf(catalog): cache manifest built-in model suppression resolver

* fix(catalog): address PR review comments for manifest suppression resolver

* fix(catalog): preserve cached suppression semantics

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-29 02:52:26 -07:00
Vincent Koc 412434a450 test(plugins): extend external install contract coverage 2026-04-29 02:48:58 -07:00
Logan Ye 3af661384c fix(hooks): deduplicate boot-md startup tasks by workspaceDir (#74194) 2026-04-29 02:48:31 -07:00
Peter Steinberger 146c0a7e1d test(gateway): wait for deferred agent session event 2026-04-29 10:45:09 +01:00
Vincent Koc 4b99724a9c test(plugins): isolate config alias scan regression 2026-04-29 02:29:03 -07:00
Vincent Koc a3519e362f fix(plugins): reuse config alias scans 2026-04-29 02:29:02 -07:00
Vincent Koc 985000026e fix(gateway): defer agent dispatch after accept 2026-04-29 02:29:02 -07:00
Vincent Koc 1d61862adb fix(gateway): yield after agent accepted ack 2026-04-29 02:29:02 -07:00
Vincent Koc e4b09e1bf3 fix(mcp): serialize raw plugin tool results 2026-04-29 02:29:00 -07:00