Skip to content

feat(agents): add Gemini CLI, Goose, and Qwen Code providers - #104

Merged
Ariestar merged 4 commits into
mainfrom
feat/agents-providers
Aug 10, 2026
Merged

feat(agents): add Gemini CLI, Goose, and Qwen Code providers#104
Ariestar merged 4 commits into
mainfrom
feat/agents-providers

Conversation

@Ariestar

@Ariestar Ariestar commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Purpose

Add three new agent providers to the registry: Gemini CLI, Goose, and Qwen Code. Each is a jsonl-based parser plus registry wiring (provider variants, provider specs, TUI colors/badges, and MCP host registrations — Gemini/Qwen settings.json mcpServers, Goose config.yaml extensions with per-OS paths).

Independent of the group/origin stack (#70-#102): only touches agents/, commands/system/mcp.rs, and TUI provider colors, so it bases directly on main and can merge on its own.

Main changes

  • agents/gemini.rs, agents/goose.rs, agents/qwen.rs — new AgentProvider parsers.
  • agents/jsonl.rs — shared jsonl parsing gains what the new formats need.
  • agents/mod.rs / agents/model.rs — registry wiring and provider metadata.
  • commands/system/mcp.rs — MCP host registration for the three CLIs.
  • TUI provider colors/badges for the new providers.

Validation

  • cargo test --workspace: 326 CLI + 212 core tests pass.
  • cargo clippy --workspace --all-targets -- -D warnings and cargo fmt --all -- --check clean.
  • Cherry-picked from the provider branch onto main (the touched files are unchanged between the group stack and main, so the commits apply cleanly).

Three new agent session providers, each parsing the tool's real on-disk format (verified against local data and the upstream sources, not guessed):

- Gemini CLI: ~/.gemini/tmp/<hash>/chats/session-*.json[l], both the current JSONL records (header + user/gemini messages with thoughts and toolCalls, \/\ markers) and the legacy single-JSON form.
- Goose: Block/goose sessions.db (SQLite) with sessions + messages tables; content blocks map to text/thinking/toolRequest/toolResponse.
- Qwen Code: ~/.qwen/tmp/<hash>/chats/<uuid>.jsonl records carrying cwd per message, so workspace scoping works without extra metadata.

Shared plumbing instead of per-provider copies: jsonl::list_chat_recording_sessions walks the tmp/<project>/chats layout shared by Gemini and Qwen (the listing-cache loop is factored into collect_recent_sessions); model::push_parts_blocks maps Gemini-API content parts for both; AgentSessionMeta::fallback_title dedups the title-from-first-user logic.

Registry wiring: AgentProvider variants, provider specs, TUI colors and badges, and MCP host registrations (Gemini/Qwen settings.json mcpServers; Goose config.yaml extensions in the ExtensionConfig shape, with per-OS etcetera paths).
Goose MCP servers live in config.yaml under \�xtensions:\ (the ExtensionConfig shape written by \goose configure\), not in .agents plugin manifests — the earlier registration pointed at the wrong file. The Yaml MCP host kind now carries a per-host entry so goose installs the {enabled, type: stdio, cmd, args} entry.

Config and session-db paths follow etcetera's app layout: Windows %APPDATA%\\Block\\goose\\{config,data}, macOS ~/Library/Application Support/Block/goose, Linux ~/.config/goose and ~/.local/share/goose (XDG uses the app name only).
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 9, 2026

Copy link
Copy Markdown

Deploying sivtr with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3ad1601
Status: ✅  Deploy successful!
Preview URL: https://ef08bbcd.sivtr.pages.dev
Branch Preview URL: https://feat-agents-providers.sivtr.pages.dev

View logs

@mornhussakuyo-hub mornhussakuyo-hub left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Goose 的 Linux 默认 DB 路径好像多了一层 data。上游实际是 $XDG_DATA_HOME/goose/sessions/sessions.db,这里会找成 $XDG_DATA_HOME/goose/data/sessions/sessions.db,本地测了一下会找不到。

@mornhussakuyo-hub

Copy link
Copy Markdown
Collaborator

好像MacOS也有类似问题

@mornhussakuyo-hub

Copy link
Copy Markdown
Collaborator

已修复 Goose 在 Linux/macOS 下的默认 XDG 路径,并补了对应的回归测试。Linux 数据库路径现在是 $XDG_DATA_HOME/goose/sessions/sessions.db,macOS 与 Linux 的 MCP 配置统一使用 $XDG_CONFIG_HOME/goose/config.yaml。相关定向测试已通过。

@mornhussakuyo-hub

Copy link
Copy Markdown
Collaborator

已修复 Goose 手工配置示例输出错误,mcp print-config goose 现在会使用 Goose 自己的 YAML 结构,并补了回归测试。

@Ariestar
Ariestar merged commit f9a1ff1 into main Aug 10, 2026
13 checks passed
@Ariestar
Ariestar deleted the feat/agents-providers branch August 10, 2026 08:29
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.

2 participants