Added
hnl uninstall— undoes exactly what installing did: stops and removes the background service, puts every harness config back as it was (hooks, MCP entries, gateway base URLs), removes system-level managed settings, and deletes thehnlcommand and its PATH shim. Prints the plan first and asks;--dry-run,--yes,--purge(--purgedeletes~/.hnlbehind its own confirmation). Running it twice is a no-op.hnl prunenow covers everything HarnessLink leaves behind, by category: payloads for other machines, update leftovers, logs, config backups, caches and the source maps in the packages it installs.--only <category>narrows it,--dry-runlists,--yesdeletes; your sessions, memories and databases are named as untouchable and never selected. The same sweep runs automatically after installs and updates and once after the service starts, andhnl doctorreports and fixes a category over its bound (ADR-100).
Fixed
- The installers leave nothing behind when they fail or are interrupted: every scratch path in
install.shis registered and removed on EXIT/INT/TERM/HUP (a SIGTERM mid-verify used to leave a file in $TMPDIR),install.ps1removes its scratch directory in afinally, and the release manifest is copied then renamed so an interrupted copy cannot leave a half manifest. - Uninstalling a context hook no longer leaves an empty
hooks.jsonorextensions/directory, and mcp.json writes end with a newline so a user's file round-trips unchanged. ~/.hnl/logsis bounded as a directory, not per process: a machine that ran the CLI 470 times kept 470 files, most of them one line. Now 5 days, 40 files and 16 MB of finished runs, with the near-empty files a short-lived command leaves dropped the next day.- Config backups no longer accumulate: a restore keeps the newest two of each file and removes the rest as it writes.
- A
code_mapindex records its project root, so an index for a folder you deleted is dropped instead of waiting to age out.