/** * In-place edits `monomind cleanup` makes to config files it does not own * outright (GH #401). Each function removes only monomind's part of a shared * file and returns the new text, or null when there was nothing to remove. * * - `.claude/settings.json` / `.gemini/settings.json`: hook entries and a * statusLine whose command runs a helper that cleanup is removing. Left in * place they fail on every prompt and tool call ("Cannot find module * .../hook-handler.cjs"). * - `.codex/config.toml`: the `[mcp_servers.monomind]` table. * - `opencode.json`: the bash permission rules init adds for monomind. */ /** Project-relative helper paths (`.claude/helpers/x.cjs`) a command runs. */ export declare function helperRefs(command: string): string[]; /** * Remove every hook entry and the statusLine whose command runs a helper * `isGone` reports as removed, then the matcher groups, events and `hooks` * key that leaves empty. Everything else — other keys, user hooks — stays. * Returns null when nothing changes or the text is not a JSON object. */ export declare function stripDanglingHelperRefs(text: string, isGone: (rel: string) => boolean): string | null; /** * The statusLine and hook commands in settings `text` that run a helper * `isGone` reports as removed (GH #448: listed when the file is git-tracked * and so cannot be edited). Empty when none, or the text is not JSON. */ export declare function danglingHelperCommands(text: string, isGone: (rel: string) => boolean): string[]; /** * For a git-tracked settings file at `abs`, which cleanup never edits: * `covers` matches the helpers directories its dangling commands run (kept * whole, since helpers require their siblings) and any parent of them; * `notice` is the manual edit that completes the uninstall. Null when no * command runs a removed helper. */ export declare function helpersToKeep(rel: string, abs: string, isGone: (rel: string) => boolean): { covers: (path: string) => boolean; notice: string; } | null; /** * `.codex/config.toml` text without the `[mcp_servers.monomind]` table (and * any `mcp_servers.monomind.*` subtables). Returns null when there is none. */ export declare function stripCodexMcpTable(text: string): string | null; /** * `opencode.json` text without the `permission.bash` rules init adds for * monomind (only while they still hold init's value). Returns the text * unchanged when there are none; unparseable text is returned as is. */ export declare function stripOpencodeRules(text: string): string; //# sourceMappingURL=cleanup-config-edits.d.ts.map