Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Add TRAE CLI (`traecli`) as an opt-in built-in agent named `trae`, usable as a reviewer (`--jury trae`) or the main agent (`--judge trae`). Reviews run in its read-only sandbox (#96).

## 0.7.0 — 2026-09-18

### Changed
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ It uses illustrative data and does not start agents.
| <img src="https://www.google.com/s2/favicons?domain=cursor.com&sz=64" width="20" height="20" alt=""> | Cursor Agent CLI | `cursor` | Opt-in |
| <img src="https://www.google.com/s2/favicons?domain=ampcode.com&sz=64" width="20" height="20" alt=""> | Sourcegraph Amp | `amp` | Opt-in |
| <img src="https://www.google.com/s2/favicons?domain=kimi.com&sz=64" width="20" height="20" alt=""> | Moonshot Kimi Code CLI | `kimi` | Opt-in |
| <img src="https://www.google.com/s2/favicons?domain=trae.ai&sz=64" width="20" height="20" alt=""> | TRAE CLI | `trae` | Opt-in |

**Opt-in** agents are fully supported as reviewers and judges, but stay out of the default pool so
a fresh install does not require every CLI to be present. Select one by name — no configuration
Expand Down Expand Up @@ -179,6 +180,7 @@ or select installed reviewers explicitly.
| `cursor` | Cursor Agent CLI | `curl https://cursor.com/install -fsS \| bash` | opt-in |
| `amp` | Sourcegraph Amp | `npm i -g @sourcegraph/amp` | opt-in |
| `kimi` | Moonshot Kimi Code CLI | `npm i -g @moonshot-ai/kimi-code` | opt-in |
| `trae` | TRAE CLI (`traecli`) | `sh -c "$(curl -fsSL https://trae.cn/trae-cli/install_v2.sh)"` | opt-in |

**Opt-in** agents are fully supported — usable with `--reviewer`, `--jury`, `--judge` and
`jury agents judge` — but stay out of the default pool, so a fresh install does not require every
Expand Down
4 changes: 3 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ review could not start until every supported CLI was installed.
| Cursor Agent (opt-in) | `cursor-agent` | ⚠️ Print mode; all tools including write and bash | `--force` |
| Amp (opt-in) | `amp` | ⚠️ Execute mode; no read-only flag | Same command unless overridden |
| Kimi Code (opt-in) | `kimi` | Prompt mode with the shipped `lib/agents/kimi-reviewer.md` profile: Edit and Write tools removed, only the read-only `explore` sub-agent; shell available | Prompt mode with all tools |
| TRAE CLI (opt-in, `trae`) | `traecli` | `exec` in read-only sandbox | `exec` in workspace-write sandbox |
| Custom | Your `argv[0]` | Your `argv` | Your `judgeArgv`, or `argv` |

⚠️ marks agents whose CLI offers **no read-only invocation**. They still review, but only the
Expand Down Expand Up @@ -137,7 +138,7 @@ an unrelated conversation.
| Antigravity | `conversation_id` in `--output-format json` | yes |
| OpenCode | `sessionID` in the JSON event stream | yes |
| Kimi Code | printed at the end of the `stream-json` output | yes |
| Amp, Cursor, Copilot | — | no; replies start fresh with the finding context |
| Amp, Cursor, Copilot, TRAE CLI | — | no; replies start fresh with the finding context |

Agents that do not resume lose nothing in substance: `buildReply` quotes their
own prior findings back to them. The judge never resumes at all — each finding
Expand All @@ -148,6 +149,7 @@ is triaged in its own session so one verdict cannot anchor the next.
```json
{ "agents": [{ "name": "kimi", "argv": ["kimi", "--quiet", "--work-dir", "{{worktree}}", "--prompt", "{{promptText}}"], "report": "whole", "resume": { "supported": false, "reason": "quiet mode prints no session id" } }] }
```
- TRAE CLI: verified `traecli` 0.206.1 (TraeCode CLI 2.0) flags; install with `sh -c "$(curl -fsSL https://trae.cn/trae-cli/install_v2.sh)"` (the script is served only inside mainland China; outside it, download your platform's binary from the official release manifest `https://lf-cdn.trae.com.cn/obj/trae-com-cn/trae-cli/v2/latest.json`, check its `sha256`, gunzip it and link it as `~/.local/bin/traecli`), then run `traecli` once to log in, or use `traecli login --with-trae-pat` for headless machines. TraeCode CLI requires a TRAE Enterprise flagship plan. Reviews run `traecli exec --sandbox read-only`, and the judge uses `--sandbox workspace-write`. The prompt follows `--`, so a prompt starting with `-` is never read as a flag. Replies start fresh with finding context.
- Cursor: verified `cursor-agent` 2025.10.28-0a91dc2; run `cursor-agent login`. The generic executable `agent` may belong to another product, so Jury uses `cursor-agent`. Final JSON must explicitly report success. Replies start fresh.
- Copilot: verified CLI 0.0.392 flags; authenticate with interactive `/login`. A reviewer can inspect files and Git but cannot use write tools; the judge allows tools. Local permission configuration remains trusted. Replies start fresh.
- Qwen: targets CLI 0.23.4 (`npm install -g @qwen-code/qwen-code`); run `qwen` and complete `/auth` before headless use. It runs in the process worktree, not merely an added access directory. Reviews use assigned UUIDs, and replies resume only that UUID; no implicit latest session. Final JSON must explicitly report success.
Expand Down
2 changes: 2 additions & 0 deletions lib/agents/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import copilot from "./copilot.json" with { type: "json" };
import cursor from "./cursor.json" with { type: "json" };
import amp from "./amp.json" with { type: "json" };
import kimi from "./kimi.json" with { type: "json" };
import trae from "./trae.json" with { type: "json" };

/**
* Every built-in agent, in the order `jury agents` lists them. Judge first,
Expand All @@ -37,4 +38,5 @@ export const BUILTIN_AGENTS = [
cursor,
amp,
kimi,
trae,
];
36 changes: 36 additions & 0 deletions lib/agents/trae.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "trae",
"product": "TRAE CLI",
"role": "reviewer",
"enabled": false,
"promptDelivery": "argv",
"cwd": "worktree",
"argv": [
"traecli",
"exec",
"--sandbox",
"read-only",
"--skip-git-repo-check",
"--",
"{{promptText}}"
],
"judgeArgv": [
"traecli",
"exec",
"--sandbox",
"workspace-write",
"--skip-git-repo-check",
"--",
"{{promptText}}"
],
"sandbox": "sandbox",
"sandboxNote": "reviews run under --sandbox read-only; judging uses workspace-write",
"resume": {
"supported": false,
"reason": "exec session ids are not documented in its output; replies start fresh with finding context"
},
"report": "whole",
"expectSeconds": 900,
"install": "sh -c \"$(curl -fsSL https://trae.cn/trae-cli/install_v2.sh)\"",
"docs": "https://docs.trae.cn/cli_get-started-with-trae-code-cli-2"
}
2 changes: 1 addition & 1 deletion test/builtin-agents.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ test("each agent states a sandbox level, and an unsandboxed one explains itself"
});

// All newly added CLIs require explicit selection, not installation by every user.
const NEW = ["opencode", "qwen", "copilot", "cursor", "amp", "kimi"];
const NEW = ["opencode", "qwen", "copilot", "cursor", "amp", "kimi", "trae"];

test("the new agents are selectable as reviewer and as judge", async () => {
// They ship opt-in, so they are absent from the default pool — but naming one
Expand Down
20 changes: 20 additions & 0 deletions test/new-agents.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,26 @@ const cases = [
"@prompt"
],
"output": "{\"type\":\"result\",\"subtype\":\"success\",\"is_error\":false,\"result\":\"NO NEW FINDINGS\"}"
},
{
"name": "trae",
"bin": "traecli",
"review": [
"exec",
"--sandbox",
"read-only",
"--skip-git-repo-check",
"--",
"@prompt"
],
"judge": [
"exec",
"--sandbox",
"workspace-write",
"--skip-git-repo-check",
"--",
"@prompt"
]
}
];

Expand Down
Loading