/** * `harn deinit`: reverse what `harn init` wired into a project. * * `init` makes two kinds of change outside the harnery package: * 1. Merges `agent-hook` entries into the adapter settings file * (Claude Code `.claude/settings.json`, Cursor `.cursor/hooks.json`, or * Codex `.codex/hooks.json`). * 2. Creates the `.harnery/` coord root (runtime state: events, councils, * identities, journal) and stamps the host bin name into * `.harnery/config.jsonc`. * * `deinit` undoes (1) by default: it removes only harnery's hook entries from * the settings file, preserving any other hooks the consumer added, and deletes * the settings file outright when it's left harnery-only. It does NOT touch the * `.harnery/` coord root unless `--purge-state` is passed, because that directory * holds session history a consumer may want to keep. Idempotent + `--dry-run`, * mirroring `init`. * * For standalone `harn` on a terminal it also handles the destructive extra * conversationally: when `--purge-state` wasn't passed and `.harnery/` exists, it * asks before deleting it, and afterward it prints how to remove the harnery CLI * itself (which a running process can't do to its own package). Both are gated to * standalone harn — an embedding host routes output through its own emit and owns * its install lifecycle — and the prompt never fires off a TTY, so scripted / CI * runs keep the flag-driven behavior untouched. The shell wrapper `scripts/teardown.sh` * is the fuller mirror (it also unlinks the PATH bins and can delete the clone). */ import type { Command } from "commander"; import type { EmitContext } from "../commander.js"; export declare function registerDeinitCommand(program: Command, emit: EmitContext, binName?: string): void; /** * Whether to interactively ask before deleting `.harnery/`. True only for * standalone harn on a TTY, when the user didn't already answer with * --purge-state, it isn't a dry run, and there's actually a coord root to * delete. Pure so the gating is unit-testable without a terminal. */ export declare function shouldPromptForState(o: { standalone: boolean; interactive: boolean; dryRun: boolean; purgeState: boolean; coordExists: boolean; }): boolean; /** * The "harnery itself is still installed" line shown to standalone-harn users * after a real deinit. `harn deinit` can't remove the package it's running * from, so it points at the two ways to finish the job. Pure + exported for the * test. */ export declare function engineRemovalHint(): string; //# sourceMappingURL=deinit.d.ts.map