Skip to content

fix(server): wire Antigravity HTTP MCP tools, ask_question forms, 1.5 errors, and per-model thinking levels - #1065

Merged
badcuban merged 1 commit into
mainfrom
feat/antigravity-audit-fixes
Nov 23, 2026
Merged

badcuban merged 1 commit into
mainfrom
feat/antigravity-audit-fixes

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

Problem

Several gaps remained in the Antigravity CLI (agy acp 1.5) integration:

  • Threadlines' built-in HTTP MCP servers (browser panel, rooms, pages, commands, devices) were filtered out because agy acp omits agentCapabilities.mcpCapabilities.http in initialize even though it accepts type: "http" servers in session/new / session/resume / session/load.
  • Antigravity 1.5 JSON quota/error payloads ("reason": "QUOTA_EXHAUSTED", "retryDelay", protobuf-prefixed gRPC status names), VALIDATION_REQUIRED account-verification errors, mid-turn 401 blips, and upstream errors written during post-prompt wake-up replies were missed or misclassified.
  • Antigravity's ask_question tool emits ACP form elicitations (elicitation/create) pairing qN choices with qN_other free-text fields, which were not advertised or handled.
  • Model discovery only recorded thought_level options for the initially selected model rather than probing every model in the account's catalog.
  • Throwaway sessions opened for sign-in checks, model discovery, and text generation left SQLite/brain/annotation files behind in the profile; Gemini Enterprise usage requests sent {} without the configured GCP project; and the child environment did not strip Electron internals or set non-interactive pager / Linux CA bundle fallbacks.

Fix

  • HTTP MCP delivery (assumeHttpMcp): Added an opt-in descriptor flag forwarded to AcpSessionRuntime.supportedMcpServers and AcpAdapter's roomToolsAttached, enabled on Antigravity.
  • ACP form elicitations (ask_question): Advertised clientCapabilities.elicitation.form, registered elicitation/create and session/elicitation handlers in AcpAdapter (with generic ComposerMcpElicitation fallback), and added extractAntigravityElicitationForm to fold qN / qN_other single- and multi-select questions in numeric order into standard question cards.
  • 1.5 error parsing & post-settle checks: Updated AntigravityTurns for JSON + Go-map quota/reset details, canonical gRPC status matching, VALIDATION_REQUIRED verification links, and retryable mid-turn 401s. Extended AcpTurnMachine and AcpAdapter to re-check readOutcome before a held turn settles whenever the agent spoke after its prompt answered.
  • Per-model thought_level probing: Added discoverModelOptions on AcpProviderDescriptor to cycle models inside the single discovery or sign-in verification session, cache every model's thinking levels (with probed: true), and restore the starting model. Added Extra High / XHigh fallback folding.
  • Env hardening, Enterprise usage & cleanup: Stripped ELECTRON_RUN_AS_NODE / CHROME_CRASHPAD_PIPE_NAME, set non-interactive pager/git defaults and Linux SSL_CERT_FILE fallback, passed { project } on Cloud Code usage requests when configured, and removed ephemeral session files after probe/auth/text-generation scopes exit.

Checks

  • vp fmt, vp lint, vp run typecheck (14/14 packages)
  • vp run --cache '@threadlines/server#test' Antigravity (10/10 files, 186/186 tests)
  • vp run --cache '@threadlines/server#test' Acp (29/29 active files, 274/274 active tests, including the AcpTurnMachine state-space explorer)
  • Note: updated two expectations in AcpTurnMachine.test.ts (checkWorld and "a batched launch counts each subagent...") for the new post-settle readOutcome step after agentOutput.
  • Live signed-in Google / Gemini Enterprise behavior (quota API User-Agent, live ask_question, live { project } Enterprise quota) still needs a real signed-in run on a dev/nightly build.

… errors, and per-model thinking levels

Antigravity sessions dropped Threadlines' HTTP MCP tools because agy acp omits mcpCapabilities.http in initialize, missed Antigravity 1.5 JSON quota/verification/post-settle errors, did not handle ask_question form elicitations, only cached thinking levels for one model at a time, and left throwaway probe/auth/text-generation session files behind.

Added assumeHttpMcp for HTTP MCP delivery, handled ACP form elicitations (folding Antigravity's qN/qN_other pairs into question cards), updated error parsing and turn-machine post-settle log checks, probed per-model thought_level options in one session during sign-in and discovery, hardened the child process environment, passed the GCP project on Gemini Enterprise usage requests, and cleaned up ephemeral session files on exit.
@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Nov 23, 2026 8:27pm UTC

Request Review

@badcuban
badcuban added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit bbb5c59 Nov 23, 2026
23 checks passed
@badcuban
badcuban deleted the feat/antigravity-audit-fixes branch November 23, 2026 20:40

This branch was previously deployed

1 inactive deployment
Preview — b83ae55c Deployed Nov 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant