Skip to content

feat(cli-agent): support 7 more CLI agents headless - #145

Merged
CaicoLeung merged 5 commits into
mainfrom
feat/cli-agent-presets
Aug 18, 2026
Merged

feat(cli-agent): support 7 more CLI agents headless#145
CaicoLeung merged 5 commits into
mainfrom
feat/cli-agent-presets

Conversation

@CaicoLeung

Copy link
Copy Markdown
Owner

Summary

aic could only drive 4 CLI agents headless (claude, codex, pi, opencode); anyone paying for another agent still had to provision an API key. This PR adds 7 more: oh-my-pi (omp), Gemini, Cursor, Windsurf, GitHub Copilot, Trae, and Qwen Code. All are single-shot print-mode presets that reuse the agent's own auth, so no API key is needed.

preset binary invocation notes
omp omp --mode json {prompt} pi fork; pi-shaped NDJSON, live reasoning feed
gemini gemini -p {prompt} shadows the gemini provider name in aic use; Google API stays reachable via aic use google
cursor cursor-agent -p {prompt} no --trust → runs untrusted, writes disabled
windsurf devin -p {prompt} Windsurf renamed Devin Desktop; CLI is devin
copilot copilot -p {prompt} tool use needs interactive approval headless can't give
trae traecli -p {prompt} non-read tools gated behind a permission prompt
qwen qwen -p {prompt} Qwen Code, gemini-cli lineage

Design decisions

  • Text-only by default. No preset passes a --yolo/approval flag, and none pins tool permissions: cursor runs untrusted, trae and copilot gate non-read tools behind approval prompts headless mode cannot answer. This holds the "never agentic, no tool use" contract (ADR 0010) without per-CLI permission flags.
  • omp reuses Encoding::PiStreamJson. It is a pi fork emitting the same message_update/assistantMessageEvent NDJSON, so it gets the live reasoning feed with zero new decoder code.
  • windsurf maps to devin. Windsurf was renamed Devin Desktop (Cognition); docs.windsurf.com/windsurf/cli now redirects to the Devin CLI docs. The preset keeps the familiar name and targets the current binary.
  • Preset shadows provider name. gemini wins over the gemini provider in aic use (presets always win, same as claude/anthropic); the Google API remains reachable via its google alias.

The same commit range also adds a standalone architecture deep-dive article (docs/articles/aic-architecture.html) and doc updates (README EN/zh-CN, AGENTS.md, ADR 0010) reflecting the 11-preset list.

Tests

new_presets_are_headless_print_mode pins command, args, encoding, and timeout for all 7 presets; the full suite (420 tests), fmt, and clippy -D warnings are green.


Compound Engineering
Pi

Seven new headless print-mode presets. omp is a pi fork reusing PiStreamJson for the live reasoning feed; windsurf maps to the renamed devin binary. The gemini preset shadows the provider name in aic use; the Google API stays reachable via the google alias.
Add omp, gemini, cursor, windsurf, copilot, trae, and qwen to the CLI-agent tables and features list in both README mirrors; clarify streamed vs print-mode decoders.
Update AGENTS.md and ADR 0010 to list omp, gemini, cursor, windsurf, copilot, trae, and qwen presets, and note which stream reasoning vs run plain print mode.
Self-contained page under docs/articles covering domain vocabulary, the five-domain layout, Run flow, plan validation, Batch staging, LLM backends, fallback grouping, resolve flow, rendering, ADR lineage, tests, and config/distribution.
CaicoLeung added a commit that referenced this pull request Aug 18, 2026
Fixes review findings on PR #145. ADR 0010 still said "Three presets"
and "any other CLI (Opencode, Copilot, OhMyPi) is covered by custom
command/args" — both false since those CLIs became presets. The
least-permission section claimed every preset pins explicit flags; only
claude/codex/pi do. Record the real two-tier stance: flag-pinned where
the CLI needs it, headless-print-mode default denial for the rest (no
TTY to answer approval prompts; cursor untrusted). Reword omp's decoder
as reuse of pi's (it is a pi fork), drop "four presets" from the setup
menu comment, count presets instead of enumerating where the list only
invited rot, and update the architecture article's preset lists.
ADR 0010 now reflects that presets are data in one registry (omp reuses pi's decoder, zero new code) and the text-only guarantee rests on headless print mode, not per-CLI flag pinning. Sync READMEs, architecture article, and rustdoc/test comments.
@CaicoLeung
CaicoLeung force-pushed the feat/cli-agent-presets branch from 9d0f64c to 183ef65 Compare August 18, 2026 05:37
@CaicoLeung
CaicoLeung merged commit 5cf7788 into main Aug 18, 2026
9 checks passed
@CaicoLeung
CaicoLeung deleted the feat/cli-agent-presets branch August 18, 2026 06:24
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