@aragon-agent/cli 0.6.35 → 0.6.37

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 (146) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +3173 -3071
  3. package/dist/agent/agent-mode.d.ts +20 -4
  4. package/dist/agent/agent-mode.js +20 -4
  5. package/dist/agent/controller.d.ts +38 -3
  6. package/dist/agent/controller.js +64 -4
  7. package/dist/agent/headless.js +31 -0
  8. package/dist/agent/reducer.d.ts +13 -2
  9. package/dist/agent/reducer.js +1 -0
  10. package/dist/cli.js +12 -0
  11. package/dist/commands/agents-command.d.ts +15 -0
  12. package/dist/commands/agents-command.js +27 -0
  13. package/dist/commands/builtins.js +131 -4
  14. package/dist/commands/perf.d.ts +11 -0
  15. package/dist/commands/perf.js +2 -1
  16. package/dist/commands/registry.d.ts +14 -0
  17. package/dist/config/app-paths.d.ts +15 -0
  18. package/dist/config/app-paths.js +33 -2
  19. package/dist/config/env.d.ts +4 -1
  20. package/dist/config/env.js +28 -2
  21. package/dist/config/load.d.ts +10 -0
  22. package/dist/config/load.js +8 -1
  23. package/dist/config/schema.d.ts +68 -0
  24. package/dist/config/schema.js +39 -0
  25. package/dist/config/store.js +12 -1
  26. package/dist/config/ui-state.d.ts +18 -0
  27. package/dist/config/ui-state.js +9 -0
  28. package/dist/exec/events.d.ts +25 -0
  29. package/dist/exec/events.js +4 -0
  30. package/dist/exec/index.js +16 -1
  31. package/dist/exec/runner.js +10 -0
  32. package/dist/proc/limits.d.ts +16 -0
  33. package/dist/proc/limits.js +16 -0
  34. package/dist/proc/supervisor.d.ts +20 -1
  35. package/dist/proc/supervisor.js +42 -14
  36. package/dist/prompts/command.d.ts +34 -0
  37. package/dist/prompts/command.js +237 -0
  38. package/dist/prompts/copy.d.ts +89 -0
  39. package/dist/prompts/copy.js +131 -0
  40. package/dist/prompts/fill.d.ts +51 -0
  41. package/dist/prompts/fill.js +46 -0
  42. package/dist/prompts/limits.d.ts +53 -0
  43. package/dist/prompts/limits.js +53 -0
  44. package/dist/prompts/normalize.d.ts +53 -0
  45. package/dist/prompts/normalize.js +190 -0
  46. package/dist/prompts/resolve.d.ts +31 -0
  47. package/dist/prompts/resolve.js +60 -0
  48. package/dist/prompts/search.d.ts +58 -0
  49. package/dist/prompts/search.js +146 -0
  50. package/dist/prompts/store.d.ts +86 -0
  51. package/dist/prompts/store.js +453 -0
  52. package/dist/prompts/types.d.ts +204 -0
  53. package/dist/prompts/types.js +13 -0
  54. package/dist/session/checkpoint.d.ts +8 -1
  55. package/dist/session/checkpoint.js +6 -0
  56. package/dist/session/persist.d.ts +19 -1
  57. package/dist/session/persist.js +13 -1
  58. package/dist/session/startup-session.d.ts +7 -2
  59. package/dist/session/startup-session.js +5 -2
  60. package/dist/session/store.js +3 -0
  61. package/dist/session/validate-session.js +64 -1
  62. package/dist/team/limits.d.ts +25 -0
  63. package/dist/team/limits.js +26 -0
  64. package/dist/team/runtime.js +27 -2
  65. package/dist/team/settled.d.ts +57 -0
  66. package/dist/team/settled.js +87 -0
  67. package/dist/team/subagent.js +48 -2
  68. package/dist/team/timeline.d.ts +74 -0
  69. package/dist/team/timeline.js +101 -0
  70. package/dist/team/types.d.ts +24 -1
  71. package/dist/todo/acceptance.d.ts +120 -0
  72. package/dist/todo/acceptance.js +399 -0
  73. package/dist/todo/follow-through.d.ts +48 -23
  74. package/dist/todo/follow-through.js +110 -44
  75. package/dist/todo/limits.d.ts +62 -1
  76. package/dist/todo/limits.js +62 -1
  77. package/dist/todo/panel-rows.d.ts +29 -39
  78. package/dist/todo/panel-rows.js +37 -83
  79. package/dist/todo/plan-sections.d.ts +60 -0
  80. package/dist/todo/plan-sections.js +108 -0
  81. package/dist/todo/prompt.d.ts +17 -12
  82. package/dist/todo/prompt.js +59 -40
  83. package/dist/todo/row-window.d.ts +51 -0
  84. package/dist/todo/row-window.js +107 -0
  85. package/dist/todo/store.d.ts +139 -31
  86. package/dist/todo/store.js +271 -73
  87. package/dist/todo/todo-tool.d.ts +33 -8
  88. package/dist/todo/todo-tool.js +186 -30
  89. package/dist/todo/types.d.ts +58 -0
  90. package/dist/ui/App.js +310 -46
  91. package/dist/ui/Composer.d.ts +6 -2
  92. package/dist/ui/Composer.js +2 -2
  93. package/dist/ui/Header.d.ts +9 -1
  94. package/dist/ui/Header.js +2 -2
  95. package/dist/ui/PromptInput.d.ts +21 -1
  96. package/dist/ui/PromptInput.js +21 -1
  97. package/dist/ui/ScrollbackShell.d.ts +19 -19
  98. package/dist/ui/ScrollbackShell.js +8 -1
  99. package/dist/ui/StatusBar.d.ts +5 -0
  100. package/dist/ui/StatusBar.js +1 -0
  101. package/dist/ui/TeamPanel.d.ts +26 -44
  102. package/dist/ui/TeamPanel.js +46 -135
  103. package/dist/ui/TodoPanel.d.ts +17 -14
  104. package/dist/ui/TodoPanel.js +146 -38
  105. package/dist/ui/Transcript.js +1 -1
  106. package/dist/ui/composer-input.d.ts +10 -0
  107. package/dist/ui/composer-input.js +57 -24
  108. package/dist/ui/entries/TodoCard.d.ts +26 -11
  109. package/dist/ui/entries/TodoCard.js +56 -15
  110. package/dist/ui/glyphs.d.ts +19 -0
  111. package/dist/ui/glyphs.js +4 -0
  112. package/dist/ui/layout/agents-board.d.ts +102 -0
  113. package/dist/ui/layout/agents-board.js +389 -0
  114. package/dist/ui/layout/cells.d.ts +61 -0
  115. package/dist/ui/layout/cells.js +156 -0
  116. package/dist/ui/layout/header-hints.d.ts +13 -3
  117. package/dist/ui/layout/header-hints.js +48 -14
  118. package/dist/ui/layout/status-detail-layout.js +9 -0
  119. package/dist/ui/layout/status-layout.d.ts +13 -0
  120. package/dist/ui/layout/team-row.d.ts +139 -0
  121. package/dist/ui/layout/team-row.js +246 -0
  122. package/dist/ui/layout/todo-layout.d.ts +38 -0
  123. package/dist/ui/layout/todo-layout.js +75 -0
  124. package/dist/ui/layout/virtual-window.js +23 -3
  125. package/dist/ui/overlays/AgentsBoardOverlay.d.ts +57 -0
  126. package/dist/ui/overlays/AgentsBoardOverlay.js +183 -0
  127. package/dist/ui/overlays/HelpOverlay.js +17 -2
  128. package/dist/ui/overlays/PromptEditorPage.d.ts +48 -0
  129. package/dist/ui/overlays/PromptEditorPage.js +227 -0
  130. package/dist/ui/overlays/PromptLibraryOverlay.d.ts +37 -0
  131. package/dist/ui/overlays/PromptLibraryOverlay.js +191 -0
  132. package/dist/ui/overlays/PromptPicker.d.ts +36 -0
  133. package/dist/ui/overlays/PromptPicker.js +129 -0
  134. package/dist/ui/overlays/PromptTextArea.d.ts +86 -0
  135. package/dist/ui/overlays/PromptTextArea.js +141 -0
  136. package/dist/ui/overlays/prompt-library-state.d.ts +162 -0
  137. package/dist/ui/overlays/prompt-library-state.js +335 -0
  138. package/dist/ui/overlays/prompt-picker-state.d.ts +71 -0
  139. package/dist/ui/overlays/prompt-picker-state.js +98 -0
  140. package/dist/ui/scrollback/band.js +14 -1
  141. package/dist/ui/team-status.d.ts +25 -0
  142. package/dist/ui/team-status.js +31 -3
  143. package/dist/ui/use-startup-notices.d.ts +35 -1
  144. package/dist/ui/use-startup-notices.js +29 -2
  145. package/dist/ui/use-wheel-routing.js +9 -1
  146. package/package.json +2 -2
