Commit Graph

3032 Commits

Author SHA1 Message Date
Peter Steinberger
10ce409d30 fix: resolve post-rebase agent runtime drift 2026-05-27 18:17:33 +01:00
Peter Steinberger
555f4b6c32 refactor: remove legacy provider compat paths 2026-05-27 18:15:26 +01:00
Peter Steinberger
22bad620fc refactor: remove pi runtime internals
Rename remaining Pi-shaped agent surfaces to OpenClaw agent runtime names, delete obsolete Pi docs and package graph checks, and add the third-party notice for incorporated code.
2026-05-27 18:15:26 +01:00
Peter Steinberger
5f7e21e26a fix(cli): reject malformed timeout values 2026-05-27 13:06:17 -04:00
Peter Steinberger
de5971eedc fix(onboard): preserve rerun config migrations
Fix non-interactive and wizard onboarding reruns so existing agent lists and bindings are preserved unless the user explicitly resets config.

Isolate legacy `plugins.installs` migration into its own write so the config size-drop allowance cannot mask unrelated config loss, while preserving new or repaired install records for the final plugin-index commit. Also keep shrinkwrap generation pinned to pnpm-locked transitive patch versions only when the dependency edge still allows that version, and isolate the tooling Vitest shard that mutates process state.

Fixes #84692.
Replaces #84748.

