@aragon-agent/cli 0.6.14 → 0.6.15

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 (113) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +250 -233
  3. package/dist/agent/controller.d.ts +27 -1
  4. package/dist/agent/controller.js +182 -45
  5. package/dist/agent/plan-prompt.d.ts +1 -1
  6. package/dist/agent/plan-prompt.js +4 -3
  7. package/dist/agent/project-guidance-prompt.d.ts +4 -0
  8. package/dist/agent/project-guidance-prompt.js +104 -0
  9. package/dist/agent/reducer.d.ts +2 -0
  10. package/dist/agent/reducer.js +4 -0
  11. package/dist/agent/system-prompt.js +4 -0
  12. package/dist/commands/builtins.js +2 -2
  13. package/dist/compaction/child.d.ts +9 -1
  14. package/dist/compaction/child.js +39 -13
  15. package/dist/compaction/command.js +20 -10
  16. package/dist/compaction/compactor.d.ts +33 -204
  17. package/dist/compaction/compactor.js +311 -726
  18. package/dist/compaction/digest.d.ts +15 -51
  19. package/dist/compaction/digest.js +113 -148
  20. package/dist/compaction/limits.d.ts +19 -142
  21. package/dist/compaction/limits.js +20 -147
  22. package/dist/compaction/memory-identity.d.ts +16 -0
  23. package/dist/compaction/memory-identity.js +63 -0
  24. package/dist/compaction/memory-input.d.ts +25 -0
  25. package/dist/compaction/memory-input.js +106 -0
  26. package/dist/compaction/memory-render.d.ts +4 -0
  27. package/dist/compaction/memory-render.js +47 -0
  28. package/dist/compaction/memory-validation.d.ts +21 -0
  29. package/dist/compaction/memory-validation.js +268 -0
  30. package/dist/compaction/memory.d.ts +79 -0
  31. package/dist/compaction/memory.js +118 -0
  32. package/dist/compaction/meter.d.ts +14 -10
  33. package/dist/compaction/meter.js +53 -19
  34. package/dist/compaction/operation.d.ts +18 -0
  35. package/dist/compaction/operation.js +68 -0
  36. package/dist/compaction/pressure.d.ts +5 -20
  37. package/dist/compaction/pressure.js +13 -23
  38. package/dist/compaction/summarize-call.d.ts +3 -16
  39. package/dist/compaction/summarize-call.js +20 -20
  40. package/dist/compaction/summary-prompt.d.ts +29 -66
  41. package/dist/compaction/summary-prompt.js +132 -178
  42. package/dist/compaction/types.d.ts +21 -3
  43. package/dist/compaction/wiring.d.ts +10 -25
  44. package/dist/compaction/wiring.js +56 -66
  45. package/dist/config/schema.d.ts +1 -1
  46. package/dist/config/schema.js +1 -1
  47. package/dist/exec/events.d.ts +8 -0
  48. package/dist/exec/index.js +13 -6
  49. package/dist/exec/runner.d.ts +8 -0
  50. package/dist/exec/runner.js +26 -2
  51. package/dist/session/persist.d.ts +3 -0
  52. package/dist/session/persist.js +9 -0
  53. package/dist/session/store.js +2 -0
  54. package/dist/session/validate-session.js +34 -0
  55. package/dist/team/subagent.js +8 -0
  56. package/dist/ui/App.js +218 -116
  57. package/dist/ui/BottomStatusRow.d.ts +5 -10
  58. package/dist/ui/BottomStatusRow.js +7 -11
  59. package/dist/ui/Composer.d.ts +4 -2
  60. package/dist/ui/Composer.js +2 -2
  61. package/dist/ui/Header.d.ts +6 -2
  62. package/dist/ui/Header.js +7 -6
  63. package/dist/ui/PromptInput.d.ts +3 -1
  64. package/dist/ui/PromptInput.js +32 -41
  65. package/dist/ui/StatusBar.d.ts +6 -0
  66. package/dist/ui/StatusBar.js +8 -7
  67. package/dist/ui/Transcript.js +1 -1
  68. package/dist/ui/entries/CompactionCard.d.ts +3 -1
  69. package/dist/ui/entries/CompactionCard.js +7 -5
  70. package/dist/ui/frame-differ.js +27 -0
  71. package/dist/ui/frame-observer.js +18 -5
  72. package/dist/ui/interaction-copy.d.ts +73 -73
  73. package/dist/ui/interaction-copy.js +30 -38
  74. package/dist/ui/interaction-hints.d.ts +8 -1
  75. package/dist/ui/interaction-hints.js +56 -69
  76. package/dist/ui/layout/AppShell.d.ts +6 -2
  77. package/dist/ui/layout/AppShell.js +2 -2
  78. package/dist/ui/layout/OverlayFrame.d.ts +2 -0
  79. package/dist/ui/layout/OverlayFrame.js +23 -14
  80. package/dist/ui/layout/ScrollViewport.d.ts +3 -1
  81. package/dist/ui/layout/ScrollViewport.js +10 -2
  82. package/dist/ui/layout/budget.d.ts +25 -26
  83. package/dist/ui/layout/budget.js +29 -22
  84. package/dist/ui/layout/document-layout.d.ts +2 -2
  85. package/dist/ui/layout/document-layout.js +2 -3
  86. package/dist/ui/layout/queue-layout.js +4 -4
  87. package/dist/ui/layout/status-detail-layout.d.ts +9 -0
  88. package/dist/ui/layout/status-detail-layout.js +56 -0
  89. package/dist/ui/layout/status-layout.d.ts +19 -2
  90. package/dist/ui/layout/status-layout.js +95 -84
  91. package/dist/ui/layout/wrap-rows.d.ts +2 -0
  92. package/dist/ui/layout/wrap-rows.js +21 -7
  93. package/dist/ui/overlays/ConfirmDialog.d.ts +2 -1
  94. package/dist/ui/overlays/ConfirmDialog.js +22 -3
  95. package/dist/ui/overlays/HelpOverlay.js +9 -2
  96. package/dist/ui/overlays/ModelPicker.d.ts +5 -8
  97. package/dist/ui/overlays/ModelPicker.js +44 -10
  98. package/dist/ui/overlays/ModelProfileEditor.js +2 -0
  99. package/dist/ui/overlays/ModelProfilePicker.d.ts +1 -0
  100. package/dist/ui/overlays/ModelProfilePicker.js +4 -2
  101. package/dist/ui/overlays/PlanReviewOverlay.d.ts +2 -1
  102. package/dist/ui/overlays/PlanReviewOverlay.js +7 -4
  103. package/dist/ui/overlays/QuestionOverlay.d.ts +2 -1
  104. package/dist/ui/overlays/QuestionOverlay.js +45 -32
  105. package/dist/ui/overlays/QueueOverlay.js +2 -2
  106. package/dist/ui/overlays/SettingsScreen.d.ts +1 -0
  107. package/dist/ui/overlays/SettingsScreen.js +10 -3
  108. package/dist/ui/run-metrics.d.ts +23 -0
  109. package/dist/ui/run-metrics.js +27 -0
  110. package/dist/ui/status-feedback.d.ts +33 -0
  111. package/dist/ui/status-feedback.js +36 -0
  112. package/dist/ui/stdout-frame-writer.js +28 -0
  113. package/package.json +2 -2
package/README.md CHANGED
@@ -432,8 +432,8 @@ completes, `Up` / `Down` moves the selection, `Esc` closes it.
432
432
 
