@linxiraos/pi-tui 1.4.6 → 1.4.9

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 (399) hide show
  1. package/CHANGELOG.md +162 -244
  2. package/README.md +41 -35
  3. package/dist/types/app-keybindings.d.ts +20 -0
  4. package/dist/types/apps/session-picker.d.ts +5 -0
  5. package/dist/types/charts/chart-plan.d.ts +9 -7
  6. package/dist/types/charts/table-data.d.ts +4 -2
  7. package/dist/types/chat/assistant-message.d.ts +15 -3
  8. package/dist/types/chat/bash-execution.d.ts +6 -1
  9. package/dist/types/chat/display-preferences.d.ts +2 -0
  10. package/dist/types/chat/eval-execution.d.ts +2 -0
  11. package/dist/types/chat/execution-shared.d.ts +14 -8
  12. package/dist/types/chat/extension-types.d.ts +31 -0
  13. package/dist/types/chat/figure-markdown.d.ts +2 -0
  14. package/dist/types/chat/reply-write.d.ts +48 -0
  15. package/dist/types/chat/svg-figure.d.ts +5 -0
  16. package/dist/types/chat/table-chart.d.ts +6 -3
  17. package/dist/types/chat/tool-execution.d.ts +1 -2
  18. package/dist/types/chat/transcript-outline.d.ts +7 -0
  19. package/dist/types/chat/transcript-render-helpers.d.ts +13 -3
  20. package/dist/types/chrome/dynamic-border.d.ts +6 -0
  21. package/dist/types/chrome/index.d.ts +1 -0
  22. package/dist/types/chrome/transcript-notice.d.ts +35 -0
  23. package/dist/types/chrome/transcript-status.d.ts +21 -9
  24. package/dist/types/components/editor.d.ts +23 -6
  25. package/dist/types/components/image.d.ts +6 -0
  26. package/dist/types/components/loader.d.ts +2 -0
  27. package/dist/types/components/markdown.d.ts +7 -0
  28. package/dist/types/keybinding-matchers.d.ts +7 -0
  29. package/dist/types/native/blobs.d.ts +2 -1
  30. package/dist/types/native/describe.d.ts +4 -2
  31. package/dist/types/native/node.d.ts +2 -3
  32. package/dist/types/native/overlay.d.ts +42 -2
  33. package/dist/types/native/picker.d.ts +4 -4
  34. package/dist/types/native/state.d.ts +4 -0
  35. package/dist/types/overlays/annotation-overlay.d.ts +7 -1
  36. package/dist/types/overlays/annotation-types.d.ts +28 -0
  37. package/dist/types/overlays/btw-history-panel.d.ts +15 -0
  38. package/dist/types/overlays/btw-history.d.ts +24 -0
  39. package/dist/types/overlays/btw-inject.d.ts +22 -0
  40. package/dist/types/overlays/btw-panel.d.ts +7 -0
  41. package/dist/types/overlays/hook-editor.d.ts +2 -0
  42. package/dist/types/overlays/jobs-panel.d.ts +4 -0
  43. package/dist/types/overlays/login-dialog.d.ts +5 -1
  44. package/dist/types/overlays/model-browser.d.ts +11 -2
  45. package/dist/types/overlays/oauth-selector.d.ts +23 -0
  46. package/dist/types/overlays/plan-review-overlay.d.ts +2 -0
  47. package/dist/types/overlays/rewind-selector.d.ts +1 -1
  48. package/dist/types/overlays/session-selector.d.ts +33 -4
  49. package/dist/types/prompt/composer.d.ts +56 -5
  50. package/dist/types/prompt/interactive-context-helpers.d.ts +10 -3
  51. package/dist/types/render/extension-links.d.ts +65 -0
  52. package/dist/types/render/hyperlink.d.ts +25 -7
  53. package/dist/types/render/index.d.ts +1 -0
  54. package/dist/types/render/render-utils.d.ts +23 -1
  55. package/dist/types/setup/scenes/glyph.d.ts +1 -1
  56. package/dist/types/setup/scenes/model.d.ts +1 -1
  57. package/dist/types/setup/scenes/outro.d.ts +5 -4
  58. package/dist/types/setup/scenes/sign-in.d.ts +13 -8
  59. package/dist/types/setup/scenes/types.d.ts +16 -1
  60. package/dist/types/setup/startup-splash.d.ts +1 -1
  61. package/dist/types/setup/wizard-overlay.d.ts +11 -7
  62. package/dist/types/setup/wizard.d.ts +5 -1
  63. package/dist/types/status-line/component.d.ts +1 -1
  64. package/dist/types/status-line/context-usage.d.ts +28 -6
  65. package/dist/types/status-line/host.d.ts +6 -2
  66. package/dist/types/status-line/startup.d.ts +0 -15
  67. package/dist/types/terminal-capabilities.d.ts +1 -1
  68. package/dist/types/theme/symbols.d.ts +3 -1
  69. package/dist/types/theme/theme-class.d.ts +1 -0
  70. package/dist/types/theme/theme.d.ts +1 -24
  71. package/dist/types/theme/tui-adapters.d.ts +2 -0
  72. package/dist/types/thinking.d.ts +8 -6
  73. package/dist/types/tools/ast-grep.d.ts +2 -0
  74. package/dist/types/tools/bash-interactive.d.ts +6 -0
  75. package/dist/types/tools/bash.d.ts +2 -0
  76. package/dist/types/tools/default-renderer.d.ts +6 -4
  77. package/dist/types/tools/eval.d.ts +2 -0
  78. package/dist/types/tools/find.d.ts +1 -1
  79. package/dist/types/tools/grouped-file-output.d.ts +100 -19
  80. package/dist/types/tools/hashline-format.d.ts +5 -0
  81. package/dist/types/tools/irc.d.ts +6 -0
  82. package/dist/types/tools/json-tree.d.ts +23 -4
  83. package/dist/types/tools/lsp.d.ts +2 -0
  84. package/dist/types/tools/mcp.d.ts +6 -5
  85. package/dist/types/tools/native-view.d.ts +3 -1
  86. package/dist/types/tools/output-meta.d.ts +27 -0
  87. package/dist/types/tools/read.d.ts +14 -4
  88. package/dist/types/tools/renderer.d.ts +2 -0
  89. package/dist/types/tools/streaming-output.d.ts +11 -0
  90. package/dist/types/tools/task.d.ts +13 -4
  91. package/dist/types/tools/url-scheme-host.d.ts +17 -0
  92. package/dist/types/tools/wait.d.ts +2 -0
  93. package/dist/types/tools/yield.d.ts +1 -1
  94. package/dist/types/tui.d.ts +19 -2
  95. package/dist/types/utils.d.ts +4 -0
  96. package/package.json +10 -14
  97. package/src/app-keybindings.d.ts +20 -0
  98. package/src/app-keybindings.ts +20 -0
  99. package/src/apps/git/git-tui.ts +10 -17
  100. package/src/apps/git/sidebar.ts +21 -35
  101. package/src/apps/ps-top.ts +4 -12
  102. package/src/apps/session-picker.ts +7 -0
  103. package/src/charts/chart-plan.d.ts +9 -7
  104. package/src/charts/chart-plan.ts +20 -79
  105. package/src/charts/table-data.d.ts +4 -2
  106. package/src/charts/table-data.ts +55 -6
  107. package/src/chat/advisor-message.ts +2 -0
  108. package/src/chat/assistant-message.d.ts +15 -3
  109. package/src/chat/assistant-message.ts +137 -19
  110. package/src/chat/background-tan-message.ts +4 -0
  111. package/src/chat/bash-execution.d.ts +6 -1
  112. package/src/chat/bash-execution.ts +26 -9
  113. package/src/chat/chat-transcript-builder.ts +63 -30
  114. package/src/chat/compaction-summary-message.ts +2 -1
  115. package/src/chat/display-preferences.d.ts +2 -0
  116. package/src/chat/display-preferences.ts +3 -0
  117. package/src/chat/eval-execution.d.ts +2 -0
  118. package/src/chat/eval-execution.ts +14 -7
  119. package/src/chat/execution-shared.d.ts +14 -8
  120. package/src/chat/execution-shared.ts +39 -18
  121. package/src/chat/extension-types.d.ts +31 -0
  122. package/src/chat/extension-types.ts +34 -0
  123. package/src/chat/figure-markdown.d.ts +2 -0
  124. package/src/chat/figure-markdown.ts +6 -4
  125. package/src/chat/read-tool-group.ts +56 -36
  126. package/src/chat/reply-write.d.ts +48 -0
  127. package/src/chat/reply-write.ts +127 -0
  128. package/src/chat/svg-figure.d.ts +5 -0
  129. package/src/chat/svg-figure.ts +55 -16
  130. package/src/chat/table-chart.d.ts +6 -3
  131. package/src/chat/table-chart.ts +29 -6
  132. package/src/chat/tool-execution.d.ts +1 -2
  133. package/src/chat/tool-execution.ts +20 -13
  134. package/src/chat/transcript-outline.d.ts +7 -0
  135. package/src/chat/transcript-outline.ts +27 -0
  136. package/src/chat/transcript-render-helpers.d.ts +13 -3
  137. package/src/chat/transcript-render-helpers.ts +134 -44
  138. package/src/chrome/dynamic-border.d.ts +6 -0
  139. package/src/chrome/dynamic-border.ts +28 -2
  140. package/src/chrome/index.ts +1 -0
  141. package/src/chrome/transcript-notice.d.ts +35 -0
  142. package/src/chrome/transcript-notice.ts +83 -0
  143. package/src/chrome/transcript-status.d.ts +21 -9
  144. package/src/chrome/transcript-status.ts +32 -30
  145. package/src/components/editor.d.ts +23 -6
  146. package/src/components/editor.ts +133 -25
  147. package/src/components/image.d.ts +6 -0
  148. package/src/components/image.ts +13 -0
  149. package/src/components/key-value-list.ts +9 -9
  150. package/src/components/loader.d.ts +2 -0
  151. package/src/components/loader.ts +7 -0
  152. package/src/components/markdown.d.ts +7 -0
  153. package/src/components/markdown.ts +116 -6
  154. package/src/components/section.ts +1 -9
  155. package/src/components/table.ts +1 -9
  156. package/src/hotkeys-markdown.ts +1 -0
  157. package/src/keybinding-matchers.d.ts +7 -0
  158. package/src/keybinding-matchers.ts +13 -0
  159. package/src/native/backend.ts +10 -67
  160. package/src/native/blobs.d.ts +2 -1
  161. package/src/native/blobs.ts +3 -2
  162. package/src/native/describe.d.ts +4 -2
  163. package/src/native/describe.ts +9 -4
  164. package/src/native/node.d.ts +2 -3
  165. package/src/native/node.ts +2 -3
  166. package/src/native/overlay.d.ts +42 -2
  167. package/src/native/overlay.ts +124 -16
  168. package/src/native/picker.d.ts +4 -4
  169. package/src/native/picker.ts +4 -4
  170. package/src/native/state.d.ts +4 -0
  171. package/src/native/state.ts +25 -5
  172. package/src/overlays/advisor-config.ts +1 -10
  173. package/src/overlays/annotation-overlay.ts +125 -37
  174. package/src/overlays/annotation-types.ts +24 -0
  175. package/src/overlays/btw-history-panel.ts +106 -14
  176. package/src/overlays/btw-history.ts +65 -0
  177. package/src/overlays/btw-inject.ts +91 -0
  178. package/src/overlays/btw-panel.ts +53 -12
  179. package/src/overlays/extensions/extension-dashboard.ts +7 -8
  180. package/src/overlays/hook-editor.ts +6 -0
  181. package/src/overlays/hook-selector.ts +2 -2
  182. package/src/overlays/jobs-panel.ts +82 -22
  183. package/src/overlays/login-dialog.ts +39 -31
  184. package/src/overlays/mcp-add-wizard.ts +1 -1
  185. package/src/overlays/model-browser.ts +106 -10
  186. package/src/overlays/model-hub.ts +1 -7
  187. package/src/overlays/model-picker.ts +1 -10
  188. package/src/overlays/oauth-selector.ts +44 -6
  189. package/src/overlays/plan-review-overlay.ts +13 -2
  190. package/src/overlays/rewind-selector.ts +29 -12
  191. package/src/overlays/session-selector.ts +338 -47
  192. package/src/overlays/settings-defs.ts +2 -2
  193. package/src/overlays/tree-selector.ts +83 -27
  194. package/src/overlays/usage-dashboard.ts +9 -18
  195. package/src/prompt/composer.ts +233 -6
  196. package/src/prompt/custom-editor.ts +6 -1
  197. package/src/prompt/emoji-autocomplete.ts +0 -2
  198. package/src/prompt/interactive-context-helpers.ts +29 -4
  199. package/src/render/code-cell.ts +1 -1
  200. package/src/render/extension-links.d.ts +65 -0
  201. package/src/render/extension-links.ts +214 -0
  202. package/src/render/file-list.ts +4 -7
  203. package/src/render/hyperlink.d.ts +25 -7
  204. package/src/render/hyperlink.ts +65 -9
  205. package/src/render/index.d.ts +1 -0
  206. package/src/render/index.ts +1 -0
  207. package/src/render/render-utils.d.ts +23 -1
  208. package/src/render/render-utils.ts +38 -6
  209. package/src/setup/scenes/composer.ts +2 -0
  210. package/src/setup/scenes/glyph.ts +4 -2
  211. package/src/setup/scenes/model.ts +192 -29
  212. package/src/setup/scenes/outro.ts +33 -15
  213. package/src/setup/scenes/sign-in.ts +196 -400
  214. package/src/setup/scenes/theme.ts +2 -0
  215. package/src/setup/scenes/types.ts +18 -1
  216. package/src/setup/startup-splash.ts +8 -7
  217. package/src/setup/wizard-overlay.ts +164 -35
  218. package/src/setup/wizard.ts +11 -2
  219. package/src/status-line/component.ts +4 -10
  220. package/src/status-line/context-usage.ts +72 -21
  221. package/src/status-line/host.ts +6 -2
  222. package/src/status-line/startup.ts +36 -70
  223. package/src/terminal-capabilities.d.ts +1 -1
  224. package/src/terminal-capabilities.ts +5 -0
  225. package/src/terminal.ts +24 -2
  226. package/src/theme/defaults.json +1 -0
  227. package/src/theme/loader.ts +1 -1
  228. package/src/theme/symbols.d.ts +3 -1
  229. package/src/theme/symbols.ts +16 -9
  230. package/src/theme/theme-class.d.ts +1 -0
  231. package/src/theme/theme-class.ts +15 -3
  232. package/src/theme/theme.d.ts +1 -24
  233. package/src/theme/theme.ts +3 -75
  234. package/src/theme/tui-adapters.d.ts +2 -0
  235. package/src/theme/tui-adapters.ts +8 -3
  236. package/src/thinking.d.ts +8 -6
  237. package/src/thinking.ts +17 -11
  238. package/src/tmux.ts +1 -0
  239. package/src/tools/agent-tree.ts +13 -11
  240. package/src/tools/ask.ts +24 -37
  241. package/src/tools/ast-edit.ts +48 -93
  242. package/src/tools/ast-grep.d.ts +2 -0
  243. package/src/tools/ast-grep.ts +31 -67
  244. package/src/tools/bash-interactive.d.ts +49 -0
  245. package/src/tools/bash-interactive.ts +6 -1
  246. package/src/tools/bash.d.ts +2 -0
  247. package/src/tools/bash.ts +9 -0
  248. package/src/tools/default-renderer.d.ts +6 -4
  249. package/src/tools/default-renderer.ts +10 -7
  250. package/src/tools/edit.ts +50 -43
  251. package/src/tools/eval.d.ts +2 -0
  252. package/src/tools/eval.ts +16 -4
  253. package/src/tools/fetch.ts +2 -1
  254. package/src/tools/find.d.ts +1 -1
  255. package/src/tools/find.ts +13 -5
  256. package/src/tools/github.ts +14 -46
  257. package/src/tools/glob.ts +2 -1
  258. package/src/tools/grep.ts +47 -277
  259. package/src/tools/grouped-file-output.d.ts +100 -19
  260. package/src/tools/grouped-file-output.ts +414 -103
  261. package/src/tools/hashline-format.d.ts +5 -0
  262. package/src/tools/hashline-format.ts +5 -0
  263. package/src/tools/irc.d.ts +6 -0
  264. package/src/tools/irc.ts +6 -0
  265. package/src/tools/job-widget.ts +13 -1
  266. package/src/tools/json-tree.d.ts +23 -4
  267. package/src/tools/json-tree.ts +132 -46
  268. package/src/tools/lsp.d.ts +2 -0
  269. package/src/tools/lsp.ts +246 -47
  270. package/src/tools/mcp.d.ts +6 -5
  271. package/src/tools/mcp.ts +20 -12
  272. package/src/tools/native-view.d.ts +3 -1
  273. package/src/tools/native-view.ts +12 -6
  274. package/src/tools/output-meta.d.ts +27 -0
  275. package/src/tools/output-meta.ts +68 -4
  276. package/src/tools/proc-render.ts +3 -3
  277. package/src/tools/read.d.ts +14 -4
  278. package/src/tools/read.ts +20 -5
  279. package/src/tools/renderer.d.ts +2 -0
  280. package/src/tools/renderer.ts +2 -0
  281. package/src/tools/streaming-output.d.ts +11 -0
  282. package/src/tools/streaming-output.ts +41 -0
  283. package/src/tools/task.d.ts +13 -4
  284. package/src/tools/task.ts +100 -97
  285. package/src/tools/url-scheme-host.d.ts +17 -0
  286. package/src/tools/url-scheme-host.ts +21 -0
  287. package/src/tools/vibe.ts +4 -4
  288. package/src/tools/wait.d.ts +2 -0
  289. package/src/tools/wait.ts +8 -5
  290. package/src/tools/write.ts +17 -27
  291. package/src/tools/yield.d.ts +1 -1
  292. package/src/tools/yield.ts +19 -10
  293. package/src/tui.d.ts +19 -2
  294. package/src/tui.ts +134 -24
  295. package/src/utils.d.ts +4 -0
  296. package/src/utils.ts +10 -0
  297. package/dist/types/theme/defaults/index.d.ts +0 -10289
  298. package/src/theme/defaults/alabaster.json +0 -103
  299. package/src/theme/defaults/amethyst.json +0 -106
  300. package/src/theme/defaults/anthracite.json +0 -103
  301. package/src/theme/defaults/basalt.json +0 -101
  302. package/src/theme/defaults/birch.json +0 -105
  303. package/src/theme/defaults/dark-abyss.json +0 -101
  304. package/src/theme/defaults/dark-arctic.json +0 -114
  305. package/src/theme/defaults/dark-aurora.json +0 -105
  306. package/src/theme/defaults/dark-catppuccin.json +0 -117
  307. package/src/theme/defaults/dark-cavern.json +0 -101
  308. package/src/theme/defaults/dark-celestial.json +0 -116
  309. package/src/theme/defaults/dark-copper.json +0 -105
  310. package/src/theme/defaults/dark-cosmos.json +0 -100
  311. package/src/theme/defaults/dark-cyberpunk.json +0 -112
  312. package/src/theme/defaults/dark-dracula.json +0 -108
  313. package/src/theme/defaults/dark-eclipse.json +0 -101
  314. package/src/theme/defaults/dark-ember.json +0 -105
  315. package/src/theme/defaults/dark-equinox.json +0 -100
  316. package/src/theme/defaults/dark-forest.json +0 -106
  317. package/src/theme/defaults/dark-github.json +0 -115
  318. package/src/theme/defaults/dark-gruvbox.json +0 -122
  319. package/src/theme/defaults/dark-lavender.json +0 -105
  320. package/src/theme/defaults/dark-lunar.json +0 -99
  321. package/src/theme/defaults/dark-midnight.json +0 -105
  322. package/src/theme/defaults/dark-monochrome.json +0 -104
  323. package/src/theme/defaults/dark-monokai.json +0 -108
  324. package/src/theme/defaults/dark-nebula.json +0 -100
  325. package/src/theme/defaults/dark-neon-noir.json +0 -110
  326. package/src/theme/defaults/dark-nord.json +0 -108
  327. package/src/theme/defaults/dark-ocean.json +0 -111
  328. package/src/theme/defaults/dark-one.json +0 -110
  329. package/src/theme/defaults/dark-poimandres.json +0 -125
  330. package/src/theme/defaults/dark-rainforest.json +0 -101
  331. package/src/theme/defaults/dark-reef.json +0 -101
  332. package/src/theme/defaults/dark-retro.json +0 -102
  333. package/src/theme/defaults/dark-rose-pine.json +0 -106
  334. package/src/theme/defaults/dark-sakura.json +0 -105
  335. package/src/theme/defaults/dark-slate.json +0 -105
  336. package/src/theme/defaults/dark-solarized.json +0 -107
  337. package/src/theme/defaults/dark-solstice.json +0 -100
  338. package/src/theme/defaults/dark-starfall.json +0 -101
  339. package/src/theme/defaults/dark-sunset.json +0 -109
  340. package/src/theme/defaults/dark-swamp.json +0 -100
  341. package/src/theme/defaults/dark-synthwave.json +0 -113
  342. package/src/theme/defaults/dark-taiga.json +0 -101
  343. package/src/theme/defaults/dark-terminal.json +0 -105
  344. package/src/theme/defaults/dark-tokyo-night.json +0 -111
  345. package/src/theme/defaults/dark-tundra.json +0 -101
  346. package/src/theme/defaults/dark-twilight.json +0 -101
  347. package/src/theme/defaults/dark-volcanic.json +0 -101
  348. package/src/theme/defaults/graphite.json +0 -102
  349. package/src/theme/defaults/index.d.ts +0 -10289
  350. package/src/theme/defaults/index.ts +0 -203
  351. package/src/theme/defaults/light-arctic.json +0 -117
  352. package/src/theme/defaults/light-aurora-day.json +0 -101
  353. package/src/theme/defaults/light-canyon.json +0 -101
  354. package/src/theme/defaults/light-catppuccin.json +0 -116
  355. package/src/theme/defaults/light-cirrus.json +0 -100
  356. package/src/theme/defaults/light-coral.json +0 -105
  357. package/src/theme/defaults/light-cyberpunk.json +0 -106
  358. package/src/theme/defaults/light-dawn.json +0 -100
  359. package/src/theme/defaults/light-dunes.json +0 -101
  360. package/src/theme/defaults/light-eucalyptus.json +0 -105
  361. package/src/theme/defaults/light-forest.json +0 -110
  362. package/src/theme/defaults/light-frost.json +0 -105
  363. package/src/theme/defaults/light-github.json +0 -125
  364. package/src/theme/defaults/light-glacier.json +0 -101
  365. package/src/theme/defaults/light-gruvbox.json +0 -118
  366. package/src/theme/defaults/light-haze.json +0 -100
  367. package/src/theme/defaults/light-honeycomb.json +0 -105
  368. package/src/theme/defaults/light-lagoon.json +0 -101
  369. package/src/theme/defaults/light-lavender.json +0 -105
  370. package/src/theme/defaults/light-meadow.json +0 -101
  371. package/src/theme/defaults/light-mint.json +0 -105
  372. package/src/theme/defaults/light-monochrome.json +0 -111
  373. package/src/theme/defaults/light-ocean.json +0 -109
  374. package/src/theme/defaults/light-one.json +0 -109
  375. package/src/theme/defaults/light-opal.json +0 -101
  376. package/src/theme/defaults/light-orchard.json +0 -101
  377. package/src/theme/defaults/light-paper.json +0 -105
  378. package/src/theme/defaults/light-poimandres.json +0 -125
  379. package/src/theme/defaults/light-prism.json +0 -100
  380. package/src/theme/defaults/light-retro.json +0 -108
  381. package/src/theme/defaults/light-sand.json +0 -105
  382. package/src/theme/defaults/light-savanna.json +0 -101
  383. package/src/theme/defaults/light-solarized.json +0 -112
  384. package/src/theme/defaults/light-soleil.json +0 -100
  385. package/src/theme/defaults/light-sunset.json +0 -109
  386. package/src/theme/defaults/light-synthwave.json +0 -108
  387. package/src/theme/defaults/light-tokyo-night.json +0 -121
  388. package/src/theme/defaults/light-wetland.json +0 -101
  389. package/src/theme/defaults/light-zenith.json +0 -99
  390. package/src/theme/defaults/limestone.json +0 -104
  391. package/src/theme/defaults/mahogany.json +0 -107
  392. package/src/theme/defaults/marble.json +0 -103
  393. package/src/theme/defaults/obsidian.json +0 -101
  394. package/src/theme/defaults/onyx.json +0 -101
  395. package/src/theme/defaults/pearl.json +0 -103
  396. package/src/theme/defaults/porcelain.json +0 -101
  397. package/src/theme/defaults/quartz.json +0 -106
  398. package/src/theme/defaults/sandstone.json +0 -105
  399. package/src/theme/defaults/titanium.json +0 -100
