Commit Graph

2973 Commits

Author SHA1 Message Date
Gio Della-Libera
566d8cdf39 fix(update): ignore restart script spawn failures (#85761) 2026-05-23 20:41:40 -07:00
Gio Della-Libera
82af6119fa fix: honor OPENCLAW_HOME defaults (#85802)
* fix: honor OPENCLAW_HOME defaults

* fix(install): preserve openclaw home upgrade defaults

* fix(install): satisfy shellcheck tilde patterns
2026-05-23 20:39:59 -07:00
Kaspre
6008375655 fix(gateway): honor restart drain budget for embedded runs
Honor configured restart drain budgets for embedded runs and avoid a second active-work drain after forced deferral timeout restarts.

Includes maintainer changelog entry.
2026-05-24 04:22:27 +01:00
Peter Steinberger
08159d87d2 fix: address PR review comments 2026-05-24 03:55:49 +01:00
Peter Steinberger
6a482584ee fix(ci): address review sweep regressions 2026-05-24 03:55:49 +01:00
Peter Steinberger
679b6776d5 fix(node): avoid stale TLS pins when retargeting 2026-05-24 03:55:49 +01:00
Peter Steinberger
97c63e63b1 fix(cli): keep secrets configure JSON singular 2026-05-24 03:55:49 +01:00
Peter Steinberger
6ce9e0dd9b fix(cli): keep completion and Twitch races bounded 2026-05-24 03:55:49 +01:00
Peter Steinberger
9410eb30cf fix(cli): preserve explicit command intent 2026-05-24 03:55:49 +01:00
Peter Steinberger
a4e95cf7b1 fix(cli): bound node media file writes 2026-05-24 03:55:49 +01:00
Peter Steinberger
9ab0af270a fix(cli): keep plugin command metadata intact 2026-05-24 03:55:49 +01:00
Peter Steinberger
15ff89bf5d fix(cli): preserve command option state 2026-05-24 03:55:49 +01:00
Peter Steinberger
308af85991 fix(cli): harden generated completions 2026-05-24 03:55:49 +01:00
Peter Steinberger
459cee5315 fix(cli): reject malformed timeout options 2026-05-24 03:55:49 +01:00
Peter Steinberger
4314674054 perf: reuse plugin metadata snapshots (#85843)
* perf: reuse plugin metadata snapshots

* test: update plugin metadata snapshot mocks
2026-05-23 23:34:19 +01:00
Nyx
2e5be0c7ff fix(gateway): pin relative state dir at startup
* fix(gateway): normalize explicit state dir overrides at startup

* test(gateway): simplify state-dir startup coverage

* test: fix state dir startup coverage

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-23 14:30:32 +01:00
Mikael Goderdzishvili
eca9645365 fix(cli): waitForever must keep the event loop alive (#85694)
`waitForever()` is a public library export used by long-running embeds to
block until the host process is asked to exit. It called `interval.unref()`
on the keep-alive timer, which removes the timer from Node's active-handle
set. With no other ref'd handles, `await waitForever()` exits the process
in ~3ms with exit code 13 ("unsettled top-level await") instead of waiting.

Drop the `.unref()` so the interval actually keeps the loop alive, and
update the existing unit test (and comment) to lock in the new contract.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 13:36:56 +01:00
alkor2000
bb52b54134 fix(secrets): show irreversible warning after interactive apply confirmation (#85638)
Fixes #83883.

In `secrets configure`, the one-way-migration irreversibility warning was
computed from `opts.apply` (the original --apply flag) rather than
`shouldApply`. On the interactive path the user confirms "Apply this plan
now?", which sets shouldApply=true while opts.apply stays false, so the
warning was silently skipped and the irreversible plaintext migration was
applied without the second confirmation.

Derive the guard from shouldApply so the irreversibility warning fires on
both the --apply path and the interactive-confirm path. Adds regression
tests covering the interactive path (warning shown; declining it cancels
the apply).
2026-05-23 13:36:47 +01:00
Daniel Marta
4ec85762ab feat(auth): support named model login profiles
* docs(auth): document named OAuth profile logins

* feat(auth): support --profile-id in models auth login

* docs: note named model login profiles

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-23 12:44:57 +01:00
Jayesh Betala
44d470f7eb fix(cli): validate tasks audit limit (#84901)
* fix(cli): validate tasks audit limit

* docs(changelog): note tasks audit limit validation

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-23 11:56:42 +01:00
Vincent Koc
5db773fad8 fix(docker): avoid printing gateway token 2026-05-23 11:54:53 +02:00
Vincent Koc
6e3b3183dd fix(cli): keep logs follow on live gateway state
Use the passive backend Gateway client for implicit local logs reads, and route Linux follow-mode local RPC failures to a bounded/redacted active systemd journal fallback instead of stale configured-file logs.

Fixes #83656
Fixes #66841
2026-05-23 17:54:23 +08:00
Peter Steinberger
2c536a8626 docs: absorb documentation PR sweep 2026-05-23 10:23:34 +01:00
Vincent Koc
7f05be041e fix(diagnostics): harden observability exports and smokes (#85371)
* test(diagnostics): widen observability smokes

* fix(diagnostics): sanitize observability exports

* docs(diagnostics): format otel export docs
2026-05-23 15:27:43 +08:00
Josh Avant
f2365053d3 fix(codex): add API key paste auth (#85533)
* fix codex api key auth paste

* changelog for codex api key auth

* support piped codex api key auth

* fix codex auth prompt validator type

* normalize pasted codex auth secrets

* honor codex auth profile type at runtime
2026-05-22 17:53:05 -07:00
Andy Ye
91d85e70c3 Scope config preflight note suppression (#84439) 2026-05-22 15:51:34 -07:00
Zhaocun Sun
1cd6dce075 fix(cron): document best-effort edit delivery mode (#84526) 2026-05-22 15:49:41 -07:00
clawsweeper[bot]
464ffc1003 feat: start onboarding for fresh CLI installs (#85519)
Summary:
- This PR routes bare `openclaw` to classic onboarding for missing, empty, or metadata-only configs; keeps aut ... cs/changelog/tests; and narrows a Docker E2E boundary-check exception for an existing source-checkout lane.
- Reproducibility: not applicable. this is a feature/default-routing PR rather than a bug report. The branch p ... ill includes a fresh-state terminal run reaching `OpenClaw setup` and tests for the relevant config states.

Automerge notes:
- PR branch already contained follow-up commit before automerge: feat: start onboarding for fresh CLI installs

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

Prepared head SHA: f4b2572f2e
Review: https://github.com/openclaw/openclaw/pull/85519#issuecomment-4522938004

Co-authored-by: FullerStackDev <263060202+fuller-stack-dev@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-22 22:00:21 +00:00
Jason (Json)
84f6b5c7f8 fix(update): prepack npm git update specs
Prepack npm GitHub/git source update specs into temporary tarballs before the staged global npm install. Extends coverage to hosted GitHub HTTPS URLs without a `.git` suffix.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
2026-05-22 22:58:16 +01:00
Jayesh Betala
5c866a17d7 fix(cli): validate debug proxy numeric options (#84260) 2026-05-22 20:45:17 +01:00
Sebastien Tardif
99e44f623e fix(gateway): add .catch() to SIGTERM/SIGUSR1 signal handlers (#83131)
The SIGTERM handler's fire-and-forget IIFE can reject if the graceful
drain or tunnel-teardown throws. Without a catch, this becomes an
unhandled promise rejection. Add .catch() that logs the error and
falls back to a hard stop request. Same treatment for SIGUSR1.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
2026-05-22 19:47:09 +01:00
FullerStackDev
571f364cd7 fix(update): repair managed npm plugin peers 2026-05-22 18:29:14 +01:00
Vincent Koc
adc6adccd8 fix(update): detect nested macOS gateway ancestry (#85391)
* fix(update): detect nested macOS gateway ancestry

* fix(release): refresh shrinkwrap for CI npm

* fix(update): inherit gateway runtime pid for update guard
2026-05-23 00:00:38 +08:00
Vincent Koc
bdcaac06c6 fix(diagnostics): bound diagnostic buffers 2026-05-22 22:01:41 +08:00
Mason Huang
6ea907cec1 fix(cli): recover replaced device approvals (#85342)
Summary:
- The PR teaches `openclaw devices approve <requestId>` to approve a compatible same-device replacement request during local fallback and adds focused CLI, infra, and changelog coverage.
- Reproducibility: yes. Source inspection shows current main rejects the gateway's replacement requestId as a  ...  adds focused infra and CLI tests for the churn path; I did not run tests because this review is read-only.

Automerge notes:
- PR branch already contained follow-up commit before automerge: docs: note device approval recovery

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

Prepared head SHA: 1d2f2e9b2f
Review: https://github.com/openclaw/openclaw/pull/85342#issuecomment-4518449317

Co-authored-by: masonxhuang <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-22 13:44:15 +00:00
Vincent Koc
a15797ad11 fix(update): preserve package service state during cutover (#83026)
* fix(update): preserve package service state during cutover

* docs(changelog): mention package service state cutover fix
2026-05-22 21:02:58 +08:00
Peter Steinberger
a00c58363a fix(cli): suppress systemd hints for live gateway (#85336)
* fix(cli): suppress systemd hints for live gateway

* test(cli): type systemd hint mock
2026-05-22 13:52:21 +01:00
Peter Steinberger
fc47c1f55e fix(cli): honor agent for model auth logout (#85326) 2026-05-22 13:46:07 +01:00
Tung, Hsiao-Yu
4a9138556e fix(gateway): eager-load lifecycle runtime to survive in-place upgrades (#84890)
* fix(gateway): eager-load lifecycle runtime to survive in-place upgrades

After a package-swap update (e.g. via update.run), dist/ chunk hashes
rotate while the gateway is still running. The SIGUSR1 listener's first
dynamic import of the lifecycle runtime module then throws
ERR_MODULE_NOT_FOUND inside its async IIFE, silently rejects, and leaves
restart.ts's emittedRestartToken permanently unconsumed. From that point
every scheduleGatewaySigusr1Restart() — including the one update.run
schedules for itself — returns { coalesced: true } without scheduling
anything, and the gateway never restarts until manually kickstarted.

Fix:

1. Eagerly resolve the lifecycle runtime module as the first statement
   of runGatewayLoop, before any signal listener is installed. lifecycle.runtime
   is a 36-line re-export hub, so loading it once pulls the entire restart
   / respawn / queue / sentinel / handoff graph into memory, immune to
   later disk rotation. If the module is missing at startup, fail fast
   with a loud error so the supervisor can recover instead of running
   half-broken.

2. Defense in depth: catch SIGUSR1 IIFE rejections and call
   markGatewaySigusr1RestartHandled() via the eagerly captured reference,
   so a transient listener failure doesn't permanently stick the restart
   token.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* docs(changelog): mention lifecycle restart eager load

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-05-22 20:44:05 +08:00
Vincent Koc
03f61cd1b5 fix(update): keep service logs out of json output 2026-05-22 12:46:00 +02:00
Kaspre
eb7f3b7b50 fix(agent): support explicit CLI session keys (#85121)
Summary:
- The PR adds `openclaw agent --session-key`, normalizes explicit session keys through Gateway and embedded agent execution, and updates docs, tests, and changelog.
- Reproducibility: yes. Current main's `openclaw agent` registration and gateway CLI option type lack `--sessi ... Gateway agent protocol already accepts `sessionKey`; this is source-reproducible without executing the CLI.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(agent): support explicit CLI session keys

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

Prepared head SHA: 2c76dd339f
Review: https://github.com/openclaw/openclaw/pull/85121#issuecomment-4513508932

Co-authored-by: Kaspre <kaspre@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-22 03:08:25 +00:00
Gio Della-Libera
ee9813f478 fix(cli): keep nodes json stdout clean (#84423)
Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
2026-05-21 18:05:11 -07:00
Vincent Koc
15a0156a8c fix(update): reject openclaw source package targets 2026-05-22 07:35:57 +08:00
Andy Ye
6b5eba1f43 fix(cli): preserve numeric config set record keys (#83769)
Merged via squash.

Prepared head SHA: cb55b4a40d
Co-authored-by: TurboTheTurtle <35905412+TurboTheTurtle@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-05-22 01:09:15 +03:00
Gio Della-Libera
8961eae3f0 fix(cli): reject invalid node run port (#84307)
Co-authored-by: Gio Della-Libera <giodl@microsoft.com>
2026-05-21 13:47:28 -07:00
Vincent Koc
88c49f9e68 chore(deadcode): dedupe repeated helpers 2026-05-21 18:47:09 +08:00
Frank Yang
f39f56a096 perf(cli): cache stable subcommand help (#84786)
Serve stable doctor, gateway, models, and plugins parent help from startup metadata while preserving strict argv validation and version precedence.

Verification:
- pnpm test src/cli/run-main.test.ts src/cli/run-main.exit.test.ts test/scripts/write-cli-startup-metadata.test.ts -- --reporter=default
- pnpm check:changed
- GitHub required checks passed
2026-05-21 18:01:32 +08:00
Frank Yang
233765b361 perf: speed up secrets and nodes help startup (#84818)
Merged via squash.

Prepared head SHA: d65ae1bd58
Co-authored-by: frankekn <4488090+frankekn@users.noreply.github.com>
Co-authored-by: frankekn <4488090+frankekn@users.noreply.github.com>
Reviewed-by: @frankekn
2026-05-21 16:51:57 +08:00
Jason (Json)
4a360ac1cc fix(update): prune stale local bundled plugin shadows
Summary:\n- prune stale local bundled plugin path records during update/doctor repair\n- keep current, same-version, versionless, source-checkout, and arbitrary local path records preserved\n- add changelog and deterministic sort comparator cleanup\n\nVerification:\n- node scripts/run-vitest.mjs src/plugins/contracts/boundary-invariants.test.ts src/plugins/stale-local-bundled-plugin-install-records.test.ts src/cli/update-cli/post-core-plugin-convergence.test.ts src/commands/doctor-plugin-registry.test.ts\n- node scripts/run-oxlint-shards.mjs --threads=8\n- ./node_modules/.bin/oxfmt --check --threads=1 CHANGELOG.md src/plugins/stale-local-bundled-plugin-install-records.ts src/commands/doctor-plugin-registry.ts\n- git diff --check\n- GitHub exact-SHA: Real behavior proof, build-artifacts, checks-fast-contracts-plugins-a, check-prod-types, check-lint, check-test-types green on 8bcbf681ec
2026-05-21 00:49:19 -07:00
clawsweeper[bot]
e427262044 [Fix] Keep node systemd tokens out of unit files (#84815)
Summary:
- This replacement PR marks the Linux node daemon gateway token as file-backed, writes it to `node.systemd.env`, sanitizes and migrates systemd env artifacts, adds regression tests, and updates the changelog.
- Reproducibility: yes. from source inspection: current `main` copies `OPENCLAW_GATEWAY_TOKEN` into the node s ... e-backed before systemd rendering. I did not run a local live systemd install during this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(systemd): scrub single-quoted env tokens
- PR branch already contained follow-up commit before automerge: [Fix] Keep node systemd tokens out of unit files

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

Prepared head SHA: f626b66c09
Review: https://github.com/openclaw/openclaw/pull/84815#issuecomment-4505012292

Co-authored-by: samzong <samzong.lu@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-21 06:48:15 +00:00