agy-plugin-cc 0.6.4 → 0.7.0

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.
Files changed (2) hide show
  1. package/README.md +134 -85
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -9,13 +9,17 @@ This plugin is for Claude Code users who want an easy way to start using Antigra
9
9
 
10
10
  ## What You Get
11
11
 
12
+ - `/agy:setup` for installation and authentication checks, and the stop-review gate toggle
12
13
  - `/agy:review` for standard read-only code review
13
14
  - `/agy:adversarial-review` for challenge-based review
14
15
  - `/agy:rescue`, `/agy:status`, `/agy:result`, and `/agy:cancel` for task delegation and job management
15
16
  - `/agy:continue` to follow up in an existing agy conversation
16
- - `/agy:quota` to check remaining Antigravity model quota
17
+ - `/agy:whisper` for a one-shot question to agy with no repository context
18
+ - `/agy:search` for a web search or a single page fetch through agy, second in the web tool order after Claude Code's own tools
19
+ - `/agy:research` for a web-grounded investigation with a fixed report shape and sources, optionally written to a file
20
+ - `/agy:image` to generate an image with agy and copy it into the project on request
17
21
  - `/agy:transfer` to hand the current session over to a resumable agy conversation
18
- - `/agy:setup` for installation and authentication checks, and the stop-review gate toggle
22
+ - `/agy:quota` to check remaining Antigravity model quota
19
23
  - An optional stop-review gate: a Stop hook that has agy review the previous turn before the session can end
20
24
 
21
25
  ## Requirements
@@ -92,6 +96,29 @@ One simple first run is:
92
96
 
93
97
  ## Usage
94
98
 
99
+ ### `/agy:setup`
100
+
101
+ Checks agy readiness through a companion script (`scripts/agy-setup.mjs`) that runs every check itself (agy on PATH, auth probe, a command probe and a file-read probe for headless permission denial, stop-review gate state) and prints a single JSON report with `ready`, per-check sections, and `nextSteps`.
102
+
103
+ Headless agy auto-denies any tool its `permissions.allow` rules do not cover, and it reports the refusal as `denied_actions` on an otherwise successful-looking result. The two probes exercise a terminal command and a file read, because the two need different rules (`command(...)` and `read_file(*)`) and `--mode accept-edits` covers neither. The report names each denied tool and the rule for it. That settings edit is yours to make by hand, in your own terminal: in a Claude Code auto mode session the classifier blocks the agent from editing the file, from passing `--dangerously-skip-permissions`, and even from querying `agy -p "/permissions"`.
104
+
105
+ When a probe fails, the report says which of three things went wrong rather than assuming a login problem: a real authentication failure, a restricted environment where the invoking shell blocked a syscall agy needs, or an unknown cause. Only the first is fixed by signing in again.
106
+
107
+ You can also use `/agy:setup` to manage the optional stop-review gate.
108
+
109
+ #### Enabling the stop-review gate
110
+
111
+ ```bash
112
+ /agy:setup gate on
113
+ /agy:setup gate off
114
+ /agy:setup gate status
115
+ ```
116
+
117
+ When the gate is enabled, the plugin uses a `Stop` hook to run a read-only agy review of the previous Claude turn before the session is allowed to end. If that review finds issues in code changes from that turn, the stop is blocked so Claude can address them first.
118
+
119
+ > [!WARNING]
120
+ > The gate adds an agy review round-trip to ending a turn and spends Antigravity quota. Only enable it when you plan to actively monitor the session.
121
+
95
122
  ### `/agy:review`
96
123
 
97
124
  Runs a read-only agy review of your current git diff.
@@ -177,16 +204,73 @@ Examples:
177
204
  /agy:continue 4f3062ab-b0d9-4874-b319-e42e9701e643 summarize what you changed
