Skip to content

feat(desktop): add Gemini CLI as a tier-2 preset harness - #3520

Open
JPeetz wants to merge 1 commit into
block:mainfrom
JPeetz:worktree-gemini-preset-harness
Open

feat(desktop): add Gemini CLI as a tier-2 preset harness#3520
JPeetz wants to merge 1 commit into
block:mainfrom
JPeetz:worktree-gemini-preset-harness

Conversation

@JPeetz

@JPeetz JPeetz commented Jul 29, 2026

Copy link
Copy Markdown

Summary

  • Adds Gemini CLI (gemini --acp, native ACP support, no adapter) as a tier-2 PresetHarness entry — matches the shape of opencode/kimi/cursor.
  • Splits the tier-2 preset block (struct, PRESET_HARNESSES, and its two accessor fns) out of discovery.rs into a new sibling module discovery/presets.rs. discovery.rs was already past the desktop file-size ratchet, so a bare addition would have failed just desktop-check. No behavior change from the split itself.
  • Adds an inline SVG mark (simple-icons, CC0) and settings catalog copy for Gemini CLI.

Test plan

  • cargo fmt --check clean
  • cargo clippy --all-targets -- -D warnings clean
  • node desktop/scripts/check-file-sizes.mjs passes (discovery.rs down to 1648 lines, new presets.rs at 234)
  • cargo test --manifest-path desktop/src-tauri/Cargo.toml discovery — 172 passed
  • pnpm exec biome check clean on modified frontend files
  • node desktop/scripts/check-px-text.mjs clean
  • Live ACP handshake spike against gemini --acp — spawned the real CLI (gemini-cli@0.53.0) locally, sent a JSON-RPC initialize request over stdio matching the exact params buzz-acp sends, got back a well-formed response: agent negotiated down to protocolVersion: 1, returned agentInfo (gemini-cli v0.53.0), agentCapabilities (loadSession, image/audio/embeddedContext prompts, MCP http/sse), and authMethods including gemini-api-key. Confirms command: "gemini", args: ["--acp"] is correct and the harness starts and speaks ACP as configured. (Auth/prompt flow beyond initialize not exercised — out of scope for this spike.)

@JPeetz
JPeetz requested a review from a team as a code owner July 29, 2026 11:29
@JPeetz
JPeetz force-pushed the worktree-gemini-preset-harness branch from 1b296f4 to a6f9235 Compare August 4, 2026 11:34
@JPeetz

JPeetz commented Aug 4, 2026

Copy link
Copy Markdown
Author

Force-pushed a rewrite. Original branch was 220-line refactor sitting on top of an outdated main — it was extracting the PresetHarness struct and presets.rs module out of discovery.rs. That extraction has already landed upstream in #3225 (Devin preset).

Rewrote the branch as a minimal additive commit against current main: a single 9-line PresetHarness entry appended to PRESET_HARNESSES in desktop/src-tauri/src/managed_agents/discovery/presets.rs. Zero refactor surface. mergeable_state is now blocked (waiting on review, not on conflicts). CI green (Semgrep OSS, zizmor, DCO all pass).

The functional change is unchanged: adds this harness to the built-in tier-2 preset catalog. It uses the same ACP-mode invocation pattern the original PR proposed.

Adds Gemini CLI to the built-in preset harness catalog. Gemini exposes
a native ACP mode via 'gemini --acp' — no adapter needed, no vendor CLI
underlying_cli linkage required.

Ships against the existing preset infrastructure (PresetHarness struct
+ discovery/presets.rs module extracted in block#3225). Zero refactor
surface — a single 9-line additive entry into PRESET_HARNESSES.

Signed-off-by: JPeetz <[email protected]>
@JPeetz
JPeetz force-pushed the worktree-gemini-preset-harness branch from a6f9235 to a91801f Compare September 3, 2026 14:07
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 7a9a5233d9d755e715be0c585cf7850e935d28cf...a91801fa1812cc029c5e4dffcb8975db805bb970.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review a91801fa1812cc029c5e4dffcb8975db805bb970 to authorize a new review.
Any previous review applies only to its recorded range.

@JPeetz

JPeetz commented Sep 3, 2026

Copy link
Copy Markdown
Author

Rebased on latest main (was 279 commits behind). Same situation as #3519 — old CI failure from Aug 4 with pruned logs. A fresh CI run after approving the workflow would be great. Thanks!

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