mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-24 10:42:37 -07:00
19b9e3e8e4
- Add RegistryTeam interface and TeamRegistryClient for remote/local discovery. - Enhance TeamScaffolder with installRegistryTeam supporting Git and metadata-only teams. - Refactor GitHub/Git utilities from cli to core for shared usage. - Add comprehensive unit tests for new services. TASK-09, TASK-10
1.5 KiB
1.5 KiB
TASK-09: Team Registry Client and Remote Discovery
Objective
Implement the backend client and discovery logic for browsing agent teams from a remote or local registry, similar to the Gemini CLI extension registry.
Implementation Details
1. Type Definitions (packages/core/src/agents/types.ts)
- Define
RegistryTeaminterface:export interface RegistryTeam { id: string; name: string; // The slug displayName: string; description: string; instructions: string; agents: Array<{ name: string; provider: string; // 'gemini', 'claude-code', etc. description: string; }>; author?: string; stars?: number; lastUpdated?: string; version?: string; sourceUrl?: string; // Optional Git/GitHub source }
2. Team Registry Client (packages/core/src/agents/teamRegistryClient.ts)
- Create a new
TeamRegistryClientclass. - Implement
fetchAllTeams():- Supports
https://URLs (JSON files). - Supports local file paths.
- Supports
- Implement
searchTeams(query: string):- Use
AsyncFzffor fuzzy searching by name, description, and agents.
- Use
3. Config Support (packages/core/src/config/config.ts)
- Ensure
teamRegistryURIis correctly initialized from settings. - Set a default
TeamRegistryClient.DEFAULT_REGISTRY_URL(e.g.,https://geminicli.com/teams.json).
Verification
- Unit tests in
packages/core/src/agents/teamRegistryClient.test.ts. - Verify fetching from a mocked JSON endpoint.