@oh-my-pi/pi-tui 18.4.3 → 18.4.4

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 (447) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/types/apps/cleanse-board.d.ts +17 -0
  3. package/dist/types/apps/git/help.d.ts +16 -0
  4. package/dist/types/apps/git/sidebar.d.ts +18 -0
  5. package/dist/types/apps/live-visualizer.d.ts +10 -0
  6. package/dist/types/apps/ps-top.d.ts +15 -0
  7. package/dist/types/apps/standalone-picker.d.ts +3 -0
  8. package/dist/types/autocomplete.d.ts +8 -0
  9. package/dist/types/chat/advisor-message.d.ts +12 -2
  10. package/dist/types/chat/assistant-message.d.ts +20 -0
  11. package/dist/types/chat/bash-execution.d.ts +9 -0
  12. package/dist/types/chat/chat-transcript-builder.d.ts +6 -1
  13. package/dist/types/chat/collab-prompt-message.d.ts +4 -0
  14. package/dist/types/chat/compaction-summary-message.d.ts +15 -0
  15. package/dist/types/chat/eval-execution.d.ts +8 -0
  16. package/dist/types/chat/execution-shared.d.ts +58 -0
  17. package/dist/types/chat/late-diagnostics-message.d.ts +15 -1
  18. package/dist/types/chat/read-tool-group.d.ts +15 -0
  19. package/dist/types/chat/skill-message.d.ts +9 -0
  20. package/dist/types/chat/stripped-tool-calls-placeholder.d.ts +3 -0
  21. package/dist/types/chat/todo-reminder.d.ts +4 -1
  22. package/dist/types/chat/tool-execution.d.ts +25 -1
  23. package/dist/types/chat/transcript-actions.d.ts +37 -0
  24. package/dist/types/chat/transcript-entry.d.ts +3 -1
  25. package/dist/types/chat/user-message.d.ts +25 -0
  26. package/dist/types/chrome/collab-qrcode.d.ts +7 -0
  27. package/dist/types/chrome/context-thresholds.d.ts +11 -0
  28. package/dist/types/chrome/countdown-timer.d.ts +9 -3
  29. package/dist/types/chrome/diff.d.ts +12 -0
  30. package/dist/types/chrome/dynamic-border.d.ts +3 -0
  31. package/dist/types/chrome/format.d.ts +6 -0
  32. package/dist/types/chrome/message-divider.d.ts +13 -0
  33. package/dist/types/chrome/message-frame.d.ts +10 -0
  34. package/dist/types/chrome/message-notice.d.ts +23 -0
  35. package/dist/types/chrome/overlay-box.d.ts +11 -2
  36. package/dist/types/chrome/qrcode.d.ts +7 -0
  37. package/dist/types/chrome/segment-track.d.ts +7 -0
  38. package/dist/types/chrome/selector-helpers.d.ts +0 -6
  39. package/dist/types/chrome/status-notice.d.ts +14 -0
  40. package/dist/types/chrome/streaming-panel.d.ts +3 -0
  41. package/dist/types/chrome/tool-activity.d.ts +3 -0
  42. package/dist/types/chrome/transcript-container.d.ts +13 -0
  43. package/dist/types/chrome/transcript-status.d.ts +15 -3
  44. package/dist/types/components/box.d.ts +7 -0
  45. package/dist/types/components/disclosure.d.ts +9 -0
  46. package/dist/types/components/editor.d.ts +37 -0
  47. package/dist/types/components/form.d.ts +14 -0
  48. package/dist/types/components/image.d.ts +7 -0
  49. package/dist/types/components/input.d.ts +20 -1
  50. package/dist/types/components/key-value-list.d.ts +3 -0
  51. package/dist/types/components/layout/geometry.d.ts +16 -0
  52. package/dist/types/components/layout/row.d.ts +7 -0
  53. package/dist/types/components/layout/split-pane.d.ts +8 -0
  54. package/dist/types/components/layout/stack.d.ts +6 -0
  55. package/dist/types/components/loader.d.ts +48 -0
  56. package/dist/types/components/markdown.d.ts +8 -0
  57. package/dist/types/components/metric.d.ts +7 -0
  58. package/dist/types/components/progress-bar.d.ts +3 -0
  59. package/dist/types/components/scroll-view.d.ts +6 -0
  60. package/dist/types/components/section.d.ts +3 -0
  61. package/dist/types/components/select-list.d.ts +33 -0
  62. package/dist/types/components/settings-list.d.ts +68 -0
  63. package/dist/types/components/spacer.d.ts +4 -0
  64. package/dist/types/components/tab-bar.d.ts +9 -0
  65. package/dist/types/components/table.d.ts +7 -0
  66. package/dist/types/components/text.d.ts +6 -0
  67. package/dist/types/components/tree-view.d.ts +9 -0
  68. package/dist/types/components/truncated-text.d.ts +3 -0
  69. package/dist/types/components/wizard-step.d.ts +6 -0
  70. package/dist/types/hotkeys-markdown.d.ts +24 -0
  71. package/dist/types/index.d.ts +5 -0
  72. package/dist/types/latex-block.d.ts +7 -0
  73. package/dist/types/native/apply.d.ts +39 -0
  74. package/dist/types/native/backend.d.ts +94 -0
  75. package/dist/types/native/blobs.d.ts +29 -0
  76. package/dist/types/native/describe.d.ts +56 -0
  77. package/dist/types/native/encode.d.ts +50 -0
  78. package/dist/types/native/icons.d.ts +18 -0
  79. package/dist/types/native/memo.d.ts +27 -0
  80. package/dist/types/native/node.d.ts +107 -0
  81. package/dist/types/native/overlay.d.ts +64 -0
  82. package/dist/types/native/picker.d.ts +124 -0
  83. package/dist/types/native/reconcile.d.ts +41 -0
  84. package/dist/types/native/settle.d.ts +11 -0
  85. package/dist/types/native/spans.d.ts +21 -0
  86. package/dist/types/native/state.d.ts +6 -0
  87. package/dist/types/native/tone.d.ts +24 -0
  88. package/dist/types/overlays/advisor-config.d.ts +20 -0
  89. package/dist/types/overlays/agent-hub-renderer.d.ts +27 -11
  90. package/dist/types/overlays/agent-hub.d.ts +10 -0
  91. package/dist/types/overlays/agent-transcript-viewer.d.ts +7 -0
  92. package/dist/types/overlays/agents-hub.d.ts +8 -0
  93. package/dist/types/overlays/annotation-overlay.d.ts +3 -0
  94. package/dist/types/overlays/ask-dialog.d.ts +23 -0
  95. package/dist/types/overlays/bordered-loader.d.ts +3 -0
  96. package/dist/types/overlays/btw-history-panel.d.ts +9 -0
  97. package/dist/types/overlays/btw-panel.d.ts +3 -0
  98. package/dist/types/overlays/cleanse-panel.d.ts +5 -2
  99. package/dist/types/overlays/composer-shape-preview.d.ts +7 -1
  100. package/dist/types/overlays/copy-selector.d.ts +38 -0
  101. package/dist/types/overlays/error-banner.d.ts +9 -0
  102. package/dist/types/overlays/extensions/extension-list.d.ts +1 -0
  103. package/dist/types/overlays/history-search.d.ts +18 -0
  104. package/dist/types/overlays/hook-editor.d.ts +28 -1
  105. package/dist/types/overlays/hook-input.d.ts +3 -0
  106. package/dist/types/overlays/hook-selector.d.ts +10 -0
  107. package/dist/types/overlays/hub-frame.d.ts +18 -0
  108. package/dist/types/overlays/jobs-panel.d.ts +24 -0
  109. package/dist/types/overlays/login-dialog.d.ts +10 -0
  110. package/dist/types/overlays/logout-account-selector.d.ts +4 -0
  111. package/dist/types/overlays/mcp-add-wizard.d.ts +4 -0
  112. package/dist/types/overlays/model-browser.d.ts +69 -0
  113. package/dist/types/overlays/model-hub.d.ts +7 -0
  114. package/dist/types/overlays/model-picker.d.ts +7 -0
  115. package/dist/types/overlays/move-overlay.d.ts +3 -0
  116. package/dist/types/overlays/oauth-selector.d.ts +4 -0
  117. package/dist/types/overlays/omfg-panel.d.ts +3 -0
  118. package/dist/types/overlays/pause-screen.d.ts +12 -0
  119. package/dist/types/overlays/plan-review-overlay.d.ts +5 -0
  120. package/dist/types/overlays/plan-save-overlay.d.ts +10 -0
  121. package/dist/types/overlays/plugin-selector.d.ts +4 -0
  122. package/dist/types/overlays/plugin-settings.d.ts +30 -0
  123. package/dist/types/overlays/queue-mode-selector.d.ts +4 -0
  124. package/dist/types/overlays/reset-usage-selector.d.ts +8 -0
  125. package/dist/types/overlays/rewind-selector.d.ts +5 -0
  126. package/dist/types/overlays/session-info-overlay.d.ts +19 -1
  127. package/dist/types/overlays/session-selector.d.ts +64 -1
  128. package/dist/types/overlays/settings-defs.d.ts +14 -0
  129. package/dist/types/overlays/settings-selector.d.ts +21 -0
  130. package/dist/types/overlays/show-images-selector.d.ts +4 -0
  131. package/dist/types/overlays/snapcompact-shape-preview.d.ts +2 -0
  132. package/dist/types/overlays/stats-notice.d.ts +8 -0
  133. package/dist/types/overlays/theme-selector.d.ts +11 -0
  134. package/dist/types/overlays/thinking-selector.d.ts +4 -0
  135. package/dist/types/overlays/tree-selector.d.ts +60 -2
  136. package/dist/types/overlays/usage-dashboard.d.ts +26 -3
  137. package/dist/types/overlays/usage-row.d.ts +36 -2
  138. package/dist/types/prompt/attachment-chips.d.ts +8 -0
  139. package/dist/types/prompt/composer-attachments.d.ts +15 -3
  140. package/dist/types/prompt/composer.d.ts +18 -1
  141. package/dist/types/prompt/custom-editor.d.ts +48 -2
  142. package/dist/types/prompt/editor-top-gap.d.ts +2 -0
  143. package/dist/types/prompt/macos-spelling.d.ts +6 -0
  144. package/dist/types/prompt/magic-keywords.d.ts +9 -0
  145. package/dist/types/prompt/queued-messages.d.ts +23 -0
  146. package/dist/types/prompt/skill-tokens.d.ts +4 -2
  147. package/dist/types/prompt/welcome.d.ts +16 -0
  148. package/dist/types/render/code-cell.d.ts +10 -0
  149. package/dist/types/render/file-list.d.ts +8 -0
  150. package/dist/types/render/hyperlink.d.ts +14 -0
  151. package/dist/types/render/output-block.d.ts +43 -0
  152. package/dist/types/render/output-pane.d.ts +17 -0
  153. package/dist/types/render/tool-card.d.ts +8 -0
  154. package/dist/types/render/tree-list.d.ts +8 -0
  155. package/dist/types/render/width-aware-text.d.ts +7 -0
  156. package/dist/types/setup/scenes/outro.d.ts +7 -0
  157. package/dist/types/setup/scenes/sign-in.d.ts +7 -0
  158. package/dist/types/setup/scenes/splash.d.ts +8 -0
  159. package/dist/types/setup/scenes/types.d.ts +6 -1
  160. package/dist/types/setup/wizard-overlay.d.ts +9 -0
  161. package/dist/types/status-line/component.d.ts +49 -5
  162. package/dist/types/status-line/context-usage.d.ts +20 -0
  163. package/dist/types/status-line/footer.d.ts +8 -0
  164. package/dist/types/status-line/metrics.d.ts +1 -2
  165. package/dist/types/status-line/segments.d.ts +10 -1
  166. package/dist/types/status-line/types.d.ts +40 -1
  167. package/dist/types/terminal-capabilities.d.ts +1 -1
  168. package/dist/types/terminal.d.ts +27 -0
  169. package/dist/types/theme/defaults/index.d.ts +100 -0
  170. package/dist/types/theme/schema.d.ts +2 -0
  171. package/dist/types/theme/shimmer.d.ts +8 -0
  172. package/dist/types/theme/theme-class.d.ts +2 -0
  173. package/dist/types/theme/theme.d.ts +33 -1
  174. package/dist/types/tools/ask.d.ts +3 -0
  175. package/dist/types/tools/ast-edit.d.ts +10 -1
  176. package/dist/types/tools/ast-grep.d.ts +10 -1
  177. package/dist/types/tools/autoresearch.d.ts +21 -4
  178. package/dist/types/tools/bash.d.ts +30 -1
  179. package/dist/types/tools/cfg-render.d.ts +5 -1
  180. package/dist/types/tools/debug.d.ts +3 -1
  181. package/dist/types/tools/default-renderer.d.ts +6 -1
  182. package/dist/types/tools/edit.d.ts +14 -1
  183. package/dist/types/tools/eval.d.ts +12 -1
  184. package/dist/types/tools/fetch.d.ts +16 -1
  185. package/dist/types/tools/find.d.ts +15 -1
  186. package/dist/types/tools/github.d.ts +3 -0
  187. package/dist/types/tools/glob.d.ts +14 -1
  188. package/dist/types/tools/goal.d.ts +3 -1
  189. package/dist/types/tools/grep.d.ts +14 -1
  190. package/dist/types/tools/grouped-file-output.d.ts +58 -0
  191. package/dist/types/tools/json-tree.d.ts +20 -0
  192. package/dist/types/tools/lsp.d.ts +3 -10
  193. package/dist/types/tools/mcp.d.ts +16 -1
  194. package/dist/types/tools/memory.d.ts +26 -0
  195. package/dist/types/tools/native-view.d.ts +90 -0
  196. package/dist/types/tools/proc-render.d.ts +7 -1
  197. package/dist/types/tools/read.d.ts +23 -1
  198. package/dist/types/tools/renderer.d.ts +57 -0
  199. package/dist/types/tools/report-tool-issue.d.ts +3 -0
  200. package/dist/types/tools/resolve.d.ts +14 -1
  201. package/dist/types/tools/task.d.ts +3 -0
  202. package/dist/types/tools/think.d.ts +3 -0
  203. package/dist/types/tools/todo.d.ts +12 -0
  204. package/dist/types/tools/vibe.d.ts +3 -1
  205. package/dist/types/tools/wait.d.ts +3 -0
  206. package/dist/types/tools/web-search.d.ts +8 -0
  207. package/dist/types/tools/write.d.ts +14 -1
  208. package/dist/types/tools/xdev.d.ts +13 -0
  209. package/dist/types/tui.d.ts +49 -0
  210. package/package.json +9 -9
  211. package/src/apps/autoresearch-dashboard.ts +362 -4
  212. package/src/apps/cleanse-board.ts +219 -1
  213. package/src/apps/cleanse-picker.ts +9 -1
  214. package/src/apps/debug/log-viewer.ts +15 -15
  215. package/src/apps/debug/protocol-probe.ts +2 -20
  216. package/src/apps/git/avatar.ts +2 -22
  217. package/src/apps/git/git-tui.ts +406 -59
  218. package/src/apps/git/help.ts +130 -0
  219. package/src/apps/git/sidebar.ts +491 -0
  220. package/src/apps/live-visualizer.ts +65 -0
  221. package/src/apps/ps-top.ts +448 -17
  222. package/src/apps/session-picker.ts +1 -0
  223. package/src/apps/setup-model-picker.ts +5 -1
  224. package/src/apps/standalone-picker.ts +55 -1
  225. package/src/autocomplete.ts +44 -1
  226. package/src/chat/advisor-message.ts +72 -3
  227. package/src/chat/assistant-message.ts +346 -11
  228. package/src/chat/background-tan-message.ts +4 -4
  229. package/src/chat/bash-execution.ts +81 -0
  230. package/src/chat/cache-invalidation-marker.ts +8 -0
  231. package/src/chat/chat-transcript-builder.ts +37 -6
  232. package/src/chat/collab-prompt-message.ts +15 -3
  233. package/src/chat/compaction-summary-message.ts +74 -1
  234. package/src/chat/custom-message.ts +3 -1
  235. package/src/chat/eval-execution.ts +57 -0
  236. package/src/chat/execution-shared.ts +153 -1
  237. package/src/chat/hook-message.ts +1 -0
  238. package/src/chat/late-diagnostics-message.ts +85 -2
  239. package/src/chat/read-tool-group.ts +341 -1
  240. package/src/chat/served-model-marker.ts +8 -0
  241. package/src/chat/skill-message.ts +63 -0
  242. package/src/chat/stripped-tool-calls-placeholder.ts +18 -10
  243. package/src/chat/todo-reminder.ts +34 -4
  244. package/src/chat/tool-execution.ts +385 -10
  245. package/src/chat/transcript-actions.ts +38 -0
  246. package/src/chat/transcript-browser.ts +2 -9
  247. package/src/chat/transcript-entry.ts +10 -1
  248. package/src/chat/transcript-render-helpers.ts +16 -15
  249. package/src/chat/ttsr-notification.ts +38 -1
  250. package/src/chat/user-message.ts +167 -4
  251. package/src/chrome/collab-qrcode.ts +27 -2
  252. package/src/chrome/context-thresholds.ts +34 -0
  253. package/src/chrome/countdown-timer.ts +24 -1
  254. package/src/chrome/diff.ts +60 -1
  255. package/src/chrome/dynamic-border.ts +7 -0
  256. package/src/chrome/format.ts +12 -0
  257. package/src/chrome/message-divider.ts +33 -1
  258. package/src/chrome/message-frame.ts +53 -10
  259. package/src/chrome/message-notice.ts +71 -0
  260. package/src/chrome/overlay-box.ts +45 -2
  261. package/src/chrome/qrcode.ts +28 -0
  262. package/src/chrome/segment-track.ts +26 -0
  263. package/src/chrome/selector-helpers.ts +1 -17
  264. package/src/chrome/status-notice.ts +46 -0
  265. package/src/chrome/streaming-panel.ts +25 -1
  266. package/src/chrome/tool-activity.ts +20 -0
  267. package/src/chrome/transcript-container.ts +37 -0
  268. package/src/chrome/transcript-status.ts +40 -11
  269. package/src/components/box.ts +51 -0
  270. package/src/components/disclosure.ts +33 -0
  271. package/src/components/editor.ts +216 -27
  272. package/src/components/form.ts +93 -9
  273. package/src/components/image.ts +30 -0
  274. package/src/components/input.ts +77 -26
  275. package/src/components/key-value-list.ts +18 -0
  276. package/src/components/layout/geometry.ts +44 -0
  277. package/src/components/layout/row.ts +30 -0
  278. package/src/components/layout/split-pane.ts +65 -0
  279. package/src/components/layout/stack.ts +27 -0
  280. package/src/components/loader.ts +183 -1
  281. package/src/components/markdown.ts +21 -0
  282. package/src/components/metric.ts +39 -0
  283. package/src/components/progress-bar.ts +28 -0
  284. package/src/components/scroll-view.ts +23 -0
  285. package/src/components/section.ts +16 -0
  286. package/src/components/select-list.ts +174 -25
  287. package/src/components/settings-list.ts +264 -7
  288. package/src/components/spacer.ts +17 -0
  289. package/src/components/tab-bar.ts +42 -0
  290. package/src/components/table.ts +34 -0
  291. package/src/components/text.ts +23 -0
  292. package/src/components/tree-view.ts +65 -0
  293. package/src/components/truncated-text.ts +14 -0
  294. package/src/components/wizard-step.ts +18 -9
  295. package/src/debug-server.ts +14 -7
  296. package/src/hotkeys-markdown.ts +251 -69
  297. package/src/index.ts +6 -0
  298. package/src/latex-block.ts +11 -0
  299. package/src/native/apply.ts +275 -0
  300. package/src/native/backend.ts +682 -0
  301. package/src/native/blobs.ts +70 -0
  302. package/src/native/describe.ts +124 -0
  303. package/src/native/encode.ts +233 -0
  304. package/src/native/icons.ts +184 -0
  305. package/src/native/memo.ts +64 -0
  306. package/src/native/node.ts +112 -0
  307. package/src/native/overlay.ts +131 -0
  308. package/src/native/picker.ts +333 -0
  309. package/src/native/reconcile.ts +1063 -0
  310. package/src/native/settle.ts +23 -0
  311. package/src/native/spans.ts +308 -0
  312. package/src/native/state.ts +28 -0
  313. package/src/native/tone.ts +79 -0
  314. package/src/overlays/advisor-config.ts +420 -0
  315. package/src/overlays/agent-hub-renderer.ts +155 -18
  316. package/src/overlays/agent-hub.ts +1037 -44
  317. package/src/overlays/agent-transcript-viewer.ts +129 -0
  318. package/src/overlays/agents-hub.ts +688 -53
  319. package/src/overlays/annotation-overlay.ts +391 -52
  320. package/src/overlays/ask-dialog.ts +435 -24
  321. package/src/overlays/bordered-loader.ts +17 -0
  322. package/src/overlays/btw-history-panel.ts +182 -0
  323. package/src/overlays/btw-panel.ts +68 -2
  324. package/src/overlays/cleanse-panel.ts +105 -15
  325. package/src/overlays/codex-reset-fireworks.ts +65 -5
  326. package/src/overlays/composer-shape-preview.ts +26 -1
  327. package/src/overlays/copy-selector.ts +545 -23
  328. package/src/overlays/error-banner.ts +44 -0
  329. package/src/overlays/extensions/extension-list.ts +23 -17
  330. package/src/overlays/history-search.ts +175 -33
  331. package/src/overlays/hook-editor.ts +113 -6
  332. package/src/overlays/hook-input.ts +22 -1
  333. package/src/overlays/hook-selector.ts +311 -22
  334. package/src/overlays/hub-frame.ts +80 -0
  335. package/src/overlays/jobs-panel.ts +112 -0
  336. package/src/overlays/login-dialog.ts +183 -1
  337. package/src/overlays/logout-account-selector.ts +102 -4
  338. package/src/overlays/mcp-add-wizard.ts +232 -53
  339. package/src/overlays/model-browser.ts +681 -22
  340. package/src/overlays/model-hub.ts +1402 -78
  341. package/src/overlays/model-picker.ts +175 -1
  342. package/src/overlays/move-overlay.ts +45 -0
  343. package/src/overlays/oauth-selector.ts +227 -23
  344. package/src/overlays/omfg-panel.ts +86 -2
  345. package/src/overlays/pause-screen.ts +55 -4
  346. package/src/overlays/plan-review-overlay.ts +352 -0
  347. package/src/overlays/plan-save-overlay.ts +45 -0
  348. package/src/overlays/plugin-selector.ts +21 -1
  349. package/src/overlays/plugin-settings.ts +195 -5
  350. package/src/overlays/queue-mode-selector.ts +19 -1
  351. package/src/overlays/reset-usage-selector.ts +110 -40
  352. package/src/overlays/rewind-selector.ts +458 -44
  353. package/src/overlays/session-account-selector.ts +1 -1
  354. package/src/overlays/session-info-overlay.ts +137 -1
  355. package/src/overlays/session-selector.ts +807 -46
  356. package/src/overlays/settings-defs.ts +41 -0
  357. package/src/overlays/settings-selector.ts +583 -23
  358. package/src/overlays/show-images-selector.ts +18 -1
  359. package/src/overlays/snapcompact-shape-preview.ts +48 -3
  360. package/src/overlays/stats-notice.ts +31 -0
  361. package/src/overlays/theme-selector.ts +31 -1
  362. package/src/overlays/thinking-selector.ts +22 -1
  363. package/src/overlays/tree-selector.ts +570 -110
  364. package/src/overlays/usage-dashboard.ts +587 -12
  365. package/src/overlays/usage-row.ts +161 -25
  366. package/src/prompt/attachment-chips.ts +60 -0
  367. package/src/prompt/composer-attachments.ts +31 -9
  368. package/src/prompt/composer.ts +55 -2
  369. package/src/prompt/custom-editor.ts +302 -4
  370. package/src/prompt/editor-top-gap.ts +8 -0
  371. package/src/prompt/macos-spelling.ts +24 -9
  372. package/src/prompt/magic-keywords.ts +22 -1
  373. package/src/prompt/model-mention-autocomplete.ts +1 -0
  374. package/src/prompt/queued-messages.ts +101 -0
  375. package/src/prompt/skill-tokens.ts +5 -3
  376. package/src/prompt/welcome.ts +213 -6
  377. package/src/render/code-cell.ts +103 -2
  378. package/src/render/file-list.ts +29 -0
  379. package/src/render/hyperlink.ts +32 -0
  380. package/src/render/output-block.ts +110 -0
  381. package/src/render/output-pane.ts +37 -0
  382. package/src/render/tool-card.ts +137 -0
  383. package/src/render/tree-list.ts +39 -0
  384. package/src/render/width-aware-text.ts +20 -0
  385. package/src/setup/scenes/composer.ts +29 -0
  386. package/src/setup/scenes/glyph.ts +15 -0
  387. package/src/setup/scenes/model.ts +36 -8
  388. package/src/setup/scenes/outro.ts +28 -1
  389. package/src/setup/scenes/sign-in.ts +122 -13
  390. package/src/setup/scenes/splash.ts +28 -1
  391. package/src/setup/scenes/theme.ts +88 -3
  392. package/src/setup/scenes/types.ts +7 -1
  393. package/src/setup/startup-splash.ts +46 -9
  394. package/src/setup/wizard-overlay.ts +140 -23
  395. package/src/status-line/component.ts +398 -16
  396. package/src/status-line/context-usage.ts +279 -50
  397. package/src/status-line/footer.ts +94 -1
  398. package/src/status-line/metrics.ts +3 -6
  399. package/src/status-line/segments.ts +463 -97
  400. package/src/status-line/separators.ts +3 -16
  401. package/src/status-line/types.ts +43 -1
  402. package/src/terminal-capabilities.ts +7 -0
  403. package/src/terminal.ts +130 -2
  404. package/src/theme/defaults/dark-neon-noir.json +100 -0
  405. package/src/theme/defaults/index.ts +2 -0
  406. package/src/theme/defaults/light-prism.json +5 -5
  407. package/src/theme/defaults/onyx.json +62 -62
  408. package/src/theme/schema.ts +15 -0
  409. package/src/theme/shimmer.ts +33 -0
  410. package/src/theme/theme-class.ts +24 -19
  411. package/src/theme/theme.ts +111 -9
  412. package/src/tools/ask.ts +157 -1
  413. package/src/tools/ast-edit.ts +174 -1
  414. package/src/tools/ast-grep.ts +82 -2
  415. package/src/tools/autoresearch.ts +149 -1
  416. package/src/tools/bash.ts +180 -49
  417. package/src/tools/cfg-render.ts +66 -1
  418. package/src/tools/debug.ts +78 -1
  419. package/src/tools/default-renderer.ts +35 -1
  420. package/src/tools/edit.ts +247 -2
  421. package/src/tools/eval.ts +257 -1
  422. package/src/tools/fetch.ts +102 -3
  423. package/src/tools/find.ts +127 -1
  424. package/src/tools/github.ts +119 -10
  425. package/src/tools/glob.ts +116 -1
  426. package/src/tools/goal.ts +56 -1
  427. package/src/tools/grep.ts +83 -2
  428. package/src/tools/grouped-file-output.ts +205 -0
  429. package/src/tools/json-tree.ts +116 -1
  430. package/src/tools/lsp.ts +318 -1
  431. package/src/tools/mcp.ts +80 -1
  432. package/src/tools/memory.ts +93 -11
  433. package/src/tools/native-view.ts +292 -0
  434. package/src/tools/proc-render.ts +221 -1
  435. package/src/tools/read.ts +199 -4
  436. package/src/tools/renderer.ts +61 -0
  437. package/src/tools/report-tool-issue.ts +7 -1
  438. package/src/tools/resolve.ts +63 -1
  439. package/src/tools/task.ts +406 -4
  440. package/src/tools/think.ts +19 -1
  441. package/src/tools/todo.ts +89 -0
  442. package/src/tools/vibe.ts +230 -2
  443. package/src/tools/wait.ts +181 -1
  444. package/src/tools/web-search.ts +113 -1
  445. package/src/tools/write.ts +144 -5
  446. package/src/tools/xdev.ts +64 -1
  447. package/src/tui.ts +294 -3
