@quantiya/codevibe-antigravity-plugin 2.0.84 → 2.0.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/agy-hook.js +191 -18
- package/dist/installer-cli.js +14 -3
- package/dist/server.js +2513 -1367
- package/libexec/agy-hook.sh +23 -7
- package/package.json +1 -1
package/libexec/agy-hook.sh
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
#
|
|
3
3
|
# CodeVibe hook launcher for Antigravity CLI (agy), registered in the global
|
|
4
|
-
# ~/.gemini/config/hooks.json for PreInvocation and
|
|
4
|
+
# ~/.gemini/config/hooks.json for PreInvocation, PostToolUse, PreToolUse, and Stop (F1).
|
|
5
5
|
#
|
|
6
|
-
# Every agy process on this machine runs it, so it must stay cheap
|
|
7
|
-
#
|
|
6
|
+
# Every agy process on this machine runs it, so it must stay cheap.
|
|
7
|
+
# For PreInvocation and PostToolUse it prints `{}`.
|
|
8
|
+
# For PreToolUse it prints `{"decision":"allow"}` so agy proceeds with the tool.
|
|
9
|
+
# For Stop it prints `{"decision":"stop"}` to acknowledge turn termination.
|
|
10
|
+
# Unless the CodeVibe launcher started this agy (which sets
|
|
8
11
|
# CODEVIBE_AGY_HOOK_OWNER inline in its tmux command), it does nothing else.
|
|
9
12
|
#
|
|
10
|
-
# Usage (from hooks.json): '<this file>' PreInvocation | PostToolUse
|
|
13
|
+
# Usage (from hooks.json): '<this file>' PreInvocation | PostToolUse | PreToolUse | Stop
|
|
14
|
+
|
|
15
|
+
if [ "$1" = "PreToolUse" ]; then
|
|
16
|
+
DEFAULT_RESP='{"decision":"allow"}'
|
|
17
|
+
elif [ "$1" = "Stop" ]; then
|
|
18
|
+
DEFAULT_RESP='{"decision":"stop"}'
|
|
19
|
+
else
|
|
20
|
+
DEFAULT_RESP='{}'
|
|
21
|
+
fi
|
|
11
22
|
|
|
12
23
|
case "${CODEVIBE_AGY_HOOK_OWNER:-}" in
|
|
13
24
|
''|*[!0-9]*)
|
|
14
25
|
cat >/dev/null 2>&1
|
|
15
|
-
printf '
|
|
26
|
+
printf '%s' "$DEFAULT_RESP"
|
|
16
27
|
exit 0
|
|
17
28
|
;;
|
|
18
29
|
esac
|
|
@@ -20,8 +31,13 @@ esac
|
|
|
20
31
|
hook_dir=$(dirname "$0")
|
|
21
32
|
node_bin="${CODEVIBE_AGY_HOOK_NODE:-node}"
|
|
22
33
|
if [ -f "$hook_dir/agy-hook.js" ] && command -v "$node_bin" >/dev/null 2>&1; then
|
|
23
|
-
|
|
34
|
+
out=$("$node_bin" "$hook_dir/agy-hook.js" "$1" 2>/dev/null)
|
|
35
|
+
rc=$?
|
|
36
|
+
if [ $rc -eq 0 ] && [ -n "$out" ]; then
|
|
37
|
+
printf '%s' "$out"
|
|
38
|
+
exit 0
|
|
39
|
+
fi
|
|
24
40
|
fi
|
|
25
41
|
cat >/dev/null 2>&1
|
|
26
|
-
printf '
|
|
42
|
+
printf '%s' "$DEFAULT_RESP"
|
|
27
43
|
exit 0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quantiya/codevibe-antigravity-plugin",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.86",
|
|
4
4
|
"description": "Control Antigravity CLI from your iPhone and Android — real-time sync, approve file edits, send prompts by voice. Part of CodeVibe.",
|
|
5
5
|
"main": "dist/server.js",
|
|
6
6
|
"codevibe": {
|