@aragon-agent/cli 0.6.7 → 0.6.9
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.
- package/CHANGELOG.md +27 -0
- package/README.md +107 -77
- package/dist/agent/controller.d.ts +11 -7
- package/dist/agent/controller.js +35 -48
- package/dist/agent/headless.d.ts +2 -1
- package/dist/agent/prompt-options.d.ts +15 -0
- package/dist/agent/prompt-options.js +1 -0
- package/dist/agent/reducer.d.ts +7 -113
- package/dist/agent/reducer.js +0 -62
- package/dist/cli.js +111 -182
- package/dist/commands/builtins.js +3 -1
- package/dist/commands/perf.d.ts +32 -2
- package/dist/commands/perf.js +32 -2
- package/dist/commands/registry.d.ts +4 -5
- package/dist/config/env.js +0 -130
- package/dist/config/load.d.ts +0 -2
- package/dist/config/load.js +2 -31
- package/dist/config/schema.d.ts +1 -14
- package/dist/config/schema.js +0 -1
- package/dist/config/store.js +2 -0
- package/dist/input/interrupt-gesture.d.ts +18 -0
- package/dist/input/interrupt-gesture.js +19 -0
- package/dist/input/pointer-router.d.ts +11 -0
- package/dist/input/pointer-router.js +14 -0
- package/dist/logging/install.d.ts +2 -2
- package/dist/logging/install.js +2 -2
- package/dist/todo/follow-through.d.ts +0 -4
- package/dist/todo/follow-through.js +0 -4
- package/dist/todo/limits.d.ts +0 -10
- package/dist/todo/limits.js +0 -10
- package/dist/todo/prompt.d.ts +0 -15
- package/dist/todo/store.d.ts +8 -13
- package/dist/todo/store.js +13 -14
- package/dist/todo/types.d.ts +2 -1
- package/dist/ui/ActivityLine.d.ts +26 -34
- package/dist/ui/ActivityLine.js +30 -19
- package/dist/ui/App.d.ts +3 -41
- package/dist/ui/App.js +223 -247
- package/dist/ui/BottomStatusRow.d.ts +1 -3
- package/dist/ui/BottomStatusRow.js +4 -8
- package/dist/ui/Composer.d.ts +38 -5
- package/dist/ui/Composer.js +45 -23
- package/dist/ui/Header.d.ts +2 -16
- package/dist/ui/Header.js +3 -18
- package/dist/ui/Logo.d.ts +1 -17
- package/dist/ui/Logo.js +0 -16
- package/dist/ui/ModeChip.d.ts +7 -18
- package/dist/ui/ModeChip.js +9 -0
- package/dist/ui/PromptCaret.d.ts +11 -0
- package/dist/ui/PromptCaret.js +31 -0
- package/dist/ui/PromptInput.d.ts +10 -33
- package/dist/ui/PromptInput.js +37 -20
- package/dist/ui/StatusBar.d.ts +1 -11
- package/dist/ui/StatusBar.js +14 -8
- package/dist/ui/ToastStack.d.ts +2 -18
- package/dist/ui/ToastStack.js +4 -11
- package/dist/ui/Transcript.d.ts +5 -71
- package/dist/ui/Transcript.js +10 -199
- package/dist/ui/composer-rows.js +50 -9
- package/dist/ui/entries/AssistantEntry.d.ts +0 -23
- package/dist/ui/entries/AssistantEntry.js +3 -4
- package/dist/ui/entries/DiffView.d.ts +1 -7
- package/dist/ui/entries/DiffView.js +2 -2
- package/dist/ui/entries/ToolCard.d.ts +0 -6
- package/dist/ui/entries/ToolCard.js +4 -13
- package/dist/ui/frame-differ.d.ts +13 -0
- package/dist/ui/frame-differ.js +37 -24
- package/dist/ui/frame-observer.d.ts +17 -0
- package/dist/ui/frame-observer.js +81 -0
- package/dist/ui/frame-parser.d.ts +7 -0
- package/dist/ui/frame-parser.js +18 -0
- package/dist/ui/ink-runtime.d.ts +1 -0
- package/dist/ui/ink-runtime.js +21 -0
- package/dist/ui/layout/AppShell.d.ts +4 -58
- package/dist/ui/layout/AppShell.js +3 -6
- package/dist/ui/layout/OverlayFrame.d.ts +1 -25
- package/dist/ui/layout/OverlayFrame.js +0 -24
- package/dist/ui/layout/ScrollIndicator.d.ts +4 -3
- package/dist/ui/layout/ScrollIndicator.js +4 -4
- package/dist/ui/layout/ScrollViewport.d.ts +16 -66
- package/dist/ui/layout/ScrollViewport.js +195 -185
- package/dist/ui/layout/budget.d.ts +3 -51
- package/dist/ui/layout/budget.js +4 -53
- package/dist/ui/layout/document-layout.d.ts +13 -0
- package/dist/ui/layout/document-layout.js +11 -0
- package/dist/ui/layout/follow-state.d.ts +1 -0
- package/dist/ui/layout/follow-state.js +1 -3
- package/dist/ui/layout/frame.d.ts +0 -22
- package/dist/ui/layout/frame.js +0 -36
- package/dist/ui/layout/scroll-indicator.d.ts +1 -1
- package/dist/ui/layout/scroll-indicator.js +3 -2
- package/dist/ui/layout/scrollbar-geometry.d.ts +17 -0
- package/dist/ui/layout/scrollbar-geometry.js +13 -0
- package/dist/ui/layout/todo-layout.d.ts +2 -3
- package/dist/ui/layout/todo-layout.js +9 -9
- package/dist/ui/layout/viewport-geometry.d.ts +2 -1
- package/dist/ui/layout/viewport-geometry.js +2 -1
- package/dist/ui/layout/virtual-window.d.ts +1 -0
- package/dist/ui/layout/virtual-window.js +1 -1
- package/dist/ui/live-clamp.d.ts +1 -29
- package/dist/ui/live-clamp.js +1 -29
- package/dist/ui/overlays/HelpOverlay.js +6 -2
- package/dist/ui/run-status-row.d.ts +61 -0
- package/dist/ui/run-status-row.js +70 -0
- package/dist/ui/screen.d.ts +1 -1
- package/dist/ui/screen.js +4 -6
- package/dist/ui/scrollbar-controller.d.ts +30 -0
- package/dist/ui/scrollbar-controller.js +124 -0
- package/dist/ui/transcript-text.d.ts +0 -8
- package/dist/ui/transcript-text.js +0 -8
- package/dist/ui/use-startup-notices.d.ts +1 -57
- package/dist/ui/use-startup-notices.js +3 -54
- package/dist/ui/use-wheel-routing.d.ts +3 -1
- package/dist/ui/use-wheel-routing.js +6 -0
- package/package.json +2 -2
- package/dist/ui/TodoStrip.d.ts +0 -36
- package/dist/ui/TodoStrip.js +0 -32
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,15 @@ were written.
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
+
### Removed
|
|
11
|
+
|
|
12
|
+
- Removed the inline terminal UI and its automatic downgrade rules. Interactive
|
|
13
|
+
sessions now always use the full-screen UI; small windows show a resize notice.
|
|
14
|
+
- Removed `--fullscreen`, `--no-fullscreen`, `ARAGON_FULLSCREEN`, and the
|
|
15
|
+
`fullscreen` config setting. Old flags are rejected and old stored preferences
|
|
16
|
+
are ignored. Headless commands and piped input retain their existing behavior.
|
|
17
|
+
- Interactive-only screens now reject non-TTY input/output with exit code 2.
|
|
18
|
+
|
|
10
19
|
### Added
|
|
11
20
|
|
|
12
21
|
- **`system/init` now lists what this build can do.** A new optional
|
|
@@ -72,6 +81,16 @@ were written.
|
|
|
72
81
|
|
|
73
82
|
### Fixed
|
|
74
83
|
|
|
84
|
+
- **The right-edge scrollbar no longer disappears while output streams.** The
|
|
85
|
+
differential renderer ended every repainted row with `CSI K` (erase to end of
|
|
86
|
+
line). The scrollbar fills the last column of every viewport row, and on
|
|
87
|
+
terminals that keep the cursor on the last column after writing it (Windows
|
|
88
|
+
console hosts) that erase blanked the cell that had just been drawn, so the
|
|
89
|
+
scrollbar vanished whenever a row was redrawn. Rows that already fill the
|
|
90
|
+
terminal width are now repainted without the erase; narrower rows are
|
|
91
|
+
unchanged. `--no-diff-render` was never affected. `/perf` gained a `scrollbar:`
|
|
92
|
+
line for diagnosing visibility and drag problems.
|
|
93
|
+
|
|
75
94
|
- **`{"type":"interrupt"}` now really does settle the run — on every platform.**
|
|
76
95
|
The stdin interrupt frame used to raise a SIGINT at our own process. On POSIX
|
|
77
96
|
that reaches the runner's terminator and the run winds down properly: it
|
|
@@ -113,6 +132,14 @@ were written.
|
|
|
113
132
|
|
|
114
133
|
### Changed
|
|
115
134
|
|
|
135
|
+
- **The run status row moved above the input box and carries the `steer` hint.**
|
|
136
|
+
While a run is active, the spinner, the phrase and `steer / interrupt / exit`
|
|
137
|
+
share one row directly above the input, in place of the idle hint row below it
|
|
138
|
+
(the footer keeps its height). It scrolls with the input; when it leaves the
|
|
139
|
+
viewport the fixed bottom row shows the animation instead, so there is never
|
|
140
|
+
more than one spinner. Terminals under 20 rows and `--no-hints` keep the old
|
|
141
|
+
fixed row. The update notice is also held back for the whole run.
|
|
142
|
+
|
|
116
143
|
- **Auto-compaction no longer reports compactions that did not happen.** A long
|
|
117
144
|
unattended run used to print a red `context not compacted #2: nothing_to_drop`
|
|
118
145
|
card into the transcript. The card was accurate; nobody had asked for it.
|
package/README.md
CHANGED
|
@@ -362,8 +362,6 @@ below works there too, in either position — `aragon --model m exec "…"` and
|
|
|
362
362
|
| `--hints` / `--no-hints` | Show or hide the composer hint row |
|
|
363
363
|
| `--show-thinking` / `--no-show-thinking` | Draw the model's reasoning blocks in the transcript. Off by default — see [What you see while it runs](#what-you-see-while-it-runs) |
|
|
364
364
|
| `--live-tool-output` / `--no-live-tool-output` | Show a bounded tail of a running command's output on its card. **On** by default — see [What you see while it runs](#what-you-see-while-it-runs) |
|
|
365
|
-
| `--fullscreen` | Force the full-screen TUI, overriding the automatic downgrades |
|
|
366
|
-
| `--no-fullscreen` | Force the inline renderer (the 0.2.0 behavior) |
|
|
367
365
|
| `--no-exit-transcript` | Do not replay the session summary after exiting |
|
|
368
366
|
| `--plan` / `--no-plan` | Start the session in PLAN mode (read-only research + review) or force BUILD |
|
|
369
367
|
| `--team` / `--no-team` | Enable or disable team subagents. `--no-team` does not register the `task` tool at all |
|
|
@@ -438,12 +436,13 @@ completes, `Up` / `Down` moves the selection, `Esc` closes it.
|
|
|
438
436
|
| `Alt+Enter` / `Shift+Enter` | Insert a newline |
|
|
439
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) |
|
|
440
438
|
| `Ctrl+P` | The same toggle, over a channel no Windows console can swallow. Use it if `Shift+Tab` does nothing |
|
|
441
|
-
| `Esc` |
|
|
442
|
-
| `Esc` ×2 |
|
|
439
|
+
| `Esc` | Close an overlay or popup; otherwise ask for interruption confirmation. While idle, cancel pending auto-continuation |
|
|
440
|
+
| `Esc` ×2 | Interrupt the run when pressed within 1.5 seconds. Other keys or closing a menu cancel the first press |
|
|
441
|
+
| `Esc` again after interruption | **Force-stop** a run that is still stopping, kill foreground shell commands and return to `idle`; background services remain running |
|
|
443
442
|
| `Ctrl+C` | Stop the background **services** the agent started, when there are any. It does not arm exit |
|
|
444
443
|
| `Ctrl+C` ×2 | Exit (first press warns), once no services are running |
|
|
445
|
-
| `Ctrl+L` | Redraw the frame
|
|
446
|
-
| `Ctrl+T` | Show / hide thinking (**off by default**)
|
|
444
|
+
| `Ctrl+L` | Redraw the frame |
|
|
445
|
+
| `Ctrl+T` | Show / hide thinking (**off by default**) for the entire session |
|
|
447
446
|
| `Ctrl+O` | Expand / collapse the most recent tool, team, compaction or **service** card — including a diff or a service's log tail |
|
|
448
447
|
| `PgUp` / `PgDn` | Scroll the transcript a page (full-screen mode) |
|
|
449
448
|
| `Shift+↑` / `Shift+↓` | Scroll the transcript a line (full-screen mode) |
|
|
@@ -460,10 +459,11 @@ completes, `Up` / `Down` moves the selection, `Esc` closes it.
|
|
|
460
459
|
In **full-screen mode** the transcript is scrolled by the app itself: `PgUp` /
|
|
461
460
|
`PgDn` and `Shift+↑` / `Shift+↓`. While pinned to the bottom the viewport follows
|
|
462
461
|
new output automatically; once you scroll away the status bar shows `↑N`, a slim
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
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 shows `PgDn down` while reading history.
|
|
466
|
+
`PgDn` moves one page down; editing or submitting returns directly to the end.
|
|
467
467
|
|
|
468
468
|
**The mouse wheel is a viewport gesture and nothing else.** Wherever the pointer
|
|
469
469
|
happens to be — including right on top of the composer — a notch scrolls the
|
|
@@ -474,9 +474,10 @@ open. It never touches your draft, and it never recalls prompt history: that is
|
|
|
474
474
|
Two things follow from the app owning the mouse, and they are worth knowing
|
|
475
475
|
before you meet them:
|
|
476
476
|
|
|
477
|
-
- **
|
|
478
|
-
|
|
479
|
-
|
|
477
|
+
- **Dragging text selects and copies it when mouse selection is enabled.**
|
|
478
|
+
Dragging the last-column scrollbar scrolls instead. `--no-mouse-select` disables
|
|
479
|
+
text selection while preserving scrollbar dragging. `Shift`+drag uses the
|
|
480
|
+
terminal's native selection on hosts that support that convention.
|
|
480
481
|
- **`tmux` with `mouse on` keeps the wheel for itself**, so the app never sees
|
|
481
482
|
it. `set -g mouse off` hands it back.
|
|
482
483
|
- **A Windows console on Node below 22.17.0 cannot report the wheel at all**,
|
|
@@ -512,7 +513,7 @@ Density and hints are settable the same three ways: `--compact` / `--no-hints`
|
|
|
512
513
|
for one run, `aragon config set density compact` / `aragon config set hints false`
|
|
513
514
|
to persist. The composer hint row also shortens to `? help` on its own after a
|
|
514
515
|
few sessions — except while a run is in progress, when it always spells out
|
|
515
|
-
`esc
|
|
516
|
+
`esc ×2 interrupt` in full.
|
|
516
517
|
|
|
517
518
|
## What you see while it runs
|
|
518
519
|
|
|
@@ -533,19 +534,22 @@ session, `showThinking: true` (or `--show-thinking`, or `ARAGON_SHOW_THINKING=1`
|
|
|
533
534
|
shows them permanently, and `/settings` has a **Show thinking** row next to
|
|
534
535
|
**Thinking**.
|
|
535
536
|
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
to everything drawn after it, and the row does not offer what it cannot deliver.
|
|
541
|
-
|
|
542
|
-
**There is something to look at while it thinks.** One row above the composer,
|
|
543
|
-
for as long as a run is in flight:
|
|
537
|
+
**There is something to look at while it thinks.** One row directly above the
|
|
538
|
+
input box, for as long as a run is in flight, with the keys that act on the run
|
|
539
|
+
beside it (it takes the place of the idle hint row below the box, so starting a
|
|
540
|
+
run never moves the layout):
|
|
544
541
|
|
|
545
542
|
```
|
|
546
|
-
⠋ Percolating…
|
|
543
|
+
⠋ Percolating… · ⏎ steer · esc×2 interrupt · ctrl+c×2 exit PLAN
|
|
547
544
|
```
|
|
548
545
|
|
|
546
|
+
The row scrolls with the input box. On a narrow terminal whole clauses are dropped
|
|
547
|
+
from the end (`exit` first) and only the phrase is shortened with an ellipsis, so
|
|
548
|
+
`steer` and `interrupt` are never cut mid-word. When you scroll history until the
|
|
549
|
+
input box is out of view, the animation moves to the fixed row at the bottom, so
|
|
550
|
+
there is always exactly one spinner on screen. Terminals shorter than 20 rows, and
|
|
551
|
+
`--no-hints`, keep the animation on that fixed row instead.
|
|
552
|
+
|
|
549
553
|
The word rotates every four seconds. It carries no clock and no token count on
|
|
550
554
|
purpose: the status bar one row below already has both, under the same
|
|
551
555
|
condition, driven by the same ticker. Under `reducedMotion` the spinner is a
|
|
@@ -624,24 +628,39 @@ near-identical added ones.
|
|
|
624
628
|
|
|
625
629
|
- Your previous shell output is **covered, not erased**, and returns untouched
|
|
626
630
|
when you exit. Nothing in your scrollback is destroyed.
|
|
627
|
-
- The frame is fixed at `rows - 1` tall
|
|
628
|
-
|
|
631
|
+
- The frame is fixed at `rows - 1` tall. The header, activity row and status bar
|
|
632
|
+
stay visible. The input belongs to the scrolling document; short sessions fill
|
|
633
|
+
the space above it, and browsing history moves it out of view.
|
|
629
634
|
|
|
630
635
|
On exit the session is replayed into the normal buffer as plain text so the
|
|
631
636
|
conversation survives leaving the screen (`--no-exit-transcript` opts out;
|
|
632
637
|
`/save` still exports the full JSON).
|
|
633
638
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
`--no-fullscreen`, `ARAGON_FULLSCREEN
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
639
|
+
Interactive sessions always use the full-screen TUI, including under `TERM=dumb`
|
|
640
|
+
or CI. Windows smaller than 40 columns or 12 rows show a size notice and recover
|
|
641
|
+
when enlarged, preserving the session and draft.
|
|
642
|
+
|
|
643
|
+
The layout switches `--fullscreen`, `--no-fullscreen`, `ARAGON_FULLSCREEN` and
|
|
644
|
+
`fullscreen` configuration have been removed. Old command-line flags are errors;
|
|
645
|
+
old config fields and environment variables are ignored.
|
|
646
|
+
|
|
647
|
+
Interactive screens require both stdin and stdout to be TTYs. `aragon config`
|
|
648
|
+
without a TTY exits with code 2; use `aragon config list` or `aragon config set`.
|
|
649
|
+
`-p`, `exec`, piped input and prompt-based redirected output retain their
|
|
650
|
+
headless behavior and never enter the alternate screen.
|
|
651
|
+
|
|
652
|
+
The alternate screen uses an application scrollbar rather than the terminal's
|
|
653
|
+
native scrollback. Windows Terminal and conhost have different mouse/VT capabilities;
|
|
654
|
+
the PowerShell version alone does not determine dragging support. If the host cannot
|
|
655
|
+
deliver SGR mouse reports, the scrollbar remains visible and keyboard scrolling works.
|
|
656
|
+
The differential renderer never erases the last column: a row that already fills the
|
|
657
|
+
terminal width is repainted without a trailing erase-to-end-of-line, which on Windows
|
|
658
|
+
console hosts would otherwise wipe the scrollbar cell on every redrawn row. `/perf`
|
|
659
|
+
prints a `scrollbar:` line (column, mouse state, whether a full frame was confirmed,
|
|
660
|
+
thumb position, glyph tier) to tell "cannot see it" from "cannot drag it".
|
|
661
|
+
`--no-mouse` provides that keyboard-only path; `--no-diff-render` disables output
|
|
662
|
+
differencing without disabling the scrollbar. A mid-session resize below 40 columns
|
|
663
|
+
or 12 rows displays a size hint and preserves the draft for restoration.
|
|
645
664
|
|
|
646
665
|
## Render performance
|
|
647
666
|
|
|
@@ -685,13 +704,6 @@ rung. `--no-render-governor` (or `renderGovernor: false`, or
|
|
|
685
704
|
`ARAGON_RENDER_GOVERNOR=0`) turns the adaptation off entirely; the output is
|
|
686
705
|
identical, just heavier under load.
|
|
687
706
|
|
|
688
|
-
**Inline mode** (`--no-fullscreen`, `TERM=dumb`, CI, a very small terminal) gets
|
|
689
|
-
one extra guarantee. Ink repaints the *entire session history* on every frame
|
|
690
|
-
once a live entry grows taller than the terminal, which is a genuine freeze
|
|
691
|
-
rather than a slowdown. The live region is now clamped to stay below that
|
|
692
|
-
threshold, with a `... N earlier lines` marker naming what is deferred; the
|
|
693
|
-
entry prints **in full** into your scrollback the moment it finishes.
|
|
694
|
-
|
|
695
707
|
## Plan mode
|
|
696
708
|
|
|
697
709
|
`aragon` has two postures, and `Shift+Tab` switches between them. `/plan` does
|
|
@@ -742,15 +754,14 @@ assumptions rather than to retry.
|
|
|
742
754
|
|
|
743
755
|
**Dismissing a plan is not how you stop.** `Esc` on a plan card asks for a
|
|
744
756
|
*better* plan — the agent is told to refine it and submit again — so a model that
|
|
745
|
-
keeps submitting keeps getting cards. To stop the run itself, **press `Esc`
|
|
746
|
-
twice
|
|
757
|
+
keeps submitting keeps getting cards. To stop the run itself, close the card with `Esc`, then **press `Esc`
|
|
758
|
+
twice within 1.5 seconds** to interrupt. Closing the card never counts as the first press. `Ctrl+C` twice
|
|
747
759
|
still exits the session outright.
|
|
748
760
|
|
|
749
761
|
### Where the mode is shown
|
|
750
762
|
|
|
751
763
|
The status bar always names a non-default mode (`PLAN`, or `PLAN → BUILD` while
|
|
752
|
-
a switch is pending), including on short terminals
|
|
753
|
-
inline mode. The composer additionally shows a `PLAN` chip on its hint row and
|
|
764
|
+
a switch is pending), including on short terminals and with `--no-hints`. The composer additionally shows a `PLAN` chip on its hint row and
|
|
754
765
|
tints its border, where there is room for it.
|
|
755
766
|
|
|
756
767
|
### Switching mid-run
|
|
@@ -800,8 +811,8 @@ ask — and the agent writes the finished plan as its final message in markdown.
|
|
|
800
811
|
For work with three or more distinct steps the agent keeps a **visible plan**:
|
|
801
812
|
it writes a checklist with the `todo_write` tool, marks exactly one item as in
|
|
802
813
|
progress, and ticks it off before starting the next. In full-screen mode that
|
|
803
|
-
list is rendered as a right-hand rail, targeting 15% of the terminal width
|
|
804
|
-
(14–36 columns, including its separator and padding).
|
|
814
|
+
list is rendered as a right-hand rail, targeting 15% of the terminal width
|
|
815
|
+
(14–36 columns, including its separator and padding).
|
|
805
816
|
|
|
806
817
|
```
|
|
807
818
|
transcript ... | TODO 2/7
|
|
@@ -809,7 +820,7 @@ list is rendered as a right-hand rail, targeting 15% of the terminal width
|
|
|
809
820
|
|
|
|
810
821
|
| v 1 Read the reducer
|
|
811
822
|
| v 2 Design the store
|
|
812
|
-
| > 3 Wiring the rail...
|
|
823
|
+
| > 3 Wiring the rail...
|
|
813
824
|
| o 4 Add the panel-rows test
|
|
814
825
|
| o 5 Update the README
|
|
815
826
|
| +2 more
|
|
@@ -821,8 +832,8 @@ for a question, or for a search with no work attached — and a one-item list
|
|
|
821
832
|
against an empty plan is refused outright. A session that never plans has
|
|
822
833
|
byte-identical layout to a build without this feature.
|
|
823
834
|
|
|
824
|
-
**The list
|
|
825
|
-
|
|
835
|
+
**The list shows the current task's plan.** Starting a new task or explicitly
|
|
836
|
+
clearing the list removes this live view while preserving conversation history:
|
|
826
837
|
|
|
827
838
|
- `/clear` and `/todo clear` take the plan off the screen. Neither touches the
|
|
828
839
|
conversation, so the model still knows what it was doing and its next update
|
|
@@ -831,10 +842,14 @@ not also tell the model may change it — except you, saying so:
|
|
|
831
842
|
- `/save` writes the list and `/resume` restores it. Resuming a session that has
|
|
832
843
|
no list clears the current one, rather than leaving a plan on screen whose
|
|
833
844
|
conversation has just been replaced.
|
|
834
|
-
- A
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
845
|
+
- A normal new task clears the previous plan, including unfinished steps, only
|
|
846
|
+
when it starts successfully. The completed run keeps its final plan visible.
|
|
847
|
+
`/todo continue` and automatic continuation preserve the plan and its timestamp;
|
|
848
|
+
ordinary text such as "continue" starts a new task. Steering keeps the current
|
|
849
|
+
plan. Until a valid new `todo_write`, the rail and count stay hidden.
|
|
850
|
+
Startup failure or cancellation keeps the old plan. History cards remain available.
|
|
851
|
+
- During a live run, interrupt before `/reset` or `/resume`. A conversation switch
|
|
852
|
+
while startup is waiting cancels that pending request and returns the view to idle.
|
|
838
853
|
|
|
839
854
|
### When a run ends with steps left
|
|
840
855
|
|
|
@@ -857,7 +872,7 @@ setting:
|
|
|
857
872
|
|
|
858
873
|
`Esc` during the grace window cancels; so does typing anything. A run that ended
|
|
859
874
|
with an **error** never auto-continues in any mode — you get a warning instead.
|
|
860
|
-
A run **you**
|
|
875
|
+
A run **you** interrupted with two `Esc` presses now says nothing at all, where it used to
|
|
861
876
|
report what you had just interrupted.
|
|
862
877
|
|
|
863
878
|
`/todo follow off` is the third mode: no notice, no continuation, silence.
|
|
@@ -889,19 +904,19 @@ planning discipline and hides the column — which is what you want with a scree
|
|
|
889
904
|
reader, and what `--no-todo-panel` does for a whole session. Under `-p` the plan
|
|
890
905
|
is written to stderr as `[todo] 3/7 <step>` lines, suppressed by `--quiet`.
|
|
891
906
|
|
|
892
|
-
右栏从 76 列开始显示,正文至少保留 62 列;100 列终端使用 15 列右栏。
|
|
893
|
-
已有任务时,团队面板按实际行数占用空间,补全菜单的边框和提示也计入预算。
|
|
894
|
-
例如 100×20、团队占 8 行时,TODO 仍以 4 行紧凑视图显示。
|
|
895
|
-
|
|
896
|
-
剩余 3–5 行时保留标题、完成计数、当前任务与合并提示 `-A +B`:
|
|
897
|
-
`-9 +10` 表示上方隐藏 9 项、下方隐藏 10 项。6 行起使用常规视图;
|
|
898
|
-
所有任务各占一行,全文仍可在正文任务卡片中查看。进度条需要至少 20 列、8 行。
|
|
899
|
-
输入增长导致空间不足时团队先折叠为摘要;菜单不足 3 行时隐藏,其候选不会拦截输入。
|
|
900
|
-
|
|
901
|
-
低于 76 列、共享区域不足 3 行、打开 overlay、显式关闭面板、没有任务或
|
|
902
|
-
inline 模式时不显示右栏。低于 12 行使用原有小终端提示;扩大窗口后自动恢复。
|
|
903
|
-
inline 仍使用上文的单行任务条。`/todo status` 中的 `Panel: on` 仅表示配置开启,
|
|
904
|
-
实际可见性还取决于数据和窗口空间;可以通过该命令区分未生成计划与暂时隐藏。
|
|
907
|
+
右栏从 76 列开始显示,正文至少保留 62 列;100 列终端使用 15 列右栏。
|
|
908
|
+
已有任务时,团队面板按实际行数占用空间,补全菜单的边框和提示也计入预算。
|
|
909
|
+
例如 100×20、团队占 8 行时,TODO 仍以 4 行紧凑视图显示。
|
|
910
|
+
|
|
911
|
+
剩余 3–5 行时保留标题、完成计数、当前任务与合并提示 `-A +B`:
|
|
912
|
+
`-9 +10` 表示上方隐藏 9 项、下方隐藏 10 项。6 行起使用常规视图;
|
|
913
|
+
所有任务各占一行,全文仍可在正文任务卡片中查看。进度条需要至少 20 列、8 行。
|
|
914
|
+
输入增长导致空间不足时团队先折叠为摘要;菜单不足 3 行时隐藏,其候选不会拦截输入。
|
|
915
|
+
|
|
916
|
+
低于 76 列、共享区域不足 3 行、打开 overlay、显式关闭面板、没有任务或
|
|
917
|
+
inline 模式时不显示右栏。低于 12 行使用原有小终端提示;扩大窗口后自动恢复。
|
|
918
|
+
inline 仍使用上文的单行任务条。`/todo status` 中的 `Panel: on` 仅表示配置开启,
|
|
919
|
+
实际可见性还取决于数据和窗口空间;可以通过该命令区分未生成计划与暂时隐藏。
|
|
905
920
|
|
|
906
921
|
## Built-in tools
|
|
907
922
|
|
|
@@ -1007,7 +1022,8 @@ than features. `bash` now always settles: it returns when the process exits
|
|
|
1007
1022
|
rather than when its output stream closes, so a command that detaches a
|
|
1008
1023
|
grandchild can no longer leave the turn pending forever, and it is handed a
|
|
1009
1024
|
closed stdin so a command that prompts fails instead of blocking on a read
|
|
1010
|
-
nobody will answer.
|
|
1025
|
+
nobody will answer. Two `Esc` presses request interruption; another press force-stops a stuck run,
|
|
1026
|
+
whatever the flag says.
|
|
1011
1027
|
|
|
1012
1028
|
## Team subagents
|
|
1013
1029
|
|
|
@@ -1079,7 +1095,7 @@ children's tokens are folded into the `[usage]` footer.
|
|
|
1079
1095
|
`debug`. A `team_send` subject is recorded, never its body; a subagent's brief
|
|
1080
1096
|
and summary only at `trace`.
|
|
1081
1097
|
|
|
1082
|
-
|
|
1098
|
+
**Two `Esc` presses within 1.5 seconds** abort the whole dispatch — every subagent within a couple of seconds
|
|
1083
1099
|
— and the report comes back marked `ABORTED` with whatever was finished.
|
|
1084
1100
|
|
|
1085
1101
|
## Fast model tier
|
|
@@ -1796,7 +1812,7 @@ env / `.env` → CLI flags**.
|
|
|
1796
1812
|
`ARAGON_CONTEXT_WINDOW` (a number, or `auto`; the denominator the context
|
|
1797
1813
|
gauge measures against),
|
|
1798
1814
|
`ARAGON_THEME`,
|
|
1799
|
-
`
|
|
1815
|
+
`ARAGON_PLAN` (`1` starts in plan mode),
|
|
1800
1816
|
`ARAGON_TEAM` (`0` disables team subagents), `ARAGON_TEAM_MAX` (fan-out width),
|
|
1801
1817
|
`ARAGON_TODO` (`0` disables todo planning entirely),
|
|
1802
1818
|
`ARAGON_TODO_FOLLOW` (`notify` / `auto` / `off`),
|
|
@@ -1825,7 +1841,6 @@ env / `.env` → CLI flags**.
|
|
|
1825
1841
|
| `contextWindow` | `null` | The window the context gauge measures against, clamped to `[8000, 5000000]`. `null` means **auto** — the built-in model table, or a fabricated 128000 for a model it has never seen. Set it when the gauge shows `?` on the denominator. See [The context gauge](#the-context-gauge). |
|
|
1826
1842
|
| `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. |
|
|
1827
1843
|
| `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. |
|
|
1828
|
-
| `fullscreen` | `true` | Use the full-screen TUI (still subject to the automatic downgrades). Setting it to `false` opts out permanently; leaving it `true` is *not* a force — only `--fullscreen` / `ARAGON_FULLSCREEN=1` override the heuristics. |
|
|
1829
1844
|
| `exitTranscript` | `true` | Replay a plain-text session summary after exiting (full-screen only). |
|
|
1830
1845
|
| `transcriptWindow` | `1000` | How far back you can scroll, clamped to `[50, 20000]`. Entries beyond it collapse into one line. It is no longer a rendering budget: the viewport is virtualised, so off-screen entries are not laid out at all. |
|
|
1831
1846
|
| `transcriptRetain` | `1000` | Entries kept in memory, clamped to `[200, 20000]` and raised to `transcriptWindow` if the two conflict — with a startup notice saying so, because retaining less than you can scroll to would otherwise make part of the horizon quietly unreachable. Older entries are dropped, counted, and reported by `/perf` and by the exit replay. |
|
|
@@ -1843,7 +1858,7 @@ env / `.env` → CLI flags**.
|
|
|
1843
1858
|
| `team.dispatchTimeoutMs` | `900000` | The whole dispatch's wall clock, clamped to `[60000, 3600000]`. |
|
|
1844
1859
|
| `team.maxTurnsPerSubagent` | `24` | Runaway-loop cap, clamped to `[4, 100]`. A subagent stopped here is reported as `stopped: turn cap reached`, with whatever it had produced. |
|
|
1845
1860
|
| `todo.enabled` | `true` | Master switch for todo planning. `false` means the `todo_write` tool is never registered — `/todo on` in such a session saves the setting for next launch and says so, rather than advertising a tool that is not there. |
|
|
1846
|
-
| `todo.panel` | `true` | Render the right-hand rail
|
|
1861
|
+
| `todo.panel` | `true` | Render the right-hand rail. Independent of `todo.enabled` on purpose: a screen-reader user wants the planning discipline without the column, and the system prompt varies one sentence accordingly. |
|
|
1847
1862
|
| `todo.followThrough` | `"notify"` | What happens when a run ends with steps left. `notify` says so and stops; `auto` continues the plan after a 3-second grace window, bounded by two structural limits (one fruitless attempt, 25 continuations per plan) that are deliberately **not** settings; `off` is silent. An unrecognized value falls back to `notify`. |
|
|
1848
1863
|
| `retry.enabled` | `true` | Retry a failed provider call at all. Unlike `team.enabled` / `todo.enabled` this decides nothing at construction — the policy lives on the provider registry, so `/retry on` / `/retry off` takes effect **in the running session**, subagents included. |
|
|
1849
1864
|
| `retry.maxRetries` | `10` | Retries **after** the first attempt, clamped to `[0, 20]`. `0` is the kill switch and is a real value here, not a typo for the default. The 20 is a hard ceiling enforced twice — on the config value and again inside the engine — so hand-editing this file cannot raise it. |
|
|
@@ -2234,7 +2249,7 @@ node packages/cli/dist/cli.js --version
|
|
|
2234
2249
|
shebang; `node packages/cli/dist/cli.js --version` prints the version.
|
|
2235
2250
|
- `npm pack -w packages/cli --dry-run --json` lists `dist/cli.js` under `files`.
|
|
2236
2251
|
- With `ANTHROPIC_API_KEY` set: `aragon` streams a reply, a tool card renders,
|
|
2237
|
-
`Esc`
|
|
2252
|
+
`Esc` twice interrupts mid-run, `/model` switches models, `/settings` saves a key,
|
|
2238
2253
|
`Ctrl+C` twice exits.
|
|
2239
2254
|
- `echo "list files" | node dist/cli.js -p` prints an answer and exits `0`.
|
|
2240
2255
|
- A missing/invalid key produces a visible, actionable message (never a blank
|
|
@@ -2252,7 +2267,7 @@ node packages/cli/dist/cli.js --version
|
|
|
2252
2267
|
nothing is truncated to a single line.
|
|
2253
2268
|
- `--no-hints` on a 20-row terminal in plan mode - the status bar still says
|
|
2254
2269
|
`PLAN` with no chip on screen.
|
|
2255
|
-
- Dismiss a plan card with `Esc`, let the agent resubmit, then press `Esc` twice:
|
|
2270
|
+
- Dismiss a plan card with `Esc`, let the agent resubmit, then close the card and press `Esc` twice within 1.5 seconds:
|
|
2256
2271
|
the run aborts and the session returns to an idle prompt. Do this one BY HAND
|
|
2257
2272
|
as well as in a test - the point of the check is whether the exit is findable,
|
|
2258
2273
|
which no assertion can tell you.
|
|
@@ -2260,3 +2275,18 @@ node packages/cli/dist/cli.js --version
|
|
|
2260
2275
|
## License
|
|
2261
2276
|
|
|
2262
2277
|
MIT
|
|
2278
|
+
|
|
2279
|
+
|
|
2280
|
+
### 输入光标与任务切换验收
|
|
2281
|
+
|
|
2282
|
+
输入获得应用内焦点时,光标每 500 ms 明暗切换;编辑、移动和恢复焦点后立即亮起。
|
|
2283
|
+
`reducedMotion` 开启时保持常亮,弹层打开时暂停。fullscreen 和 inline 使用相同规则。
|
|
2284
|
+
单色终端用等列宽的下划线标记,原文相同时改用 `^`,零宽附加码点保留以兼容 Ink。
|
|
2285
|
+
标记不进入草稿、历史或提交文本;屏幕选择复制会包含当时可见的标记。
|
|
2286
|
+
UTF-16 编辑和 ZWJ/组合字形仍有既有限制,本次修复保证视觉光标定位及相位布局稳定。
|
|
2287
|
+
|
|
2288
|
+
在 Windows Terminal/PowerShell 与 POSIX TTY 分别验证两种模式,窗口覆盖
|
|
2289
|
+
120×30、100×20、80×24、60×16:观察空输入、英文、中文、emoji、多行和组合附加符至少三个周期。
|
|
2290
|
+
检查流式输出不阻止闪烁;单 ESC 不停止任务,两击中断,卡住时第三击强停;菜单关闭不计入两击。
|
|
2291
|
+
任务结束后保留最终计划,下一条普通消息启动时旧计划消失,新有效计划出现才恢复;显式续跑保留计划。
|
|
2292
|
+
强停后立即提交,在等待中双 ESC 取消,旧引擎退出后不得自行执行已取消的消息。
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* success — that promise resolves even on failure. Success/failure is derived
|
|
9
9
|
* from the event stream by the reducer (TUI) and the headless writer.
|
|
10
10
|
*/
|
|
11
|
+
import type { PromptOptions, PromptOutcome } from './prompt-options.js';
|
|
11
12
|
import { ModelRegistry, type AgentEvent, type AgentTool, type Message, type ModelInfo, type ModelRef, type ProviderRegistry, type ThinkingLevel } from '@aragon-agent/core';
|
|
12
13
|
import type { CliConfig, CompactionConfig, FastConfig, RetryConfig, TeamConfig, ThemeName, TodoConfig } from '../config/schema.js';
|
|
13
14
|
import { type ConfirmRequest } from '../tools/index.js';
|
|
@@ -60,7 +61,7 @@ export interface ControllerDeps {
|
|
|
60
61
|
humanInput?: HumanInputGate;
|
|
61
62
|
/**
|
|
62
63
|
* Whether this session could EVER render the todo rail (todo-plan-execution
|
|
63
|
-
* §3.7 / P1-6). Full-screen and interactive;
|
|
64
|
+
* §3.7 / P1-6). Full-screen and interactive; headless calls are false.
|
|
64
65
|
*
|
|
65
66
|
* It varies ONE SENTENCE of the `<todo_planning>` block, and nothing else.
|
|
66
67
|
* Telling the model "the user sees this list in a panel beside the
|
|
@@ -207,6 +208,7 @@ export declare class AgentController {
|
|
|
207
208
|
* abort lands.
|
|
208
209
|
*/
|
|
209
210
|
private runGen;
|
|
211
|
+
private startupSequence;
|
|
210
212
|
/**
|
|
211
213
|
* Set SYNCHRONOUSLY by `abort()` before `agent.abort()` (§3.5.4a guard 1).
|
|
212
214
|
* Cleared at the next `agent_start`.
|
|
@@ -264,21 +266,23 @@ export declare class AgentController {
|
|
|
264
266
|
* underlying promise so headless mode can await completion. `agent.prompt()`
|
|
265
267
|
* never rejects, so callers must not treat resolution as success.
|
|
266
268
|
*/
|
|
267
|
-
prompt(text: string): Promise<
|
|
269
|
+
prompt(text: string, options?: PromptOptions): Promise<PromptOutcome>;
|
|
268
270
|
/**
|
|
269
271
|
* Wait for the engine to unwind, bounded.
|
|
270
272
|
*
|
|
271
273
|
* BOUNDED BECAUSE THE UNBOUNDED CASE IS THE ONE THIS FEATURE IS ABOUT: a tool
|
|
272
|
-
* that never settles is exactly why rung
|
|
274
|
+
* that never settles is exactly why the force-stop rung exists, and `Agent.waitForIdle()`
|
|
273
275
|
* alone would hang here for as long as it hangs there. The budget is the two
|
|
274
276
|
* graces a wedged `bash` can legitimately spend, plus the executor's own.
|
|
275
277
|
*/
|
|
276
278
|
private waitForEngineIdle;
|
|
277
|
-
/**
|
|
279
|
+
/** Prepare before clearing the plan, then enter the engine without yielding. */
|
|
278
280
|
private startPrompt;
|
|
281
|
+
/** Cancel pending startup as well as any engine run already in progress. */
|
|
279
282
|
abort(): void;
|
|
283
|
+
private stopEngine;
|
|
280
284
|
/**
|
|
281
|
-
*
|
|
285
|
+
* Final rung of the Esc ladder: stop the AGENT, whatever it is blocked on
|
|
282
286
|
* (§3.6 / G3).
|
|
283
287
|
*
|
|
284
288
|
* FOUR STEPS, AND THE FOURTH IS AN ABSENCE.
|
|
@@ -286,7 +290,7 @@ export declare class AgentController {
|
|
|
286
290
|
* 1. `abort()` - everything it does today, unchanged.
|
|
287
291
|
* 2. `killForeground('force')` - hard-kill every tracked foreground `bash`
|
|
288
292
|
* child. THIS is what actually unblocks a wedged `await tool.execute`;
|
|
289
|
-
* an abort signal a tool ignores is advisory, and rung
|
|
293
|
+
* an abort signal a tool ignores is advisory, and the force-stop rung exists for
|
|
290
294
|
* precisely the tools that ignore it.
|
|
291
295
|
* 3. `runGen += 1` - so `App` can drop the events the engine will keep
|
|
292
296
|
* emitting while it unwinds (I-7). Without it the view bounces straight
|
|
@@ -295,7 +299,7 @@ export declare class AgentController {
|
|
|
295
299
|
* `Ctrl+C` stops the SERVICES. That asymmetry is the user's own two
|
|
296
300
|
* sentences and it is exactly the kind of thing a later reader will
|
|
297
301
|
* "fix" by making this kill everything - which would mean a user who
|
|
298
|
-
*
|
|
302
|
+
* confirmed a force-stop of a runaway turn also lost the dev server they
|
|
299
303
|
* had been working against for an hour. It is invariant I-4.
|
|
300
304
|
*
|
|
301
305
|
* UNCONDITIONAL ON `bash.background` (P1-6 / D-9). The supervisor is always
|