@@ -2,7 +2,9 @@ export type SymbolPreset = "unicode" | "nerd" | "ascii";
2
2
  /**
3
3
  * All available symbol keys organized by category.
4
4
  */
5
- export type SymbolKey = "status.success" | "status.error" | "status.warning" | "status.info" | "status.pending" | "status.disabled" | "status.enabled" | "status.running" | "status.shadowed" | "status.aborted" | "status.done" | "nav.cursor" | "nav.selected" | "nav.expand" | "nav.collapse" | "nav.back" | "tree.branch" | "tree.last" | "tree.vertical" | "tree.horizontal" | "tree.hook" | "progress.filled" | "progress.empty" | "context.speculation" | "context.compaction" | "context.content" | "context.messages" | "context.buffer" | "context.free" | "boxRound.topLeft" | "boxRound.topRight" | "boxRound.bottomLeft" | "boxRound.bottomRight" | "boxRound.horizontal" | "boxRound.vertical" | "boxDotted.horizontal" | "boxDotted.vertical" | "boxSharp.topLeft" | "boxSharp.topRight" | "boxSharp.bottomLeft" | "boxSharp.bottomRight" | "boxSharp.horizontal" | "boxSharp.vertical" | "boxSharp.cross" | "boxSharp.teeDown" | "boxSharp.teeUp" | "boxSharp.teeRight" | "boxSharp.teeLeft" | "sep.powerline" | "sep.powerlineThin" | "sep.powerlineLeft" | "sep.powerlineRight" | "sep.powerlineThinLeft" | "sep.powerlineThinRight" | "sep.powerlineCapLeft" | "sep.block" | "sep.space" | "sep.asciiLeft" | "sep.asciiRight" | "sep.dot" | "sep.slash" | "sep.pipe" | "icon.model" | "icon.plan" | "icon.prewalk" | "icon.goal" | "icon.pause" | "icon.loop" | "icon.folder" | "icon.worktree" | "icon.search" | "icon.scratchFolder" | "icon.file" | "icon.git" | "icon.branch" | "icon.pr" | "icon.pin" | "icon.tokens" | "icon.context" | "icon.cost" | "icon.subscription" | "icon.advisor" | "icon.advisorClosed" | "icon.time" | "icon.omp" | "icon.ghost" | "icon.agents" | "icon.job" | "icon.cache" | "icon.cacheMiss" | "icon.input" | "icon.output" | "icon.throughput" | "icon.intelligence" | "icon.host" | "icon.session" | "icon.package" | "icon.warning" | "icon.rewind" | "icon.auto" | "icon.fast" | "icon.extensionSkill" | "icon.extensionTool" | "icon.extensionSlashCommand" | "icon.extensionMcp" | "icon.extensionRule" | "icon.extensionHook" | "icon.extensionPrompt" | "icon.extensionContextFile" | "icon.extensionInstruction" | "icon.vimNormal" | "icon.vimInsert" | "icon.vimVisual" | "icon.vimVisualLine" | "icon.vimReplace" | "cmd.action" | "cmd.prompt" | "cmd.extension" | "cmd.settings" | "cmd.gear" | "cmd.shield" | "cmd.wave" | "cmd.compass" | "cmd.inbox" | "cmd.swap" | "cmd.expand" | "cmd.computer" | "cmd.eye" | "cmd.todo" | "cmd.stats" | "cmd.news" | "cmd.keyboard" | "cmd.export" | "cmd.clipboard" | "cmd.share" | "cmd.broadcast" | "cmd.globe" | "cmd.copy" | "cmd.plus" | "cmd.restart" | "cmd.eraser" | "cmd.trash" | "cmd.compress" | "cmd.vibrate" | "cmd.handoff" | "cmd.history" | "cmd.question" | "cmd.rocket" | "cmd.stethoscope" | "cmd.redo" | "cmd.bug" | "cmd.memory" | "cmd.pencil" | "cmd.folderMove" | "cmd.folderPlus" | "cmd.folderMinus" | "cmd.hammer" | "cmd.power" | "cmd.cart" | "icon.mic" | "icon.camera" | "thinking.minimal" | "thinking.low" | "thinking.medium" | "thinking.high" | "thinking.xhigh" | "thinking.max" | "thinking.autoPending" | "checkbox.checked" | "checkbox.unchecked" | "radio.selected" | "radio.unselected" | "format.bullet" | "format.dash" | "format.bracketLeft" | "format.bracketRight" | "md.quoteBorder" | "md.hrChar" | "md.bullet" | "md.colorSwatch" | "advisor.rail" | "skill.rail" | "lang.default" | "lang.typescript" | "lang.javascript" | "lang.python" | "lang.rust" | "lang.go" | "lang.java" | "lang.c" | "lang.cpp" | "lang.csharp" | "lang.ruby" | "lang.julia" | "lang.php" | "lang.swift" | "lang.kotlin" | "lang.shell" | "lang.html" | "lang.css" | "lang.json" | "lang.yaml" | "lang.markdown" | "lang.sql" | "lang.docker" | "lang.lua" | "lang.text" | "lang.env" | "lang.toml" | "lang.xml" | "lang.ini" | "lang.conf" | "lang.log" | "lang.csv" | "lang.tsv" | "lang.image" | "lang.pdf" | "lang.archive" | "lang.binary" | "chip.image" | "chip.video" | "chip.paste" | "tab.appearance" | "tab.model" | "tab.interaction" | "tab.context" | "tab.files" | "tab.shell" | "tab.tools" | "tab.memory" | "tab.tasks" | "tab.providers" | "tool.write" | "tool.edit" | "tool.bash" | "tool.ssh" | "tool.lsp" | "tool.gh" | "tool.webSearch" | "tool.exa" | "tool.browser" | "tool.eval" | "tool.debug" | "tool.mcp" | "tool.job" | "tool.launch" | "tool.task" | "tool.todo" | "tool.memory" | "tool.ask" | "tool.resolve" | "tool.review" | "tool.goal" | "tool.irc" | "tool.delete" | "tool.move" | "key.ctrl" | "key.ctrlMac" | "key.shift" | "key.alt" | "key.altMac" | "key.super" | "key.superMac" | "key.joiner" | "key.enter" | "key.esc" | "key.tab" | "key.backspace" | "key.delete" | "key.space" | "key.up" | "key.down" | "key.left" | "key.right";
5
+ export type SymbolKey = "status.success" | "status.error" | "status.warning" | "status.info" | "status.pending" | "status.disabled" | "status.enabled" | "status.running" | "status.shadowed" | "status.aborted"
6
+ /** @deprecated Alias of `status.success`; kept so extensions and theme overrides that name it keep working. */
7
+ | "status.done" | "nav.cursor" | "nav.selected" | "nav.expand" | "nav.collapse" | "nav.back" | "tree.branch" | "tree.last" | "tree.vertical" | "tree.horizontal" | "tree.hook" | "progress.filled" | "progress.empty" | "context.speculation" | "context.compaction" | "context.content" | "context.messages" | "context.buffer" | "context.free" | "boxRound.topLeft" | "boxRound.topRight" | "boxRound.bottomLeft" | "boxRound.bottomRight" | "boxRound.horizontal" | "boxRound.vertical" | "boxDotted.horizontal" | "boxDotted.vertical" | "boxSharp.topLeft" | "boxSharp.topRight" | "boxSharp.bottomLeft" | "boxSharp.bottomRight" | "boxSharp.horizontal" | "boxSharp.vertical" | "boxSharp.cross" | "boxSharp.teeDown" | "boxSharp.teeUp" | "boxSharp.teeRight" | "boxSharp.teeLeft" | "sep.powerline" | "sep.powerlineThin" | "sep.powerlineLeft" | "sep.powerlineRight" | "sep.powerlineThinLeft" | "sep.powerlineThinRight" | "sep.powerlineCapLeft" | "sep.block" | "sep.space" | "sep.asciiLeft" | "sep.asciiRight" | "sep.dot" | "sep.slash" | "sep.pipe" | "icon.model" | "icon.plan" | "icon.prewalk" | "icon.goal" | "icon.pause" | "icon.loop" | "icon.folder" | "icon.worktree" | "icon.search" | "icon.scratchFolder" | "icon.file" | "icon.git" | "icon.branch" | "icon.pr" | "icon.pin" | "icon.tokens" | "icon.context" | "icon.cost" | "icon.subscription" | "icon.advisor" | "icon.advisorClosed" | "icon.time" | "icon.omp" | "icon.ghost" | "icon.agents" | "icon.job" | "icon.cache" | "icon.cacheMiss" | "icon.input" | "icon.output" | "icon.throughput" | "icon.intelligence" | "icon.host" | "icon.session" | "icon.package" | "icon.warning" | "icon.rewind" | "icon.auto" | "icon.fast" | "icon.extensionSkill" | "icon.extensionTool" | "icon.extensionSlashCommand" | "icon.extensionMcp" | "icon.extensionRule" | "icon.extensionHook" | "icon.extensionPrompt" | "icon.extensionContextFile" | "icon.extensionInstruction" | "icon.vimNormal" | "icon.vimInsert" | "icon.vimVisual" | "icon.vimVisualLine" | "icon.vimReplace" | "cmd.action" | "cmd.prompt" | "cmd.extension" | "cmd.settings" | "cmd.gear" | "cmd.shield" | "cmd.wave" | "cmd.compass" | "cmd.inbox" | "cmd.swap" | "cmd.expand" | "cmd.computer" | "cmd.eye" | "cmd.todo" | "cmd.stats" | "cmd.news" | "cmd.keyboard" | "cmd.export" | "cmd.clipboard" | "cmd.share" | "cmd.broadcast" | "cmd.globe" | "cmd.copy" | "cmd.plus" | "cmd.restart" | "cmd.eraser" | "cmd.trash" | "cmd.compress" | "cmd.vibrate" | "cmd.handoff" | "cmd.history" | "cmd.question" | "cmd.rocket" | "cmd.stethoscope" | "cmd.redo" | "cmd.bug" | "cmd.memory" | "cmd.pencil" | "cmd.folderMove" | "cmd.folderPlus" | "cmd.folderMinus" | "cmd.hammer" | "cmd.power" | "cmd.cart" | "icon.mic" | "icon.camera" | "thinking.minimal" | "thinking.low" | "thinking.medium" | "thinking.high" | "thinking.xhigh" | "thinking.max" | "thinking.autoPending" | "checkbox.checked" | "checkbox.unchecked" | "radio.selected" | "radio.unselected" | "format.bullet" | "format.dash" | "format.bracketLeft" | "format.bracketRight" | "md.quoteBorder" | "md.hrChar" | "md.bullet" | "md.colorSwatch" | "advisor.rail" | "skill.rail" | "btw.rail" | "lang.default" | "lang.typescript" | "lang.javascript" | "lang.python" | "lang.rust" | "lang.go" | "lang.java" | "lang.c" | "lang.cpp" | "lang.csharp" | "lang.ruby" | "lang.julia" | "lang.php" | "lang.swift" | "lang.kotlin" | "lang.shell" | "lang.html" | "lang.css" | "lang.json" | "lang.yaml" | "lang.markdown" | "lang.sql" | "lang.docker" | "lang.lua" | "lang.text" | "lang.env" | "lang.toml" | "lang.xml" | "lang.ini" | "lang.conf" | "lang.log" | "lang.csv" | "lang.tsv" | "lang.image" | "lang.pdf" | "lang.archive" | "lang.binary" | "chip.image" | "chip.video" | "chip.paste" | "tab.appearance" | "tab.model" | "tab.interaction" | "tab.context" | "tab.files" | "tab.shell" | "tab.tools" | "tab.memory" | "tab.tasks" | "tab.providers" | "tool.write" | "tool.edit" | "tool.bash" | "tool.ssh" | "tool.lsp" | "tool.gh" | "tool.webSearch" | "tool.exa" | "tool.browser" | "tool.eval" | "tool.debug" | "tool.mcp" | "tool.job" | "tool.launch" | "tool.task" | "tool.todo" | "tool.memory" | "tool.ask" | "tool.resolve" | "tool.review" | "tool.goal" | "tool.irc" | "tool.delete" | "tool.move" | "key.ctrl" | "key.ctrlMac" | "key.shift" | "key.alt" | "key.altMac" | "key.super" | "key.superMac" | "key.joiner" | "key.enter" | "key.esc" | "key.tab" | "key.backspace" | "key.delete" | "key.space" | "key.up" | "key.down" | "key.left" | "key.right";
6
8
  export type SymbolMap = Record<SymbolKey, string>;
