Expand description
wire nuke — hard reset of all wire state on the machine.
NukePlan::compute enumerates everything that would be removed
(paths, service units, host MCP entries, optionally the binary)
WITHOUT mutating anything — it is the dry-run output and the
execution input. NukePlan::execute performs the removal.
Structs§
- Nuke
Plan - Everything a nuke will tear down. Computed from the environment; pure (no mutation) so it can be printed for –dry-run / confirm.
- Nuke
Report - What a nuke actually did (for –json + operator output).
Functions§
- default_
registry_ bindings - Read the cwd→session bindings of the machine’s DEFAULT registry —
WIRE_HOMEdeliberately ignored, because nuke’s unit/process/MCP teardown is machine-global no matter what home the caller resolved. Any read failure → empty (no install worth guarding). - host_
guard_ refusal - Operator-machine guard.
wire nuketears down MACHINE-GLOBAL surfaces — launchd/systemd units, host MCP configs, every running wire daemon — regardless ofWIRE_HOME, so an agent or test harness invoking it under a temp home still takes the operator’s live install down with it (this killed a dev box’s daemon during v0.15 testing). Registry cwd bindings only exist when an operator deliberately bound sessions, so they are the “live install” signal. Returns the refusal message, orNoneto proceed. - parse_
registry_ bindings - Parse
(cwd, session-name)bindings out of a session registry’s raw bytes. Malformed/empty input → no bindings (the guard then stays silent, matching a machine with no operator install). - should_
proceed - Decide whether to proceed.
forcebypasses all prompts; otherwise a non-TTY refuses, and a TTY proceeds only on an exact “nuke” line.read_lineis injected so this is unit-testable.