繁體中文

新功能

命令列輸出能直接交給程式接手

把命令列工具接進 CI(自動跑測試與部署的流程)時,最怕它只吐一大段人看得懂、程式卻接不住的文字。現在在 -p 後加 --output-format json 或 --output-format stream-json,就能拿到結構化輸出;--help 也找得到。選 stream-json 時,結果會像接力直播:一開始送出 init,每一步送 step_update,最後才送 result,不必等整趟工作結束。每個事件有固定的 step_type;工具呼叫才會附工具名稱、參數與輸出。如果有委派子代理,也帶上對話 ID 與紀錄位置。想固定答案格式,可加 --json-schema,給規格或檔案路徑。輸出的使用量也多了 cache_read_tokens,看得出有多少 token 命中快取(把先前結果暫存再利用)。

新功能

選取文字要不要自動複製,自己決定

你在終端機裡拖曳選取一段結果,原本只是想看清楚,鬆開滑鼠卻可能把內容自動塞進剪貼簿,甚至弄壞特定資料。現在 TUI(終端機裡用文字畫出的互動介面)的 altscreen 呈現模式新增 copyOnSelect,預設開啟:選取後放開滑鼠便會複製。它像影印機自動送紙,省掉按複製,卻不適合每種紙張。若你貼上後發現內容怪掉,打開 /settings,把 copyOnSelect 關閉,就只保留選取、不再自動複製。

新功能

常用串接指令核准一次就夠

你每天都要更新專案,輸入 git fetch && git rebase 後又得重複核准,流程像同一張通行證每天重新蓋章。現在可以把這條完全相同的串接指令存成「永遠允許」規則。下次再跑同一條指令時,不必再等,權限確認不會重跳。它認的是整串命令,不是看到 git 就一概放行;因此常用流程少一步,其他不同命令仍各自檢查。

English

FEATURE

Command-line output is now ready for programs to consume

When you connect a command-line tool to CI, a wall of text that only humans can read is a dead end. In print mode, add --output-format json or --output-format stream-json to hand structured output to a program; both flags now also appear in --help. stream-json works like a live relay: it sends init, then step_update events as work progresses, and ends with result, so nothing has to wait for the whole run. Each event has a fixed step_type; only tool calls include names, parameters, and output. Delegated subagents also provide a conversation ID and log location. Add --json-schema with either an inline schema or a schema-file path to require a particular final shape. Usage data now includes cache_read_tokens, showing how many tokens hit the prompt cache.

FEATURE

You decide whether selecting text copies it automatically

You may drag across terminal text only to inspect it, then release the mouse and find that the selection has already landed in your clipboard — sometimes corrupting certain payloads. The TUI's altscreen renderer now has copyOnSelect, enabled by default: release a text selection and it copies automatically. It is like a copier that feeds every sheet the moment you touch it: handy when you want a copy, awkward when you do not. If pasted content comes out wrong, open /settings and turn copyOnSelect off. You can still select text, but releasing the mouse will no longer copy it.

FEATURE

Approve a familiar chained command once, not every time

When you update a project every day, approving git fetch && git rebase again and again feels like getting the same pass stamped from scratch. You can now save that exact chained command as an always-allow rule. The next time you run the identical command, the permission prompt stays away. The rule recognizes the whole chain, not every command that happens to begin with git; your routine loses a step while different commands still receive their own check.

原始 CHANGELOG

Original changelog命令列輸出能直接交給程式接手
Print mode (`-p` / `--print`) now supports structured, machine-readable output via the `--output-format` flag (`text` (default), `json`, or `stream-json`), so headless runs in CI, eval harnesses, and scripts can consume the CLI's output programmatically; these flags are now discoverable in `--help`.
Added the `stream-json` output format: a strongly-typed NDJSON event stream that emits typed `init`, `step_update`, and terminal `result` events with a stable, closed-vocabulary `step_type` discriminator, so consumers receive progress incrementally instead of waiting for the whole run to finish.
Added the `--json-schema` flag to enforce a custom JSON schema on the structured output, accepting either an inline schema string or a path to a schema file; for `stream-json` the schema applies to the final `result` event.
Enriched the structured stream with a `tool_info` object for each tool call (canonical tool name, parameters, and output) and a `subagent_info` payload for delegated subagents (including `conversation_id` and `log_uri`) so consumers can correlate child trajectories.
The JSON usage object emitted by `json` and `stream-json` now reports token accounting including `cache_read_tokens`, so non-interactive consumers can attribute prompt-cache hits.
Original changelog選取文字要不要自動複製,自己決定
Added a `copyOnSelect` setting (default on, toggleable in `/settings`) that controls whether releasing a mouse text-selection auto-copies it to the system clipboard in the TUI's altscreen rendering mode; disable it to stop the automatic copy on release — useful when the auto-copy is unwanted or corrupts certain payloads.
Original changelog常用串接指令核准一次就夠
Improved compound-command permissions so an exact chained command (such as `git fetch && git rebase`) can be saved as an allow-always rule and no longer re-prompts on the next identical run.