@armadra/agent 0.6.2 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/CHANGELOG.zh-CN.md +59 -0
  3. package/README.md +168 -575
  4. package/README.zh-CN.md +165 -596
  5. package/dist/agent/queue.d.ts +9 -0
  6. package/dist/agent/queue.js +27 -0
  7. package/dist/agent/session-subagent.d.ts +1 -0
  8. package/dist/agent/session-subagent.js +9 -0
  9. package/dist/agent/session.d.ts +11 -0
  10. package/dist/agent/session.js +29 -2
  11. package/dist/agent/subagent-background.d.ts +75 -0
  12. package/dist/agent/subagent-background.js +209 -0
  13. package/dist/agent/subagent-direct.d.ts +5 -2
  14. package/dist/agent/subagent-direct.js +34 -1
  15. package/dist/agent/subagent-registry.d.ts +26 -6
  16. package/dist/agent/subagent-registry.js +66 -94
  17. package/dist/agent/types-w5.d.ts +11 -1
  18. package/dist/agent/types.d.ts +12 -0
  19. package/dist/agents/builtin.js +0 -1
  20. package/dist/agents/external.js +0 -1
  21. package/dist/agents/parse.js +4 -3
  22. package/dist/agents/result.d.ts +7 -1
  23. package/dist/agents/result.js +20 -1
  24. package/dist/agents/task-control.d.ts +13 -2
  25. package/dist/agents/task-record.d.ts +16 -4
  26. package/dist/agents/task-record.js +32 -0
  27. package/dist/agents/types.d.ts +5 -1
  28. package/dist/ai/apis/chatgpt-rate-limits.js +7 -2
  29. package/dist/ai/providers/discovered-cache.d.ts +10 -4
  30. package/dist/ai/providers/discovered-cache.js +30 -14
  31. package/dist/ai/types.d.ts +2 -1
  32. package/dist/auth/chatgpt/backend-client.d.ts +6 -5
  33. package/dist/auth/chatgpt/backend-client.js +8 -7
  34. package/dist/bundle/ama.cjs +2034 -552
  35. package/dist/cli/compose-agents.d.ts +2 -1
  36. package/dist/cli/compose-agents.js +11 -2
  37. package/dist/cli/subcommands/models-discover.d.ts +1 -0
  38. package/dist/cli/subcommands/models-discover.js +12 -2
  39. package/dist/config/json-schema.js +10 -2
  40. package/dist/config/key-docs.js +9 -2
  41. package/dist/config/merge.d.ts +1 -1
  42. package/dist/config/merge.js +20 -3
  43. package/dist/config/schema-w5.js +4 -2
  44. package/dist/config/schema.js +4 -0
  45. package/dist/config/settings-registry.js +5 -0
  46. package/dist/config/types-w5.d.ts +10 -0
  47. package/dist/config/types-w5.js +2 -0
  48. package/dist/config/types.d.ts +5 -1
  49. package/dist/drivers/runner.js +29 -2
  50. package/dist/git/info.d.ts +19 -0
  51. package/dist/git/info.js +64 -8
  52. package/dist/i18n/catalog.d.ts +58 -8
  53. package/dist/i18n/messages/agents.d.ts +60 -0
  54. package/dist/i18n/messages/agents.js +62 -2
  55. package/dist/i18n/messages/config-keys.d.ts +8 -0
  56. package/dist/i18n/messages/config-keys.js +18 -10
  57. package/dist/i18n/messages/config.d.ts +8 -0
  58. package/dist/i18n/messages/interactive-startup.d.ts +0 -16
  59. package/dist/i18n/messages/interactive-startup.js +0 -16
  60. package/dist/i18n/messages/interactive-view.d.ts +8 -0
  61. package/dist/i18n/messages/interactive-view.js +10 -0
  62. package/dist/i18n/messages/interactive.d.ts +33 -16
  63. package/dist/i18n/messages/interactive.js +31 -0
  64. package/dist/i18n/messages/print.d.ts +4 -0
  65. package/dist/i18n/messages/print.js +4 -0
  66. package/dist/i18n/messages/report.d.ts +8 -0
  67. package/dist/i18n/messages/report.js +12 -4
  68. package/dist/i18n/messages/settings.d.ts +8 -0
  69. package/dist/i18n/messages/settings.js +8 -0
  70. package/dist/i18n/messages/subcommands-config.d.ts +4 -0
  71. package/dist/i18n/messages/subcommands-config.js +4 -0
  72. package/dist/i18n/messages/subcommands.d.ts +4 -0
  73. package/dist/index.d.ts +1 -0
  74. package/dist/modes/commands-core.js +19 -4
  75. package/dist/modes/interactive/agent-bar.d.ts +3 -1
  76. package/dist/modes/interactive/agent-bar.js +12 -5
  77. package/dist/modes/interactive/agent-ui.d.ts +21 -3
  78. package/dist/modes/interactive/agent-ui.js +82 -12
  79. package/dist/modes/interactive/agent-view.d.ts +9 -0
  80. package/dist/modes/interactive/agent-view.js +28 -4
  81. package/dist/modes/interactive/approval-dock.d.ts +51 -0
  82. package/dist/modes/interactive/approval-dock.js +112 -0
  83. package/dist/modes/interactive/approval-ui.d.ts +43 -0
  84. package/dist/modes/interactive/approval-ui.js +64 -0
  85. package/dist/modes/interactive/commands.js +4 -1
  86. package/dist/modes/interactive/event-notices.d.ts +6 -1
  87. package/dist/modes/interactive/event-notices.js +7 -1
  88. package/dist/modes/interactive/interactive-mode.d.ts +4 -2
  89. package/dist/modes/interactive/interactive-mode.js +46 -39
  90. package/dist/modes/interactive/interrupt-send.d.ts +25 -0
  91. package/dist/modes/interactive/interrupt-send.js +32 -0
  92. package/dist/modes/interactive/key-dispatch.d.ts +29 -5
  93. package/dist/modes/interactive/key-dispatch.js +97 -8
  94. package/dist/modes/interactive/line/line-mode.d.ts +1 -0
  95. package/dist/modes/interactive/line/line-mode.js +34 -7
  96. package/dist/modes/interactive/run-indicator.d.ts +34 -2
  97. package/dist/modes/interactive/run-indicator.js +62 -8
  98. package/dist/modes/interactive/session-events.js +5 -1
  99. package/dist/modes/interactive/startup-header.d.ts +29 -14
  100. package/dist/modes/interactive/startup-header.js +93 -59
  101. package/dist/modes/interactive/startup-logo.d.ts +83 -0
  102. package/dist/modes/interactive/startup-logo.js +183 -0
  103. package/dist/modes/interactive/status-area.d.ts +18 -0
  104. package/dist/modes/interactive/status-area.js +67 -1
  105. package/dist/modes/interactive/status-bar.d.ts +13 -2
  106. package/dist/modes/interactive/status-bar.js +60 -17
  107. package/dist/modes/interactive/status-line.d.ts +11 -8
  108. package/dist/modes/interactive/status-line.js +52 -39
  109. package/dist/modes/interactive/status-quota.d.ts +58 -0
  110. package/dist/modes/interactive/status-quota.js +155 -0
  111. package/dist/modes/interactive/subagent-view.d.ts +1 -0
  112. package/dist/modes/interactive/subagent-view.js +8 -0
  113. package/dist/modes/interactive/task-background.d.ts +31 -0
  114. package/dist/modes/interactive/task-background.js +68 -0
  115. package/dist/modes/interactive/tool-view.d.ts +7 -1
  116. package/dist/modes/interactive/tool-view.js +24 -1
  117. package/dist/modes/print/print-mode.d.ts +11 -0
  118. package/dist/modes/print/print-mode.js +36 -1
  119. package/dist/modes/rpc/commands.d.ts +4 -1
  120. package/dist/modes/rpc/commands.js +24 -2
  121. package/dist/rpc.d.ts +20 -0
  122. package/dist/rpc.js +3 -0
  123. package/dist/tools/task-ctl.d.ts +2 -0
  124. package/dist/tools/task-ctl.js +7 -2
  125. package/dist/tools/task.d.ts +11 -0
  126. package/dist/tools/task.js +20 -2
  127. package/dist/tools/types.d.ts +6 -0
  128. package/dist/tui/components/editor.d.ts +2 -0
  129. package/dist/tui/components/editor.js +4 -0
  130. package/dist/tui/components/loader.d.ts +5 -1
  131. package/dist/tui/components/loader.js +18 -5
  132. package/dist/tui/keybindings.d.ts +15 -3
  133. package/dist/tui/keybindings.js +15 -3
  134. package/docs/agents.md +52 -28
  135. package/docs/en/host-api.md +5 -1
  136. package/docs/en/providers.md +1 -1
  137. package/docs/en/rpc.md +28 -14
  138. package/docs/en/sessions.md +3 -1
  139. package/docs/en/tui.md +106 -70
  140. package/docs/host-api.md +5 -1
  141. package/docs/providers.md +4 -2
  142. package/docs/rpc.md +28 -14
  143. package/docs/session-format.md +1 -1
  144. package/docs/sessions.md +2 -1
  145. package/docs/tui-design.md +42 -29
  146. package/docs/tui.md +106 -70
  147. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,91 @@ English · [简体中文](CHANGELOG.zh-CN.md)
