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 ACP backend and refactor backend availability (#49)
## Summary
🤖 Generated with [Nori](https://www.npmjs.com/package/nori-ai)
- 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
- [x] All 114 tests passing (110 existing + 4 new Gemini backend tests)
- [x] cargo fmt (no formatting issues)
- [x] cargo clippy (no warnings)
- [x] cargo build successful
- [x] CI tests passing
Share Nori with your team: https://www.npmjs.com/package/nori-ai
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Path: @/
4
4
5
5
### Overview
6
6
7
-
A terminal user interface (TUI) application that routes user prompts to different AI coding agent CLIs (Claude Code, Codex ACP, Claude Code ACP, and Mock ACP Agent). The application provides a chat-style interface where conversation history is always visible, with an overlay for agent selection and an input field at the bottom for natural interaction.
7
+
A terminal user interface (TUI) application that routes user prompts to different AI coding agent CLIs (Claude Code ACP, Codex ACP, Mock ACP Agent, and Gemini ACP). The application provides a chat-style interface where conversation history is always visible, with an overlay for agent selection and an input field at the bottom for natural interaction.
- Backend trait (@/src/backends.rs) defines `spawn_stream()` for launching agent CLIs and streaming events
56
-
- Implementations spawn processes with stdout/stderr piped (@/src/backends/claude.rs for native CLI, @/src/backends/codex_acp.rsand @/src/backends/claude_code_acp.rs for ACP-based agents)
56
+
- Implementations spawn processes with stdout/stderr piped (@/src/backends/claude.rs for native CLI, @/src/backends/codex_acp.rs, @/src/backends/claude_code_acp.rs, and @/src/backends/gemini_acp.rs for ACP-based agents)
57
57
- ACP-based backends wrap AcpAgentRunner (@/src/acp_runner.rs) to launch npm packages via bunx/npx
58
58
- Main loop in @/src/main.rs:spawn_and_stream() uses tokio::select! to multiplex stream consumption with cancellation
59
59
- CancellationToken from tokio-util enables cooperative cancellation - when token fires, stream is dropped
Copy file name to clipboardExpand all lines: src/backends/docs.md
+26-12Lines changed: 26 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ Path: @/src/backends
4
4
5
5
### Overview
6
6
7
-
Backend implementations for spawning and interacting with different AI coding agent CLIs. Defines the AgentBackend trait and provides concrete implementations for Claude Code (claude.rs), GPT Codex (codex.rs), ACP-based backends (codex_acp.rs, claude_code_acp.rs), and a mock backend for testing (mock.rs).
7
+
Backend implementations for spawning and interacting with different AI coding agent CLIs. Defines the AgentBackend trait and provides concrete implementations for Claude Code (claude.rs), GPT Codex (codex.rs), ACP-based backends (codex_acp.rs, claude_code_acp.rs, gemini_acp.rs), and a mock backend for testing (mock.rs).
8
8
9
-
**NEW (Phase 1 Complete):** ACP (Agent Client Protocol) integration added in @/src/acp_runner.rs. This provides a standardized protocol-based approach that will eventually replace custom backend implementations. The system now includes two ACP-based backends: Codex ACP and Claude Code ACP, both from @zed-industries npm packages. See ACP Integration section below.
9
+
**NEW (Phase 1 Complete):** ACP (Agent Client Protocol) integration added in @/src/acp_runner.rs. This provides a standardized protocol-based approach that will eventually replace custom backend implementations. The system now includes three ACP-based backends: Codex ACP and Claude Code ACPfrom @zed-industries npm packages, plus Gemini ACP from @google/gemini-cli. See ACP Integration section below.
0 commit comments