178
205
  ```
179
206
 
180
- ### `/agy:quota`
207
+ ### `/agy:whisper`
181
208
 
182
- Shows remaining Antigravity model quota per bucket (Gemini and third-party groups, 5-hour and weekly windows) with reset times. Instant and quota-free.
209
+ ```text
210
+ /agy:whisper what does SIGPIPE mean for a Node child process
211
+ /agy:whisper --model gemini-3.5-pro --effort high explain CRDT merge semantics
212
+ ```
183
213
 
184
- Examples:
214
+ One-shot: no repository, no `--add-dir`, no follow-up. The answer comes back
215
+ with a `conversation_id`, so `/agy:continue <id> <follow-up>` picks it up. agy
216
+ runs from an isolated temp directory, so it does not see your project. That is
217
+ a working-directory change rather than a sandbox: agy's own
218
+ `allowNonWorkspaceAccess` setting, with an absolute path in the prompt text,
219
+ still reaches outside it. Nothing in this command's text is checked for a URL;
220
+ the local-network guard belongs to `/agy:search` alone.
185
221
 
186
- ```bash
187
- /agy:quota
222
+ ### `/agy:search`
223
+
224
+ ```text
225
+ /agy:search what changed in the Node 24 permission model
226
+ /agy:search https://nodejs.org/en/blog/release/v24.0.0
227
+ ```
228
+
229
+ A bare question runs a web search and answers with a `Sources:` list. A single
230
+ `http://` or `https://` URL fetches that page as markdown. Local, private,
231
+ link-local, and other reserved-network targets, non-http schemes, and URLs
232
+ carrying credentials are refused before agy runs. A URL-shaped word inside an
233
+ ordinary search query is checked the same way, so a blocked address does not
234
+ get through by arriving with other words around it. That check is made once, on
235
+ the URL given; it does not follow redirects and cannot see a DNS answer that
236
+ changes afterward (rebinding), since agy performs the actual fetch in its own
237
+ process. It also covers this command only: `/agy:whisper`, `/agy:research` and
238
+ `/agy:image` send their text to the same web-capable agy unchecked. The
239
+ `agy-web` skill tells Claude Code to reach for this second, after
240
+ its own WebSearch and WebFetch and before Tavily.
241
+
242
+ ### `/agy:research`
243
+
244
+ ```text
245
+ /agy:research --effort high --out docs/notes/wasm-gc.md state of WebAssembly GC support
246
+ /agy:research tradeoffs between SQLite WAL and rollback journal for a desktop app
188
247
  ```
189
248
 
249
+ Fixed report shape: Summary, Key findings (each with its source), Disagreements
250
+ and thin evidence, Caveats, Sources. `--effort` sets the depth. `--out <path>`
251
+ writes the same markdown inside the workspace; the parent directory must exist
252
+ and an existing file is never overwritten. agy runs isolated; the companion does
253
+ the write.
254
+
255
+ ### `/agy:image`
256
+
257
+ ```text
258
+ /agy:image --out assets/hero.png isometric illustration of a developer at a desk
259
+ /agy:image a minimalist dark-mode login mockup, blue accent colour
260
+ ```
261
+
262
+ agy writes the file under its own artifacts directory
263
+ (`~/.gemini/antigravity-cli/brain/<conversation-id>/<generated-name>`). Without
264
+ `--out` the command reports that path and copies nothing. With `--out <path>`
265
+ the companion checks the file agy named really resolves, after symlinks, to
266
+ somewhere inside that directory, then copies it inside the workspace; the
267
+ parent directory must exist and an existing file is never overwritten. The
268
+ copy is a byte-for-byte copy, not a re-encode, so a `--out` name whose
269
+ extension differs from the file agy actually produced is copied as-is under
270
+ the name given. That happens: a run that asked for a PNG came back as a
271
+ 1024x1024 JPEG, under a name agy chose itself. agy never sees `--out`; the
272
+ companion resolves it and does the copy.
273
+
190
274
  ### `/agy:transfer`
191
275
 
192
276
  Seeds a fresh agy conversation with a handoff brief of the current session (goal, state, decisions, open items) and returns the `conversation_id` with both resume paths.
@@ -241,29 +325,16 @@ Examples:
241
325
  /agy:cancel task-abc123
242
326
  ```
243
327
 
244
- ### `/agy:setup`
245
-
246
- Checks agy readiness through a companion script (`scripts/agy-setup.mjs`) that runs every check itself (agy on PATH, auth probe, a command probe and a file-read probe for headless permission denial, stop-review gate state) and prints a single JSON report with `ready`, per-check sections, and `nextSteps`.
247
-
248
- Headless agy auto-denies any tool its `permissions.allow` rules do not cover, and it reports the refusal as `denied_actions` on an otherwise successful-looking result. The two probes exercise a terminal command and a file read, because the two need different rules (`command(...)` and `read_file(*)`) and `--mode accept-edits` covers neither. The report names each denied tool and the rule for it. That settings edit is yours to make by hand, in your own terminal: in a Claude Code auto mode session the classifier blocks the agent from editing the file, from passing `--dangerously-skip-permissions`, and even from querying `agy -p "/permissions"`.
249
-
250
- When a probe fails, the report says which of three things went wrong rather than assuming a login problem: a real authentication failure, a restricted environment where the invoking shell blocked a syscall agy needs, or an unknown cause. Only the first is fixed by signing in again.
328
+ ### `/agy:quota`
251
329
 
252
- You can also use `/agy:setup` to manage the optional stop-review gate.
330
+ Shows remaining Antigravity model quota per bucket (Gemini and third-party groups, 5-hour and weekly windows) with reset times. Instant and quota-free.
253
331
 
254
- #### Enabling the stop-review gate
332
+ Examples:
255
333
 
256
334
  ```bash