@@ -14,7 +14,8 @@
14
14
  import { useEffect, useRef } from 'react';
15
15
  import { MODE_TOGGLE_KEYS } from '../agent/agent-mode.js';
16
16
  import { readConfigFile } from '../config/store.js';
17
- import { getMouseNoticeVersion, getScrollModeNoticeVersion, getVtInputNoticeVersion, } from '../config/ui-state.js';
17
+ import { getMouseNoticeVersion, getPromptKeyNoticeVersion, getScrollModeNoticeVersion, getVtInputNoticeVersion, } from '../config/ui-state.js';
18
+ import { PROMPT_KEY_NOTICE_COPY } from '../prompts/copy.js';
18
19
  import { getLogger } from '../logging/logger.js';
19
20
  /**
20
21
  * The revision of the mouse notice a user must have seen for it to stay quiet
@@ -103,7 +104,14 @@ export function scrollModeNoticeText() {
103
104
  return ('Scrolling now uses your terminal: wheel, scrollbar, selection and search all work as ' +
104
105
  'usual. Prefer the old full-screen view? Run: aragon config set scrollMode app');
105
106
  }
106
- export function useStartupNotices(dispatch, mouseNotice, retainNotice, vtInputNotice, scrollModeNotice) {
107
+ /**
108
+ * The revision of the prompt-key notice a user must have seen for it to stay quiet
109
+ * (`state.json::promptKeyNoticeVersion`, `0` when absent). BUMP IT WHENEVER THE ADVICE
110
+ * CHANGES, never for a rewording.
111
+ */
112
+ export const PROMPT_KEY_NOTICE_VERSION = 1;
113
+ export function useStartupNotices(dispatch, options) {
114
+ const { mouse: mouseNotice, retain: retainNotice, vtInput: vtInputNotice, scrollMode: scrollModeNotice, promptKeys: promptKeyNotice, } = options;
107
115
  // The sink gives up after repeated write failures (a read-only log directory,
108
116
  // a full disk). Silently logging nothing is exactly the state a user must not
109
117
  // discover later, from an empty file, while trying to explain a bug.
@@ -193,6 +201,25 @@ export function useStartupNotices(dispatch, mouseNotice, retainNotice, vtInputNo
193
201
  dispatch({ type: 'notice', level: 'info', text: scrollModeNoticeText() });
194
202
  scrollNoticeRef.current?.onSeen();
195
203
  }, [scrollNoticeWanted, dispatch]);
