Skip to content
Closed
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
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ MANIFESTS := \
plugins/zero/.claude-plugin/plugin.json \
plugins/zero/.codex-plugin/plugin.json \
plugins/zero/.factory-plugin/plugin.json \
plugins/zero-gemini/gemini-extension.json
plugins/zero-gemini/gemini-extension.json \
plugins/zero-antigravity/plugin.json

# The manifest read for the current version (all of MANIFESTS stay in lockstep).
VERSION_SOURCE := plugins/zero/.claude-plugin/plugin.json
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ installation, use the guides below. Pick your agent:
- **[Codex (CLI)](guides/codex.md)**
- **[Codex app](guides/codex-app.md)**
- **[Droid](guides/droid.md)**
- **[Google Antigravity CLI](guides/antigravity.md)**
- **[Gemini CLI](guides/gemini-cli.md)**
- **Anything else** — the standalone installer works in any agent with a
shell (and for humans at a terminal):
Expand Down Expand Up @@ -72,7 +73,9 @@ plugins/zero/ # the shared plugin: skill + hooks (+ Claude's
├── .claude-plugin/ # Claude Code manifest
├── .codex-plugin/ # Codex manifest
└── .factory-plugin/ # Droid manifest
plugins/zero-antigravity/ # thin Antigravity overlay (manifest + hook/MCP/rule wiring)
plugins/zero-gemini/ # thin Gemini-only overlay (manifest + hook wiring)
scripts/build-antigravity.sh # assembles the installable Antigravity plugin into dist/
scripts/build-gemini.sh # assembles the installable Gemini extension into dist/
guides/ # per-host install guides + the agent install runbook
```
Expand All @@ -83,5 +86,6 @@ mechanics — live in the per-host guides.
## Status

This repo is built up iteratively, one carefully reviewed PR at a time. Today
it ships the **Claude Code**, **Codex**, **Droid**, and **Gemini CLI** plugins;
additional hosts (Cursor) will land in subsequent PRs.
it ships the **Claude Code**, **Codex**, **Droid**, **Google Antigravity CLI**,
and **Gemini CLI** plugins; additional hosts (Cursor) will land in subsequent
PRs.
38 changes: 38 additions & 0 deletions guides/antigravity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Zero for Google Antigravity CLI

How to install Zero in Google Antigravity CLI and keep it up to date.

## Install

### Install Antigravity CLI

```bash
curl -fsSL https://antigravity.google/cli/install.sh | bash
```

Open a fresh terminal so `agy` is on PATH.

### Install Zero

From a checkout of `officialzeroxyz/zero-plugins`:

```bash
scripts/build-antigravity.sh
agy plugin install dist/zero-antigravity
```

That's it — Zero sets itself up automatically. Start Antigravity CLI in your
project with `agy`, then ask: *"Help me set up and test Zero."* It walks you
through signing in.

## Staying up to date

- The Zero runner updates before Antigravity model invocations.
- To update the plugin itself from a fresh checkout of this repo, rebuild and
reinstall it:

```bash
git pull
scripts/build-antigravity.sh
agy plugin install dist/zero-antigravity
```
25 changes: 25 additions & 0 deletions plugins/zero-antigravity/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"zero-runner": {
"PreInvocation": [
{
"type": "command",
"command": "bash ./hooks/ensure-runner-antigravity.sh",
"timeout": 120
}
]
},
"zero-auto-approve": {
"PreToolUse": [
{
"matcher": "run_command",
"hooks": [
{
"type": "command",
"command": "bash ./hooks/auto-approve-zero-antigravity.sh",
"timeout": 5
}
]
}
]
}
}
55 changes: 55 additions & 0 deletions plugins/zero-antigravity/hooks/auto-approve-zero-antigravity.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env bash
#
# Antigravity PreToolUse hook.
#
# Auto-approves safe, read-only Zero commands in Antigravity's camelCase hook
# contract. Paid calls (`zero fetch`) and wallet/funding commands are left for
# normal review.

set -euo pipefail

input="$(cat)"

case "$input" in
*'"name":"run_command"'* | *'"name": "run_command"'*) ;;
*) exit 0 ;;
esac

after="${input#*\"CommandLine\":}"
[ "$after" = "$input" ] && exit 0
after="${after#"${after%%[![:space:]]*}"}"
case "$after" in \"*) after="${after#\"}" ;; *) exit 0 ;; esac
lead="${after%%\"*}"
lead="${lead%\\}"

lead="${lead//\\/}"
lead="${lead//\'/}"
IFS=' ' read -r -a toks <<<"$lead" || true

idx=0
while [ "$idx" -lt "${#toks[@]}" ]; do
case "${toks[$idx]}" in
[A-Za-z_]*=*) idx=$((idx + 1)) ;;
*) break ;;
esac
done

exe="${toks[$idx]:-}"
sub="${toks[$((idx + 1))]:-}"
base="${exe##*/}"

case "$base" in
zero | zerocli) ;;
*) exit 0 ;;
esac

case "$sub" in
search | get | review | runs) ;;
config) case "$lead" in *--set*) exit 0 ;; esac ;;
init) ;;
*) exit 0 ;;
esac

cat <<'JSON'
{"decision":"allow","reason":"Zero read-only operation auto-approved"}
JSON
17 changes: 17 additions & 0 deletions plugins/zero-antigravity/hooks/ensure-runner-antigravity.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
#
# Antigravity PreInvocation hook.
#
# Antigravity does not have a SessionStart hook. Run the shared Zero runner
# provisioner here, discard its Claude/Codex-shaped JSON, then emit the
# Antigravity PreInvocation shape with a short reminder.

set -euo pipefail

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

bash "$DIR/ensure-runner.sh" >/dev/null || true

cat <<'JSON'
{"injectSteps":[{"ephemeralMessage":"Zero is available for external paid capabilities. Use the zero skill for the search -> inspect -> call flow. Resolve the runner as zero on PATH, $ZERO_RUNNER, or ~/.zero/runtime/bin/zero; the Antigravity Zero plugin provisions ~/.zero/runtime/bin/zero before model invocations."}]}
JSON
7 changes: 7 additions & 0 deletions plugins/zero-antigravity/mcp_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"mcpServers": {
"zero": {
"serverUrl": "https://mcp.zero.xyz"
}
}
}
5 changes: 5 additions & 0 deletions plugins/zero-antigravity/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "zero",
"version": "1.4.0",
"description": "Discover and call paid AI capabilities (x402 / MPP) with automatic, wallet-backed payment. Search a live index of external services — image/video/audio generation, web scraping, data enrichment, real-time data, messaging — then call them and pay per use. Bundles the 'zero' skill and the Zero MCP connector."
}
16 changes: 16 additions & 0 deletions plugins/zero-antigravity/rules/zero.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Zero

Zero is available in this Antigravity environment for paid external capabilities.
Use it only when the requested outcome requires a capability outside the agent's
native tools, such as image/video/audio generation, scraping, real-time data,
messaging, or other external services.

Prefer the `zero` CLI runner for the whole flow:

1. `zero search "<task>"`
2. `zero get <result>`
3. `zero fetch <url> ... --max-pay <amount>`

If `zero` is not on PATH, resolve it from `$ZERO_RUNNER` or
`~/.zero/runtime/bin/zero`. The Zero plugin provisions that runtime before
Antigravity model invocations.
2 changes: 1 addition & 1 deletion plugins/zero-gemini/gemini-extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zero",
"version": "1.3.3",
"version": "1.4.0",
"description": "Discover and call paid AI capabilities (x402 / MPP) with automatic, wallet-backed payment. Search a live index of external services — image/video/audio generation, web scraping, data enrichment, real-time data, messaging — then call them and pay per use. Bundles the 'zero' skill and the Zero MCP connector.",
"mcpServers": {
"zero": {
Expand Down
2 changes: 1 addition & 1 deletion plugins/zero/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zero",
"version": "1.3.3",
"version": "1.4.0",
"description": "Discover and call paid AI capabilities (x402 / MPP) with automatic, wallet-backed payment. Search a live index of external services — image/video/audio generation, web scraping, data enrichment, real-time data, messaging — then call them and pay per use. Bundles the 'zero' skill and the Zero MCP connector.",
"author": { "name": "Zero", "url": "https://zero.xyz" },
"homepage": "https://zero.xyz",
Expand Down
2 changes: 1 addition & 1 deletion plugins/zero/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zero",
"version": "1.3.3",
"version": "1.4.0",
"description": "Discover and call paid AI capabilities (x402 / MPP) with automatic, wallet-backed payment. Search a live index of external services — image/video/audio generation, web scraping, data enrichment, real-time data, messaging — then call them and pay per use. Bundles the 'zero' skill.",
"author": { "name": "Zero", "url": "https://zero.xyz" },
"homepage": "https://zero.xyz",
Expand Down
2 changes: 1 addition & 1 deletion plugins/zero/.factory-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zero",
"version": "1.3.3",
"version": "1.4.0",
"description": "Discover and call paid AI capabilities (x402 / MPP) with automatic, wallet-backed payment. Search a live index of external services — image/video/audio generation, web scraping, data enrichment, real-time data, messaging — then call them and pay per use. Bundles the 'zero' skill and the Zero MCP connector.",
"author": { "name": "Zero", "url": "https://zero.xyz" },
"homepage": "https://zero.xyz",
Expand Down
54 changes: 54 additions & 0 deletions scripts/build-antigravity.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env bash
#
# Assemble the Antigravity plugin into dist/zero-antigravity/.
#
# Antigravity consumes a plugin directory with plugin.json at the root. The
# source overlay in plugins/zero-antigravity/ contains only Antigravity-specific
# manifests, hook declarations, and hook adapters; shared Zero skill and runner
# scripts are copied from plugins/zero/ at build time.

set -euo pipefail

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
SHARED="$ROOT/plugins/zero"
OVERLAY="$ROOT/plugins/zero-antigravity"
OUT="$ROOT/dist/zero-antigravity"

TARBALL=""
if [ "${1:-}" = "--tar" ]; then
TARBALL="${2:?--tar requires an output path}"
fi

for f in \
"$OVERLAY/plugin.json" \
"$OVERLAY/mcp_config.json" \
"$OVERLAY/hooks.json" \
"$OVERLAY/hooks/ensure-runner-antigravity.sh" \
"$OVERLAY/hooks/auto-approve-zero-antigravity.sh" \
"$OVERLAY/rules/zero.md" \
"$SHARED/hooks/ensure-runner.sh" \
"$SHARED/skills/zero/SKILL.md"; do
[ -f "$f" ] || { echo "build-antigravity: missing required input: $f" >&2; exit 1; }
done

rm -rf "$OUT"
mkdir -p "$OUT/hooks"

cp "$OVERLAY/plugin.json" "$OUT/plugin.json"
cp "$OVERLAY/mcp_config.json" "$OUT/mcp_config.json"
cp "$OVERLAY/hooks.json" "$OUT/hooks.json"
cp "$OVERLAY/hooks/ensure-runner-antigravity.sh" "$OUT/hooks/ensure-runner-antigravity.sh"
cp "$OVERLAY/hooks/auto-approve-zero-antigravity.sh" "$OUT/hooks/auto-approve-zero-antigravity.sh"
cp "$SHARED/hooks/ensure-runner.sh" "$OUT/hooks/ensure-runner.sh"
cp -R "$OVERLAY/rules" "$OUT/rules"
cp -R "$SHARED/skills" "$OUT/skills"
chmod +x "$OUT/hooks/ensure-runner-antigravity.sh" "$OUT/hooks/auto-approve-zero-antigravity.sh" "$OUT/hooks/ensure-runner.sh"

echo "build-antigravity: assembled $OUT"
find "$OUT" -type f | sed "s#^$ROOT/##" | sort

if [ -n "$TARBALL" ]; then
mkdir -p "$(dirname "$TARBALL")"
tar -czf "$TARBALL" -C "$OUT" .
echo "build-antigravity: wrote $TARBALL"
fi
Loading