257
- /agy:setup gate on
258
- /agy:setup gate off
259
- /agy:setup gate status
335
+ /agy:quota
260
336
  ```
261
337
 
262
- When the gate is enabled, the plugin uses a `Stop` hook to run a read-only agy review of the previous Claude turn before the session is allowed to end. If that review finds issues in code changes from that turn, the stop is blocked so Claude can address them first.
263
-
264
- > [!WARNING]
265
- > The gate adds an agy review round-trip to ending a turn and spends Antigravity quota. Only enable it when you plan to actively monitor the session.
266
-
267
338
  ## Typical Flows
268
339
 
269
340
  ### Review Before Shipping
@@ -344,66 +415,6 @@ Off by default. When enabled, a Stop hook runs a read-only `agy -p` review of th
344
415
  - If agy is missing, the gate skips with a note instead of blocking.
345
416
  - Review failures and timeouts block with guidance to run `/agy:review` manually or turn the gate off.
346
417
 
347
- ## Design
348
-
349
- Thin by design: no broker process, no job files. Every delegation is one `agy -p … --output-format json` call. Write-capable runs use `--mode accept-edits`; reviews run read-only. Foreground runs are capped near 9 minutes by the Bash tool ceiling; split longer work or use `--background`.
350
-
351
- Job control stays thin too: `/agy:status`, `/agy:result`, and `/agy:cancel` read Claude Code's own background task tracking instead of a job store, so they cover the current session only. Cross-session continuity lives agy-side via `conversation_id` and `/agy:rescue --resume`.
352
-
353
- ## Layout
354
-
355
- ```
356
- .
357
- ├── .claude-plugin/
358
- │ ├── marketplace.json marketplace catalog
359
- │ └── plugin.json manifest (plugin name: agy)
360
- ├── agents/
361
- │ └── agy-rescue.md forwarding subagent
362
- ├── commands/
363
- │ ├── adversarial-review.md
364
- │ ├── cancel.md
365
- │ ├── continue.md
366
- │ ├── quota.md
367
- │ ├── rescue.md
368
- │ ├── result.md
369
- │ ├── review.md
370
- │ ├── setup.md
371
- │ ├── status.md
372
- │ └── transfer.md
373
- ├── hooks/
374
- │ └── hooks.json Stop hook wiring for the stop-review gate
375
- ├── prompts/
376
- │ ├── adversarial-review.md challenge-review prompt
377
- │ ├── review.md code-review prompt
378
- │ ├── stop-review-gate.md stop-gate prompt
379
- │ └── transfer.md session handoff prompt
380
- ├── schemas/
381
- │ └── review-output.schema.json adversarial review output shape
382
- ├── scripts/
383
- │ ├── lib/
384
- │ │ ├── agy.mjs agy invocation and result normalizing
385
- │ │ ├── git.mjs diff collection
386
- │ │ ├── process.mjs spawn without a shell, Windows shims
387
- │ │ ├── prompts.mjs prompt loader
388
- │ │ ├── state.mjs per-workspace state
389
- │ │ ├── stop-review.mjs stop-review gate decision logic
390
- │ │ └── workspace.mjs repository root resolution
391
- │ ├── agy-companion.mjs review, transfer, quota, gate subcommands
392
- │ ├── agy-setup.mjs /agy:setup readiness report
393
- │ ├── bump-version.mjs version metadata check and bump
394
- │ ├── npx-install.mjs npx agy-plugin-cc installer
395
- │ ├── prepack-check.mjs refuses to npm pack with .bak files present
396
- │ └── stop-review-gate-hook.mjs stop-review gate (dependency-free node)
397
- ├── skills/
398
- │ ├── agy-cli-runtime/ CLI call contract
399
- │ └── agy-result-handling/ output presentation rules
400
- ├── tests/ node --test suite, run with npm test
401
- ├── CHANGELOG.md
402
- ├── LICENSE
403
- ├── README.md
404
- └── package.json npm package (agy-plugin-cc) for the npx installer
405
- ```
406
-
407
418
  ## FAQ
408
419
 
409
420
  ### Do I need a separate Antigravity account for this plugin?
@@ -418,7 +429,45 @@ No. Every delegation is a call to the same local `agy` binary you would use dire
418
429
 
419
430
  ### Will it use the same agy settings I already have?
420
431
 
421
- Yes. The plugin picks up your existing configuration in `~/.gemini/antigravity-cli/settings.json`, including `permissions.allow` rules. Headless runs auto-deny tools not covered by those rules, file reads (`read_file(*)`) as well as commands (`command(*)` or a narrower target); [`/agy:setup`](#agysetup) detects both and shows the rule to add. You make that edit by hand, outside the agent session: an auto mode session cannot apply it for you.
432
+ Yes, and one of those settings decides whether delegation works at all.
433
+
434
+ agy's `toolPermission` setting decides whether headless delegation can work at
435
+ all, and it is set in `~/.gemini/antigravity-cli/settings.json` or through agy's
436
+ own `/config` screen. Measured on agy 1.2.4 with no allow-rules, and the same
437
+ live harness (`npm run test:denials`) passed on agy 1.2.5 on 2026-09-18:
438
+
439
+ | mode | headless behaviour |
440
+ |---|---|
441
+ | `always-proceed` | every tool approved, no sandbox, including reads and writes outside the workspace |
442
+ | `request-review` | agy's default. Commands are refused because there is nobody to ask. A read of a file inside the workspace was allowed with no rule, though GitHub issue #21 reported one refused, so do not count on it. File writes are not refused |
443
+ | `proceed-in-sandbox` | approves commands only when agy is started with `--sandbox`, which this plugin does not pass, so commands stay refused |
444
+ | `strict` | refuses even a read of a file inside the workspace, and is the only mode that did |
445
+
446
+ Anything else, including a typo, is accepted and silently read back as
447
+ `request-review`, so a mode that never takes effect looks the same as one that
448
+ does.
449
+
450
+ When a delegation is refused anyway, the plugin resumes that conversation once,
451
+ stating the constraint, rather than throwing the turn away. The result carries a
452
+ `recovery` object naming what was denied on the first turn. The stop-review gate
453
+ does not resume: a review that lost its file reads has nothing to say.
454
+
455
+ On top of the mode, `permissions.allow` rules grant individual tools. Headless
456
+ runs auto-deny anything not covered, file reads (`read_file(*)`, which also
457
+ covers directory listing) as well as commands (`command(*)`). A narrower
458
+ `command(git *)` is the safer intent but is unverified: on agy 1.2.4 a
459
+ `command(pwd)` rule did not permit `pwd` while `command(*)` did, and agy never
460
+ prints the target string it tried to match.
461
+
462
+ [`/agy:setup`](#agysetup) reports your mode and the denied tools. You make any
463
+ change by hand, outside the agent session: an auto mode session cannot apply it
464
+ for you.
465
+
466
+ If you want delegation to simply work, `always-proceed` is the setting that does
467
+ it. Understand what you are granting first: every tool approved with no sandbox,
468
+ reaching outside the workspace, and agy's own changelog records fixing a bug
469
+ where outside-of-workspace writes were wrongly auto-approved in exactly that
470
+ mode.
422
471
 
423
472
  ### Does it spend my Antigravity quota?
424
473
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agy-plugin-cc",
3
- "version": "0.6.4",
3
+ "version": "0.7.0",
4
4
  "description": "Installer for the agy Claude Code plugin: use Google's Antigravity CLI (agy) from Claude Code to delegate tasks or review code.",
5
5
  "bin": {
6
6
  "agy-plugin-cc": "scripts/npx-install.mjs"
@@ -28,6 +28,7 @@
28
28
  "license": "MIT",
29
29
  "scripts": {
30
30
  "test": "node --test",
31
+ "test:denials": "node tests/live/run-denial-matrix.mjs",
31
32
  "check-version": "node scripts/bump-version.mjs --check",
32
33
  "prepack": "node scripts/prepack-check.mjs"
33
34
  }