Repository navigation
[3843 by Claude Opus 5.5] Extensions: Antigravity (agy) runtime (MCP servers, skills, ProPR MCP) - #3851
Conversation
Antigravity is now turned on in the capability map for extensions, ProPR MCP and skills. The new tests and the updated capability tests pass, and lint and typecheck of the changed core files are clean.
One test still fails: "catalog stdio is callable…" in `packages/core/test/extensionProfiles.test.ts`, with `stdio fixture closed`. The unmodified HEAD copy of the test fails the same way in this container, so this change didn't cause it.
What the run does now
- Launch: `AntigravityAgent.executeTask` already went through `executeWithExtensions`. The Docker call now also sets `extensionAgentLaunch` and passes the tokens and stdio secrets by variable name only. The container now joins the run's Docker network instead of always using `bridge`, so it can reach `http://api:4000`.
- MCP config: the worker sends a config template with no tokens in it (new builder in `packages/core/src/agents/mcpLaunch/antigravityMcpLaunch.ts`). Because agy doesn't expand `${VAR}`, the entrypoint writes the real token into `<runtime HOME>/.gemini/config/mcp_config.json`. The file is container-only, owned by node, mode 0600, deleted when agy exits and never synced back to the host `~/.gemini`. agy itself is started without the token variables.
- `exclusiveMcp`: the run's file replaces any existing `mcp_config.json`. Without it, the files are merged and the run's servers win on a name clash.
- 401 handling: before starting agy, the entrypoint sends one `initialize` to each remote server with the run token. A 401 stops the run straight away with exit 3 and `PROPR_MCP_AUTH_FAILED: MCP server "<name>" refused the run credential (HTTP 401)…`, instead of agy waiting in OAuth discovery.
- Skills: staged bundles are copied to `<runtime HOME>/.gemini/skills/<name>/`, starting from an empty folder when `exclusiveMcp` is set. This needed one new optional field, `toolPolicy.skills` (bundle id and name), filled in by `extensionLaunch`.
- Docs and existing tests: `agent-extensions.md` has a new "Antigravity configuration" section, which covers the workspace `.agents/`, `.claude/`, `.gemini/` and `.cursor/skills` folders. Tests that used Antigravity as the example of an unsupported runtime now use Vibe. The refusal message now reads "Claude, Codex or Antigravity".
Tests: `test/antigravityExtensionLaunch.test.ts` checks that the token is absent from the Docker args and the template. It also runs the real entrypoint with a stub agy, a local HTTP server and a stub stdio server. That covers the token being only in the 0600 file, the agent env lacking it, the file being deleted and never reaching the host dir, the exclusive replace versus the merge, the skills copy, and the 401 stop.
I also ran the installed agy 1.5.15 (not logged in) through the entrypoint against a local stub server. It read the rendered file and sent the substituted header. I couldn't reproduce the full 240 s hang without a login.
Limits you should know about
- Mid-run 401s still hang: the check runs only at launch. The gateway also returns 401 when a grant's budget runs out, or when more than 4 requests are in flight at once. agy connects to all servers at the same time when it starts, so a run with 5 or more gateway servers could hit that limit and hang anyway.
- Gateway budget:
- agy sends `server/discover` first. The gateway rejects that method with a 403, and a failed request uses the full 1 MiB response allowance from the run's 16 MiB budget, once per server per launch.
- The launch check also uses one of the run's 256 calls per server.
- A gateway change that answers `server/discover` cheaply would be worth doing.
- GET to the gateway answers 401: agy also sends a `GET` to each server URL. That route isn't registered, so ProPR's general API login check answers it with 401. In my test agy behaved the same whether that GET got a 401 or a 405, so I left the API alone.
- Display: MCP tool steps in the logs and live view depend on #3830, which is still open. I didn't take on any of its parsing work.
There are no preview images: no UI code changed.
ProPR-Agent: claude/claude-opus-5-5
|
/ultrafix goal=8 max=8 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 8) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThis PR enables Antigravity extensions through the shared capability map, Docker launch policy, and disposable runtime configuration. The change is appropriately scoped and appears merge-ready, conditional on the pending checks completing successfully. ✅ Credential handling — Remote tokens travel through named environment variables, are rendered into a mode-0600 runtime file, and are removed from the agent’s environment. ✅ Launch integration — The task launcher now forwards extension mounts, credentials, and the selected Docker network through the existing execution infrastructure. ✅ Focused coverage — The added tests exercise the real entrypoint with fixtures covering configuration replacement, merging, skills, cleanup, stdio credentials, and launch-time 401 refusal. This assessment uses static analysis of the supplied diff and context; no commands were run. Current checks report 19 passed, five pending, and no failures. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Exercise actual client startupThe entrypoint tests use a stub agent that reads the generated configuration directly. A follow-up integration test using the supported S2: 🟢 Clarify exclusive configuration scopeThe new documentation correctly notes that workspace MCP configuration remains available even during exclusive extension runs. Consider explicitly stating that ScoreThe implementation is cohesive and includes targeted regression coverage, with no verified merge blocker in the supplied code. Final confidence remains conditional on the pending checks and actual-client compatibility coverage. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
AI Implementation Summary
Closes #3843
Branch:
3843/claude-opus-5-5-extensions-antigravity-ag-20261127-1634-6kfCommits: ✅ Changes committed (f41a4fb)
AI Processing Completed
Execution Details:
Summary:
Antigravity is now turned on in the capability map for extensions, ProPR MCP and skills. The new tests and the updated capability tests pass, and lint and typecheck of the changed core files are clean.
One test still fails: "catalog stdio is callable…" in
packages/core/test/extensionProfiles.test.ts, withstdio fixture closed. The unmodified HEAD copy of the test fails the same way in this container, so this change didn't cause it.What the run does now
AntigravityAgent.executeTaskalready went throughexecuteWithExtensions. The Docker call now also setsextensionAgentLaunchand passes the tokens and stdio secrets by variable name only. The container now joins the run's Docker network instead of always usingbridge, so it can reachhttp://api:4000.packages/core/src/agents/mcpLaunch/antigravityMcpLaunch.ts). Because agy doesn't expand${VAR}, the entrypoint writes the real token into<runtime HOME>/.gemini/config/mcp_config.json. The file is container-only, owned by node, mode 0600, deleted when agy exits and never synced back to the host~/.gemini. agy itself is started without the token variables.exclusiveMcp: the run's file replaces any existingmcp_config.json. Without it, the files are merged and the run's servers win on a name clash.initializeto each remote server with the run token. A 401 stops the run straight away with exit 3 andPROPR_MCP_AUTH_FAILED: MCP server "<name>" refused the run credential (HTTP 401)…, instead of agy waiting in OAuth discovery.<runtime HOME>/.gemini/skills/<name>/, starting from an empty folder whenexclusiveMcpis set. This needed one new optional field,toolPolicy.skills(bundle id and name), filled in byextensionLaunch.agent-extensions.mdhas a new "Antigravity configuration" section, which covers the workspace.agents/,.claude/,.gemini/and.cursor/skillsfolders. Tests that used Antigravity as the example of an unsupported runtime now use Vibe. The refusal message now reads "Claude, Codex or Antigravity".Tests:
test/antigravityExtensionLaunch.test.tschecks that the token is absent from the Docker args and the template. It also runs the real entrypoint with a stub agy, a local HTTP server and a stub stdio server. That covers the token being only in the 0600 file, the agent env lacking it, the file being deleted and never reaching the host dir, the exclusive replace versus the merge, the skills copy, and the 401 stop.I also ran the installed agy 1.5.15 (not logged in) through the entrypoint against a local stub server. It read the rendered file and sent the substituted header. I couldn't reproduce the full 240 s hang without a login.
Limits you should know about
server/discoverfirst. The gateway rejects that method with a 403, and a failed request uses the full 1 MiB response allowance from the run's 16 MiB budget, once per server per launch.server/discovercheaply would be worth doing.GETto each server URL. That route isn't registered, so ProPR's general API login check answers it with 401. In my test agy behaved the same whether that GET got a 401 or a 405, so I left the API alone.There are no preview images: no UI code changed.
Review digest
Risk-tiered paths
packages/core/src/agents/agentToolPolicy.ts(+1/−1)packages/core/src/agents/impl/AntigravityAgent.ts(+7/−6)packages/core/src/agents/impl/utils/antigravityDockerArgsBuilder.ts(+14/−3)packages/core/src/agents/mcpLaunch/antigravityMcpLaunch.ts(added, +65/−0)packages/core/src/agents/mcpLaunch/index.ts(+3/−0)packages/core/src/agents/types.ts(+5/−0)packages/core/src/extensions/extensionLaunch.ts(+1/−1)packages/shared/src/agentRuntimeCapabilities.ts(+4/−3)scripts/antigravity-entrypoint.sh(+146/−5)docs/docs/features/agent-extensions.md(+36/−7)packages/api/test/taskSubmissionRoutes.test.ts(+2/−2)packages/core/test/extensionProfiles.test.ts(+6/−4)test/agentDefinitionsContract.test.ts(+2/−2)test/agentRunTrigger.test.ts(+10/−10)test/agentRuntimeCapabilityGates.test.ts(+3/−3)test/antigravityExtensionLaunch.test.ts(added, +208/−0)Diff size: 16 files changed, +513/−47 lines
View task for the run's logs and conversation.
This PR was created automatically by ProPR after processing issue #3843.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!