433
433
  | Key | Action |
434
434
  | --- | --- |
435
- | `Enter` | 空闲时发送,运行时加入队列;收到 Core 已纳入会话的接收凭据后才移除 Queue 提示 |
436
- | `Ctrl+J` / `Alt+Enter` / `Shift+Enter` | 插入换行。Ctrl+J 已通过输入链路测试;另外两种组合键需要宿主发送独立序列,Alt+Enter 可能被宿主拦截。参见 [终端设置](#terminal-setup-for-shiftenter) |
435
+ | `Enter` | 空闲时发送,运行时加入队列;收到 Core 已纳入会话的接收凭据后才移除 Queue 提示 |
436
+ | `Ctrl+J` / `Alt+Enter` / `Shift+Enter` | 插入换行。Ctrl+J 已通过输入链路测试;另外两种组合键需要宿主发送独立序列,Alt+Enter 可能被宿主拦截。参见 [终端设置](#terminal-setup-for-shiftenter) |
437
437
  | `Shift+Tab` | Toggle **plan mode** (`BUILD` <-> `PLAN`). Equivalent: `/plan`. On Windows this needs a console flag Node < 22.17 does not set; aragon sets it at startup — see [Requirements](#requirements) |
438
438
  | `Ctrl+P` | The same toggle, over a channel no Windows console can swallow. Use it if `Shift+Tab` does nothing |
439
439
  | `Esc` | Close an overlay or popup; otherwise ask for interruption confirmation. While idle, cancel pending auto-continuation |
@@ -452,18 +452,15 @@ completes, `Up` / `Down` moves the selection, `Esc` closes it.
452
452
  | `Alt/Ctrl+←` / `→` | Word-wise cursor jump |
453
453
  | `Ctrl+W`, `Alt+Backspace` | Delete the previous word |
454
454
  | `Ctrl+U` / `Ctrl+K` | Kill to line start / end |
455
- | `Up` / `Down` | 按视觉行移动;空草稿或正在浏览历史时,才在边界召回历史,避免覆盖新草稿 |
455
+ | `Up` / `Down` | 按视觉行移动;空草稿或正在浏览历史时,才在边界召回历史,避免覆盖新草稿 |
456
456
  | Paste | Inserted as-is up to 6 lines / 400 chars; larger collapses to `[Pasted text #1 +15 lines]`, which deletes as one unit and expands in full when you send. `--no-paste` restores the pre-0.6.3 behaviour |
457
457
  | `?` | Open help (empty input) |
458
458
 
459
- In **full-screen mode** the transcript is scrolled by the app itself: `PgUp` /
460
- `PgDn` and `Shift+↑` / `Shift+↓`. While pinned to the bottom the viewport follows
461
- new output automatically; once you scroll away the status bar shows `↑N`, a slim
462
- scrollbar occupies the terminal's last column (including 40-column windows). Drag its thumb
463
- to move through history, or click the track to move one page. Messages, the team panel
464
- and the input area scroll together; typing or editing returns to the input without
465
- losing the draft. The fixed status row reports the distance from the end while reading history.
466
- `PgDn` moves one page down; editing or submitting returns directly to the end.
459
+ In **full-screen mode**, PgUp/PgDn, Shift+Up/Down and the right-edge scrollbar
460
+ scroll the transcript and its team/queue panels. The input stays fixed and visible.
461
+ Typing or submitting returns the transcript to the newest output without losing the draft.
462
+ The header shows `^N`, the line offset from the bottom (capped at `^9999+`).
463
+ The scrollbar track ends above the input.
467
464
 
468
465
  **The mouse wheel is a viewport gesture and nothing else.** Wherever the pointer
469
466
  happens to be — including right on top of the composer — a notch scrolls the
@@ -493,14 +490,14 @@ is what it used to do. Inline mode is unaffected either way.
493
490
 
494
491
  ## Terminal setup for Shift+Enter
495
492
 
496
- 输入支持 `Ctrl+J`、`Alt+Enter` 和可独立编码的 `Shift+Enter` 换行。如果终端把
497
- Shift+Enter 与 Enter 都发送为 CR,应用无法区分;请用 `/terminal-setup` 查看绑定,
498
- 让 Shift+Enter 发送 `\u001b[13;2u`。合并到已有终端配置,不要覆盖其他快捷键;
499
- 终端拦截某个组合键时可使用另外两种方式。参考绑定如下:
493
+ 输入支持 `Ctrl+J`、`Alt+Enter` 和可独立编码的 `Shift+Enter` 换行。如果终端把
494
+ Shift+Enter 与 Enter 都发送为 CR,应用无法区分;请用 `/terminal-setup` 查看绑定,
495
+ 让 Shift+Enter 发送 `\u001b[13;2u`。合并到已有终端配置,不要覆盖其他快捷键;
496
+ 终端拦截某个组合键时可使用另外两种方式。参考绑定如下:
500
497
 
501
- - **Windows Terminal** — `settings.json` 的 `actions` 与 `keybindings` 分别定义动作和按键;完整示例见下文“输入、待处理队列与底部状态区”。
498
+ - **Windows Terminal** — `settings.json` 的 `actions` 与 `keybindings` 分别定义动作和按键;完整示例见下文“输入、待处理队列与底部状态区”。
502
499
  - **VS Code integrated terminal** — `keybindings.json`:
503
- `{ "key": "shift+enter", "command": "workbench.action.terminal.sendSequence", "when": "terminalFocus", "args": { "text": "\u001b[13;2u" } }`
500
+ `{ "key": "shift+enter", "command": "workbench.action.terminal.sendSequence", "when": "terminalFocus", "args": { "text": "\u001b[13;2u" } }`
504
501
  - **iTerm2** — Settings > Profiles > Keys > Key Mappings, `Shift+Enter` ->
505
502
  *Send Escape Sequence* `[13;2u`
506
503
  - **kitty / WezTerm / foot** — native once keyboard-enhancement mode is on
@@ -517,29 +514,29 @@ user-side binding reaches the same result for the one key that needs it.
517
514
 
518
515
  ## Queued messages while the agent runs
519
516
 
520
- Agent 运行中发送的消息会进入队列。输入框附近的独立 Queue 面板按顺序显示摘要,
521
- 限高后显示隐藏条数;固定状态栏始终显示真实待处理总数,没有自动消失的时间限制。
522
- 使用 `/queue` 分页查看所有消息的完整原文,未接收消息不会在普通转录中重复显示:
517
+ Agent 运行中发送的消息会进入队列。输入框附近的独立 Queue 面板按顺序显示摘要,
518
+ 限高后显示隐藏条数;固定状态栏始终显示真实待处理总数,没有自动消失的时间限制。
519
+ 使用 `/queue` 分页查看所有消息的完整原文,未接收消息不会在普通转录中重复显示:
523
520
 
524
521
  ```
525
522
  ◷ Queue: also check the tests
526
523
  ```
527
524
 
528
- 仅当 Core 将消息写入对话历史并发出对应消息 ID 的接收回执,Queue 状态才移除。
529
- 这表示引擎已接管后续处理,不表示回答完成;`turn_start`、动画和提示超时都不能代替回执。
530
- 相同正文的两次发送仍是两条消息。中断或失败后尚未接收的消息保留并标记暂停。
531
- 窄屏优先保留运行状态、待处理数量和上下文;其他字段整项隐藏,不截断关键数值。
532
- 快捷键集中在操作提示行,并随覆盖层、补全、选区和中断确认状态变化。
533
-
534
- `/clear` 清转录和 TODO,但保留待接收队列。保存和退出会补回被清屏或保留环裁剪的
535
- 未发送全文。恢复存档时,queued 一律成为 `Queued but never sent: ...` 警告,
536
- 不会自动重发;需要发送时请复制正文重新提交。运行尚未退出时 `/reset`、`/resume`
537
- 会拒绝切换,损坏存档在替换当前会话之前报错。
538
-
539
- 应用捕获鼠标时,拖选只保留高亮,按 Ctrl+C 才复制;本次按键不会停止服务或退出。
540
- 选中文字改变、滚轮、其他按键或关闭选区会取消高亮。`--no-mouse` 或宿主原生选择的
541
- 选中即复制由终端设置控制。OSC 52 发送成功仅证明请求已发出,不保证远程终端剪贴板
542
- 已写入;SSH/tmux 是否允许该请求需在实际环境中验证。
525
+ 仅当 Core 将消息写入对话历史并发出对应消息 ID 的接收回执,Queue 状态才移除。
526
+ 这表示引擎已接管后续处理,不表示回答完成;`turn_start`、动画和提示超时都不能代替回执。
527
+ 相同正文的两次发送仍是两条消息。中断或失败后尚未接收的消息保留并标记暂停。
528
+ 窄屏优先保留运行状态、待处理数量和上下文;其他字段整项隐藏,不截断关键数值。
529
+ 快捷键集中在操作提示行,并随覆盖层、补全、选区和中断确认状态变化。
530
+
531
+ `/clear` 清转录和 TODO,但保留待接收队列。保存和退出会补回被清屏或保留环裁剪的
532
+ 未发送全文。恢复存档时,queued 一律成为 `Queued but never sent: ...` 警告,
533
+ 不会自动重发;需要发送时请复制正文重新提交。运行尚未退出时 `/reset`、`/resume`
534
+ 会拒绝切换,损坏存档在替换当前会话之前报错。
535
+
536
+ 应用捕获鼠标时,拖选只保留高亮,按 Ctrl+C 才复制;本次按键不会停止服务或退出。
537
+ 选中文字改变、滚轮、其他按键或关闭选区会取消高亮。`--no-mouse` 或宿主原生选择的
538
+ 选中即复制由终端设置控制。OSC 52 发送成功仅证明请求已发出,不保证远程终端剪贴板
539
+ 已写入;SSH/tmux 是否允许该请求需在实际环境中验证。
543
540
 
544
541
  ## Themes
545
542
 
@@ -586,37 +583,32 @@ session, `showThinking: true` (or `--show-thinking`, or `ARAGON_SHOW_THINKING=1`
586
583
  shows them permanently, and `/settings` has a **Show thinking** row next to
587
584
  **Thinking**.
588
585
 
589
- **There is something to look at while it thinks.** One row directly above the
590
- input box, for as long as a run is in flight, with the keys that act on the run
591
- beside it (it takes the place of the idle hint row below the box, so starting a
592
- run never moves the layout):
586
+ **The input and status stay fixed while output streams.** The default status is
587
+ one row below the input, with one global activity spinner and five fields:
593
588
 
594
- ```
595
- ⠋ Percolating… · ⏎ queue · esc×2 interrupt · ctrl+c×2 exit PLAN
589
+ ```text
590
+ * Thinking | Context ~35% | Think high | 12 tok/s | 1m04s
591
+ * Think C~35% Th:H 12t/s 1m04s
596
592
  ```
597
593
 
598
- The row scrolls with the input box. On a narrow terminal whole clauses are dropped
599
- from the end (`exit` first) and only the phrase is shortened with an ellipsis, so
600
- `queue` and `interrupt` are never cut mid-word. When you scroll history until the
601
- input box is out of view, the animation moves to the fixed row at the bottom, so
602
- there is always exactly one spinner on screen. Terminals shorter than 20 rows, and
603
- `--no-hints`, keep the animation on that fixed row instead.
594
+ Ctrl+G adds a second detail row; press it again to collapse. The header always
595
+ shows the entry, including at 40 columns. Overlays temporarily disable the toggle.
596
+ The preference lasts for the process and survives clear, reset, resume and new runs.
597
+ Only this explicit toggle changes status height; feedback and updates never add rows.
604
598
 
605
- The word rotates every four seconds. It carries no clock and no token count on
606
- purpose: the status bar one row below already has both, under the same
607
- condition, driven by the same ticker. Under `reducedMotion` the spinner is a
608
- static glyph and the word is chosen once and holds — rotating text is motion too.
609
- An idle frame is exactly what it was before this existed, down to the row count.
599
+ The five fields remain visible at 40 columns. Thinking codes O/N/L/M/H/X mean
600
+ off/minimal/low/medium/high/xhigh. Speed is the main Agent's reported output tokens
601
+ divided by total run time, including tools and waits; team, fast and compaction
602
+ tokens are excluded. Missing usage reads `--`; a reported zero is valid. At run end,
603
+ speed returns to `--` and elapsed time stays frozen until the next run. Idle manual
604
+ compaction has its own elapsed time and no output speed.
610
605
 
611
- While a **tool** is in flight the row stops guessing and names it instead:
612
-
613
- ```
614
- ⠙ Running bash
615
- ```
616
-
617
- `running` covers the whole turn, including the minutes the model is idle and a
618
- child process is doing the work. "Pondering" is right for the gap before the
619
- first token and simply untrue during a build.
606
+ Details reserve the actual Esc operation and `^G less`, then fit feedback, actions,
607
+ queue/services/mode, context tokens, session usage and estimated cost, and other
608
+ metadata. Long feedback is clipped within that row; errors also appear in the transcript.
609
+ `Copy sent` means an unconfirmed terminal copy request; `Copied` means confirmed.
610
+ At extreme widths E/F means copy error plus Esc force-stop. Reduced motion uses
611
+ a static status glyph. Built-in interface text is English; user text is unchanged.
620
612
 
621
613
  **A long command is not a blank card.** `bash` is the only tool here that can run
622
614
  for minutes — `npm test`, a `git clone`, a training job — and while it ran, its
@@ -680,9 +672,8 @@ near-identical added ones.
680
672
 
681
673
  - Your previous shell output is **covered, not erased**, and returns untouched
682
674
  when you exit. Nothing in your scrollback is destroyed.
683
- - The frame is fixed at `rows - 1` tall. The header, activity row and status bar
684
- stay visible. The input belongs to the scrolling document; short sessions fill
685
- the space above it, and browsing history moves it out of view.
675
+ - The frame is fixed at `rows - 1` tall. The header, input and status stay visible.
676
+ Only the message area scrolls; Ctrl+G reserves one optional detail row.
686
677
 
687
678
  On exit the session is replayed into the normal buffer as plain text so the
688
679
  conversation survives leaving the screen (`--no-exit-transcript` opts out;
@@ -970,6 +961,39 @@ inline 模式时不显示右栏。低于 12 行使用原有小终端提示;扩
970
961
  inline 仍使用上文的单行任务条。`/todo status` 中的 `Panel: on` 仅表示配置开启,
971
962
  实际可见性还取决于数据和窗口空间;可以通过该命令区分未生成计划与暂时隐藏。
972
963
 
964
+ ## Project guidance
965
+
966
+ For workspace tasks, Aragon is instructed to read existing guidance and indexes before
967
+ choosing an implementation approach, writing a detailed plan, or changing files.
968
+ The protocol starts with the current directory listing and all applicable `AGENTS.md` /
969
+ `agent.md` and `CLAUDE.md` guidance, then README context and index pointers.
970
+ Case variants are recognized; tool calls preserve the actual filename spelling.
971
+
972
+ Supported entries include `.claude-index` as a file or a directory containing
973
+ `index.md` (or a README fallback), and README files such as `.agentmesh/readme`.
974
+ Explicit local index references from other agents are also supported. Relative
975
+ references resolve from the referring document, within the authorized workspace.
976
+ Aragon reads the overview and relevant sections, checks directory guidance for
977
+ the target module, and verifies index locations against current source before
978
+ planning. It avoids recursive orientation scans and unrelated task logs, and
979
+ reuses guidance while it remains current and available in the conversation.
980
+
981
+ Missing or stale indexes do not mean the workspace is a new project, and do not
982
+ trigger index generation. Unreadable entries are reported when relevant; tool
983
+ refusals and task boundaries still apply. Project documents provide conventions
984
+ and navigation, not new authority to run commands or expand the task.
985
+
986
+ This versioned English prompt protocol is shared by TUI Build/Plan, `-p`,
987
+ `aragon exec`, and subagents; replies still follow the user's language. Discovery
988
+ uses available, permitted read-only tools. It is model guidance, not an automatic
989
+ startup scanner, filesystem isolation, or a programmatic read-before-write lock.
990
+ Conversation that needs no workspace context skips discovery.
991
+
992
+ Actual-model acceptance remains incomplete: the deployed model has skipped
993
+ guidance or searched source too early in recorded sessions. See the
994
+ [validation record](../../docs/plans/project-guidance-first/manual-test.md)
995
+ for observed results and remaining release gates.
996
+
973
997
  ## Built-in tools
974
998
 
975
999
  `read_file`, `write_file`, `edit_file`, `list_dir`, `glob`, `grep`, `bash` — all
@@ -1290,25 +1314,11 @@ you for a rate-limited provider's quota. The review's own wall-clock bound is
1290
1314
 
1291
1315
  ## The context gauge
1292
1316
 
1293
- The right end of the status bar answers one question: **how full is the context,
1294
- out of how much.**
1295
-
1296
- ```
1297
- [####----] 43% 86.0k/200.0k total 1.2M^ 48.0k v $3.21 12 tok/s 1m02s
1298
- ^ ^ ^
1299
- | | +-- session spend, prompt side / output side
1300
- | +-- occupied / window
1301
- +-- the two together, as a percentage
1302
- ```
1303
-
1304
- The readouts drop as the terminal narrows, in that order of priority:
1305
-
1306
- | Columns | Right cluster |
1307
- |---|---|
1308
- | >= 96 | `[####----] 43% 86.0k/200.0k total 1.2M^ 48.0k v $3.21` |
1309
- | 72-95 | `[####----] 43% 86.0k/200.0k $3.21` |
1310
- | 60-71 | `[####----] 43% $3.21` |
1311
- | < 60 | `43% $3.21` |
1317
+ The primary status row shows context percentage at every supported width.
1318
+ The expanded details show occupied/window token counts when space permits;
1319
+ `/context` always provides the complete values. No primary field is dropped:
1320
+ narrow screens use `C35%`, `C~35%` or `C?`. Percentages above 999 read
1321
+ `C>999%` or `C~>999%`, retaining the approximation marker.
1312
1322
 
1313
1323
  **Two different markers, because there are two different things to doubt.**
1314
1324
 
@@ -1316,9 +1326,9 @@ The readouts drop as the terminal narrows, in that order of priority:
1316
1326
  either no completed turn has reported usage yet (right after `/resume`, or
1317
1327
  right after a compaction), or tool results have been appended since the last
1318
1328
  measurement and their size is estimated.
1319
- - `?` replaces the **window** when neither the API nor the catalog provides a
1320
- limit. No percentage is shown in that case. The internal 128 000-token fallback
1321
- remains a compaction budget, not a claim about model capacity. See `contextWindow` below.
1329
+ - `?` replaces the **window** when neither the API nor the catalog provides a
1330
+ limit. No percentage is shown in that case. The internal 128 000-token fallback
1331
+ remains a compaction budget, not a claim about model capacity. See `contextWindow` below.
1322
1332
 
1323
1333
  **The percentage keeps moving during a turn.** Every tool result nudges it,
1324
1334
  whether or not compaction is enabled — it is not a compaction feature, and a
@@ -1343,7 +1353,7 @@ Context
1343
1353
  ```
1344
1354
 
1345
1355
  Two lines are worth reading closely. **`Window`** always names where the number
1346
- came from — the model API, the model table, your own `contextWindow`, or the invented
1356
+ came from — the model API, the model table, your own `contextWindow`, or the invented
1347
1357
  placeholder — because those are indistinguishable everywhere else. And
1348
1358
  **`Compaction`** reports what is actually true of this session, including
1349
1359
  `off - not registered for this session (started with --no-compaction)`; it never
@@ -1351,21 +1361,21 @@ promises a threshold that nothing will act on.
1351
1361
 
1352
1362
  ### `contextWindow`
1353
1363
 
1354
- Window resolution uses your explicit override first, then API metadata from the
1355
- configured endpoint, then the built-in catalog (including known aliases and dated
1356
- snapshots). Startup, connection changes, and subsequent prompts refresh discovery
1357
- in the background, with a five-minute cache. OpenAI-compatible endpoints may expose
1358
- `context_length` or `context_window`; Anthropic uses `max_input_tokens`; Google uses
1359
- `inputTokenLimit`. An ID-only models response cannot establish the real limit.
1360
- Google/Anthropic lists are paginated (up to 20 pages within one 15-second deadline).
1361
- Changing the connection or ending the session cancels its pending lookup.
1362
-
1363
- If neither the endpoint nor the catalog knows your model, the status bar shows `?`.
1364
- Set a verified provider limit explicitly:
1364
+ Window resolution uses your explicit override first, then API metadata from the
1365
+ configured endpoint, then the built-in catalog (including known aliases and dated
1366
+ snapshots). Startup, connection changes, and subsequent prompts refresh discovery
1367
+ in the background, with a five-minute cache. OpenAI-compatible endpoints may expose
1368
+ `context_length` or `context_window`; Anthropic uses `max_input_tokens`; Google uses
1369
+ `inputTokenLimit`. An ID-only models response cannot establish the real limit.
1370
+ Google/Anthropic lists are paginated (up to 20 pages within one 15-second deadline).
1371
+ Changing the connection or ending the session cancels its pending lookup.
1372
+
1373
+ If neither the endpoint nor the catalog knows your model, the status bar shows `?`.
1374
+ Set a verified provider limit explicitly:
1365
1375
 
1366
1376
  ```bash
1367
1377
  aragon config set contextWindow 1000000 # persisted; prints "Set contextWindow = 1000000"
1368
- aragon config set contextWindow auto # back to API discovery / catalog
1378
+ aragon config set contextWindow auto # back to API discovery / catalog
1369
1379
  ARAGON_CONTEXT_WINDOW=1000000 aragon # one session
1370
1380
  ```
1371
1381
 
@@ -1396,20 +1406,39 @@ before.
1396
1406
 
1397
1407
  ### What actually happens
1398
1408
 
1399
- 1. **Proactively**, when measured occupancy crosses the threshold. This is the
1400
- case that fires almost every time.
1401
- 2. **Reactively**, when the provider returns `context_overflow` anyway — because
1402
- the model's context window is not in the static table, or you are pointed at a
1403
- proxy in front of a smaller model. One compaction, one re-send, run continues.
1404
- The engine allows exactly one of these per turn.
1409
+ 1. **Automatically**, when current occupancy reaches the configured threshold.
1410
+ Comparison uses the unrounded occupied-token / window ratio.
1411
+ 2. **After an overflow**, only when that same occupancy threshold is reached.
1412
+ The engine allows one recovery attempt; an overflow below the threshold
1413
+ preserves the provider error and suggests `/compact` or correcting `contextWindow`.
1405
1414
  3. **Manually**, with `/compact`. While the agent is idle it runs immediately;
1406
1415
  while it is running it queues and fires at the next turn boundary.
1407
1416
 
1408
- The trigger has **two** terms, and the second one is not belt-and-braces: 90 % of
1409
- a 200 k window leaves 20 k, which is plenty, but 90 % of a 32 k window leaves
1410
- 3.2 k — less than a single `max_tokens` of 8192, so the request is already
1411
- impossible. Compaction therefore also fires whenever the remaining headroom drops
1412
- below one full response.
1417
+ Output-token reservations, session spend, and unsent drafts do not trigger
1418
+ compaction. Submitted input can trigger it if that input raises real occupancy
1419
+ to the threshold. `/compact status` shows exact token counts, the threshold token
1420
+ count, and a two-decimal percentage; estimates retain their approximate marker.
1421
+ Querying status/history or changing settings never requests a summary.
1422
+
1423
+ ### Structured task memory
1424
+
1425
+ Task memory v2 retains the original task, full later user requirements, prior
1426
+ memory items, and complete recent turns. New facts, decisions, tasks, evidence,
1427
+ pitfalls, and next steps are added with source references. Updates supersede
1428
+ older items without silently erasing them. Images remain real message content.
1429
+ Protected content that cannot fit causes a refusal, never truncation.
1430
+
1431
+ The host validates the full structured response and adopts it only after history
1432
+ and token-reduction checks pass. This mechanically preserves protected text and
1433
+ recorded items; it cannot guarantee the model understood every new tool result.
1434
+ `/compact <instructions>` accepts at most 4000 characters after trimming.
1435
+
1436
+ Saved sessions carry optional host identity evidence for adopted memory. Valid
1437
+ v2 sessions resume the same generation chain. Without evidence, memory-looking
1438
+ user text remains ordinary protected input. A recognized legacy v1 summary is
1439
+ preserved in full and marked incomplete; migration cannot recover content lost
1440
+ before v2. Corrupt identities or unsupported versions preserve history and refuse
1441
+ compaction. Older CLI releases have no guaranteed lossless v2 downgrade path.
1413
1442
 
1414
1443
  ### Which model summarizes, and what it costs
1415
1444
 
@@ -1430,19 +1459,13 @@ The transcript card then names the cheap model.
1430
1459
 
1431
1460
  ### When it cannot summarize
1432
1461
 
1433
- Summarization is a network call and it will sometimes fail. The ladder is: one
1434
- retry — on your **main** model if the first attempt used the fast tier, because
1435
- "a fast model that cannot summarize" is the likeliest single failure — and then,
1436
- by default, a **truncation**: the same cut, the same verbatim task, and a block
1437
- that says plainly that the dropped messages were not summarized. That is
1438
- announced on the card, in the transcript, on the JSON event stream and inside the
1439
- block the model itself reads.
1440
-
1441
- Truncation loses information, and it is still the default, because an unattended
1442
- `aragon exec` that wedges on an unrecoverable 400 loses the whole run.
1443
- `compaction.onFailure: "stop"` makes the other trade: the history is left alone,
1444
- an error names your exits, and the next request will probably fail — which is
1445
- what you asked for by setting it.
1462
+ Each compaction makes at most two summary attempts under one total deadline;
1463
+ transport retries follow the provider's existing retry policy within that same
1464
+ deadline. Invalid structured output may be retried once with validation feedback.
1465
+ Cancellation, timeout, invalid data, missing credentials, budget overflow, or
1466
+ failed adoption leave history unchanged. The command reports `History preserved`
1467
+ and the reason. `onFailure` now defaults to `stop`; legacy `truncate` values still
1468
+ load but preserve history as well, as `/compact status` explicitly explains.
1446
1469
 
1447
1470
  ### It will not loop on your money
1448
1471
 
@@ -1451,12 +1474,12 @@ than 5 per run, a splice that does not project a real reclaim does not count as
1451
1474
  progress, and two consecutive no-progress compactions **switch the proactive
1452
1475
  trigger off for the session** with a notice naming the cause and the fix.
1453
1476
 
1454
- The guards are trigger-aware. A *pressure* compaction that reclaims little has
1455
- spent money to buy two turns and should stop. An *overflow* compaction that
1456
- reclaims little is the difference between a live run and a dead one, because the
1457
- provider has already refused the request — so the reactive path stays armed even
1458
- after a self-disable, and an overflow attempt may halve `keepRecentTurns` for
1459
- itself, which is the one lever that can make a too-large tail fit.
1477
+ Overflow can bypass the consecutive-turn cooldown, but it still respects the
1478
+ threshold, run limit, and automatic self-disable. It never shrinks the retained
1479
+ tail. Manual requests bypass the automatic threshold and self-disable, while
1480
+ queued requests respect the run limit and expire at the end of that run.
1481
+ Idle manual work locks history adoption; new input stays queued, Esc cancels,
1482
+ and replacing history invalidates late responses.
1460
1483
 
1461
1484
  ### What you see
1462
1485
 
@@ -1475,8 +1498,9 @@ Three surfaces, each answering something the others cannot:
1475
1498
  resolves; after `/compact off` they fall back to the generic 60 / 85, because
1476
1499
  colouring by a rescue that is not coming is worse than not colouring at all.
1477
1500
  - **As a record** — a transcript card with the before/after message and token
1478
- counts, the summarizer, the duration, and the summary itself. `Ctrl+O` expands
1479
- it.
1501
+ counts, the summarizer, duration, and the actual automatic/manual/overflow
1502
+ reason. `Task memory v2` identifies structured memory; `Ctrl+O` reveals its
1503
+ sections. Rejected candidates never appear as successful compactions.
1480
1504
 
1481
1505
  **What a red gauge means:** the trigger is `>= threshold` while the red band is
1482
1506
  `> threshold`, so any occupancy that would paint red has already triggered
@@ -1492,25 +1516,9 @@ all.
1492
1516
 
1493
1517
  ### When the RECENT turns are what does not fit
1494
1518
 
1495
- Every rung above operates on the **head** of the conversation. When the retained
1496
- tail is the problem — a few turns each carrying several 100 KB tool results —
1497
- each of those rungs reports success or "nothing to drop" while the history stays
1498
- un-sendable.
1499
-
1500
- The last rung clips oversized `tool_result` bodies **inside the retained turns**,
1501
- oldest first, stopping the moment the request fits. Nothing is removed: no
1502
- message, no tool-call id, no role — so a history that was structurally valid
1503
- before is still valid after. Every clip is announced **in the text the model
1504
- reads**, at the exact place the data went:
1505
-
1506
- ```
1507
- [... 214003 characters removed by context compaction ...]
1508
- ```
1509
-
1510
- A model that sees that knows the output is partial and can re-run the tool. It is
1511
- also stated on the transcript card, in `/compact status`, on the JSON event
1512
- stream and in the archive. When clipping is the **only** thing that happened, the
1513
- card says so and names no model, because none was called.
1519
+ The CLI preserves retained tool results in full. If the recent turns alone are
1520
+ too large and no safe older head can be compacted, history is kept and the
1521
+ refusal is explained. Automatic tail clipping and failure truncation are disabled.
1514
1522
 
1515
1523
  ### Sub-agents get the same protection
1516
1524
 
@@ -1521,14 +1529,15 @@ dispatch reached you as one partial sentence.
1521
1529
 
1522
1530
  Children now compact their own history, under tighter bounds: **two** retained
1523
1531
  turns instead of four, at most **two** compactions per child instead of five, the
1524
- fast tier preferred whenever it resolves, and `onFailure` forced to `truncate`
1525
- because nobody is watching a background worker. There is no transcript card for a
1532
+ fast tier preferred whenever it resolves, and failures preserve history. Each
1533
+ child owns its own context meter and counts compaction only after Core accepts
1534
+ the candidate. There is no transcript card for a
1526
1535
  child — the lead's transcript describes the lead's context. Turn it off with
1527
1536
  `compaction.subagents: false`.
1528
1537
 
1529
1538
  ### A compaction is no longer irreversible
1530
1539
 
1531
- Before a splice is adopted, the dropped messages are written verbatim to
1540
+ After a splice is adopted, the dropped messages are written verbatim to
1532
1541
  `~/.aragon/compaction/` — metadata, the summary, and the messages themselves.
1533
1542
 
1534
1543
  `/compact history` lists **this run's** archives, newest first, with the path of
@@ -1558,7 +1567,7 @@ you can check rather than something you have to accept.
1558
1567
  "warnThreshold": 0.75, // [0.4, threshold - 0.05]; where the gauge turns amber
1559
1568
  "keepRecentTurns": 4, // [1, 20] complete turns kept verbatim
1560
1569
  "useFastTier": true, // summarize with the fast tier WHEN it resolves
1561
- "onFailure": "truncate", // or "stop"
1570
+ "onFailure": "stop", // legacy "truncate" also preserves history
1562
1571
  "subagents": true, // give `task` children their own compaction
1563
1572
  "archive": true // write the dropped messages to ~/.aragon/compaction
1564
1573
  }
@@ -1898,7 +1907,7 @@ env / `.env` → CLI flags**.
1898
1907
  | Config key | Default | Meaning |
1899
1908
  | --- | --- | --- |
1900
1909
  | `maxTokens` | `64000` | Output token cap, clamped to `[256, 200000]`. `null` means **auto** — use each model's own ceiling, never above 64000. Absent means the default. See [Output token limits](#output-token-limits). |
1901
- | `contextWindow` | `null` | The window the context gauge measures against, clamped to `[8000, 5000000]`. `null` means **auto** — API metadata, then the built-in catalog. Unknown windows show `?`; the internal fallback is 128000. See [The context gauge](#the-context-gauge). |
1910
+ | `contextWindow` | `null` | The window the context gauge measures against, clamped to `[8000, 5000000]`. `null` means **auto** — API metadata, then the built-in catalog. Unknown windows show `?`; the internal fallback is 128000. See [The context gauge](#the-context-gauge). |
1902
1911
  | `showThinking` | `false` | Draw the reasoning the model returns. `thinkingLevel` is the effort the provider is asked to **spend**; this is whether the terminal **shows** it. Off by default: a settled turn that thought leaves one muted `thought for 12s` row in its place, so nothing is hidden silently. |
1903
1912
  | `liveToolOutput` | `true` | Draw up to eight sanitised rows of a **running** tool's output on its card, plus a `no output for Ns` row when the child goes quiet. On by default, unlike `showThinking`: this ADDS the information a long `bash` call otherwise hides, and its cost is bounded by construction — eight rows per call, sixteen calls, whatever the command emits. Turn it off and the card is a single `running` row again, with no store allocated and no recorder attached. |
1904
1913
  | `exitTranscript` | `true` | Replay a plain-text session summary after exiting (full-screen only). |
@@ -1976,7 +1985,7 @@ aragon config set maxTokens 32000 # persisted; prints "Set maxTokens = 32000"
1976
1985
  aragon config set maxTokens auto # persisted as null
1977
1986
  aragon config set maxTokens default # back to 64000
1978
1987
  aragon config set contextWindow 1000000 # the gauge's denominator
1979
- aragon config set contextWindow auto # back to API discovery / catalog
1988
+ aragon config set contextWindow auto # back to API discovery / catalog
1980
1989
  aragon config get maxTokens # "64000" | "auto"
1981
1990
  ```
1982
1991
 
@@ -2280,15 +2289,15 @@ quiet output is required.
2280
2289
  `--theme` / `config.theme` / `/theme` pick a palette: `warm`, `cool`, `light`, or
2281
2290
  `auto` (which resolves to `warm` — terminals can't reliably report their
2282
2291
  background). `dark` remains accepted everywhere as an alias for `cool`.
2283
- Interactive sessions always use Unicode borders, icons and scrollbars, with
2284
- truecolor and gradients by default. Missing terminal/locale markers, `TERM=dumb`,
2285
- and low `FORCE_COLOR` levels do not simplify the TUI. `--no-color`, `NO_COLOR`
2286
- (including an empty value), or `FORCE_COLOR=0/false` explicitly disable color;
2287
- Unicode stays enabled. The opening logo adapts only to available space and
2288
- remains visible in monochrome. `reducedMotion` (also `ARAGON_REDUCED_MOTION`,
2289
- and implied by disabling color) replaces spinners with a static glyph.
2290
- Headless commands retain their existing terminal detection. The terminal and
2291
- font still need to support the characters and colors the TUI emits.
2292
+ Interactive sessions always use Unicode borders, icons and scrollbars, with
2293
+ truecolor and gradients by default. Missing terminal/locale markers, `TERM=dumb`,
2294
+ and low `FORCE_COLOR` levels do not simplify the TUI. `--no-color`, `NO_COLOR`
2295
+ (including an empty value), or `FORCE_COLOR=0/false` explicitly disable color;
2296
+ Unicode stays enabled. The opening logo adapts only to available space and
2297
+ remains visible in monochrome. `reducedMotion` (also `ARAGON_REDUCED_MOTION`,
2298
+ and implied by disabling color) replaces spinners with a static glyph.
2299
+ Headless commands retain their existing terminal detection. The terminal and
2300
+ font still need to support the characters and colors the TUI emits.
2292
2301
 
2293
2302
  ### Timeout invariant
2294
2303
 
@@ -2353,72 +2362,80 @@ UTF-16 编辑和 ZWJ/组合字形仍有既有限制,本次修复保证视觉
2353
2362
  检查流式输出不阻止闪烁;单 ESC 不停止任务,两击中断,卡住时第三击强停;菜单关闭不计入两击。
2354
2363
  任务结束后保留最终计划,下一条普通消息启动时旧计划消失,新有效计划出现才恢复;显式续跑保留计划。
2355
2364
  强停后立即提交,在等待中双 ESC 取消,旧引擎退出后不得自行执行已取消的消息。
2365
+
2366
+ ## 输入、待处理队列与底部状态区
2367
+
2368
+ Enter 在空闲时发送,运行时加入队列;启动阶段拒绝重复提交并保留草稿。
2369
+ Ctrl+J 换行;终端能发送独立序列时,Shift+Enter 与 Alt+Enter 也可换行。
2370
+ 光标按完整字素移动,支持中文、组合字符和 emoji;输入最多占终端高度四分之一且不超过六行。
2371
+ 括号粘贴保留换行,不触发发送。过滤器或粘贴支持关闭时,不保证未标记多行粘贴安全。
2372
+ 过滤器不可用时 Delete 保守按 Backspace 处理,避免退格误删后文。
2373
+
2374
+ 应用鼠标拖选只建立选区,Ctrl+C 才复制;复制中再次按 Ctrl+C 不会退出或停止服务。
2375
+ 原生剪贴板工具完成后显示确认,OSC 52 只表示请求已发送,终端可能拒绝。
2376
+ Shift+拖动或 `/mouse off` 后的选区由宿主管理,应用无法关闭宿主的自动复制。
2377
+
2378
+ Queue 面板逐条显示待处理消息,数量在展开状态详情中按空间显示。只有 Core 已把消息纳入会话并发回接收凭据,
2379
+ 该条提示才会消失。中断时未接收消息显示暂停;`/queue` 可分页查看全部原文,Esc 关闭。
2380
+ `/clear` 不丢待处理消息;`/reset`、切换会话会明确报告取消数量;恢复保存的未发送历史不会自动重发。
2381
+
2382
+ 底部依次为固定输入框和一行核心状态;Ctrl+G 展开或收起第二行详情。五个核心字段按显示宽度缩写,始终保留。
2383
+ 核心上下文显示当前主 Agent 的百分比;展开详情或 /context 可查看已用/上限 tokens;`~` 表示含估算,`?` 表示上限未知。
2384
+ 费用是含子代理、快速模型及压缩的会话估算 USD,恢复会话沿用累计,缺价格按零计,零值不保证免费。
2385
+ 本轮均速只累计主 Agent 已报告的 output tokens,再除以本轮总耗时(含工具与等待);排除辅助调用,并非瞬时生成速度。结束后保留耗时,速度显示 --。
2386
+ `/context` 提供统计范围和完整值。
2387
+
2388
+ Windows Terminal:在设置 JSON **根级**添加 `"copyOnSelect": false`,把以下条目合并到已有数组:
2389
+
2390
+ ```json
2391
+ {
2392
+ "actions": [{ "id": "User.AragonNewline", "command": {
2393
+ "action": "sendInput", "input": "\u001b[13;2u"
2394
+ } }],
2395
+ "keybindings": [{ "keys": "shift+enter", "id": "User.AragonNewline" }]
2396
+ }
2397
+ ```
2398
+
2399
+ 依据:[Windows Terminal 交互设置](https://learn.microsoft.com/en-us/windows/terminal/customize-settings/interaction)、
2400
+ [按键动作](https://learn.microsoft.com/en-us/windows/terminal/customize-settings/actions)。PowerShell 是 shell,不能在其 profile 中设置终端按键映射。
2401
+
2402
+ VS Code 用户设置添加 `"terminal.integrated.copyOnSelection": false`,快捷键 JSON 添加:
2403
+
2404
+ ```json
2405
+ {
2406
+ "key": "shift+enter", "command": "workbench.action.terminal.sendSequence",
2407
+ "when": "terminalFocus", "args": { "text": "\u001b[13;2u" }
2408
+ }
2409
+ ```
2410
+
2411
+ 依据:[终端基础](https://code.visualstudio.com/docs/terminal/basics)、
2412
+ [终端高级设置](https://code.visualstudio.com/docs/terminal/advanced)。应用的 `/terminal-setup` 只输出说明,不修改宿主配置。
2413
+ 若宿主把 Shift+Enter 或 IME 候选确认同样编码为 CR,应用无法从相同字节推断用户意图。
2414
+ 可使用经输入链路测试的 Ctrl+J、独立 CSI-u 绑定及外部编辑后括号粘贴;具体宿主组合仍需实测。
2415
+ 双宿主、微软拼音及持续流式性能验收状态见 `docs/plans/tui-composer-queue-status/manual-test.md`。
2416
+
2417
+ ## 多套模型配置
2418
+
2419
+ 在 `/settings` 中使用 **Main profile** 和 **Fast profile**,可以分别为主任务与快速模型选择已保存的方案。两种角色共享配置库,但各自选择互不影响,也可以选择同一个方案。**Manage profiles** 提供新建、编辑、复制和删除;名称留空时采用模型名。同名方案通过地址主机和唯一 ID 区分。超过八条时按 `/` 搜索名称、模型或服务商。
2420
+
2421
+ 上下方向键或 Tab 移动,Enter 选择或编辑,根设置页 Ctrl+S 保存。普通文本字段的 Enter 仍保存设置。选择和子表单的修改先进入草稿;Esc 返回或确认丢弃。被主模型或快速模型引用的方案必须先解除绑定才能删除。复制包含本轮已经编辑的凭据,并产生新的 ID。
2422
+
2423
+ 方案保存服务商、模型、地址和凭据,不改变思考级别、token 上限、快速评审频率或预算。选择快速模型方案不会自动启用快速层。若本次启动时快速层未注册,首次启用会提示“已保存,待重启”;缺少模型或凭据时也需要先补齐。
2424
+
2425
+ **Current custom** 保留旧式连接,可继续编辑原连接字段。创建方案时从磁盘上的旧式配置预填,不复制环境变量或 `--api-key` 的运行时密钥。专属密钥可保持、替换或切换为共享/环境凭据;修改服务商或地址后,必须明确选择保留原密钥,或重新输入。空地址在方案中表示服务商默认地址,快速方案不会继承主网关。
2426
+
2427
+ 启动优先级为 CLI 参数、环境变量、所选方案、旧式字段、默认值。界面显示启动覆盖;明确重新选择方案可对本次会话立即生效,重启仍遵循启动参数。专属密钥仅对对应角色和目标地址生效;主模型启动密钥不会跟随切换发往另一个网关。
2428
+
2429
+ 运行、团队任务、后台评审或压缩尚未结束时禁止保存。保存采用原子文件替换,同时检查磁盘与当前会话版本;失败保留草稿,发生冲突时选择 Reload settings。写入已成功但会话应用异常时会明确提示重启并禁用重复保存。跨进程版本检查属于乐观检查,不能消除同时写入的极小竞态。
2430
+
2431
+ `/model`、`/fast model` 和 `config set` 修改连接会回到对应角色的自定义配置。若解除绑定会丢失专属账户或默认地址语义,命令会拒绝并引导到设置中编辑或复制。`/reload` 会一起刷新两个角色的连接和凭据,保留对话与用量。
2432
+
2433
+ 配置库仍位于 `ARAGON_HOME` 指向目录中的 `config.json`,不写入会话文件。密钥按现有机制明文保存:POSIX 创建权限为 0600,Windows 依赖用户目录 ACL,不提供加密。`config get/list` 对方案密钥使用固定掩码;损坏或未来版本的配置段整体隐藏。既有 `config edit` 备份也包含凭据。关闭通用日志脱敏、使用短密钥或分享第三方 SDK 错误日志时,仍需自行检查日志内容。
2434
+
2435
+ ### 固定输入与状态详情人工验收
2356
2436
 
2357
- ## 输入、待处理队列与底部状态区
2358
-
2359
- Enter 在空闲时发送,运行时加入队列;启动阶段拒绝重复提交并保留草稿。
2360
- Ctrl+J 换行;终端能发送独立序列时,Shift+Enter 与 Alt+Enter 也可换行。
2361
- 光标按完整字素移动,支持中文、组合字符和 emoji;输入最多占终端高度四分之一且不超过六行。
2362
- 括号粘贴保留换行,不触发发送。过滤器或粘贴支持关闭时,不保证未标记多行粘贴安全。
2363
- 过滤器不可用时 Delete 保守按 Backspace 处理,避免退格误删后文。
2364
-
2365
- 应用鼠标拖选只建立选区,Ctrl+C 才复制;复制中再次按 Ctrl+C 不会退出或停止服务。
2366
- 原生剪贴板工具完成后显示确认,OSC 52 只表示请求已发送,终端可能拒绝。
2367
- Shift+拖动或 `/mouse off` 后的选区由宿主管理,应用无法关闭宿主的自动复制。
2368
-
2369
- Queue 面板逐条显示待处理消息,数量始终留在状态栏。只有 Core 已把消息纳入会话并发回接收凭据,
2370
- 该条提示才会消失。中断时未接收消息显示暂停;`/queue` 可分页查看全部原文,Esc 关闭。
2371
- `/clear` 不丢待处理消息;`/reset`、切换会话会明确报告取消数量;恢复保存的未发送历史不会自动重发。
2372
-
2373
- 底部依次为输入框、固定操作提示/短反馈行、全局状态栏。状态字段按显示宽度完整保留或整项隐藏。
2374
- 上下文表示当前主 Agent 的已用/上限 tokens;`~` 表示含估算,`?` 表示上限未知。
2375
- 费用是含子代理、快速模型及压缩的会话估算 USD,恢复会话沿用累计,缺价格按零计,零值不保证免费。
2376
- 本轮均速是本轮期间入账输出 token 增量除以耗时,可能包含上述辅助调用,并非瞬时生成速度。
2377
- `/context` 提供统计范围和完整值。
2378
-
2379
- Windows Terminal:在设置 JSON **根级**添加 `"copyOnSelect": false`,把以下条目合并到已有数组:
2380
-
2381
- ```json
2382
- {
2383
- "actions": [{ "id": "User.AragonNewline", "command": {
2384
- "action": "sendInput", "input": "\u001b[13;2u"
2385
- } }],
2386
- "keybindings": [{ "keys": "shift+enter", "id": "User.AragonNewline" }]
2387
- }
2388
- ```
2389
-
2390
- 依据:[Windows Terminal 交互设置](https://learn.microsoft.com/en-us/windows/terminal/customize-settings/interaction)、
2391
- [按键动作](https://learn.microsoft.com/en-us/windows/terminal/customize-settings/actions)。PowerShell 是 shell,不能在其 profile 中设置终端按键映射。
2392
-
2393
- VS Code 用户设置添加 `"terminal.integrated.copyOnSelection": false`,快捷键 JSON 添加:
2394
-
2395
- ```json
2396
- {
2397
- "key": "shift+enter", "command": "workbench.action.terminal.sendSequence",
2398
- "when": "terminalFocus", "args": { "text": "\u001b[13;2u" }
2399
- }
2400
- ```
2401
-
2402
- 依据:[终端基础](https://code.visualstudio.com/docs/terminal/basics)、
2403
- [终端高级设置](https://code.visualstudio.com/docs/terminal/advanced)。应用的 `/terminal-setup` 只输出说明,不修改宿主配置。
2404
- 若宿主把 Shift+Enter 或 IME 候选确认同样编码为 CR,应用无法从相同字节推断用户意图。
2405
- 可使用经输入链路测试的 Ctrl+J、独立 CSI-u 绑定及外部编辑后括号粘贴;具体宿主组合仍需实测。
2406
- 双宿主、微软拼音及持续流式性能验收状态见 `docs/plans/tui-composer-queue-status/manual-test.md`。
2407
-
2408
- ## 多套模型配置
2409
-
2410
- 在 `/settings` 中使用 **Main profile** 和 **Fast profile**,可以分别为主任务与快速模型选择已保存的方案。两种角色共享配置库,但各自选择互不影响,也可以选择同一个方案。**Manage profiles** 提供新建、编辑、复制和删除;名称留空时采用模型名。同名方案通过地址主机和唯一 ID 区分。超过八条时按 `/` 搜索名称、模型或服务商。
2411
-
2412
- 上下方向键或 Tab 移动,Enter 选择或编辑,根设置页 Ctrl+S 保存。普通文本字段的 Enter 仍保存设置。选择和子表单的修改先进入草稿;Esc 返回或确认丢弃。被主模型或快速模型引用的方案必须先解除绑定才能删除。复制包含本轮已经编辑的凭据,并产生新的 ID。
2413
-
2414
- 方案保存服务商、模型、地址和凭据,不改变思考级别、token 上限、快速评审频率或预算。选择快速模型方案不会自动启用快速层。若本次启动时快速层未注册,首次启用会提示“已保存,待重启”;缺少模型或凭据时也需要先补齐。
2415
-
2416
- **Current custom** 保留旧式连接,可继续编辑原连接字段。创建方案时从磁盘上的旧式配置预填,不复制环境变量或 `--api-key` 的运行时密钥。专属密钥可保持、替换或切换为共享/环境凭据;修改服务商或地址后,必须明确选择保留原密钥,或重新输入。空地址在方案中表示服务商默认地址,快速方案不会继承主网关。
2417
-
2418
- 启动优先级为 CLI 参数、环境变量、所选方案、旧式字段、默认值。界面显示启动覆盖;明确重新选择方案可对本次会话立即生效,重启仍遵循启动参数。专属密钥仅对对应角色和目标地址生效;主模型启动密钥不会跟随切换发往另一个网关。
2419
-
2420
- 运行、团队任务、后台评审或压缩尚未结束时禁止保存。保存采用原子文件替换,同时检查磁盘与当前会话版本;失败保留草稿,发生冲突时选择 Reload settings。写入已成功但会话应用异常时会明确提示重启并禁用重复保存。跨进程版本检查属于乐观检查,不能消除同时写入的极小竞态。
2421
-
2422
- `/model`、`/fast model` 和 `config set` 修改连接会回到对应角色的自定义配置。若解除绑定会丢失专属账户或默认地址语义,命令会拒绝并引导到设置中编辑或复制。`/reload` 会一起刷新两个角色的连接和凭据,保留对话与用量。
2423
-
2424
- 配置库仍位于 `ARAGON_HOME` 指向目录中的 `config.json`,不写入会话文件。密钥按现有机制明文保存:POSIX 创建权限为 0600,Windows 依赖用户目录 ACL,不提供加密。`config get/list` 对方案密钥使用固定掩码;损坏或未来版本的配置段整体隐藏。既有 `config edit` 备份也包含凭据。关闭通用日志脱敏、使用短密钥或分享第三方 SDK 错误日志时,仍需自行检查日志内容。
2437
+ 在 Windows Terminal/PowerShell、VS Code 集成终端以及 macOS/Linux 终端分别检查
2438
+ 40x12、80x24、120x40。保留草稿,连续输出思考、正文与工具日志至少 30 秒:
2439
+ 输入上下边框不得移动;拖动消息滚动条不会隐藏输入。切换 Ctrl+G 仅改变一行,
2440
+ 复制、队列、通知和更新不自动展开。验证补全、Unicode 草稿和光标在切换后保留,
2441
+ 弹层期间 Ctrl+G 无效,小屏恢复后草稿与状态模式保留。自动化测试不能替代这些宿主观察。