@aragon-agent/cli 0.5.6 → 0.5.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.
Files changed (156) hide show
  1. package/CHANGELOG.md +356 -0
  2. package/README.md +1429 -1105
  3. package/dist/agent/coalesce.d.ts +13 -0
  4. package/dist/agent/coalesce.js +50 -11
  5. package/dist/agent/controller.d.ts +141 -2
  6. package/dist/agent/controller.js +396 -4
  7. package/dist/agent/entry-limits.d.ts +65 -0
  8. package/dist/agent/entry-limits.js +133 -0
  9. package/dist/agent/headless.d.ts +8 -0
  10. package/dist/agent/headless.js +40 -0
  11. package/dist/agent/reducer.d.ts +253 -3
  12. package/dist/agent/reducer.js +553 -28
  13. package/dist/agent/retry-view.d.ts +68 -0
  14. package/dist/agent/retry-view.js +95 -0
  15. package/dist/agent/system-prompt.d.ts +11 -0
  16. package/dist/agent/system-prompt.js +2 -0
  17. package/dist/cli.js +122 -4
  18. package/dist/commands/builtins.d.ts +1 -1
  19. package/dist/commands/builtins.js +313 -2
  20. package/dist/commands/perf.d.ts +45 -0
  21. package/dist/commands/perf.js +78 -0
  22. package/dist/config/cli-commands.d.ts +53 -2
  23. package/dist/config/cli-commands.js +136 -3
  24. package/dist/config/env.d.ts +6 -1
  25. package/dist/config/env.js +131 -1
  26. package/dist/config/load.d.ts +63 -0
  27. package/dist/config/load.js +125 -2
  28. package/dist/config/schema.d.ts +273 -10
  29. package/dist/config/schema.js +250 -7
  30. package/dist/config/store.js +20 -1
  31. package/dist/fast/critique.d.ts +43 -0
  32. package/dist/fast/critique.js +62 -0
  33. package/dist/fast/digest.d.ts +42 -0
  34. package/dist/fast/digest.js +85 -0
  35. package/dist/fast/frames.d.ts +99 -0
  36. package/dist/fast/frames.js +180 -0
  37. package/dist/fast/limits.d.ts +98 -0
  38. package/dist/fast/limits.js +98 -0
  39. package/dist/fast/prompt.d.ts +72 -0
  40. package/dist/fast/prompt.js +94 -0
  41. package/dist/fast/resolve.d.ts +43 -0
  42. package/dist/fast/resolve.js +105 -0
  43. package/dist/fast/review-call.d.ts +99 -0
  44. package/dist/fast/review-call.js +130 -0
  45. package/dist/fast/reviewer.d.ts +248 -0
  46. package/dist/fast/reviewer.js +664 -0
  47. package/dist/fast/types.d.ts +128 -0
  48. package/dist/fast/types.js +14 -0
  49. package/dist/fast/wiring.d.ts +170 -0
  50. package/dist/fast/wiring.js +316 -0
  51. package/dist/logging/install.d.ts +15 -1
  52. package/dist/logging/install.js +37 -4
  53. package/dist/logging/logger.d.ts +1 -1
  54. package/dist/session/persist.js +57 -1
  55. package/dist/team/normalize.d.ts +26 -1
  56. package/dist/team/normalize.js +23 -3
  57. package/dist/team/prompt.d.ts +11 -0
  58. package/dist/team/prompt.js +10 -0
  59. package/dist/team/report.d.ts +18 -0
  60. package/dist/team/report.js +27 -1
  61. package/dist/team/runtime.d.ts +13 -2
  62. package/dist/team/runtime.js +33 -6
  63. package/dist/team/subagent.d.ts +19 -1
  64. package/dist/team/subagent.js +72 -10
  65. package/dist/team/task-tool.d.ts +26 -0
  66. package/dist/team/task-tool.js +48 -4
  67. package/dist/team/types.d.ts +80 -1
  68. package/dist/tools/bash-tool.js +19 -3
  69. package/dist/tools/diff.d.ts +25 -5
  70. package/dist/tools/diff.js +72 -41
  71. package/dist/tools/file-change-store.d.ts +34 -0
  72. package/dist/tools/file-change-store.js +57 -0
  73. package/dist/tools/fs-tools.d.ts +26 -0
  74. package/dist/tools/fs-tools.js +62 -5
  75. package/dist/tools/index.d.ts +31 -0
  76. package/dist/tools/index.js +7 -1
  77. package/dist/tools/patch.d.ts +115 -0
  78. package/dist/tools/patch.js +453 -0
  79. package/dist/tools/terminal-output.d.ts +107 -0
  80. package/dist/tools/terminal-output.js +198 -0
  81. package/dist/tools/tool-output-store.d.ts +68 -0
  82. package/dist/tools/tool-output-store.js +102 -0
  83. package/dist/ui/ActivityLine.d.ts +48 -0
  84. package/dist/ui/ActivityLine.js +22 -0
  85. package/dist/ui/App.d.ts +1 -4
  86. package/dist/ui/App.js +357 -44
  87. package/dist/ui/BottomStatusRow.d.ts +43 -0
  88. package/dist/ui/BottomStatusRow.js +14 -0
  89. package/dist/ui/Composer.d.ts +1 -6
  90. package/dist/ui/Composer.js +2 -2
  91. package/dist/ui/Markdown.d.ts +7 -1
  92. package/dist/ui/Markdown.js +15 -48
  93. package/dist/ui/PromptInput.d.ts +1 -15
  94. package/dist/ui/PromptInput.js +1 -38
  95. package/dist/ui/StatusBar.d.ts +50 -0
  96. package/dist/ui/StatusBar.js +7 -3
  97. package/dist/ui/TeamPanel.d.ts +5 -4
  98. package/dist/ui/TeamPanel.js +1 -1
  99. package/dist/ui/TodoPanel.d.ts +5 -4
  100. package/dist/ui/Transcript.d.ts +80 -5
  101. package/dist/ui/Transcript.js +179 -11
  102. package/dist/ui/activity-phrases.d.ts +33 -0
  103. package/dist/ui/activity-phrases.js +50 -0
  104. package/dist/ui/entries/AssistantEntry.d.ts +38 -1
  105. package/dist/ui/entries/AssistantEntry.js +34 -3
  106. package/dist/ui/entries/DiffView.d.ts +67 -0
  107. package/dist/ui/entries/DiffView.js +103 -0
  108. package/dist/ui/entries/FastCard.d.ts +53 -0
  109. package/dist/ui/entries/FastCard.js +87 -0
  110. package/dist/ui/entries/RetryCard.d.ts +56 -0
  111. package/dist/ui/entries/RetryCard.js +60 -0
  112. package/dist/ui/entries/TeamCard.d.ts +9 -1
  113. package/dist/ui/entries/TeamCard.js +28 -2
  114. package/dist/ui/entries/TodoCard.d.ts +9 -1
  115. package/dist/ui/entries/TodoCard.js +23 -1
  116. package/dist/ui/entries/ToolCard.d.ts +50 -1
  117. package/dist/ui/entries/ToolCard.js +104 -7
  118. package/dist/ui/entries/ToolPreview.d.ts +2 -2
  119. package/dist/ui/entries/UserEntry.d.ts +9 -1
  120. package/dist/ui/entries/UserEntry.js +17 -1
  121. package/dist/ui/exit-snapshot.d.ts +7 -0
  122. package/dist/ui/glyphs.d.ts +9 -0
  123. package/dist/ui/glyphs.js +2 -0
  124. package/dist/ui/layout/AppShell.d.ts +13 -22
  125. package/dist/ui/layout/AppShell.js +3 -38
  126. package/dist/ui/layout/MeasuredEntry.d.ts +21 -0
  127. package/dist/ui/layout/MeasuredEntry.js +30 -0
  128. package/dist/ui/layout/ScrollViewport.js +8 -2
  129. package/dist/ui/layout/viewport-geometry.d.ts +28 -0
  130. package/dist/ui/layout/viewport-geometry.js +27 -0
  131. package/dist/ui/layout/virtual-window.d.ts +100 -0
  132. package/dist/ui/layout/virtual-window.js +308 -0
  133. package/dist/ui/live-clamp.d.ts +42 -0
  134. package/dist/ui/live-clamp.js +74 -0
  135. package/dist/ui/markdown-blocks.d.ts +25 -1
  136. package/dist/ui/markdown-blocks.js +43 -0
  137. package/dist/ui/overlays/HelpOverlay.js +16 -2
  138. package/dist/ui/overlays/SettingsScreen.d.ts +82 -1
  139. package/dist/ui/overlays/SettingsScreen.js +147 -1
  140. package/dist/ui/render-cache.d.ts +81 -0
  141. package/dist/ui/render-cache.js +195 -0
  142. package/dist/ui/render-governor.d.ts +54 -0
  143. package/dist/ui/render-governor.js +78 -0
  144. package/dist/ui/transcript-text.d.ts +11 -0
  145. package/dist/ui/transcript-text.js +32 -0
  146. package/dist/ui/use-height-store.d.ts +31 -0
  147. package/dist/ui/use-height-store.js +76 -0
  148. package/dist/ui/use-render-governor.d.ts +39 -0
  149. package/dist/ui/use-render-governor.js +57 -0
  150. package/dist/ui/use-startup-notices.d.ts +9 -1
  151. package/dist/ui/use-startup-notices.js +35 -1
  152. package/dist/ui/use-wheel-routing.d.ts +16 -32
  153. package/dist/ui/use-wheel-routing.js +21 -38
  154. package/package.json +2 -2
  155. package/dist/ui/layout/regions.d.ts +0 -55
  156. package/dist/ui/layout/regions.js +0 -52