Co-authored-by: yetval <yetvald@gmail.com>
2026-05-27 18:05:07 +01:00
Peter Steinberger
e61f175203 fix(cli): reject malformed gateway timeouts 2026-05-27 08:57:03 -04:00
Bob
4d89e00c50 feat(embeddings): add OpenAI-compatible core provider (#85269)
Merged via squash.

Prepared head SHA: dc9a5d5397
Co-authored-by: dutifulbob <261991368+dutifulbob@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
2026-05-27 14:37:17 +02:00
Mason Huang
75221e0550 fix(agents): separate heartbeat runtime template (#85416)
Summary:
- The PR moves the runtime `HEARTBEAT.md` bootstrap template into `src/agents/templates`, keeps docs templates ... or other workspace files, adds a legacy heartbeat-template doctor repair, and updates package guards/tests.
- PR surface: Source +281, Tests +283, Docs +11, Config +1, Other 0. Total +576 across 15 files.
- Reproducibility: yes. from source inspection: current main loads `HEARTBEAT.md` from the docs template, and  ... pty heartbeat file non-empty to the runtime. I did not run a live heartbeat repro in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(doctor): recognize heartbeat docs boilerplate
- PR branch already contained follow-up commit before automerge: fix(agents): update heartbeat workspace test
- PR branch already contained follow-up commit before automerge: fix(doctor): tighten heartbeat template repair

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

Prepared head SHA: e34e85864c
Review: https://github.com/openclaw/openclaw/pull/85416#issuecomment-4519851630

Co-authored-by: Mason Huang <masonxhuang@tencent.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: hxy91819
Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
2026-05-27 12:30:22 +00:00
Peter Steinberger
5fdaf6b49b fix(cli): validate message numeric options 2026-05-27 08:05:03 -04:00
Peter Steinberger
513a223c15 fix(cli): validate directory limits before resolution 2026-05-27 07:35:02 -04:00
Peter Steinberger
0889106cb2 fix(cli): reject loose webhook and directory numeric options 2026-05-27 07:35:02 -04:00
Vincent Koc
c18370574e feat(pixverse): add video generation provider 2026-05-27 12:41:10 +02:00
Peter Steinberger
6b391efa4e fix(cli): reject loose model and gateway numeric options 2026-05-27 04:27:02 -04:00
Yoshikazu Terashi
3104f36329 fix(cron): surface classified run failure causes
Surface classified cron failure causes without changing raw cron JSON error text.

- add additive CLI `cause` output for finished run entries with `errorReason`
- persist/backfill full `FailoverReason` values on cron run-log entries
- thread provider context through cron finalization so provider-specific failure causes stay accurate
- extend protocol/Swift models and regression coverage for CLI JSON, run-log parsing/search, alerts, and protocol conformance

Verification:
- `pnpm lint --threads=8`
- `pnpm protocol:check`
- `pnpm exec oxfmt --check src/cli/cron-cli/shared.ts src/cli/cron-cli/shared.cause-display.test.ts src/cron/run-log.ts src/cron/run-log.error-reason.test.ts src/cron/cron-protocol-conformance.test.ts src/cron/service.failure-alert.test.ts src/cron/service/timer.ts src/cron/service/ops.ts src/gateway/protocol/schema/cron.ts scripts/protocol-gen-swift.ts`
- `git diff --check`
- AWS Crabbox `cbx_8a6a65ab83b0` / `run_42b73a4a9750`: 4 files, 20 tests passed
- autoreview clean, no accepted/actionable findings
- GitHub CI/CodeQL/OpenGrep/Workflow Sanity green/skipped/neutral on `aa29b087b2587d0aed3d409de5e7a2c706c32cdf`

Co-authored-by: Yoshikazu Terashi <yterashi@peperon-works.jp>
2026-05-27 09:03:17 +01:00
Peter Steinberger
c95d348bb5 fix(cli): reject loose numeric options 2026-05-27 03:52:40 -04:00
Peter Steinberger
d2d5010aec fix: reject partial numeric CLI options 2026-05-27 03:34:44 -04:00
Peter Steinberger
482018e536 fix: mark plugin command groups in root help 2026-05-27 08:22:01 +01:00
Peter Steinberger
2bbef6caac fix: route nested root help targets 2026-05-27 08:22:01 +01:00
Peter Steinberger
5f6293a902 fix: route root help targets to command help 2026-05-27 08:22:01 +01:00
Peter Steinberger
b31c9e9810 fix: preserve root options in generated help 2026-05-27 08:22:01 +01:00
Peter Steinberger
ec377dd079 fix: support plugin generated help targets 2026-05-27 08:22:01 +01:00
Peter Steinberger
1de98487cc fix: route generated help targets to subcommands 2026-05-27 08:22:01 +01:00
Peter Steinberger
9015d0c582 fix: normalize generated help self-help 2026-05-27 08:22:01 +01:00
Peter Steinberger
f407e4e498 fix: validate gateway call timeouts 2026-05-27 08:22:01 +01:00
Peter Steinberger
84b11237f2 fix: let skills JSON output flush naturally 2026-05-27 08:22:01 +01:00
Super Zheng
6790b0f792 perf(secrets): propagate snapshots and eliminate esm side-effects in auth env vars (#86439)
* perf(secrets): propagate snapshots and eliminate esm side-effects in auth env vars

* perf(secrets): reuse provider auth lookup maps

* test(auth): update provider env var mocks

* test(auth): cover rebased provider env mocks

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-27 08:19:07 +01:00
Peter Steinberger
145b57c734 perf(gateway): defer skipped-channel sidecars 2026-05-27 04:20:26 +01:00
Val Alexander
b4f69286fd fix(gateway): stop chat timeout fallback cascade
Fix gateway/chat timeout abort propagation so timed-out runs do not cascade through fallbacks. Preserve provider timeout errors when the gateway abort signal did not fire, and keep timeout stop reasons in async gateway agent results. Includes regression coverage for chat, follow-up, memory flush, fallback classification, and gateway agent timeout results. Fixes #83962.
2026-05-27 03:54:44 +01:00
Peter Steinberger
0126aba57f test: speed up capability cli tests 2026-05-27 03:48:59 +01:00
Peter Steinberger
657f9d1422 test: speed up command secret gateway tests 2026-05-27 03:43:52 +01:00
Peter Steinberger
90653775a9 test: speed up update cli tests 2026-05-27 03:16:21 +01:00
fuller-stack-dev
669bfdd9b0 test: fix bundled install mock typing 2026-05-26 23:51:53 +01:00
fuller-stack-dev
771675e826 fix: keep bundled OpenClaw plugins image-owned 2026-05-26 23:51:53 +01:00
Thesaranshn8n
6729dea36f fix(codex): share native hook relay registry (#73950)
Co-authored-by: Sar Jeeves <sar-jeeves@example.com>
Co-authored-by: Kaspre <kaspre@gmail.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
2026-05-26 15:02:03 -07:00
Andy Ye
f3e61580bd Fix status JSON plugin scan (#87001)
* fix status json plugin scan

* fix status json metadata imports

* fix channel metadata repair fallback

* fix runtime channel id normalization fallback

* fix status json env channel detection

Co-authored-by: Peter Steinberger <steipete@gmail.com>

* fix signed thinking legacy tool repair

* fix: preserve first signed replay turn

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-26 22:24:25 +01:00
Peter Steinberger
5e8f4981a5 fix(cli): add Windows stack-size respawn (#87031)
Add a Windows-only CLI respawn with `--stack-size=8192` so stack-heavy startup paths can run with a larger V8 stack.

The respawn path normalizes duplicated Windows `node.exe` launcher argv before handoff, preserves real non-launcher argv values containing `node.exe`, and treats both `--stack-size` and `--stack_size` as already configured.

Fixes #62055.
Supersedes #86307.
Thanks @giodl73-repo for the original fix.

Verification:
- `node --v8-options | rg -n "stack-size|stack_size"`
- `node --stack-size=8192 -e "console.log('ok')"`
- `node --stack_size=8192 -e "console.log('ok')"`
- `pnpm format:check src/cli/windows-argv.ts src/cli/windows-argv.test.ts src/entry.respawn.ts src/entry.respawn.test.ts`
- `node scripts/run-vitest.mjs src/entry.respawn.test.ts src/cli/windows-argv.test.ts`
- `.agents/skills/autoreview/scripts/autoreview --mode local`
- `pnpm check:changed` via Testbox `tbx_01ksjzf06pcgx29qrctjrn4rhr`, GitHub Actions run https://github.com/openclaw/openclaw/actions/runs/26473172664

Co-authored-by: Gio Della-Libera <giodl73@gmail.com>
2026-05-26 21:31:58 +01:00
Vincent Koc
3127808473 fix(cli): default logs to local timestamps (#85387) 2026-05-26 21:14:47 +01:00
Peter Steinberger
abb85ccc86 fix(cli): validate timeout and banner TTY state
Fixes two CLI edge cases found by clawpatch.

- `emitCliBanner` now honors injected TTY state before writing to stdout.
- Nodes RPC timeout handling now rejects malformed `--timeout` values with the existing timeout parser instead of forwarding `NaN` into gateway transport calls.

Proof:
- `node scripts/run-vitest.mjs src/cli/banner.test.ts src/cli/nodes-cli/register.invoke.approval-transport-timeout.test.ts`
- `pnpm exec oxfmt --check --threads=1 src/cli/banner.ts src/cli/banner.test.ts src/cli/nodes-cli/rpc.runtime.ts src/cli/nodes-cli/register.invoke.approval-transport-timeout.test.ts`
- `.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main`
- Real CLI proof: `pnpm openclaw nodes list --timeout nope --json` exits 1 with `Invalid --timeout`.
- Runtime banner proof: injected `isTty:false` with `stdout.isTTY=true` produced `writes=0`, `emitted=false`.
2026-05-26 21:08:11 +01:00
Peter Steinberger
174cd49f78 fix: tighten parser edge cases (#86999)
* fix: tighten parser edge cases

* fix: dedupe lsof listener records

* fix: recognize ipv6 wildcard model URLs
2026-05-26 20:40:13 +01:00
Peter Steinberger
7e6837bc07 fix: respect root options in startup guards (#86927) 2026-05-26 18:08:51 +01:00
Peter Steinberger
0ec29289c6 fix: tighten CLI utility failure handling (#86918)
* fix: tighten cli utility failure handling

* fix: preserve completion install error cause

* fix: keep update completion refresh best effort
2026-05-26 18:08:44 +01:00
Peter Steinberger
c147e27f5a fix: tighten small runtime parsing guards (#86909) 2026-05-26 18:08:33 +01:00
Michael Appel
84b9704ccc Validate wide-area DNS zone domains [AI] (#84136)
* fix: validate wide-area dns domains

* addressing codex review

* fix(dns-cli): throw explicit DNS-name error on invalid --domain

resolveWideAreaDiscoveryDomain catches the validation error from
normalizeWideAreaDomain and returns null, so dns setup --domain foo/bar
fell through to the "No wide-area domain configured" branch instead of
surfacing the invalid-domain diagnostic. Validate explicit CLI/config
input directly so the user-facing setup command reports the actual
problem; preserve the resolver's silent env-fallback semantics for the
background callers that depend on graceful degradation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test(gateway): lock in graceful degrade on invalid wide-area config

Drive startGatewayDiscovery through the real resolveWideAreaDiscoveryDomain
with wideAreaDiscoveryDomain: "foo/bar" so the test exercises the actual
swallow-and-return-null path. Asserts the operator-facing warning is
logged, writeWideAreaGatewayZone is never called, and startup completes
without throwing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test(gateway): type resolveWideAreaDiscoveryDomain mock to match real signature

vi.fn(() => "openclaw.internal.") inferred the mock as `() => string`, so
mockImplementationOnce(realResolver) tripped tsgo:core:test with TS2345.
Apply the same vi.fn<typeof ...>(...) pattern the file already uses for
writeWideAreaGatewayZone.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(changelog): note dns validation fix

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Agustin Rivera <agustin@rivera-web.com>
2026-05-26 09:43:58 -07:00
Peter Steinberger
cac0b2db18 refactor: move transcripts into core
Move meeting notes into core transcripts, remove the bundled meeting-notes plugin/API, and require explicit transcripts.enabled before exposing the recording-capable tool.
2026-05-26 14:51:11 +01:00
brokemac79
56633e4f3c fix(cli): route plugin packaging recovery hints
Route invalid-config recovery output for source-only installed plugin packages to plugin packaging guidance instead of openclaw doctor --fix.

Validated with focused config/CLI/gateway/plugin tests, autoreview, Crabbox/Testbox E2E tbx_01ksgr80tnvvc13kv6t126yv78, and green PR CI on 3b3ce73d0f.

Thanks @brokemac79.
2026-05-26 01:13:20 +01:00
Fermin Quant
342bde2af6 fix(update): avoid duplicate plugin smoke failures 2026-05-26 00:04:27 +01:00
YBoy
bec7d56b73 fix(cli): reject unknown command help roots (#81083) (thanks @YB0y)
Behavior addressed: Unknown CLI command roots now error consistently even when --help or --version is appended, while legitimate built-in help fast paths still render normally.

Real environment tested: Local OpenClaw source checkout plus GitHub workflow run-level status.

Exact steps or command run after this patch: pnpm test src/cli/run-main.exit.test.ts src/cli/argv.test.ts src/cli/argv-invocation.test.ts; pnpm exec oxfmt --check --threads=1 src/cli/run-main.ts src/cli/run-main.exit.test.ts; autoreview --mode branch --base origin/main --no-web-search.

Evidence after fix: Focused CLI test shards passed 178 tests; formatter clean; autoreview reported no accepted/actionable findings; GitHub CI run 26422344121 and CodeQL Critical Quality run 26422344090 completed successfully.

Observed result after fix: `openclaw foo --help` and `openclaw foo --version` reject before proxy/program startup, while known help fast paths remain ahead of the unknown-root guard.

What was not tested: Full local build; contributor PR body already supplied build/CLI command proof before rebase.

Co-authored-by: YB0y <brianandez6@gmail.com>
2026-05-25 23:38:43 +01:00
Galin Iliev
b30f8e5290 test(config): guard legacy agentRuntime regression
Adds regression coverage for agents.defaults.agentRuntime schema acceptance and invalid-config doctor fix reachability.

The runtime behavior fix already landed on main in 5b9be2cdb1c01a2896783c52f5f0654c5f22a249; this PR locks the expected behavior with focused tests.

Closes #72872
2026-05-25 13:23:59 -07:00
Peter Steinberger
77d9ac30bb refactor: reuse shared coercion helpers (#86419)
* refactor: share talk event metric extraction

* refactor: reuse shared coercion helpers

* refactor: reuse shared primitive guards

* refactor: reuse shared record guard

* refactor: reuse shared primitive helpers

* refactor: reuse shared string guards

* refactor: reuse shared non-empty string guard

* refactor: share plugin primitive coercion helpers

* refactor: reuse plugin coercion helpers

* refactor: reuse plugin coercion helpers in more plugins

* refactor: reuse channel coercion helpers

* refactor: reuse monitor coercion helpers

* refactor: reuse provider coercion helpers

* refactor: reuse core coercion helpers

* refactor: reuse runtime coercion helpers

* refactor: reuse helper coercion in codex paths

* refactor: reuse helper coercion in runtime paths

* refactor: reuse codex app-server coercion helpers

* refactor: reuse codex record helpers

* refactor: reuse migration and qa record helpers

* refactor: reuse feishu and core helper guards

* refactor: reuse browser and policy coercion helpers

* refactor: reuse memory wiki record helper

* refactor: share boolean coercion helpers

* refactor: reuse finite number coercion

* refactor: reuse trimmed string list helpers

* refactor: reuse string list normalization

* refactor: reuse remaining string list helpers

* refactor: reuse string entry normalizer

* refactor: share sorted string helpers

* refactor: share string list normalization

* test: preserve command registry browser imports

* refactor: reuse trimmed list helpers

* refactor: reuse string dedupe helpers

* refactor: reuse local dedupe helpers

* refactor: reuse more string dedupe helpers

* refactor: reuse command string dedupe helpers

* refactor: dedupe memory path lists with helper

* refactor: expose string dedupe helpers to plugins

* refactor: reuse core string dedupe helpers

* refactor: reuse shared unique value helpers

* refactor: reuse unique helpers in agent utilities

* refactor: reuse unique helpers in config plumbing

* refactor: reuse unique helpers in extensions

* refactor: reuse unique helpers in core utilities

* refactor: reuse unique helpers in qa plugins

* refactor: reuse unique helpers in memory plugins

* refactor: reuse unique helpers in channel plugins

* refactor: reuse unique helpers in core tails

* refactor: reuse unique helper in comfy workflow

* refactor: reuse unique helpers in test utilities

* refactor: expose unique value helper to plugins

* refactor: reuse unique helpers for numeric lists

* refactor: replace index dedupe filters

* refactor: reuse string entry normalization

* refactor: reuse string normalization in plugin helpers

* refactor: reuse string normalization in extension helpers

* refactor: reuse string normalization in channel parsers

* refactor: reuse string normalization in memory search

* refactor: reuse string normalization in provider parsers

* refactor: reuse string normalization in qa helpers

* refactor: reuse string normalization in infra parsers

* refactor: reuse string normalization in messaging parsers

* refactor: reuse string normalization in core parsers

* refactor: reuse string normalization in extension parsers

* refactor: reuse string normalization in remaining parsers

* refactor: reuse string normalization in final parser spots

* refactor: reuse string normalization in qa media helpers

* refactor: reuse normalization in provider and media lists

* refactor: reuse normalization for remaining set filters

* refactor: reuse normalization in policy allowlists

* refactor: reuse normalization in session and owner lists

* refactor: centralize primitive string lists

* refactor: reuse lowercase entry helpers

* refactor: reuse sorted string helpers

* refactor: reuse unique trimmed helpers

* refactor: reuse string normalization helpers

* refactor: reuse catalog string helpers

* refactor: reuse remaining string helpers

* refactor: simplify remaining list normalization

* refactor: reuse codex auth order normalization

* chore: refresh plugin sdk api baseline

* fix: make shared string sorting deterministic

* chore: refresh plugin sdk api baseline

* fix: align host env security ordering
2026-05-25 21:20:41 +01:00
YUHAO-corn
177ebdc24c fix(gateway): ignore inherited launchd env for respawn 2026-05-25 19:03:37 +01:00