diff options
| author | t <t@tjp.lol> | 2026-12-01 16:31:43 -0700 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-12-04 13:53:47 -0700 |
| commit | 8c1c5786ebfe8dda40a70571f332e876b184ad4d (patch) | |
| tree | 1116068ae630c45c1218b17fabb3d253bb8003d9 /README.md | |
| parent | f7a1e30c1dfbe5fddcbfe38e89a0c5efef9fbeab (diff) | |
Isolate ACP via custom agent and add steering, usage, reseed, and footer updates
Replace the osascript permission dialog and settings.json permission seed with
a per-thread generated custom main agent (excludeDefaultComponents, tools: [],
no inherited customizations or MCP) launched with --agent,
--include-default-customizations=false, and --dangerously-skip-permissions.
Keep HOME unchanged (isolating via --gemini-dir only) so macOS finds the login
Keychain, mark exported tools with antigravity/alwaysLoad, and require the
relay to serve tools/list before the first prompt.
Add ACP turn steering for queued user and workflow text at tool boundaries,
preserve agent_thought_chunk thinking blocks with block-aware checkpoint
hashing, report live usage_update context snapshots and deduplicated final plus
steering token usage, and mount a live above-input native tool activity
component for up to six non-MCP ACP calls.
Support reseeding a new ACP session from history_transcript after /tree or cold
resume, allow direct submissions to take over an idle session from another
thread, and let extension follow-ups continue a matching warm session. Update
the usage footer with startup and three-minute timer refreshes, 1w/5h labels,
per-letter antigravity colors, and expired-bucket handling.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 23 |
1 files changed, 19 insertions, 4 deletions
@@ -17,12 +17,27 @@ reasoning_levels = ["low", "medium", "high", "xhigh"] `-r high` or Ctrl+R requests `high` for the next turn. On `agy` 1.5.19 the provider selects the ACP model first, then checks that model’s `thought_level` choices and confirms the requested level before prompting. Without an explicit level it leaves the ACP setting alone. Pickers that advertise suffixed model IDs still use those variants (exact configured ID, otherwise `medium` when no level is requested). Panto currently shows the protocol-wide levels in Ctrl+R, so a narrower family can reject an unavailable level; the provider never silently substitutes one. The same configuration works in a rig. For a locally built rock (`luarocks --lua-version 5.4 --tree <Panto rock tree> make`), use `rocks = ["panto-antigravity"]` instead of `paths`. Nothing is published or installed globally by the checks. -**Usage footer (TUI only):** One shared row across aliases alongside Claude, Codex, Copilot and OpenCode Go. It shows **percent used**, a five-cell bar and reset countdown per reported bucket (73% remaining → `27% ━────`). No account request on startup. An authenticated direct turn refreshes through the CLI’s fixed read-only `/usage` command, at most once a minute. The extension reads only the signed CLI’s stdout: it never calls Google quota endpoints or reads account tokens. [Google’s `/usage` command](https://antigravity.google/docs/cli/commands/usage/) may itself refresh from Google’s backend. Malformed or failed reads show unavailable; expired/reset readings aren't shown as current. No token-count estimates or raw CLI messages. `usage_footer = false` opts a provider out. The footer validates the `/usage` output, not the CLI version. +**Top-line stats:** ACP's final `session/prompt` usage feeds Panto's session totals, cache hit rate and model pricing once per completed turn, including turns with multiple tool calls. Set `input`, `output`, `cache_read` and `cache_write` (USD per million tokens) in the model's `models.toml` table to estimate cost. This is not a subscription charge. `usage_update` reports a separate context snapshot (`used`, `size`); a Panto build supporting `metadata.context_window` uses it instead of mistaking summed prompt inputs for context occupancy. The adapter publishes the latest snapshot at Panto tool boundaries as well as at final completion. A long turn can still show no reading (or the last reading) if agy hasn't sent a new snapshot; the adapter doesn't substitute cumulative cache traffic for occupancy. Missing or inconsistent token totals aren't estimated. -**Setup & diagnostics:** `/antigravity-status` shows local connection state; `/antigravity-models` lists advertised families; for split ACP settings, levels are shown only for the selected model. Neither contacts Google. The isolated profile is `~/.local/share/panto-antigravity/google`. For native login once that directory exists: `profile="$HOME/.local/share/panto-antigravity/google"; HOME="$profile" agy acp --gemini-dir "$profile" --login`. When upgrading from the prototype, update your extension path, protocol and model selection, then start a new thread. No credentials or old checkpoints are migrated automatically. +**Usage footer (TUI only):** One shared row across aliases alongside Claude, Codex, Copilot and OpenCode Go. It shows **percent used**, a five-cell bar and reset countdown per reported bucket (73% remaining → `27% ━────`). The TUI requests an initial reading on startup using the CLI’s fixed read-only `/usage` command, without sending a model prompt. While an enabled Antigravity model is selected, a three-minute timer refreshes the row even when no turn starts or finishes. Startup, timer and turn reads share a one-minute cooldown and never overlap. The extension reads only the signed CLI’s stdout: it never calls Google quota endpoints or reads account tokens. [Google’s `/usage` command](https://antigravity.google/docs/cli/commands/usage/) may itself refresh from Google’s backend. Malformed or failed reads show unavailable; expired/reset readings aren't shown as current. No token-count estimates or raw CLI messages. `usage_footer = false` opts a provider out. The footer validates the `/usage` output, not the CLI version. -**Tools:** By default the `pantograph` MCP server exports the active Panto tools, including extension tools. They run with Panto's permissions, not agy's shell sandbox. Use a trusted rig; if it contains tools you don't want Neon to run, narrow `tools` or disable those extensions in the rig. Full input schemas are listed, including nested arrays and objects; an unsupported schema constraint rejects the call rather than disabling the catalog. On `session/new` and `session/resume`, the adapter requests `_meta.disableBuiltInTools = true` (recognized by agy 1.5.19). Before launching ACP with tools, the extension creates `antigravity-cli/settings.json` in its isolated profile if absent, allowing `mcp(pantograph/*)` so exported tools don't prompt by default. Existing settings are never overwritten. To restore prompts, replace that allow rule with an `ask` rule for the same server. Other servers and native tools receive no grant. After restarting Panto, start a **fresh thread**, ask Neon to read `README.md`, and check for the Panto read card. `/antigravity-status` distinguishes configured tools from an actual MCP list request and counts accepted MCP calls. +**Setup & diagnostics:** `/antigravity-status` shows local connection state; `/antigravity-models` lists advertised families; for split ACP settings, levels are shown only for the selected model. Neither contacts Google. The isolated profile is `~/.local/share/panto-antigravity/google`. For native login once that directory exists: `agy acp --gemini-dir "$HOME/.local/share/panto-antigravity/google" --login`. Keep `HOME` unchanged so the CLI can find the macOS login Keychain. When upgrading from the prototype, update your extension path, protocol and model selection, then start a new thread. No credentials or old checkpoints are migrated automatically. -**Boundaries:** Direct idle text submissions only: no startup prompts, print/proxy calls, child agents, compaction, queued input or automatic retries. Enter identifies a TUI path, not proof of personhood; don't automate this route. Keep the profile free of delegation hooks/servers and exclude delegation tools from the rig or use an explicit allowlist on this personal route. The relay supports text/image results. Unexpected ACP permission requests still show a macOS allow-once/deny dialog. Turns share one warm ACP process. Optional `save_session = true` resumes a completed matching checkpoint (writes local state even under `--incognito`); no transcript replay. Force-kill can leave a stale socket or lock: confirm the owner is gone before removing it. +**Tools:** By default the `pantograph` MCP server exports the active Panto tools, including extension tools. They run with Panto's permissions, not agy's shell sandbox. Use a trusted rig; if it contains tools you don't want Neon to run, narrow `tools` or disable those extensions in the rig. Full input schemas are listed, including nested arrays and objects; an unsupported schema constraint rejects the call rather than disabling the catalog. ACP now selects a per-thread [custom main agent](https://antigravity.google/docs/subagents/) with `excludeDefaultComponents: true`, `tools: []`, and no inherited customizations or MCP. The agent file in the isolated profile declares only the thread's `pantograph` relay (none for `tools = []`); each exported tool requests eager loading so agy need not read schema files with a native tool. The same relay is passed explicitly to ACP `session/new` or `session/resume` so agy discovers it during setup. With tools exported, the adapter requires a live relay that served `tools/list` before sending the first prompt. Schema-cache timestamps are not used. The Panto rig prompt still uses ACP's advertised append extension. + +**Native tool visibility:** During a prompt, reported ACP native calls such as `manage_task` appear above the input with their name and status. The component shows the latest six calls until the next prompt or session close; it isn't saved transcript history. It never executes tools or prints raw inputs/results. Calls through the Panto relay still get their ordinary Panto cards, not duplicates. + +**Live acceptance check:** Restart Panto after each config change and use a fresh thread in a disposable workspace without other agents, hooks or MCP servers. Generate a fresh marker with `uuidgen > panto-probe.txt` before each test; don't paste its contents into chat. + +1. Set `tools = ["std.read"]`. Ask Neon to read `panto-probe.txt` and return its contents. Require the exact marker **and** a Panto read card; `/antigravity-status` should count a call. +2. Set `tools = []`, regenerate the marker, and ask again, expressly allowing a native read or shell if available. Neon should not obtain the new marker. An exact match is an isolation failure. A refusal is behavioral evidence, not a complete inventory of tool declarations. + +**Approval:** Every ACP chat launch uses `--dangerously-skip-permissions` and `--sandbox`, even with `tools = []`. This skips agy's approvals for native tools as well as MCP tools. Use a trusted rig. The Panto tool allowlist still applies, and the separate read-only `/usage` query is unchanged. + +**Steering and thinking:** Plain Enter during a tool-using turn steers at the next tool boundary. Queued text and workflow notices go to the same live agy session as user input, not as tool output. Ctrl+Enter queues a separate follow-up. If an earlier failure left an unanswered text message, resume that Panto thread and press Ctrl+P (`/proceed`) in the idle TUI to send the pending message once; this requires the Panto build with direct `/proceed` provenance. Reload alone does not retry it. Ctrl+K shows thinking text **if agy sends it**; reasoning-token counts are not displayable text. + +**Branch and resume:** Matching live turns keep the warm ACP session. With `save_session = true`, an exact saved checkpoint can resume natively (local state is written even under `--incognito`). Otherwise, the next direct submission after `/tree` or a cold resume starts a new ACP session: Panto sends its selected `history_transcript` as background and the new request once, in a single user message. Past tool calls and results are text, not dispatches. If Panto cannot supply the transcript for existing history, the turn fails rather than silently dropping context. + +**Boundaries:** Only a direct idle TUI submission can start, resume or reseed an ACP session. Once a turn completes, extension-submitted text (including workflow completion notices) can continue the same live primary thread if its checkpoint still matches. This checks session continuity, not the text prefix or which extension submitted it. No startup prompts, print/proxy calls, child-provider requests, compaction or automatic retries. Enter identifies a TUI path, not proof of personhood; don't automate this route. Keep the profile free of delegation hooks/servers and exclude delegation tools from the rig or use an explicit allowlist on this personal route. The relay supports text/image results. Force-kill can leave a stale socket, lock or generated `config/agents/panto-*.md` in the isolated profile: confirm the owner is gone before removing it. **Offline release check:** `PANTO=/path/to/provenance-aware/panto mise run check` exercises source and installed-rock loading, renders the real footer with a fake CLI, and checks tool execution, resume, and headless rejection. No installed `agy` or Google account is used. See [evidence and compatibility](docs/findings.md). |
