Skip to content

fix(cli): support Antigravity global config skills discovery and mirroring - #7023

Open
davidcastilloc wants to merge 2 commits into
heygen-com:mainfrom
davidcastilloc:fix/antigravity-skills-discovery
Open

davidcastilloc wants to merge 2 commits into
heygen-com:mainfrom
davidcastilloc:fix/antigravity-skills-discovery

Conversation

@davidcastilloc

Copy link
Copy Markdown

Resumen

Corrige el descubrimiento y espejado global de skills en @hyperframes/cli para soportar el directorio real de configuracion global de Antigravity (~/.gemini/config/skills) asi como las rutas globales multi-segmento definidas en AGENT_GLOBAL_DIRS.

Problema

  1. Ruta global de Antigravity omitida en el espejado (skillsMirror.ts):
    • La tabla generada desde vercel-labs/skills (AGENT_GLOBAL_DIRS) registra .gemini/antigravity/skills y .gemini/antigravity-cli/skills, pero el sistema de personalizacion global de Antigravity (agy) carga sus skills globales desde ~/.gemini/config/skills.
    • Cuando el usuario tiene ~/.gemini/config inicializado, mirrorGlobalSkills() no replicaba las skills hacia ~/.gemini/config/skills.
  2. Rutas globales multi-segmento ignoradas en discoverSkillRoots (skillsManifest.ts):
    • discoverSkillRoots(base, scope) escaneaba unicamente subdirectorios de un nivel (<base>/<host>/skills y <base>/.config/<host>/skills).
    • En consecuencia, hyperframes skills check no detectaba instalaciones globales alojadas en rutas de multiples segmentos bajo $HOME como ~/.gemini/config/skills, ~/.gemini/antigravity/skills, ~/.gemini/antigravity-cli/skills o ~/.codeium/windsurf/skills.
    • Ademas, agentFromDir() inferia "config" en lugar de "antigravity" para rutas terminadas en .gemini/config/skills.

Solucion

  • packages/cli/src/utils/skillsMirror.ts:
    • Exporta EXTRA_GLOBAL_DIRS incluyendo { agent: "antigravity", base: "home", sub: ".gemini/config/skills" } e incorpora estas entradas en el bucle de mirrorGlobalSkills().
  • packages/cli/src/utils/skillsManifest.ts:
    • Actualiza agentFromDir() para identificar .gemini/config/skills como "antigravity".
    • Extiende discoverSkillRoots() cuando scope === "global" para inspeccionar tambien las rutas base === "home" de mas de dos segmentos definidas en AGENT_GLOBAL_DIRS y EXTRA_GLOBAL_DIRS, evitando duplicados mediante un conjunto de rutas visitadas.
  • Pruebas unitarias:
    • packages/cli/src/utils/skillsMirror.test.ts: Verifica que mirrorGlobalSkills() espeja correctamente hacia ~/.gemini/config/skills cuando existe ~/.gemini/config.
    • packages/cli/src/utils/skillsManifest.test.ts: Verifica que checkSkills() detecta instalaciones globales en .gemini/config/skills, .gemini/antigravity/skills, .gemini/antigravity-cli/skills y .codeium/windsurf/skills.

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 1a9910e1f93802067e25a28ffc44b15a6769d7a3 (base 6fd96ddd041964caa7459aa195259a9b5deea4c4).

  • packages/cli/src/utils/skillsMirror.ts:62,319: the Antigravity config path goes through the existing installed-agent marker, attributed-skill selection, protected-store checks and link/copy implementation.
  • packages/cli/src/utils/skillsManifest.ts:289,315: multi-segment HOME registry paths are added only in global scope, deduplicated by joined path and sorted with the existing precedence. Explicit Antigravity --dir attribution is corrected; project scanning and the existing XDG resolution are preserved.

No code blocker found across all four changed files and the check/update consumers. All four changed file blobs were independently matched to GitHub's blob SHAs. Using the existing local Vitest environment and isolated temporary HOME, both exact-source test files passed: 82/82 (including the five added cases). Local oxlint passed. Formatting check passed with the existing tool's default configuration; this is not a claim of full repository CI.

CI qualification: GitHub currently reports WIP and Graphite checks successful, but hosted CI and the other workflows are action_required for this fork; they have not executed. This is source/focused-test approval, not a claim that hosted checks passed or authorization to bypass them. No dependency install, merge or deployment performed.

Verdict: APPROVE
Reasoning: The bounded directory additions reuse existing mirror safeguards and preserve discovery scope/precedence, with focused regressions passing locally. Hosted validation remains separate and must run through the normal fork workflow.

— Magi

This branch has not been deployed

No deployments
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