Skip to content

fix(antigravity): install a PreToolUse status hook without deciding tool permissions - #14701

Merged
brennanb2025 merged 2 commits into
mainfrom
brennanb2025/antigravity-kilo-status-12898
Aug 18, 2026
Merged

brennanb2025 merged 2 commits into
mainfrom
brennanb2025/antigravity-kilo-status-12898

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​155 $\color{#cf222e}{\Huge{\mathbf{−}}}$​11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​144
Prod 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​62 $\color{#cf222e}{\Huge{\mathbf{−}}}$​23 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​39

ELI5

Every agent Orca supports shows you which tool it's running right now — "Working — Read(src/app.ts)". Antigravity just shows a spinner, because Orca never installed the hook that reports tool starts. This installs it, while making sure Orca doesn't accidentally become the thing that approves your tool calls.

What Changed

  • Install the PreToolUse status hook for Antigravity (local, Windows wrappers, and SSH remote), which is the only pre-tool signal Antigravity emits.
  • Answer that hook with {"decision":"ask"} — the one documented decision that defers to the user's own permission config.
  • Make the hooks.json missing-script guard emit the gate response too, so a swept ~/.orca can't deny every tool call.
  • Extract wrapPosixHookCommand into posix-hook-command.ts (the options parameter pushed installer-utils.ts past max-lines; per AGENTS.md a disable is not an option).

Why

Antigravity is the only supported agent with no "a tool just started" signal (see the table in #12898). The consumer side is already fully implemented and already tested — extractAntigravityToolFields and normalizeAntigravityEvent parse PreToolUse, including the waiting state for ask_question / ask_permission. It was simply never fed one. This is an installer-side gap only.

Why not the identity-frame registry. The recent runtime work (#14634 Cline, #14647 Qwen, #14675 Trae) migrated runtimes onto the declared identity registry, because those runtimes were invisible to title-detection vocabulary. Antigravity is not an identity problem — it already has a dedicated /hook/antigravity route and its own normalizer at agent-hook-listener.ts:3251. Its defect is a missing hook event kind. The registry is the right tool for identity and the wrong tool here.

Why ask and not allow

PreToolUse was installed when Antigravity support landed (8afdbea2), then removed the next day in a480e6b7 / #2501 because the observational {} response violates Antigravity's schema and is read as a deny — #2426, "Tool call denied by jsonhook__orca-status_PreToolUse_0_0. Can not do any toolcall." That removal was correct given the constraint. The question is which valid response replaces {}.

Per Google's hooks docs, decision is required on PreToolUse and has five documented values:

Value Documented meaning
allow "Automatically allows the tool execution."
deny "Hard blocks execution immediately."
ask "Prompts the user, but respects 'Always Allow' settings."
force_ask "Always prompts the user, ignoring cached permissions."
deny_unless_prior_grant "Denies execution unless the resource was previously approved in a prior user grant."

ask is the only value that hands the decision back to the user's configuration: it consults stored grants rather than forcing a prompt (that's force_ask) and rather than granting one (that's allow). allow would mean Orca silently auto-approves every tool call it observes — on every platform and on SSH hosts — as a side effect of a status feature. Antigravity's permissions engine defaults unconfigured command / mcp / execute_url / non-workspace file actions to Ask, so allow would suppress exactly the prompts a default install relies on.

The decision value is orthogonal to the status feature: the hook script posts to /hook/antigravity regardless of what it echoes. allow buys nothing for the sidebar and only loosens the gate, so there is no tradeoff to make here.

Fail-safe when the script is missing

wrapPosixHookCommand's guard existed so "a stale entry at a missing script becomes a silent no-op." Silence is a no-op for PostToolUse / PreInvocation / Stop — but on the PreToolUse gate it is the #2426 deny. This matters because ~/.gemini/config/hooks.json lives outside Orca and outlives ~/.orca: an Orca uninstall, a re-provisioned SSH home, or dotfile sync leaves the entry pointing at nothing. The guard now emits {"decision":"ask"} for gate events, so the worst case is "no status," never "no tools." Non-gate events keep the byte-identical old guard, and this is covered both ways by tests.

Linked Issue

Fixes #12898 (STA-3589)

Superseded / related PRs

  • Supersedes fix(antigravity): allow PreToolUse status hooks #12993 (@innocarpe, "fix(antigravity): allow PreToolUse status hooks). Same correct diagnosis and largely the same installer structure — credit for identifying that only the installer was missing and for the Windows wrapper plumbing. Superseded for two reasons:
    1. It returns {"decision":"allow"}. That auto-approves every tool call Orca observes. The PR replaces the comment that warned about this ("returning allow/ask/deny from PreToolUse would change the user's tool permission policy") with "PreToolUse is the only passive status hook with a required allow response" — which is not accurate: allow is not the only valid response, and it is specifically the one that overrides the user's policy. ask is documented as respecting it.
    2. It leaves the missing-script guard silent, so it can reintroduce [Bug]: Can not use antigravity cli in orac (ssh) #2426 on any host where hooks.json outlives the managed script.
  • Not superseded: Fix Antigravity tool calls blocked by Orca hook #2501 / a480e6b7 was the correct fix for the constraint as it stood, and this PR keeps its stale-entry cleanup behavior intact.

Visual Proof

N/A — I could not produce a genuine before/after. The Antigravity CLI is not installed on this machine and is not distributed on npm (@google/antigravity-cli, @google/antigravity, @antigravity/cli all 404), so I could not A/B the sidebar or empirically confirm the runtime's handling of each decision value. The behavior claims above come from Google's published hook and permissions docs, quoted verbatim, plus the existing repo history (#2426 → a480e6b7). #12898's author reports an empirical A/B confirming the sidebar goes live the moment a PreToolUse hook is added and stays static without one.

Reviewer with agy installed: the one thing worth confirming on real hardware is that {"decision":"ask"} does not introduce a prompt for a tool the user has already allowed. If it does, that is a strong signal the feature needs an explicit opt-in rather than a different decision value — allow is not the fallback.

Testing

pnpm exec vitest run --config config/vitest.config.ts src/main/antigravity src/main/agent-hooks/installer-utils.test.ts src/main/agent-hooks/remote-hook-service-installers.test.ts src/shared/agent-hook-listener.test.ts — 220 passed, 3 skipped (pre-existing win32-only skips).

Regression sweep over every other agent that shares wrapPosixHookCommand (devin, droid, copilot, gemini, cursor, codex, grok, command-code, kimi): 14 files, 93 passed.

pnpm exec tsc -p config/tsconfig.node.json --noEmit — clean. oxlint and oxfmt on changed files — clean.

Non-vacuity proof. Reverted hook-service.ts and installer-utils.ts to main while keeping the new tests: 9 of them fail, including both executable-behavior tests. Restored, all green.

New tests actually execute the generated shell rather than string-matching it:

  • runs the installed antigravity-hook.sh with ORCA_ANTIGRAVITY_EVENT=PreToolUse and asserts stdout is exactly {"decision":"ask"}\n, exit 0;
  • deletes ~/.orca/agent-hooks, then runs the hooks.json command string and asserts it still answers {"decision":"ask"} (the [Bug]: Can not use antigravity cli in orac (ssh) #2426 belt);
  • asserts non-gate events stay silent under the same conditions, so the guard change is scoped;
  • asserts a present script wins over the fallback, so the fallback can't shadow a real hook;
  • asserts no script or wrapper ever contains allow / deny / force_ask / deny_unless_prior_grant.

Platforms: exercised on macOS. Windows and SSH paths are covered by unit tests (Windows wrappers via the withPlatform('win32') harness; SSH via the fake-SFTP remote installer suite, including the new assertion that the remote PreToolUse command carries the fallback). Not exercised against a live agy binary — see Visual Proof.

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Review

  • Security: this is the central concern and the reason for ask over allow. Orca must not widen a user's tool-permission policy as a side effect of a status feature. ask defers; allow grants. The fallback path also emits ask, so Orca never grants even when its own script is gone.
  • Cross-platform: POSIX core script, Windows core .cmd, and the Windows per-event wrapper all gained the same branch. One asymmetry, stated plainly: on Windows the hooks.json command is the bare wrapper path (required by fix(agent-hooks): drain stdin before hook script early exits so agents never hit EPIPE #8430 — Antigravity spawns it as argv[0], so it can't be an if exist launcher), which means a missing wrapper can't be answered inline the way POSIX can. The wrapper answers the gate when the shared core is missing; nothing can answer when the wrapper itself is gone.
  • Remote SSH: [Bug]: Can not use antigravity cli in orac (ssh) #2426 was an SSH report. installRemote now goes through the same command builder as local, so the fallback is present remotely too, asserted in remote-hook-service-installers.test.ts.
  • Backwards compatibility: wrapPosixHookCommand's new third parameter is optional and the emitted string is byte-identical for all 11 existing callers (asserted). Existing installs report partial until reinstall, which is the same migration path a480e6b7 used in the opposite direction. Stale pre-a480e6b7 PreToolUse entries are replaced, not appended.
  • Mobile / performance: no change. The hook posts on the same path as PostToolUse, and the decision is printed before any network work.

What remains open

  • The ask semantics are documented, not empirically confirmed on a live agy — see Visual Proof.
  • Antigravity's behavior when multiple PreToolUse hooks return different decisions is undocumented. Orca now always returns the non-deciding value, so it can never be the hook that loosens a user's own gate, but the precedence itself is unverified.
  • [Bug] More supporting for Kilo Code #13626 / STA-1095 (Kilo status + resume) is the other half of this cluster and is not in this PR. It is a different mechanism and belongs in its own change; open PR fix(kilo): restore sessions after restart via OpenCode-family hooks #13990 covers the resume slice.

Author

  • X / Twitter: @BrennanKB5

@coderabbitai

coderabbitai Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 04714c1c-1700-4713-a92c-38fcd76b3b18

📥 Commits

Reviewing files that changed from the base of the PR and between a324ee2 and cdd3e57.

📒 Files selected for processing (9)
  • config/tsconfig.cli.json
  • src/main/agent-hooks/installer-utils.test.ts
  • src/main/agent-hooks/installer-utils.ts
  • src/main/agent-hooks/posix-hook-command.ts
  • src/main/agent-hooks/remote-hook-service-installers.test.ts
  • src/main/antigravity/hook-events.ts
  • src/main/antigravity/hook-script.ts
  • src/main/antigravity/hook-service.test.ts
  • src/main/antigravity/hook-service.ts

Included review availability: Your plan includes up to 10 reviews per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds Antigravity PreToolUse hook support with an "ask" decision. It restores PostToolUse registration and updates Windows and POSIX managed scripts. POSIX command wrapping now uses a shared helper with shell escaping, executable checks, fallback output, and stdin draining. Local and remote installation use the helper. Tests cover fallback behavior, script execution, hook registration, stale-hook replacement, and Windows wrappers.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR satisfies #12898 by installing PreToolUse hooks across local, Windows, and SSH paths and preserving live Antigravity tool-status reporting.
Out of Scope Changes check ✅ Passed The changes remain within scope; the helper extraction and added tests directly support the Antigravity hook installation and regression requirements.
Title check ✅ Passed The title clearly summarizes the main change: adding an Antigravity PreToolUse status hook without changing tool permissions.
Description check ✅ Passed The description is complete and explains the change, rationale, linked issue, testing, platform coverage, security, and limitations.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@innocarpe

Copy link
Copy Markdown
Contributor

Acknowledged — #12993 is now closed in favor of this PR.

The installer-only diagnosis was right; ask plus the missing-script gate response is the better contract. Thank you for spelling out why allow would change the user's permission policy.

…ool permissions

Antigravity is the only supported agent with no pre-tool signal, so its panes
show a bare "Working" spinner for the whole tool call instead of the live
"Working - <tool>(<input>)" readout every other agent gets.

The consumer side already handles it — extractAntigravityToolFields and
normalizeAntigravityEvent parse PreToolUse (including the `waiting` state for
ask_question/ask_permission) and are covered by tests. Only the installer was
missing the event.

PreToolUse was installed originally and removed in a480e6b (#2501) because the
observational `{}` response violates Antigravity's schema and is read as a deny
(#2426). Re-add it with the one documented decision that defers to the user's
permission config rather than overriding it:

- `ask` — "Prompts the user, but respects 'Always Allow' settings."
- `allow` — "Automatically allows the tool execution." (would silently
  auto-approve every tool call Orca observes)

The hooks.json guard for a missing managed script previously drained stdin and
printed nothing, which is exactly the #2426 deny. Gate events now emit their
response from the guard too, so a swept ~/.orca cannot brick tools on a host
whose ~/.gemini/config/hooks.json survives.

Fixes #12898
…ject

The CLI project enumerates its main-side files explicitly, so the extracted
module needs an entry alongside its sibling runtime-home-hook-command.ts.
@brennanb2025
brennanb2025 force-pushed the brennanb2025/antigravity-kilo-status-12898 branch from b486d68 to cdd3e57 Compare August 17, 2026 00:08
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Review status

State: MERGEABLE / CLEAN against main. CI green — 44 successful checks, 1 skipped, 0 failing. 9 files, +217/-34 (6 prod / 3 test). Branch is 2 ahead / 75 behind main.

The permission-gate risk, first — because this hook sits on one

Antigravity's PreToolUse is not a passive status hook. decision is required on it, and an absent or {} response is read as a deny — that is #2426 ("Tool call denied by jsonhook__orca-status_PreToolUse_0_0. Can not do any toolcall."), which is why the hook was installed in 8afdbea2 and pulled back out the next day in #2501. So a reviewer needs to know exactly when Orca's hook can block a tool call. The PR does address this directly, and I verified the mechanism in the diff rather than taking the body's word:

  • A hook failure cannot block a tool call, because the decision is printed before any network work. In getManagedScript the case "$ORCA_ANTIGRAVITY_EVENT" block (POSIX) and the if /I block (Windows .cmd) emit the decision first, and only then does buildPosixHookPayloadCapture / the post command run. A dead Orca, a refused loopback POST, or a hung request therefore cannot deny anything — the agent already has its answer.
  • A missing managed script cannot block a tool call on POSIX or over SSH. wrapPosixHookCommand's guard previously made a stale entry a silent no-op, which is correct for PostToolUse/PreInvocation/Stop but is the [Bug]: Can not use antigravity cli in orac (ssh) #2426 deny on the gate. It now emits {"decision":"ask"} for gate events, so the worst case is "no status", never "no tools". This matters because ~/.gemini/config/hooks.json lives outside Orca and outlives ~/.orca — an uninstall, a re-provisioned SSH home, or dotfile sync leaves the entry pointing at nothing. Non-gate events keep the byte-identical old guard, and the diff tests both directions. [Bug]: Can not use antigravity cli in orac (ssh) #2426 was itself an SSH report, and installRemote now goes through the same command builder, asserted in remote-hook-service-installers.test.ts.
  • The one hole, stated in the body and confirmed in the source: a missing Windows wrapper. On Windows the hooks.json command is the bare wrapper path (required by fix(agent-hooks): drain stdin before hook script early exits so agents never hit EPIPE #8430 — Antigravity spawns it as argv[0], so it cannot be an if exist launcher). getWindowsWrapperScript answers the gate itself when the shared core antigravity-hook.cmd is missing, but nothing can answer when the wrapper file itself is gone. That is the residual deny path.

On the decision value. Orca answers {"decision":"ask"} — per Google's published docs, "Prompts the user, but respects 'Always Allow' settings" — which is the only documented value that hands the decision back to the user's own configuration, rather than granting it (allow), forcing a prompt regardless of stored grants (force_ask), or denying. The reasoning that allow would be actively harmful holds up: Antigravity's permissions engine defaults unconfigured command / mcp / execute_url / non-workspace file actions to Ask, so allow would suppress exactly the prompts a default install relies on — and it would do so on every platform and every SSH host, as a side effect of a status feature. The decision value is orthogonal to the feature: the script posts to /hook/antigravity regardless of what it echoes, so allow buys nothing. The diff backs this with an assertion that no script or wrapper ever contains allow, deny, force_ask, or deny_unless_prior_grant.

What the review loop established otherwise. Antigravity is the only supported agent with no "a tool just started" signal, so its panes show a bare spinner instead of "Working — Read(src/app.ts)". The consumer side was already fully implemented and tested — extractAntigravityToolFields and normalizeAntigravityEvent already parse PreToolUse, including the waiting state for ask_question / ask_permission. It was simply never fed one. This is an installer-side gap only.

On declining the identity registry: the reasoning holds on inspection. The recent runtime work (#14634 Cline, #14647 Qwen, #14675 Trae) migrated runtimes onto the declared identity registry because those runtimes were invisible to title-detection vocabulary. Antigravity already has a dedicated /hook/antigravity route and its own normalizer, so it is not an identity problem — its defect is a missing hook event kind. Force-fitting the registry here would not install the missing event. That is a different defect class, and the PR is right not to bundle it.

Validation — what was and was not done

Not done, and this is the headline gap: there is no live run and no before/after. The Antigravity CLI is not installed on the machine and is not distributed on npm (@google/antigravity-cli, @google/antigravity, @antigravity/cli all 404), so the sidebar was never A/B'd and the runtime's handling of each decision value was never empirically confirmed. The behavioural claims come from Google's published hooks and permissions docs, quoted verbatim, plus the repo's own history (#2426 → #2501). The PR says so plainly rather than implying otherwise. #12898's author reports an empirical A/B showing the sidebar goes live the moment a PreToolUse hook is added, but that is the reporter's evidence, not this PR's.

The body also flags the right thing for a reviewer who does have agy installed: confirm that {"decision":"ask"} does not introduce a prompt for a tool the user has already allowed. If it does, the correct response is an explicit opt-in, not falling back to allow.

Done: 220 passed / 3 skipped (pre-existing win32-only skips) across the antigravity, installer, remote-installer, and listener suites, plus a regression sweep over the nine other agents sharing wrapPosixHookCommand (14 files, 93 passed). tsc -p config/tsconfig.node.json --noEmit, oxlint, and oxfmt clean. Non-vacuity proven by reverting hook-service.ts and installer-utils.ts to main while keeping the new tests — 9 fail, including both executable-behaviour tests.

The new tests execute the generated shell rather than string-matching it: running the installed antigravity-hook.sh with ORCA_ANTIGRAVITY_EVENT=PreToolUse and asserting stdout is exactly {"decision":"ask"}\n at exit 0; deleting ~/.orca/agent-hooks and then running the hooks.json command string to confirm it still answers the gate (the #2426 belt); asserting non-gate events stay silent under the same conditions so the guard change is scoped; and asserting a present script wins over the fallback so it cannot shadow a real hook.

Platforms: macOS only. Windows wrappers are covered by the withPlatform('win32') harness and SSH by the fake-SFTP remote installer suite — unit tests, not hardware.

Known limits a reviewer should read

  • ask semantics are documented, not empirically confirmed on a live agy.
  • Antigravity's behaviour when multiple PreToolUse hooks return different decisions is undocumented and unverified. Orca always returns the non-deciding value, so it can never be the hook that loosens a user's gate, but the precedence rule itself is unknown.
  • The Windows missing-wrapper case above.
  • Existing installs report partial until reinstall — the same migration path Fix Antigravity tool calls blocked by Orca hook #2501 used in the opposite direction. Stale pre-Fix Antigravity tool calls blocked by Orca hook #2501 PreToolUse entries are replaced, not appended.

Superseded

Supersedes #12993 (@innocarpe) — verified CLOSED, so the claim holds. It shares the correct diagnosis and much of the installer structure (credit noted in the body for identifying that only the installer was missing, and for the Windows wrapper plumbing). It is superseded on two specific points: it returns {"decision":"allow"}, auto-approving every tool call Orca observes, and it replaces the comment that warned about exactly this with a claim that allow is the only valid response — which the documented five-value table contradicts; and it leaves the missing-script guard silent, so it can reintroduce #2426 wherever hooks.json outlives the managed script.

#2501 is explicitly NOT superseded — verified MERGED (@nwparker). It was the correct fix for the constraint as it stood, and this PR keeps its stale-entry cleanup behaviour intact rather than reverting it.

Also not in scope: #13626 / STA-1095 (Kilo status + resume) is the other half of this cluster, a different mechanism, deliberately left out; open PR #13990 covers the resume slice.

One incidental refactor: wrapPosixHookCommand moved to posix-hook-command.ts because the new options parameter pushed installer-utils.ts past max-lines, and per AGENTS.md a disable is not an option. The new third parameter is optional and the emitted string is byte-identical for all 11 existing callers (asserted).

@brennanb2025
brennanb2025 merged commit 8ea5dd8 into main Aug 18, 2026
45 checks passed
paidaxingyo666 pushed a commit to paidaxingyo666/Manta that referenced this pull request Aug 21, 2026
…ool permissions (stablyai#14701)

* fix(antigravity): install a PreToolUse status hook without deciding tool permissions

Antigravity is the only supported agent with no pre-tool signal, so its panes
show a bare "Working" spinner for the whole tool call instead of the live
"Working - <tool>(<input>)" readout every other agent gets.

The consumer side already handles it — extractAntigravityToolFields and
normalizeAntigravityEvent parse PreToolUse (including the `waiting` state for
ask_question/ask_permission) and are covered by tests. Only the installer was
missing the event.

PreToolUse was installed originally and removed in a480e6b (stablyai#2501) because the
observational `{}` response violates Antigravity's schema and is read as a deny
(stablyai#2426). Re-add it with the one documented decision that defers to the user's
permission config rather than overriding it:

- `ask` — "Prompts the user, but respects 'Always Allow' settings."
- `allow` — "Automatically allows the tool execution." (would silently
  auto-approve every tool call Orca observes)

The hooks.json guard for a missing managed script previously drained stdin and
printed nothing, which is exactly the stablyai#2426 deny. Gate events now emit their
response from the guard too, so a swept ~/.orca cannot brick tools on a host
whose ~/.gemini/config/hooks.json survives.

Fixes stablyai#12898

* fix(antigravity): list posix-hook-command.ts in the CLI typecheck project

The CLI project enumerates its main-side files explicitly, so the extracted
module needs an entry alongside its sibling runtime-home-hook-command.ts.
dallascrilley pushed a commit to dallascrilley/orca that referenced this pull request Aug 27, 2026
…ool permissions (stablyai#14701)

* fix(antigravity): install a PreToolUse status hook without deciding tool permissions

Antigravity is the only supported agent with no pre-tool signal, so its panes
show a bare "Working" spinner for the whole tool call instead of the live
"Working - <tool>(<input>)" readout every other agent gets.

The consumer side already handles it — extractAntigravityToolFields and
normalizeAntigravityEvent parse PreToolUse (including the `waiting` state for
ask_question/ask_permission) and are covered by tests. Only the installer was
missing the event.

PreToolUse was installed originally and removed in a480e6b (stablyai#2501) because the
observational `{}` response violates Antigravity's schema and is read as a deny
(stablyai#2426). Re-add it with the one documented decision that defers to the user's
permission config rather than overriding it:

- `ask` — "Prompts the user, but respects 'Always Allow' settings."
- `allow` — "Automatically allows the tool execution." (would silently
  auto-approve every tool call Orca observes)

The hooks.json guard for a missing managed script previously drained stdin and
printed nothing, which is exactly the stablyai#2426 deny. Gate events now emit their
response from the guard too, so a swept ~/.orca cannot brick tools on a host
whose ~/.gemini/config/hooks.json survives.

Fixes stablyai#12898

* fix(antigravity): list posix-hook-command.ts in the CLI typecheck project

The CLI project enumerates its main-side files explicitly, so the extracted
module needs an entry alongside its sibling runtime-home-hook-command.ts.
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…ool permissions (stablyai#14701)

* fix(antigravity): install a PreToolUse status hook without deciding tool permissions

Antigravity is the only supported agent with no pre-tool signal, so its panes
show a bare "Working" spinner for the whole tool call instead of the live
"Working - <tool>(<input>)" readout every other agent gets.

The consumer side already handles it — extractAntigravityToolFields and
normalizeAntigravityEvent parse PreToolUse (including the `waiting` state for
ask_question/ask_permission) and are covered by tests. Only the installer was
missing the event.

PreToolUse was installed originally and removed in 9a330ef (stablyai#2501) because the
observational `{}` response violates Antigravity's schema and is read as a deny
(stablyai#2426). Re-add it with the one documented decision that defers to the user's
permission config rather than overriding it:

- `ask` — "Prompts the user, but respects 'Always Allow' settings."
- `allow` — "Automatically allows the tool execution." (would silently
  auto-approve every tool call Orca observes)

The hooks.json guard for a missing managed script previously drained stdin and
printed nothing, which is exactly the stablyai#2426 deny. Gate events now emit their
response from the guard too, so a swept ~/.orca cannot brick tools on a host
whose ~/.gemini/config/hooks.json survives.

Fixes stablyai#12898

* fix(antigravity): list posix-hook-command.ts in the CLI typecheck project

The CLI project enumerates its main-side files explicitly, so the extracted
module needs an entry alongside its sibling runtime-home-hook-command.ts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Antigravity panes show no live "tool in progress" status, unlike every other supported agent (no PreToolUse hook installed)

2 participants