Skip to content

Add Gemini CLI harness support#63

Open
neiii wants to merge 2 commits intomasterfrom
feature/gemini-cli
Open

Add Gemini CLI harness support#63
neiii wants to merge 2 commits intomasterfrom
feature/gemini-cli

Conversation

@neiii
Copy link
Owner

@neiii neiii commented Feb 20, 2026

Changes

  • Add Gemini CLI harness support: New harness integration for Google's Gemini CLI
  • Fix AmpCode paths and extraction: Corrects path resolution and extraction logic for AmpCode harness

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 20, 2026

Greptile Summary

Adds comprehensive support for Google's Gemini CLI harness and fixes AmpCode path resolution. The Gemini CLI integration follows the established harness pattern with support for all three MCP server types (stdio, SSE, HTTP) and includes the cwd field capability. The AmpCode fix enables project-scoped configuration at .amp/ and corrects command/skills directory paths from .agents/ to .amp/.

  • New gemini_cli.rs module with complete MCP parsing (stdio, SSE, HTTP via httpUrl field)
  • Added cwd field support to ParseConfig for working directory configuration
  • Updated AmpCode to support project scope (.amp/) instead of returning UnsupportedScope error
  • Fixed AmpCode directory paths: commands at .amp/commands and skills fallback to .amp/skills
  • Integrated Gemini CLI across all harness operations (installation, config, MCP, validation)
  • Comprehensive test coverage for both new and modified functionality

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The implementation follows established patterns consistently, includes comprehensive test coverage for all new functionality, and the AmpCode fixes correct previous limitations. All tests pass and the changes are purely additive except for the intentional AmpCode behavior fix.
  • No files require special attention

Important Files Changed

Filename Overview
crates/harness-locate/src/harness/gemini_cli.rs New Gemini CLI harness implementation with comprehensive test coverage
crates/harness-locate/src/harness/amp_code.rs Fixed AmpCode to support project-scoped config and updated path extraction logic
crates/harness-locate/src/harness/mod.rs Integrated Gemini CLI across all harness operations (config, MCP, rules)
crates/harness-locate/src/harness/mcp_parse.rs Added cwd field support to ParseConfig for Gemini CLI
crates/harness-locate/src/mcp.rs Added Gemini CLI JSON serialization and MCP capabilities (supports stdio, SSE, HTTP, cwd)
crates/bridle/src/config/manager/extraction/mod.rs Added Gemini CLI extraction support and fixed AmpCode path resolution

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Gemini CLI Harness Integration] --> B[New Harness Module]
    A --> C[AmpCode Fixes]
    
    B --> D[gemini_cli.rs<br/>Config & MCP parsing]
    B --> E[types.rs<br/>GeminiCli enum variant]
    B --> F[mod.rs<br/>Integration points]
    
    D --> G[Parse settings.json]
    G --> H{Server Type}
    H -->|command| I[Stdio Server]
    H -->|url| J[SSE Server]
    H -->|httpUrl| K[HTTP Server]
    
    F --> L[MCP Operations]
    F --> M[Config Directory]
    F --> N[Rules Directory]
    
    C --> O[Project Scope Support]
    C --> P[Path Resolution Fix]
    
    O --> Q[.amp/ directory]
    P --> R[.amp/commands]
    P --> S[.amp/skills]
    
    L --> T[mcp.rs<br/>JSON serialization]
    T --> U[Supports cwd field]
    
    V[mcp_parse.rs] --> W[ParseConfig.GEMINI_CLI]
    W --> X[cwd_field support]
Loading

Last reviewed commit: 94b676b

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

18 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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