@namzu/cli 14.3.0 → 15.1.0

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 (149) hide show
  1. package/README.md +117 -17
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/cli.js +26 -26
  4. package/dist/cli.js.map +1 -1
  5. package/dist/commands/acp.d.ts.map +1 -1
  6. package/dist/commands/acp.js +3 -2
  7. package/dist/commands/acp.js.map +1 -1
  8. package/dist/commands/doctor.d.ts.map +1 -1
  9. package/dist/commands/doctor.js +2 -0
  10. package/dist/commands/doctor.js.map +1 -1
  11. package/dist/commands/login.d.ts +2 -0
  12. package/dist/commands/login.d.ts.map +1 -1
  13. package/dist/commands/login.js +45 -7
  14. package/dist/commands/login.js.map +1 -1
  15. package/dist/commands/run.d.ts.map +1 -1
  16. package/dist/commands/run.js +36 -12
  17. package/dist/commands/run.js.map +1 -1
  18. package/dist/commands/{stubs.d.ts → serve.d.ts} +1 -10
  19. package/dist/commands/serve.d.ts.map +1 -0
  20. package/dist/commands/{stubs.js → serve.js} +1 -24
  21. package/dist/commands/serve.js.map +1 -0
  22. package/dist/commands/skills.d.ts +19 -0
  23. package/dist/commands/skills.d.ts.map +1 -0
  24. package/dist/commands/skills.js +107 -0
  25. package/dist/commands/skills.js.map +1 -0
  26. package/dist/integrations/mcp/servers.d.ts +7 -0
  27. package/dist/integrations/mcp/servers.d.ts.map +1 -1
  28. package/dist/integrations/mcp/servers.js +33 -8
  29. package/dist/integrations/mcp/servers.js.map +1 -1
  30. package/dist/integrations/sessions/store.d.ts +8 -0
  31. package/dist/integrations/sessions/store.d.ts.map +1 -1
  32. package/dist/integrations/sessions/store.js +15 -0
  33. package/dist/integrations/sessions/store.js.map +1 -1
  34. package/dist/integrations/subagents/runtime.d.ts +2 -0
  35. package/dist/integrations/subagents/runtime.d.ts.map +1 -1
  36. package/dist/integrations/subagents/runtime.js +86 -13
  37. package/dist/integrations/subagents/runtime.js.map +1 -1
  38. package/dist/integrations/updates.d.ts.map +1 -1
  39. package/dist/integrations/updates.js +29 -4
  40. package/dist/integrations/updates.js.map +1 -1
  41. package/dist/tui/App.d.ts +10 -1
  42. package/dist/tui/App.d.ts.map +1 -1
  43. package/dist/tui/App.js +1039 -252
  44. package/dist/tui/App.js.map +1 -1
  45. package/dist/tui/ChoicePicker.d.ts +2 -1
  46. package/dist/tui/ChoicePicker.d.ts.map +1 -1
  47. package/dist/tui/ChoicePicker.js +10 -6
  48. package/dist/tui/ChoicePicker.js.map +1 -1
  49. package/dist/tui/Composer.d.ts +19 -2
  50. package/dist/tui/Composer.d.ts.map +1 -1
  51. package/dist/tui/Composer.js +526 -70
  52. package/dist/tui/Composer.js.map +1 -1
  53. package/dist/tui/CopyPicker.d.ts.map +1 -1
  54. package/dist/tui/CopyPicker.js +3 -4
  55. package/dist/tui/CopyPicker.js.map +1 -1
  56. package/dist/tui/EditPromptPicker.d.ts.map +1 -1
  57. package/dist/tui/EditPromptPicker.js +3 -4
  58. package/dist/tui/EditPromptPicker.js.map +1 -1
  59. package/dist/tui/Markdown.d.ts +3 -1
  60. package/dist/tui/Markdown.d.ts.map +1 -1
  61. package/dist/tui/Markdown.js +11 -9
  62. package/dist/tui/Markdown.js.map +1 -1
  63. package/dist/tui/PermissionOverlay.d.ts +11 -6
  64. package/dist/tui/PermissionOverlay.d.ts.map +1 -1
  65. package/dist/tui/PermissionOverlay.js +13 -20
  66. package/dist/tui/PermissionOverlay.js.map +1 -1
  67. package/dist/tui/Picker.d.ts.map +1 -1
  68. package/dist/tui/Picker.js +47 -11
  69. package/dist/tui/Picker.js.map +1 -1
  70. package/dist/tui/ResumePicker.d.ts.map +1 -1
  71. package/dist/tui/ResumePicker.js +6 -1
  72. package/dist/tui/ResumePicker.js.map +1 -1
  73. package/dist/tui/StatusBar.js +3 -3
  74. package/dist/tui/StatusBar.js.map +1 -1
  75. package/dist/tui/TextPrompt.d.ts +21 -0
  76. package/dist/tui/TextPrompt.d.ts.map +1 -0
  77. package/dist/tui/TextPrompt.js +139 -0
  78. package/dist/tui/TextPrompt.js.map +1 -0
  79. package/dist/tui/Transcript.d.ts +9 -10
  80. package/dist/tui/Transcript.d.ts.map +1 -1
  81. package/dist/tui/Transcript.js +11 -12
  82. package/dist/tui/Transcript.js.map +1 -1
  83. package/dist/tui/agent.d.ts +57 -23
  84. package/dist/tui/agent.d.ts.map +1 -1
  85. package/dist/tui/agent.js +136 -86
  86. package/dist/tui/agent.js.map +1 -1
  87. package/dist/tui/exit-summary.d.ts.map +1 -1
  88. package/dist/tui/exit-summary.js +2 -1
  89. package/dist/tui/exit-summary.js.map +1 -1
  90. package/dist/tui/external-editor.d.ts +25 -0
  91. package/dist/tui/external-editor.d.ts.map +1 -0
  92. package/dist/tui/external-editor.js +169 -0
  93. package/dist/tui/external-editor.js.map +1 -0
  94. package/dist/tui/index.d.ts.map +1 -1
  95. package/dist/tui/index.js +4 -0
  96. package/dist/tui/index.js.map +1 -1
  97. package/dist/tui/live-window.d.ts +17 -11
  98. package/dist/tui/live-window.d.ts.map +1 -1
  99. package/dist/tui/live-window.js +64 -20
  100. package/dist/tui/live-window.js.map +1 -1
  101. package/dist/tui/login-prompt.d.ts +2 -0
  102. package/dist/tui/login-prompt.d.ts.map +1 -1
  103. package/dist/tui/login-prompt.js +8 -1
  104. package/dist/tui/login-prompt.js.map +1 -1
  105. package/dist/tui/mentions.d.ts +19 -0
  106. package/dist/tui/mentions.d.ts.map +1 -1
  107. package/dist/tui/mentions.js +96 -5
  108. package/dist/tui/mentions.js.map +1 -1
  109. package/dist/tui/permission-review.d.ts +59 -0
  110. package/dist/tui/permission-review.d.ts.map +1 -0
  111. package/dist/tui/permission-review.js +219 -0
  112. package/dist/tui/permission-review.js.map +1 -0
  113. package/dist/tui/run-interruption.d.ts +14 -0
  114. package/dist/tui/run-interruption.d.ts.map +1 -0
  115. package/dist/tui/run-interruption.js +67 -0
  116. package/dist/tui/run-interruption.js.map +1 -0
  117. package/dist/tui/selection-window.d.ts +18 -0
  118. package/dist/tui/selection-window.d.ts.map +1 -0
  119. package/dist/tui/selection-window.js +37 -0
  120. package/dist/tui/selection-window.js.map +1 -0
  121. package/dist/tui/slashCommands.d.ts +48 -8
  122. package/dist/tui/slashCommands.d.ts.map +1 -1
  123. package/dist/tui/slashCommands.js +129 -47
  124. package/dist/tui/slashCommands.js.map +1 -1
  125. package/dist/tui/terminal-hyperlinks.d.ts +20 -0
  126. package/dist/tui/terminal-hyperlinks.d.ts.map +1 -0
  127. package/dist/tui/terminal-hyperlinks.js +70 -0
  128. package/dist/tui/terminal-hyperlinks.js.map +1 -0
  129. package/dist/tui/types.d.ts +2 -0
  130. package/dist/tui/types.d.ts.map +1 -1
  131. package/dist/tui/use-selection-index.d.ts +8 -0
  132. package/dist/tui/use-selection-index.d.ts.map +1 -0
  133. package/dist/tui/use-selection-index.js +13 -0
  134. package/dist/tui/use-selection-index.js.map +1 -0
  135. package/dist/tui/workspace-review.d.ts +15 -0
  136. package/dist/tui/workspace-review.d.ts.map +1 -0
  137. package/dist/tui/workspace-review.js +67 -0
  138. package/dist/tui/workspace-review.js.map +1 -0
  139. package/dist/version.d.ts +10 -0
  140. package/dist/version.d.ts.map +1 -0
  141. package/dist/version.js +23 -0
  142. package/dist/version.js.map +1 -0
  143. package/package.json +8 -7
  144. package/dist/commands/stubs.d.ts.map +0 -1
  145. package/dist/commands/stubs.js.map +0 -1
  146. package/dist/tui/bottom-spacer.d.ts +0 -95
  147. package/dist/tui/bottom-spacer.d.ts.map +0 -1
  148. package/dist/tui/bottom-spacer.js +0 -83
  149. package/dist/tui/bottom-spacer.js.map +0 -1
