@aragon-agent/cli 0.6.4 → 0.6.8
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 +37 -0
- package/README.md +163 -37
- package/dist/agent/controller.d.ts +49 -8
- package/dist/agent/controller.js +160 -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 +33 -19
- package/dist/agent/reducer.js +62 -71
- package/dist/agent/usage.d.ts +34 -0
- package/dist/agent/usage.js +43 -0
- package/dist/cli.js +131 -54
- package/dist/commands/builtins.js +12 -1
- package/dist/commands/registry.d.ts +2 -3
- package/dist/compaction/compactor.d.ts +60 -24
- package/dist/compaction/compactor.js +89 -61
- package/dist/compaction/context-command.d.ts +33 -0
- package/dist/compaction/context-command.js +166 -0
- package/dist/compaction/meter.d.ts +251 -0
- package/dist/compaction/meter.js +428 -0
- package/dist/compaction/pressure.d.ts +6 -0
- package/dist/compaction/pressure.js +4 -0
- package/dist/compaction/types.d.ts +41 -0
- package/dist/compaction/wiring.d.ts +47 -0
- package/dist/compaction/wiring.js +88 -27
- package/dist/config/cli-commands.js +5 -0
- package/dist/config/env.js +15 -1
- package/dist/config/load.d.ts +17 -0
- package/dist/config/load.js +45 -1
- package/dist/config/schema.d.ts +44 -0
- package/dist/config/schema.js +36 -0
- package/dist/config/store.js +27 -1
- package/dist/exec/events.d.ts +138 -1
- package/dist/exec/events.js +42 -0
- package/dist/exec/index.js +43 -6
- package/dist/exec/progress-reporter.d.ts +23 -0
- package/dist/exec/progress-reporter.js +88 -0
- package/dist/exec/runner.d.ts +34 -0
- package/dist/exec/runner.js +137 -25
- package/dist/fast/reviewer.d.ts +19 -1
- package/dist/fast/reviewer.js +22 -0
- package/dist/fast/types.d.ts +15 -0
- package/dist/fast/wiring.d.ts +10 -1
- package/dist/fast/wiring.js +18 -1
- 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/todo/limits.d.ts +4 -17
- package/dist/todo/limits.js +4 -17
- package/dist/todo/panel-rows.d.ts +8 -6
- package/dist/todo/panel-rows.js +19 -6
- 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/App.d.ts +2 -0
- package/dist/ui/App.js +233 -183
- package/dist/ui/AutocompletePopup.d.ts +3 -1
- package/dist/ui/AutocompletePopup.js +9 -11
- package/dist/ui/BottomStatusRow.d.ts +1 -1
- package/dist/ui/Composer.d.ts +13 -5
- package/dist/ui/Composer.js +7 -11
- package/dist/ui/PromptCaret.d.ts +11 -0
- package/dist/ui/PromptCaret.js +31 -0
- package/dist/ui/PromptInput.d.ts +12 -6
- package/dist/ui/PromptInput.js +50 -16
- package/dist/ui/StatusBar.d.ts +22 -15
- package/dist/ui/StatusBar.js +61 -16
- package/dist/ui/TeamPanel.d.ts +3 -1
- package/dist/ui/TeamPanel.js +13 -9
- package/dist/ui/TodoPanel.d.ts +5 -5
- package/dist/ui/TodoPanel.js +56 -24
- package/dist/ui/Transcript.js +1 -0
- package/dist/ui/UpdateLine.d.ts +1 -1
- package/dist/ui/capabilities.js +5 -5
- package/dist/ui/composer-rows.js +50 -9
- package/dist/ui/exit-snapshot.d.ts +9 -0
- package/dist/ui/frame-differ.js +2 -19
- 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/layout/AppShell.d.ts +7 -52
- package/dist/ui/layout/AppShell.js +2 -2
- package/dist/ui/layout/ScrollIndicator.d.ts +4 -3
- package/dist/ui/layout/ScrollIndicator.js +4 -4
- package/dist/ui/layout/ScrollViewport.d.ts +13 -66
- package/dist/ui/layout/ScrollViewport.js +183 -185
- package/dist/ui/layout/autocomplete.d.ts +18 -0
- package/dist/ui/layout/autocomplete.js +26 -0
- 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/rail.d.ts +4 -53
- package/dist/ui/layout/rail.js +10 -62
- 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/team-panel.d.ts +18 -0
- package/dist/ui/layout/team-panel.js +22 -0
- package/dist/ui/layout/todo-layout.d.ts +25 -0
- package/dist/ui/layout/todo-layout.js +28 -0
- package/dist/ui/layout/viewport-geometry.d.ts +1 -0
- package/dist/ui/layout/viewport-geometry.js +1 -0
- package/dist/ui/layout/virtual-window.d.ts +1 -0
- package/dist/ui/layout/virtual-window.js +1 -1
- package/dist/ui/overlays/HelpOverlay.js +5 -2
- 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.js +6 -2
- package/dist/ui/use-wheel-routing.d.ts +2 -0
- package/dist/ui/use-wheel-routing.js +6 -0
- package/package.json +2 -2
package/dist/todo/store.d.ts
CHANGED
|
@@ -9,15 +9,9 @@
|
|
|
9
9
|
* is why `AgentController` can own this object as unconditionally as it owns
|
|
10
10
|
* `TeamRuntime`.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* `TodoClearReason = 'user'`. Two commands come through that door: `/todo clear`
|
|
16
|
-
* and `/clear`. Neither tells the model anything, and that is fine, because what
|
|
17
|
-
* they leave behind is "panel absent, model still remembers" - the direction I-9
|
|
18
|
-
* below calls safe, and one the model's next full-replacement write heals on its
|
|
19
|
-
* own. `/reset` (reason `'reset'`) remains the only clear caused by the belief
|
|
20
|
-
* itself being destroyed, because it clears `messages`.
|
|
12
|
+
* The list projects the current plan. Explicit clear/reset and a new TUI task
|
|
13
|
+
* may remove that projection while the model still remembers the old plan.
|
|
14
|
+
* Continuations preserve it; legacy callers retain completion/staleness rules.
|
|
21
15
|
*
|
|
22
16
|
* Every write is a FULL REPLACEMENT and every clear is a FULL REMOVAL - there is
|
|
23
17
|
* no partial update anywhere, which is what makes I-9 ("the panel is never a
|
|
@@ -73,11 +67,12 @@ export declare class TodoStore {
|
|
|
73
67
|
* asymmetry for free, which is the behaviour you want: a steer must not age
|
|
74
68
|
* out the plan it is steering.
|
|
75
69
|
*
|
|
76
|
-
* A
|
|
77
|
-
*
|
|
78
|
-
*
|
|
70
|
+
* A new TUI task drops the old plan here, while a continuation preserves it.
|
|
71
|
+
* With no policy, legacy callers retain completed/stale-plan expiration.
|
|
72
|
+
* Clearing at `agent_end` would erase the final progress before the user can
|
|
73
|
+
* inspect it and remove the plan that automatic continuation still needs.
|
|
79
74
|
*/
|
|
80
|
-
beginUserTurn(): void;
|
|
75
|
+
beginUserTurn(policy?: 'new-task' | 'continue'): void;
|
|
81
76
|
/**
|
|
82
77
|
* Report a refusal that never reached `write()` (§3.3 steps 1 and 2).
|
|
83
78
|
*
|
package/dist/todo/store.js
CHANGED
|
@@ -9,15 +9,9 @@
|
|
|
9
9
|
* is why `AgentController` can own this object as unconditionally as it owns
|
|
10
10
|
* `TeamRuntime`.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* `TodoClearReason = 'user'`. Two commands come through that door: `/todo clear`
|
|
16
|
-
* and `/clear`. Neither tells the model anything, and that is fine, because what
|
|
17
|
-
* they leave behind is "panel absent, model still remembers" - the direction I-9
|
|
18
|
-
* below calls safe, and one the model's next full-replacement write heals on its
|
|
19
|
-
* own. `/reset` (reason `'reset'`) remains the only clear caused by the belief
|
|
20
|
-
* itself being destroyed, because it clears `messages`.
|
|
12
|
+
* The list projects the current plan. Explicit clear/reset and a new TUI task
|
|
13
|
+
* may remove that projection while the model still remembers the old plan.
|
|
14
|
+
* Continuations preserve it; legacy callers retain completion/staleness rules.
|
|
21
15
|
*
|
|
22
16
|
* Every write is a FULL REPLACEMENT and every clear is a FULL REMOVAL - there is
|
|
23
17
|
* no partial update anywhere, which is what makes I-9 ("the panel is never a
|
|
@@ -137,13 +131,18 @@ export class TodoStore {
|
|
|
137
131
|
* asymmetry for free, which is the behaviour you want: a steer must not age
|
|
138
132
|
* out the plan it is steering.
|
|
139
133
|
*
|
|
140
|
-
* A
|
|
141
|
-
*
|
|
142
|
-
*
|
|
134
|
+
* A new TUI task drops the old plan here, while a continuation preserves it.
|
|
135
|
+
* With no policy, legacy callers retain completed/stale-plan expiration.
|
|
136
|
+
* Clearing at `agent_end` would erase the final progress before the user can
|
|
137
|
+
* inspect it and remove the plan that automatic continuation still needs.
|
|
143
138
|
*/
|
|
144
|
-
beginUserTurn() {
|
|
145
|
-
if (this.items.length === 0)
|
|
139
|
+
beginUserTurn(policy) {
|
|
140
|
+
if (this.items.length === 0 || policy === 'continue')
|
|
141
|
+
return;
|
|
142
|
+
if (policy === 'new-task') {
|
|
143
|
+
this.clear('turn');
|
|
146
144
|
return;
|
|
145
|
+
}
|
|
147
146
|
if (this.items.every((item) => item.status === 'completed')) {
|
|
148
147
|
this.clear('turn');
|
|
149
148
|
return;
|
package/dist/todo/types.d.ts
CHANGED
|
@@ -45,7 +45,8 @@ export interface TodoSnapshot {
|
|
|
45
45
|
* `user` - `/todo clear`, or `/clear`. Both are an explicit user instruction,
|
|
46
46
|
* which is I-2's standing exception; neither touches `messages`.
|
|
47
47
|
* `reset` - `/reset`, or a `/resume` whose file carried no list (§3.13).
|
|
48
|
-
* `turn` -
|
|
48
|
+
* `turn` - a new TUI task started, or a legacy caller began a turn after
|
|
49
|
+
* every item was completed.
|
|
49
50
|
* `stale` - unfinished, and unwritten for more than `TODO_LIMITS.staleTurns`
|
|
50
51
|
* consecutive turns (§3.2 / P1-7).
|
|
51
52
|
*/
|
package/dist/ui/App.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* input / toast stack / status bar / overlays.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import type { ScrollbarBridge } from './scrollbar-controller.js';
|
|
8
9
|
import type { AgentController } from '../agent/controller.js';
|
|
9
10
|
import type { ConfirmRequest } from '../tools/index.js';
|
|
10
11
|
import { type Overlay, type ToastLevel } from '../agent/reducer.js';
|
|
@@ -109,6 +110,7 @@ export interface AppProps {
|
|
|
109
110
|
* mounted. The effect below assigns both and clears them on unmount.
|
|
110
111
|
*/
|
|
111
112
|
export interface TerminalBridge {
|
|
113
|
+
scrollbar?: ScrollbarBridge;
|
|
112
114
|
/** Whether drag-select is on for this session (`mouseSelect` + a filter). */
|
|
113
115
|
mouseSelect: boolean;
|
|
114
116
|
/** Release the mouse to the terminal, or take it back (`/mouse`, G3). */
|