@@ -1,10 +1,21 @@
1
1
  import { type AutocompleteProvider } from "../autocomplete.js";
2
+ import type { TspEditorDecoration, TspTone } from "@oh-my-pi/pi-wire";
3
+ import type { DescribeContext, NativeChild, NativeNode } from "../native/node.js";
2
4
  import type { SymbolTheme } from "../symbols.js";
3
5
  import { type Component, type Focusable } from "../tui.js";
4
6
  import { type VimMode } from "../vim.js";
5
7
  import { type EditorBorderStyle, type EditorTopBorder } from "./composer/index.js";
6
8
  export type { EditorBorderStyle, EditorTopBorder };
7
9
  import { type SelectListTheme } from "./select-list.js";
10
+ /** The TSP root an {@link Editor.describeLayout} hook builds around the `editor` node. */
11
+ export interface NativeEditorLayout {
12
+ readonly role: string;
13
+ /** Tone of the root (`pending` while a turn runs). */
14
+ readonly tone?: TspTone;
15
+ readonly children: readonly NativeChild[];
16
+ /** Keypath of the `editor` node inside the root (the autocomplete's caret anchor). */
17
+ readonly caret: string;
18
+ }
8
19
  export interface EditorTheme {
9
20
  borderColor: (str: string) => string;
10
21
  /** Stable accent for composer chrome that should not follow the mutable border state. */
@@ -79,6 +90,23 @@ export declare class Editor implements Component, Focusable {
79
90
  * Width-changing output is allowed on lines without the cursor; it is truncated
80
91
  * to the content width rather than reflowed. Cursor glyphs and inline hints are excluded. */
81
92
  decorateText: ((text: string, context: EditorTextDecorationContext) => string) | undefined;
93
+ /**
94
+ * TSP counterpart of {@link decorateText}: styled ranges over the buffer
95
+ * (UTF-16 offsets into the lines joined by `\n`). Called only when the text
96
+ * changed or the editor was invalidated since the last description.
97
+ */
98
+ describeDecorations: ((lines: readonly string[]) => readonly TspEditorDecoration[]) | undefined;
99
+ /** TSP code language of the buffer (`python`, `bash`): the terminal highlights it in the mono face. */
100
+ describeLanguage: (() => string | undefined) | undefined;
101
+ /**
102
+ * TSP chrome around the `editor` node (the prompt composer's chips, mode
103
+ * chip, send/stop): the root role, the children with `input` placed where
104
+ * the layout wants it, and the input's keypath for the caret-anchored
105
+ * autocomplete. Unset: a plain `omp.editor` column over the input.
106
+ */
107
+ describeLayout: ((input: NativeNode, cx: DescribeContext) => NativeEditorLayout) | undefined;
108
+ /** TSP placeholder for the empty buffer; natively it replaces the rotating ANSI {@link placeholder} hints. */
109
+ nativePlaceholder: string | undefined;
82
110
  /** Called with the selected text when Visual mode yanks, so hosts can reach the system
83
111
  * clipboard — `packages/tui` deliberately has no clipboard dependency of its own. */
84
112
  onYank?: (text: string) => void;
@@ -203,6 +231,15 @@ export declare class Editor implements Component, Focusable {
203
231
  restoreHistoryState(restore?: () => void): void;
204
232
  invalidate(): void;
205
233
  render(width: number): readonly string[];
234
+ /**
235
+ * An `editor` node (key `input`) carrying the buffer, caret, Vim selection
236
+ * anchor and mode, decorations, ghost completion, placeholder, prompt and
237
+ * height cap; the frame, wrapping, scrolling and caret are the terminal's,
238
+ * so composer shapes play no part. An open autocomplete popup follows as an
239
+ * `overlay` anchored to the caret around the completion list. Typing and
240
+ * caret moves change only `text` and `cursor` on the same node.
241
+ */
242
+ describe(cx: DescribeContext): NativeNode;
206
243
  handleInput(data: string): void;
207
244
  getText(): string;
208
245
  /** Host-registered atomic chip labels mapped to their submit-time expansions. */
@@ -1,4 +1,6 @@
1
1
  import type { MouseRoutable, SgrMouseEvent } from "../mouse.js";
2
+ import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
3
+ import { type SelectPickerOptions } from "../native/picker.js";
2
4
  import { type Component, type Focusable } from "../tui.js";
3
5
  import { Input } from "./input.js";
4
6
  import { type SelectItem, SelectList, type SelectListTheme } from "./select-list.js";
@@ -39,6 +41,8 @@ export declare class FormField implements Component, Focusable, MouseRoutable {
39
41
  #private;
40
42
  readonly control: FormControl;
41
43
  constructor(control: FormControl, options: FormFieldOptions);
44
+ /** Label, description, details, preview, the control, error, summary, hint and footer as one column. */
45
+ describe(_cx: DescribeContext): NativeNode;
42
46
  get focused(): boolean;
43
47
  get debugChildren(): readonly Component[];
44
48
  set focused(value: boolean);
@@ -95,13 +99,21 @@ export interface SelectFormFieldOptions extends Omit<FormFieldOptions, "preview"
95
99
  onCancel(): void;
96
100
  /** Schedule a frame after an asynchronous preview update settles. */
97
101
  requestRender?: () => void;
102
+ /** The picker sheet a long choice (> {@link PICKER_MIN_ITEMS} items) describes as; defaults to the label. */
103
+ picker?: SelectPickerOptions;
98
104
  }
99
105
  /** SelectList field that centralizes selection, cancellation, preview refresh, and mouse routing. */
100
106
  export declare class SelectFormField extends FormField {
101
107
  #private;
102
108
  readonly selectList: SelectList;
109
+ /** Number of choices (before filtering). */
110
+ readonly itemCount: number;
103
111
  constructor(options: SelectFormFieldOptions);
104
112
  invalidate(): void;
113
+ /** Long choices describe as a picker sheet where supported; the host places it (layer or prefs editor). */
114
+ describe(cx: DescribeContext): NativeNode;
115
+ /** Picker pointer events drive the list as its keys do (preview, pick, cancel). */
116
+ handleNativeEvent(event: NativeUiEvent): void;
105
117
  }
106
118
  /** Options for focus and input dispatch across several composable fields. */
107
119
  export interface FormOptions {
@@ -116,6 +128,8 @@ export interface FormOptions {
116
128
  export declare class Form implements Component, Focusable, MouseRoutable {
117
129
  #private;
118
130
  constructor(options: FormOptions);
131
+ /** The fields as one column; focus traversal stays keyboard-driven. */
132
+ describe(_cx: DescribeContext): NativeNode;
119
133
  get focused(): boolean;
120
134
  get debugChildren(): readonly Component[];
121
135
  set focused(value: boolean);
@@ -1,4 +1,5 @@
1
1
  import { type ImageDimensions } from "../terminal-capabilities.js";
2
+ import type { DescribeContext, NativeNode } from "../native/node.js";
2
3
  import type { Component } from "../tui.js";
3
4
  export interface ImageTheme {
4
5
  fallbackColor: (str: string) => string;
@@ -203,5 +204,11 @@ export declare class Image implements Component {
203
204
  /** Return source metadata without exposing the encoded image buffer. */
204
205
  debugState(): Record<string, unknown>;
205
206
  invalidate(): void;
207
+ /**
208
+ * A native `image` backed by a content-addressed blob; the terminal fits
209
+ * it. Cell caps become `ch`/`lines` bounds. The inline-image budget and
210
+ * graphics protocols do not apply.
211
+ */
212
+ describe(_cx: DescribeContext): NativeNode;
206
213
  render(width: number): readonly string[];
207
214
  }
@@ -1,3 +1,4 @@
1
+ import type { DescribeContext, NativeNode } from "../native/node.js";
1
2
  import { SpaceHoldGesture } from "../space-hold.js";
2
3
  import { type Component, type Focusable } from "../tui.js";
3
4
  /**
@@ -9,6 +10,8 @@ export declare class Input implements Component, Focusable {
9
10
  prompt: string;
10
11
  /** Render the editable value as bullets while retaining the real value internally. */
11
12
  mask: boolean;
13
+ /** Dim hint a native terminal shows while the value is empty. */
14
+ placeholder: string | undefined;
12
15
  onSubmit?: (value: string) => void;
13
16
  onEscape?: () => void;
14
17
  /** Space-bar push-to-talk; set its `handler` to enable it. */
@@ -18,12 +21,21 @@ export declare class Input implements Component, Focusable {
18
21
  /** Focusable interface - set by TUI when focus changes */
19
22
  focused: boolean;
20
23
  getValue(): string;
24
+ /** The caret as a UTF-16 offset into {@link getValue}. */
25
+ getCursor(): number;
21
26
  /** Return bounded input content and cursor state for debug inspection. */
22
27
  debugState(): Record<string, unknown>;
23
28
  setValue(value: string): void;
24
29
  setUseTerminalCursor(useTerminalCursor: boolean): void;
25
30
  getUseTerminalCursor(): boolean;
26
- handleInput(data: string): void;
31
+ /**
32
+ * Apply one key: the editor's text bindings (motion, deletion, kill ring,
33
+ * undo), pastes and printable text. Returns whether the key was the
34
+ * field's: false for keys it has no binding for, and for cancel/submit
35
+ * without an `onEscape`/`onSubmit`, so a host (a list's search field) can
36
+ * route everything else on.
37
+ */
38
+ handleInput(data: string): boolean;
27
39
  /** Apply terminal paste semantics to text from non-bracketed paste transports
28
40
  * (e.g. kitty's OSC 5522 enhanced clipboard read). Mirrors `Editor.pasteText`. */
29
41
  pasteText(text: string): void;
@@ -39,5 +51,12 @@ export declare class Input implements Component, Focusable {
39
51
  /** Drop any volatile preview, then insert `text` as a single undoable edit. */
40
52
  commitVolatileText(text: string): void;
41
53
  invalidate(): void;
54
+ /**
55
+ * An `input` with the value, the caret as a UTF-16 offset and the prompt;
56
+ * the terminal draws the caret, scrolls horizontally and places the IME.
57
+ * A masked input sends one bullet per grapheme, with the caret mapped onto
58
+ * them, so the secret never leaves the process.
59
+ */
60
+ describe(_cx: DescribeContext): NativeNode;
42
61
  render(width: number): readonly string[];
43
62
  }
@@ -1,3 +1,4 @@
1
+ import type { DescribeContext, NativeNode } from "../native/node.js";
1
2
  import type { Component } from "../tui.js";
2
3
  /** One label/value entry in a {@link KeyValueList}. */
3
4
  export interface KeyValueRow {
@@ -20,5 +21,7 @@ export declare class KeyValueList implements Component {
20
21
  constructor(rows: readonly KeyValueRow[], options: KeyValueListOptions);
21
22
  setRows(rows: readonly KeyValueRow[]): boolean;
22
23
  invalidate(): void;
24
+ /** An aligned `kv` grid; label width and value wrapping are the terminal's. */
25
+ describe(_cx: DescribeContext): NativeNode;
23
26
  render(width: number): readonly string[];
24
27
  }
@@ -1,3 +1,4 @@
1
+ import type { TspProps, TspSpace } from "@oh-my-pi/pi-wire";
1
2
  import type { MouseRoutable } from "../../mouse.js";
2
3
  import type { Component } from "../../tui.js";
3
4
  /** Alignment within space allocated by a layout component. */
@@ -40,6 +41,21 @@ export interface LayoutAllocation {
40
41
  min?: number;
41
42
  max?: number;
42
43
  }
44
+ /**
45
+ * Describe child for layout content: components describe themselves; a lazy
46
+ * row renderer becomes a stable adapter component the native engine renders
47
+ * as a `rows` fallback (it can only produce width-bound rows).
48
+ */
49
+ export declare function nativeLayoutChild(content: LayoutContent): Component;
50
+ /** Spacing step standing in for a textual gap decoration (the terminal draws no divider glyphs). */
51
+ export declare function nativeLayoutGap(decoration: LayoutDecoration | undefined): TspSpace | undefined;
52
+ /** Flex props for one layout slot along `axis` (`w` for rows, `h` for stacks). */
53
+ export declare function nativeSlotProps(axis: "w" | "h", slot: {
54
+ fixed?: number;
55
+ grow?: number;
56
+ min?: number;
57
+ max?: number;
58
+ }): TspProps<"col">;
43
59
  /** Clamp an external size to a finite, non-negative integer cell count. */
44
60
  export declare function layoutSize(value: number | undefined, fallback?: number): number;
45
61
  /** Normalize an optional external size while preserving `undefined`. */
@@ -1,4 +1,5 @@
1
1
  import type { MouseRoutable, SgrMouseEvent } from "../../mouse.js";
2
+ import type { DescribeContext, NativeNode } from "../../native/node.js";
2
3
  import type { Component } from "../../tui.js";
3
4
  import { type LayoutAlignment, type LayoutContent, type LayoutDecoration, type LayoutInsets, type LayoutRect } from "./geometry.js";
4
5
  /** One child and its horizontal sizing and alignment constraints. */
@@ -48,6 +49,12 @@ export declare class Row implements Component, MouseRoutable {
48
49
  setIgnoreTight(ignore: boolean): this;
49
50
  invalidate(): void;
50
51
  dispose(): void;
52
+ /**
53
+ * A flex `row`: each child sits in a slot carrying its width bounds
54
+ * (fixed → min = max `ch`, else grow/min/max). Decorations become gap
55
+ * spacing; clipping and the exact row budget are the terminal's.
56
+ */
57
+ describe(_cx: DescribeContext): NativeNode;
51
58
  /** Translate a row-local point into a child's local coordinates. */
52
59
  locate(line: number, col: number): RowHit | undefined;
53
60
  routeMouse(event: SgrMouseEvent, line: number, col: number): void;
@@ -1,4 +1,5 @@
1
1
  import type { MouseRoutable, SgrMouseEvent } from "../../mouse.js";
2
+ import type { DescribeContext, NativeNode } from "../../native/node.js";
2
3
  import type { Component } from "../../tui.js";
3
4
  import { type LayoutAlignment, type LayoutContent, type LayoutDecoration, type LayoutRect } from "./geometry.js";
4
5
  /** Pane selected when a split collapses below its width constraints. */
@@ -70,6 +71,13 @@ export declare class SplitPane implements Component, MouseRoutable {
70
71
  setDecorations(prefix: LayoutDecoration | undefined, divider: LayoutDecoration | undefined, suffix: LayoutDecoration | undefined): void;
71
72
  /** Resolve split/narrow geometry without rendering either pane. */
72
73
  measure(width: number): SplitPaneGeometry;
74
+ /**
75
+ * Two flex slots in a `row`: the left pane fixed (`ch`) or a fraction of
76
+ * the width within its bounds, the right pane growing from its minimum.
77
+ * With a narrow pane configured the row may wrap, stacking the panes on
78
+ * narrow terminals instead of hiding one.
79
+ */
80
+ describe(_cx: DescribeContext): NativeNode;
73
81
  /** Translate a split-local point into pane-local coordinates. */
74
82
  locate(line: number, col: number): SplitPaneHit | undefined;
75
83
  routeMouse(event: SgrMouseEvent, line: number, col: number): void;
@@ -1,4 +1,5 @@
1
1
  import type { MouseRoutable, SgrMouseEvent } from "../../mouse.js";
2
+ import type { DescribeContext, NativeNode } from "../../native/node.js";
2
3
  import type { Component } from "../../tui.js";
3
4
  import { type LayoutAlignment, type LayoutContent, type LayoutInsets, type LayoutRect } from "./geometry.js";
4
5
  /** One child and its vertical row-budget constraints. */
@@ -43,6 +44,11 @@ export declare class Stack implements Component, MouseRoutable {
43
44
  setIgnoreTight(ignore: boolean): this;
44
45
  invalidate(): void;
45
46
  dispose(): void;
47
+ /**
48
+ * A `col` of slots carrying each child's height bounds (fixed → min = max
49
+ * `lines`, else grow/min/max); an exact stack height bounds the column.
50
+ */
51
+ describe(_cx: DescribeContext): NativeNode;
46
52
  /** Translate a stack-local point into a child's local coordinates. */
47
53
  locate(line: number, col: number): StackHit | undefined;
48
54
  routeMouse(event: SgrMouseEvent, line: number, col: number): void;
@@ -1,7 +1,40 @@
1
+ import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
2
+ import { type ShimmerPalette } from "../theme/shimmer.js";
1
3
  import type { TUI } from "../tui.js";
2
4
  import { Text } from "./text.js";
3
5
  /** Milliseconds between spinner-frame advances; exported so time-derived spinners elsewhere tick at the Loader cadence. */
4
6
  export declare const SPINNER_ADVANCE_MS = 80;
7
+ /** A working-row variant (§6.5): a retry countdown, or context compaction. */
8
+ export type WorkingRowVariant = {
9
+ readonly kind: "retry";
10
+ readonly attempt: number;
11
+ readonly max: number;
12
+ /** The wait before the attempt, in ms, counted from the row's `startedAt`. */
13
+ readonly delayMs: number;
14
+ } | {
15
+ readonly kind: "compaction";
16
+ };
17
+ /** What the dock's working row (§8.1, role `omp.working`) shows. */
18
+ export interface WorkingRowSpec {
19
+ /** The intent, or the variant's label ("Retrying · attempt 1 of 3", "Compacting context…"). */
20
+ readonly label: string;
21
+ /** Epoch ms the work started: the `elapsed` origin and the retry countdown start. */
22
+ readonly startedAt: number;
23
+ readonly variant?: WorkingRowVariant;
24
+ /** Shimmer palette of the label (a session-accented intent). */
25
+ readonly palette?: ShimmerPalette;
26
+ /** Live tok/s, docked before the stop control. */
27
+ readonly rate?: number;
28
+ /** Key id that interrupts (`escape`); undefined hides the stop control (Esc would not cancel). */
29
+ readonly interruptKey?: string;
30
+ }
31
+ /**
32
+ * The dock's working row: `starburst` spinner (or a retry countdown ring),
33
+ * the intent shimmering, `·`, the elapsed time, a grow spacer, then the stop
34
+ * control whose click sends `interrupt`. Compaction adds an indeterminate
35
+ * `progress` before the stop control; a retry says "Cancel".
36
+ */
37
+ export declare function describeWorkingRow(spec: WorkingRowSpec, cx: DescribeContext, now?: number): NativeNode;
5
38
  type ColorFn = (str: string) => string;
6
39
  /**
7
40
  * Styles Loader message fragments without changing their visible text or width.
@@ -20,6 +53,21 @@ export declare class Loader extends Text {
20
53
  /** Return the current message and animation state for debug inspection. */
21
54
  debugState(): Record<string, unknown>;
22
55
  render(width: number): readonly string[];
56
+ /**
57
+ * A `spinner` (or the static glyph of a one-frame loader, e.g. an interrupt
58
+ * key hint) followed by the message, shimmering when the message colorizer
59
+ * animates, and the right-docked trailer. The terminal clocks the motion.
60
+ * Function messages are re-read whenever the engine revisits the loader.
61
+ */
62
+ describe(cx: DescribeContext): NativeNode;
63
+ /**
64
+ * Describe as the dock's working row ({@link describeWorkingRow}) instead
65
+ * of a spinner line; `spec` is re-read whenever the engine revisits the
66
+ * loader and `interrupt` answers a click on its stop control.
67
+ */
68
+ setWorkingRow(spec: () => WorkingRowSpec, interrupt: () => void): void;
69
+ /** A click on the working row's stop control. */
70
+ handleNativeEvent(event: NativeUiEvent): void;
23
71
  start(): void;
24
72
  stop(): void;
25
73
  /** Lifecycle teardown: stop the animation timer. Idempotent. */
@@ -1,3 +1,4 @@
1
+ import type { DescribeContext, NativeNode } from "../native/node.js";
1
2
  import type { SymbolTheme } from "../symbols.js";
2
3
  import type { Component } from "../tui.js";
3
4
  /** @internal exported for tests — must stay index-identical to the old regex scan. */
@@ -95,6 +96,13 @@ export declare class Markdown implements Component {
95
96
  debugState(): Record<string, unknown>;
96
97
  setText(text: string): boolean;
97
98
  invalidate(): void;
99
+ /**
100
+ * The unrendered source as an `md` node, `stream` while the streaming
101
+ * (transient) cache is on. Append-only growth yields a fresh node of the
102
+ * same kind and key whose text extends the previous one, which the
103
+ * reconciler sends as `text append`.
104
+ */
105
+ describe(_cx: DescribeContext): NativeNode;
98
106
  /**
99
107
  * Width-independent source prefix of the last render ending at a frozen
100
108
  * Markdown block boundary. Only meaningful while streaming (transient
@@ -1,3 +1,4 @@
1
+ import type { DescribeContext, NativeNode } from "../native/node.js";
1
2
  import type { Component } from "../tui.js";
2
3
  /** One preformatted metric. Domain-specific number, cost, and quota policy stays with the caller. */
3
4
  export interface MetricSpec {
@@ -40,5 +41,11 @@ export declare class MetricRow implements Component {
40
41
  constructor(metrics: readonly MetricSpec[], options?: MetricRowOptions);
41
42
  setMetrics(metrics: readonly MetricSpec[]): boolean;
42
43
  invalidate(): void;
44
+ /**
45
+ * `drop` overflow becomes a transparent `status` strip whose segments keep
46
+ * the metric priorities (the terminal drops the lowest first); the other
47
+ * modes are one text run that wraps or truncates.
48
+ */
49
+ describe(_cx: DescribeContext): NativeNode;
43
50
  render(width: number): readonly string[];
44
51
  }
@@ -1,3 +1,4 @@
1
+ import type { DescribeContext, NativeNode } from "../native/node.js";
1
2
  import type { Component } from "../tui.js";
2
3
  /** Explicit glyph and styling policy for a progress bar. */
3
4
  export interface ProgressBarStyle {
@@ -32,5 +33,7 @@ export declare class ProgressBar implements Component {
32
33
  constructor(value: number | undefined, options: ProgressBarOptions);
33
34
  setValue(value: number | undefined): boolean;
34
35
  invalidate(): void;
36
+ /** A native `progress` bar (indeterminate when the value is unknown); prefix, suffix and percentage label it. */
37
+ describe(_cx: DescribeContext): NativeNode;
35
38
  render(width: number): readonly string[];
36
39
  }
@@ -1,3 +1,4 @@
1
+ import type { DescribeContext, NativeNode } from "../native/node.js";
1
2
  import type { Component } from "../tui.js";
2
3
  import { Ellipsis } from "../utils.js";
3
4
  import { type ViewportAlignment } from "./scroll-viewport.js";
@@ -93,6 +94,11 @@ export declare class ScrollView implements Component {
93
94
  invalidate(): void;
94
95
  /** Permanently release a wrapped child's timers, subscriptions, and other resources. */
95
96
  dispose(): void;
97
+ /**
98
+ * The whole content in a `col` capped at the viewport height: the
99
+ * terminal scrolls it natively and draws its own scrollbar.
100
+ */
101
+ describe(_cx: DescribeContext): NativeNode;
96
102
  render(width: number): readonly string[];
97
103
  }
98
104
  export {};
@@ -1,3 +1,4 @@
1
+ import type { DescribeContext, NativeNode } from "../native/node.js";
1
2
  import type { Component } from "../tui.js";
2
3
  /** Explicit heading/rule/spacing policy for a data section. */
3
4
  export interface SectionOptions {
@@ -15,5 +16,7 @@ export declare class Section implements Component {
15
16
  constructor(options: SectionOptions);
16
17
  invalidate(): void;
17
18
  dispose(): void;
19
+ /** A `section` headed by the styled title; the rule is the terminal's. */
20
+ describe(_cx: DescribeContext): NativeNode;
18
21
  render(width: number): readonly string[];
19
22
  }
@@ -1,4 +1,5 @@
1
1
  import { type MouseRoutable, type SgrMouseEvent } from "../mouse.js";
2
+ import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
2
3
  import type { SymbolTheme } from "../symbols.js";
3
4
  import type { Component } from "../tui.js";
4
5
  export interface SelectItem {
@@ -7,6 +8,12 @@ export interface SelectItem {
7
8
  description?: string;
8
9
  /** Optional type-indicator glyph rendered in an aligned column before the label */
9
10
  icon?: string;
11
+ /** Named icon a TSP terminal draws from its own set (replaces the {@link icon} glyph natively). */
12
+ iconName?: string;
13
+ /** Native detail text when it differs from the ANSI {@link description} (which may embed {@link state}). */
14
+ nativeDetail?: string;
15
+ /** Live state drawn right-aligned natively ("demo/demo", "off"). */
16
+ state?: string;
10
17
  /** Dim hint text shown inline after cursor when this item is selected */
11
18
  hint?: string;
12
19
  /** Disabled rows stay visible but are skipped by navigation and cannot activate. */
@@ -101,6 +108,7 @@ export declare class SelectList implements Component, MouseRoutable {
101
108
  debugState(): Record<string, unknown>;
102
109
  /** Refit the visible row budget (hosts clamp the list to available height). */
103
110
  setMaxVisible(rows: number): void;
111
+ /** Replace the filter text (caret to end) and refilter. */
104
112
  setFilter(filter: string): void;
105
113
  /** Replace controlled items while retaining the selected value when possible. */
106
114
  setItems(items: readonly SelectItem[]): void;
@@ -108,6 +116,17 @@ export declare class SelectList implements Component, MouseRoutable {
108
116
  /** Select a visible item by its stable value. */
109
117
  setSelectedValue(value: string): void;
110
118
  getFilter(): string;
119
+ /**
120
+ * What a native `picker` shows: the filtered items in order, the selected
121
+ * and pending values, the query and its caret (UTF-16 offset).
122
+ */
123
+ pickerView(): {
124
+ readonly items: readonly SelectItem[];
125
+ readonly selected: string | null;
126
+ readonly pending: string | null;
127
+ readonly query: string;
128
+ readonly cursor: number;
129
+ };
111
130
  /** Resolve a 0-based rendered-line index to a filtered-item index. */
112
131
  hitTest(line: number): number | undefined;
113
132
  /** Highlight the item under the pointer (null clears). */
@@ -117,6 +136,20 @@ export declare class SelectList implements Component, MouseRoutable {
117
136
  /** Mouse click: select the item under the pointer and request activation. */
118
137
  clickItem(index: number): void;
119
138
  routeMouse(event: SgrMouseEvent, line: number, _col: number): void;
139
+ /**
140
+ * A `list` of `item`s keyed by item value, with the selection, the search
141
+ * query and the empty/no-match text, plus a status line (search query,
142
+ * pending confirmation, host status) under it when one applies.
143
+ */
144
+ describe(_cx: DescribeContext): NativeNode;
145
+ /**
146
+ * Mark `typed` where it leads a native item label (`{s:"mark"}`), for lists
147
+ * whose items were matched against text outside the list (autocomplete).
148
+ * The list then sends no `filter`: the marks already say what matched.
149
+ */
150
+ setNativeMark(typed: string): void;
151
+ /** Pointer select/activate on an item does what a click does today: select it and request activation. */
152
+ handleNativeEvent(event: NativeUiEvent): void;
120
153
  invalidate(): void;
121
154
  render(width: number): readonly string[];
122
155
  handleInput(keyData: string): void;
@@ -1,4 +1,6 @@
1
1
  import type { SgrMouseEvent } from "../mouse.js";
2
+ import type { TspPrefsControl, TspPrefsRow, TspPrefsSection } from "@oh-my-pi/pi-wire";
3
+ import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
2
4
  import type { Component } from "../tui.js";
3
5
  import { FormField, type FormFieldOptions, type FormFieldTheme } from "./form.js";
4
6
  export interface SettingItem {
@@ -18,9 +20,32 @@ export interface SettingItem {
18
20
  submenu?: (currentValue: string, done: (selectedValue?: string) => void) => Component;
19
21
  /** True when the displayed setting differs from its default value. */
20
22
  changed?: boolean;
23
+ /** The default, as a native settings page names it in the changed dot's title. */
24
+ defaultLabel?: string;
21
25
  /** Render as a non-interactive section heading. Skipped by navigation and search. */
22
26
  heading?: boolean;
23
27
  }
28
+ /** A row's open editor as a native settings page shows it (`TspPrefsProps.editing`). */
29
+ export interface PrefsEditing {
30
+ row: string;
31
+ draft?: string;
32
+ cursor?: number;
33
+ option?: string;
34
+ }
35
+ /** A submenu that reports the option it highlights (multiselect toggles) to a native settings page. */
36
+ export interface PrefsOptionSource {
37
+ readonly prefsOption: string | undefined;
38
+ }
39
+ /** Where a setting row goes on a native settings page: its section and, for search results, its page. */
40
+ export interface PrefsSectionRef {
41
+ id: string;
42
+ title: string;
43
+ page?: string;
44
+ }
45
+ /** The section id for a section title (`"Status Line"` → `"status-line"`). */
46
+ export declare function prefsSectionId(title: string): string;
47
+ /** A setting as a native settings row, given its typed control; `undefined` for headings. */
48
+ export declare function settingPrefsRow(item: SettingItem, control: TspPrefsControl): TspPrefsRow | undefined;
24
49
  export interface SettingsListTheme {
25
50
  label: (text: string, selected: boolean, changed: boolean) => string;
26
51
  value: (text: string, selected: boolean, changed: boolean) => string;
@@ -89,6 +114,36 @@ export declare class SettingsList implements Component {
89
114
  toggleSectionFocus(): boolean;
90
115
  /** True while an item submenu owns input. */
91
116
  hasOpenSubmenu(): boolean;
117
+ /** The open submenu and the row that opened it, if any. */
118
+ get openSubmenu(): {
119
+ id: string;
120
+ component: Component;
121
+ } | undefined;
122
+ /**
123
+ * The visible settings as native page sections: rows in list order, each
124
+ * in the section `sectionOf` (given the row and the heading above it) names,
125
+ * sections in order of their first row (ranked search results gather
126
+ * under their section). Rows `control` has no typed control for are left
127
+ * out.
128
+ */
129
+ prefsSections(sectionOf: (item: SettingItem, heading: SettingItem | undefined) => PrefsSectionRef, control: (item: SettingItem) => TspPrefsControl | undefined): TspPrefsSection[];
130
+ /** The row with keyboard focus, or while the section rail has focus the focused section's heading label. */
131
+ prefsFocus(): {
132
+ row?: string;
133
+ section?: string;
134
+ };
135
+ /**
136
+ * The open editor as a native page draws it: a choice's highlighted option
137
+ * (when `inlineMenu(id)` says the row's choices fit its popup menu), a text
138
+ * field's draft and cursor (dots when masked), a multiselect's highlighted
139
+ * option; `null` when nothing is open or the editor has no native control
140
+ * (the host shows that one itself).
141
+ */
142
+ prefsEditing(inlineMenu: (id: string) => boolean): PrefsEditing | null;
143
+ /** Applies `value` to a cycling (boolean/enum) row the way Enter does: the row shows it and `onChange` runs. */
144
+ applyValue(id: string, value: string): void;
145
+ /** Opens row `id`'s submenu the way Enter does (leaving one already open for it); returns it. */
146
+ openSubmenuFor(id: string): Component | undefined;
92
147
  /** Resize the visible viewport (fullscreen hosts call this every render). */
93
148
  setMaxVisible(rows: number): void;
94
149
  /** Move the selection one step for a wheel notch. */
@@ -130,6 +185,19 @@ export declare class SettingsList implements Component {
130
185
  setItems(items: SettingItem[]): void;
131
186
  invalidate(): void;
132
187
  render(width: number): readonly string[];
188
+ /**
189
+ * A `list` of setting `item`s (label, current value on the right, risk note
190
+ * and description as detail; headings as disabled items) keyed by setting id,
191
+ * with the selection and search query, plus the footer hint. An open submenu
192
+ * replaces the list and describes itself.
193
+ */
194
+ describe(_cx: DescribeContext): NativeNode;
195
+ /**
196
+ * Pointer actions do what a click does in the settings hosts: `select` moves
197
+ * the selection to the row, or activates it (Enter) when it already is the
198
+ * selection; `activate` selects and activates.
199
+ */
200
+ handleNativeEvent(event: NativeUiEvent): void;
133
201
  handleInput(data: string): void;
134
202
  }
135
203
  /** Construction options for a SettingsList composed as a form field. */
@@ -1,4 +1,7 @@
1
+ import type { DescribeContext, NativeNode } from "../native/node.js";
1
2
  import type { Component } from "../tui.js";
3
+ /** Terminal spacing step for a count of blank rows. */
4
+ export declare function spaceForRows(rows: number): "none" | "sm" | "md" | "lg";
2
5
  /**
3
6
  * Spacer component that renders empty lines
4
7
  */
@@ -9,5 +12,6 @@ export declare class Spacer implements Component {
9
12
  debugState(): Record<string, unknown>;
10
13
  setLines(lines: number): void;
11
14
  invalidate(): void;
15
+ describe(_cx: DescribeContext): NativeNode;
12
16
  render(_width: number): readonly string[];
13
17
  }
@@ -1,3 +1,4 @@
1
+ import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
1
2
  import type { Component } from "../tui.js";
2
3
  /** Tab definition */
3
4
  export interface Tab {
@@ -68,6 +69,14 @@ export declare class TabBar implements Component {
68
69
  /** Move to the previous non-muted tab (wraps to last tab before first) */
69
70
  prevTab(): void;
70
71
  invalidate(): void;
72
+ /**
73
+ * A native `tabs` strip (muted tabs keep the muted token), preceded by the
74
+ * bar label and followed by the cycle hint when present. Shrinking to
75
+ * `short` labels and wrapping are the terminal's.
76
+ */
77
+ describe(_cx: DescribeContext): NativeNode;
78
+ /** A click on a tab activates it (muted tabs stay inert). */
79
+ handleNativeEvent(event: NativeUiEvent): void;
71
80
  /**
72
81
  * Handle keyboard input for tab navigation.
73
82
  * @returns true if the input was handled, false otherwise
@@ -1,3 +1,4 @@
1
+ import type { DescribeContext, NativeNode } from "../native/node.js";
1
2
  import type { Component } from "../tui.js";
2
3
  /** One table cell. Styling is applied after alignment so padding shares the cell style. */
3
4
  export interface TableCell {
@@ -28,5 +29,11 @@ export declare class Table implements Component {
28
29
  constructor(rows: readonly (readonly TableCell[])[], columns: readonly TableColumn[], options?: TableOptions);
29
30
  setRows(rows: readonly (readonly TableCell[])[]): boolean;
30
31
  invalidate(): void;
32
+ /**
33
+ * A native `table`. Column priorities carry over unchanged (lower gives
34
+ * way first); truncating columns truncate at the end, the rest keep
35
+ * their content. Widths are the terminal's.
36
+ */
37
+ describe(_cx: DescribeContext): NativeNode;
31
38
  render(width: number): readonly string[];
32
39
  }
@@ -1,3 +1,4 @@
1
+ import type { DescribeContext, NativeNode } from "../native/node.js";
1
2
  import type { Component } from "../tui.js";
2
3
  /**
3
4
  * Text component - displays multi-line text with word wrapping.
@@ -25,5 +26,10 @@ export declare class Text implements Component {
25
26
  */
26
27
  setStyleFn(styleFn?: (text: string) => string): this;
27
28
  invalidate(): void;
29
+ /**
30
+ * Wrapped text; styling re-derived from the styled source so a theme swap
31
+ * re-resolves tokens. A background fill becomes the node's tone.
32
+ */
33
+ describe(_cx: DescribeContext): NativeNode;
28
34
  render(width: number): readonly string[];
29
35
  }