7
9
  /**
8
10
  * Icon vocabulary for slash-command autocomplete type indicators. Each name
@@ -129,6 +129,7 @@ export declare class Theme {
129
129
  running: string;
130
130
  shadowed: string;
131
131
  aborted: string;
132
+ /** @deprecated Alias of `success`. */
132
133
  done: string;
133
134
  };
134
135
  get nav(): {
@@ -6,7 +6,7 @@ export { getAvailableThemes, getAvailableThemesWithPaths, getThemeByName, type T
6
6
  export { isValidThemeColor, type ThemeBg, type ThemeColor } from "./schema.js";
7
7
  export { getAvailableSymbolPresets, isValidSymbolPreset, type SpinnerType, type SymbolKey, type SymbolPreset, } from "./symbols.js";
8
8
  export { Theme } from "./theme-class.js";
9
- export { createHighlightStream, getEditorTheme, getMarkdownTheme, getMarkdownThemeWithLinkTargets, getSelectListTheme, getSettingsListTheme, getSymbolTheme, highlightCode, setMarkdownMermaidRendering, warmHighlighter, } from "./tui-adapters.js";
9
+ export { createHighlightStream, getEditorTheme, getMarkdownTheme, getMarkdownThemeWithLinkTargets, getSelectListTheme, getSettingsListTheme, getSymbolTheme, highlightCode, isHighlightLanguage, setMarkdownMermaidRendering, warmHighlighter, } from "./tui-adapters.js";
10
10
  /**
11
11
  * Subscribe to native fallback appearance changes independently of theme changes.
12
12
  * Consumers must re-check the effective background: COLORFGBG can override it.
@@ -114,29 +114,6 @@ export declare function stopThemeWatcher(): void;
114
114
  * Used by HTML export to generate CSS custom properties.
115
115
  */
116
116
  export declare function getResolvedThemeColors(themeName?: string): Promise<Record<string, string>>;
117
- /** One appearance variant of {@link NativeThemePalette}: token name → `#rrggbb`. */
118
- export type NativeThemeVariant = Record<string, string>;
119
- /** omp's resolved theme for a Tern Surface Protocol terminal (the `t` verb body minus `sf`). */
120
- export interface NativeThemePalette {
121
- dark?: NativeThemeVariant;
122
- light?: NativeThemeVariant;
123
- name: {
124
- dark?: string;
125
- light?: string;
126
- };
127
- }
128
- /**
129
- * Cheap identity of everything {@link getNativeThemePalette} depends on;
130
- * recompute the palette only when it changes.
131
- */
132
- export declare function getNativeThemePaletteKey(): string;
133
- /**
134
- * omp's theme for a native surface: with auto theme, the configured dark and
135
- * light themes; otherwise (or while the theme selector previews one) the
136
- * active theme under its own appearance only. Themes without a loadable
137
- * definition (in-memory instances) contribute nothing.
138
- */
139
- export declare function getNativeThemePalette(): NativeThemePalette;
140
117
  /**
141
118
  * Check if a theme is a "light" theme by analyzing its status-line background
142
119
  * luminance. Loads theme JSON synchronously (built-in or custom file on disk)
@@ -6,6 +6,8 @@ import type { SettingsListTheme } from "../components/settings-list.js";
6
6
  import type { SymbolTheme } from "../symbols.js";
7
7
  import type { SlashCommandIconName } from "./symbols.js";
8
8
  import type { Theme } from "./theme-class.js";
9
+ /** Whether {@link highlightCode} colors `lang`; text in any other language comes back unstyled. */
10
+ export declare function isHighlightLanguage(lang: string | undefined): lang is string;
9
11
  /**
10
12
  * Highlight code with syntax coloring based on file extension or language.
11
13
  * Returns array of highlighted lines.
@@ -137,12 +137,12 @@ export type TaskEffort = (typeof TASK_EFFORTS)[number];
137
137
  export declare function resolveTaskEffortLevel(model: Model | undefined, effort: TaskEffort, maxEffort?: Effort): Effort | undefined;
138
138
  /**
139
139
  * Clamps a concrete thinking selector to a per-session effort ceiling (e.g. a
140
- * task spawn's `task.maxEffort`-capped effort hint). `off`/`inherit`/
141
- * `undefined` pass through, as do levels already at or below the ceiling.
142
- * Levels above it snap to the highest model-supported effort at or below the
143
- * ceiling. A model whose floor exceeds the ceiling has nothing valid to snap
144
- * to; the requested level is returned unchanged and the caller is responsible
145
- * for rejecting or skipping such models (see {@link modelSupportsEffortCeiling}).
140
+ * task spawn's `task.maxEffort`). Unset/`inherit`/`off` retain their existing
141
+ * meaning, as do levels already at or below the ceiling. Levels above it snap
142
+ * to the highest model-supported effort at or below the ceiling. A model whose
143
+ * floor exceeds the ceiling has nothing valid to snap to; the requested level
144
+ * is returned unchanged and the caller must reject or skip such models (see
145
+ * {@link modelSupportsEffortCeiling}).
146
146
  */
147
147
  export declare function clampThinkingLevelToCeiling(model: Model | undefined, level: Effort | undefined, ceiling: Effort | undefined): Effort | undefined;
148
148
  export declare function clampThinkingLevelToCeiling(model: Model | undefined, level: ThinkingLevel | undefined, ceiling: Effort | undefined): ThinkingLevel | undefined;
@@ -153,6 +153,8 @@ export declare function clampThinkingLevelToCeiling(model: Model | undefined, le
153
153
  * skip models whose floor would force the session above the ceiling.
154
154
  */
155
155
  export declare function modelSupportsEffortCeiling(model: Model, ceiling: Effort): boolean;
156
+ /** Throws when `model` has no supported effort at or below `task.maxEffort`, so a capped spawn fails instead of running at its floor. */
157
+ export declare function assertModelSupportsEffortCeiling(model: Model, maxEffort: Effort): void;
156
158
  /**
157
159
  * The provisional concrete level shown while `auto` is configured but before a
158
160
  * turn has been classified, and the fallback when classification fails. Prefers
@@ -34,6 +34,8 @@ interface AstGrepRenderArgs {
34
34
  /** Legacy pre-`path` argument name; kept so historical transcripts still render a scope. */
35
35
  paths?: string[];
36
36
  skip?: number;
37
+ /** Language the search parsed the files as; highlighting follows it over the file extension. */
38
+ lang?: string;
37
39
  }
38
40
  /** Render AST grep calls and results. */
39
41
  export declare const astGrepToolRenderer: {
@@ -6,6 +6,12 @@ import type { Theme } from "../theme/theme.js";
6
6
  export interface BashInteractiveTerminalBackend {
7
7
  resize(columns: number, rows: number): void;
8
8
  }
9
+ /**
10
+ * Translates a TUI key event into the bytes a terminal would send to a PTY
11
+ * child; key releases encode to "". Shared by the agent `pty` console and
12
+ * `!` commands (`BashExecutionComponent.encodePtyInput`).
13
+ */
14
+ export declare function normalizeInputForPty(data: string, applicationCursorKeysMode: boolean): string;
9
15
  /** Interactive terminal overlay driven by an external PTY controller. */
10
16
  export declare class BashInteractiveOverlayComponent implements Component {
11
17
  #private;
@@ -24,6 +24,8 @@ export interface BashToolDetails {
24
24
  exitCode?: number;
25
25
  /** True when the command was killed by its timeout deadline (not a failure). */
26
26
  timedOut?: boolean;
27
+ /** Text the command wrote to `out://`, oldest first; transcripts draw each as a reply after the call. */
28
+ replies?: string[];
27
29
  /** Live ACP update only; completed results refer to released terminals. */
28
30
  terminalId?: string;
29
31
  service?: {
@@ -22,10 +22,12 @@ export interface DefaultToolRenderInput {
22
22
  export declare function formatDefaultToolExecution(input: DefaultToolRenderInput, contentWidth: number, uiTheme: Theme): string;
23
23
  /**
24
24
  * TSP view of the generic fallback card: the tool label with a one-line args
25
- * summary as the head target; the result as a JSON tree or raw `ansi` output.
26
- * The complete output goes over the wire — the card-level disclosure clamp the
27
- * terminal applies is the only bound, so an expanded card keeps every row. JSON
28
- * the tree's depth, node or scalar caps would cut keeps the raw path instead.
25
+ * summary as the head target; the result as JSON (the host's `json` viewer,
26
+ * else a JSON tree) or raw `ansi` output. The complete output goes over the
27
+ * wire — the card-level disclosure clamp the terminal applies is the only
28
+ * bound, so an expanded card keeps every row. The `json` viewer never cuts;
29
+ * JSON the fallback tree's depth, node or scalar caps would cut keeps the raw
30
+ * path instead.
29
31
  */
30
32
  export declare function describeDefaultToolExecution(input: DefaultToolRenderInput): NativeToolView;
31
33
  /** Render the generic fallback as the state-tinted card used by direct custom tools. */
@@ -71,6 +71,8 @@ export interface EvalToolDetails {
71
71
  statusEvents?: EvalStatusEvent[];
72
72
  /** Evictable events dropped from the front of `statusEvents` (see {@link recordStatusEvent}). */
73
73
  statusEventsElided?: number;
74
+ /** Text the cell's tool calls sent to `out://`, oldest first; transcripts draw each as a reply after the call. */
75
+ replies?: string[];
74
76
  isError?: boolean;
75
77
  meta?: OutputMeta;
76
78
  /** First backend that produced cells. Kept for transcript compatibility. */
@@ -1,4 +1,4 @@
1
- import type { Theme } from "../theme/theme.js";
1
+ import { type Theme } from "../theme/theme.js";
2
2
  import type { Component } from "../tui.js";
3
3
  import type { OutputMeta } from "./output-meta.js";
4
4
  import type { NativeToolView, RenderResultContextOptions, RenderResultOptions } from "./renderer.js";
@@ -1,4 +1,5 @@
1
1
  import type { NativeNode } from "../native/node.js";
2
+ import { type Theme, type ThemeColor } from "../theme/theme.js";
2
3
  /**
3
4
  * One file's contribution to a grouped file output. The header itself is generated
4
5
  * by `formatGroupedFiles` (one `#` per nesting level); use `headerSuffix` to tack
@@ -51,22 +52,35 @@ export interface FileMatchSection {
51
52
  * Files with no model lines are omitted.
52
53
  */
53
54
  export declare function formatFileMatches(files: string[], grouped: boolean, renderFile: (filePath: string) => FileMatchSection): GroupedFilesOutput;
54
- /** Per-line classification of grouped output, used by renderers for hyperlinks. */
55
+ /** Whether a row of grouped output is a code-frame row the search matched (`*12│…`). */
56
+ export declare function isMatchRow(line: string): boolean;
57
+ /** Per-line classification of grouped output, used by renderers for file rows and hyperlinks. */
55
58
  export interface GroupedLineContext {
56
59
  /** Directory header, file header, or any non-header body/content line. */
57
60
  kind: "dir" | "file" | "content";
58
61
  /** Number of leading `#` for headers; 0 for content lines. */
59
62
  depth: number;
60
- /** Resolved absolute path of the dir/file a header points at (when resolvable). */
63
+ /** Resolved absolute path of the file a header points at (when resolvable). */
61
64
  headerPath?: string;
65
+ /**
66
+ * For file headers, the full display path: the folded directory chain joined
67
+ * with the name, without `#` markers or the hashline tag.
68
+ */
69
+ displayPath?: string;
70
+ /** For file headers, a trailing parenthesized note such as `(2 replacements)`. */
71
+ suffix?: string;
62
72
  /** For content lines, the absolute path of the owning file (line hyperlinks). */
63
73
  filePath?: string;
64
- /** Header is an internal/url-like target the caller resolves itself. */
65
- isUrl?: boolean;
74
+ /**
75
+ * The internal or url-like target, as written, that a header names or a
76
+ * content line belongs to; the caller resolves it (no filesystem path).
77
+ */
78
+ url?: string;
66
79
  }
67
80
  /**
68
81
  * Walk grouped output lines, tracking a directory stack keyed by header depth, so
69
- * each header and body line can be linked back to its absolute filesystem path.
82
+ * each header and body line can be linked back to its absolute filesystem path
83
+ * and each file header to its full display path.
70
84
  * Reconstruction is stack-based (not per-blank-group) so nested directory headers
71
85
  * resolve correctly across the whole output.
72
86
  *
@@ -75,9 +89,64 @@ export interface GroupedLineContext {
75
89
  * formatted relative to cwd regardless of the (sub)directory the search was
76
90
  * scoped to. `fileScope` is the initial owning file for body lines that appear
77
91
  * before any header (single-file scopes have no `#` headers); it defaults to
78
- * `headerBase` and should be passed the scoped file's absolute path.
92
+ * `headerBase` and should be passed the scoped file's absolute path. A URL base
93
+ * or scope (`local://…`) is no filesystem path: headerless lines belong to the
94
+ * URL, and headers under a URL base get no path.
79
95
  */
80
96
  export declare function classifyGroupedLines(lines: readonly string[], headerBase: string | undefined, fileScope?: string | undefined): GroupedLineContext[];
97
+ /**
98
+ * Line groups with one file per group, for terminal tree lists: `# dir/`
99
+ * header rows are dropped (each file row carries its full path), and every
100
+ * file row starts a group of its own, so each file gets its own branch instead
101
+ * of hanging under the previous file of its directory. Rows before a group's
102
+ * first file row (notes, a single-file scope's matches) keep their group.
103
+ */
104
+ export declare function groupsByFile(groups: readonly (readonly number[])[], contexts: readonly GroupedLineContext[]): number[][];
105
+ /** Details fields a grouped-output tool records for links: the display base paths and resolved URL targets. */
106
+ export interface GroupedLinkDetails {
107
+ cwd?: string;
108
+ searchPath?: string;
109
+ displayTargets?: Record<string, string>;
110
+ }
111
+ /**
112
+ * Link targets for the rows of sanitized grouped output: a file row's file, a
113
+ * body row's owning file, and for an internal URL the file `displayTargets`
114
+ * resolves it to. Destinations keep the original path bytes: while the raw
115
+ * `displayContent` still aligns line-for-line with the sanitized `displayText`,
116
+ * a row takes its raw classification's target. Raw text never links a row the
117
+ * sanitized output leaves unlinked.
118
+ */
119
+ export declare function groupedLinkTargets(contexts: readonly GroupedLineContext[], displayText: string, details: GroupedLinkDetails | undefined, rawDetails: unknown): (index: number) => string | undefined;
120
+ /**
121
+ * A memoized styler for the rows of grouped output, so a collapsed preview
122
+ * styles only the rows it shows. A file row is its full path (dim directory,
123
+ * name in {@link FILE_NAME_COLOR}; a URL whole in that color) and any dim
124
+ * suffix, linked to `linkTarget`'s file or, for an unresolved URL, the URL.
125
+ * Body rows come from `styleBody`, tabs expanded; with `linkLines` a numbered
126
+ * code-frame row links to its line in the owning file.
127
+ */
128
+ export declare function createGroupedRowStyler(lines: readonly string[], contexts: readonly GroupedLineContext[], theme: Theme, options: {
129
+ linkTarget: (index: number) => string | undefined;
130
+ styleBody: (index: number) => string;
131
+ linkLines?: boolean;
132
+ }): (index: number) => string;
133
+ /**
134
+ * Fit line groups (one file each) into `budget` rows, the `… N more` summary row
135
+ * included: whole groups first, then the next group cut short when it can still
136
+ * show a row under its file row (the first group always shows its head). The
137
+ * summary counts the `unit`s left out, the rows `isUnit` accepts, out of `total`
138
+ * when the caller knows it; with none left out it counts hidden lines. `gap`
139
+ * rows separate shown groups (framed lists put a blank line between files).
140
+ */
141
+ export declare function fitGroupsToBudget(groups: readonly (readonly number[])[], budget: number, options: {
142
+ isUnit: (index: number) => boolean;
143
+ unit: string;
144
+ total?: number;
145
+ gap?: number;
146
+ }): {
147
+ shown: (readonly number[])[];
148
+ summary: string;
149
+ };
81
150
  /**
82
151
  * Split line indices into blank-line-separated groups, mirroring
83
152
  * `splitGroupsByBlankLine`: when any blank line is present, break on runs of
@@ -85,6 +154,15 @@ export declare function classifyGroupedLines(lines: readonly string[], headerBas
85
154
  * indices lets callers slice parallel arrays (raw lines, styled lines, contexts).
86
155
  */
87
156
  export declare function groupLineIndicesByBlank(rawLines: readonly string[]): number[][];
157
+ /**
158
+ * Styled code-frame rows of grouped search output, highlighted in each owning
159
+ * file's language (`lang` overrides it when the highlighter knows it). A run of
160
+ * consecutive line numbers in one file highlights together on its first
161
+ * request; a gap row, a jump in line numbers or another file starts a new run.
162
+ * Rows without a numbered code frame (headers, gap rows, notes) return
163
+ * undefined, for the caller to style.
164
+ */
165
+ export declare function createCodeFrameStyler(lines: readonly string[], contexts: readonly GroupedLineContext[], color: ThemeColor, theme: Theme, lang?: string): (index: number) => string | undefined;
88
166
  /** One event of {@link walkGroupedOutput}: a directory header, a file header, or a non-blank body line. */
89
167
  export type GroupedOutputEvent = {
90
168
  readonly kind: "dir";
@@ -98,35 +176,38 @@ export type GroupedOutputEvent = {
98
176
  };
99
177
  /**
100
178
  * Walk grouped output (`# dir/`, `## file.ts (suffix)`, body lines), resolving
101
- * each file header to its full display path (the folded directory chain
102
- * joined with the name) and dropping blank separator lines.
179
+ * each file header to its full display path (see {@link classifyGroupedLines})
180
+ * and dropping blank separator lines.
103
181
  */
104
182
  export declare function walkGroupedOutput(lines: readonly string[]): Generator<GroupedOutputEvent>;
105
- /** One source line for {@link numberedCode}: its number (`null` for an elision marker), text and match mark. */
183
+ /** One source line for {@link numberedCode}: its number (`null` for an elision marker, which adds no line), text and match mark. */
106
184
  export interface NumberedLine {
107
185
  n: number | null;
108
186
  text: string;
109
187
  mark?: boolean;
110
188
  }
111
189
  /**
112
- * Numbered `code` for possibly non-contiguous source lines: one block per run
113
- * of consecutive line numbers (`start` = the run's first line, match lines
114
- * `mark`ed), with a `…` row wherever the numbers jump or an elision marker
115
- * (`n: null`) sits. `path` is the file the lines come from: Tern picks their
116
- * grammar from it and draws no header (the row or head above names the file).
117
- * `wrap` soft-wraps long lines instead of scrolling the block sideways.
190
+ * One numbered `code` block for possibly non-contiguous source lines (match
191
+ * lines `mark`ed by their line number): `start` when the numbers run on
192
+ * consecutively, else `nums` (each line's number), from whose jumps Tern draws
193
+ * the `…` gap rows in the gutter. Elision markers (`n: null`) add no line; the
194
+ * numbers jump around them. `path` is the file the lines come from: Tern picks
195
+ * their grammar from it and draws no header (the row or head above names the
196
+ * file). `wrap` soft-wraps long lines instead of scrolling the block sideways.
197
+ * `undefined` when no line is numbered.
118
198
  */
119
199
  export declare function numberedCode(lines: readonly NumberedLine[], opts?: {
120
200
  path?: string;
121
201
  wrap?: boolean;
122
- }): NativeNode[];
202
+ }): NativeNode | undefined;
123
203
  /**
124
204
  * Describe grouped search output (grep / ast-grep / ast-edit display content)
125
205
  * by file (§7.3 grep): per file a 22px path row (dim dir, strong name, the
126
206
  * header's suffix or the match count as a chip), then its lines as
127
- * {@link numberedCode} with match lines marked and `…` between non-adjacent
128
- * runs. Unnumbered body lines stay plain `code`. `maxFiles` keeps only the
129
- * first files (the caller says how many were left out). `file` owns the lines
207
+ * one {@link numberedCode} block with match lines marked (gaps between
208
+ * non-adjacent runs drawn in its gutter). Unnumbered body lines stay plain
209
+ * `code`. `maxFiles` keeps only the first files (the caller says how many
210
+ * were left out). `file` owns the lines
130
211
  * before any header: a single-file search prints none, yet its lines get the
131
212
  * same file row as a directory search's.
132
213
  */
@@ -6,6 +6,11 @@ export declare const HL_FILE_SUFFIX = "]";
6
6
  export declare const HL_FILE_HASH_SEP = "#";
7
7
  /** Number of characters in a displayed file hash. */
8
8
  export declare const HL_FILE_HASH_LENGTH = 4;
9
+ /**
10
+ * A trailing `#TAG` file hash exactly as the hashline store writes it (uppercase
11
+ * hex), so a name's own `#dead` or `#v2` ending survives stripping.
12
+ */
13
+ export declare const HASHLINE_TAG_SUFFIX_RE: RegExp;
9
14
  /** Keyword identifying a file move operation. */
10
15
  export declare const HL_MOVE_KEYWORD = "MV";
11
16
  /** Keyword identifying a file removal operation. */
@@ -25,6 +25,12 @@ export interface IrcMessage {
25
25
  * the broadcaster, mostly to say the message was not for it.
26
26
  */
27
27
  broadcast?: boolean;
28
+ /**
29
+ * Interim acknowledgement or progress on something the recipient asked
30
+ * (`agent://<id>?progress`): it neither answers that request nor asks one,
31
+ * so the recipient's `wait` keeps waiting for the actual reply.
32
+ */
33
+ progress?: boolean;
28
34
  }
29
35
  /** Delivery outcome for one peer recipient. */
30
36
  export interface IrcDeliveryReceipt {
@@ -12,6 +12,8 @@ export declare const JSON_TREE_MAX_LINES_EXPANDED = 200;
12
12
  export declare const JSON_TREE_SCALAR_LEN_COLLAPSED = 60;
13
13
  /** Maximum expanded JSON scalar width. */
14
14
  export declare const JSON_TREE_SCALAR_LEN_EXPANDED = 2000;
15
+ /** Characters a container's one-line form may take before a JSON tree lists its entries instead. */
16
+ export declare const JSON_TREE_INLINE_LEN = 60;
15
17
  /** Sanitization, string summary, and budgeting policy for inline JSON. */
16
18
  export interface InlineFormatOptions {
17
19
  sanitizeText?: (text: string) => string;
@@ -46,7 +48,8 @@ export interface JsonTreeRenderOptions {
46
48
  rootConnectors?: "hooked" | "siblings";
47
49
  }
48
50
  /**
49
- * Render a JSON value as bounded tree lines. The positional form remains the
51
+ * Render a JSON value as bounded tree lines, containers that fit
52
+ * {@link JSON_TREE_INLINE_LEN} on one row. The positional form remains the
50
53
  * public tool-renderer contract; the options form exposes sanitization and root
51
54
  * connector policy for specialized adapters such as nested task output.
52
55
  */
@@ -74,8 +77,24 @@ export interface JsonTreeDescribeOptions {
74
77
  onTruncated?: () => void;
75
78
  }
76
79
  /**
77
- * TSP `tree` of a JSON value: containers become expandable nodes labelled with
78
- * their key and size, scalars become `key: value` leaves styled by type.
79
- * Bounded by depth, node count and scalar length; no width math.
80
+ * TSP `tree` of a JSON value: containers that fit {@link JSON_TREE_INLINE_LEN}
81
+ * become `key: [1, "a"]` leaves, larger ones expandable nodes labelled with
82
+ * their key and size, scalars `key: value` leaves styled by type. Bounded by
83
+ * depth, node count and scalar length; no width math.
80
84
  */
81
85
  export declare function describeJsonTree(value: unknown, options?: JsonTreeDescribeOptions): NativeNode;
86
+ /** Options of {@link describeJsonValue}: the `json` node's own, plus the fallback tree's. */
87
+ export interface JsonValueDescribeOptions extends JsonTreeDescribeOptions {
88
+ /** The host draws the `json` kind (`cx.supports("json")`). */
89
+ native?: boolean;
90
+ /** `json` node: container levels expanded below the top-level entries (default 0). */
91
+ open?: number;
92
+ }
93
+ /**
94
+ * A JSON value for a TSP host: the terminal's own `json` viewer when it draws
95
+ * the kind, which folds and previews containers itself and never cuts (so
96
+ * `onTruncated` never fires), else {@link describeJsonTree} with the same
97
+ * options. Root keys the tree would hide are left out of the sent value too;
98
+ * strings are sanitized like the tree's labels.
99
+ */
100
+ export declare function describeJsonValue(value: unknown, options?: JsonValueDescribeOptions): NativeNode;
@@ -31,6 +31,8 @@ export interface FileDiagnosticsResult {
31
31
  summary: string;
32
32
  /** Whether there are any errors (severity 1) */
33
33
  errored: boolean;
34
+ /** Servers that sent no fresh report in time: the file is unverified for them, not clean. */
35
+ unreported?: string[];
34
36
  /** Whether the file was formatted */
35
37
  formatter?: FileFormatResult;
36
38
  }
@@ -23,11 +23,12 @@ export declare function renderMCPResult(result: {
23
23
  isError?: boolean;
24
24
  }, options: RenderResultOptions, theme: Theme, args?: Record<string, unknown>): Component;
25
25
  /** Native MCP call view: the head plus the folded args, inline while pending. */
26
- export declare function describeMCPCall(args: Record<string, unknown>, label: string): NativeToolView;
26
+ export declare function describeMCPCall(args: Record<string, unknown>, label: string, options?: RenderResultOptions): NativeToolView;
27
27
  /**
28
- * Native MCP result view: JSON output as a JSON tree, Markdown when the
29
- * preference is on, otherwise the raw text as tool output; the folded Args
30
- * section follows, so the collapsed preview still leads with the output.
28
+ * Native MCP result view: JSON output as the host's `json` viewer (when it
29
+ * draws one) or a JSON tree, Markdown when the preference is on, otherwise
30
+ * the raw text as tool output; the folded Args section follows, so the
31
+ * collapsed preview still leads with the output.
31
32
  */
32
33
  export declare function describeMCPResult(result: {
33
34
  content: Array<{
@@ -36,7 +37,7 @@ export declare function describeMCPResult(result: {
36
37
  }>;
37
38
  details?: MCPToolDetails;
38
39
  isError?: boolean;
39
- }, _options: RenderResultOptions, args?: Record<string, unknown>): NativeToolView | undefined;
40
+ }, options: RenderResultOptions, args?: Record<string, unknown>): NativeToolView | undefined;
40
41
  import type { OutputMeta } from "./output-meta.js";
41
42
  /** Set whether plain MCP text results render as Markdown. */
42
43
  export declare function setMcpRenderMarkdownResults(enabled: boolean): void;
@@ -6,8 +6,10 @@ import { type OutputMeta } from "./output-meta.js";
6
6
  import type { NativeToolHead, NativeToolView, ToolRenderResult } from "./renderer.js";
7
7
  /** A path for native heads: relative to the working directory when inside it, else `~`-shortened. */
8
8
  export declare function displayPath(filePath: string): string;
9
- /** `file://` link for a head's path target, when the path is absolute. */
9
+ /** Configured file link for a head's path target, when the path is absolute. */
10
10
  export declare function fileHref(filePath: string | undefined): string | undefined;
11
+ /** Link for a head target that is a web URL (`www.` gains `https://`), else undefined. */
12
+ export declare function urlHref(target: string | undefined): string | undefined;
11
13
  /** Diff stats as one head `meta` string, `+8 −1` (U+2212 minus), or undefined when nothing changed. */
12
14
  export declare function diffStatsMeta(added: number, removed: number): string | undefined;
13
15
  /**
@@ -100,8 +100,21 @@ export interface LimitsMeta {
100
100
  last: number;
101
101
  };
102
102
  selectorBase?: string;
103
+ /** The first cut line exceeds what one `:raw` read returns; that read stops at this many bytes. */
104
+ rawByteCap?: number;
103
105
  };
104
106
  }
107
+ /**
108
+ * The bash minimizer rewrote this output: `filter` is the native filter label
109
+ * (`chain` for a minimized `&&`/`;` chain), the byte counts are the raw capture
110
+ * and the minimized text, and `artifactId` holds the raw capture.
111
+ */
112
+ export interface MinimizedMeta {
113
+ filter: string;
114
+ inputBytes: number;
115
+ outputBytes: number;
116
+ artifactId: string;
117
+ }
105
118
  /**
106
119
  * Structured metadata for tool outputs.
107
120
  */
@@ -114,6 +127,7 @@ export interface OutputMeta {
114
127
  pagedSource?: true;
115
128
  diagnostics?: DiagnosticMeta;
116
129
  limits?: LimitsMeta;
130
+ minimized?: MinimizedMeta;
117
131
  }
118
132
  /**
119
133
  * Reformat pre-formatted diagnostic messages into a multi-level, prefix-folded
@@ -136,6 +150,13 @@ export declare function stripRawOutputArtifactNotice(text: string): {
136
150
  text: string;
137
151
  artifactId?: string;
138
152
  };
153
+ /** Whether `line` is the column-cap notice {@link formatOutputNotice} emits (`[Some lines truncated to 768 chars…]`). */
154
+ export declare function isColumnTruncationNotice(line: string): boolean;
155
+ /**
156
+ * Whether the bracketed notice `line` carries the column-cap clause: alone, or after the parts
157
+ * {@link formatOutputNotice} joins before it (`[Showing lines 1-4 of 5. … Some lines truncated to 768 chars…]`).
158
+ */
159
+ export declare function hasColumnTruncationClause(line: string): boolean;
139
160
  /** Remove a trailing generated output notice when metadata is unavailable. */
140
161
  export declare function stripGeneratedOutputNotice(text: string): string;
141
162
  /** Format truncation ranges and recovery hints. */
@@ -147,6 +168,12 @@ export declare function formatTruncationMetaNotice(truncation: TruncationMeta, s
147
168
  export declare function formatStyledArtifactReference(artifactId: string, theme: Theme): string;
148
169
  /** Describe an incomplete artifact capture. */
149
170
  export declare function formatArtifactErrorNotice(error: OutputArtifactError): string;
171
+ /**
172
+ * `git 120.4KB → 3.2KB`: the minimizer filter that ran and the bytes it took the output from and to.
173
+ * Native labels are short words; a rehydrated session or extension may carry any text, so the label
174
+ * is sanitized to one plain line, its home paths shortened to `~`, and width-bounded.
175
+ */
176
+ export declare function formatMinimizedMeta(minimized: MinimizedMeta): string;
150
177
  /**
151
178
  * Format notices from OutputMeta for LLM consumption.
152
179
  * Returns empty string if no notices needed.
@@ -111,6 +111,16 @@ export declare function splitInternalUrlSel(rawPath: string, specOf?: (scheme: s
111
111
  path: string;
112
112
  sel?: string;
113
113
  };
114
+ /**
115
+ * Split a filesystem read target from its query (`data.json?q=.items` →
116
+ * `data.json`, `?q=.items`), the display twin of the read tool's JSON, SQLite
117
+ * and image-question parsers. URLs own their query string and stay whole, as
118
+ * does a `?` inside a file name.
119
+ */
120
+ export declare function splitReadQuery(readPath: string): {
121
+ path: string;
122
+ query?: string;
123
+ };
114
124
  /** Recognize HTTP URLs and www-prefixed external read targets. */
115
125
  export declare function isReadableUrlPath(value: string): boolean;
116
126
  /** Return the first selected line when every range has valid one-based bounds. */
@@ -139,11 +149,11 @@ export declare function readSourceFsPath(details: unknown): string | undefined;
139
149
  */
140
150
  export declare function readResultIsMarkdown(details: ReadToolDetails | undefined, args: ReadRenderArgs | undefined): boolean;
141
151
  /**
142
- * Read content as numbered, wrapped `code` (no path header: the head names
143
- * the file), matching the ANSI preview's hanging wrap. Numbers come from
152
+ * Read content as one numbered, wrapped `code` block (no path header: the head
153
+ * names the file), matching the ANSI preview's hanging wrap. Numbers come from
144
154
  * `lineNumbers` (`displayContent`'s per-line numbers, `null` for an elided
145
- * block; runs split with `…` between) when they cover every line, else count
146
- * up from `start`.
155
+ * block, which Tern shows as a `…` gap row where the numbers jump) when they
156
+ * cover every line, else count up from `start`.
147
157
  */
148
158
  export declare function readContentCode(content: string, start: number, numbers: readonly (number | null)[] | undefined, path: string | undefined): NativeNode[];
149
159
  /** Render file, image, and URL reads in the transcript. */
@@ -36,6 +36,8 @@ export interface RenderResultOptions {
36
36
  cancelled?: boolean;
37
37
  /** The native host shows files by path (`cx.supports("media")`). Native describe hooks only. */
38
38
  media?: boolean;
39
+ /** The native host draws raw JSON values (`cx.supports("json")`). Native describe hooks only. */
40
+ json?: boolean;
39
41
  }
40
42
  /** Render options for a result, plus the tool-specific context the transcript threads through. */
41
43
  export type RenderResultContextOptions = RenderResultOptions & {
@@ -177,6 +177,17 @@ export declare function truncateLineBytes(line: string, maxBytes?: number): {
177
177
  text: string;
178
178
  wasTruncated: boolean;
179
179
  };
180
+ /**
181
+ * Where `text` shows in `output` written through an {@link OutputSink} with
182
+ * `maxColumns`, searching from `from`: each of its lines whole, or, where the
183
+ * cap cut the output line, a head of it and `…` ending that output line.
184
+ * Only the first line can be cut short of its first 16 characters (after
185
+ * other text on its output line); such text is not found.
186
+ */
187
+ export declare function findColumnCapped(output: string, text: string, from?: number): {
188
+ start: number;
189
+ end: number;
190
+ } | undefined;
180
191
  /** Shared helper to build a no-truncation result. */
181
192
  export declare function noTruncResult(content: string, totalLines?: number, totalBytes?: number): TruncationResult;
182
193
  /**