@@ -1,55 +0,0 @@
1
- /**
2
- * Wheel band hit-testing (mouse-wheel-region-routing §4.5) — pure, React-free.
3
- *
4
- * The requirement is stated in terms of REGIONS ("scrolling over the agent area
5
- * scrolls the transcript; scrolling over the input box steps prompt history"),
6
- * so the router needs to turn a reported terminal row into one of two bands.
7
- *
8
- * The boundary is MEASURED, never computed from `budget.ts`. That arithmetic
9
- * describes the PLANNED chrome, but the real bottom chrome grows and shrinks at
10
- * run time: the toast row comes and goes, the hint row is dropped below
11
- * `HINT_MIN_ROWS`, and the autocomplete popup adds up to nine rows. Routing off
12
- * the plan would put the boundary in the wrong place exactly when the popup is
13
- * open — the moment precision matters most (D-5 / D-16).
14
- */
15
- export type WheelBand = 'content' | 'composer';
16
- export interface FrameGeometry {
17
- /**
18
- * 1-based row of the frame's first row. 1 in the alternate screen.
19
- *
20
- * This is DERIVED, not assumed, and it has a named dependency: it holds
21
- * because the full-screen transcript renders no `<Static>`
22
- * (`Transcript.tsx`), so Ink's `log-update` writes `frameHeight(rows) = rows-1`
23
- * lines plus a newline into a `rows`-row buffer — nothing scrolls, and the
24
- * frame sits at rows `1 … rows-1` with the cursor parked on the undrawn last
25
- * row. Reintroducing `<Static>` into the full-screen path pushes the frame
26
- * down the screen and silently biases every hit test; whoever does that has
27
- * to change `top` here at the same time.
28
- */
29
- top: number;
30
- /** Rows the frame occupies — `frameHeight(rows)`. */
31
- height: number;
32
- /** Measured rows of the bottom chrome (toast + composer + status). */
33
- bottom: number;
34
- }
35
- /**
36
- * The "I do not know where the frame is" value.
37
- *
38
- * `App` writes it into the geometry ref on every render path that does NOT
39
- * render the full-screen `AppShell` — the terminal-too-small placeholder and
40
- * inline mode — so a stale measurement can never outlive the frame it
41
- * described. There is deliberately no arithmetic fallback: an unmeasured frame
42
- * routes to `'content'`, which is the band that cannot destroy anything, and
43
- * one invisible frame after a resize is a better failure than a wrong band
44
- * (§4.5, P1-5 / D-16).
45
- */
46
- export declare const UNMEASURED_GEOMETRY: FrameGeometry;
47
- /**
48
- * Which band does terminal row `y` belong to?
49
- *
50
- * Fails toward `'content'`: the whole point of this feature is that a wheel
51
- * notch must never edit the user's draft (I-3), so every degenerate input —
52
- * nothing measured yet, a row outside the frame, a chrome measurement that
53
- * swallowed the screen — resolves to the harmless direction.
54
- */
55
- export declare function hitTestWheel(y: number, geometry: FrameGeometry): WheelBand;
@@ -1,52 +0,0 @@
1
- /**
2
- * Wheel band hit-testing (mouse-wheel-region-routing §4.5) — pure, React-free.
3
- *
4
- * The requirement is stated in terms of REGIONS ("scrolling over the agent area
5
- * scrolls the transcript; scrolling over the input box steps prompt history"),
6
- * so the router needs to turn a reported terminal row into one of two bands.
7
- *
8
- * The boundary is MEASURED, never computed from `budget.ts`. That arithmetic
9
- * describes the PLANNED chrome, but the real bottom chrome grows and shrinks at
10
- * run time: the toast row comes and goes, the hint row is dropped below
11
- * `HINT_MIN_ROWS`, and the autocomplete popup adds up to nine rows. Routing off
12
- * the plan would put the boundary in the wrong place exactly when the popup is
13
- * open — the moment precision matters most (D-5 / D-16).
14
- */
15
- /**
16
- * The "I do not know where the frame is" value.
17
- *
18
- * `App` writes it into the geometry ref on every render path that does NOT
19
- * render the full-screen `AppShell` — the terminal-too-small placeholder and
20
- * inline mode — so a stale measurement can never outlive the frame it
21
- * described. There is deliberately no arithmetic fallback: an unmeasured frame
22
- * routes to `'content'`, which is the band that cannot destroy anything, and
23
- * one invisible frame after a resize is a better failure than a wrong band
24
- * (§4.5, P1-5 / D-16).
25
- */
26
- export const UNMEASURED_GEOMETRY = { top: 1, height: 0, bottom: 0 };
27
- /**
28
- * Which band does terminal row `y` belong to?
29
- *
30
- * Fails toward `'content'`: the whole point of this feature is that a wheel
31
- * notch must never edit the user's draft (I-3), so every degenerate input —
32
- * nothing measured yet, a row outside the frame, a chrome measurement that
33
- * swallowed the screen — resolves to the harmless direction.
34
- */
35
- export function hitTestWheel(y, geometry) {
36
- const { top, height } = geometry;
37
- if (!Number.isFinite(height) || height <= 0)
38
- return 'content';
39
- if (!Number.isFinite(y))
40
- return 'content';
41
- // Clamp into the frame so the one undrawn bottom row — and any off-by-one
42
- // from a terminal that reports 0-based rows — lands on a real band instead of
43
- // being dropped.
44
- const row = Math.min(Math.max(Math.floor(y), top), top + height - 1);
45
- // I-6: at least one content row always survives. This clamp is a backstop
46
- // that should never fire, and that is checkable rather than hopeful: the
47
- // completion popup is capped at `viewportRows(rows) - 4`, so the measured
48
- // chrome tops out at `rows - 6` against a frame of `rows - 1` — five content
49
- // rows survive the worst case the layout can produce.
50
- const bottom = Math.min(Math.max(Math.floor(geometry.bottom) || 0, 0), height - 1);
51
- return row >= top + height - bottom ? 'composer' : 'content';
52
- }