Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions config/antigravity/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,6 @@
}
]
},
"orca-status": {
"enabled": true,
"PreInvocation": [
{
"type": "command",
"command": "if [ -x \"$HOME/.orca/agent-hooks/antigravity-hook.sh\" ]; then ORCA_ANTIGRAVITY_EVENT='PreInvocation' /bin/sh \"$HOME/.orca/agent-hooks/antigravity-hook.sh\"; else { command -p cat 2>/dev/null || cat; } >/dev/null 2>&1 || :; fi",
"timeout": 10
}
],
"PostInvocation": [
{
"type": "command",
"command": "if [ -x \"$HOME/.orca/agent-hooks/antigravity-hook.sh\" ]; then ORCA_ANTIGRAVITY_EVENT='PostInvocation' /bin/sh \"$HOME/.orca/agent-hooks/antigravity-hook.sh\"; else { command -p cat 2>/dev/null || cat; } >/dev/null 2>&1 || :; fi",
"timeout": 10
}
],
"Stop": [
{
"type": "command",
"command": "if [ -x \"$HOME/.orca/agent-hooks/antigravity-hook.sh\" ]; then ORCA_ANTIGRAVITY_EVENT='Stop' /bin/sh \"$HOME/.orca/agent-hooks/antigravity-hook.sh\"; else { command -p cat 2>/dev/null || cat; } >/dev/null 2>&1 || :; fi",
"timeout": 10
}
],
"PostToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "if [ -x \"$HOME/.orca/agent-hooks/antigravity-hook.sh\" ]; then ORCA_ANTIGRAVITY_EVENT='PostToolUse' /bin/sh \"$HOME/.orca/agent-hooks/antigravity-hook.sh\"; else { command -p cat 2>/dev/null || cat; } >/dev/null 2>&1 || :; fi",
"timeout": 10
}
]
}
]
},
"traces-share-to-traces": {
"enabled": true,
"Stop": [
Expand Down
6 changes: 3 additions & 3 deletions spec/antigravity_config_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The contents of file "$TEMP_HOME/.gemini/antigravity-cli/settings.json" should e
End

It 'installs every managed named hook into the global customization root'
When run bash -c 'HOME="$1" bash "$2" "$3" "$4" jq && jq -e '\''(keys == ["moshi-hook", "orca-status", "traces-share-to-traces"]) and (.["traces-share-to-traces"].Stop[0].command | contains("traces hook agent agent-done --agent antigravity"))'\'' "$1/.gemini/config/hooks.json" >/dev/null && find "$1/.gemini/config/hooks.json" -prune -perm 644 -print -quit | grep -q .' _ "$TEMP_HOME" "$SCRIPT" "$SETTINGS" "$HOOKS"
When run bash -c 'HOME="$1" bash "$2" "$3" "$4" jq && jq -e '\''(keys == ["moshi-hook", "traces-share-to-traces"]) and (.["traces-share-to-traces"].Stop[0].command | contains("traces hook agent agent-done --agent antigravity"))'\'' "$1/.gemini/config/hooks.json" >/dev/null && find "$1/.gemini/config/hooks.json" -prune -perm 644 -print -quit | grep -q .' _ "$TEMP_HOME" "$SCRIPT" "$SETTINGS" "$HOOKS"
The status should be success
The path "$TEMP_HOME/.gemini/config/hooks.json" should be file
The path "$TEMP_HOME/.gemini/config/hooks.json" should be writable
Expand All @@ -68,12 +68,12 @@ cat >"$TEMP_HOME/.gemini/config/hooks.json" <<'JSON'
}
]
},
"some-other-tool": {
"orca-status": {
"enabled": true
}
}
JSON
When run bash -c 'HOME="$1" bash "$2" "$3" "$4" jq && jq -e '\''(has("some-other-tool") | not) and (.["moshi-hook"].Stop[0].command == "moshi-hook antigravity-hook Stop")'\'' "$1/.gemini/config/hooks.json" >/dev/null' _ "$TEMP_HOME" "$SCRIPT" "$SETTINGS" "$HOOKS"
When run bash -c 'HOME="$1" bash "$2" "$3" "$4" jq && jq -e '\''(has("orca-status") | not) and (.["moshi-hook"].Stop[0].command == "moshi-hook antigravity-hook Stop")'\'' "$1/.gemini/config/hooks.json" >/dev/null' _ "$TEMP_HOME" "$SCRIPT" "$SETTINGS" "$HOOKS"
The status should be success
End

Expand Down
Loading