@linxiraos/pi-tui 1.2.1 → 1.3.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 (280) hide show
  1. package/CHANGELOG.md +245 -224
  2. package/README.md +36 -0
  3. package/THIRD-PARTY-NOTICES.txt +55 -5
  4. package/dist/types/app-keybindings.d.ts +18 -8
  5. package/dist/types/apps/git/diff-pane.d.ts +5 -0
  6. package/dist/types/apps/git/git-tui.d.ts +16 -2
  7. package/dist/types/apps/git/state.d.ts +11 -0
  8. package/dist/types/autocomplete.d.ts +2 -0
  9. package/dist/types/charts/chart-svg.d.ts +7 -13
  10. package/dist/types/chat/advisor-message.d.ts +4 -1
  11. package/dist/types/chat/assistant-message.d.ts +9 -4
  12. package/dist/types/chat/figure-markdown.d.ts +7 -2
  13. package/dist/types/chat/messages.d.ts +3 -1
  14. package/dist/types/chat/read-tool-group.d.ts +2 -2
  15. package/dist/types/chat/table-chart.d.ts +11 -15
  16. package/dist/types/chat/tool-execution.d.ts +32 -20
  17. package/dist/types/chat/user-message.d.ts +3 -2
  18. package/dist/types/chrome/countdown-timer.d.ts +3 -2
  19. package/dist/types/chrome/diff.d.ts +2 -3
  20. package/dist/types/chrome/status-notice.d.ts +2 -0
  21. package/dist/types/chrome/transcript-container.d.ts +2 -0
  22. package/dist/types/components/image.d.ts +2 -0
  23. package/dist/types/components/markdown.d.ts +49 -3
  24. package/dist/types/components/text.d.ts +2 -0
  25. package/dist/types/debug-server.d.ts +2 -0
  26. package/dist/types/keybinding-matchers.d.ts +6 -0
  27. package/dist/types/multiplexers/tmux.d.ts +1 -0
  28. package/dist/types/multiplexers/types.d.ts +6 -0
  29. package/dist/types/native/backend.d.ts +5 -4
  30. package/dist/types/native/blobs.d.ts +24 -12
  31. package/dist/types/overlays/agent-hub-projection.d.ts +10 -5
  32. package/dist/types/overlays/annotation-overlay.d.ts +19 -0
  33. package/dist/types/overlays/approval-dialog.d.ts +79 -0
  34. package/dist/types/overlays/ask-dialog.d.ts +11 -6
  35. package/dist/types/overlays/btw-history-panel.d.ts +2 -6
  36. package/dist/types/overlays/hook-editor.d.ts +7 -2
  37. package/dist/types/overlays/hook-input.d.ts +12 -4
  38. package/dist/types/overlays/job-tree.d.ts +50 -0
  39. package/dist/types/overlays/jobs-panel.d.ts +25 -11
  40. package/dist/types/overlays/login-dialog.d.ts +8 -3
  41. package/dist/types/overlays/mcp-add-wizard.d.ts +9 -1
  42. package/dist/types/overlays/model-browser.d.ts +6 -1
  43. package/dist/types/overlays/model-picker.d.ts +2 -0
  44. package/dist/types/overlays/pause-screen.d.ts +5 -0
  45. package/dist/types/overlays/plan-review-overlay.d.ts +4 -0
  46. package/dist/types/overlays/report-panel.d.ts +5 -1
  47. package/dist/types/overlays/reset-usage-selector.d.ts +7 -5
  48. package/dist/types/overlays/session-account-selector.d.ts +4 -0
  49. package/dist/types/overlays/session-info-overlay.d.ts +7 -3
  50. package/dist/types/overlays/session-selector.d.ts +3 -1
  51. package/dist/types/overlays/usage-dashboard.d.ts +6 -6
  52. package/dist/types/prompt/composer.d.ts +23 -20
  53. package/dist/types/prompt/custom-editor.d.ts +20 -10
  54. package/dist/types/prompt/image-references.d.ts +22 -0
  55. package/dist/types/prompt/internal-url-autocomplete.d.ts +1 -0
  56. package/dist/types/prompt/macos-spelling.d.ts +2 -1
  57. package/dist/types/prompt/prose-gate.d.ts +3 -0
  58. package/dist/types/prompt/queued-messages.d.ts +1 -1
  59. package/dist/types/prompt/typing-word.d.ts +25 -0
  60. package/dist/types/prompt/welcome.d.ts +26 -6
  61. package/dist/types/render/hanging-wrap.d.ts +7 -0
  62. package/dist/types/render/hyperlink.d.ts +2 -0
  63. package/dist/types/render/render-utils.d.ts +9 -1
  64. package/dist/types/render/utils.d.ts +1 -1
  65. package/dist/types/setup/scenes/splash.d.ts +6 -5
  66. package/dist/types/status-line/context-usage.d.ts +4 -1
  67. package/dist/types/status-line/host.d.ts +6 -4
  68. package/dist/types/status-line/startup.d.ts +6 -6
  69. package/dist/types/status-line/types.d.ts +3 -0
  70. package/dist/types/stdin-buffer.d.ts +7 -0
  71. package/dist/types/terminal-capabilities.d.ts +16 -1
  72. package/dist/types/terminal-multiplexer.d.ts +7 -0
  73. package/dist/types/terminal.d.ts +8 -4
  74. package/dist/types/theme/symbols.d.ts +1 -1
  75. package/dist/types/theme/theme.d.ts +11 -0
  76. package/dist/types/thinking.d.ts +5 -0
  77. package/dist/types/tmux.d.ts +39 -4
  78. package/dist/types/tools/ast-edit.d.ts +2 -2
  79. package/dist/types/tools/ast-grep.d.ts +2 -2
  80. package/dist/types/tools/bash.d.ts +6 -1
  81. package/dist/types/tools/edit.d.ts +2 -0
  82. package/dist/types/tools/eval.d.ts +53 -4
  83. package/dist/types/tools/find.d.ts +14 -4
  84. package/dist/types/tools/glob.d.ts +3 -3
  85. package/dist/types/tools/grep.d.ts +2 -2
  86. package/dist/types/tools/grouped-file-output.d.ts +9 -4
  87. package/dist/types/tools/native-view.d.ts +1 -1
  88. package/dist/types/tools/read.d.ts +32 -10
  89. package/dist/types/tools/renderer.d.ts +2 -0
  90. package/dist/types/tools/task.d.ts +31 -0
  91. package/dist/types/tools/web-search-types.d.ts +1 -0
  92. package/dist/types/tools/write.d.ts +2 -0
  93. package/dist/types/tui.d.ts +20 -3
  94. package/package.json +10 -10
  95. package/src/app-keybindings.d.ts +18 -8
  96. package/src/app-keybindings.ts +20 -8
  97. package/src/apps/autoresearch-dashboard.ts +444 -27
  98. package/src/apps/debug/raw-sse.ts +2 -2
  99. package/src/apps/git/diff-pane.ts +39 -41
  100. package/src/apps/git/git-tui.ts +80 -14
  101. package/src/apps/git/sidebar.ts +10 -1
  102. package/src/apps/git/state.ts +12 -0
  103. package/src/autocomplete.d.ts +2 -0
  104. package/src/autocomplete.ts +21 -19
  105. package/src/bracketed-paste.ts +9 -2
  106. package/src/charts/chart-svg.d.ts +7 -13
  107. package/src/charts/chart-svg.ts +19 -22
  108. package/src/charts/table-data.ts +17 -6
  109. package/src/chat/advisor-message.d.ts +4 -1
  110. package/src/chat/advisor-message.ts +77 -24
  111. package/src/chat/assistant-message.d.ts +9 -4
  112. package/src/chat/assistant-message.ts +127 -31
  113. package/src/chat/bash-execution.ts +7 -2
  114. package/src/chat/figure-markdown.d.ts +7 -2
  115. package/src/chat/figure-markdown.ts +10 -3
  116. package/src/chat/image-loading.ts +9 -6
  117. package/src/chat/messages.d.ts +3 -1
  118. package/src/chat/messages.ts +4 -1
  119. package/src/chat/read-tool-group.d.ts +2 -2
  120. package/src/chat/read-tool-group.ts +97 -42
  121. package/src/chat/svg-figure.ts +3 -1
  122. package/src/chat/svg-source.ts +6 -3
  123. package/src/chat/table-chart.d.ts +11 -15
  124. package/src/chat/table-chart.ts +24 -57
  125. package/src/chat/tool-execution.d.ts +32 -20
  126. package/src/chat/tool-execution.ts +103 -36
  127. package/src/chat/user-message.d.ts +3 -2
  128. package/src/chat/user-message.ts +54 -34
  129. package/src/chrome/countdown-timer.ts +3 -3
  130. package/src/chrome/diff.d.ts +2 -3
  131. package/src/chrome/diff.ts +4 -9
  132. package/src/chrome/status-notice.ts +5 -0
  133. package/src/chrome/transcript-container.d.ts +2 -0
  134. package/src/chrome/transcript-container.ts +212 -28
  135. package/src/components/editor.ts +12 -12
  136. package/src/components/image.d.ts +2 -0
  137. package/src/components/image.ts +54 -20
  138. package/src/components/markdown.d.ts +49 -3
  139. package/src/components/markdown.ts +482 -12
  140. package/src/components/settings-list.ts +2 -4
  141. package/src/components/text.d.ts +2 -0
  142. package/src/components/text.ts +11 -1
  143. package/src/debug-server.d.ts +2 -0
  144. package/src/debug-server.ts +51 -69
  145. package/src/hotkeys-markdown.ts +2 -0
  146. package/src/keybinding-matchers.d.ts +6 -0
  147. package/src/keybinding-matchers.ts +19 -0
  148. package/src/multiplexers/tmux.d.ts +1 -0
  149. package/src/multiplexers/tmux.ts +3 -0
  150. package/src/multiplexers/types.d.ts +6 -0
  151. package/src/multiplexers/types.ts +6 -0
  152. package/src/native/backend.d.ts +5 -4
  153. package/src/native/backend.ts +13 -5
  154. package/src/native/blobs.d.ts +24 -12
  155. package/src/native/blobs.ts +56 -7
  156. package/src/native/reconcile.ts +43 -21
  157. package/src/overlays/advisor-config.ts +259 -8
  158. package/src/overlays/agent-hub-projection.d.ts +10 -5
  159. package/src/overlays/agent-hub-projection.ts +63 -12
  160. package/src/overlays/annotation-overlay.ts +422 -168
  161. package/src/overlays/approval-dialog.ts +389 -0
  162. package/src/overlays/ask-dialog.ts +244 -105
  163. package/src/overlays/btw-history-panel.ts +208 -147
  164. package/src/overlays/extensions/extension-list.ts +4 -6
  165. package/src/overlays/hook-editor.ts +90 -32
  166. package/src/overlays/hook-input.ts +105 -19
  167. package/src/overlays/job-tree.ts +177 -0
  168. package/src/overlays/jobs-panel.ts +222 -142
  169. package/src/overlays/login-dialog.ts +201 -91
  170. package/src/overlays/mcp-add-wizard.ts +562 -279
  171. package/src/overlays/model-browser.ts +32 -7
  172. package/src/overlays/model-hub.ts +4 -10
  173. package/src/overlays/model-picker.ts +58 -21
  174. package/src/overlays/pause-screen.ts +81 -23
  175. package/src/overlays/plan-review-overlay.ts +16 -0
  176. package/src/overlays/plugin-selector.ts +17 -1
  177. package/src/overlays/queue-mode-selector.ts +10 -0
  178. package/src/overlays/report-panel.ts +6 -2
  179. package/src/overlays/reset-usage-selector.ts +130 -21
  180. package/src/overlays/session-account-selector.ts +36 -0
  181. package/src/overlays/session-info-overlay.ts +199 -76
  182. package/src/overlays/session-selector.ts +15 -10
  183. package/src/overlays/settings-selector.ts +3 -0
  184. package/src/overlays/show-images-selector.ts +1 -0
  185. package/src/overlays/snapcompact-shape-preview.ts +13 -6
  186. package/src/overlays/theme-selector.ts +6 -1
  187. package/src/overlays/thinking-selector.ts +8 -4
  188. package/src/overlays/tree-selector.ts +117 -2
  189. package/src/overlays/usage-dashboard.ts +498 -144
  190. package/src/prompt/composer-cache.ts +4 -1
  191. package/src/prompt/composer.ts +200 -74
  192. package/src/prompt/custom-editor.ts +168 -65
  193. package/src/prompt/image-references.d.ts +22 -0
  194. package/src/prompt/image-references.ts +79 -2
  195. package/src/prompt/internal-url-autocomplete.ts +1 -0
  196. package/src/prompt/macos-spelling.ts +28 -5
  197. package/src/prompt/prose-gate.ts +3 -0
  198. package/src/prompt/queued-messages.ts +9 -2
  199. package/src/prompt/tips.txt +1 -2
  200. package/src/prompt/typing-word.ts +59 -0
  201. package/src/prompt/welcome.ts +97 -45
  202. package/src/render/code-cell.ts +18 -5
  203. package/src/render/hanging-wrap.d.ts +7 -0
  204. package/src/render/hanging-wrap.ts +58 -0
  205. package/src/render/hyperlink.d.ts +2 -0
  206. package/src/render/hyperlink.ts +5 -0
  207. package/src/render/render-utils.d.ts +9 -1
  208. package/src/render/render-utils.ts +16 -2
  209. package/src/render/utils.d.ts +1 -1
  210. package/src/render/utils.ts +1 -1
  211. package/src/render/width-aware-text.ts +6 -5
  212. package/src/setup/scenes/splash.ts +22 -8
  213. package/src/status-line/component.ts +79 -11
  214. package/src/status-line/context-usage.ts +176 -73
  215. package/src/status-line/footer.ts +18 -35
  216. package/src/status-line/host.ts +6 -1
  217. package/src/status-line/segments.ts +16 -5
  218. package/src/status-line/startup.ts +6 -6
  219. package/src/status-line/types.ts +1 -0
  220. package/src/stdin-buffer.d.ts +7 -0
  221. package/src/stdin-buffer.ts +300 -62
  222. package/src/terminal-capabilities.d.ts +16 -1
  223. package/src/terminal-capabilities.ts +66 -28
  224. package/src/terminal-multiplexer.d.ts +7 -0
  225. package/src/terminal-multiplexer.ts +14 -0
  226. package/src/terminal.d.ts +8 -4
  227. package/src/terminal.ts +190 -63
  228. package/src/theme/symbols.d.ts +1 -1
  229. package/src/theme/symbols.ts +1 -0
  230. package/src/theme/theme-class.ts +1 -0
  231. package/src/theme/theme.d.ts +11 -0
  232. package/src/theme/theme.ts +46 -14
  233. package/src/thinking.d.ts +5 -0
  234. package/src/thinking.ts +9 -1
  235. package/src/tmux.d.ts +39 -4
  236. package/src/tmux.ts +110 -16
  237. package/src/tools/ask.ts +20 -9
  238. package/src/tools/ast-edit.d.ts +2 -2
  239. package/src/tools/ast-edit.ts +30 -7
  240. package/src/tools/ast-grep.d.ts +2 -2
  241. package/src/tools/ast-grep.ts +39 -35
  242. package/src/tools/bash.d.ts +6 -1
  243. package/src/tools/bash.ts +15 -9
  244. package/src/tools/debug.ts +2 -1
  245. package/src/tools/default-renderer.ts +3 -2
  246. package/src/tools/edit.d.ts +2 -0
  247. package/src/tools/edit.ts +100 -21
  248. package/src/tools/eval.d.ts +53 -4
  249. package/src/tools/eval.ts +173 -137
  250. package/src/tools/find.d.ts +14 -4
  251. package/src/tools/find.ts +71 -18
  252. package/src/tools/glob.d.ts +3 -3
  253. package/src/tools/glob.ts +51 -17
  254. package/src/tools/grep.d.ts +2 -2
  255. package/src/tools/grep.ts +99 -22
  256. package/src/tools/grouped-file-output.d.ts +9 -4
  257. package/src/tools/grouped-file-output.ts +21 -6
  258. package/src/tools/lsp.ts +30 -18
  259. package/src/tools/mcp.ts +2 -2
  260. package/src/tools/native-view.d.ts +1 -1
  261. package/src/tools/native-view.ts +2 -2
  262. package/src/tools/read.d.ts +32 -10
  263. package/src/tools/read.ts +89 -43
  264. package/src/tools/renderer.d.ts +2 -0
  265. package/src/tools/renderer.ts +2 -0
  266. package/src/tools/task.d.ts +31 -0
  267. package/src/tools/task.ts +40 -7
  268. package/src/tools/todo.ts +3 -2
  269. package/src/tools/wait.ts +16 -30
  270. package/src/tools/web-search-types.d.ts +1 -0
  271. package/src/tools/web-search-types.ts +1 -0
  272. package/src/tools/web-search.ts +2 -1
  273. package/src/tools/write.d.ts +2 -0
  274. package/src/tools/write.ts +36 -12
  275. package/src/tools/yield.ts +2 -2
  276. package/src/tui.d.ts +20 -3
  277. package/src/tui.ts +160 -43
  278. package/src/utils.ts +5 -3
  279. package/dist/types/tools/eval-format/code-mode-declarations.d.ts +0 -5
  280. package/src/tools/eval-format/code-mode-declarations.ts +0 -61