@@ -1,83 +0,0 @@
1
- /**
2
- * How many blank rows to put above the composer so it sits at the bottom.
3
- *
4
- * ## The narrow defect
5
- *
6
- * Ink writes the transcript to native scrollback via `<Static>` and re-renders
7
- * the live region — activity, composer, status bar — beneath it. Once the
8
- * output exceeds the viewport the terminal has scrolled, and the composer is
9
- * already at the bottom. The complaint is entirely the case before that: five
10
- * lines on a forty-row terminal leaves the composer at row six with blank space
11
- * under it, and the operator's eye has to find it.
12
- *
13
- * So this does not try to pin the composer always. It pads only while the
14
- * transcript is unambiguously shorter than the viewport, and returns 0 the
15
- * moment that stops being knowable. After that, the terminal does it.
16
- *
17
- * ## Why a rough estimate is safe here, and would not be in general
18
- *
19
- * The rendered height of a transcript is not knowable from this side: ink does
20
- * not report it, and wrapping depends on ANSI, wide glyphs and markdown that
21
- * this module does not model. That is exactly why the whole-session version of
22
- * this idea is a bad one.
23
- *
24
- * It is safe in the short case because the error is **asymmetric**:
25
- *
26
- * - Overestimate the content ⇒ pad less, or not at all ⇒ the composer floats,
27
- * which is precisely today's behaviour. No worse than not doing this.
28
- * - Underestimate the content ⇒ pad too much ⇒ the composer is pushed off the
29
- * bottom, which is worse than today.
30
- *
31
- * So every uncertainty is resolved toward *more* content and *less* padding:
32
- * `estimateRenderedLines` counts a minimum, {@link SAFETY_ROWS} is subtracted
33
- * on top, and anything unknown returns 0. Being wrong costs the feature, never
34
- * the usability.
35
- */
36
- /**
37
- * Rows held back from the calculation.
38
- *
39
- * Absorbs what the estimate cannot see — a wrapped line the width maths missed,
40
- * a wide glyph, a markdown block that renders taller than its source. Six is
41
- * chosen to be visibly generous rather than tuned: the cost of it being too
42
- * large is a small gap under the composer on a nearly-empty screen, and the
43
- * cost of it being too small is a composer pushed out of view.
44
- */
45
- export const SAFETY_ROWS = 6;
46
- /**
47
- * A deliberate UNDER-count of how tall the transcript will render.
48
- *
49
- * Under, not over, because it is subtracted from the space available: counting
50
- * low leaves more apparent room, and the safety margin plus the guard below are
51
- * what stop that becoming padding. Each entry is at least one row, and a long
52
- * entry is divided by the width to approximate wrapping.
53
- */
54
- export function estimateRenderedLines(transcript, columns) {
55
- const width = Math.max(20, columns ?? 80);
56
- let total = 0;
57
- for (const entry of transcript) {
58
- for (const line of entry.split('\n')) {
59
- total += Math.max(1, Math.ceil(line.length / width));
60
- }
61
- }
62
- return total;
63
- }
64
- /**
65
- * Blank rows to insert above the composer, or 0 to leave the layout alone.
66
- *
67
- * Returns 0 whenever the answer could be wrong: no TTY, an implausible height,
68
- * or a transcript long enough that the terminal has plausibly begun to scroll.
69
- */
70
- export function bottomSpacerRows(input) {
71
- const { rows, columns, transcript, liveRows } = input;
72
- // Not a terminal, or a height too small to reason about. A pipe has no
73
- // bottom to pin to.
74
- if (rows === undefined || !Number.isFinite(rows) || rows < 12)
75
- return 0;
76
- const used = estimateRenderedLines(transcript, columns) + liveRows + SAFETY_ROWS;
77
- // The transcript is at or past the viewport: the terminal is scrolling and
78
- // the composer is already where it should be. Padding now would push it off.
79
- if (used >= rows)
80
- return 0;
81
- return rows - used;
82
- }
83
- //# sourceMappingURL=bottom-spacer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bottom-spacer.js","sourceRoot":"","sources":["../../src/tui/bottom-spacer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAA;AAoC5B;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CACpC,UAA6B,EAC7B,OAA2B;IAE3B,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,IAAI,EAAE,CAAC,CAAA;IACzC,IAAI,KAAK,GAAG,CAAC,CAAA;IACb,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE,CAAC;QAChC,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YACtC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAA;QACrD,CAAC;IACF,CAAC;IACD,OAAO,KAAK,CAAA;AACb,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAkB;IAClD,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAA;IAErD,uEAAuE;IACvE,oBAAoB;IACpB,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAE;QAAE,OAAO,CAAC,CAAA;IAEvE,MAAM,IAAI,GAAG,qBAAqB,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,QAAQ,GAAG,WAAW,CAAA;IAEhF,2EAA2E;IAC3E,6EAA6E;IAC7E,IAAI,IAAI,IAAI,IAAI;QAAE,OAAO,CAAC,CAAA;IAE1B,OAAO,IAAI,GAAG,IAAI,CAAA;AACnB,CAAC"}