You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add Gemini CLI runner with polymorphic bridge and extensible registry (#788)
## Summary
- **Gemini CLI runner**: Full polymorphic bridge implementation that
wraps Google's Gemini CLI (`@google/gemini-cli`) as an AG-UI compatible
runner, alongside the existing Claude Agent SDK runner
- **Extensible agent registry**: Data-driven `AgentRuntimeSpec`
ConfigMap that replaces hardcoded runner configuration across operator,
backend, and frontend. Operator reads container image, resources, port,
state dir, and sandbox config from the registry
- **Unified `USE_VERTEX`**: Single environment variable replaces
`CLAUDE_CODE_USE_VERTEX` and `GEMINI_USE_VERTEX` with
backward-compatible deprecation warnings
- **Production hardening**: Subprocess timeouts, graceful
SIGTERM/SIGKILL shutdown, stderr streaming via deque ring buffer,
TTL-based worker eviction, MCP support for Gemini via
`.gemini/settings.json`
- **Frontend**: Runner type selection in create dialog, admin runtimes
page, loading/error states, Shadcn RadioGroup for settings, ARIA
accessibility
- **Feature flag auto-sync**: `runner.gemini-cli.enabled` in
`flags.json` for automatic Unleash provisioning
### Key architectural decisions
- All runners use sandbox mode (pod-per-session) with conditional
init/sidecar based on `sandbox.seed` and `sandbox.persistence` from
registry
- Capabilities come from the runner's `/capabilities` endpoint at
runtime, NOT from the registry
- Env var blocklist (not allowlist) for subprocess — user-defined vars
pass through automatically
- Session ID persisted to `.gemini/gemini_session_ids.json` for
`--resume` across pod restarts
- `GOOGLE_GENAI_USE_VERTEXAI=true` set in subprocess env for Vertex AI
mode
## Test plan
- [x] 165+ new Python tests (adapter, bridge, session, auth, registry)
- [x] Go backend tests (registry cache, routing, feature gates)
- [x] Go operator tests (conditional pod components, registry fallback)
- [x] Manual E2E: Gemini CLI sessions with API key auth on OpenShift
cluster
- [ ] Manual E2E: Vertex AI auth mode
- [ ] Manual E2E: MCP servers (Jira, GitHub) with Gemini CLI
Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments