Commit Graph

21 Commits (878b4e0ed7cfc01caffc3ffeedaa6ccb94bfd978)

Author SHA1 Message Date
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>
9 months ago
Peter Steinberger f442a3539f feat(update): add core auto-updater and dry-run preview 9 months ago
Peter Steinberger a04cdc0390 refactor(cli): share update global command runner adapter 9 months ago
Peter Steinberger 905e355f65 fix: verify gateway restart health after daemon restart 9 months ago
Peter Steinberger e93ba6ce2a fix: harden update restart service convergence 9 months ago
Peter Steinberger 20004711df fix(update): restart daemon after service refresh 9 months ago
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
9 months ago
Peter Steinberger a4da6cfd53 test(update-cli): dedupe restart script test setup helpers 9 months ago
Peter Steinberger 61c0c147ad refactor(update-cli): share timeout option validation 9 months ago
Peter Steinberger 005e1d5fd1 refactor(cli): share styled select prompt helper 9 months ago
Peter Steinberger b8b43175c5 style: align formatting with oxfmt 0.33 9 months ago
Peter Steinberger 31f9be126c style: run oxfmt and fix gate failures 9 months ago
Sebastian 366da7569a fix(cli): honor update restart overrides 9 months ago
cpojer d0cb8c19b2
chore: wtf. 9 months ago
Sebastian ed11e93cf2 chore(format) 9 months ago
Peter Steinberger ed74f48bd5 refactor(status): share update channel display + one-liner 9 months ago
cpojer 90ef2d6bdf
chore: Update formatting. 9 months ago
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
9 months ago
Peter Steinberger dece9e8b07 refactor(update): share package.json readers 9 months ago
Peter Steinberger 02684b913b refactor(cli): split update command modules 9 months ago
0xRain 971ac0886b
fix(cli): guard against read-only process.noDeprecation on Node.js v23+ (#14152)
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 11bb9f141ae01d85c7eb8d4f8b526d7bda419558
Co-authored-by: 0xRaini <190923101+0xRaini@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Reviewed-by: @steipete
9 months ago