Gemini CLI on ACP runtime

Task 7274 · Done · Coder · created · updated

Child of epic 7191 "Converge every runner on one agent contract: ACP-native". Settled inputs: PRD (task 7189), architecture (task 7190). Architecture boundary C10. Needs the pins child (fixtures recorded at the pin), the capability child (`Capabilities` type, catalogue rows), the host child (`jaah-acp-host`, replay harness, `AcpLaunch`) and the switch child (launch path). ## Original requirements (PRD, verbatim) **R1 — ACP is the wire.** The node is an ACP client (JSON-RPC 2.0 over the agent's stdio). Every runner engine Jaah dispatches is driven as an ACP agent. A vendor CLI that does not serve ACP natively is driven through a provider shim that speaks ACP outward and the vendor's host protocol inward, never the TUI through tmux, for runner dispatch. **R2 — Engine set (D1).** On the new runtime: Claude Code, DeepSeek (as a Claude-shim variant), Codex, Gemini CLI, Antigravity, Pi, any agent from an ACP registry (R11), and SDK v2 agents (R7). ## Approach (architecture, verbatim) **C10: Gemini CLI on ACP** (+ fixtures). Provider mapping: Gemini CLI (oauth, api_key) → `gemini --acp` (native); lowest risk. Hooks only for guards. Implement `acp_launch(ctx) -> AcpLaunch` on the Gemini adapter in `apps/jaahd/agents/` (argv, config-home env with no key value, `session_meta`, `mcp_servers` incl. the Jaah "control" server, `prepare` for settings convergence); set the Gemini catalogue `Capabilities` honestly (sessions, turns, requests.user_input `elicitation` or `mcp_tool`, modes native flags, usage). Record fixtures with `tools/record_acp_fixture.py` at the pinned Gemini version into `apps/jaahd/tests/acp_replay/`: dispatch → events → question (answer arriving >10 minutes later) → settle, plus a usage-limit frame if Gemini reports one. Add Gemini's section to the runtime part of `apps/jaahd/README.md` (names the measured CLI version). Usage tokens: map the adapter's `_meta` or `usage_update` into §3.1 `usage.data`; if tokens are absent, record a typed `usage` gap. Credentials & reach: AC-1 Codex / Gemini / Antigravity | signed-in accounts on a dev node | verified (operator answer A8). AC-1 static leg | dev static node | verified. AC-1 MicroVM leg | dev MicroVM node | verified. AC-1–AC-4 console/dispatch | `jaah/debug/main/operator-login` | verified. AC-1 merged-PR leg | a dev test project with GitHub push/merge, through the operator login | verified. AC-9 | worktree only. Out of scope: Do NOT change other providers or the host core (file a focused follow-up if the host needs a fix). PRD §5 verbatim: - MUST NOT delete the legacy paths (per-vendor transcript parsers in `apps/jaahd/agents/*.py`, hook scripts, `clauded_wt` TUI driving, v1 SDK). MUST NOT file that task (D5). - MUST NOT publish (D2). MUST NOT change runner permission posture: no runner moves off full-access (D6). MUST NOT drop or regress any current Claude Code capability (R10). MUST NOT remove the console terminal/TUI view (D3). MUST NOT submit an upstream ACP RFD (D8). MUST NOT integrate with T3 Code's RPC or MCP API. - MUST NOT change the task lifecycle states or the merge lane. MUST NOT change billing beyond usage ingestion. MUST NOT add vendors. MUST NOT touch `apps/mobile`. - MUST NOT put a token in the agent's environment or weaken process-ancestry identity (ADR-0083); MUST NOT add a second verb table. Done means: - AC-1 (Gemini) Coder task end-to-end. → verify: on dev, create a `coder` task on a test project targeting Gemini CLI, dispatch to a static node, observe in the task view (a) live event stream entries of the normalised kinds, (b) a question raised by the agent appears as a question card and the typed answer reaches the agent, (c) the task ends `done` via the extension/MCP settle with a merged PR. Repeat on a MicroVM node. Fails if the engine needs a tmux pane/TUI scrape or a vendor transcript parser to reach `done`. - AC-6 (Gemini, if it reports a usage-limit frame) → verify: replay fixture of the usage-limit frame; the run is classified usage_limit with a reset time and the existing spillover still applies. - AC-9 (Gemini) → verify: `./dc check full` runs the Gemini replay fixtures recorded at the pin (dispatch → events → question → settle) and passes. - `python3 tools/check_context.py` passes with the README section added. Required checks: ./dc check full

Outcome

Fixed the lane conflict on PR #5983: merged develop and moved Gemini's ACP gap rows to 44-46 (Codex took 42-43). Quick gate and the changed-area tests pass (Gemini + Codex replay). Head 16623c6 is queued; the lane runs the full gate.

Pull request

Artifacts

Activity

  • Draft
  • Ready
  • Runner started
  • Runner ended (done)
  • Run
  • Runner started
  • Runner ended (done)