Skip to content

feat(windows): add full native Google Antigravity support - #298

Closed
kobaltgit wants to merge 3 commits into
Louis-CFM:mainfrom
kobaltgit:main
Closed

kobaltgit wants to merge 3 commits into
Louis-CFM:mainfrom
kobaltgit:main

Conversation

@kobaltgit

Copy link
Copy Markdown

Summary

This PR brings full native Google Antigravity support to the Windows build, matching the existing macOS capabilities.

What's included:

  • Hook Manager backend (windows/src-tauri/src/antigravity.rs, lib.rs):
    • Manages %USERPROFILE%\.gemini\config\hooks.json with timestamped .bak backups before write.
    • Safe Windows command generation without breaking escaped quotes when executed via cmd.exe /c.
    • Exposes antigravity_hooks_status, antigravity_hooks_preview, and antigravity_hooks_apply Tauri IPC commands.
  • Relay normalizer (windows/hook/src/main.rs):
    • Handles Antigravity protojson payloads (toolCall args/name, conversationId -> session_id, workspacePaths -> cwd).
    • Maps PreInvocation -> UserPromptSubmit and PostInvocation -> PostToolUse.
    • Returns {"decision":"allow"} on PreToolUse (so Antigravity tool calls proceed without rejection) and {} on other events.
  • UI & Island (windows/src/):
    • Added agent_antigravity (#E879F9) pill, live ticker tool labels, and idle card support.
    • 1-click install/uninstall and live diff preview in Settings -> Antigravity.
  • Tests & Docs:
    • Unit tests for protojson normalizer and hooks merge/remove logic.
    • Updated README.md, windows/README.md, and docs/AGENTS.md.

kobaltgit added 3 commits October 7, 2026 21:01
- Update coucou-hook relay to normalize Antigravity protojson payloads (toolCall, conversationId, workspacePaths)
- Return {"decision":"allow"} on PreToolUse and {} on lifecycle events
- Add Rust backend hooks manager for %USERPROFILE%\.gemini\config\hooks.json with backups and diff preview
- Add Antigravity section in Settings window with 1-click install/uninstall
- Register agent_antigravity pill (#E879F9) with live step ticker and idle card
JhoanG956 pushed a commit to JhoanG956/coucou that referenced this pull request Oct 7, 2026
Re-applies the useful half of Louis-CFM#298 on the shared writer: Coucou's hooks
go in a `coucou` named group of ~/.gemini/config/hooks.json (tool events
as matcher groups, lifecycle events as plain handlers, timeouts in
seconds), and uninstalling removes that group only. A `coucou` group
someone else wrote is neither replaced nor removed.

What is left out of Louis-CFM#298: the relay no longer prints
{"decision":"allow"} on PreToolUse — it prints "{}", no decision, like
the Mac, so Antigravity's own permission rules stay in charge even with
Coucou closed. The relay path is quoted whenever it needs to be (Louis-CFM#298
wrote it bare, which breaks on a user name with a space), the write
goes through the hardened writer, and the Claude Code idle card and
package-lock.json are left as they were. Antigravity's tool names get
their ticker labels.

Co-authored-by: kobaltgit <vash_email@example.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copy link
Copy Markdown
Owner

Thank you! Antigravity support is in Coucou for Windows 0.2.0 (https://github.com/Louis-CFM/coucou/releases/tag/windows-v0.2.0), re-applied on top of the new shared installer with you credited as co-author (#307). One change: the relay no longer answers {"decision":"allow"} on PreToolUse — it prints {} like the Mac, because an allow without a click would approve every tool call even with Coucou closed. Details in #307.


Generated by Claude Code

@Louis-CFM Louis-CFM closed this Oct 7, 2026
@kobaltgit

kobaltgit commented Oct 8, 2026 •

Copy link
Copy Markdown
Author

Thanks a lot for the credit and for getting Antigravity into the 0.2.0 release, @Louis-CFM! 🙌

A quick critical heads-up regarding the PreToolUse change ({}):
Google Antigravity has a strict hook contract for PreToolUse. Unlike some other agents, if the hook returns {} (without an explicit decision), the Antigravity runtime treats it as denied and aborts every tool call with:

tool call denied by pre-tool hook

This completely blocks the agent from reading files or running commands.

There are two clean ways to solve this:

  1. Option A: Return {"decision":"allow"} specifically on PreToolUse for Antigravity (as in feat(windows): add full native Google Antigravity support #298).
  2. Option B (Recommended if you want zero auto-allow risk): Don't install the PreToolUse event in hooks.json for Antigravity at all — only install PostToolUse, PreInvocation, PostInvocation, and Stop. We just tested this and it works great: Coucou still tracks the session progress and steps via PostToolUse and invocations, but never interferes with Antigravity's pre-execution permission checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants