fix(agy): replace unreliable plugins.json discovery with a real installer
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
This commit is contained in:
@@ -413,8 +413,15 @@ def install_local(manifest: dict, out_dir: Path) -> None:
|
||||
|
||||
agy_src = out_dir / "dist" / "agy"
|
||||
if agy_src.exists():
|
||||
print("For agy, add this entry to ~/.gemini/config/plugins.json:")
|
||||
print(json.dumps({"entries": [{"path": str(agy_src)}]}, indent=2))
|
||||
install_agy_script = ROOT / "scripts" / "install_agy.py"
|
||||
result = subprocess.run(
|
||||
[sys.executable, str(install_agy_script), "--all", "--dist-dir", str(agy_src)],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
print(result.stdout, end="")
|
||||
if result.returncode != 0:
|
||||
print(result.stderr, end="", file=sys.stderr)
|
||||
|
||||
|
||||
# ── CLI ───────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user