Repository navigation
Conversation
When Coucou is uninstalled on Windows, the NSIS uninstaller removes coucou-hook.exe from %LOCALAPPDATA%\Coucou\bin, but previously left agent configuration files untouched. Because Google Antigravity fails closed on broken PreToolUse hook binaries, any tool call failed with: `Tool call denied by pre-tool hook`. - Add `Coucou.exe --uninstall-hooks` (and `--clean-hooks` / `--uninstall`) CLI flags to execute headless hook cleanups across all agents. - In NSIS `hooks.nsh`, run `Coucou.exe --uninstall-hooks` before deleting binaries and local directories. - In `agents.rs`, remove `hooks.json` entirely when Coucou was its only content, while preserving any user-defined hooks. - Add unit tests for `uninstall_all` across agents and hooks. - Document uninstallation behavior and recovery in `docs/AGENTS.md` and `windows/README.md`. Closes Louis-CFM#430
|
Tested on Windows 11, building this branch and running
|
|
One more thing from running the tests: the new filesystem test in |
|
Thanks for catching this, @afpruivo — you were right. Redirecting the home folder left the saved status line pointing at the real local-data directory. Fixed in cbe3105: the filesystem test now redirects both paths into its own temporary directory without changing process-wide environment variables. A regression test checks thread isolation and cleanup after a panic. All 52 Rust tests passed in an isolated harness on macOS using both Windows and Linux path rules. Files outside the test sandbox remained unchanged. A native Windows rerun would still be welcome. |
|
Thanks @Ohualtex! Reran it natively on Windows 11 at |
Summary
Fixes #430
When Coucou is uninstalled on Windows, the NSIS uninstaller deletes
%LOCALAPPDATA%\Coucou\bin\coucou-hook.exe. Previously, agent configuration files under%USERPROFILE%were left behind. Because Google Antigravity fails closed on brokenPreToolUsehook commands, all subsequent tool calls in Antigravity were denied withTool call denied by pre-tool hook.Changes
hooks.nsh):NSIS_HOOK_PREUNINSTALLnow executesCoucou.exe --uninstall-hooksbefore removing the binary folder, ensuring agent configurations are restored beforecoucou-hook.exeis deleted.main.rs,lib.rs):--uninstall-hooks(aliases:--clean-hooks,--uninstall) command-line arguments toCoucou.exe.agents::uninstall_all()andhooks::uninstall_all()headlessly without launching the Tauri GUI.agents.rs):Agent::Antigravityuninstall logic so that if Coucou was the only hook group inhooks.json, the empty file is deleted rather than leaving a stale{}behind. Any third-party or user-defined hooks are preserved intact.docs/AGENTS.mdandwindows/README.md.agents.rsandhooks.rsverifyinguninstall_allbehavior and file removal when no other hooks exist.