204
+ // THE PROMPT-KEY MIGRATION (quick-prompt-library D-20). A durable `notice` and not
205
+ // a toast, for the reason every "you must learn a key" message in this file is one:
206
+ // a toast expires, and the whole mitigation for a moved key is that the sentence is
207
+ // READ. It queues LAST because it explains a key rather than making one work.
208
+ const promptNoticeRef = useRef(promptKeyNotice);
209
+ promptNoticeRef.current = promptKeyNotice;
210
+ const promptKeyWanted = promptKeyNotice !== undefined;
211
+ const promptKeyShown = useRef(false);
212
+ useEffect(() => {
213
+ if (!promptKeyWanted || promptKeyShown.current)
214
+ return;
215
+ // `>=`, not `!==`: a state file written by a NEWER build has already told this
216
+ // user everything the text below says.
217
+ if (getPromptKeyNoticeVersion() >= PROMPT_KEY_NOTICE_VERSION)
218
+ return;
219
+ promptKeyShown.current = true;
220
+ dispatch({ type: 'notice', level: 'info', text: PROMPT_KEY_NOTICE_COPY });
221
+ promptNoticeRef.current?.onSeen();
222
+ }, [promptKeyWanted, dispatch]);
196
223
  // A `warn` notice rather than a toast: it is about a value the user typed, so
197
224
  // it belongs in the transcript where it can be scrolled back to, not in a row
198
225
  // that expires. DEPENDS ON THE TWO SCALARS, never on the options object —
@@ -110,7 +110,15 @@ export function useWheelRouting(options) {
110
110
  // Modes A only. `model` / `confirm` / `question` own their own keys and
111
111
  // scrolling them would leave an inconsistent cursor (R-11).
112
112
  const controlled = overlay === 'help' || overlay === 'settings' || overlay === 'plan'
113
- || overlay === 'queue' || overlay === 'kit';
113
+ || overlay === 'queue' || overlay === 'kit'
114
+ // The prompt surfaces (quick-prompt-library appendix B-2). Missing this line
115
+ // makes the wheel fall through to the transcript BEHIND an open overlay,
116
+ // which reads as a frozen list and a jumping transcript at the same time.
117
+ || overlay === 'prompts' || overlay === 'prompt-pick'
118
+ // The Agents board (tui-subagent-panel §6.5). Missing this line makes the
119
+ // wheel fall through to the transcript BEHIND the open board, which reads
120
+ // as a frozen list and a jumping transcript at the same time.
121
+ || overlay === 'agents';
114
122
  if (!controlled)
115
123
  return;
116
124
  // D-3: the row is not consulted here either. Behind an overlay the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aragon-agent/cli",
3
- "version": "0.6.35",
3
+ "version": "0.6.37",
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.47",
59
+ "@aragon-agent/core": "^0.2.49",
60
60
  "chalk": "^5.6.2",
61
61
  "cli-highlight": "^2.0.0",
62
62
  "commander": "^12.1.0",