Skip to content

feat(desktop): add Gemini CLI agent host - #317

Merged
PeterGuy326 merged 7 commits into
mainfrom
feat/315-gemini-cli-agent-host
Sep 19, 2026
Merged

PeterGuy326 merged 7 commits into
mainfrom
feat/315-gemini-cli-agent-host

Conversation

@Bindy-lbb

@Bindy-lbb Bindy-lbb commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #315

Adds Gemini CLI and Antigravity CLI support alongside Qoder, Claude Code, Codex, and WorkBuddy across the desktop host picker, encrypted credentials, health preflight, turn adapter, model selection, WSL transport, reports/group streaming, and configuration UI.

The bundled adapter discovers gemini, agy, or antigravity, supports either GEMINI_API_KEY or the client cached login, runs the selected client in headless JSON mode with disposable settings and deny-all tool permissions, and preserves only the bounded authentication/model state required for local Antigravity sessions. Proxy and certificate settings cross the same allowlisted boundary so Google provider calls do not stall behind a required proxy. Cancellation and timeout now reap the detached Google client process tree.

Validation:

  • npm run build
  • npm run typecheck:renderer
  • server suite: 510 passed, 2 skipped, 0 failed
  • Gemini/Antigravity adapter tests: 4 passed, including detached-client cleanup
  • credential renderer tests: 17 passed
  • desktop main-process tests: 360 passed
  • live authenticated agy turn completed in 9 seconds with usage and terminal events
  • running desktop health reports Gemini configured and ready

Comment thread apps/server/bin/qoder-engine.mjs
Comment thread apps/server/src/routes/health.ts

@PeterGuy326 PeterGuy326 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Gate decision

REQUEST CHANGES — current head 8059ef8 is not merge-ready.

Blocking findings

  1. The packaged runtime omits the new Gemini resolver. apps/desktop/packaging/runtime-layout.cjs does not add src/gemini-binary.js or dist/src/gemini-binary.js to SERVER_RUNTIME_FILES, although apps/server/bin/qoder-engine.mjs and dist/src/routes/health.js import them. After npm run build and npm run prepare:updater, I reproduced this with:

node --test --test-timeout=120000 scripts/test/package-layout.test.mjs

Result: 7 passed, 2 failed. The failures are the compiled inventory mismatch for gemini-binary.js and the two unpackaged relative imports. The same omission explains the current verify run's Ubuntu package-layout failure and the macOS/Windows staging smoke failures. The latest main verify run is green, so this is not a baseline failure. Add both runtime entries and rerun the package and staging checks.

  1. The new resolver tests are not portable on macOS. apps/server/test/gemini-binary.test.ts:20,22,36 compare the resolver result with the raw path returned by os.tmpdir(). The implementation intentionally calls fs.realpathSync; on macOS the temp alias /var resolves to /private/var, so the exact server suite failed these two newly added tests locally. The reproduced result was 507 passed, 2 failed, 3 skipped. Canonicalize the fixture expectation with fs.realpath (or otherwise assert the canonical executable path), then rerun on both Linux and macOS.

Other gate blockers

  • This is a user-visible Host addition, but the PR has no CHANGELOG.md entry under ## [Unreleased] and does not document a reason for omitting one.
  • The PR body claims 510 passed, 2 skipped, 0 failed, but the current exact server command is not green on macOS; update the validation ledger after fixing the tests.
  • Live authenticated agy execution and the running desktop health report were not independently verifiable in this review environment; retain them as environment-specific evidence rather than as a substitute for the failed packaging gate.

Reproduced checks

  • PASS — npm run build
  • PASS — npm run typecheck:renderer
  • PASS — npm run test:renderer (525 passed)
  • PASS — npm run test:desktop-main after the repository's required npm run prepare:updater step (352 passed, 8 skipped)
  • PASS — git diff --check
  • FAIL — server suite: 507 passed, 2 failed, 3 skipped
  • FAIL — package-layout: 7 passed, 2 failed
  • FAIL — GitHub verify run 35236554504: Node 24 Ubuntu/macOS and macOS/Windows staging smoke failed

Please update the runtime manifest, make the resolver tests path-canonicalization-safe, add/update the CHANGELOG and validation results, then request re-review.

@waterbro-8

Copy link
Copy Markdown
Collaborator

已按原审查项完成并推送到最新主干:打包 runtime manifest、macOS realpath 测试、CHANGELOG、Gemini 配置/Host/API 文档与旧配置兼容测试均已补齐。新 head cb9ad20 的托管 CI 11 项全绿;CodeQL 两条误报线程已说明并解决。请 PeterGuy326 对新 head 复核。

@waterbro-8

Copy link
Copy Markdown
Collaborator

状态更新:当前 exact head 为 b06944ab9b4772f240f6cad92fc9f8e581ca9e9f(此前评论中的 cb9ad20 已过时)。11 项 CI 全部通过;CodeQL 两条线程已回复并解决。仍等待 PeterGuy326 对该 head 重新批准。

PeterGuy326
PeterGuy326 previously approved these changes Sep 19, 2026

@PeterGuy326 PeterGuy326 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-review on merge head 7b18342: the blocking packaging omission is fixed. apps/desktop/packaging/runtime-layout.cjs now lists both src/gemini-binary.js and dist/src/gemini-binary.js in SERVER_RUNTIME_FILES, so the imports from qoder-engine.mjs and routes/health.js resolve inside the packaged runtime and the layout inventory matches the compiled output. Branch synced with main.

Approving; merge will follow once CI is green on this head.

@PeterGuy326
PeterGuy326 merged commit e857807 into main Sep 19, 2026
11 checks passed
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.

feat(desktop): add Gemini CLI agent host

4 participants