5
5
  > This file is in English starting with 0.6.0. Release notes for 0.1 through 0.5.1 are in Chinese in
6
6
  > [CHANGELOG.zh-CN.md](CHANGELOG.zh-CN.md). New entries go into both files.
7
7
 
8
+ ## 0.6.4 (2026-10-03)
9
+
10
+ - **Interrupt and send now**: while a run is in progress, Enter still queues the message as a steer (delivered at the next
11
+ delivery point), and the new `Ctrl+X` (key action `app.message.interrupt`) stops the current turn at once (model stream and
12
+ running tools; every tool call keeps exactly one result, `aborted by user`) and immediately starts a new turn with the
13
+ input, queued steers joined in front (`origin: "interrupt"`, `↳ interrupt` in the message area); with an empty input it
14
+ sends the queued steers now. Esc is unchanged. `ui.enterWhileRunning: "queue" | "interrupt"` (default queue, editable in
15
+ `/config`) swaps Enter and `Ctrl+X`. The running line shows `Enter queue · Ctrl+X interrupt & send` while the input box has
16
+ text. The sub-agent view supports the same key: an ama sub-agent stops its turn and starts a new one with the message; an
17
+ external agent is interrupted when its driver can cancel a single turn (ACP, Claude stream-json, Codex) and otherwise the
18
+ message is queued with a hint. Line mode accepts `/interrupt <text>`; RPC `prompt` / `steer` and the SDK take
19
+ `interrupt: true`. The new request keeps the interrupted request as its prefix, so the cache keeps hitting. Docs:
20
+ docs/tui.md, docs/rpc.md.
21
+ - **Status line split into sides; quota labels fixed**: the `full` layout now keeps state and switches on the left and
22
+ metrics and the model on the right. The rate line's left side holds `codemode on` (with `net!`) · sandbox · preset ·
23
+ `→ fallback model` · queue count · host status, and its right side `tps … (avg · ttft) · ↑ ↓ · cache · re-billing · [-]`;
24
+ the status bar keeps the permission mode and the `shift+tab` hint on the left; the quota line is right-aligned. When
25
+ narrow, right-side metrics drop before left-side switches; the permission mode, `tps` and `[-]` never drop; the
26
+ single-line `compact` layout keeps its token order. Quota labels follow the window length: a weekly window sent as
27
+ primary reads `Weekly` instead of `7d:`, and the 5-hour window comes first; the all-zero "no such window" the server
28
+ sends is no longer rendered as `0d: 0.0%` (filtered both when parsing and when rendering). Docs: docs/tui.md.
29
+
30
+ ## 0.6.3 (2026-10-03)
31
+
32
+ - **TUI: `Ctrl+B` moves foreground tasks to the background; background approvals dock in the agent bar**: while the main
33
+ turn waits for a foreground sub-agent task (or `task_ctl wait`), `Ctrl+B` moves it to the background whatever is in the
34
+ input box: the tool line turns into `⎿ moved to the background · 12s` with a follow-up status line, the main turn carries
35
+ on and you can keep chatting, and the task reports back with a `<task-notification>` turn. With nothing to move, `Ctrl+B`
36
+ still moves the cursor left. The running line shows `Ctrl+B to background`; in tmux press `C-b C-b`. In the agent bar, `b`
37
+ moves the selected task to the background and `x` stops it (press twice); `/tasks bg [id]` does the same from the command
38
+ line (line mode too). Esc interrupts only the foreground and says which background tasks keep running. Approvals of
39
+ background tasks no longer pop up while the main session is busy or the input box has a draft: they dock in the agent bar
40
+ ("needs approval", running line `↓ handle approval`) and pop up once the main session is idle with an empty input, or
41
+ when you open that task's view; approvals of the main session and of foreground tasks are unchanged. Docs: docs/tui.md.
42
+ - **Background sub-agents: config, `-p` and RPC**: new `subagents.background: "auto" | "always" | "never"` (default auto:
43
+ task runs in the background by default in the TUI / RPC / ACP and in the foreground with `-p`; the call argument and the
44
+ agent type's `background:` take precedence) and `subagents.autoBackgroundAfterMs` (move a foreground task to the background
45
+ after it has run this long; default 0, off). Both are accepted at project level and editable in `/config`. When background
46
+ tasks are still running after the main turn, `-p` prints one stderr line and waits for them and their notification turns
47
+ before printing the result (bounded by `--max-turns` / `--max-cost`, exit 8 at the limit; Ctrl+C still stops); the json
48
+ result carries `tasks`. RPC adds `background_task { taskId? }` → `{ backgrounded }` and the `subagent_background` event
49
+ (44 commands), and the SDK `session.backgroundTask(taskId?)`. Docs: docs/agents.md, docs/rpc.md.
50
+ - **Agent bar is reachable again**: `↓` on an empty input is now the only default key into the agent bar and works whenever
51
+ the session has tasks, even after the bar collapsed (it used to require the bar to be visible). `Ctrl+B` no longer enters
52
+ the bar (tmux's default prefix swallowed it); it is reserved for moving foreground tasks to the background and still moves
53
+ the cursor left for now (`"app.agents.focus": ["down", "ctrl+b"]` restores the old key). Pressing `↓` with text in the input
54
+ box, with `ui.agentBar: "off"` or with no tasks now shows a one-line hint instead of doing nothing silently; `↓` while
55
+ browsing input history still steps through history. The running line ends with `↓ Agent bar` while the bar has tasks
56
+ (dropped on narrow terminals). Embedding hosts (with a profile) no longer default to `ui.agentBar: "off"`; a host that does
57
+ not want the bar sets it in its profile's config file.
58
+ - **Sub-agents run in the background by default; foreground tasks can be moved to the background**: in the TUI, RPC and
59
+ ACP a `task` without `background` now returns a taskId at once and the result arrives later as a `<task-notification>`;
60
+ `-p` keeps waiting in the foreground (setting `subagents.background`: `auto` (default) / `always` / `never`; an agent
61
+ definition's `background:` and the call's own argument still win, and built-in types no longer pin `background: false`).
62
+ A blocking foreground `task` or `task_ctl wait` can be moved to the background (`session.backgroundTask(taskId?)`, event
63
+ `subagent_background`): the tool returns a fixed "Moved to the background …; it was not interrupted" result, the task is
64
+ detached from the parent turn (Esc no longer stops it) and reports with the usual notification;
65
+ `subagents.autoBackgroundAfterMs` (default 0, off) does the same after a timeout. The `task` description and its one rule
66
+ were rewritten for the background default (session constants; the tool table differs between the TUI and `-p`).
67
+
68
+ - **ChatGPT subscription models use the backend's context window**: the context window reported by the ChatGPT backend's
69
+ model list (codex `context_window`, and siwc entries when they carry it) now takes precedence over models.dev, which lists
70
+ the API window (1.1M for some models) while the subscription backend accepts less (272k); auto-compaction used to plan for
71
+ the larger window, so long sessions were rejected past 272k. models.dev still fills fields the backend leaves out (output
72
+ limit and the like) but no longer overrides input modalities or reasoning efforts the backend reports; when neither has a
73
+ context window, `chatgpt` models use a conservative 128k instead of turning auto-compaction off. `ama models discover chatgpt`
74
+ shows the backend window marked "(backend)" and lists models the backend reported none for. Caches written by older
75
+ versions without windows keep the models.dev value until `ama models discover chatgpt` refreshes them.
76
+
77
+ - **Status line: subscription quota line and reference colors**: with a ChatGPT subscription model the `full` layout gets a
78
+ third line below the status bar, `Session: 10.0% | Reset: 2h 18m | Weekly: 31.0% | Weekly Reset: 6d 5h` (from
79
+ `quota_update`; refreshed once a minute; `5h 10% ↻2h18m · wk 31% ↻6d5h` below 80 columns; the codex flavor shows a
80
+ placeholder until the first request, siwc without data and non-subscription models show nothing). `compact` only appends a
81
+ short `5h 10% wk 31%` item at the end, keeping the existing order. The `full` lines are recolored after the reference (dim
82
+ labels; purple rates, durations and reset times; blue model, thinking level and amounts; green directory and branch; yellow
83
+ cost; threshold-colored percentages), and the branch shows `↑N` / `↓N` ahead of / behind its upstream. Docs: docs/tui.md
84
+ "Layout".
85
+ - **Startup header with an AMA logo and a short light-up animation**: the boxed info block is replaced by a 5-row "AMA" logo
86
+ (block characters, colored letter by letter with the theme's accent → user → tool; a `_ / \ |` version in ASCII mode) with
87
+ the version, model, directory, mode and key hints beside it (72+ columns) or below it (48–71 columns); below 48 columns a
88
+ two-line header is shown. On startup a one-off sweep of about a second lights the logo up and settles in place, leaving no
89
+ frames in the scrollback; any key settles it at once and still reaches the input box. It does not play with
90
+ `ui.animation: false`, without colors, outside a TTY, in an embedding host, under `CI`, with a command-line prompt or in a
91
+ short terminal. New `ui.logo: "auto" | "off"` (off shows only the info lines). Docs: docs/en/tui.md "Startup screen".
92
+
8
93
  ## 0.6.2 (2026-10-03)
9
94
 
10
95
  - **ChatGPT codex sign-in lists models, and the channel follows the sign-in method**: the codex model list
@@ -4,6 +4,65 @@
4
4
 
5
5
  > 从 0.6.0 起 [CHANGELOG.md](CHANGELOG.md) 为英文,本文件保留中文记录(0.1–0.5.1 的完整历史在此)。新条目两份都要加。
6
6
 
7
+ ## 0.6.4(2026-10-03)
8
+
9
+ - **打断并立即发送**:运行中按 Enter 仍是排队插话(等下一个投递点送达),新增 `Ctrl+X`(键位动作 `app.message.interrupt`)立即中止
10
+ 当前回合(模型流与正在跑的工具,每个工具调用仍恰有一个结果 `aborted by user`),并马上以输入框的文字开新回合,已排队的插话拼在
11
+ 前面(会话里 `origin: "interrupt"`,消息区标 `↳ 打断`);输入为空时把排队的插话立即送出。Esc 语义不变。配置
12
+ `ui.enterWhileRunning: "queue" | "interrupt"`(缺省 queue,`/config` 可改)互换 Enter 与 `Ctrl+X`。输入框有字时运行提示行显示
13
+ `Enter 排队 · Ctrl+X 打断并发送`。子 Agent 视图同样可用:ama 子 Agent 中止本轮后立即以这条消息开新一轮;外部 Agent 的驱动能中断
14
+ 单个回合(ACP、Claude stream-json、Codex)时中断后发送,否则退回排队并提示。line 模式认 `/interrupt <文本>`;RPC `prompt` /
15
+ `steer` 与 SDK 增 `interrupt: true`。新请求以被打断的那次请求为前缀,缓存照常命中。文档:docs/tui.md、docs/rpc.md。
16
+ - **状态栏左右分区与配额标签修正**:`full` 布局改为左列「状态 / 开关」、右列「度量与模型」——速率行左区是 `codemode on`(含
17
+ `net!`)· 沙箱 · 预设 · `→ 回退模型` · 排队数 · 宿主状态,右区是 `tps … (avg · ttft) · ↑ ↓ · cache · 重计费 · [-]`;状态栏
18
+ 左区仍是权限模式与 `shift+tab` 提示;配额行右对齐。窄屏先丢右区度量、再丢左区开关,权限模式、`tps` 与 `[-]` 不丢;`compact`
19
+ 单行的记号顺序不变。配额标签按窗口时长认:周窗口放在 primary 时显示「本周 / Weekly」而不是 `7d:`,5 小时窗口排在前面;
20
+ 服务端用全 0 表示的空窗口不再渲染成 `0d: 0.0%`(解析与显示两层都过滤)。文档:docs/tui.md。
21
+
22
+ ## 0.6.3(2026-10-03)
23
+
24
+ - **TUI:`Ctrl+B` 前台任务转后台,后台任务审批停靠在 Agent 栏**:主回合在等前台子 Agent 任务(或 `task_ctl wait`)时按
25
+ `Ctrl+B` 把它转后台,不看输入框有没有字:工具行变成 `⎿ 已转后台 · 12s` 加跟随行,主回合接着走、可以继续对话,任务结束后以
26
+ `<task-notification>` 回合报告。没有可转的任务时 `Ctrl+B` 仍是光标左移。运行提示行带 `Ctrl+B 转后台`;tmux 里按 `C-b C-b`。
27
+ Agent 栏内 `b` 转后台选中的任务、`x` 连按两次停止;命令 `/tasks bg [id]` 同样可用(line 模式也认)。Esc 只中断前台,提示
28
+ 里写明哪些后台任务仍在运行。后台任务的审批在主会话忙或输入框有草稿时不再弹框,停靠在 Agent 栏(「等待审批」,运行提示行
29
+ `↓ 处理审批`),主会话空闲且输入为空时自动弹出,打开该任务的视图时立即弹出;主会话与前台任务的审批不变。文档:docs/tui.md。
30
+ - **后台子 Agent 的配置、`-p` 与 RPC**:新增 `subagents.background: "auto" | "always" | "never"`(缺省 auto:交互界面 / RPC / ACP
31
+ 下 task 缺省后台,`-p` 下前台;调用参数与类型定义的 `background:` 优先)与 `subagents.autoBackgroundAfterMs`(前台任务运行超过
32
+ 该毫秒数自动转后台,缺省 0 关闭),两键项目级也认、`/config` 面板可改。`-p` 主回合结束后若还有后台任务在跑,stderr 一行提示并
33
+ 等它们结束、跑完通知回合再输出(受 `--max-turns` / `--max-cost` 约束,到限退出 8;Ctrl+C 照常中止),json 结果带 `tasks`。
34
+ RPC 新增 `background_task { taskId? }` → `{ backgrounded }` 与事件 `subagent_background`(共 44 条命令),SDK 为
35
+ `session.backgroundTask(taskId?)`。文档:docs/agents.md「前台与后台」、docs/rpc.md。
36
+ - **Agent 栏重新可达**:空输入时的 `↓` 成为唯一缺省进栏键,本会话有任务即可进栏,栏收起后也行(以前要求栏可见)。`Ctrl+B`
37
+ 不再进栏(tmux 缺省前缀会吃掉它),留给「前台任务转后台」,目前仍是光标左移(想要原来的键位写
38
+ `"app.agents.focus": ["down", "ctrl+b"]`)。输入框有字、`ui.agentBar: "off"` 或没有任务时按 `↓` 给一行提示,不再无声落空;
39
+ 浏览输入历史时 `↓` 照旧翻历史。Agent 栏有任务时运行提示行末尾带 `↓ Agent 栏`(窄屏整项丢掉)。嵌入宿主(有 profile)
40
+ 不再缺省关闭 Agent 栏,不要栏的宿主在 profile 的配置文件里写 `ui.agentBar: "off"`。
41
+ - **子 Agent 缺省后台、前台任务可转后台**:TUI、RPC 与 ACP 下不写 `background` 的 `task` 立即返回 taskId,结果随后以
42
+ `<task-notification>` 到达;`-p` 仍缺省前台等待(配置 `subagents.background`:`auto`(缺省)/ `always` / `never`;类型
43
+ 定义的 `background:` 与调用参数仍优先,内置类型不再固定 `background: false`)。阻塞中的前台 `task` 或 `task_ctl wait`
44
+ 可以转后台(`session.backgroundTask(taskId?)`,事件 `subagent_background`):工具立即返回固定文案「Moved to the
45
+ background …; it was not interrupted」,任务与父回合解绑(Esc 不再连带停止),完成后照常通知;
46
+ `subagents.autoBackgroundAfterMs`(缺省 0 关闭)到时自动转后台。`task` 描述与规则句按缺省后台改写(会话内不变;TUI 与
47
+ `-p` 的工具表因此不同)。
48
+
49
+ - **ChatGPT 订阅模型的上下文窗口取后端值**:ChatGPT 后端模型列表给的上下文窗口(codex 的 `context_window`,siwc 条目带了也取)
50
+ 现在优先于 models.dev——后者记的是 API 版窗口(部分模型 1.1M),订阅后端实际只收 272k,自动压缩按大窗口规划,长会话超过
51
+ 272k 后请求被拒。models.dev 仍补后端没给的字段(输出上限等),但不再覆盖后端给的输入模态与推理强度;两边都没有上下文窗口时,
52
+ `chatgpt` 模型按保守缺省 128k,不再关闭自动压缩。`ama models discover chatgpt` 显示后端窗口并标「(后端)」,列出后端没给窗口
53
+ 的模型。旧版本写的缓存不含窗口时照旧用 models.dev,重新 `ama models discover chatgpt` 即刷新。
54
+
55
+ - **状态栏订阅配额行与配色**:当前模型走 ChatGPT 订阅时,`full` 布局在状态栏下方多一行
56
+ `5 小时:10.0% | 重置:2h 18m | 本周:31.0% | 本周重置:6d 5h`(来自 `quota_update`,每分钟刷新;窄于 80 列压缩为
57
+ `5h 10% ↻2h18m · 周 31% ↻6d5h`;codex 方式首次请求前显示占位,siwc 无数据与非订阅模型不显示)。`compact` 只在行尾追加短项
58
+ `5h 10% 周 31%`,既有顺序不变。`full` 三行按参考配色(标签暗灰;速率、时长与重置时间紫;模型、思考级别与输出量蓝;目录与分支绿;
59
+ 费用黄;百分比按阈值),分支后显示领先 / 落后上游 `↑N` / `↓N`。文档:docs/tui.md「布局」。
60
+ - **启动头换成 AMA 字符画与简短的点亮动画**:原来带框的信息块改为 5 行「AMA」字符画(块字符,按字母取主题的 accent → user → tool
61
+ 三色;ASCII 模式用 `_ / \ |` 拼的字形),版本、模型、目录、模式与按键提示放在右侧(≥ 72 列)或下方(48–71 列);窄于 48 列
62
+ 退回两行简洁头。启动时播放一次约 1 秒的扫描点亮,原地定格、不在回滚里留帧;按任意键立即定格,按键照常进入输入框。
63
+ `ui.animation: false`、无色、非 TTY、嵌入宿主、`CI`、命令行带提示、终端过矮时不播放。新增 `ui.logo: "auto" | "off"`(off 只显示
64
+ 信息行)。文档:docs/tui.md「启动画面」。
65
+
7
66
  ## 0.6.2(2026-10-03)
8
67
 
9
68
  - **ChatGPT codex 方式能列出模型,渠道跟随登录方式**:codex 模型列表(`GET /models?client_version=…`)原来发 ama 自己的版本号,