fix(agents): harden compaction and reset safety

Co-authored-by: jaden-clovervnd <91520439+jaden-clovervnd@users.noreply.github.com>
Co-authored-by: Sid <201593046+Sid-Qin@users.noreply.github.com>
Co-authored-by: Marcus Widing <245375637+widingmarcus-cyber@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-02-26 17:35:55 +01:00
parent 273973d374
commit 0ec7711bc2
20 changed files with 472 additions and 18 deletions

View File

@@ -7,6 +7,7 @@ import type {
GatewayAuthChoice,
GatewayBind,
NodeManagerChoice,
ResetScope,
SecretInputMode,
TailscaleMode,
} from "../../commands/onboard-types.js";
@@ -55,7 +56,11 @@ export function registerOnboardCommand(program: Command) {
`\n${theme.muted("Docs:")} ${formatDocsLink("/cli/onboard", "docs.openclaw.ai/cli/onboard")}\n`,
)
.option("--workspace <dir>", "Agent workspace directory (default: ~/.openclaw/workspace)")
.option("--reset", "Reset config + credentials + sessions + workspace before running wizard")
.option(
"--reset",
"Reset config + credentials + sessions before running wizard (workspace only with --reset-scope full)",
)
.option("--reset-scope <scope>", "Reset scope: config|config+creds+sessions|full")
.option("--non-interactive", "Run without prompts", false)
.option(
"--accept-risk",
@@ -178,6 +183,7 @@ export function registerOnboardCommand(program: Command) {
tailscale: opts.tailscale as TailscaleMode | undefined,
tailscaleResetOnExit: Boolean(opts.tailscaleResetOnExit),
reset: Boolean(opts.reset),
resetScope: opts.resetScope as ResetScope | undefined,
installDaemon,
daemonRuntime: opts.daemonRuntime as GatewayDaemonRuntime | undefined,
skipChannels: Boolean(opts.skipChannels),