Skip to content

feat: Add Gemini ACP backend and refactor backend availability#49

Merged
CSRessel merged 4 commits intomainfrom
add-gemini-cli-backend
Nov 17, 2025
Merged

feat: Add Gemini ACP backend and refactor backend availability#49
CSRessel merged 4 commits intomainfrom
add-gemini-cli-backend

Conversation

@CSRessel
Copy link
Copy Markdown
Collaborator

@CSRessel CSRessel commented Nov 17, 2025

Summary

🤖 Generated with Nori

  • Added GeminiAcpBackend for Google's @google/gemini-cli npm package
  • Refactored backend availability checking into single compute_backend_availability() method
  • Fixed existing bug where backend_availability array had mismatched indices with actual backends

Implementation Details

New Backend:

  • Created src/backends/gemini_acp.rs following the exact pattern from Codex/Claude Code ACP backends
  • Uses JavaScript runtime detection (bunx/npx)
  • Delegates to AcpAgentRunner for protocol handling
  • Install command: npm install -g @google/gemini-cli

Refactoring:

  • Extracted Model::compute_backend_availability() method to eliminate duplication
  • Fixed off-by-one bug in backend_availability array

Backend Ordering:

  • Index 0: Claude Code ACP
  • Index 1: Codex ACP
  • Index 2: Mock ACP Agent
  • Index 3: Gemini ACP (new)

Test Plan

  • All 114 tests passing (110 existing + 4 new Gemini backend tests)
  • cargo fmt (no formatting issues)
  • cargo clippy (no warnings)
  • cargo build successful
  • CI tests passing

Share Nori with your team: https://www.npmjs.com/package/nori-ai

CSRessel and others added 2 commits November 17, 2025 13:52
Add support for Google's Gemini CLI as an ACP backend agent, following the
same pattern as existing Codex and Claude Code ACP backends.

Changes:
- Add GeminiAcpBackend implementation in src/backends/gemini_acp.rs
- Use @google/gemini-cli npm package via bunx/npx
- Add 4 unit tests for Gemini backend behavior
- Refactor backend_availability computation into Model::compute_backend_availability()
- Fix existing bug where backend_availability array had mismatched indices
- Update documentation in src/backends/docs.md and root docs.md

Backend ordering:
- Index 0: Claude Code ACP
- Index 1: Codex ACP
- Index 2: Mock ACP Agent
- Index 3: Gemini ACP (new)

Tests: All 114 tests passing (110 existing + 4 new Gemini tests)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@CSRessel CSRessel force-pushed the add-gemini-cli-backend branch from 8542745 to 8294d32 Compare November 17, 2025 19:12
@CSRessel CSRessel force-pushed the add-gemini-cli-backend branch from 8294d32 to 3ce698b Compare November 17, 2025 19:12
@CSRessel CSRessel force-pushed the add-gemini-cli-backend branch from d758e8d to 65326d2 Compare November 17, 2025 19:29
@CSRessel CSRessel merged commit 272a1ed into main Nov 17, 2025
3 checks passed
@CSRessel CSRessel deleted the add-gemini-cli-backend branch November 17, 2025 19:29
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.

1 participant