@aragon-agent/cli 0.6.13 → 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.
- package/CHANGELOG.md +41 -0
- package/README.md +250 -222
- package/dist/agent/controller.d.ts +36 -2
- package/dist/agent/controller.js +244 -57
- package/dist/agent/model-profile-settings.js +11 -2
- package/dist/agent/plan-prompt.d.ts +1 -1
- package/dist/agent/plan-prompt.js +4 -3
- package/dist/agent/project-guidance-prompt.d.ts +4 -0
- package/dist/agent/project-guidance-prompt.js +104 -0
- package/dist/agent/reducer.d.ts +2 -0
- package/dist/agent/reducer.js +5 -0
- package/dist/agent/system-prompt.js +4 -0
- package/dist/boot/guard.d.ts +3 -3
- package/dist/boot/guard.js +3 -3
- package/dist/cli.js +33 -15
- package/dist/commands/builtins.js +2 -2
- package/dist/compaction/child.d.ts +9 -1
- package/dist/compaction/child.js +43 -13
- package/dist/compaction/command.js +20 -10
- package/dist/compaction/compactor.d.ts +33 -204
- package/dist/compaction/compactor.js +311 -723
- package/dist/compaction/context-command.js +5 -3
- package/dist/compaction/digest.d.ts +15 -51
- package/dist/compaction/digest.js +113 -148
- package/dist/compaction/limits.d.ts +19 -142
- package/dist/compaction/limits.js +20 -147
- package/dist/compaction/memory-identity.d.ts +16 -0
- package/dist/compaction/memory-identity.js +63 -0
- package/dist/compaction/memory-input.d.ts +25 -0
- package/dist/compaction/memory-input.js +106 -0
- package/dist/compaction/memory-render.d.ts +4 -0
- package/dist/compaction/memory-render.js +47 -0
- package/dist/compaction/memory-validation.d.ts +21 -0
- package/dist/compaction/memory-validation.js +268 -0
- package/dist/compaction/memory.d.ts +79 -0
- package/dist/compaction/memory.js +118 -0
- package/dist/compaction/meter.d.ts +14 -10
- package/dist/compaction/meter.js +55 -19
- package/dist/compaction/operation.d.ts +18 -0
- package/dist/compaction/operation.js +68 -0
- package/dist/compaction/pressure.d.ts +6 -20
- package/dist/compaction/pressure.js +14 -23
- package/dist/compaction/summarize-call.d.ts +3 -16
- package/dist/compaction/summarize-call.js +20 -20
- package/dist/compaction/summary-prompt.d.ts +29 -66
- package/dist/compaction/summary-prompt.js +132 -178
- package/dist/compaction/types.d.ts +23 -3
- package/dist/compaction/wiring.d.ts +10 -25
- package/dist/compaction/wiring.js +60 -67
- package/dist/config/load.d.ts +3 -1
- package/dist/config/load.js +8 -4
- package/dist/config/schema.d.ts +3 -3
- package/dist/config/schema.js +1 -1
- package/dist/exec/events.d.ts +8 -0
- package/dist/exec/index.js +13 -6
- package/dist/exec/runner.d.ts +8 -0
- package/dist/exec/runner.js +26 -2
- package/dist/session/persist.d.ts +3 -0
- package/dist/session/persist.js +9 -0
- package/dist/session/store.js +2 -0
- package/dist/session/validate-session.js +34 -0
- package/dist/team/subagent.js +8 -0
- package/dist/ui/App.js +221 -126
- package/dist/ui/BottomStatusRow.d.ts +5 -10
- package/dist/ui/BottomStatusRow.js +7 -11
- package/dist/ui/Composer.d.ts +4 -2
- package/dist/ui/Composer.js +2 -2
- package/dist/ui/Header.d.ts +6 -2
- package/dist/ui/Header.js +7 -6
- package/dist/ui/Logo.d.ts +3 -5
- package/dist/ui/Logo.js +4 -8
- package/dist/ui/PromptInput.d.ts +3 -1
- package/dist/ui/PromptInput.js +35 -42
- package/dist/ui/StatusBar.d.ts +6 -0
- package/dist/ui/StatusBar.js +8 -7
- package/dist/ui/Transcript.js +1 -1
- package/dist/ui/capabilities.d.ts +2 -0
- package/dist/ui/capabilities.js +6 -0
- package/dist/ui/color-runtime.d.ts +5 -0
- package/dist/ui/color-runtime.js +29 -0
- package/dist/ui/entries/CompactionCard.d.ts +3 -1
- package/dist/ui/entries/CompactionCard.js +7 -5
- package/dist/ui/frame-differ.js +27 -0
- package/dist/ui/frame-observer.js +18 -5
- package/dist/ui/glyphs.js +10 -8
- package/dist/ui/ink-runtime.d.ts +3 -0
- package/dist/ui/ink-runtime.js +30 -0
- package/dist/ui/interaction-copy.d.ts +73 -73
- package/dist/ui/interaction-copy.js +30 -38
- package/dist/ui/interaction-hints.d.ts +8 -1
- package/dist/ui/interaction-hints.js +56 -69
- package/dist/ui/layout/AppShell.d.ts +6 -2
- package/dist/ui/layout/AppShell.js +2 -2
- package/dist/ui/layout/OverlayFrame.d.ts +2 -0
- package/dist/ui/layout/OverlayFrame.js +23 -14
- package/dist/ui/layout/ScrollViewport.d.ts +3 -1
- package/dist/ui/layout/ScrollViewport.js +10 -2
- package/dist/ui/layout/budget.d.ts +25 -26
- package/dist/ui/layout/budget.js +29 -22
- package/dist/ui/layout/document-layout.d.ts +2 -2
- package/dist/ui/layout/document-layout.js +2 -3
- package/dist/ui/layout/queue-layout.js +4 -4
- package/dist/ui/layout/status-detail-layout.d.ts +9 -0
- package/dist/ui/layout/status-detail-layout.js +56 -0
- package/dist/ui/layout/status-layout.d.ts +19 -2
- package/dist/ui/layout/status-layout.js +95 -83
- package/dist/ui/layout/wrap-rows.d.ts +2 -0
- package/dist/ui/layout/wrap-rows.js +21 -7
- package/dist/ui/overlays/ConfirmDialog.d.ts +2 -1
- package/dist/ui/overlays/ConfirmDialog.js +22 -3
- package/dist/ui/overlays/HelpOverlay.js +9 -2
- package/dist/ui/overlays/ModelPicker.d.ts +5 -8
- package/dist/ui/overlays/ModelPicker.js +44 -10
- package/dist/ui/overlays/ModelProfileEditor.js +2 -0
- package/dist/ui/overlays/ModelProfilePicker.d.ts +1 -0
- package/dist/ui/overlays/ModelProfilePicker.js +4 -2
- package/dist/ui/overlays/PlanReviewOverlay.d.ts +2 -1
- package/dist/ui/overlays/PlanReviewOverlay.js +7 -4
- package/dist/ui/overlays/QuestionOverlay.d.ts +2 -1
- package/dist/ui/overlays/QuestionOverlay.js +45 -32
- package/dist/ui/overlays/QueueOverlay.js +2 -2
- package/dist/ui/overlays/SettingsScreen.d.ts +1 -0
- package/dist/ui/overlays/SettingsScreen.js +10 -3
- package/dist/ui/render-cache.d.ts +2 -2
- package/dist/ui/render-cache.js +4 -3
- package/dist/ui/run-metrics.d.ts +23 -0
- package/dist/ui/run-metrics.js +27 -0
- package/dist/ui/status-feedback.d.ts +33 -0
- package/dist/ui/status-feedback.js +36 -0
- package/dist/ui/stdout-frame-writer.js +28 -0
- package/package.json +2 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export function projectStatusFeedback(input) {
|
|
2
|
+
const escapeAction = input.overlay ? undefined
|
|
3
|
+
: input.completion && input.completion !== 'none' ? 'menu'
|
|
4
|
+
: input.interactionPhase === 'starting' ? 'cancel-start'
|
|
5
|
+
: input.interactionPhase !== 'running' ? undefined
|
|
6
|
+
: input.interruptPhase === 'stopping' ? 'force-stop' : 'confirm-stop';
|
|
7
|
+
let feedback;
|
|
8
|
+
if (input.ctrlCArmed && !input.copyState?.busy && !input.copyState?.cleanupPending
|
|
9
|
+
&& !input.selectionPending && !input.liveServices) {
|
|
10
|
+
feedback = { kind: 'exit', text: 'Press Ctrl+C again to exit', level: 'warn' };
|
|
11
|
+
}
|
|
12
|
+
else if (input.copyState?.cleanupPending) {
|
|
13
|
+
feedback = { kind: 'copy-cleanup', text: 'Copy failed; cleaning up', level: 'error' };
|
|
14
|
+
}
|
|
15
|
+
else if (input.copyResult?.status === 'error') {
|
|
16
|
+
feedback = { kind: 'copy-error', text: input.copyResult.text, level: 'error' };
|
|
17
|
+
}
|
|
18
|
+
else if (input.copyState?.busy) {
|
|
19
|
+
feedback = { kind: 'copying', text: 'Copying', level: 'info' };
|
|
20
|
+
}
|
|
21
|
+
else if (input.copyResult) {
|
|
22
|
+
feedback = { kind: input.copyResult.status === 'confirmed' ? 'copied' : 'copy-sent',
|
|
23
|
+
text: input.copyResult.text, level: 'info' };
|
|
24
|
+
}
|
|
25
|
+
else if (input.interruptPhase === 'stopping' && escapeAction === 'force-stop') {
|
|
26
|
+
feedback = { kind: 'force-stop', text: 'Esc again to force-stop', level: 'warn' };
|
|
27
|
+
}
|
|
28
|
+
else if (input.interruptPhase === 'armed' && escapeAction && escapeAction !== 'menu') {
|
|
29
|
+
feedback = { kind: 'stopping', text: input.interactionPhase === 'starting'
|
|
30
|
+
? 'Esc again to cancel start' : 'Esc again to stop', level: 'warn' };
|
|
31
|
+
}
|
|
32
|
+
else if (input.toast) {
|
|
33
|
+
feedback = { kind: 'notice', ...input.toast };
|
|
34
|
+
}
|
|
35
|
+
return { feedback, escapeAction };
|
|
36
|
+
}
|
|
@@ -34,6 +34,28 @@ function isUtf8Encoding(encoding) {
|
|
|
34
34
|
const e = encoding.toLowerCase();
|
|
35
35
|
return e === 'utf8' || e === 'utf-8';
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* DEC private mode 25 set/reset — hide / show the cursor.
|
|
39
|
+
*
|
|
40
|
+
* Ink 5.2.1's own root `<App>` writes these two EXACT strings through the
|
|
41
|
+
* render stdout on mount and unmount (`ink/build/components/App.js` →
|
|
42
|
+
* `cli-cursor`), which is this proxy, not the process stream. Cursor
|
|
43
|
+
* VISIBILITY changes no cell and moves no row, so the differ's
|
|
44
|
+
* absolute-addressing cache survives them untouched — yet `transform` cannot
|
|
45
|
+
* recognise them and answers `passThrough(true)`: counted, `onFirstFallback`
|
|
46
|
+
* raised (the warning fired on EVERY launch), cache dropped for nothing. Worse,
|
|
47
|
+
* in the real CLI the mount write arrives FIRST, so it also consumes the
|
|
48
|
+
* session's one seed-write exemption (`firstChunk`, P1-1) and the seed frame
|
|
49
|
+
* itself becomes the counted fallback.
|
|
50
|
+
*
|
|
51
|
+
* Absorbed here instead: straight to the real stream — no transform, no
|
|
52
|
+
* `invalidate()`, no fallback count, no exemption consumed. The match is
|
|
53
|
+
* exact on the whole chunk, so a future Ink that mixes the sequence into a
|
|
54
|
+
* longer write simply misses and falls back to today's conservative handling;
|
|
55
|
+
* a missed absorb costs one extra repaint, never a swallowed desync.
|
|
56
|
+
*/
|
|
57
|
+
const CURSOR_HIDE = '\x1b[?25l';
|
|
58
|
+
const CURSOR_SHOW = '\x1b[?25h';
|
|
37
59
|
export function wrapStdoutForFrames(stdout, differ) {
|
|
38
60
|
const bound = new Map();
|
|
39
61
|
const writeReal = (chunk, encoding, cb) => {
|
|
@@ -58,6 +80,12 @@ export function wrapStdoutForFrames(stdout, differ) {
|
|
|
58
80
|
differ.invalidate();
|
|
59
81
|
return writeReal(chunk, encoding, cb);
|
|
60
82
|
}
|
|
83
|
+
// Ink's own cursor-mode pair (see CURSOR_HIDE / CURSOR_SHOW above): not a
|
|
84
|
+
// frame and not a desync — the bytes reach the terminal untransformed,
|
|
85
|
+
// uncounted, and without touching the cache or the seed exemption.
|
|
86
|
+
if (chunk === CURSOR_HIDE || chunk === CURSOR_SHOW) {
|
|
87
|
+
return writeReal(chunk, encoding, cb);
|
|
88
|
+
}
|
|
61
89
|
const out = differ.transform(chunk);
|
|
62
90
|
if (out === null)
|
|
63
91
|
return writeReal(chunk, encoding, cb);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aragon-agent/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.15",
|
|
4
4
|
"description": "AragonAgent CLI — a Claude-Code / Codex-style interactive terminal UI (TUI) on top of the @aragon-agent/core engine. Installable and runnable via npm / npx.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "AragonAgent contributors",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"prepublishOnly": "npm run build"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@aragon-agent/core": "^0.2.
|
|
59
|
+
"@aragon-agent/core": "^0.2.27",
|
|
60
60
|
"chalk": "^5.6.2",
|
|
61
61
|
"cli-highlight": "^2.0.0",
|
|
62
62
|
"commander": "^12.1.0",
|