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
8 changes: 4 additions & 4 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"url": "https://github.com/limeflash"
},
"metadata": {
"description": "The Antigravity CLI (`agy`) plugin for Claude Code — ask, code review, delegate, web scrape, and doc→Markdown from inside your editor. Read-only guarantee (agy never touches your repo) + secret / SSRF / path guards, background job control, cross-platform (Windows / macOS / Linux / WSL), 245 tests.",
"version": "0.8.1"
"description": "The Antigravity CLI (`agy`) plugin for Claude Code — ask, code review, adversarial review, delegate, rescue, web scrape and doc→Markdown from inside your editor. Read-only commands really are read-only (agy pinned to Default mode, outside your repo) + secret / SSRF / path guards, background job control. One std-only Rust binary, SHA-256 pinned; macOS / Linux / Windows.",
"version": "0.9.0"
},
"plugins": [
{
"name": "agy",
"description": "Use the Google Antigravity CLI (`agy`) from Claude Code. Synchronous Bash wrapper: /agy:setup, /agy:ask, /agy:delegate, /agy:research, /agy:review, /agy:image, /agy:scrape, /agy:doc-to-md, /agy:help. Node.js companion for stateful workflows: /agy:rescue (background-capable), /agy:status, /agy:result, /agy:cancel. Read-only commands run agy outside your repo; secret-scan + SSRF/path deny-lists guard what's sent to Gemini. Per-call model selection via --model.",
"version": "0.8.1",
"description": "Use the Google Antigravity CLI (`agy`) from Claude Code: /agy:ask, /agy:review, /agy:adversarial-review, /agy:scrape, /agy:doc-to-md (read-only: agy pinned to Default mode, outside your repo), /agy:rescue and /agy:image (write-capable, with rails), /agy:status, /agy:result, /agy:cancel, /agy:delegate, /agy:research, /agy:setup, /agy:help. Secret-scan + SSRF/path guards; per-call --model resolved against `agy models`. One std-only Rust binary, SHA-256 pinned.",
"version": "0.9.0",
"author": {
"name": "limeflash",
"url": "https://github.com/limeflash"
Expand Down
21 changes: 11 additions & 10 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# Enforce LF line endings for all text, on every platform.
#
# Critical for the shell scripts: real bash (Linux / macOS / WSL) chokes on
# CRLF line endings ("$'\r': command not found", "set: pipefail: invalid
# option name"), while Git-for-Windows bash tolerates them. So a Windows
# checkout with core.autocrlf=true produces CRLF scripts that break the
# moment they're run under WSL β€” which is exactly the path we recommend for
# an OS-hard sandbox. Forcing eol=lf keeps the scripts runnable everywhere.
# Critical for the launcher: a POSIX shell chokes on CRLF line endings
# ("$'\r': command not found"), so a Windows checkout with
# core.autocrlf=true would produce a launcher that breaks under WSL or Git
# Bash. Forcing eol=lf keeps it runnable everywhere. (PowerShell is fine
# with LF.)
* text=auto eol=lf

# Be explicit for the script / source / config types.
*.sh text eol=lf
*.bash text eol=lf
*.bats text eol=lf
*.mjs text eol=lf
*.js text eol=lf
*.ps1 text eol=lf
*.rs text eol=lf
*.toml text eol=lf
plugins/agy/bin/agy-plugin text eol=lf
plugins/agy/bin/VERSION text eol=lf
plugins/agy/bin/SHA256SUMS text eol=lf
*.json text eol=lf
*.md text eol=lf
*.yml text eol=lf
Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ body:
required: true

- type: input
id: bash-version
id: plugin-version
attributes:
label: "`bash --version` (first line)"
placeholder: "GNU bash, version 5.2.x..."
label: "Plugin version (`/agy:setup` β†’ pluginVersion)"
placeholder: "0.9.0"
validations:
required: true

Expand All @@ -56,7 +56,7 @@ body:
- macOS
- Linux
- WSL (on Windows)
- Windows (native PowerShell β€” not yet supported)
- Windows (native PowerShell)
- Other
validations:
required: true
Expand Down
14 changes: 7 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@ Drop sections that aren't relevant; don't pad.
## How was this tested?

<!--
- Unit tests added/updated under `tests/`?
- Unit tests in the module, or an end-to-end case in `tests/cli.rs`?
- `scripts/e2e-live.sh` against a real agy (if agy invocation changed)?
- End-to-end run inside Claude Code? (Paste the slash-command output if
it's not too long.)
- Any platform you couldn't test on?
-->

## Compatibility

- [ ] Works on macOS `/bin/bash` 3.2 (or N/A β€” Node-only code).
- [ ] No new runtime dependencies (or the README + CHANGELOG explain
why one was added).
- [ ] No crate dependencies (std only β€” CONTRIBUTING.md).
- [ ] Platform code checked on macOS, Linux and Windows (or with
`cargo clippy --target …`).
- [ ] `agy` CLI behavior assumed: <!-- pin a version if relying on
specific flags -->

## Checklist

- [ ] CI is green (shellcheck + bats + Node tests).
- [ ] CI is green (fmt, clippy, tests on 3 OSes, launcher tests).
- [ ] `CHANGELOG.md` entry under the unreleased section.
- [ ] No `--dangerously-skip-permissions` added (or explicit
justification in the description).
- [ ] Read-only commands still pin Default mode and never auto-approve.
- [ ] No new secret-scan false negatives introduced.

## Related issues
Expand Down
21 changes: 1 addition & 20 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,4 @@ updates:
commit-message:
prefix: "ci"
include: "scope"

# Node deps are added in Phase 2 (job-control companion). The
# ecosystem entry below is harmless until package.json appears.
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "javascript"
commit-message:
prefix: "chore"
include: "scope"
versioning-strategy: "increase"
ignore:
# vitest and bats-core have rapid major bumps; pin to minor.
- dependency-name: "vitest"
update-types: ["version-update:semver-major"]
# No cargo entry: the crate has no dependencies by policy (CONTRIBUTING.md).
118 changes: 49 additions & 69 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,81 +11,61 @@ permissions:
contents: read

jobs:
shellcheck:
name: shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Run shellcheck
run: |
# Ubuntu-latest preinstalls shellcheck.
shellcheck --version
shellcheck -S warning plugins/agy/scripts/agy-run.sh

shfmt:
name: shfmt (format check)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install shfmt
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends shfmt
- name: Check formatting
# -d shows the diff and exits non-zero if reformat would change anything.
# -i 2 = 2-space indent (matches the rest of the script).
# We allow the existing style for now β€” this is informational, not blocking.
continue-on-error: true
run: shfmt -d -i 2 -ci plugins/agy/scripts/agy-run.sh

bats:
name: bats (unit tests)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install bats
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends bats
bats --version
- name: Run tests
run: bats tests/

bats-macos:
name: bats (macOS, bash 3.2)
runs-on: macos-latest
rust:
name: rust (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- name: Show shell versions
# rustup reads rust-toolchain.toml and installs the pinned toolchain.
- name: Toolchain
run: rustup show active-toolchain || rustup toolchain install
- name: std only β€” no dependencies
shell: bash
run: |
# macOS ships bash 3.2; confirm we're really testing that path.
/bin/bash --version
bash --version
- name: Install bats
run: brew install bats-core
- name: Run bash tests (with macOS /bin/bash 3.2)
# Force the legacy bash so we catch any bash-4-only syntax accidents.
# bats only loads *.bats files, so the *.test.mjs vitest files
# in the same directory are silently ignored.
env:
BATS_SHELL: /bin/bash
run: bats tests/
deps=$(cargo tree --locked --edges normal,build --prefix none | sort -u | wc -l | tr -d " ")
if [ "$deps" -ne 1 ]; then
echo "agy-plugin must not depend on any crate:"; cargo tree --locked; exit 1
fi
- name: fmt
if: matrix.os == 'ubuntu-latest'
run: cargo fmt --all --check
- name: clippy
run: cargo clippy --locked --all-targets -- -D warnings
- name: test
run: cargo test --locked

node:
name: Node (vitest)
runs-on: ubuntu-latest
launcher:
name: launcher (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
node-version: ["18.18", "20", "22"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies
run: npm ci || npm install
- name: Run vitest
run: npm test
- name: shellcheck
if: matrix.os == 'ubuntu-latest'
run: shellcheck -s sh plugins/agy/bin/agy-plugin scripts/test-launcher.sh
- name: launcher tests (sh)
shell: bash
run: |
# Windows runs the downloaded .exe through Windows, so the fake
# release binary there must be a real executable.
if [ "$RUNNER_OS" = Windows ]; then
cargo build --locked --example stub_agy
export AGY_TEST_FAKE_EXE="$PWD/target/debug/examples/stub_agy.exe"
fi
sh scripts/test-launcher.sh
- name: launcher tests (PowerShell 5.1 + 7)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
cargo build --locked --example stub_agy
$stub = (Resolve-Path target/debug/examples/stub_agy.exe).Path
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/test-launcher.ps1 -Stub $stub
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
pwsh -NoProfile -File scripts/test-launcher.ps1 -Stub $stub
121 changes: 121 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Release

# Builds agy-plugin for every supported platform when a v* tag is pushed,
# publishes the binaries + SHA256SUMS as a GitHub Release, then opens a PR
# that pins plugins/agy/bin/{VERSION,SHA256SUMS} to them. Users get the new
# binary only once that PR is merged: the launcher refuses any binary whose
# hash is not committed in the repo.

on:
push:
tags: ["v*"]

permissions:
contents: read

jobs:
build:
name: build ${{ matrix.target }}
strategy:
fail-fast: true
matrix:
include:
- { target: aarch64-apple-darwin, os: macos-latest }
- { target: x86_64-apple-darwin, os: macos-latest }
- { target: x86_64-unknown-linux-musl, os: ubuntu-latest }
- { target: aarch64-unknown-linux-musl, os: ubuntu-24.04-arm }
- { target: x86_64-pc-windows-msvc, os: windows-latest }
- { target: aarch64-pc-windows-msvc, os: windows-11-arm }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- name: musl tools
if: contains(matrix.target, 'musl')
run: sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends musl-tools
- name: Toolchain + target
shell: bash
run: rustup target add ${{ matrix.target }}
- name: Tag matches Cargo.toml version
shell: bash
run: |
v=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)
[ "v$v" = "$GITHUB_REF_NAME" ] || { echo "tag $GITHUB_REF_NAME != Cargo.toml v$v"; exit 1; }
- name: Build
run: cargo build --release --locked --target ${{ matrix.target }}
- name: Package
shell: bash
run: |
mkdir -p dist
ext=""; case "${{ matrix.target }}" in *windows*) ext=.exe ;; esac
cp "target/${{ matrix.target }}/release/agy-plugin$ext" "dist/agy-plugin-${{ matrix.target }}$ext"
# Smoke test where the runner can execute it natively.
"dist/agy-plugin-${{ matrix.target }}$ext" version || [ "${{ matrix.target }}" = x86_64-apple-darwin ]
- uses: actions/upload-artifact@v7
with:
name: agy-plugin-${{ matrix.target }}
path: dist/*
if-no-files-found: error

publish:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v8
with:
path: dist
merge-multiple: true
- name: Checksums
working-directory: dist
run: sha256sum agy-plugin-* | tee SHA256SUMS
- name: Release notes from CHANGELOG
run: |
v="${GITHUB_REF_NAME#v}"
awk -v v="$v" '$0 ~ "^## \\[" v "\\]" {p=1; next} /^## \[/ {if (p) exit} p' CHANGELOG.md > notes.md
[ -s notes.md ] || echo "Release $GITHUB_REF_NAME" > notes.md
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
run: gh release create "$GITHUB_REF_NAME" dist/* --title "$GITHUB_REF_NAME" --notes-file notes.md --verify-tag
- uses: actions/upload-artifact@v7
with:
name: SHA256SUMS
path: dist/SHA256SUMS

pin:
needs: publish
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v7
with:
ref: main
- uses: actions/download-artifact@v8
with:
name: SHA256SUMS
path: sums
- name: Open the pin PR
env:
GH_TOKEN: ${{ github.token }}
run: |
v="${GITHUB_REF_NAME#v}"
if [ ! -d plugins/agy/bin ]; then
echo "::notice::main has no launcher yet (first Rust release); commit the release's SHA256SUMS to the release PR by hand."
exit 0
fi
branch="release/pin-$GITHUB_REF_NAME"
git switch -c "$branch"
printf '%s\n' "$v" > plugins/agy/bin/VERSION
cp sums/SHA256SUMS plugins/agy/bin/SHA256SUMS
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add plugins/agy/bin/VERSION plugins/agy/bin/SHA256SUMS
git commit -m "release: pin agy-plugin binaries to $GITHUB_REF_NAME"
git push origin "$branch"
gh pr create --base main --head "$branch" \
--title "release: pin agy-plugin binaries to $GITHUB_REF_NAME" \
--body "Points the launcher at the $GITHUB_REF_NAME release binaries. Checksums come from the release workflow run; compare them with the release's SHA256SUMS asset before merging."
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ articles/
# Vitest / coverage output.
coverage/
.nyc_output/
/target/
Loading
Loading