Chock.sh Build your plugin

Agents

Antigravity

Antigravity and chock: install methods and steps, what it can enforce, and the evidence behind it.

Install methods: plugin, sync. Agentseam tier block+rewrite, grade best-effort before a tool runs.

Install methods

  • Plugin: chock install --client antigravity (ask the user before running it)
  • Repo hooks: chock sync --repo . --agents antigravity writes .agents/hooks.json (ask the user before running it)

Install steps

Antigravity (antigravity)

Tested

The command (ask the user before running it: it builds a plugin of hooks that change how their agent behaves):

chock install --selection <code> --client antigravity --apply

With --apply, chock runs these steps for Antigravity:

  1. agy plugin install ~/.chock/marketplace/antigravity/chock-guardrails

Antigravity 2.0 and the IDE read plugin folders from ~/.gemini/config/plugins/ instead: copy ~/.chock/marketplace/antigravity/chock-guardrails there. Its hooks name ~/.chock/marketplace/antigravity/chock-guardrails by absolute path (Antigravity documents no plugin-root variable), so keep that folder where it is; re-run the install command after a rebuild.

What it can enforce

Tier
block+rewrite
Grade before a tool runs
best-effort
Fail mode before a tool runs
open
Basis
vendor-docs
Recorded
2026-08-26

Events

EventCan blockCan rewriteFail mode
pre_toolyesyesopen
post_toolnonoopen
stopyesnoopen

Ask support

Answers an ask with: ask. Honours ask: yes. Evidence: tested (tests/test_guard_fail_to_ask.py::test_a_crashed_guard_asks_rather_than_allowing).

Hook timeout

Default 30 seconds, set by the timeout field in s.

Vendor source

Test status

  • Plugin (antigravity): tested.
  • Repo hooks: untested. A test of the plugin says nothing about repo hooks.
  • Through the plugin install, at hook point plugin-hook: Antigravity IDE (version not recorded), Windows 11, 2026-10-18. live probe of chock's shipped plugin, built on Windows and copied to ~/.gemini/config/plugins/chock-witness with no hand edits. The store sets windows_hook_command: quote_free, so the hooks.json command has no quotes. block-no-verify refused the witness kit's GUARD shell command before it ran ("tool call denied by pre-tool hook: Blocked by chock policy: block-no-verify"). Then git status showed "No commits yet". pin-github-actions let a write of .github/workflows/witness.yml with actions/checkout@v4 land. It did not refuse the write itself. It refused at turn end ("Stop hook blocked termination: Unpinned GitHub Action det…"), and the agent then pinned the action by commit SHA. A harmless git status ran. The claim is for a Windows build only (org-plan witness/results/witness-antigravity-2026-10-18.md, section "Re-run on chock's shipped build", 11121b3)

Known limits

Richest decision vocabulary here -- allow, auto_approve, deny, ask, force_ask and deny_unless_prior_grant (https://antigravity.google/docs/hooks, read 2026-10-13). PreToolUse can rewrite: its documented overwrite object is merged into toolCall.args (shallow, top level) before the tool runs, so a transform is {"decision": "allow", "overwrite": ...} -- a key the replacement input leaves out is kept, not removed. permissionOverrides only widens permissions and is not used. Stop's decision: "continue" keeps the agent going; any other value allows the stop. All of this is read from the docs, not run. The payload carries NO event name, so the event is inferred from shape, and PreToolUse/PostToolUse differ only by an error field documented as empty rather than absent; ties go to PreToolUse because the opposite guess would skip the gate. PreInvocation and PostInvocation have identical payloads and are unmapped. Fail mode is not documented, so the weaker claim (open) is recorded rather than a guess in our own favour. Install writes hooks.json to the docs' schema (https://antigravity.google/docs/hooks, read 2026-10-17: "The hooks.json file maps hook names to their event configurations"): one named hook agentseam whose PreToolUse/PostToolUse hold {matcher, hooks} groups (matcher "*", documented to match all tools, when none is given) and whose Stop lists its handler bare, as the docs' example lists the matcher-ignored events. Until 2026-10-17 Stop was written as a {hooks} group; a maintainer's Antigravity IDE log (2026-10-17) rejected that file, invalid hook "agentseam": command hook must specify 'command', so no hook loaded. The corrected file loaded in the owner's 2026-10-18 run below. Owner witness run, 2026-10-18, chock's own Antigravity plugin (not a Claude Code plugin), Antigravity IDE on Windows 11, version not recorded (org-plan witness/results/witness-antigravity-2026-10-18.md at 16ca2e2): Antigravity named the hook jsonhook__agentseam_PreToolUse_0_0 and ran it. On Windows it runs a hook command through cmd.exe, so quoting inside the command does not reach git.exe: with an argument single-quoted, git split it (unknown option: -f) and cmd.exe ran the rest, '{' is not recognized as an internal or external command, operable program or batch file.; with the quotes changed to \", git still failed with unknown option: -f (exit 129). The mechanism is inferred from that error text, not read from vendor docs or source: the '{' is not recognized line is cmd.exe's, and the second failure reads as Antigravity starting cmd.exe with each " escaped as \", which git.exe takes as a literal quote, so no quoting form survives both. A command with no quotes and no space inside any argument (unquoted forward-slash paths) worked: the guard (git commit --no-verify) was refused at PreToolUse, the turn-end gate (an unpinned GitHub Action) was refused at Stop, and a benign git status ran. A hook that exited 1 halted the tool call. So a command written for Antigravity on Windows must carry no quotes and no space inside an argument. One run: no claim above changes and nothing is marked witnessed.

Built from engine 5a4b6287a46e and catalog 1e60d211c1bb.