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

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 (449) hide show
  1. package/CHANGELOG.md +52 -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 +9 -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/render-utils.d.ts +5 -0
  154. package/dist/types/render/tool-card.d.ts +8 -0
  155. package/dist/types/render/tree-list.d.ts +8 -0
  156. package/dist/types/render/width-aware-text.d.ts +7 -0
  157. package/dist/types/setup/scenes/outro.d.ts +7 -0
  158. package/dist/types/setup/scenes/sign-in.d.ts +7 -0
  159. package/dist/types/setup/scenes/splash.d.ts +8 -0
  160. package/dist/types/setup/scenes/types.d.ts +6 -1
  161. package/dist/types/setup/wizard-overlay.d.ts +9 -0
  162. package/dist/types/status-line/component.d.ts +49 -5
  163. package/dist/types/status-line/context-usage.d.ts +20 -0
  164. package/dist/types/status-line/footer.d.ts +8 -0
  165. package/dist/types/status-line/metrics.d.ts +1 -2
  166. package/dist/types/status-line/segments.d.ts +10 -1
  167. package/dist/types/status-line/types.d.ts +40 -1
  168. package/dist/types/terminal-capabilities.d.ts +1 -1
  169. package/dist/types/terminal.d.ts +27 -0
  170. package/dist/types/theme/defaults/index.d.ts +100 -0
  171. package/dist/types/theme/schema.d.ts +2 -0
  172. package/dist/types/theme/shimmer.d.ts +8 -0
  173. package/dist/types/theme/theme-class.d.ts +2 -0
  174. package/dist/types/theme/theme.d.ts +33 -1
  175. package/dist/types/tools/ask.d.ts +3 -0
  176. package/dist/types/tools/ast-edit.d.ts +10 -1
  177. package/dist/types/tools/ast-grep.d.ts +10 -1
  178. package/dist/types/tools/autoresearch.d.ts +21 -4
  179. package/dist/types/tools/bash.d.ts +30 -1
  180. package/dist/types/tools/cfg-render.d.ts +5 -1
  181. package/dist/types/tools/debug.d.ts +3 -1
  182. package/dist/types/tools/default-renderer.d.ts +6 -1
  183. package/dist/types/tools/edit.d.ts +16 -1
  184. package/dist/types/tools/eval.d.ts +12 -1
  185. package/dist/types/tools/fetch.d.ts +16 -1
  186. package/dist/types/tools/find.d.ts +15 -1
  187. package/dist/types/tools/github.d.ts +3 -0
  188. package/dist/types/tools/glob.d.ts +14 -1
  189. package/dist/types/tools/goal.d.ts +3 -1
  190. package/dist/types/tools/grep.d.ts +14 -1
  191. package/dist/types/tools/grouped-file-output.d.ts +58 -0
  192. package/dist/types/tools/json-tree.d.ts +20 -0
  193. package/dist/types/tools/lsp.d.ts +3 -10
  194. package/dist/types/tools/mcp.d.ts +16 -1
  195. package/dist/types/tools/memory.d.ts +26 -0
  196. package/dist/types/tools/native-view.d.ts +90 -0
  197. package/dist/types/tools/proc-render.d.ts +7 -1
  198. package/dist/types/tools/read.d.ts +23 -1
  199. package/dist/types/tools/renderer.d.ts +57 -0
  200. package/dist/types/tools/report-tool-issue.d.ts +3 -0
  201. package/dist/types/tools/resolve.d.ts +14 -1
  202. package/dist/types/tools/task.d.ts +10 -0
  203. package/dist/types/tools/think.d.ts +3 -0
  204. package/dist/types/tools/todo.d.ts +12 -0
  205. package/dist/types/tools/vibe.d.ts +3 -1
  206. package/dist/types/tools/wait.d.ts +3 -0
  207. package/dist/types/tools/web-search.d.ts +8 -0
  208. package/dist/types/tools/write.d.ts +14 -1
  209. package/dist/types/tools/xdev.d.ts +13 -0
  210. package/dist/types/tui.d.ts +49 -0
  211. package/package.json +9 -9
  212. package/src/apps/autoresearch-dashboard.ts +362 -4
  213. package/src/apps/cleanse-board.ts +219 -1
  214. package/src/apps/cleanse-picker.ts +9 -1
  215. package/src/apps/debug/log-viewer.ts +15 -15
  216. package/src/apps/debug/protocol-probe.ts +2 -20
  217. package/src/apps/git/avatar.ts +2 -22
  218. package/src/apps/git/git-tui.ts +406 -59
  219. package/src/apps/git/help.ts +130 -0
  220. package/src/apps/git/sidebar.ts +491 -0
  221. package/src/apps/live-visualizer.ts +65 -0
  222. package/src/apps/ps-top.ts +448 -17
  223. package/src/apps/session-picker.ts +1 -0
  224. package/src/apps/setup-model-picker.ts +5 -1
  225. package/src/apps/standalone-picker.ts +55 -1
  226. package/src/autocomplete.ts +44 -1
  227. package/src/chat/advisor-message.ts +72 -3
  228. package/src/chat/assistant-message.ts +346 -11
  229. package/src/chat/background-tan-message.ts +4 -4
  230. package/src/chat/bash-execution.ts +81 -0
  231. package/src/chat/cache-invalidation-marker.ts +8 -0
  232. package/src/chat/chat-transcript-builder.ts +37 -6
  233. package/src/chat/collab-prompt-message.ts +15 -3
  234. package/src/chat/compaction-summary-message.ts +74 -1
  235. package/src/chat/custom-message.ts +3 -1
  236. package/src/chat/eval-execution.ts +57 -0
  237. package/src/chat/execution-shared.ts +153 -1
  238. package/src/chat/hook-message.ts +1 -0
  239. package/src/chat/late-diagnostics-message.ts +85 -2
  240. package/src/chat/read-tool-group.ts +341 -1
  241. package/src/chat/served-model-marker.ts +8 -0
  242. package/src/chat/skill-message.ts +63 -0
  243. package/src/chat/stripped-tool-calls-placeholder.ts +18 -10
  244. package/src/chat/todo-reminder.ts +34 -4
  245. package/src/chat/tool-execution.ts +385 -10
  246. package/src/chat/transcript-actions.ts +38 -0
  247. package/src/chat/transcript-browser.ts +2 -9
  248. package/src/chat/transcript-entry.ts +10 -1
  249. package/src/chat/transcript-render-helpers.ts +16 -15
  250. package/src/chat/ttsr-notification.ts +38 -1
  251. package/src/chat/user-message.ts +167 -4
  252. package/src/chrome/collab-qrcode.ts +27 -2
  253. package/src/chrome/context-thresholds.ts +34 -0
  254. package/src/chrome/countdown-timer.ts +24 -1
  255. package/src/chrome/diff.ts +60 -1
  256. package/src/chrome/dynamic-border.ts +7 -0
  257. package/src/chrome/format.ts +12 -0
  258. package/src/chrome/message-divider.ts +33 -1
  259. package/src/chrome/message-frame.ts +53 -10
  260. package/src/chrome/message-notice.ts +71 -0
  261. package/src/chrome/overlay-box.ts +45 -2
  262. package/src/chrome/qrcode.ts +28 -0
  263. package/src/chrome/segment-track.ts +26 -0
  264. package/src/chrome/selector-helpers.ts +1 -17
  265. package/src/chrome/status-notice.ts +46 -0
  266. package/src/chrome/streaming-panel.ts +25 -1
  267. package/src/chrome/tool-activity.ts +20 -0
  268. package/src/chrome/transcript-container.ts +37 -0
  269. package/src/chrome/transcript-status.ts +40 -11
  270. package/src/components/box.ts +51 -0
  271. package/src/components/disclosure.ts +33 -0
  272. package/src/components/editor.ts +243 -29
  273. package/src/components/form.ts +93 -9
  274. package/src/components/image.ts +30 -0
  275. package/src/components/input.ts +77 -26
  276. package/src/components/key-value-list.ts +18 -0
  277. package/src/components/layout/geometry.ts +44 -0
  278. package/src/components/layout/row.ts +30 -0
  279. package/src/components/layout/split-pane.ts +65 -0
  280. package/src/components/layout/stack.ts +27 -0
  281. package/src/components/loader.ts +183 -1
  282. package/src/components/markdown.ts +21 -0
  283. package/src/components/metric.ts +39 -0
  284. package/src/components/progress-bar.ts +28 -0
  285. package/src/components/scroll-view.ts +23 -0
  286. package/src/components/section.ts +16 -0
  287. package/src/components/select-list.ts +174 -25
  288. package/src/components/settings-list.ts +264 -7
  289. package/src/components/spacer.ts +17 -0
  290. package/src/components/tab-bar.ts +42 -0
  291. package/src/components/table.ts +34 -0
  292. package/src/components/text.ts +23 -0
  293. package/src/components/tree-view.ts +65 -0
  294. package/src/components/truncated-text.ts +14 -0
  295. package/src/components/wizard-step.ts +18 -9
  296. package/src/debug-server.ts +14 -7
  297. package/src/hotkeys-markdown.ts +251 -69
  298. package/src/index.ts +6 -0
  299. package/src/latex-block.ts +11 -0
  300. package/src/native/apply.ts +275 -0
  301. package/src/native/backend.ts +682 -0
  302. package/src/native/blobs.ts +70 -0
  303. package/src/native/describe.ts +124 -0
  304. package/src/native/encode.ts +233 -0
  305. package/src/native/icons.ts +184 -0
  306. package/src/native/memo.ts +64 -0
  307. package/src/native/node.ts +112 -0
  308. package/src/native/overlay.ts +131 -0
  309. package/src/native/picker.ts +333 -0
  310. package/src/native/reconcile.ts +1063 -0
  311. package/src/native/settle.ts +23 -0
  312. package/src/native/spans.ts +308 -0
  313. package/src/native/state.ts +28 -0
  314. package/src/native/tone.ts +79 -0
  315. package/src/overlays/advisor-config.ts +420 -0
  316. package/src/overlays/agent-hub-renderer.ts +155 -18
  317. package/src/overlays/agent-hub.ts +1037 -44
  318. package/src/overlays/agent-transcript-viewer.ts +129 -0
  319. package/src/overlays/agents-hub.ts +688 -53
  320. package/src/overlays/annotation-overlay.ts +391 -52
  321. package/src/overlays/ask-dialog.ts +435 -24
  322. package/src/overlays/bordered-loader.ts +17 -0
  323. package/src/overlays/btw-history-panel.ts +182 -0
  324. package/src/overlays/btw-panel.ts +68 -2
  325. package/src/overlays/cleanse-panel.ts +105 -15
  326. package/src/overlays/codex-reset-fireworks.ts +65 -5
  327. package/src/overlays/composer-shape-preview.ts +26 -1
  328. package/src/overlays/copy-selector.ts +545 -23
  329. package/src/overlays/error-banner.ts +44 -0
  330. package/src/overlays/extensions/extension-list.ts +23 -17
  331. package/src/overlays/history-search.ts +175 -33
  332. package/src/overlays/hook-editor.ts +113 -6
  333. package/src/overlays/hook-input.ts +22 -1
  334. package/src/overlays/hook-selector.ts +311 -22
  335. package/src/overlays/hub-frame.ts +80 -0
  336. package/src/overlays/jobs-panel.ts +112 -0
  337. package/src/overlays/login-dialog.ts +183 -1
  338. package/src/overlays/logout-account-selector.ts +102 -4
  339. package/src/overlays/mcp-add-wizard.ts +232 -53
  340. package/src/overlays/model-browser.ts +731 -28
  341. package/src/overlays/model-hub.ts +1471 -94
  342. package/src/overlays/model-picker.ts +175 -1
  343. package/src/overlays/move-overlay.ts +45 -0
  344. package/src/overlays/oauth-selector.ts +227 -23
  345. package/src/overlays/omfg-panel.ts +86 -2
  346. package/src/overlays/pause-screen.ts +55 -4
  347. package/src/overlays/plan-review-overlay.ts +352 -0
  348. package/src/overlays/plan-save-overlay.ts +45 -0
  349. package/src/overlays/plugin-selector.ts +21 -1
  350. package/src/overlays/plugin-settings.ts +195 -5
  351. package/src/overlays/queue-mode-selector.ts +19 -1
  352. package/src/overlays/reset-usage-selector.ts +110 -40
  353. package/src/overlays/rewind-selector.ts +458 -44
  354. package/src/overlays/session-account-selector.ts +1 -1
  355. package/src/overlays/session-info-overlay.ts +137 -1
  356. package/src/overlays/session-selector.ts +807 -46
  357. package/src/overlays/settings-defs.ts +41 -0
  358. package/src/overlays/settings-selector.ts +583 -23
  359. package/src/overlays/show-images-selector.ts +18 -1
  360. package/src/overlays/snapcompact-shape-preview.ts +48 -3
  361. package/src/overlays/stats-notice.ts +31 -0
  362. package/src/overlays/theme-selector.ts +31 -1
  363. package/src/overlays/thinking-selector.ts +22 -1
  364. package/src/overlays/tree-selector.ts +570 -110
  365. package/src/overlays/usage-dashboard.ts +587 -12
  366. package/src/overlays/usage-row.ts +161 -25
  367. package/src/prompt/attachment-chips.ts +60 -0
  368. package/src/prompt/composer-attachments.ts +31 -9
  369. package/src/prompt/composer.ts +55 -2
  370. package/src/prompt/custom-editor.ts +302 -4
  371. package/src/prompt/editor-top-gap.ts +8 -0
  372. package/src/prompt/macos-spelling.ts +24 -9
  373. package/src/prompt/magic-keywords.ts +22 -1
  374. package/src/prompt/model-mention-autocomplete.ts +1 -0
  375. package/src/prompt/queued-messages.ts +101 -0
  376. package/src/prompt/skill-tokens.ts +5 -3
  377. package/src/prompt/welcome.ts +213 -6
  378. package/src/render/code-cell.ts +103 -2
  379. package/src/render/file-list.ts +29 -0
  380. package/src/render/hyperlink.ts +32 -0
  381. package/src/render/output-block.ts +110 -0
  382. package/src/render/output-pane.ts +37 -0
  383. package/src/render/render-utils.ts +51 -3
  384. package/src/render/tool-card.ts +137 -0
  385. package/src/render/tree-list.ts +39 -0
  386. package/src/render/width-aware-text.ts +20 -0
  387. package/src/setup/scenes/composer.ts +29 -0
  388. package/src/setup/scenes/glyph.ts +15 -0
  389. package/src/setup/scenes/model.ts +36 -8
  390. package/src/setup/scenes/outro.ts +28 -1
  391. package/src/setup/scenes/sign-in.ts +122 -13
  392. package/src/setup/scenes/splash.ts +28 -1
  393. package/src/setup/scenes/theme.ts +88 -3
  394. package/src/setup/scenes/types.ts +7 -1
  395. package/src/setup/startup-splash.ts +46 -9
  396. package/src/setup/wizard-overlay.ts +140 -23
  397. package/src/status-line/component.ts +398 -16
  398. package/src/status-line/context-usage.ts +279 -50
  399. package/src/status-line/footer.ts +94 -1
  400. package/src/status-line/metrics.ts +3 -6
  401. package/src/status-line/segments.ts +463 -97
  402. package/src/status-line/separators.ts +3 -16
  403. package/src/status-line/types.ts +43 -1
  404. package/src/terminal-capabilities.ts +7 -0
  405. package/src/terminal.ts +130 -2
  406. package/src/theme/defaults/dark-neon-noir.json +100 -0
  407. package/src/theme/defaults/index.ts +2 -0
  408. package/src/theme/defaults/light-prism.json +5 -5
  409. package/src/theme/defaults/onyx.json +62 -62
  410. package/src/theme/schema.ts +15 -0
  411. package/src/theme/shimmer.ts +33 -0
  412. package/src/theme/theme-class.ts +24 -19
  413. package/src/theme/theme.ts +111 -9
  414. package/src/tools/ask.ts +157 -1
  415. package/src/tools/ast-edit.ts +174 -1
  416. package/src/tools/ast-grep.ts +82 -2
  417. package/src/tools/autoresearch.ts +149 -1
  418. package/src/tools/bash.ts +180 -49
  419. package/src/tools/cfg-render.ts +66 -1
  420. package/src/tools/debug.ts +78 -1
  421. package/src/tools/default-renderer.ts +35 -1
  422. package/src/tools/edit.ts +270 -2
  423. package/src/tools/eval.ts +257 -1
  424. package/src/tools/fetch.ts +102 -3
  425. package/src/tools/find.ts +127 -1
  426. package/src/tools/github.ts +119 -10
  427. package/src/tools/glob.ts +116 -1
  428. package/src/tools/goal.ts +56 -1
  429. package/src/tools/grep.ts +83 -2
  430. package/src/tools/grouped-file-output.ts +205 -0
  431. package/src/tools/json-tree.ts +116 -1
  432. package/src/tools/lsp.ts +318 -1
  433. package/src/tools/mcp.ts +80 -1
  434. package/src/tools/memory.ts +93 -11
  435. package/src/tools/native-view.ts +292 -0
  436. package/src/tools/proc-render.ts +221 -1
  437. package/src/tools/read.ts +199 -4
  438. package/src/tools/renderer.ts +61 -0
  439. package/src/tools/report-tool-issue.ts +7 -1
  440. package/src/tools/resolve.ts +63 -1
  441. package/src/tools/task.ts +434 -7
  442. package/src/tools/think.ts +19 -1
  443. package/src/tools/todo.ts +89 -0
  444. package/src/tools/vibe.ts +230 -2
  445. package/src/tools/wait.ts +181 -1
  446. package/src/tools/web-search.ts +113 -1
  447. package/src/tools/write.ts +144 -5
  448. package/src/tools/xdev.ts +64 -1
  449. package/src/tui.ts +294 -3
