Commit Graph

94 Commits

Author SHA1 Message Date
Vincent Koc a24af49100 fix(update-cli): respawn plugin refresh after self-update (#65471)
* fix(update-cli): respawn plugin refresh after self-update

* Update src/cli/update-cli/update-command.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update CHANGELOG.md

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-04-12 18:26:43 +01:00
Peter Steinberger 1fb2e18f47 refactor: simplify cli conversions 2026-04-11 01:27:48 +01:00
Vincent Koc 0e54440ecc fix(cycles): remove browser cli and tlon runtime seams 2026-04-10 11:45:28 +01:00
Peter Steinberger 38cb5aefc8 fix(cli): narrow post-update root 2026-04-06 02:50:38 +01:00
Peter Steinberger bdf1f02154 fix: exit after package-to-git handoff 2026-04-06 02:39:53 +01:00
Peter Steinberger eba8fed94b fix: stop old cli after package-to-git switch 2026-04-06 02:17:20 +01:00
Peter Steinberger 26c9885832 fix: skip stale post-switch update follow-ups 2026-04-06 02:03:04 +01:00
Peter Steinberger e0354e71eb fix: skip old-process config writes after git switch 2026-04-06 01:29:33 +01:00
Peter Steinberger c4cc557604 fix: clarify dirty dev update error 2026-04-06 00:58:19 +01:00
Peter Steinberger be16cf2f0d fix: defer plugin sync after git switch 2026-04-06 00:46:56 +01:00
Peter Steinberger b40d4b63f6 refactor: centralize update targets and extension guardrails 2026-04-03 23:26:31 +09:00
jayeshp19 eb4b6f7024 Use owning npm prefix for global updates 2026-04-03 23:01:43 +09:00
wangchunyue 16df3de098 fix: stabilize config default-leak landing tests (#56834) (thanks @openperf)
* fix(config): prevent AJV schema defaults from leaking into persisted config

Fixes #56772. Ensures that channel and plugin AJV validations respect the applyDefaults option, preventing runtime defaults from being written to openclaw.json during doctor/update flows.

* test: address review feedback on #56772 fix

- Split validation.channel-metadata.test.ts into applyDefaults true/false cases (fixes CI)

- Update io.write-config.test.ts regression test to use a mock plugin registry, ensuring it actually exercises the AJV default injection path

* fix(config): revert applyDefaults passthrough to prevent required-field regression

Codex-connector correctly identified that BlueBubbles channel schema marks

enrichGroupParticipantsFromContacts as both default:true and required.

Passing applyDefaults:false during write validation would cause required

checks to fail, breaking writeConfigFile entirely.

Reverted validation.ts to always use applyDefaults:true for channel/plugin

AJV validation. The protection against default leakage into persisted config

is fully handled by the persistCandidate change in io.ts (cfgToWrite uses

the pre-validation merge-patched value, not validated.config).

Updated validation.channel-metadata.test.ts to reflect this architecture.

* fix(config): apply legacy web-search normalization to persistCandidate

* fix: stabilize config default-leak landing tests (#56834) (thanks @openperf)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-30 09:19:17 +05:30
Peter Steinberger 47216702f4 refactor(config): use source snapshots for config mutations 2026-03-30 01:02:25 +01:00
Peter Steinberger 89a4f2a34e refactor(config): centralize runtime config state 2026-03-30 00:17:23 +01:00
Peter Steinberger ea08f2eb8c fix(runtime): support Node 22.14 installs 2026-03-25 06:22:18 -07:00
Peter Steinberger 66c88b4c77 fix(update): preflight npm target node engine 2026-03-25 06:01:20 -07:00
Peter Steinberger ce49d8bca9 fix: verify global npm correction installs 2026-03-23 21:04:08 -07:00
Peter Steinberger ffb287e1de fix: harden update dev switch and refresh changelog 2026-03-23 10:56:35 -07:00
Peter Steinberger 6b9915a106 refactor!: drop legacy CLAWDBOT env compatibility 2026-03-22 22:13:39 -07:00
Peter Steinberger 4ee41cc6f3 refactor(cli): separate json payload output from logging 2026-03-22 23:19:17 +00:00
Vincent Koc 5a7aba94a2 CLI: support package-manager installs from GitHub main (#47630)
* CLI: resolve package-manager main install specs

* CLI: skip registry resolution for raw package specs

* CLI: support main package target updates

* CLI: document package update specs in help

* Tests: cover package install spec resolution

* Tests: cover npm main-package updates

* Tests: cover update --tag main

* Installer: support main package targets

* Installer: support main package targets on Windows

* Docs: document package-manager main updates

* Docs: document installer main targets

* Docs: document npm and pnpm main installs

* Docs: document update --tag main

* Changelog: note package-manager main installs

* Update src/infra/update-global.test.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-15 14:18:12 -07:00
Vincent Koc 65f92fd839 Guard updater service refresh against missing invocation cwd (#45486)
* Update: capture a stable cwd for service refresh env

* Test: cover service refresh when cwd disappears
2026-03-13 18:09:01 -04:00
Vincent Koc e56e0cc913 Fix updater refresh cwd for service reinstall (#45452)
* Fix updater refresh cwd for service reinstall

* Update: preserve relative env overrides during service refresh

* Test: cover updater service refresh env rebasing
2026-03-13 17:27:12 -04:00
Peter Steinberger d96069f0df feat: add windows update package spec override 2026-03-12 23:56:48 +00:00
Peter Steinberger 91b701e183 fix: harden windows native updates 2026-03-12 23:42:14 +00:00
Gustavo Madeira Santana f26853f14c CLI: dedupe config validate errors and expose allowed values 2026-03-02 20:05:12 -05:00
tda d145518f94 fix(cli): wait for process exit before restarting gateway on Windows (openclaw#27913) thanks @tda1017
Verified:
- pnpm vitest src/cli/update-cli/restart-helper.test.ts
- pnpm check
- pnpm build

Co-authored-by: tda1017 <95275462+tda1017@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-02 08:31:03 -06:00
Peter Machona 097a6a83a0 fix(cli): replace stale doctor/restart command hints (#24485)
* fix(cli): replace stale doctor and restart hints

* fix: add changelog for CLI hint updates (#24485) (thanks @chilu18)

---------

Co-authored-by: Muhammed Mukhthar CM <mukhtharcm@gmail.com>
2026-02-24 14:49:59 +05:30
Peter Steinberger f442a3539f feat(update): add core auto-updater and dry-run preview 2026-02-22 17:11:36 +01:00
Peter Steinberger a04cdc0390 refactor(cli): share update global command runner adapter 2026-02-21 21:40:39 +00:00
Peter Steinberger 905e355f65 fix: verify gateway restart health after daemon restart 2026-02-21 18:02:14 +01:00
Peter Steinberger e93ba6ce2a fix: harden update restart service convergence 2026-02-21 17:40:28 +01:00
Peter Steinberger 20004711df fix(update): restart daemon after service refresh 2026-02-20 00:02:53 +01:00
Vincent Koc 45d9b20692 fix(cli): refresh gateway service env during update (#21071)
* changelog: add security deepMerge prototype-pollution fix entry

* update: refresh gateway service env during update restart

* test(cli): fix daemon install mock assertion

* test(cli): guard update restart false path
2026-02-19 08:32:56 -08:00
Peter Steinberger 61c0c147ad refactor(update-cli): share timeout option validation 2026-02-18 22:49:39 +00:00
Peter Steinberger b8b43175c5 style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
Peter Steinberger 31f9be126c style: run oxfmt and fix gate failures 2026-02-18 01:29:02 +00:00
Sebastian 366da7569a fix(cli): honor update restart overrides 2026-02-17 08:47:25 -05:00
cpojer d0cb8c19b2 chore: wtf. 2026-02-17 13:36:48 +09:00
Sebastian ed11e93cf2 chore(format) 2026-02-16 23:20:16 -05:00
cpojer 90ef2d6bdf chore: Update formatting. 2026-02-17 09:18:40 +09:00
artale b1d5c71609 fix(cli): use standalone script for service restart after update (#17225)
The updater was previously attempting to restart the service using the
installed codebase, which could be in an inconsistent state during the
update process. This caused the service to stall when the updater
deleted its own files before the restart could complete.

Changes:
- restart-helper.ts: new module that writes a platform-specific restart
  script to os.tmpdir() before the update begins (Linux systemd, macOS
  launchctl, Windows schtasks).
- update-command.ts: prepares the restart script before installing, then
  uses it for service restart instead of the standard runDaemonRestart.
- restart-helper.test.ts: 12 tests covering all platforms, custom
  profiles, error cases, and shell injection safety.

Review feedback addressed:
- Use spawn(detached: true) + unref() so restart script survives parent
  process termination (Greptile).
- Shell-escape profile values using single-quote wrapping to prevent
  injection via OPENCLAW_PROFILE (Greptile).
- Reject unsafe batch characters on Windows.
- Self-cleanup: scripts delete themselves after execution (Copilot).
- Add tests for write failures and custom profiles (Copilot).

Fixes #17225
2026-02-17 00:00:16 +01:00
Peter Steinberger 02684b913b refactor(cli): split update command modules 2026-02-13 19:08:37 +00:00