import { BotGuardConfig } from '../config'; import { ProtectAllArgs } from './mcpGateway'; export interface UninstallAllArgs extends ProtectAllArgs { /** Kept for backward compatibility — `uninstall` now always purges. */ purge?: string; /** 'true' => never hand off to the Windows (MSI) uninstaller. Advanced/CI. */ localOnly?: string; /** Optional one-line reason recorded with the fleet uninstall report. */ reason?: string; } /** * Every `*.fcd-backup-*` config safety copy: the known client dirs (scan) * union-ed with the backup manifest, which records PROJECT-LOCAL backups * (a repo's .cursor/mcp.json.fcd-backup-*) that no directory scan can find. * The scan still covers backups created by pre-manifest CLI versions. */ export declare function listFcdConfigBackups(): string[]; /** Delete every known `*.fcd-backup-*` config safety copy (scan + manifest). */ export declare function removeFcdConfigBackups(): { removed: string[]; failures: string[]; }; /** * Delete all local FullCourtDefense state: config + spool + logs, the * ~/.fullcourtdefense dir (machine key file lives inside), the Credential * Manager entry, %LOCALAPPDATA%\FullCourtDefense, and config backups. */ export declare function purgeLocalState(config: BotGuardConfig): { failures: string[]; }; /** * Product code of the installed FullCourtDefense MSI, from the registry * uninstall hive (both 64-bit and WOW6432Node views). Undefined on npm * installs or when the MSI entry is missing. */ export declare function parseMsiProductCodeFromRegOutput(output: string): string | undefined; export declare function findMsiProductCode(): string | undefined; /** * `fullcourtdefense detach` — reverse `onboard`/`install-all` protection but * KEEP machine credentials and the installed application, so the machine can * re-onboard without a new enrollment token. This is the old `uninstall` * behavior, renamed to say what it actually does. */ export declare function detachCommand(args: UninstallAllArgs, config: BotGuardConfig): Promise; /** * Tell the fleet console this machine is being uninstalled, BEFORE the local * credential purge erases the shield key we need to authenticate the call. * Best-effort with a short timeout: an offline uninstall must never hang or * fail because the control plane is unreachable. On success the console shows * the machine as "Uninstalled" instead of silently ghosting until an admin * notices the missing heartbeats. */ export declare function reportUninstallToFleet(config: BotGuardConfig, reason?: string): Promise; /** * `fullcourtdefense uninstall` — COMPLETE removal. * * On MSI installs (Windows): runs the local teardown + credential purge, then * hands off to the Windows uninstaller (`msiexec /x`) so the SYSTEM updater * task, HKLM audit policies, and the installed application are all removed in * the same flow — one command, one UAC prompt, machine back to its pre-FCD * state. On npm installs: local teardown + purge, then tells the user the one * remaining step (removing the npm package itself). * * To detach protection but keep credentials/the app, use `fullcourtdefense * detach` instead. */ export declare function uninstallAllCommand(args: UninstallAllArgs, config: BotGuardConfig): Promise;