Commit Graph

2915 Commits

Author SHA1 Message Date
googlerest
32fbb9ff01 test(cli): cover parsePort edge cases (#84518)
Summary:
- The PR updates `src/cli/shared/parse-port.test.ts` to cover numeric strings, whitespace-padded strings, fractional strings, invalid suffixes, and safe-integer overflow for `parsePort`.
- Reproducibility: not applicable. This PR adds test coverage rather than reporting a failing runtime behavior. Source inspection confirms the current parser contract and the exact baseline coverage gap on main.

Automerge notes:
- No ClawSweeper repair was needed after automerge opt-in.

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

Prepared head SHA: 14213cc8f4
Review: https://github.com/openclaw/openclaw/pull/84518#issuecomment-4496552268

Co-authored-by: googlerest <127843198+googlerest@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
2026-05-20 13:06:25 +00:00
Gio Della-Libera
cbf72e5e26 feat(policy): add channel conformance checks (#80407)
Summary:
- Add the bundled Policy plugin with policy-backed doctor checks for channel conformance.
- Add `openclaw policy check` attestations, accepted-attestation drift checks, and opt-in doctor repair.
- Add policy CLI docs, generated plugin inventory/reference docs, and changelog credit.

Verification:
- node --import tsx scripts/sync-plugin-versions.ts --check
- pnpm plugins:inventory:check
- pnpm docs:list
- git diff --check origin/main..HEAD
- node scripts/run-vitest.mjs extensions/policy/src/policy-state.test.ts extensions/policy/src/cli.test.ts extensions/policy/src/doctor/register.test.ts src/flows/bundled-health-checks.test.ts src/cli/program/register.maintenance.test.ts
- codex review --uncommitted; accepted finding fixed, reran clean
- codex review --commit HEAD
- GitHub CI for 4e09b067f4: CI, Workflow Sanity, CodeQL, CodeQL Critical Quality, OpenGrep PR Diff, Real behavior proof, Dependency Change Awareness all green; reran failed Windows Node setup job successfully

Co-authored-by: Gio Della-Libera <giodl73@gmail.com>
Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
2026-05-20 11:50:21 +01:00
yaoyi1222
110042d840 fix(cron-cli): bound loadCronJobForShow pagination (#83856) (#83989)
Summary:
- Adds a 50-page and advancing-`nextOffset` guard to `loadCronJobForShow`, exports that helper for regression tests, and adds an unreleased changelog entry.
- Reproducibility: yes. Current main is source-reproducible because `loadCronJobForShow` loops while `hasMore` ... ed numeric `nextOffset`; the PR discussion also includes terminal before/after proof for the same CLI path.

Automerge notes:
- No ClawSweeper repair was needed after automerge opt-in.

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

Prepared head SHA: 7828b4bdae
Review: https://github.com/openclaw/openclaw/pull/83989#issuecomment-4484474655

Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
2026-05-20 07:19:38 +00:00
Galin Iliev
ddf9fbed34 fix(gateway): expose runtime version in gateway status
Closes #56222
2026-05-19 22:09:14 -07:00
Josh Avant
e1c1c57242 Fix node approval scope requests (#84392)
* fix(cli): request node approval scopes

* docs(changelog): note node approval scope fix
2026-05-19 21:47:10 -05:00
Peter Steinberger
a002c416c7 fix(update): omit compatibility host env when package version is missing 2026-05-20 02:46:27 +01:00
Peter Steinberger
6b82eaa2cd fix(update): carry candidate plugin API version through doctor 2026-05-20 02:36:52 +01:00
Extra Small
d7b23d5bca fix(cli): honor --no-prefix-cwd in acp
Fixes #83901. Honors Commander negated option handling for ACP prompt-prefix forwarding and adds focused CLI regression coverage. Verified with Crabbox AWS cbx_1689d0ad78e9 run run_a406418db6fe and Real behavior proof run 26127392365.
2026-05-19 15:10:17 -07:00
Alex Knight
c81271ee6e Fix managed Gateway updates across CLI and service Node skew (#84043)
Summary:
- The PR pins managed Gateway package updates, runtime preflight, post-install doctor, post-core update, service refresh, and restart follow-ups to the Node binary and package root baked into the Gateway service.
- Reproducibility: yes. source-level. Current main validates and follows up with the shell process Node in the ...  body provides a concrete two-Node Docker reproduction, though I did not execute it in this read-only pass.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(update): detect service node mismatch even when package roots match
- PR branch already contained follow-up commit before automerge: fix(update): pin package install to service root when nodes differ wi…

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

Prepared head SHA: 5607e441f6
Review: https://github.com/openclaw/openclaw/pull/84043#issuecomment-4485613931

Co-authored-by: Alex Knight <15041791+amknight@users.noreply.github.com>
Co-authored-by: Alex Knight <aknight@atlassian.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: amknight
Co-authored-by: amknight <15041791+amknight@users.noreply.github.com>
2026-05-19 20:44:29 +00:00
Pavan Kumar Gondhi
48acdd3d85 harden update restart script creation [AI] (#84088)
* fix: harden update restart script creation

* docs: add changelog entry for PR merge
2026-05-19 21:05:37 +05:30
hcl
5d19beb547 fix(cli): format acp client errors with formatErrorMessage (#83904) (#84080)
Summary:
- The PR changes `openclaw acp client` error handling to use `formatErrorMessage`, adds a plain-object rejection regression test, and adds a changelog entry.
- Reproducibility: yes. Current main visibly sends `openclaw acp client` caught errors through `String(err)`,  ...  catch already uses `formatErrorMessage`; I did not run a live failing ACP server in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(cli): format acp client errors with formatErrorMessage (#83904)

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

Prepared head SHA: 69ef0e7270
Review: https://github.com/openclaw/openclaw/pull/84080#issuecomment-4486666922

Co-authored-by: HCL <chenglunhu@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
2026-05-19 14:34:51 +00:00
clawsweeper[bot]
d916f176e1 fix(cli): preserve equals in root option values [AI-assisted] (#84107)
Summary:
- This PR updates CLI root option parsing to preserve embedded equals signs, adds focused Vitest coverage for inline and space-separated values, and records the fix in the changelog.
- Reproducibility: yes. by source inspection: current main uses `raw.split("=", 2)`, so `--token=abc=def` returns only `abc`; the PR body also supplies after-fix live output for the same path.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(cli): preserve equals in root option values [AI-assisted]

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

Prepared head SHA: 8a15801e79
Review: https://github.com/openclaw/openclaw/pull/84107#issuecomment-4487314163

Co-authored-by: Thiago Costa <thiago12_fera@hotmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
2026-05-19 11:37:35 +00:00
hcl
e2c8e7c8ae fix(cli): reject out-of-range port numbers in parsePort (#83900) (#84008)
Summary:
- The PR adds a 65,535 upper-bound check to the shared CLI `parsePort` helper, a colocated regression test, and a changelog entry for the linked port-range bug.
- Reproducibility: yes. Source inspection on current main shows `parsePort('99999')` delegates to `parseStrict ... sitive safe integer, so the return would be `99999`; I did not execute it because this review is read-only.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(cli): reject out-of-range port numbers in parsePort (#83900)

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

Prepared head SHA: 9ad0705c44
Review: https://github.com/openclaw/openclaw/pull/84008#issuecomment-4484883200

Co-authored-by: HCL <chenglunhu@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
2026-05-19 11:36:12 +00:00
clawsweeper[bot]
cbaf858227 fix: retry config snapshot after rejection (#83944)
Summary:
- This PR clears the cached CLI config snapshot promise when a read rejects, adds a reject-retry-cache regression test, and adds an Unreleased changelog entry.
- Reproducibility: yes. Current main clearly caches the first snapshot-read promise, and the source PR supplied a focused reject, recover, cached-success probe; I did not rerun it in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix: retry config snapshot after rejection

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

Prepared head SHA: a46b5ec5c7
Review: https://github.com/openclaw/openclaw/pull/83944#issuecomment-4484051060

Co-authored-by: honor2030 <19909783+honor2030@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
2026-05-19 03:28:26 +00:00
Josh Avant
eb6dd2c65d Fix memory plugin CLI help dispatch (#83841)
* fix cli help for active memory plugin

* docs add changelog for memory cli help

* test fix root help mock type
2026-05-18 20:35:55 -05:00
brokemac79
26bcc95665 fix(update): guide EACCES manual recovery 2026-05-19 01:13:51 +02:00
Super Zheng
d124c5aa20 fix(cli): fix flaky config set help text test caused by env var leakage and word wrapping (#83423)
Merged via squash.

Prepared head SHA: 7ba1bac70c
Co-authored-by: medns <1575008+medns@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-05-19 00:11:52 +03:00
clawsweeper[bot]
5702858553 feat(cli): support installing skills to shared global directory via --global (#83705)
Summary:
- Adds `--global` to `openclaw skills install` and `openclaw skills update`, routing ClawHub installs and updates to the shared managed skills root with docs, changelog, and CLI command tests.
- Reproducibility: not applicable. as a bug reproduction; this is a new CLI feature request. Source inspection confirms current `main` lacks `--global`, and the source PR includes after-fix terminal proof for the new path.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(cli): address skills global review
- PR branch already contained follow-up commit before automerge: feat(cli): support installing skills to shared global directory via -…

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

Prepared head SHA: 6eb7187fc1
Review: https://github.com/openclaw/openclaw/pull/83705#issuecomment-4480023577

Co-authored-by: Hongwei Ma <marvae24@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
2026-05-18 17:22:00 +00:00
Rohin
9cbe28d75e fix(skills): resolve skills info name mismatches (#38713)
Summary:
- The PR updates the skills CLI formatter, tests, and changelog so `skills info` resolves case-insensitive and ... ator-normalized skill name variants only when non-exact matches are unique, and sanitizes not-found output.
- Reproducibility: yes. by source inspection. The documented `openclaw skills info <name>` command passes the  ... ormatter lookup on current main, while skill status entries can have distinct `name` and `skillKey` values.

Automerge notes:
- PR branch already contained follow-up commit before automerge: test(skills): exercise case-insensitive lookup branch
- PR branch already contained follow-up commit before automerge: style(skills): format lookup resolver signature
- PR branch already contained follow-up commit before automerge: fix(skills): sanitize not-found output and avoid ambiguous lookup mat…
- PR branch already contained follow-up commit before automerge: fix(skills): require unique case-insensitive info matches

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

Prepared head SHA: 01f3e2d468
Review: https://github.com/openclaw/openclaw/pull/38713#issuecomment-4321021300

Co-authored-by: NewdlDewdl <rohin.agrawal@gmail.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
2026-05-18 17:00:57 +00:00
Peter Steinberger
4f4d108639 chore(lint): remove underscore-dangle allow list (#83542)
* chore(lint): reduce underscore-dangle exceptions

* chore(lint): reduce more underscore exceptions

* chore(lint): remove underscore-dangle allow list

* fix(lint): repair underscore cleanup regressions

* test(lint): track version define suppression
2026-05-18 14:56:06 +01:00
Peter Steinberger
3132969c68 fix: fall back from official ClawHub artifact blocks (#83566)
* fix: fall back from official ClawHub artifact blocks

* test: refresh codex prompt snapshots

* test: refresh code mode prompt snapshots

* test: refresh linux prompt snapshots
2026-05-18 13:00:05 +01:00
Peter Steinberger
57c952f679 fix: add resilient media processing fallbacks (#83568) 2026-05-18 11:59:12 +01:00
Jason (Json)
3553aa3763 fix(tui): bound standalone exit
Fix standalone TUI shutdown so `/exit` cannot leave onboarding-launched TUI child processes alive after `runTui` returns.

Adds the maintainer changelog entry and keeps embedded `runTui` callers unaffected by making the post-return process-exit guard CLI-only.

Verification:
- `git diff --check origin/main...HEAD`
- `node scripts/run-vitest.mjs src/tui/tui.test.ts src/tui/tui-command-handlers.test.ts src/cli/program.smoke.test.ts src/tui/tui-launch.test.ts`
- `.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --parallel-tests "node scripts/run-vitest.mjs src/tui/tui.test.ts src/tui/tui-command-handlers.test.ts src/cli/program.smoke.test.ts src/tui/tui-launch.test.ts"`
- GitHub exact-head checks passed for `2413f48fc89b4deb9c1923ff63085c3cc2a69522`: CI `26023555738`, CodeQL `26023555736`, CodeQL Critical Quality `26023555785`, Real behavior proof `26023571192`, OpenGrep PR Diff `26023555745`, Workflow Sanity `26023555925`.
- `checks-node-core-fast` initially timed out in unrelated `src/infra/outbound/source-delivery-plan.test.ts`; rerunning failed jobs passed on the same head SHA.
2026-05-18 17:07:32 +08:00
Peter Steinberger
aec0c56386 fix(update): harden legacy package handoff 2026-05-18 07:21:42 +01:00
Peter Steinberger
e453a39d6b build: align node version floor 2026-05-18 06:28:14 +01:00
Peter Steinberger
f7196e3b53 build: update pi dependencies to 0.75.1 2026-05-18 06:22:36 +01:00
Gio Della-Libera
8855a4aa58 fix(update): require integer timeout values (#83310)
* fix(update): require integer timeout values

* fix(update): reject blank timeout values
2026-05-17 18:47:59 -07:00
Peter Steinberger
9bdc183b7d fix(cli): keep subcommand help lightweight 2026-05-18 01:35:04 +01:00
Gio Della-Libera
9a5f2f61e7 Doctor: add health-check contract and --lint validation (#80055)
* feat(doctor): add --lint mode + structured HealthFinding shape

Adds the core machinery for `openclaw doctor --lint` per the
doctor-lint-and-oc-rules upstream proposal. PR-1 of the proposal:
no new top-level verb, no public plugin SDK; everything internal.

Files:
- src/flows/checks.ts ? HealthFinding / HealthCheck / HealthCheckContext
   types. Findings carry severity per-finding; checks return
   readonly HealthFinding[]. Mode tag (doctor/lint/fix) lets a check
   distinguish the calling posture.
- src/flows/health-check-registry.ts ? module-level registry with
   duplicate-id rejection + test reset helper.
- src/flows/doctor-lint-flow.ts ? runner over registered checks.
   Catches throws into synthetic error findings (anchored at check id;
   message scrubbed of control chars, capped at 256 bytes). Sorts
   findings by severity desc, check id, path. Exports
   exitCodeFromFindings (1 if any warning/error, 0 otherwise).
- src/flows/doctor-core-checks.ts ? 4 modern HealthChecks rewriting
   logic from existing legacy run*Health functions:
     core/doctor/gateway-config            (warning)
     core/doctor/command-owner             (info)
     core/doctor/workspace-status          (info)
     core/doctor/final-config-validation   (error)
   Each was audited safe per the proposal's adapter constraints
   (no writes, no repair calls, no prompts, no probes incl. local-bind).
   Legacy run*Health contributions in doctor-health-contributions.ts
   are unchanged ? doctor mode (no --lint) still runs the existing 35.
- src/commands/doctor-lint.ts ? CLI dispatch for --lint. Reads config
   snapshot, builds HealthCheckContext (mode: "lint"), runs the registry,
   filters by --severity-min, emits human or JSON output, returns exit
   code from unfiltered set so --severity-min hides info findings
   without changing CI signal.
- src/cli/program/register.maintenance.ts ? adds --lint, --json,
   --severity-min, --skip, --only flags to existing doctor command.
   --lint branches to runDoctorLintCli; without --lint, doctor runs
   unchanged.

LoC: 382 src across 6 files. Tests + doc + oc-path-side rule packs
follow as separate commits on this branch.

* fix: avoid string spread in doctor errors

* chore: refresh plugin SDK API baseline

* docs: clarify doctor lint usage

* feat(doctor): prepare repairs for dry-run reporting
2026-05-17 12:29:57 -07:00
clawsweeper[bot]
893f580072 fix(update): tailor gateway recovery hints by platform (#83191)
Summary:
- The PR updates the CLI post-update gateway recovery formatter and tests to show Linux, macOS, Windows, or generic service-manager guidance, plus a changelog entry.
- Reproducibility: yes. Source inspection gives a high-confidence reproduction path: current main reaches a fo ... hAgent recovery text, while the platform contract says Linux uses systemd and Windows uses Scheduled Tasks.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(update): tailor gateway recovery hints by platform

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

Prepared head SHA: 0cf2a0c5a7
Review: https://github.com/openclaw/openclaw/pull/83191#issuecomment-4471471293

Co-authored-by: Rubén Cuevas <hi@rubencu.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-17 16:48:08 +00:00
Gio Della-Libera
164c35da85 fix(cli): lower extra gateway advisory severity (#82922)
Merged via squash.

Prepared head SHA: abed98a5f3
Co-authored-by: giodl73-repo <235387111+giodl73-repo@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-05-17 18:03:03 +03:00
Vincent Koc
c80cb5986f fix(update): use post-doctor plugin records 2026-05-17 20:41:59 +08:00
Vincent Koc
e3621f5057 fix(cli): keep secret diagnostics off json stdout 2026-05-17 20:08:16 +08:00
Peter Steinberger
3c6ec521d5 fix(cli): resolve PowerShell completion profiles 2026-05-17 12:58:35 +01:00
Stellar鱼
fe68af5307 fix(cli): show concrete PowerShell completion profile path 2026-05-17 12:58:35 +01:00
Vincent Koc
7d6e45ef7c fix(qa-lab): clean orphaned gateway runtimes 2026-05-17 19:10:46 +08:00
Peter Steinberger
156e86afa4 fix: load source tool plugin entries with SDK aliases 2026-05-17 11:45:18 +01:00
Peter Steinberger
4d05008283 fix: preserve tool plugin manifest metadata 2026-05-17 11:45:18 +01:00
Peter Steinberger
ae172741e1 feat: dogfood tool plugin helpers 2026-05-17 11:45:18 +01:00
Peter Steinberger
b17e4ed50c feat: add simple tool plugin authoring 2026-05-17 11:45:18 +01:00
Vincent Koc
5aac7939db fix(gateway): drain replies during restart close 2026-05-17 18:12:52 +08:00
Peter Steinberger
d66fe50a10 fix(cli): preserve optional web fallback secrets
Co-authored-by: wuyangfan <1102042793@qq.com>
2026-05-17 10:42:57 +01:00
Peter Steinberger
e3a248585e fix(cli): preserve scoped secret resolution
Co-authored-by: wuyangfan <1102042793@qq.com>

# Conflicts:
#	src/cli/capability-cli.test.ts
#	src/cli/capability-cli.ts
2026-05-17 10:42:57 +01:00
Peter Steinberger
fe680e47ce fix(cli): scope web command secret refs 2026-05-17 10:42:57 +01:00
wuyangfan
230806eaf2 fix(cli): resolve plugin web search SecretRefs for infer web search
Materialize agent-runtime plugin credentials through the shared command
secret resolution path before local web search/fetch runs, matching gateway
runtime behavior for plugins.entries.*.config.webSearch.apiKey refs.

Fixes openclaw/openclaw#82621

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-17 10:42:57 +01:00
Vincent Koc
54d063167e test: use platform spy helper in cli tests 2026-05-17 17:03:23 +08:00
Peter Steinberger
e4ec1b3de8 test(cli): clarify gateway model-run session proof (#82861) (thanks @Kaspre) 2026-05-17 09:08:02 +01:00
Kaspre
820ec9d3be test(cli): assert fresh gateway model-run sessions 2026-05-17 09:08:02 +01:00
Kaspre
0fd152b286 fix(cli): isolate gateway model run sessions 2026-05-17 09:08:02 +01:00
Peter Steinberger
5d1f7bf058 fix: route image URL describes through MiniMax VLM
Summary:
- Preserve HTTP image describe inputs as remote media.
- Route MiniMax CN image understanding through MiniMax-VL-01.
- Cover CLI, media runtime, tools, Telegram stickers, docs, and changelog.

Verification:
- codex-review clean
- pnpm check:changed via Blacksmith Testbox tbx_01krtdekwak0mygxbw5z7cfb6z
- PR CI green on 516281448e
2026-05-17 08:45:50 +01:00