Skip to content

install.py: get_target_dir() and get_profile_dir() disagree on the ide flavor's directory #4

Description

@dandye

Summary

scripts/install.py resolves two different directories for the ide flavor depending on which function you look at, so a skills install and its MCP server config can end up split across two different Antigravity profile directories.

Root cause

get_target_dir() (used to decide where skills get installed) hardcodes the ide flavor to ~/.gemini/antigravity/skills:

elif flavor == "ide":
    return gemini_home / "antigravity" / "skills"

But get_profile_dir() (used to decide where the MCP config gets merged) prefers ~/.gemini/antigravity-ide/ when that directory already exists on disk:

if flavor == "ide":
    if (gemini_home / "antigravity-ide").exists():
        return gemini_home / "antigravity-ide"
    return gemini_home / "antigravity"

Both are meant to describe the same "ide" runtime profile, but they disagree whenever ~/.gemini/antigravity-ide/ exists.

Impact

Running python3 scripts/install.py --flavor=ide --mode=global on a machine where ~/.gemini/antigravity-ide/ exists:

  • installs the SecOps skills into ~/.gemini/antigravity/skills/
  • but merges the google-security-operations MCP server config into ~/.gemini/antigravity-ide/mcp_config.json

The skills load in one profile with no MCP server configured in that profile, and the MCP server is configured in a profile that never loaded the skills. There's no error at install time or at skill-invocation time — the SecOps tools simply aren't reachable.

Suggested fix

Have get_target_dir() and get_profile_dir() share one source of truth for the ide flavor's directory (e.g. have get_target_dir() call get_profile_dir() internally, or extract a single resolve_ide_home() helper both use), so skills and MCP config always land in the same profile.


Found while critically reviewing PR #2 / branch agy_plugin_v0001.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions