A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.
Swift ai-agentsanthropicantigravityclaudeclaude-codecodexcursordynamic-islandgemini-cliiosiphonlinuxmacosmacos-appmenubar-appnotchopen-sourceswiftswiftuiwindows
fix(hook): return decision allow on PreToolUse for Antigravity
kobaltgit4fb433001f4a
diff --git a/windows/hook/src/reply.rs b/windows/hook/src/reply.rsindex 9da86a71..767805dc 100644--- a/windows/hook/src/reply.rs+++ b/windows/hook/src/reply.rs@@ -26,6 +26,9 @@ fn wants_json(agent: &str) -> bool {/// question as it was asked.pub fn stdout(agent: &str, event: &str, decision: Option<&str>, question: Option<&Value>) -> Option<String> {if event != "PermissionRequest" {+ if agent.eq_ignore_ascii_case("antigravity") && event == "PreToolUse" {+ return Some(r#"{"decision":"allow"}"#.to_string());+ }return wants_json(agent).then(|| "{}".to_string());}let decision = decision.filter(|_| takes_decisions(agent));@@ -148,6 +151,9 @@ mod tests {fn nothing_is_ever_allowed_without_a_decision() {for agent in AGENTS {for event in EVENTS {+ if *agent == "antigravity" && *event == "PreToolUse" {+ continue;+ }if let Some(out) = stdout(agent, event, None, None) {assert!(!allows(&out), "{agent:?} {event} printed {out} with nobody clicking");}@@ -165,6 +171,9 @@ mod tests {fn a_decision_only_counts_on_a_permission_request_from_an_agent_that_takes_one() {for agent in AGENTS {for event in EVENTS.iter().filter(|e| **e != "PermissionRequest") {+ if *agent == "antigravity" && *event == "PreToolUse" {+ continue;+ }if let Some(out) = stdout(agent, event, Some("allow"), None) {assert!(!allows(&out), "{agent:?} {event}: {out}");}@@ -193,12 +202,15 @@ mod tests {// Copilot is fail-closed: no decision is an explicit "ask", never silence.assert_eq!(stdout("copilot", "PermissionRequest", None, None).unwrap(), r#"{"permissionDecision":"ask"}"#);assert_eq!(stdout("muse", "PermissionRequest", None, None), None);- // Gemini CLI and Antigravity read "{}" as "no opinion" — Antigravity's- // PreToolUse included: the tool is never allowed on Coucou's say-so.- for agent in ["gemini", "antigravity"] {- for event in ["PreToolUse", "PostToolUse", "UserPromptSubmit", "Stop"] {- assert_eq!(stdout(agent, event, None, None).unwrap(), "{}");- }+ // Antigravity requires {"decision":"allow"} on PreToolUse to avoid denying tool execution;+ // other lifecycle events receive "{}".+ assert_eq!(stdout("antigravity", "PreToolUse", None, None).unwrap(), r#"{"decision":"allow"}"#);+ for event in ["PostToolUse", "UserPromptSubmit", "Stop"] {+ assert_eq!(stdout("antigravity", event, None, None).unwrap(), "{}");+ }+ // Gemini CLI reads "{}" as "no opinion".+ for event in ["PreToolUse", "PostToolUse", "UserPromptSubmit", "Stop"] {+ assert_eq!(stdout("gemini", event, None, None).unwrap(), "{}");}// Cursor: silence, which Cursor reads as "carry on as usual".for event in ["PreToolUse", "UserPromptSubmit", "Stop"] {