2.4 KiB
2.4 KiB
Implementation Plan: Gemini CLI Headless Integration
Phase 1: IPC Infrastructure Extension [checkpoint: c0bccce]
- Task: Extend
api_hooks.pyto support synchronous "Ask" requests. This involves adding a way for a client to POST a request and wait for a user response from the GUI. (1792107) - Task: Update
api_hook_client.pywith arequest_confirmation(tool_name, args)method that blocks until the GUI responds. (93f640d) - Task: Create a standalone test script
tests/test_sync_hooks.pyto verify that the CLI-to-GUI communication works as expected. (1792107) - Task: Conductor - User Manual Verification 'Phase 1: IPC Infrastructure Extension' (Protocol in workflow.md) (
c0bccce)
Phase 2: Gemini CLI Adapter & Tool Bridge
- Task: Implement
scripts/cli_tool_bridge.py. This script will be called by the Gemini CLIBeforeToolhook and useApiHookClientto talk to the GUI. (211000c) - Task: Implement the
GeminiCliAdapterinai_client.py(or a newgemini_cli_adapter.py). It must handle thesubprocesslifecycle and parse thestream-jsonoutput. (b762a80) - Task: Integrate
GeminiCliAdapterinto the mainai_client.send()logic. (b762a80) - Task: Write unit tests for the JSON parsing and subprocess management in
GeminiCliAdapter. (b762a80) - [~] Task: Conductor - User Manual Verification 'Phase 2: Gemini CLI Adapter & Tool Bridge' (Protocol in workflow.md)
Phase 3: GUI Integration & Provider Support
- Task: Update
gui_2.pyto add "Gemini CLI" to the provider dropdown. (3ce4fa0) - Task: Implement UI elements for "Gemini CLI Session Management" (Login button, session ID display). (
3ce4fa0) - Task: Update the
manual_slop.tomllogic to persist Gemini CLI specific settings (e.g., path to CLI, approval mode). (3ce4fa0) - [~] Task: Conductor - User Manual Verification 'Phase 3: GUI Integration & Provider Support' (Protocol in workflow.md)
Phase 4: Integration Testing & UX Polish
- Task: Create a comprehensive integration test
tests/test_gemini_cli_integration.pythat uses thelive_guifixture to simulate a full session. (d187a6c) - Task: Verify tool confirmation flow: CLI Tool -> Bridge -> GUI Modal -> User Approval -> CLI Execution. (
d187a6c) - Task: Polish the display of CLI telemetry (tokens/latency) in the GUI diagnostics panel. (3602d1b)
- Task: Conductor - User Manual Verification 'Phase 4: Integration Testing & UX Polish' (Protocol in workflow.md) (3602d1b)