@@ -4,7 +4,7 @@ import type { Component } from "../tui.js";
4
4
  import type { SgrMouseEvent } from "../mouse.js";
5
5
  import { type ConfiguredThinkingLevel } from "../thinking.js";
6
6
  import { type ThemeColor } from "../theme/theme.js";
7
- import type { TspPickerColumn, TspPickerGroup, TspPickerItem } from "@linxiraos/pi-wire";
7
+ import type { TspPickerColumn, TspPickerGroup, TspPickerItem, TspPickerMark } from "@linxiraos/pi-wire";
8
8
  import type { NativeChild, NativeNode, NativeUiEvent } from "../native/node.js";
9
9
  /** Canonical display ordering of built-in model roles. */
10
10
  export type ModelRole = "default" | "smol" | "slow" | "vision" | "plan" | "commit" | "tiny" | "memory" | "task" | "advisor" | "image" | "web" | "speech" | "dictation" | "judge";
@@ -198,6 +198,11 @@ export declare function rankModelItems(query: string, items: ReadonlyArray<Model
198
198
  export declare function formatRoleChip(role: string, assignment: RoleAssignment, settings: ModelBrowserSource): string;
199
199
  /** Fact columns of a model picker (Stencil `NATIVE_REDESIGN.md` §4.7); the lowest priority hides first. */
200
200
  export declare const MODEL_PICKER_COLUMNS: readonly TspPickerColumn[];
201
+ /**
202
+ * A provider's picker mark: the terminal's logo for it, else its initials
203
+ * (`amazon-bedrock` → `AB`, `anthropic` → `An`) on its own gradient.
204
+ */
205
+ export declare function providerMark(providerId: string): TspPickerMark;
201
206
  /** The omp theme token of a thinking level's dot (`thinkingHigh`); none for inherit and auto. */
202
207
  export declare function thinkingDotToken(level: ConfiguredThinkingLevel): string | undefined;
203
208
  /**
@@ -57,6 +57,8 @@ export interface ModelPickerOptions {
57
57
  taskModeKeys?: readonly KeyId[];
58
58
  /** `provider/id` highlighted and preselected in task mode (current Task subagent model). */
59
59
  taskSelector?: string;
60
+ /** Present selection-only chrome; consumers handle the chosen selector without mutating a session. */
61
+ selectOnly?: boolean;
60
62
  }
