fix(agy): replace unreliable plugins.json discovery with a real installer #2

Merged
rootiest merged 1 commits from fix-agy-install-mcp-plugin into main 2026-08-25 00:17:50 +00:00
Owner

Why

The previous PR documented adding a ~/.gemini/config/plugins.json entry
pointing at dist/agy as the agy install path, mirroring Claude Code's
/plugin marketplace add. Testing that against a live agy session showed
it doesn't work: agy -p "list every skill and plugin available" reported
No plugins are currently loaded or discoverable in the active context
only a stray skill surfaced (via agy's generic skill-directory walk, not
plugin recognition), and none of a bundled mcp_config.json/hooks.json
ever loaded. Separately, plugins/core-essentials/mcp.json had been added
by hand directly at the repo root — never discovered by the generator,
and invalid JSON (missing the outer { }) besides.

What

  • New scripts/install_agy.py: symlinks each generated skill into
    ~/.gemini/config/skills/<name>/ (or a project's .agents/skills/ with
    --project), and merges each plugin's mcpServers/hooks into the
    shared global mcp_config.json/hooks.json without touching unrelated
    entries already there. --uninstall removes exactly what was added;
    --all or specific plugin names to select scope.
  • generate_plugins.py --install-local now shells out to it for the agy
    side instead of printing the (broken) plugins.json instructions.
  • Moved the hand-added mcp.json into plugins/core-essentials/mcp.json
    (where the generator actually looks), fixed the JSON, and wired its
    GitHub/Gitea tokens through ${VAR} env-var placeholders instead of
    requiring literal secrets in the file.
  • README's agy install section now documents the real, tested flow.

Manual Verification Checklist

  • python3 scripts/generate_plugins.py --check passes
  • python3 scripts/generate_plugins.py && python3 scripts/install_agy.py --all symlinks skills under ~/.gemini/config/skills/ and merges gitea/github into ~/.gemini/config/mcp_config.json
  • With GITEA_HOST/GITEA_ACCESS_TOKEN/GITHUB_PERSONAL_ACCESS_TOKEN exported, agy actually connects to both MCP servers (agy mcp list or equivalent)
  • python3 scripts/install_agy.py --uninstall --all cleanly removes the symlinks and the merged MCP entries, leaving any other entries in mcp_config.json untouched
  • --project targets a project's .agents/ instead of the global config
## Why The previous PR documented adding a `~/.gemini/config/plugins.json` entry pointing at `dist/agy` as the agy install path, mirroring Claude Code's `/plugin marketplace add`. Testing that against a live `agy` session showed it doesn't work: `agy -p "list every skill and plugin available"` reported `No plugins are currently loaded or discoverable in the active context` — only a stray skill surfaced (via agy's generic skill-directory walk, not plugin recognition), and none of a bundled `mcp_config.json`/`hooks.json` ever loaded. Separately, `plugins/core-essentials/mcp.json` had been added by hand directly at the repo root — never discovered by the generator, and invalid JSON (missing the outer `{ }`) besides. ## What - New `scripts/install_agy.py`: symlinks each generated skill into `~/.gemini/config/skills/<name>/` (or a project's `.agents/skills/` with `--project`), and merges each plugin's `mcpServers`/hooks into the shared global `mcp_config.json`/`hooks.json` without touching unrelated entries already there. `--uninstall` removes exactly what was added; `--all` or specific plugin names to select scope. - `generate_plugins.py --install-local` now shells out to it for the agy side instead of printing the (broken) `plugins.json` instructions. - Moved the hand-added `mcp.json` into `plugins/core-essentials/mcp.json` (where the generator actually looks), fixed the JSON, and wired its GitHub/Gitea tokens through `${VAR}` env-var placeholders instead of requiring literal secrets in the file. - README's agy install section now documents the real, tested flow. ## Manual Verification Checklist - [ ] `python3 scripts/generate_plugins.py --check` passes - [ ] `python3 scripts/generate_plugins.py && python3 scripts/install_agy.py --all` symlinks skills under `~/.gemini/config/skills/` and merges `gitea`/`github` into `~/.gemini/config/mcp_config.json` - [ ] With `GITEA_HOST`/`GITEA_ACCESS_TOKEN`/`GITHUB_PERSONAL_ACCESS_TOKEN` exported, `agy` actually connects to both MCP servers (`agy mcp list` or equivalent) - [ ] `python3 scripts/install_agy.py --uninstall --all` cleanly removes the symlinks and the merged MCP entries, leaving any other entries in `mcp_config.json` untouched - [ ] `--project` targets a project's `.agents/` instead of the global config
rootiest added 1 commit 2026-08-25 00:16:03 +00:00
fix(agy): replace unreliable plugins.json discovery with a real installer
Generate plugin manifests / generate (pull_request) Skipped
Generate plugin manifests / validate (pull_request) Successful in 19s
37a61e597a
Testing against a live agy session confirmed the plugins.json "entries"
mechanism documented for agy does not reliably surface a plugins/<name>/
bundle as a plugin: hooks and MCP servers inside it are never loaded, and
only a stray skill occasionally surfaces via agy's generic skill-walk
("No plugins are currently loaded or discoverable in the active context").

Add scripts/install_agy.py, which instead pushes a generated dist/agy
into the locations confirmed to actually work: symlinks each skill into
~/.gemini/config/skills/<name>/ (or a project's .agents/skills/ with
--project) and merges each plugin's mcpServers/hooks into the shared
global mcp_config.json/hooks.json without touching unrelated entries.
Supports --uninstall to cleanly remove exactly what was added.
generate_plugins.py's --install-local now shells out to it for the agy
side instead of printing the broken plugins.json instructions.

Also fixes plugins/core-essentials/mcp.json, which had been hand-added
directly under the repo root (never discovered by the generator) with
invalid JSON (missing the outer object) and no env-var indirection for
its GitHub/Gitea tokens; moved under the plugin and wired up with
${VAR} placeholders instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YVWWAnvR5TDQzmfY3RXG9
rootiest merged commit 68fbadbfec into main 2026-08-25 00:17:50 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rootiest/rootiest-ai#2