Skip to content

feat(config): Antigravity as a first-class client for config and Project Skills - #56

Merged
Winlifes merged 3 commits into
FunplayAI:mainfrom
dehuaichendragonplus:feat/antigravity-client
Sep 7, 2026
Merged

Winlifes merged 3 commits into
FunplayAI:mainfrom
dehuaichendragonplus:feat/antigravity-client

Conversation

@dehuaichendragonplus

@dehuaichendragonplus dehuaichendragonplus commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Adds one-click Antigravity MCP configuration and Project Skills support. Funplay's Unity endpoint is configured per workspace, so it is not automatically exposed in unrelated Antigravity workspaces.

Configuration and Skills

  • Writes .agents/mcp_config.json with mcpServers entries using serverUrl, following the current Antigravity MCP documentation.
  • Resolves one workspace root for MCP configuration, .agents/skills/, and AGENTS.md: the nearest Git ancestor, including worktrees, or the Unity project directory outside Git. The configuration dialog identifies the directory to open in Antigravity.
  • Preserves unrelated JSON settings and servers. Endpoint matching and rename cleanup honor each client's endpoint key, including serverUrl.
  • Reports existing Funplay entries in both current and legacy global config locations without modifying those files or falling back to global scope.
  • Shares the managed instructions block with other clients when their paths coincide. Nested Unity projects receive Antigravity guidance at the workspace root while existing clients keep their instruction locations. Platform toggles preserve user-authored text and other platforms' instructions.
  • Prevents a different nested Unity project from deleting workspace Antigravity Skills while configuring another client, or overwriting another project's managed workspace guidance.
  • Updates the English and Chinese README and the changelog, including PR attribution and legacy instruction migration coverage.

Validation

Unity 2022.3.62f3c1, dedicated FunplayMcp project: 89 EditMode tests passed, 0 failed, 0 skipped across:

  • Antigravity configuration: workspace isolation, nested roots and worktrees, complete JSON writes, idempotence, rename cleanup, comment preservation, and both global config locations.
  • Project Skills generation, shared instructions, version status, platform toggles, and workspace ownership.
  • Existing Claude Code config migration, project-root resolution, multi-editor naming/ports, JSON rewrite guards, and Skills notice tests.

git diff --check passed. This was a focused regression run, not the full Unity suite. An actual Antigravity client connection was not exercised on this host.

dehuaichendragonplus and others added 3 commits September 7, 2026 10:21
…ect Skills

Antigravity keeps its MCP servers in a single global
~/.gemini/config/mcp_config.json (the alternative, per-plugin
plugins/<name>/mcp_config.json, only loads with its plugin, so it is not a
place a Unity plugin should be writing to). Its remote-server spec names the
endpoint serverUrl, not the url key every other JSON client here uses --
Antigravity's McpServerSpec has no url field at all, so an entry written in
the usual shape would sit in the config connecting to nothing. Its
documentation calls that field "SSE transport", but the shipped language
server registers exactly two connectors -- LocalSubprocessConnector for
command and StreamableHTTPConnector for serverUrl -- so the streamable-HTTP
endpoint this server exposes is what it actually speaks. MCPConfigTarget
gains an UrlFieldName (empty means url) so the endpoint key follows the
target instead of being hardcoded. Like Cursor/VS Code/Trae/Kiro, Antigravity
has no project-scoping concept in its config, so the entry is global and
stays distinguishable only by its per-project name.

Antigravity is also wired up as a Project Skills platform: SKILL.md bundles
are written to .agents/skills/ at the repository root. Its customization
discovery walks from the session's working directory up to the repo root, so
in a monorepo layout (git root above the Unity project folder) a .agents
inside the Unity folder would only ever be found by a session started at or
below it -- the same trap DeepSeek Harness's .dsh/skills placement avoids. It
reads AGENTS.md natively, so it joins Codex/OpenCode/DSH on the single shared
managed block (written while any of them is enabled, removed only when all
are disabled); the block's skills bullet gained the .agents/skills/ entry,
with the previous wording kept in the legacy-migration variant list so files
already on disk keep migrating instead of erroring.

## Tests

New EditMode coverage in ProjectSkillsManagerTests: the legacy-variant chain
now recognizes four renderings of the shared AGENTS.md wording (current,
pre-Antigravity, pre-DSH, Codex-only) instead of three; Antigravity's skills
land at the discovered git root and not inside the Unity project folder; and
Antigravity shares the AGENTS.md block with Codex while its own skill
directory tracks only its own toggle.
… key

RemoveSupersededFunplayEntries decides whether a recorded previous entry is
still ours to remove by checking that it points at a loopback URL, but it
only ever read that URL under the "url" key. Antigravity's entries carry the
endpoint under "serverUrl" instead, so after this project was renamed (or
toggled its hash suffix) and reconfigured, its previous Antigravity entry
looked hand-edited and was never retired, leaving two funplay entries on the
same port in ~/.gemini/config/mcp_config.json.

Both IsLoopbackEntry and RemoveSupersededFunplayEntries take an optional
urlFieldName that defaults to "url", and the JSON write path threads the
target's field name through. CreateHttpEntry gains a static overload taking
its inputs directly so the endpoint-key behavior can be tested without
constructing an MCPConfigTarget, and GetUrlFieldName centralizes the
empty-means-url fallback so every reader and writer of an entry's endpoint
resolves the key the same way.

## Tests

Two new EditMode tests in MultiEditorPortAndKeyTests: a previous entry
written under serverUrl is retired by the rename cleanup exactly like one
written under url, and CreateHttpEntry emits the requested key only (an
Antigravity-shaped entry carries serverUrl and no url).
@Winlifes
Winlifes merged commit 11ec711 into FunplayAI:main Sep 7, 2026
1 check passed
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.

2 participants