61
63
  /** Rows the browser renders around its list window (search + blank, blank + two detail rows). */
62
64
  export declare const BROWSER_FRAME_ROWS = 5;
@@ -41,6 +41,11 @@ export declare class PauseScreenComponent implements Component, OverlayFocusOwne
41
41
  readonly anchor: "center";
42
42
  readonly head: "Paused";
43
43
  };
44
+ /**
45
+ * The sheet: a hero (the pause glyph beside the live hold clock and the
46
+ * session it holds), what the hold means as four facts, and a footer that
47
+ * reassures and resumes. The resume keys live in the button's tooltip.
48
+ */
44
49
  describe(): NativeNode;
45
50
  /** Resume runs what Esc/Enter/Space run. */
46
51
  handleNativeEvent(event: NativeUiEvent): void;
@@ -86,6 +86,10 @@ export declare class PlanReviewOverlay implements Component {
86
86
  * reset scroll/focus so the operator starts at the top. Does not emit
87
87
  * `onPlanEdited` (the editor round-trip already persisted the file). */
88
88
  setPlanContent(planContent: string): void;
89
+ /** Synchronize an external tier pick with the displayed slider before committing. */
90
+ setSliderIndex(index: number): void;
91
+ /** Commit an external answer through the same input-locking path as Enter; false when nothing was committed. */
92
+ selectOption(label: string): boolean;
89
93
  handleInput(keyData: string): void;
90
94
  /** The native sheet: large glass, titled by the plan's own title heading (the body never repeats it). */
91
95
  get nativeOverlay(): NonNullable<Component["nativeOverlay"]>;
@@ -55,7 +55,11 @@ export declare class ReportPanel extends OverlayPanel {
55
55
  render(width: number): readonly string[];
56
56
  /** Text mode: rows the whole box takes at `width` when nothing caps it. */
57
57
  heightAt(width: number): number;
58
- /** The sheet body (the overlay is the frame, and its body the scroller): the report, then Close (Esc). */
58
+ /**
59
+ * The sheet body (the overlay is the frame, and its body the scroller): the
60
+ * report as `zeta.report.body`, which the terminal sets on the reading
61
+ * measure, then Close (Esc) as the sheet's footer.
62
+ */
59
63
  describe(): NativeNode;
60
64
  invalidate(): void;
61
65
  /**
@@ -1,6 +1,6 @@
1
1
  import type { UsageResetCreditDetail } from "@linxiraos/pi-ai";
2
2
  import { OverlayPanel } from "../chrome/overlay-box.js";
3
- import type { NativeNode, NativeUiEvent } from "../native/node.js";
3
+ import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
4
4
  /** One account row with its redeemable rate-limit reset credits. */
5
5
  export interface ResetUsageAccount {
6
6
  label: string;
@@ -33,11 +33,13 @@ export declare class ResetUsageSelectorComponent extends OverlayPanel {
33
33
  #private;
34
34
  constructor(accounts: ResetUsageAccount[], onSelect: (account: ResetUsageAccount) => void, onCancel: () => void);
35
35
  handleInput(keyData: string): void;
36
- describe(): NativeNode;
36
+ describe(cx: DescribeContext): NativeNode;
37
37
  /**
38
- * A click (or double-click) on an account highlights it and presses Enter:
39
- * moving to another account drops a pending confirmation, so spending a
40
- * reset still takes a second activation of the same account.
38
+ * Picker: a row click selects, a double-click or `Spend reset` presses
39
+ * Enter (so spending still takes a second activation, on the confirm
40
+ * strip), the strip's `Keep` drops the confirmation and `Close` cancels.
41
+ * Card list: a click (or double-click) on an account highlights it and
42
+ * presses Enter.
41
43
  */
42
44
  handleNativeEvent(event: NativeUiEvent): void;
43
45
  }
@@ -1,5 +1,6 @@
1
1
  import { type SgrMouseEvent } from "../index.js";
2
2
  import { OverlayPanel } from "../chrome/overlay-box.js";
3
+ import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
3
4
  /** Stored account identity rendered and matched by the session account picker. */
4
5
  export interface SessionPinAccount {
5
6
  position: number;
@@ -17,6 +18,9 @@ export interface SessionPinAccount {
17
18
  export declare class SessionAccountSelectorComponent extends OverlayPanel {
18
19
  #private;
19
20
  constructor(providerName: string, accounts: readonly SessionPinAccount[], onSelect: (account: SessionPinAccount) => void, onCancel: () => void);
21
+ describe(cx: DescribeContext): NativeNode | null;
22
+ /** Picker pointer events drive the list exactly as its keys do. */
23
+ handleNativeEvent(event: NativeUiEvent): void;
20
24
  /** Forward keyboard navigation and cancellation when the wrapper owns focus. */
21
25
  handleInput(keyData: string): void;
22
26
  /** Route mouse selection through the title rows into the account list. */
@@ -24,9 +24,13 @@ export declare class SessionInfoOverlay implements Component {
24
24
  setIgnoreTight(ignore: boolean): this;
25
25
  dispose(): void;
26
26
  /**
27
- * The sheet body (the overlay is the frame): the session id in mono
28
- * (click copies), each report heading as a section of key/value rows, a
29
- * context meter after the leading block, and a Close button (Esc).
27
+ * The sheet body (the overlay is the frame), in three tiers: who the session
28
+ * is (the id and file as copyable mono fields), how full its context window
29
+ * is (a meter under a right-aligned figure), then the report's sections as
30
+ * headed groups. Groups of plain counts (Messages, Tokens, Cost) share a
31
+ * two-column stats grid with right-aligned figures and their Total set off
32
+ * last; the rest (Provider, servers) are key/value rows. A Close button (Esc)
33
+ * ends it.
30
34
  */
31
35
  describe(cx: DescribeContext): NativeNode;
32
36
  /** The Close button runs Esc's path. */
@@ -127,6 +127,8 @@ export interface SessionSelectorOptions<T extends SessionSelectorEntry = Session
127
127
  allSessions?: T[];
128
128
  /** Picker heading; defaults to "Resume Session". */
129
129
  title?: string;
130
+ /** Primary action label; defaults to "Resume" (ANSI footer defaults to "select"). */
131
+ actionLabel?: string;
130
132
  /** Fixed scope label, or false to omit the scope suffix. */
131
133
  scopeLabel?: string | false;
132
134
  /**
@@ -152,7 +154,7 @@ export interface SessionSelectorOptions<T extends SessionSelectorEntry = Session
152
154
  /** Path of the live session, or a getter so detach/newSession stays accurate. */
153
155
  currentSessionPath?: string | (() => string | undefined);
154
156
  /**
155
- * The picker is the whole program (`zeta-c --resume`): the native picker
157
+ * The picker is the whole program (`zetacode --resume`): the native picker
156
158
  * fills the screen surface (`size:"screen"`) instead of floating as a
157
159
  * sheet over the transcript.
158
160
  */
@@ -122,12 +122,12 @@ export declare class UsageDashboardComponent implements Component {
122
122
  dispose(): void;
123
123
  render(width: number): readonly string[];
124
124
  /**
125
- * The sheet body (the terminal's `lg` overlay is the frame): a head row
126
- * (checked ago, Overview/Details tabs, Refresh), then either the provider
127
- * grid of frames with window meters and the activity heatmap, or the
128
- * per-provider detail tables, then Close like the other report sheets.
129
- * `meter`/`chart` fall back to `progress`/`table` on terminals without
130
- * them. Rebuilt only when its inputs change.
125
+ * The sheet body (the terminal's `lg` overlay is the frame): a toolbar
126
+ * (Overview/Details, freshness, Refresh), then either the overview — a
127
+ * strip of headline figures, the quota rows per provider, the activity
128
+ * calendar — or the per-provider detail tables, then Close like the other
129
+ * report sheets. `meter`/`chart` fall back to `progress`/`table` on
130
+ * terminals without them. Rebuilt only when its inputs change.
131
131
  */
132
132
  describe(cx: DescribeContext): NativeNode;
133
133
  /** Tab clicks switch views like Enter/Esc; the Refresh button runs `r`; Close closes from either view. */
@@ -14,6 +14,8 @@ export interface ComposerPreferences {
14
14
  readonly showHardwareCursor: boolean;
15
15
  readonly maxInlineImages: number;
16
16
  readonly resizeScrollback: ResizeScrollbackMode;
17
+ /** Send rows a growing HUD or dialog pushes off screen straight to scrollback instead of holding them back until it shrinks. */
18
+ readonly completeScrollback: boolean;
17
19
  readonly imeSafeCursor: boolean;
18
20
  readonly autocompleteMaxVisible: number;
19
21
  readonly spellingTypoDetection: boolean;
@@ -50,18 +52,8 @@ export interface ComposerOptions {
50
52
  readonly exit?: (code: number) => void;
51
53
  readonly now?: () => number;
52
54
  }
53
- /** How {@link Composer.setRuntimeChildren} bills below-transcript roots against transcript retirement. */
55
+ /** How {@link Composer.setRuntimeChildren} lays out the roots below the transcript. */
54
56
  export interface RuntimeChildrenOptions {
55
- /**
56
- * Below-transcript roots whose growth is momentary (inline dialogs, a tall
57
- * multi-line editor). They are billed at their smallest height so expansion
58
- * clips the live tail instead of retiring rows a later shrink could not
59
- * reclaim (#11007). Every other root is billed at its current height, so
60
- * settled rows it displaces retire to native scrollback. Decision panels
61
- * declaring `retireDisplacedTranscript` opt out of this floor even when
62
- * mounted as a child of a transient editor container.
63
- */
64
- readonly transient?: readonly Component[];
65
57
  /**
66
58
  * Dock order on a TSP terminal (no status strip; the composer carries its
67
59
  * facts): the native dock stacks HUD pills, the working row and queued messages over
@@ -69,6 +61,20 @@ export interface RuntimeChildrenOptions {
69
61
  * to the roots below the transcript in render order.
70
62
  */
71
63
  readonly nativeDock?: readonly Component[];
64
+ /**
65
+ * Below-transcript roots the user opens and closes (the editor surface that
66
+ * drafts and dialogs swap into, docked reports). Their rows never become
67
+ * part of the post-run chrome floor, so collapsing them refills the screen.
68
+ */
69
+ readonly transientChrome?: readonly Component[];
70
+ /**
71
+ * Transient roots that clear themselves (todo and subagent HUDs, progress).
72
+ * Their first paint can be their tallest, e.g. a restored todo list on a
73
+ * resumed session, so unlike {@link transientChrome} it is never treated as
74
+ * their resting height: all of their rows stay out of the floor. Roots listed
75
+ * here are transient and need not also appear in `transientChrome`.
76
+ */
77
+ readonly selfClearingChrome?: readonly Component[];
72
78
  }
73
79
  /** Controls the first terminal paint for a composer that does not already own the terminal. */
74
80
  export interface ComposerStartOptions {
@@ -123,15 +129,6 @@ export declare class Composer implements TerminalFrameProvider, NativeSurfacePro
123
129
  * the screen rows left above them; `undefined` before `root` was laid out.
124
130
  */
125
131
  rowsBelow(root: Component): number | undefined;
126
- /**
127
- * Keep the input on the bottom row while the live rows cannot fill the
128
- * screen, as after an inline decision panel closes. A tall block that just
129
- * left the chrome above the editor (a command report) may have scrolled
130
- * rows into native history that cannot be pulled back; without the pin the
131
- * editor would jump up to where the shorter frame now ends. The pin lifts
132
- * once live rows fill the screen again.
133
- */
134
- pinInputToBottom(): void;
135
132
  /** Compose the bounded mutable viewport and the next ordered history append. */
136
133
  renderFrame(viewport: ViewportSize): TerminalFramePlan;
137
134
  /**
@@ -176,6 +173,12 @@ export declare class Composer implements TerminalFrameProvider, NativeSurfacePro
176
173
  setPreferences(update: Partial<ComposerPreferences>): void;
177
174
  /** Patch welcome data in place as version, session, and project discovery complete. */
178
175
  updateWelcome(update: ComposerWelcomeUpdate): void;
176
+ /**
177
+ * Mark whether a host agent run is in flight. Mid-run gaps with no streaming
178
+ * block (tool arguments not yet parseable, between tool calls) then do not
179
+ * count as the run ending when the post-run chrome floor is decided.
180
+ */
181
+ setRunActive(active: boolean): void;
179
182
  /** Replace optional header content around the stable welcome scene. */
180
183
  setHeaderExtras(before: readonly Component[], after: readonly Component[]): void;
181
184
  /** Update the canonical editor reference after InteractiveMode remounts a custom editor. */
@@ -24,6 +24,8 @@ export interface ComposerNativeState {
24
24
  readonly rate?: number;
25
25
  /** A turn is running: the send keycap becomes a Stop button. */
26
26
  readonly running: boolean;
27
+ /** Native dictation control; undefined hides it for hosts without speech-to-text. */
28
+ readonly dictation?: "idle" | "starting" | "recording" | "transcribing";
27
29
  /** The viewed subagent's lineage, outermost first and the viewed agent last; undefined on the main session. */
28
30
  readonly viewing?: readonly string[];
29
31
  /** The session's title, quoted in italics as the TSP placeholder; undefined until it has one. */
@@ -196,6 +198,8 @@ export declare class CustomEditor extends Editor {
196
198
  * item markers use the accent color so separate follow-ups remain visible while composing.
197
199
  * Called once per layout segment, so whole-buffer inputs are computed once per text revision. */
198
200
  decorateText: (text: string, context: EditorTextDecorationContext) => string;
201
+ /** Catch the typed word up with the caret first: its leaving the word (or a blur) re-describes the typo marks. */
202
+ describe(cx: DescribeContext): NativeNode;
199
203
  /**
200
204
  * TSP decorations: magic keywords shimmer (terminal-clocked) in the accent
201
205
  * color, chips and markers take their token colors, misspellings are marked,
@@ -220,7 +224,8 @@ export declare class CustomEditor extends Editor {
220
224
  * once after construction (and again after `setEditorComponent` swaps the
221
225
  * editor). Passing `undefined` clears any pending frame. */
222
226
  setShimmerRepaintHandler(handler: (() => void) | undefined): void;
223
- /** Editing is available during bootstrap; atomic sends wait until submission is wired and enabled. */
227
+ /** Editing is available during bootstrap; atomic sends wait until submission is wired and enabled
228
+ * and no dictation is still writing into the draft. */
224
229
  protected get nativeSendable(): boolean;
225
230
  /** Viewing a subagent, the draft goes to it: the placeholder names it; else the session's title, quoted in italics. */
226
231
  describePlaceholder: () => TspText;
@@ -238,17 +243,17 @@ export declare class CustomEditor extends Editor {
238
243
  * subagent is focused, the attachment chips, a `line` row of the
239
244
  * shell-mode chip and the input, and the `bar`: model chip, effort chip
240
245
  * (or the effort glyph as the model chip's icon), the generation rate,
241
- * the other status facts, usage, then send (Stop while a turn runs).
242
- * Clicks come back as `status.model`, `thinking.cycle`, `submit`,
243
- * `interrupt` and `focus:<id>` actions.
246
+ * the other status facts, usage, dictation, then send (Stop while a turn runs).
247
+ * Clicks come back as `status.model`, `thinking.cycle`, `dictation.toggle`,
248
+ * `submit`, `interrupt` and `focus:<id>` actions.
244
249
  */
245
250
  describeLayout: (input: NativeNode, cx: DescribeContext) => NativeEditorLayout;
246
251
  /**
247
- * Clicks on the composer's controls take the same paths as their keys: ⇧⇥,
248
- * ⏎ and Esc; the viewing header's links (`focus:<id>`) go to the host,
249
- * the status facts' clicks (`status.*`) to their source. Selection edits
250
- * go to the buffer; `send` submits its own prompt after saving the old draft
251
- * for recall and waiting for in-flight clipboard work.
252
+ * Dictation clicks go directly to the host, independent of keybindings.
253
+ * Other controls take the same paths as their keys; the viewing header's
254
+ * links (`focus:<id>`) go to the host, the status facts' clicks to their source.
255
+ * Selection edits go to the buffer; `send` submits its own prompt after
256
+ * saving the old draft for recall and waiting for in-flight clipboard work.
252
257
  */
253
258
  handleNativeEvent(event: NativeUiEvent): void;
254
259
  onEscape?: () => void;
@@ -275,6 +280,8 @@ export declare class CustomEditor extends Editor {
275
280
  onRetry?: () => void;
276
281
  /** Called when Caps Lock is pressed. */
277
282
  onCapsLock?: () => void;
283
+ /** Called directly by the native microphone/stop control, without synthesizing a keypress. */
284
+ onToggleDictation?: () => void;
278
285
  /** Called when left-arrow is pressed while the editor is empty (cursor necessarily at start). */
279
286
  onLeftAtStart?: () => void;
280
287
  /** Called when the viewing header asks to view agent `id` ({@link MAIN_AGENT_ID}: the main session). */
@@ -296,6 +303,8 @@ export declare class CustomEditor extends Editor {
296
303
  * Clear all custom key handlers.
297
304
  */
298
305
  clearCustomKeyHandlers(): void;
306
+ /** True while a clipboard-image or image-path paste is still landing; later keys queue behind it. */
307
+ get pasteInFlight(): boolean;
299
308
  capturesInput(data: string): boolean;
300
309
  handleInput(data: string): void;
301
310
  /**
@@ -305,7 +314,8 @@ export declare class CustomEditor extends Editor {
305
314
  * an Ask dialog opened over a non-empty prompt — so finishing or submitting
306
315
  * the draft cannot fire an editor-slot shortcut that clears
307
316
  * `editorContainer` and orphans the overlay. Only text editing, cursor
308
- * movement, submission, and the clear action reach the buffer.
317
+ * movement, submission, the clear action, and pastes (clipboard images and
318
+ * image paths attach as on the composer) reach the buffer.
309
319
  */
310
320
  handleDraftEdit(data: string): void;
311
321
  }
@@ -1,4 +1,5 @@
1
1
  import type { ImageContent } from "@linxiraos/pi-ai";
2
+ import type { TspSpan } from "@linxiraos/pi-wire";
2
3
  /** Materialized image destination returned by the host blob writer. */
3
4
  interface ImageBlobResult {
4
5
  displayPath: string;
@@ -23,4 +24,25 @@ type ImageBlobWriterSync = (data: Buffer, options?: {
23
24
  export declare function imageReferenceHyperlink(label: string, index: number, imageLinks: readonly (string | undefined)[] | undefined, renderLabel: (text: string) => string): string;
24
25
  export declare function materializeImageReferenceLinks(images: readonly ImageContent[] | undefined, putBlob: ImageBlobWriter): Promise<(string | undefined)[] | undefined>;
25
26
  export declare function materializeImageReferenceLinksSync(images: readonly ImageContent[] | undefined, putBlob: ImageBlobWriterSync): (string | undefined)[] | undefined;
27
+ /**
28
+ * Register the host's blob writer that backs links for images without a file of their
29
+ * own. Returns a disposer that unregisters it unless another writer replaced it since.
30
+ */
31
+ export declare function setImageBlobWriter(next: ImageBlobWriterSync): () => void;
32
+ /**
33
+ * Whether transcript images carry links under the current `tui.hyperlinks` policy: a
34
+ * native surface honours only an explicit `off`, text mode the resolved OSC 8 support.
35
+ * Renderers caching a linked image key their cache on it.
36
+ */
37
+ export declare function imageLinksEnabled(): boolean;
38
+ /**
39
+ * The file a transcript image opens: `sourcePath` when it was read from one, else a
40
+ * blob copy of its bytes written through the host. Undefined when links are disabled
41
+ * or no file exists, so a disabled policy never writes blobs.
42
+ */
43
+ export declare function transcriptImageLink(image: Pick<ImageContent, "data" | "mimeType">, sourcePath?: string): string | undefined;
44
+ /** `text` (an image's placeholder) as an OSC 8 link to the image's file; plain when hyperlinks are off or no file exists. */
45
+ export declare function linkedImageText(text: string, image: Pick<ImageContent, "data" | "mimeType">, sourcePath?: string): string;
46
+ /** Native counterpart of {@link linkedImageText}: a span linking to the image's file when one exists. */
47
+ export declare function linkedImageSpan(text: string, image: Pick<ImageContent, "data" | "mimeType">, sourcePath: string | undefined, s?: string): TspSpan;
26
48
  export {};
@@ -31,6 +31,7 @@ export interface InternalUrlCallerContext {
31
31
  cwd?: string;
32
32
  sessionFile?: string;
33
33
  sessionId?: string;
34
+ seanceSourceArtifactsDir?: string;
34
35
  }
35
36
  /**
36
37
  * Suggestions for the internal-url token ending at the cursor, or `null` when
@@ -30,7 +30,8 @@ export declare class MacOSSpellingProvider implements EditorTextAssistProvider {
30
30
  decorateTypos(text: string, context: SpellingDecorationContext, decorate?: (span: string) => string): string;
31
31
  /**
32
32
  * Misspelled prose ranges in `text` (offsets into it), in order and
33
- * non-overlapping. Schedules the verification check for uncached text; its
33
+ * non-overlapping, except ones touching `context.typing` (the word still
34
+ * being typed). Schedules the verification check for uncached text; its
34
35
  * result arrives through {@link onUpdate}.
35
36
  */
36
37
  typoRanges(text: string, context: SpellingDecorationContext): readonly native.SpellingRange[];
@@ -1,9 +1,12 @@
1
+ import type { TypingWord } from "./typing-word.js";
1
2
  /** Logical source location for one rendered editor segment. */
2
3
  export interface SpellingDecorationContext {
3
4
  editorText: string;
4
5
  lines: readonly string[];
5
6
  line: number;
6
7
  startCol: number;
8
+ /** The word being typed: typo marks touching it wait until the caret leaves it. */
9
+ typing?: TypingWord | undefined;
7
10
  }
8
11
  /**
9
12
  * Whether `text[start, end)` is a prose word: unmasked by {@link maskNonProse},
@@ -10,7 +10,7 @@ export interface QueuedMessageGroup {
10
10
  * Messages queued while the agent works, above the editor. ANSI: a heading
11
11
  * per group, numbered dim rows and the dequeue hint. Natively (§8.1): a
12
12
  * stack of pills, each `corner-down-right` · the text · `⌥↑ Edit`, the total
13
- * count in the first pill when more than one waits; the edit control sends
13
+ * (`N queued`, not a position) in the first pill when more than one waits; the edit control sends
14
14
  * `queue.edit`, answered like the dequeue key.
15
15
  */
16
16
  export declare class QueuedMessagesBand extends Container {
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The word being typed in the composer. Misspelling marks hold off on it until
3
+ * the caret leaves it (a space or punctuation, a caret move, losing focus), the
4
+ * way Slack and Chromium mark a typo only once its word is done; marks on other
5
+ * words stay while typing.
6
+ */
7
+ /** A word of one logical line, as UTF-16 columns `[start, end)`. */
8
+ export interface TypingWord {
9
+ line: number;
10
+ start: number;
11
+ end: number;
12
+ }
13
+ /** Follows an editor's text revision and caret to know which word is being typed. */
14
+ export declare class TypingWordTracker {
15
+ #private;
16
+ /** The word being typed, if any. */
17
+ get word(): TypingWord | undefined;
18
+ /**
19
+ * Catch up with the editor: an edit that leaves the caret in (or right after)
20
+ * a word starts typing it; a caret move out of that word, or losing focus,
21
+ * ends it. The first call only records the revision, so a restored draft is
22
+ * not held. Returns whether the held word changed.
23
+ */
24
+ update(revision: number, lines: readonly string[], line: number, col: number, focused: boolean): boolean;
25
+ }
@@ -1,5 +1,19 @@
1
1
  import type { DescribeContext, NativeNode } from "../native/node.js";
2
2
  import type { Component } from "../tui.js";
3
+ /** Catalogue keys (`tip${line}`) of every tips.txt line, in file order. The
4
+ * host needs them to gate a tip by the product feature it advertises. */
5
+ export declare const TIP_CATALOGUE_KEYS: readonly string[];
6
+ /**
7
+ * Host-installable tip gate: receives the tip's catalogue key and its raw
8
+ * tips.txt line; returning false removes it from the splash pool.
9
+ */
10
+ export type TuiTipFilter = (key: string, raw: string) => boolean;
11
+ /**
12
+ * Install the host's tip gate (pass `undefined` to reset). Consulted for every
13
+ * candidate on every pick, so no roll can surface a rejected tip — used when a
14
+ * feature a tip advertises is switched off by configuration.
15
+ */
16
+ export declare function setTuiTipFilter(filter: TuiTipFilter | undefined): void;
3
17
  /** Pick a tip from `tips`, biased toward "[NEW]" tips by {@link NEW_TIP_WEIGHT};
4
18
  * `r` is a uniform sample in [0, 1). Returns "" when `tips` is empty.
5
19
  * Exported for tests. */
@@ -13,10 +27,11 @@ export declare function pickWeightedTip(tips: readonly string[], r: number): str
13
27
  */
14
28
  export declare function renderWelcomeTip(tip: string, width: number, phase?: number, isNew?: boolean): string[];
15
29
  /**
16
- * The session's welcome banner. In a terminal: the gradient logo beside the
17
- * `zeta` wordmark with the version under it (the logo alone when the lockup does
30
+ * The session's welcome banner. In a terminal: the gradient mark beside the
31
+ * `Zeta` wordmark, with the version under the wordmark and the `Linxira-Zeta`
32
+ * identity subline centered below the pair (the mark alone when the lockup does
18
33
  * not fit) and the tip of the session (dropped below {@link TIP_MIN_COLUMNS}
19
- * columns). Natively: a card with the same logo, wordmark, version and tip
34
+ * columns). Natively: a card with the same mark, wordmark, version and tip
20
35
  * ({@link WelcomeComponent.describe}).
21
36
  */
22
37
  export declare class WelcomeComponent implements Component {
@@ -28,7 +43,8 @@ export declare class WelcomeComponent implements Component {
28
43
  /**
29
44
  * A `card` (`zeta.welcome`) mirroring the terminal banner: the lockup
30
45
  * (`zeta.welcome.lockup`: the terminal's builtin `zeta` mark, which it animates,
31
- * beside the wordmark with the version under it) and the tip of the session.
46
+ * beside the `Zeta` wordmark with the version and the `Linxira-Zeta`
47
+ * subline under it) and the tip of the session.
32
48
  * Roles carry the look (gradient logo, type scale); a "[NEW]" tip
33
49
  * carries a terminal-clocked shimmering tag.
34
50
  */
@@ -53,9 +69,13 @@ export declare class WelcomeComponent implements Component {
53
69
  setVersion(version: string): void;
54
70
  render(termWidth: number): readonly string[];
55
71
  }
56
- /** Block-grid brand mark shared by the welcome and setup surfaces. */
72
+ /** Brand mark: FIGlet `ANSI Shadow` render of `Z` (generated). */
57
73
  export declare const ZETA_LOGO: string[];
58
- /** The block-grid brand mark as accent lines; `shimmer` declares the terminal-clocked shine sweep. */
74
+ /** Primary product name: FIGlet `ANSI Shadow` render of `Zeta` (generated). */
75
+ export declare const ZETA_WORDMARK: string[];
76
+ /** Secondary identity line: FIGlet `mini` render of `Linxira-Zeta` (generated). */
77
+ export declare const ZETA_SUBLINE: string[];
78
+ /** The generated brand mark as accent lines; `shimmer` declares the terminal-clocked shine sweep. */
59
79
  export declare function logoNode(lines: readonly string[], shimmer: boolean): NativeNode;
60
80
  export interface ShineConfig {
61
81
  /** Overall opacity of the shine overlay, in [0, 1]. */
@@ -0,0 +1,7 @@
1
+ import type { Theme } from "../theme/theme.js";
2
+ /** Wrap content under a distinct first-row prefix, preserving its column on continuation rows. */
3
+ export declare function wrapPrefixedLine(prefix: string, continuationPrefix: string, content: string, width: number): string[];
4
+ /** Preserve a tree connector's ancestor guides while hanging a long node beneath its label. */
5
+ export declare function wrapTreeLine(line: string, width: number, theme: Theme): string[] | undefined;
6
+ /** Hang a tree row beneath its connector, or a connector-less detail row beneath its guide rails. */
7
+ export declare function wrapGuidedLine(line: string, width: number, theme: Theme): string[];
@@ -70,6 +70,8 @@ export declare function urlHyperlinkAlways(url: string, displayText: string): st
70
70
  * Non-HTTP(S) or unparsable URLs yield a plain span.
71
71
  */
72
72
  export declare function urlLinkSpan(target: string, displayText: string, s?: string): TspSpan;
73
+ /** Whether native link spans and nodes may carry an `href`: everything but an explicit `off` policy. */
74
+ export declare function isNativeLinkEnabled(): boolean;
73
75
  /**
74
76
  * A native link span to a filesystem path as a plain `file://` URI (the
75
77
  * terminal opens it through the system; the location stays in the visible
@@ -105,14 +105,22 @@ export declare function cappedHeadLines(lines: readonly string[], max: number):
105
105
  };
106
106
  /** Get the first nonblank preview lines, trimmed and width-capped. */
107
107
  export declare function getPreviewLines(text: string, maxLines: number, maxLineLen: number, ellipsis?: Ellipsis): string[];
108
+ /** Collapse a possibly multi-line string into one line; whitespace runs (tabs included) become one space. */
109
+ export declare function flattenLine(text: string): string;
108
110
  /**
109
111
  * Collapse a possibly multi-line string into a single line, then truncate it to
110
112
  * `maxWidth` display cells. {@link truncateToWidth} alone caps width but
111
113
  * newlines are zero-width, so multi-line content (markdown briefs, tool args,
112
114
  * provider errors) would otherwise spill a single status row across several
113
- * visual lines. Whitespace runs collapse to one space, so tabs are handled too.
115
+ * visual lines.
114
116
  */
115
117
  export declare function previewLine(text: string, maxWidth: number, ellipsis?: Ellipsis): string;
118
+ /**
119
+ * Clip a result row to `maxWidth` only while collapsed. Expanded rows stay whole
120
+ * so the frame wraps them: the expand key ({@link formatExpandHint}) must reveal
121
+ * text, not re-clip it.
122
+ */
123
+ export declare function clipCollapsed(text: string, maxWidth: number, expanded: boolean | undefined): string;
116
124
  /**
117
125
  * Extract domain from URL, stripping www. prefix.
118
126
  */
@@ -32,7 +32,7 @@ export interface RenderCache {
32
32
  lines: string[];
33
33
  }
34
34
  /** Build indentation and continuing branches for ancestor levels. */
35
- export declare function buildTreePrefix(ancestors: boolean[], theme: Theme): string;
35
+ export declare function buildTreePrefix(ancestors: readonly boolean[], theme: Theme): string;
36
36
  /** Return the branch glyph for a final or continuing tree item. */
37
37
  export declare function getTreeBranch(isLast: boolean, theme: Theme): string;
38
38
  /** Return the continuation prefix for subsequent lines of a tree item. */
@@ -3,11 +3,12 @@ export declare const SETUP_SPLASH_MS = 2600;
3
3
  export declare const SETUP_TICK_MS = 33;
4
4
  export declare function renderStarfield(width: number, height: number, frame: number): string[];
5
5
  /**
6
- * Animated setup splash, in the spirit of the Zeta visual identity: the brand ζ
7
- * mark rendered with the live diagonal gradient + shine sweep, rising out of a
8
- * rippling, gradient-lit water surface, under a faint twinkling starfield. The
9
- * mark and water share one continuous gradient so the sweep reads across the
10
- * whole scene; the water surface drifts each frame.
6
+ * Animated setup splash, in the spirit of the Zeta visual identity: the brand
7
+ * mark — the FIGlet-rendered Latin `Z`, the ASCII form of `Ζ` — with the live
8
+ * diagonal gradient + shine sweep, rising out of a rippling, gradient-lit water
9
+ * surface, under a faint twinkling starfield. The mark and water share one
10
+ * continuous gradient so the sweep reads across the whole scene; the water
11
+ * surface drifts each frame.
11
12
  */
12
13
  export declare function renderSetupSplash(width: number, height: number, elapsedMs: number): string[];
13
14
  /**
@@ -98,6 +98,7 @@ export interface CompactionBoundaries {
98
98
  export declare function computeCompactionBoundaries(compactionSettings: CompactionSettings, contextWindow: number, speculationLeadTokens?: number): CompactionBoundaries | null;
99
99
  /** Stable inputs used to cache non-message token estimates. */
100
100
  export interface NonMessageTokenSource {
101
+ readonly model?: Model;
101
102
  readonly systemPrompt?: readonly string[];
102
103
  readonly agent?: {
103
104
  readonly state?: {
@@ -137,6 +138,8 @@ export declare function invalidateToolSchemaMetadata(tools: ToolSchemaSource): v
137
138
  * {@link invalidateToolSchemaMetadata} when those inputs change.
138
139
  */
139
140
  export declare function estimateToolSchemaTokens(tools: ToolSchemaSource, tokenizer: Tokenizer, sourceRevision?: number): number;
141
+ /** Count schemas carried on every request, excluding server-side deferred catalogs. */
142
+ export declare function estimateContextToolSchemaTokens(tools: ToolSchemaSource, tokenizer: Tokenizer, model: Model | undefined, sourceRevision?: number): number;
140
143
  export declare function computeNonMessageTokens(session: NonMessageTokenSource, tokenizer: Tokenizer, sourceRevision?: number): number;
141
144
  /**
142
145
  * Shared helper for the four non-message token totals used by
@@ -155,7 +158,7 @@ export declare function computeNonMessageBreakdown(session: NonMessageTokenSourc
155
158
  * session and model.
156
159
  */
157
160
  export declare function computeContextBreakdown(session: ContextUsageSession, options: ContextUsageOptions): ContextBreakdown;
158
- /** The `/context` title: the model and its window once a model is selected. */
161
+ /** The `/context` title: the model once one is selected (the body leads with its window). */
159
162
  export declare function contextUsageHead(breakdown: ContextBreakdown): TspText;
160
163
  /**
161
164
  * Native context-usage panel for terminals without `meter`: the cell grid as
@@ -97,11 +97,13 @@ export interface FooterSession {
97
97
  autoResolvedThinkingLevel(): string | undefined;
98
98
  getContextUsage: StatusLineSession["getContextUsage"];
99
99
  modelRegistry: Pick<StatusLineSession["modelRegistry"], "isUsingOAuth">;
100
+ /**
101
+ * Cumulative session rollup. Unlike the active-window stats it spans every
102
+ * entry in the session, so compaction does not reset the counters, and it
103
+ * folds in usage carried by completed `task` tool results.
104
+ */
100
105
  sessionManager: {
101
- getEntries(): readonly {
102
- type: string;
103
- message?: AgentMessage;
104
- }[];
106
+ getUsageStatistics: StatusLineSession["sessionManager"]["getUsageStatistics"];
105
107
  };
106
108
  }
107
109
  /**