package/CHANGELOG.md CHANGED
@@ -2,8 +2,57 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [18.4.5] - 2026-09-30
6
+
7
+ ### Added
8
+
9
+ - Added Factory Droid base-credit badges; models without a dollar-price reference no longer appear free ([#8577](https://github.com/can1357/oh-my-pi/pull/8577) by [@will-bogusz](https://github.com/will-bogusz), continued in [#13276](https://github.com/can1357/oh-my-pi/pull/13276) by [@DusKing1](https://github.com/DusKing1)).
10
+
11
+ ### Fixed
12
+
13
+ - Fixed home directories next to shell redirections, control operators or Markdown emphasis (`<`, `>`, `&`, `|`, `*`, `_`) leaking the full path in display-only text ([#11210](https://github.com/can1357/oh-my-pi/pull/11210) by [@DarkPhilosophy](https://github.com/DarkPhilosophy)).
14
+ - Fixed the subagent task card showing full home paths in tool intents and arguments, while keeping search patterns literal ([#11210](https://github.com/can1357/oh-my-pi/pull/11210) by [@DarkPhilosophy](https://github.com/DarkPhilosophy)).
15
+ - Fixed Enter doing nothing on a fully typed slash-command argument while its completion popup was open (e.g. `/mcp list`): it now submits instead of re-accepting the identical completion; subcommands that still need a required argument (e.g. `/mcp test`) keep inserting the subcommand so you can type it ([#13885](https://github.com/can1357/oh-my-pi/pull/13885) by [@H4vC](https://github.com/H4vC)).
16
+
17
+ ## [18.4.4] - 2026-09-29
18
+
19
+ ### Added
20
+
21
+ - Added Tern Surface Protocol (TSP) integration for native terminal rendering
22
+ - Redesigned transcript, chat, dashboard, and picker UI components for native wire representation
23
+ - `HookEditorComponent` accepts pasted images when constructed with `acceptImages`; the ask dialog returns them as `customInputImages` / `noteImages` ([#13774](https://github.com/can1357/oh-my-pi/pull/13774) by [@DrFaustus-vic](https://github.com/DrFaustus-vic))
24
+ - Added `formatFileMatches` and `FileMatchSection` to `tools/grouped-file-output` for rendering per-file grep/ast-grep matches in grouped or flat mode.
25
+
26
+ ### Fixed
27
+
28
+ - The model browser shows `varies`, `included`, or `pricing unknown` for models whose catalog declares that state, instead of labeling them `free` ([#11613](https://github.com/can1357/oh-my-pi/pull/11613) by [@will-bogusz](https://github.com/will-bogusz)).
29
+
5
30
  ## [18.4.3] - 2026-09-28
6
31
 
32
+ ### Added
33
+
34
+ - Added the native composer and dock redesign for Tern: the composer carries its attachment chips, a `bash`/`python` mode chip (with an eye-off mark for `!!`/`$$`), a thinking-effort chip that cycles on click, and a send keycap that turns into Stop while a turn runs; the working row shows the intent, elapsed time and an `esc Stop` button (a countdown ring and Cancel while retrying, indeterminate progress while compacting); queued messages are pills with a count and an Edit button; todos and running subagents are HUD pills; the status strip draws context as a ring meter with the auto-compaction tick, splits the path into a dim parent and strong leaf, keeps model, context and git longest, and opens the model picker, `/context`, `/git`, `/usage` or the project folder on click; autocomplete items carry named icons, the matched prefix, the full description, live state as a value, and scroll the selection into view
35
+ - Added the native transcript redesign for Tern: a failed request is one error frame (HTTP status chip, the message once, Retry / Copy error / Switch model), a recovered retry is a quiet disclosable row, user messages drop their header for a hover toolbar (time, Copy, Rewind), thinking streams under a live starburst, timer and rate and folds to "Thought for 12s" when done, status notices are toasts instead of transcript lines, compaction is a centred divider chip, TTSR rules are an inline notice (the rewound text dims with a `rewound` tag), served-model and cache-miss markers are inline notices, late LSP diagnostics join the edit/write frame they belong to, and clicking a recent session on the welcome card resumes it
36
+ - Added native rendering in terminals that speak the Tern Surface Protocol (such as Tern): omp describes its UI as semantic components the terminal lays out, draws and animates in your omp theme (both light and dark variants, updated live when you switch or preview themes), so there is no resize replay or repaint flicker and past transcript entries (tool cards, reactions, collapse state) stay live even after they scroll away; `PI_TUI_NATIVE=0` keeps the classic renderer, `PI_TUI_TSP_RECORD=<file>` records the protocol, and the `OMP_TUI_DEBUG` socket gains `doc`/`tsp` ops
37
+ - Added Tern Surface Protocol views for `/usage` and `/session`: quota windows are native progress meters on per-provider cards, the activity heatmap is a native table that drops its oldest weeks when narrow, the Details tab lists every account's meters, `/session` details are key/value sections, and per-turn token throughput is a native rate
38
+ - Added Tern Surface Protocol views for the remaining tool cards (task, todo, wait, ask, web search, GitHub, goal, LSP, memory, debug, think, vibe, autoresearch, resolve and `xd://` devices): subagents are nested cards, todos are native lists that strike completed items without an animation timer, and job, tool and retry timers are terminal-clocked instead of repainted
39
+ - Added Tern Surface Protocol views for the core tool cards (bash, eval, read, write, edit, AST edit/grep, grep, find, glob, process reads/writes, and the generic fallback card): command and file content, diffs, and search hits with their line numbers are sent as semantic nodes instead of rendered rows
40
+ - Added Tern Surface Protocol views for `omp ps` monitor, the autoresearch dashboard, the live voice call panel and the `/cleanse` live board: processes are native selectable lists (click selects, double-click opens info), experiment runs are a native table, mic level and repair progress are native meters, and spinners/uptimes are terminal-clocked instead of repainted
41
+ - Added Tern Surface Protocol views for the `/btw`, `/btw` history, `/omfg` and `/cleanse` panels, the `/move` dialog, the `/pause` screen, the pinned error banner, hook loaders, the Codex reset celebration and the composer/snapcompact shape previews: answers stream as native markdown, history and directory suggestions are native selectable lists (click selects, double-click follows up or confirms), the snapcompact sample is a native image, and the pause clock, celebration shimmer and cleanse spinners are terminal-clocked instead of repainted
42
+ - Added Tern Surface Protocol views for the prompt editor, inputs, pickers and loaders: the composer is a native editor (caret, Vim selection and mode, ghost completion, placeholder, chip/mention/typo decorations, shimmering magic keywords) with autocomplete as a caret-anchored native list, select and settings lists are native lists where clicking an item does what Enter does, forms, the welcome card and composer attachment chips are semantic nodes, and loader spinners, working-message shimmer and dialog countdowns are terminal-clocked instead of repainted
43
+ - Added Tern Surface Protocol views for the content primitives: text, boxes (cards toned by their background or border), disclosures and sections (collapsible sections that mirror terminal toggles), markdown (streamed append-only as native markdown), images (native blobs), key/value lists, metric rows (priority-dropping segments), tables (column priorities kept), trees, progress bars, tab bars (clicking a tab selects it), wizard steps, scroll views, row/stack/split layouts, output panes (streamed raw output), tool cards, code and markdown cells, file and tree lists, link spans and LaTeX; theme-styled text becomes theme-token spans instead of escape sequences
44
+ - Added Tern Surface Protocol views for the selector and dialog overlays (model hub, model picker and browser, advisor config, settings, plugins, sessions, session tree, rewind, copy, ask, MCP add wizard, hook selector/input/editor, history search, login, OAuth, logout, reset usage, theme, thinking, queue mode, show images): the terminal draws the overlay frame and titles, lists, tabs, search fields, summaries and key hints are native nodes, clicking an item does what Enter does, and dialog countdowns and spinners are terminal-clocked instead of repainted
45
+ - Added Tern Surface Protocol views for the live chrome: the session is described as a flowing transcript plus a docked editor, HUDs and status bar; the status bar is a native strip whose segments drop outer-edge-last from your configured left/right order, its turn spinner, timers, token rate and compaction pulse are terminal-clocked, and the `/context` grid, role-cycle track, key hints and collab QR code are semantic nodes
46
+ - Added Tern Surface Protocol views for the chat transcript: user prompts are cards with reaction and live-steer badges that update in place on old messages, assistant replies stream as append-only native markdown, thinking blocks are collapsible sections with a terminal-clocked starburst and tok/s rate, tool calls are status cards with a live elapsed timer whose collapse (click or `Ctrl+O`) reaches every card in the transcript, `!`/`$` runs are cards with native terminal output, and compaction, branch, handoff, skill, advisor, custom, TTSR, todo-reminder, late-diagnostics and cache-miss/served-model entries are semantic cards, sections and rules
47
+ - Added a native settings page for `/settings`, plugin settings and advisor configuration in Tern: tabs are pages in a side nav with a count of changed settings, each tab has a one-line lead and its groups as sections, settings are real controls (switches, segmented choices, popup menus that preview themes and status-line styles while you hover, steppers for numeric choices, text fields that show your draft and caret, chips and a drag-to-reorder list for multi-selects), changed settings show a dot with the default and a Reset button, risky ones their warning, search results group by page and section, and the status-line preview sits under its section; every pointer action runs the same code as its key
48
+ - Added native picker sheets for rewind, `/tree` and `/copy` in Tern: rewind and copy are a timeline of turns (user prompts with their time, tool turns with the tool's icon) over the transcript; the rewind preview is the turn itself as the transcript draws it under an "everything below is dropped" warning with the count, with branch tabs at a fork and the `f` filter as the search field; `/tree` is an indented tree with the active path marked, labels as badges, filter-mode tabs and the entry's content beside it, and Label edits in the preview; `/copy` previews the turn's code blocks, quotes and links as sections you click to copy, with the focused block highlighted; every button and row click runs the same code as its key
49
+ - Added native picker sheets for the agent hub and `/agents` in Tern: the hub's roster shows each agent's status, task, model and cost/time/request/tool/token/context columns (flat or by parent) with the selected agent's facts, context meter and recent activity beside it, the Activity tab filters the cross-agent log from a side column with a Follow toggle, and `/agents` lists agents by source with their model, prewalk and advisor overrides and previews the description and system prompt; every button runs the same action as its key
50
+ - Added native sheets for omp's dialogs in Tern: plan review is a large sheet titled by the plan's own heading with the Contents as nav rows, annotations as margin notes, Copy / Edit in $EDITOR head buttons and a decision bar whose first option is the hero; the ask dialog is a bottom sheet over the composer with radio/check rows, a Recommended badge, question tabs plus Review, a countdown ring and Submit / Note / Skip buttons; login shows numbered steps (Open sign-in page and Copy link over a one-line URL, a large click-to-copy device code, a live wait, the paste field) with Cancel; `/hotkeys` opens a "Keyboard shortcuts" sheet whose keys are keycaps; the `/btw`, `/omfg`, `/cleanse`, `/btw` history, pause, plan-save, MCP wizard and Codex reset panels are role-styled sheets, and the pinned error banner is an error strip with Details; every button runs the same code as its key
51
+ - Added native full-screen apps in Tern: `omp git`/`/git` is a native diff (File / Split / Inline / Hunks segmented control, change navigation, whitespace and wrap toggles, Stage file) beside a changes sheet with Path/Tree lists, tinted status pills and hover `Stage all`/`Unstage all`, and a docked commit composer (borderless summary with a counter while typing, body, Amend toggle, Commit button); `?` opens a keyboard shortcuts sheet in both renderers; `omp ps` is a page with a scope control, state-toned process rows and an Info / Logs / Restart / Stop / Kill action bar (a pointer Kill asks first); `/cleanse` shows repair lanes as live agent rows under a lane meter; the autoresearch dashboard charts the metric per run and opens as a sheet; the live call panel has a mic meter and Mute / End call buttons; and the `omp cleanse` and `omp setup` pickers are native picker sheets
52
+ - Added native picker sheets for `/resume`, `omp --resume` and ⌃R history search in Tern: sessions are two-line cards (title, first prompt or project folder, age, size, status dot, pin, fork and current badges) grouped Pinned / Today / Yesterday / This week / Earlier and ranked flat while you search (prompt-history matches get a `history` badge), with This folder / All projects tabs, a preview of the selected session's facts and conversation, an inline delete confirmation and Resume / Delete / All projects / Close buttons; `omp --resume` fills the screen; history search is a compact sheet of past prompts with the matches marked, their age and folder, and an Insert button
53
+ - Added native picker sheets for `/model` and the alt+p / `/switch` model picker in Tern: the model hub is a large sheet with Roles, All models and provider scopes (initials marks, live per-query counts, discovery-state dots, signed-out providers grouped under "Not signed in"), kind tabs with counts, right-aligned Int / t/s / context / $/M columns, a Recent group then one group per provider, role chips with thinking-level dots, a preview pane (copyable id, context, output, price, speed, intelligence, the roles the model can fill, description), the role-assignment strip, the Roles view with fallback chains, and loading/empty states; the quick picker is a compact sheet with the model summary and role chips below the list and a Task model toggle; every row, scope, tab, chip and button runs the same path as its key
54
+ - Added Tern Surface Protocol views for the startup splash and setup wizard: the brand mark shimmers natively, every scene (sign-in, model, glyph, composer, theme) is sent as semantic text, spinners, links and inputs, and the splash and outro advance on their deadlines without per-frame repaints
55
+
7
56
  ### Changed
8
57
 
9
58
  - Reduced frame spikes and memory while long assistant replies retire into scrollback mid-stream: retiring rows no longer re-renders the whole published reply once per row, and the transcript no longer rescans the entire session history every frame ([#13650](https://github.com/can1357/oh-my-pi/pull/13650) by [@H4vC](https://github.com/H4vC)).
@@ -15,6 +64,9 @@
15
64
 
16
65
  - Fixed streaming bash previews showing fields that follow the `env` object (e.g. `command`) as environment assignments ([#13650](https://github.com/can1357/oh-my-pi/pull/13650) by [@H4vC](https://github.com/H4vC)).
17
66
  - Fixed model picker latency by avoiding unnecessary catalog rebuilds
67
+ - Fixed search and filter fields in pickers and lists (model switcher, model and agent hubs, session, history, rewind, tree, hook, sign-in, extension and select lists, the log viewer) ignoring the editor's text keys: every field is now a full single-line input, so word jumps (ctrl/alt+←/→, alt+b/f), line start/end (ctrl+a/e), word and line deletion (ctrl+w/u/k, alt+d), yank, forward delete and undo work everywhere, follow your `tui.editor.*` keybindings, and in Tern the caret is drawn where it actually is in the picker and settings search
68
+ - Fixed omp in Tern showing the classic renderer for the first seconds of startup before switching to the native view: with `TERM_PROGRAM=tern` (outside tmux/screen/zellij, unless `PI_TUI_NATIVE=0`) the very first frame is native, the `hello` handshake confirms it in the background, and a terminal that never confirms falls back to the classic renderer with a clean repaint after 1 s
69
+ - Fixed the welcome card's logo in Tern not matching omp's terminal mark: the bar now overhangs both legs equally, the legs and gap have the terminal proportions, and the left leg ends in the same faded tail
18
70
  - Fixed the `@` completion popup showing a `Searching…` placeholder while a refreshed file search is pending; the popup now stays hidden until results arrive, and Escape is no longer swallowed by it
19
71
  - Fixed multi-line IME and dictation input (for example, voice input in Ghostty or cmux) being sent as one message per line; it now lands in the prompt as a single multi-line draft, while Enter typed during a UI freeze still submits ([#13378](https://github.com/can1357/oh-my-pi/pull/13378) by [@goransh-walia](https://github.com/goransh-walia))
20
72
 
@@ -1,5 +1,6 @@
1
1
  import { type LiveBoardOutput } from "../chrome/live-board.js";
2
2
  import type { AgentProgress } from "../tools/task.js";
3
+ import type { DescribeContext, NativeNode } from "../native/node.js";
3
4
  /** Checker identity shown in live rows and verdicts. */
4
5
  export interface CleanseCheckerDescriptor {
5
6
  id: string;
@@ -59,6 +60,22 @@ export declare class CleanseBoardModel {
59
60
  agentProgress(name: string, progress: AgentProgress): void;
60
61
  /** Drop the agent's live row, advance the repair bar, and build its permanent outcome line. */
61
62
  agentFinished(outcome: CleanseAgentOutcome, assignment: CleanseAssignment): string;
63
+ /**
64
+ * Semantic twin of the permanent line the most recent
65
+ * {@link checkerFinished}/{@link agentFinished} call returned, for native
66
+ * surfaces that log settled work as nodes.
67
+ */
68
+ get lastSettled(): NativeNode | undefined;
69
+ /**
70
+ * Native live rows (NATIVE_REDESIGN §10): phase and checker spinners, the
71
+ * repair head with a `meter` of fixed lanes, and the running repair agents
72
+ * as a grid of lanes, one `agent` row each (status, current tool with its
73
+ * intent, tools, tokens, cost, timer). Terminals without `agent`/`meter`
74
+ * get the plain rows and a `progress` bar. Spinners and timers are
75
+ * terminal-clocked, so the node only changes when the board state does.
76
+ * `undefined` while nothing is live.
77
+ */
78
+ describeLive(cx: DescribeContext): NativeNode | undefined;
62
79
  /** Render the transient live rows for the current spinner frame. */
63
80
  renderLive(spinner: string): string[];
64
81
  }
@@ -0,0 +1,16 @@
1
+ import type { NativeNode } from "../../native/node.js";
2
+ import type { Component } from "../../tui.js";
3
+ /** The shortcuts overlay; any of `?`, escape or `q` closes it. */
4
+ export declare class GitHelpSheet implements Component {
5
+ #private;
6
+ readonly nativeOverlay: {
7
+ readonly role: "omp.overlay.hotkeys";
8
+ readonly head: "Keyboard shortcuts";
9
+ readonly size: "lg";
10
+ };
11
+ constructor(close: () => void);
12
+ handleInput(data: string): void;
13
+ describe(): NativeNode;
14
+ render(width: number): readonly string[];
15
+ invalidate(): void;
16
+ }
@@ -13,6 +13,7 @@
13
13
  import { Editor } from "../../components/editor.js";
14
14
  import { TextFormField } from "../../components/form.js";
15
15
  import { type ImageBudget } from "../../components/image.js";
16
+ import type { DescribeContext, NativeNode, NativeUiEvent } from "../../native/node.js";
16
17
  import { type AvatarSource } from "./avatar.js";
17
18
  import type { ChangedFile, GitViewState } from "./state.js";
18
19
  /** Generated conventional commit fields shown in the commit form. */
@@ -138,6 +139,23 @@ export declare class Sidebar {
138
139
  /** Select the commit summary input (the `c` shortcut). False on a clean tree. */
139
140
  focusCommitForm(): boolean;
140
141
  handleInput(data: string): void;
142
+ /**
143
+ * The changes sheet (NATIVE_REDESIGN §10): a head with the change count,
144
+ * the branch and a Path/Tree segmented control; one list per section under
145
+ * a quiet head whose `Stage all`/`Unstage all` show on hover; the commit
146
+ * composer docked below. A clean tree shows the HEAD commit instead. Text
147
+ * fields are live `input`/`editor` nodes only while they own the keys, so
148
+ * the terminal's caret follows the keyboard.
149
+ */
150
+ describe(cx: DescribeContext): NativeNode;
151
+ /**
152
+ * Pointer actions on the changes sheet: list clicks select (a folder also
153
+ * folds, a second click on the selected file stages it, as the ANSI click
154
+ * does), double clicks activate, the segmented control switches Path/Tree,
155
+ * and the quiet buttons run their row's action. False when not the
156
+ * sidebar's event.
157
+ */
158
+ handleNativeEvent(event: NativeUiEvent): boolean;
141
159
  /** Wheel scroll over the sidebar. */
142
160
  handleWheel(delta: number): void;
143
161
  /** Left click at sidebar-local coordinates. */
@@ -1,5 +1,6 @@
1
1
  import type { Component } from "../tui.js";
2
2
  import { type KeyId } from "../keys.js";
3
+ import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
3
4
  /** Distinct states of a realtime call connection. */
4
5
  export type LivePhase = "connecting" | "listening" | "working" | "speaking" | "muted" | "error";
5
6
  /** Configuration callbacks for user interactions in the visualizer. */
@@ -28,6 +29,15 @@ export declare class LiveVisualizer implements Component {
28
29
  handleInput(data: string): void;
29
30
  /** Clears the render cache. */
30
31
  invalidate(): void;
32
+ /** The call panel's buttons run the same code as their keys. */
33
+ handleNativeEvent(event: NativeUiEvent): void;
34
+ /**
35
+ * Native call panel: phase status (a spinner while working), the mic level
36
+ * as a `meter` (a `progress` bar on terminals without it), the streaming
37
+ * transcript and the Mute/End buttons. The spectrum animation is
38
+ * ANSI-only; frame ticks leave this node unchanged.
39
+ */
40
+ describe(cx: DescribeContext): NativeNode;
31
41
  /** Renders the microphone spectrum into a compact fixed-height panel. */
32
42
  render(width: number): readonly string[];
33
43
  }
@@ -1,4 +1,5 @@
1
1
  import { type Component, TUI } from "../tui.js";
2
+ import type { NativeNode, NativeUiEvent } from "../native/node.js";
2
3
  import type { DaemonSnapshot, DaemonSpec } from "../tools/daemon.js";
3
4
  import { type PsScope, type PsScopeReport, type PsTarget } from "./ps-data.js";
4
5
  /** Options accepted by the interactive monitor: scope selection from the list flags. */
@@ -27,6 +28,20 @@ export declare class PsTopComponent implements Component {
27
28
  run(): Promise<void>;
28
29
  dispose(): void;
29
30
  handleInput(data: string): void;
31
+ /**
32
+ * Pointer actions: a click selects a process, a double click opens its info
33
+ * (Enter); the scope control switches between the current and all scopes;
34
+ * the action bar runs the same code as the keys, except that a pointer
35
+ * `Kill` asks first (the `x` key stays immediate).
36
+ */
37
+ handleNativeEvent(event: NativeUiEvent): void;
38
+ /**
39
+ * The process monitor as a native page: a head (title, counts, the scope
40
+ * control, freshness, close), one section per broker scope with a
41
+ * selectable process list, the transient status, and an action bar that
42
+ * mirrors the keys. Info and logs replace the list.
43
+ */
44
+ describe(): NativeNode;
30
45
  render(width: number): readonly string[];
31
46
  }
32
47
  /** Run the fullscreen interactive process monitor until the user quits. */
@@ -8,6 +8,7 @@
8
8
  * global theme.
9
9
  */
10
10
  import type { SelectItem } from "../components/select-list.js";
11
+ import { type SelectPickerOptions } from "../native/picker.js";
11
12
  import { TUI, type Component, type OverlayOptions } from "../tui.js";
12
13
  /** Build context for a standalone prompt: the owned UI plus its resolver. */
13
14
  export interface StandaloneTuiContext<T> {
@@ -29,6 +30,8 @@ export declare function runStandaloneTui<T>(build: (context: StandaloneTuiContex
29
30
  export interface StandaloneSelectOptions {
30
31
  currentValue?: string;
31
32
  maxVisible?: number;
33
+ /** How the native picker sheet names and marks its items (`noun`, `icon`). */
34
+ picker?: Pick<SelectPickerOptions, "noun" | "icon" | "subtitle" | "confirm">;
32
35
  }
33
36
  /**
34
37
  * Show a single-column item picker and resolve with the chosen item's value,
@@ -29,6 +29,12 @@ export interface AutocompleteItem {
29
29
  description?: string;
30
30
  /** Optional type-indicator glyph rendered in an aligned column before the label */
31
31
  icon?: string;
32
+ /** Named icon for TSP terminals (`folder`, `file`, a slash-command icon name). */
33
+ iconName?: string;
34
+ /** Native detail when it differs from {@link description} (static text, parent dir). */
35
+ nativeDetail?: string;
36
+ /** Live state drawn right-aligned natively ("demo/demo", "off"). */
37
+ state?: string;
32
38
  /** Dim hint text shown inline after cursor when this item is selected */
33
39
  hint?: string;
34
40
  }
@@ -39,6 +45,8 @@ export interface SlashCommand {
39
45
  description?: string;
40
46
  /** Optional type-indicator glyph shown before the command name in autocomplete */
41
47
  icon?: string;
48
+ /** Named icon for TSP terminals, drawn instead of the {@link icon} glyph. */
49
+ iconName?: string;
42
50
  argumentHint?: string;
43
51
  /** Whether the command consumes argument text after the command name. False means the full input stays normal prompt text once args are present. */
44
52
  allowArgs?: boolean;
@@ -1,11 +1,21 @@
1
1
  import { type Component } from "../tui.js";
2
2
  import type { AdvisorMessageDetails } from "./messages.js";
3
- import type { Theme } from "../theme/index.js";
3
+ import { type Theme } from "../theme/index.js";
4
+ import { type NativeUiEvent } from "../native/node.js";
5
+ /** The advisor card: shared by the controlled expansion getter and native toggles. */
6
+ export interface AdvisorMessageCard extends Component {
7
+ /** Transcript-wide expansion (`Ctrl+O`); clears a toggle made in the terminal. */
8
+ setExpanded(expanded: boolean): void;
9
+ handleNativeEvent(event: NativeUiEvent): void;
10
+ }
4
11
  /**
5
12
  * Display-only transcript card for advisor notes injected into the primary
6
13
  * session. Styled as a distinct voice so notes never blend into thinking
7
14
  * output (whose `thinkingText` color equals `toolOutput` in most themes):
8
15
  * a bold `customMessageLabel` header tag (skill-card convention), a heavy
9
16
  * rail tinted per-note severity, and the note body on the default text color.
17
+ *
18
+ * `getExpanded` owns expansion; a native toggle overrides it for this card
19
+ * until the next transcript-wide change.
10
20
  */
11
- export declare function createAdvisorMessageCard(details: AdvisorMessageDetails | undefined, getExpanded: () => boolean, uiTheme: Theme): Component;
21
+ export declare function createAdvisorMessageCard(details: AdvisorMessageDetails | undefined, getExpanded: () => boolean, uiTheme: Theme): AdvisorMessageCard;
@@ -2,9 +2,11 @@ import type { AssistantMessage, ImageContent } from "@oh-my-pi/pi-ai";
2
2
  import { type Component, Container } from "../tui.js";
3
3
  import { type ImageBudget } from "../components/image.js";
4
4
  import type { AssistantThinkingRenderer } from "./extension-types.js";
5
+ import type { NativeNode, NativeUiEvent } from "../native/node.js";
5
6
  import { type CacheInvalidation } from "./cache-invalidation-marker.js";
6
7
  import { type ServedModelMismatch } from "./served-model-marker.js";
7
8
  import { type TranscriptStableRow } from "../chrome/transcript-container.js";
9
+ import { type TurnUsageSummary } from "../overlays/usage-row.js";
8
10
  /** Test-only: clear the shared gauge so observations don't leak across cases. */
9
11
  export declare function resetThinkingSpeedTracker(): void;
10
12
  /**
@@ -43,6 +45,8 @@ export declare class AssistantMessageComponent extends Container {
43
45
  * against the previous turn's cache footprint.
44
46
  */
45
47
  setCacheInvalidation(info: CacheInvalidation | undefined): void;
48
+ /** Mark this answer as the end of a turn with the turn's totals (native only: ANSI keeps them in the status line). */
49
+ setTurnUsage(summary: TurnUsageSummary | undefined): void;
46
50
  /**
47
51
  * Show or clear the trailing served-model divider. Set once the turn's
48
52
  * signed thinking block (or router report) has named the model that actually
@@ -78,6 +82,22 @@ export declare class AssistantMessageComponent extends Container {
78
82
  setExpanded(expanded: boolean): void;
79
83
  isTranscriptBlockFinalized(): boolean;
80
84
  render(width: number): readonly string[];
85
+ /**
86
+ * A `col` (role `omp.assistant`) of `md` nodes keyed by content index, so
87
+ * streamed deltas reach the terminal as `text append` on the same node;
88
+ * the tail block carries `stream: true` until the message finalizes.
89
+ * Thinking blocks are quiet collapsible `section`s (collapsed per
90
+ * `hideThinkingBlock`): a muted "Thinking…" shimmer while live, then
91
+ * "Thought for 12s"; tokens and rate ride in the head's `title`.
92
+ */
93
+ describe(): NativeNode;
94
+ /**
95
+ * A TTSR rule rewound this partial answer: a native terminal dims it and
96
+ * tags it `↺ rewound` (the ANSI render leaves it as it stopped).
97
+ */
98
+ markRewound(): void;
99
+ /** Mirrors a thinking section collapsed or expanded in the terminal. */
100
+ handleNativeEvent(event: NativeUiEvent): void;
81
101
  /** Width-independent stable identities for the streamed leading thinking run. */
82
102
  getTranscriptStableRows(): readonly TranscriptStableRow[];
83
103
  /**
@@ -5,6 +5,7 @@ import type { ImageContent } from "@oh-my-pi/pi-ai";
5
5
  import { Container, type TUI } from "../tui.js";
6
6
  import type { OutputArtifactError } from "../tools/streaming-output.js";
7
7
  import type { TruncationMeta } from "../tools/output-meta.js";
8
+ import { type DescribeContext, type NativeNode, type NativeUiEvent } from "../native/node.js";
8
9
  /** PTY size for `!` commands: the execution frame's inner content area. */
9
10
  export declare function bashPtyViewport(ui: TUI): {
10
11
  cols: number;
@@ -25,6 +26,14 @@ export declare class BashExecutionComponent extends Container {
25
26
  */
26
27
  setExpanded(expanded: boolean): void;
27
28
  invalidate(): void;
29
+ handleNativeEvent(event: NativeUiEvent): void;
30
+ /**
31
+ * The agent's bash `tool` frame (role `omp.bash`) with a `you` badge: the
32
+ * command in the head, the output as an `ansi` mini terminal following its
33
+ * tail. Terminals without the `tool` kind get a `card` headed by the
34
+ * command.
35
+ */
36
+ describe(cx?: DescribeContext): NativeNode;
28
37
  appendOutput(chunk: string): void;
29
38
  /** Switch to PTY rendering and feed raw terminal bytes through the vterm replay. */
30
39
  appendPtyChunk(chunk: string): void;
@@ -39,7 +39,12 @@ export declare class ChatTranscriptBuilder {
39
39
  rebuild(entries: TranscriptEntry[]): void;
40
40
  /** Append newly persisted entries without rebuilding already rendered rows. */
41
41
  append(entries: TranscriptEntry[]): void;
42
- /** Toggle tool-output expansion across every expandable component. */
42
+ /**
43
+ * Toggle tool-output expansion across every expandable component. Cards a
44
+ * TSP terminal collapsed or expanded locally mirror that into their own
45
+ * state, so this re-applies the transcript-wide state to every one of them
46
+ * even when it equals the previous value.
47
+ */
43
48
  setExpanded(expanded: boolean): void;
44
49
  get expanded(): boolean;
45
50
  /** Rendered row where a persisted entry begins, after the container has painted once. */
@@ -1,10 +1,14 @@
1
1
  import { Container } from "../tui.js";
2
2
  import type { CollabPromptDetails } from "./messages.js";
3
3
  import type { CustomMessage } from "./messages.js";
4
+ import type { NativeNode } from "../native/node.js";
4
5
  /**
5
6
  * Renders a collab guest prompt on every participant's transcript: a
6
7
  * user-message-styled bubble prefixed with the author's name.
7
8
  */
8
9
  export declare class CollabPromptMessageComponent extends Container {
10
+ #private;
9
11
  constructor(message: CustomMessage<CollabPromptDetails>);
12
+ /** A user-toned card headed by the guest's name, with the prompt as markdown. */
13
+ describe(): NativeNode;
10
14
  }
@@ -1,8 +1,16 @@
1
1
  import { type Component } from "../tui.js";
2
2
  import type { BranchSummaryMessage, CompactionSummaryMessage, CustomMessage } from "./messages.js";
3
+ import type { TspSpan } from "@oh-my-pi/pi-wire";
4
+ import { type NativeChild, type NativeNode, type NativeUiEvent } from "../native/node.js";
3
5
  interface SummaryDividerOptions {
4
6
  label: () => string;
7
+ /** Themed spans of the label for native terminals. */
8
+ nativeLabel: () => TspSpan[];
5
9
  detailMarkdown: () => string;
10
+ /** Native body when it differs from the markdown detail. */
11
+ nativeDetail?: () => NativeChild[];
12
+ /** Semantic role of the native section. */
13
+ role: string;
6
14
  }
7
15
  /**
8
16
  * Common summary/detail delegate behind the compaction, handoff, and branch
@@ -14,6 +22,13 @@ declare class SummaryMessageComponent implements Component {
14
22
  #private;
15
23
  constructor(options: SummaryDividerOptions);
16
24
  setExpanded(expanded: boolean): void;
25
+ /**
26
+ * A collapsible `section` headed by the divider label, with the summary
27
+ * markdown as its body; expanding is terminal-local and mirrored back
28
+ * through {@link handleNativeEvent}.
29
+ */
30
+ describe(): NativeNode;
31
+ handleNativeEvent(event: NativeUiEvent): void;
17
32
  setIgnoreTight(ignore: boolean): this;
18
33
  invalidate(): void;
19
34
  dispose(): void;
@@ -5,6 +5,7 @@
5
5
  import { Container, type TUI } from "../tui.js";
6
6
  import type { OutputArtifactError } from "../tools/streaming-output.js";
7
7
  import type { TruncationMeta } from "../tools/output-meta.js";
8
+ import { type DescribeContext, type NativeNode, type NativeUiEvent } from "../native/node.js";
8
9
  export type EvalExecutionLanguage = "python" | "js";
9
10
  export declare class EvalExecutionComponent extends Container {
10
11
  #private;
@@ -18,6 +19,13 @@ export declare class EvalExecutionComponent extends Container {
18
19
  getTranscriptBlockVersion(): number;
19
20
  setExpanded(expanded: boolean): void;
20
21
  invalidate(): void;
22
+ handleNativeEvent(event: NativeUiEvent): void;
23
+ /**
24
+ * The agent's eval `tool` frame (role `omp.eval`) with a `you` badge: the
25
+ * cell source in the head, its output as an `ansi` mini terminal. Terminals
26
+ * without the `tool` kind get a `card` with the cell as `code` over the output.
27
+ */
28
+ describe(cx?: DescribeContext): NativeNode;
21
29
  appendOutput(chunk: string): void;
22
30
  setComplete(exitCode: number | undefined, cancelled: boolean, options?: {
23
31
  output?: string;
@@ -11,6 +11,8 @@ import { Text } from "../components/text.js";
11
11
  import { Container, type TUI } from "../tui.js";
12
12
  import type { OutputArtifactError } from "../tools/streaming-output.js";
13
13
  import { type TruncationMeta } from "../tools/output-meta.js";
14
+ import type { TspText } from "@oh-my-pi/pi-wire";
15
+ import type { NativeChild, NativeNode } from "../native/node.js";
14
16
  /** Output rows shown while an execution is collapsed. */
15
17
  export declare const PREVIEW_LINES = 20;
16
18
  /** Maximum visible columns retained from an execution output line. */
@@ -44,6 +46,62 @@ export declare function buildStatusFooter(opts: {
44
46
  /** Suppress the "… N more lines" hint (used when sixel passthrough renders the full output). */
45
47
  suppressHiddenCount?: boolean;
46
48
  }): Text | undefined;
49
+ /** Inputs for {@link describeExecutionCard}. */
50
+ export interface ExecutionCardInput {
51
+ readonly role: string;
52
+ readonly head: TspText;
53
+ /** Excluded from context (`!!`/`$$`): a muted card. */
54
+ readonly muted: boolean;
55
+ readonly status: ExecutionStatus;
56
+ /** `performance.now()` when the run started; drives the live elapsed timer. */
57
+ readonly startedAt: number;
58
+ readonly expanded: boolean;
59
+ /** Body nodes before the output (the eval cell's code). */
60
+ readonly lead?: readonly NativeChild[];
61
+ /** Raw terminal output. */
62
+ readonly output: string;
63
+ readonly images?: readonly NativeChild[];
64
+ readonly exitCode: number | undefined;
65
+ readonly truncation: TruncationMeta | undefined;
66
+ readonly artifactError?: OutputArtifactError;
67
+ }
68
+ /**
69
+ * Native card shared by user bash/eval runs: the head with a live `elapsed`
70
+ * while running, the output as an `ansi` mini terminal that follows its tail
71
+ * while running, a cancel hint spinner, then exit/truncation notes. The
72
+ * terminal clamps the collapsed body and owns the "N more lines" affordance.
73
+ */
74
+ export declare function describeExecutionCard(input: ExecutionCardInput): NativeNode;
75
+ /** Inputs for {@link describeExecutionTool}. */
76
+ export interface ExecutionToolInput {
77
+ readonly role: string;
78
+ /** Tool name for the head icon (`bash`, `eval`). */
79
+ readonly name: string;
80
+ readonly title: string;
81
+ /** The command / cell source, shown once in the head. */
82
+ readonly command: string;
83
+ readonly lang: string;
84
+ /** Excluded from context (`!!`/`$$`). */
85
+ readonly excluded: boolean;
86
+ readonly status: ExecutionStatus;
87
+ /** `performance.now()` when the run started / ended. */
88
+ readonly startedAt: number;
89
+ readonly endedAt: number | undefined;
90
+ readonly expanded: boolean;
91
+ /** Raw terminal output. */
92
+ readonly output: string;
93
+ readonly images?: readonly NativeChild[];
94
+ readonly exitCode: number | undefined;
95
+ readonly truncation: TruncationMeta | undefined;
96
+ readonly artifactError?: OutputArtifactError;
97
+ }
98
+ /**
99
+ * A user `!`/`$` run as the agent's `tool` frame (§6.6): the command in the
100
+ * head with a `you` badge (plus `not sent` when excluded from context), the
101
+ * timer, exit chip and cancelled note; the body is the output as an `ansi`
102
+ * mini terminal following its tail, then one quiet truncation line.
103
+ */
104
+ export declare function describeExecutionTool(input: ExecutionToolInput): NativeNode;
47
105
  /**
48
106
  * Derive the post-run status from an exit code + cancellation flag using the
49
107
  * same precedence both execution components apply.
@@ -1,4 +1,5 @@
1
- import { Container } from "../tui.js";
1
+ import { type Component, Container } from "../tui.js";
2
+ import { type NativeNode, type NativeUiEvent } from "../native/node.js";
2
3
  /** One file's worth of late LSP diagnostics, as carried on the transcript message. */
3
4
  export interface LateDiagnosticsFile {
4
5
  path?: string;
@@ -6,6 +7,13 @@ export interface LateDiagnosticsFile {
6
7
  errored?: boolean;
7
8
  messages?: string[];
8
9
  }
10
+ /**
11
+ * Native terminals append late diagnostics into the edit/write frame they
12
+ * belong to: each file goes to the most recent tool component in `blocks`
13
+ * that accepts it. Returns the files no frame took (all of them on the ANSI
14
+ * path), for the standalone {@link LateDiagnosticsMessageComponent}.
15
+ */
16
+ export declare function routeLateDiagnostics(blocks: readonly Component[], files: readonly LateDiagnosticsFile[]): LateDiagnosticsFile[];
9
17
  /**
10
18
  * Renders late LSP diagnostics (arrived after edit/write returned) in the
11
19
  * transcript, reusing the same tree renderer the edit/write tools use so the
@@ -17,5 +25,11 @@ export declare class LateDiagnosticsMessageComponent extends Container {
17
25
  setExpanded(expanded: boolean): void;
18
26
  setToolActivityVisible(visible: boolean): void;
19
27
  render(width: number): readonly string[];
28
+ handleNativeEvent(event: NativeUiEvent): void;
29
+ /**
30
+ * A severity-toned card (role `omp.diagnostics.late`) with one wrapped line
31
+ * per diagnostic, clamped by the terminal while collapsed.
32
+ */
33
+ describe(): NativeNode;
20
34
  invalidate(): void;
21
35
  }
@@ -3,6 +3,7 @@ import { type Component } from "../tui.js";
3
3
  import { Container } from "../tui.js";
4
4
  import { type ReadRenderArgs } from "../tools/read.js";
5
5
  import type { ToolExecutionHandle } from "./tool-execution.js";
6
+ import { type DescribeContext, type NativeNode, type NativeUiEvent } from "../native/node.js";
6
7
  export declare function readArgsHaveTarget(args: unknown): boolean;
7
8
  /**
8
9
  * Whether a read collapses into the compact {@link ReadToolGroupComponent}
@@ -63,5 +64,19 @@ export declare class ReadToolGroupComponent extends Container implements ToolExe
63
64
  setExpanded(expanded: boolean): void;
64
65
  setToolActivityVisible(visible: boolean): void;
65
66
  getComponent(): Component;
67
+ /**
68
+ * Mirrors the terminal's toggles: the `tool` head (the group's root) is
69
+ * `Ctrl+O`'s expansion; a fallback preview card collapses on its own
70
+ * (`setExpanded` resets those).
71
+ */
72
+ handleNativeEvent(event: NativeUiEvent): void;
73
+ /**
74
+ * The read run as one inline `tool` on terminals that list the kind, else
75
+ * the fallback: a bare `card` (role `omp.tool.read`) with `Read <path>` or
76
+ * `Read (N)` in the head, a `list` of path items (status tone, link,
77
+ * correction and conflict detail, nested usage) and, with content previews
78
+ * on, a `code` block per read clamped by the card's preview while collapsed.
79
+ */
80
+ describe(cx?: DescribeContext): NativeNode;
66
81
  }
67
82
  export {};
@@ -1,5 +1,6 @@
1
1
  import { Container } from "../tui.js";
2
2
  import type { CustomMessage, SkillPromptDetails } from "./messages.js";
3
+ import { type NativeNode, type NativeUiEvent } from "../native/node.js";
3
4
  /**
4
5
  * Transcript row for a user-invoked skill. Two layouts, chosen by where the
5
6
  * `/skill:<name>` token sat in the submitted draft:
@@ -17,6 +18,14 @@ export declare class SkillMessageComponent extends Container {
17
18
  #private;
18
19
  constructor(message: CustomMessage<SkillPromptDetails>, imageLinks?: readonly (string | undefined)[]);
19
20
  setExpanded(expanded: boolean): void;
21
+ handleNativeEvent(event: NativeUiEvent): void;
22
+ /**
23
+ * A user-toned card (role `omp.skill`): the skill chip (linked to its
24
+ * SKILL.md) and prompt size in the head, the user's draft as markdown, and
25
+ * the loaded skill prompt, described only while expanded because it can
26
+ * be large.
27
+ */
28
+ describe(): NativeNode;
20
29
  /**
21
30
  * Transcript finalization contract (see `FinalizableBlock`): an optimistic
22
31
  * `/skill:` row reports `false` so the container keeps it live and removable
@@ -1,4 +1,5 @@
1
1
  import { Text } from "../components/text.js";
2
+ import type { NativeNode } from "../native/node.js";
2
3
  /**
3
4
  * Dim transcript marker for tool calls stripped from the resolved branch
4
5
  * (failed/retried turns, results on sibling branches). It is tool activity,
@@ -8,5 +9,7 @@ export declare class StrippedToolCallsPlaceholder extends Text {
8
9
  #private;
9
10
  constructor(strippedToolCalls: number, toolActivityVisible: boolean);
10
11
  setToolActivityVisible(visible: boolean): void;
12
+ /** A dim italic note, mounted but hidden while tool activity is hidden. */
13
+ describe(): NativeNode;
11
14
  render(width: number): readonly string[];
12
15
  }
@@ -1,5 +1,6 @@
1
1
  import { Container } from "../tui.js";
2
- import type { TodoItem } from "../tools/todo.js";
2
+ import { type TodoItem } from "../tools/todo.js";
3
+ import type { DescribeContext, NativeNode } from "../native/node.js";
3
4
  /**
4
5
  * Component that renders a todo completion reminder notification, committed into
5
6
  * the transcript like a TTSR notification so it stays anchored in history rather
@@ -10,4 +11,6 @@ export declare class TodoReminderComponent extends Container {
10
11
  #private;
11
12
  constructor(todos: TodoItem[], attempt: number, maxAttempts: number);
12
13
  setToolActivityVisible(visible: boolean): void;
14
+ /** A `checklist` reminder of the open items where the terminal lists the kind (§7.5); else the notice card. */
15
+ describe(cx?: DescribeContext): NativeNode;
13
16
  }