@aragon-agent/cli 0.6.31 → 0.6.33
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 +119 -0
- package/README.md +2970 -2826
- package/dist/agent/controller.d.ts +46 -0
- package/dist/agent/controller.js +175 -7
- package/dist/agent/job-notices.d.ts +143 -0
- package/dist/agent/job-notices.js +182 -0
- package/dist/agent/reducer.d.ts +21 -1
- package/dist/agent/reducer.js +7 -0
- package/dist/agent/system-prompt.d.ts +12 -0
- package/dist/agent/system-prompt.js +2 -0
- package/dist/cli.js +236 -8
- package/dist/commands/builtins.js +23 -8
- package/dist/commands/perf.d.ts +77 -1
- package/dist/commands/perf.js +37 -5
- package/dist/config/cli-commands.d.ts +27 -0
- package/dist/config/cli-commands.js +54 -1
- package/dist/config/env.js +38 -0
- package/dist/config/load.js +50 -1
- package/dist/config/schema.d.ts +73 -0
- package/dist/config/schema.js +34 -0
- package/dist/config/store.js +14 -1
- package/dist/exec/events.d.ts +29 -3
- package/dist/exec/events.js +3 -12
- package/dist/exec/runner.d.ts +24 -0
- package/dist/exec/runner.js +79 -0
- package/dist/input/cursor-report.d.ts +61 -0
- package/dist/input/cursor-report.js +97 -0
- package/dist/input/stdin-filter.d.ts +22 -0
- package/dist/input/stdin-filter.js +48 -3
- package/dist/proc/limits.d.ts +76 -2
- package/dist/proc/limits.js +83 -2
- package/dist/proc/log-mirror.d.ts +59 -0
- package/dist/proc/log-mirror.js +203 -0
- package/dist/proc/log-ring.d.ts +22 -0
- package/dist/proc/log-ring.js +20 -1
- package/dist/proc/notices.d.ts +57 -0
- package/dist/proc/notices.js +101 -0
- package/dist/proc/progress.d.ts +40 -0
- package/dist/proc/progress.js +135 -0
- package/dist/proc/prompt.d.ts +24 -2
- package/dist/proc/prompt.js +51 -2
- package/dist/proc/supervisor.d.ts +35 -2
- package/dist/proc/supervisor.js +142 -43
- package/dist/proc/types.d.ts +89 -1
- package/dist/proc/wait.d.ts +57 -0
- package/dist/proc/wait.js +133 -0
- package/dist/session/persist.js +3 -1
- package/dist/session/validate-session.js +17 -0
- package/dist/tools/bash-tool.d.ts +12 -1
- package/dist/tools/bash-tool.js +100 -13
- package/dist/tools/index.d.ts +26 -2
- package/dist/tools/index.js +43 -2
- package/dist/tools/job-tools.d.ts +54 -0
- package/dist/tools/job-tools.js +329 -0
- package/dist/tools/proc-tools.d.ts +1 -1
- package/dist/tools/proc-tools.js +49 -17
- package/dist/ui/ActivityLine.js +7 -0
- package/dist/ui/App.js +98 -12
- package/dist/ui/ScrollbackShell.d.ts +62 -11
- package/dist/ui/ScrollbackShell.js +11 -3
- package/dist/ui/StatusBar.d.ts +5 -0
- package/dist/ui/StatusBar.js +1 -0
- package/dist/ui/Transcript.d.ts +14 -0
- package/dist/ui/Transcript.js +14 -2
- package/dist/ui/entries/ServiceCard.d.ts +17 -1
- package/dist/ui/entries/ServiceCard.js +39 -4
- package/dist/ui/layout/status-layout.d.ts +13 -1
- package/dist/ui/layout/status-layout.js +10 -0
- package/dist/ui/layout/virtual-window.js +14 -1
- package/dist/ui/run-status-row.d.ts +12 -0
- package/dist/ui/screen.d.ts +17 -4
- package/dist/ui/screen.js +14 -6
- package/dist/ui/scrollback/LiveTail.d.ts +79 -0
- package/dist/ui/scrollback/LiveTail.js +32 -0
- package/dist/ui/scrollback/band.d.ts +114 -0
- package/dist/ui/scrollback/band.js +130 -0
- package/dist/ui/scrollback/budget.d.ts +51 -10
- package/dist/ui/scrollback/budget.js +69 -20
- package/dist/ui/scrollback/canvas.d.ts +99 -0
- package/dist/ui/scrollback/canvas.js +113 -0
- package/dist/ui/scrollback/cursor-probe.d.ts +71 -0
- package/dist/ui/scrollback/cursor-probe.js +133 -0
- package/dist/ui/scrollback/limits.d.ts +61 -4
- package/dist/ui/scrollback/limits.js +61 -4
- package/dist/ui/scrollback/live-preview.d.ts +18 -10
- package/dist/ui/scrollback/live-preview.js +14 -11
- package/dist/ui/scrollback/scrollback-writer.d.ts +104 -16
- package/dist/ui/scrollback/scrollback-writer.js +368 -82
- package/dist/ui/scrollback/tail-window.d.ts +60 -0
- package/dist/ui/scrollback/tail-window.js +73 -0
- package/dist/ui/scrollback/use-scrollback-view.d.ts +34 -15
- package/dist/ui/scrollback/use-scrollback-view.js +110 -59
- package/dist/ui/scrollback/writer-shapes.d.ts +68 -2
- package/dist/ui/scrollback/writer-shapes.js +53 -8
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,30 @@ were written.
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
10
|
### Added
|
|
11
|
+
- **Background jobs, and a bounded wait for them.** A command that finishes on its
|
|
12
|
+
own but takes far longer than one tool call - `python train.py`,
|
|
13
|
+
`huggingface-cli download`, `cargo build --release` - can now be started with
|
|
14
|
+
`bash({ command, background: true })` and comes back as a **`task`** (`t1`,
|
|
15
|
+
`t2`) rather than a `service`: it is `running` from the spawn instead of
|
|
16
|
+
spending its first minute as `starting`, and its first-frame result says so.
|
|
17
|
+
`job_wait({ job, timeoutSeconds?, since? })` blocks at most 60 seconds (default
|
|
18
|
+
`jobs.waitSeconds`, 30) and returns one status line, one extracted progress
|
|
19
|
+
line, at most six new output rows and a cursor - so waiting thirty seconds costs
|
|
20
|
+
one call instead of six `bash_output` polls, six model turns and six 200-row
|
|
21
|
+
tails. `job_list()` prints one line per job. Progress (`47%`, `epoch 3/10`,
|
|
22
|
+
`812/1000`, `1.2/3.4 GiB`) is extracted from the tail and not repeated while it
|
|
23
|
+
is unchanged; `[stalled]` reports silence with three options and kills nothing.
|
|
24
|
+
A job that ends while the model is busy produces a `<job_notices>` block at the
|
|
25
|
+
end of the next tool result, delivered exactly once even when the fast tier
|
|
26
|
+
clears the steering queue mid-run. Full output past the 200-row ring is mirrored
|
|
27
|
+
to `~/.aragon-agent/jobs/<session>/<id>.log`, and `bash_output`'s truncation
|
|
28
|
+
note names the path. New `jobs.*` section (5 keys, `aragon config set` and
|
|
29
|
+
`ARAGON_JOBS_*`), new `job` event and `background-jobs` capability in
|
|
30
|
+
`aragon exec`, and `/bg` now lists kind, elapsed and progress.
|
|
31
|
+
**Two defects fixed in passing:** a task that crashed within the settle window
|
|
32
|
+
was reported as still running (the guard tested `!== 'starting'` instead of
|
|
33
|
+
terminality), and a stopped job's result said "not ready yet - still coming
|
|
34
|
+
up". See [Background jobs and bounded waiting](README.md#background-jobs-and-bounded-waiting).
|
|
11
35
|
- **`Ctrl+L` branches this session into a new terminal - and `Ctrl+R` now
|
|
12
36
|
redraws (KEY BINDING CHANGE).** One keystroke opens a PowerShell (Windows) or
|
|
13
37
|
bash (macOS/Linux) window in the session's current `/cwd`, running
|
|
@@ -97,6 +121,101 @@ were written.
|
|
|
97
121
|
|
|
98
122
|
### Fixed
|
|
99
123
|
|
|
124
|
+
- **The native-scroll screen is filled edge to edge, with no blank band anywhere.**
|
|
125
|
+
Three complaints, one cause: the live region was only as tall as the panel band
|
|
126
|
+
asked for, and every row it did not ask for became the canvas `gap` - blank rows
|
|
127
|
+
drawn *above* the content. So the app appeared to start halfway down the terminal,
|
|
128
|
+
a long blank band sat between a finished result and the card that was still running,
|
|
129
|
+
and the `TODO` rail stopped six rows or so above the input box. The region is now
|
|
130
|
+
the whole screen (`rows - 1`, the same height the full-screen layout uses): the
|
|
131
|
+
header is its first row, the input box and status line are its last two, the band
|
|
132
|
+
takes every row in between (`bandRows = pool`), so the rail spans the full height
|
|
133
|
+
above the composer and the tail column ends against it. The `gap` is 0 by
|
|
134
|
+
construction, not by tuning, and the scrollback writer is unchanged - `[gap][held]
|
|
135
|
+
[region]` collapses to `[region]` at that height. Two consequences worth knowing:
|
|
136
|
+
the region now shows the last ten entries of the conversation instead of only the
|
|
137
|
+
unfinished ones, and an entry is printed into your scrollback when it leaves that
|
|
138
|
+
window (so nothing is ever in both places at once); `/clear`, `--resume` and exit
|
|
139
|
+
flush the window first, which is why nothing visible is lost. The empty-session card
|
|
140
|
+
is drawn against the header rather than the input box, and `/perf` grew the three
|
|
141
|
+
numbers that make this self-checking: `top <n>` on the `mode native` line, plus
|
|
142
|
+
`pool=` and `window=<start>/<n>` on the `band:` line.
|
|
143
|
+
- **The TODO rail and the subagent roster are back in the default (native) scroll
|
|
144
|
+
mode.** Printing the conversation into the terminal's own scrollback took the two
|
|
145
|
+
panels with it: the rail lived in the full-screen layout's middle band and the
|
|
146
|
+
roster in the viewport footer, and neither of those exists once the live region
|
|
147
|
+
takes over - so a running plan showed nothing but a `Todo: 2/5` chip and a running
|
|
148
|
+
dispatch showed `Team: 2/4 running` in plain grey. The live region now owns a
|
|
149
|
+
PANEL BAND directly above the input box: the `TODO` rail (markers, index,
|
|
150
|
+
`activeForm`, overflow, gauge) is the band's right-hand column, the `team` roster
|
|
151
|
+
(header line, one row per subagent with activity and elapsed time, `+N more`, the
|
|
152
|
+
supervisor line) sits at its top left, and the unfinished tail below them is
|
|
153
|
+
rendered with the **real** entry components instead of the text projection - a
|
|
154
|
+
running `team` card and a running `tool` card now look exactly like the ones the
|
|
155
|
+
full-screen mode draws, gutter included. Row and column allocation has one owner
|
|
156
|
+
(`ui/scrollback/band.ts`), the printed conversation still uses the full width, and
|
|
157
|
+
the six ways a panel can be absent (`disabled`, `empty`, `narrow`, `short`,
|
|
158
|
+
`overlay`, a degraded frame) each name themselves in a new `/perf` `band:` line.
|
|
159
|
+
`aragon config set scrollMode app` renders byte-identically to before.
|
|
160
|
+
- **The test suite no longer mirrors modules into `%TEMP%`, and the release script
|
|
161
|
+
pins the runtime and installs from the lockfile.** A release failed with 252
|
|
162
|
+
"failed" test files whose every first error was
|
|
163
|
+
`ENOENT ... \Temp\<id>\ssr\.tmp-...`, while each of those files passed when run
|
|
164
|
+
alone: vitest 4's forks pool writes every transformed module into
|
|
165
|
+
`%TEMP%/<nanoid>/<environment>/`, creates that directory exactly once and never
|
|
166
|
+
re-checks it, and its only deleter does not synchronise with in-flight imports. A
|
|
167
|
+
directory that disappears mid-run therefore turns every not-yet-fetched module into
|
|
168
|
+
an import error that has nothing to do with the code under test. Both packages now
|
|
169
|
+
run `pool: 'threads'` (no module mirror is written at all), `vitest` and `vite` are
|
|
170
|
+
pinned to exact versions in both manifests and in a root `overrides` block,
|
|
171
|
+
`package-lock.json` is recomputed with them, and the release installs with `npm ci`
|
|
172
|
+
**before** any gate runs instead of re-resolving the tree after the version bump.
|
|
173
|
+
`npm run verify:test-gate` adds a version/environment pre-flight, and a failing test
|
|
174
|
+
run is attributed before anything is retried: only when every failing file's first
|
|
175
|
+
error is that mirror `ENOENT` does the release retry once, and a real failure is
|
|
176
|
+
never retried and never worded differently.
|
|
177
|
+
- **The reply no longer floats in the middle of the screen: it sits directly on top of
|
|
178
|
+
the input box.** The previous release pinned the *composer* to the last two rows by
|
|
179
|
+
emitting blank rows between the newest printed line and the live region, so a
|
|
180
|
+
conversation that had not filled the screen left the answer stranded above a band of
|
|
181
|
+
blank space - the shorter the session, the wider the band. The writer now treats the
|
|
182
|
+
`rows - 1` rows above the parked cursor as a CANVAS it owns, laid out top-down as
|
|
183
|
+
`[gap][content][region]`: the blank space lives *above every visible content row*, and
|
|
184
|
+
the newest content row always touches the top row of the live region. The gap is
|
|
185
|
+
SKIPPED with `CUD`, never written, so a blank row still cannot reach the scrollback;
|
|
186
|
+
the content rows still on the canvas are redrawn in place when the layout moves them,
|
|
187
|
+
and a row that has left the canvas (scrolled away or erased at exit) is never written
|
|
188
|
+
again. The reflow-estimate chain is gone: a narrower or shorter window now drops the
|
|
189
|
+
geometry and re-measures (a couple of hundred milliseconds of ordinary appending)
|
|
190
|
+
instead of guessing an erase distance that could cut a re-flowed line in half. Two
|
|
191
|
+
self-healing paths the canvas would otherwise lose are explicit: a re-measurement adds
|
|
192
|
+
the canvas's own height to the reported "rows below the cursor" (reading only the
|
|
193
|
+
latter collapses the canvas onto the parked row and pushes the visible content into
|
|
194
|
+
the scrollback a second time), and every batch reconciles its grid with the live
|
|
195
|
+
terminal height first (a `resize` event arrives a libuv turn late, and on a terminal
|
|
196
|
+
that never answers CPR the composer would stay mid-screen for the whole session).
|
|
197
|
+
`/perf`'s `scrollback` line now reports `canvas`/`content`/`gap` rows, `scrolled` rows
|
|
198
|
+
and `anchor resets` alongside `region` and `anchor bottom via probe|fill|none`.
|
|
199
|
+
`anchor: unknown` (no TTY, no filter, no answer, or geometry lost after a foreign
|
|
200
|
+
write) stays byte-identical to the previous release, except for the documented case
|
|
201
|
+
where a width or a height change arrives while nothing is measured.
|
|
202
|
+
- **In native scroll mode the composer stopped mid-screen after a reply, leaving a
|
|
203
|
+
screenful of blank rows below it.** The live region was positioned *relative to
|
|
204
|
+
the last printed line*, so on a conversation that had not filled the screen yet
|
|
205
|
+
the input box and status line sat wherever the history ended - the shorter the
|
|
206
|
+
session, the higher they floated - and closing an overlay, `/clear` or a shorter
|
|
207
|
+
draft moved them again. The writer now carries a measured `gap` ("rows left below
|
|
208
|
+
the parked cursor") and emits that many blank rows *above* the region, so
|
|
209
|
+
`pad + region + 1` equals the terminal height and the composer always occupies the
|
|
210
|
+
last two rows. The measurement is one `ESC[6n` before the first frame (raw mode
|
|
211
|
+
raised first, or the reply is line-buffered and echoed), with a one-off fill to the
|
|
212
|
+
bottom row as the fallback for terminals that never answer. The pad belongs to the
|
|
213
|
+
erasable block and never reaches the scrollback. `anchor: unknown` (no TTY, no
|
|
214
|
+
filter, no answer, or geometry lost after a foreign write) stays byte-identical to
|
|
215
|
+
the previous release. Re-probes are debounced 200 ms after a resize, coalesced, and
|
|
216
|
+
switched off the moment the screen is handed back - a query there would leak
|
|
217
|
+
`^[[12;1R` onto the shell prompt. `/perf`'s `scrollback` line now also reports
|
|
218
|
+
`block`/`pad` rows, `anchor bottom via probe|fill|none` and `anchor reprobes`.
|
|
100
219
|
- **A long answer lost two characters at every hard wrap point - silently, in
|
|
101
220
|
exactly the content a user copies out.** The transcript's content column had no
|
|
102
221
|
width of its own, so Yoga laid each line out at the width it computed from the
|