@aragon-agent/cli 0.5.11 → 0.6.1

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 (64) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/README.md +306 -9
  3. package/dist/agent/controller.d.ts +37 -1
  4. package/dist/agent/controller.js +34 -4
  5. package/dist/agent/reducer.js +14 -4
  6. package/dist/agent/system-prompt.d.ts +16 -0
  7. package/dist/agent/system-prompt.js +5 -0
  8. package/dist/cli.js +71 -2
  9. package/dist/commands/builtins.js +21 -2
  10. package/dist/config/ui-state.d.ts +18 -0
  11. package/dist/config/ui-state.js +10 -0
  12. package/dist/diagnostics/cli-commands.d.ts +10 -0
  13. package/dist/diagnostics/cli-commands.js +61 -0
  14. package/dist/diagnostics/doctor.d.ts +29 -0
  15. package/dist/diagnostics/doctor.js +167 -0
  16. package/dist/diagnostics/info.d.ts +30 -0
  17. package/dist/diagnostics/info.js +99 -0
  18. package/dist/exec/cli-commands.d.ts +31 -0
  19. package/dist/exec/cli-commands.js +63 -0
  20. package/dist/exec/emitter.d.ts +80 -0
  21. package/dist/exec/emitter.js +127 -0
  22. package/dist/exec/events.d.ts +226 -0
  23. package/dist/exec/events.js +43 -0
  24. package/dist/exec/index.d.ts +56 -0
  25. package/dist/exec/index.js +435 -0
  26. package/dist/exec/options.d.ts +76 -0
  27. package/dist/exec/options.js +221 -0
  28. package/dist/exec/permission.d.ts +66 -0
  29. package/dist/exec/permission.js +96 -0
  30. package/dist/exec/runner.d.ts +204 -0
  31. package/dist/exec/runner.js +559 -0
  32. package/dist/exec/stdin-stream.d.ts +46 -0
  33. package/dist/exec/stdin-stream.js +144 -0
  34. package/dist/logging/install.d.ts +22 -0
  35. package/dist/logging/install.js +22 -0
  36. package/dist/session/cli-commands.d.ts +30 -0
  37. package/dist/session/cli-commands.js +162 -0
  38. package/dist/session/persist.d.ts +46 -0
  39. package/dist/session/persist.js +8 -0
  40. package/dist/session/store.d.ts +129 -0
  41. package/dist/session/store.js +385 -0
  42. package/dist/team/runtime.d.ts +12 -0
  43. package/dist/team/runtime.js +6 -0
  44. package/dist/team/subagent.d.ts +12 -0
  45. package/dist/team/subagent.js +4 -0
  46. package/dist/todo/store.d.ts +12 -6
  47. package/dist/todo/store.js +12 -6
  48. package/dist/todo/types.d.ts +2 -1
  49. package/dist/tools/index.d.ts +20 -0
  50. package/dist/tools/index.js +26 -0
  51. package/dist/ui/ActivityLine.d.ts +32 -0
  52. package/dist/ui/ActivityLine.js +23 -1
  53. package/dist/ui/App.d.ts +14 -1
  54. package/dist/ui/App.js +70 -6
  55. package/dist/ui/BottomStatusRow.d.ts +33 -1
  56. package/dist/ui/BottomStatusRow.js +20 -6
  57. package/dist/ui/Transcript.js +15 -0
  58. package/dist/ui/entries/FastCard.js +20 -2
  59. package/dist/ui/overlays/HelpOverlay.js +1 -1
  60. package/dist/ui/use-startup-notices.d.ts +67 -4
  61. package/dist/ui/use-startup-notices.js +76 -2
  62. package/dist/ui/win-vt-input.d.ts +57 -0
  63. package/dist/ui/win-vt-input.js +62 -0
  64. package/package.json +7 -3
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Will this console ever deliver `CSI Z` and SGR mouse reports?
3
+ * (shift-tab-and-mouse-wheel-dead-on-some-terminals, F1')
4
+ *
5
+ * ASCII ONLY - this tree is inside the glyph scanner's scope.
6
+ *
7
+ * On Windows the answer is decided by NODE, not by the terminal emulator and not
8
+ * by anything this package writes. `Shift+Tab` and SGR mouse reporting both
9
+ * exist only while the console input handle has `ENABLE_VIRTUAL_TERMINAL_INPUT`
10
+ * set, and Node only sets it from v22.17.0 / v24.2.0 onward, where
11
+ * `SetRawMode` switched from `UV_TTY_MODE_RAW` to `UV_TTY_MODE_RAW_VT`
12
+ * (`nodejs/node` `src/tty_wrap.cc`). Before that libuv translates console input
13
+ * records into ANSI itself, and that translation
14
+ *
15
+ * - has no `VK_TAB` entry, and takes the character branch for it because
16
+ * `uChar.UnicodeChar` is 0x09, where SHIFT_PRESSED is never read. So
17
+ * `Shift+Tab` arrives as a PLAIN TAB, byte-identical to `Tab`;
18
+ * - `continue`s past every record that is not a `KEY_EVENT`, so a mouse
19
+ * report cannot reach the process at all.
20
+ *
21
+ * Measured rather than reasoned: injecting the same keystrokes into the same
22
+ * console, Node 20.19.0 yields `09` for `Shift+Tab` and Node 22.18.0 yields
23
+ * `1b 5b 5a`; console mode samples `0x0008` and `0x0208` respectively. The full
24
+ * probe data is in `docs/diagnoses/shift-tab-and-mouse-wheel-dead-on-some-terminals/`.
25
+ *
26
+ * PURE: the platform and the version are arguments, so the whole table is
27
+ * testable without a Windows box and without a second Node install.
28
+ */
29
+ import { satisfiesNodeRange } from '../update/semver.js';
30
+ /**
31
+ * The versions whose `setRawMode(true)` reaches `UV_TTY_MODE_RAW_VT`.
32
+ *
33
+ * `<23` IS LOAD-BEARING: 23.x branched before the change landed and never got
34
+ * it, and 24.0/24.1 did not have it either - the fix reached the 24 line only in
35
+ * 24.2.0. A range of `>=22.17.0` alone would call both of those supported.
36
+ *
37
+ * A TYPO HERE DISABLES THE WHOLE GATE SILENTLY, because `satisfiesNodeRange`
38
+ * fails open: a clause it cannot parse makes the range unknown and the answer
39
+ * `true`. `win-vt-input.test.ts` pins concrete version strings against concrete
40
+ * booleans for exactly that reason - it is the only guard this constant has.
41
+ */
42
+ export const WINDOWS_VT_INPUT_NODE_RANGE = '>=22.17.0 <23 || >=24.2.0';
43
+ /**
44
+ * `false` only for the combination that is known to swallow both inputs:
45
+ * `win32` running a Node outside `WINDOWS_VT_INPUT_NODE_RANGE`.
46
+ *
47
+ * FAILS OPEN, deliberately, in both directions (inherited from
48
+ * `satisfiesNodeRange`, whose own reasoning is written down at its definition):
49
+ * a version string that cannot be parsed is assumed supported. Guessing wrong
50
+ * that way costs nothing beyond today's behaviour; guessing wrong the other way
51
+ * would turn the mouse off on a machine where it works, which is a regression
52
+ * this bug does not justify risking.
53
+ *
54
+ * Every non-Windows platform is `true` unconditionally. macOS and Linux go
55
+ * through a real pty, where the terminal - not Node - encodes the keys, so no
56
+ * version of Node has ever been able to affect this.
57
+ */
58
+ export function supportsWindowsVtInput(platform, nodeVersion) {
59
+ if (platform !== 'win32')
60
+ return true;
61
+ return satisfiesNodeRange(WINDOWS_VT_INPUT_NODE_RANGE, nodeVersion);
62
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aragon-agent/cli",
3
- "version": "0.5.11",
3
+ "version": "0.6.1",
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",
@@ -15,7 +15,11 @@
15
15
  "anthropic",
16
16
  "openai",
17
17
  "google",
18
- "aragonagent"
18
+ "aragonagent",
19
+ "exec",
20
+ "headless",
21
+ "automation",
22
+ "ci"
19
23
  ],
20
24
  "repository": {
21
25
  "type": "git",
@@ -52,7 +56,7 @@
52
56
  "prepublishOnly": "npm run build"
53
57
  },
54
58
  "dependencies": {
55
- "@aragon-agent/core": "^0.2.11",
59
+ "@aragon-agent/core": "^0.2.13",
56
60
  "chalk": "^5.6.2",
57
61
  "cli-highlight": "^2.0.0",
58
62
  "commander": "^12.1.0",