Files
nexu-io-open-design/mocks/bin
Lucas Bento d0cc28d339 feat(daemon): add Amp CLI as a coding-agent adapter (#3861)
* feat(daemon): add Amp CLI as a coding-agent adapter

Amp (ampcode.com) runs headless via `amp -x --stream-json`, which emits
the Claude Code-compatible stream JSON format the daemon already parses,
with the prompt delivered over stdin. Add it as a coding-agent adapter
reusing the claude-stream-json parser; the model picker maps to Amp's
agent --mode (smart/deep/rush).

- new ampAgentDef + registry entry + install metadata
- web agent label/alias
- replay mock (renders via the claude renderer)
- docs adapter-catalog row + README CLI count (21 -> 22)
- adapter buildArgs/stream-format test

* fix(daemon): order Amp adapter at P2, not first-run default

Move ampAgentDef next to copilot (the other P2 local headless CLI adapter)
instead of the head of BASE_AGENT_DEFS. The daemon preserves AGENT_DEFS
order in /api/agents and the web app fills an empty config with
agents.find((a) => a.available), so listing Amp first made it the default
engine ahead of AMR/Claude/Codex for any user with amp on PATH and no
persisted agentId — inconsistent with its P2 classification. Reordering
restores the prior first-run default. Addresses PR review feedback.

---------

Co-authored-by: Siri-Ray <2667192167@qq.com>
2026-06-11 15:17:07 +00:00
..