@deepseek-harness-tui/dsh-tui 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (638) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +235 -0
  3. package/bin/dsh-tui.js +95 -0
  4. package/cordis.patch.yml +218 -0
  5. package/cordis.yml +185 -0
  6. package/lib/invariant.js +28 -0
  7. package/lib/types/activityPrefs.d.ts +29 -0
  8. package/lib/types/activityPrefs.d.ts.map +1 -0
  9. package/lib/types/activityPrefs.js +60 -0
  10. package/lib/types/bootstrap/state.d.ts +13 -0
  11. package/lib/types/bootstrap/state.d.ts.map +1 -0
  12. package/lib/types/bootstrap/state.js +12 -0
  13. package/lib/types/cc/cliHighlight.d.ts +20 -0
  14. package/lib/types/cc/cliHighlight.d.ts.map +1 -0
  15. package/lib/types/cc/cliHighlight.js +53 -0
  16. package/lib/types/cc/figures.d.ts +59 -0
  17. package/lib/types/cc/figures.d.ts.map +1 -0
  18. package/lib/types/cc/figures.js +69 -0
  19. package/lib/types/cc/format.d.ts +26 -0
  20. package/lib/types/cc/format.d.ts.map +1 -0
  21. package/lib/types/cc/format.js +55 -0
  22. package/lib/types/cc/hash.d.ts +25 -0
  23. package/lib/types/cc/hash.d.ts.map +1 -0
  24. package/lib/types/cc/hash.js +41 -0
  25. package/lib/types/cc/hyperlink.d.ts +21 -0
  26. package/lib/types/cc/hyperlink.d.ts.map +1 -0
  27. package/lib/types/cc/hyperlink.js +31 -0
  28. package/lib/types/cc/markdown.d.ts +43 -0
  29. package/lib/types/cc/markdown.d.ts.map +1 -0
  30. package/lib/types/cc/markdown.js +345 -0
  31. package/lib/types/cc/spinnerVerbs.d.ts +3 -0
  32. package/lib/types/cc/spinnerVerbs.d.ts.map +1 -0
  33. package/lib/types/cc/spinnerVerbs.js +190 -0
  34. package/lib/types/cc/terminal.d.ts +15 -0
  35. package/lib/types/cc/terminal.d.ts.map +1 -0
  36. package/lib/types/cc/terminal.js +84 -0
  37. package/lib/types/channel.d.ts +672 -0
  38. package/lib/types/channel.d.ts.map +1 -0
  39. package/lib/types/channel.js +2427 -0
  40. package/lib/types/childStderr.d.ts +63 -0
  41. package/lib/types/childStderr.d.ts.map +1 -0
  42. package/lib/types/childStderr.js +161 -0
  43. package/lib/types/commands.d.ts +55 -0
  44. package/lib/types/commands.d.ts.map +1 -0
  45. package/lib/types/commands.js +101 -0
  46. package/lib/types/components/ActivityLine.d.ts +29 -0
  47. package/lib/types/components/ActivityLine.d.ts.map +1 -0
  48. package/lib/types/components/ActivityLine.js +47 -0
  49. package/lib/types/components/ActivityPicker.d.ts +13 -0
  50. package/lib/types/components/ActivityPicker.d.ts.map +1 -0
  51. package/lib/types/components/ActivityPicker.js +24 -0
  52. package/lib/types/components/CommandSuggestions.d.ts +14 -0
  53. package/lib/types/components/CommandSuggestions.d.ts.map +1 -0
  54. package/lib/types/components/CommandSuggestions.js +33 -0
  55. package/lib/types/components/FileSuggestions.d.ts +12 -0
  56. package/lib/types/components/FileSuggestions.d.ts.map +1 -0
  57. package/lib/types/components/FileSuggestions.js +26 -0
  58. package/lib/types/components/GoalTodoPanel.d.ts +13 -0
  59. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -0
  60. package/lib/types/components/GoalTodoPanel.js +57 -0
  61. package/lib/types/components/HelpMenu.d.ts +12 -0
  62. package/lib/types/components/HelpMenu.d.ts.map +1 -0
  63. package/lib/types/components/HelpMenu.js +12 -0
  64. package/lib/types/components/HistorySearchDialog.d.ts +16 -0
  65. package/lib/types/components/HistorySearchDialog.d.ts.map +1 -0
  66. package/lib/types/components/HistorySearchDialog.js +31 -0
  67. package/lib/types/components/InterruptedByUser.d.ts +7 -0
  68. package/lib/types/components/InterruptedByUser.d.ts.map +1 -0
  69. package/lib/types/components/InterruptedByUser.js +9 -0
  70. package/lib/types/components/LoadedContextPanel.d.ts +20 -0
  71. package/lib/types/components/LoadedContextPanel.d.ts.map +1 -0
  72. package/lib/types/components/LoadedContextPanel.js +30 -0
  73. package/lib/types/components/LogoV2.d.ts +23 -0
  74. package/lib/types/components/LogoV2.d.ts.map +1 -0
  75. package/lib/types/components/LogoV2.js +95 -0
  76. package/lib/types/components/Markdown.d.ts +24 -0
  77. package/lib/types/components/Markdown.d.ts.map +1 -0
  78. package/lib/types/components/Markdown.js +106 -0
  79. package/lib/types/components/MarkdownTable.d.ts +17 -0
  80. package/lib/types/components/MarkdownTable.d.ts.map +1 -0
  81. package/lib/types/components/MarkdownTable.js +272 -0
  82. package/lib/types/components/MessageList.d.ts +41 -0
  83. package/lib/types/components/MessageList.d.ts.map +1 -0
  84. package/lib/types/components/MessageList.js +303 -0
  85. package/lib/types/components/ModelPicker.d.ts +14 -0
  86. package/lib/types/components/ModelPicker.d.ts.map +1 -0
  87. package/lib/types/components/ModelPicker.js +15 -0
  88. package/lib/types/components/PresetPicker.d.ts +17 -0
  89. package/lib/types/components/PresetPicker.d.ts.map +1 -0
  90. package/lib/types/components/PresetPicker.js +25 -0
  91. package/lib/types/components/PromptInput.d.ts +67 -0
  92. package/lib/types/components/PromptInput.d.ts.map +1 -0
  93. package/lib/types/components/PromptInput.js +778 -0
  94. package/lib/types/components/ResumePicker.d.ts +15 -0
  95. package/lib/types/components/ResumePicker.d.ts.map +1 -0
  96. package/lib/types/components/ResumePicker.js +34 -0
  97. package/lib/types/components/RewindPicker.d.ts +14 -0
  98. package/lib/types/components/RewindPicker.d.ts.map +1 -0
  99. package/lib/types/components/RewindPicker.js +23 -0
  100. package/lib/types/components/SearchBox.d.ts +20 -0
  101. package/lib/types/components/SearchBox.d.ts.map +1 -0
  102. package/lib/types/components/SearchBox.js +33 -0
  103. package/lib/types/components/Select.d.ts +22 -0
  104. package/lib/types/components/Select.d.ts.map +1 -0
  105. package/lib/types/components/Select.js +19 -0
  106. package/lib/types/components/Spinner/GlimmerMessage.d.ts +19 -0
  107. package/lib/types/components/Spinner/GlimmerMessage.d.ts.map +1 -0
  108. package/lib/types/components/Spinner/GlimmerMessage.js +78 -0
  109. package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts +31 -0
  110. package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts.map +1 -0
  111. package/lib/types/components/Spinner/SpinnerAnimationRow.js +162 -0
  112. package/lib/types/components/Spinner/SpinnerGlyph.d.ts +16 -0
  113. package/lib/types/components/Spinner/SpinnerGlyph.d.ts.map +1 -0
  114. package/lib/types/components/Spinner/SpinnerGlyph.js +36 -0
  115. package/lib/types/components/Spinner/spinnerMode.d.ts +6 -0
  116. package/lib/types/components/Spinner/spinnerMode.d.ts.map +1 -0
  117. package/lib/types/components/Spinner/spinnerMode.js +1 -0
  118. package/lib/types/components/Spinner/spinnerUtils.d.ts +41 -0
  119. package/lib/types/components/Spinner/spinnerUtils.d.ts.map +1 -0
  120. package/lib/types/components/Spinner/spinnerUtils.js +104 -0
  121. package/lib/types/components/Spinner/useStalledAnimation.d.ts +16 -0
  122. package/lib/types/components/Spinner/useStalledAnimation.d.ts.map +1 -0
  123. package/lib/types/components/Spinner/useStalledAnimation.js +71 -0
  124. package/lib/types/components/StreamingMarkdown.d.ts +12 -0
  125. package/lib/types/components/StreamingMarkdown.d.ts.map +1 -0
  126. package/lib/types/components/StreamingMarkdown.js +39 -0
  127. package/lib/types/components/ThemePicker.d.ts +22 -0
  128. package/lib/types/components/ThemePicker.d.ts.map +1 -0
  129. package/lib/types/components/ThemePicker.js +51 -0
  130. package/lib/types/components/ThinkingToggle.d.ts +17 -0
  131. package/lib/types/components/ThinkingToggle.d.ts.map +1 -0
  132. package/lib/types/components/ThinkingToggle.js +30 -0
  133. package/lib/types/components/ToolUseLoader.d.ts +13 -0
  134. package/lib/types/components/ToolUseLoader.d.ts.map +1 -0
  135. package/lib/types/components/ToolUseLoader.js +17 -0
  136. package/lib/types/components/Whale.d.ts +22 -0
  137. package/lib/types/components/Whale.d.ts.map +1 -0
  138. package/lib/types/components/Whale.js +78 -0
  139. package/lib/types/components/WorkingSpinner.d.ts +26 -0
  140. package/lib/types/components/WorkingSpinner.d.ts.map +1 -0
  141. package/lib/types/components/WorkingSpinner.js +68 -0
  142. package/lib/types/components/activityFrames.d.ts +31 -0
  143. package/lib/types/components/activityFrames.d.ts.map +1 -0
  144. package/lib/types/components/activityFrames.js +83 -0
  145. package/lib/types/components/bigfont.d.ts +28 -0
  146. package/lib/types/components/bigfont.d.ts.map +1 -0
  147. package/lib/types/components/bigfont.js +91 -0
  148. package/lib/types/components/design-system/Byline.d.ts +14 -0
  149. package/lib/types/components/design-system/Byline.d.ts.map +1 -0
  150. package/lib/types/components/design-system/Byline.js +17 -0
  151. package/lib/types/components/design-system/Divider.d.ts +40 -0
  152. package/lib/types/components/design-system/Divider.d.ts.map +1 -0
  153. package/lib/types/components/design-system/Divider.js +24 -0
  154. package/lib/types/components/design-system/KeyboardShortcutHint.d.ts +19 -0
  155. package/lib/types/components/design-system/KeyboardShortcutHint.d.ts.map +1 -0
  156. package/lib/types/components/design-system/KeyboardShortcutHint.js +14 -0
  157. package/lib/types/components/design-system/ListItem.d.ts +36 -0
  158. package/lib/types/components/design-system/ListItem.d.ts.map +1 -0
  159. package/lib/types/components/design-system/ListItem.js +48 -0
  160. package/lib/types/components/design-system/LoadingState.d.ts +19 -0
  161. package/lib/types/components/design-system/LoadingState.d.ts.map +1 -0
  162. package/lib/types/components/design-system/LoadingState.js +22 -0
  163. package/lib/types/components/design-system/Pane.d.ts +17 -0
  164. package/lib/types/components/design-system/Pane.d.ts.map +1 -0
  165. package/lib/types/components/design-system/Pane.js +15 -0
  166. package/lib/types/components/design-system/ProgressBar.d.ts +22 -0
  167. package/lib/types/components/design-system/ProgressBar.d.ts.map +1 -0
  168. package/lib/types/components/design-system/ProgressBar.js +27 -0
  169. package/lib/types/components/design-system/StatusIcon.d.ts +15 -0
  170. package/lib/types/components/design-system/StatusIcon.d.ts.map +1 -0
  171. package/lib/types/components/design-system/StatusIcon.js +20 -0
  172. package/lib/types/components/design-system/ThemeProvider.d.ts +11 -0
  173. package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -0
  174. package/lib/types/components/design-system/ThemeProvider.js +135 -0
  175. package/lib/types/components/design-system/ThemedBox.d.ts +37 -0
  176. package/lib/types/components/design-system/ThemedBox.d.ts.map +1 -0
  177. package/lib/types/components/design-system/ThemedBox.js +26 -0
  178. package/lib/types/components/design-system/ThemedText.d.ts +56 -0
  179. package/lib/types/components/design-system/ThemedText.d.ts.map +1 -0
  180. package/lib/types/components/design-system/ThemedText.js +45 -0
  181. package/lib/types/components/messages/AssistantTextMessage.d.ts +18 -0
  182. package/lib/types/components/messages/AssistantTextMessage.d.ts.map +1 -0
  183. package/lib/types/components/messages/AssistantTextMessage.js +15 -0
  184. package/lib/types/components/messages/AssistantThinkingMessage.d.ts +23 -0
  185. package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -0
  186. package/lib/types/components/messages/AssistantThinkingMessage.js +23 -0
  187. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +23 -0
  188. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -0
  189. package/lib/types/components/messages/AssistantToolUseMessage.js +220 -0
  190. package/lib/types/components/messages/MessageMetadata.d.ts +15 -0
  191. package/lib/types/components/messages/MessageMetadata.d.ts.map +1 -0
  192. package/lib/types/components/messages/MessageMetadata.js +20 -0
  193. package/lib/types/components/messages/UserPromptMessage.d.ts +19 -0
  194. package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -0
  195. package/lib/types/components/messages/UserPromptMessage.js +15 -0
  196. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +39 -0
  197. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -0
  198. package/lib/types/components/questions/AskUserQuestionPanel.js +228 -0
  199. package/lib/types/components/shimmer.d.ts +35 -0
  200. package/lib/types/components/shimmer.d.ts.map +1 -0
  201. package/lib/types/components/shimmer.js +43 -0
  202. package/lib/types/components/whaleFrames.d.ts +25 -0
  203. package/lib/types/components/whaleFrames.d.ts.map +1 -0
  204. package/lib/types/components/whaleFrames.js +419 -0
  205. package/lib/types/customTheme.d.ts +104 -0
  206. package/lib/types/customTheme.d.ts.map +1 -0
  207. package/lib/types/customTheme.js +268 -0
  208. package/lib/types/effortPrefs.d.ts +22 -0
  209. package/lib/types/effortPrefs.d.ts.map +1 -0
  210. package/lib/types/effortPrefs.js +45 -0
  211. package/lib/types/history.d.ts +24 -0
  212. package/lib/types/history.d.ts.map +1 -0
  213. package/lib/types/history.js +75 -0
  214. package/lib/types/hooks/useBlink.d.ts +11 -0
  215. package/lib/types/hooks/useBlink.d.ts.map +1 -0
  216. package/lib/types/hooks/useBlink.js +20 -0
  217. package/lib/types/i18n.d.ts +926 -0
  218. package/lib/types/i18n.d.ts.map +1 -0
  219. package/lib/types/i18n.js +356 -0
  220. package/lib/types/index.d.ts +70 -0
  221. package/lib/types/index.d.ts.map +1 -0
  222. package/lib/types/index.js +31 -0
  223. package/lib/types/ink/Ansi.d.ts +11 -0
  224. package/lib/types/ink/Ansi.d.ts.map +1 -0
  225. package/lib/types/ink/Ansi.js +269 -0
  226. package/lib/types/ink/bidi.d.ts +18 -0
  227. package/lib/types/ink/bidi.d.ts.map +1 -0
  228. package/lib/types/ink/bidi.js +119 -0
  229. package/lib/types/ink/clearTerminal.d.ts +22 -0
  230. package/lib/types/ink/clearTerminal.d.ts.map +1 -0
  231. package/lib/types/ink/clearTerminal.js +72 -0
  232. package/lib/types/ink/colorize.d.ts +33 -0
  233. package/lib/types/ink/colorize.d.ts.map +1 -0
  234. package/lib/types/ink/colorize.js +213 -0
  235. package/lib/types/ink/components/AlternateScreen.d.ts +22 -0
  236. package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -0
  237. package/lib/types/ink/components/AlternateScreen.js +74 -0
  238. package/lib/types/ink/components/App.d.ts +73 -0
  239. package/lib/types/ink/components/App.d.ts.map +1 -0
  240. package/lib/types/ink/components/App.js +597 -0
  241. package/lib/types/ink/components/AppContext.d.ts +15 -0
  242. package/lib/types/ink/components/AppContext.d.ts.map +1 -0
  243. package/lib/types/ink/components/AppContext.js +11 -0
  244. package/lib/types/ink/components/Box.d.ts +49 -0
  245. package/lib/types/ink/components/Box.d.ts.map +1 -0
  246. package/lib/types/ink/components/Box.js +153 -0
  247. package/lib/types/ink/components/Button.d.ts +37 -0
  248. package/lib/types/ink/components/Button.d.ts.map +1 -0
  249. package/lib/types/ink/components/Button.js +166 -0
  250. package/lib/types/ink/components/ClockContext.d.ts +10 -0
  251. package/lib/types/ink/components/ClockContext.d.ts.map +1 -0
  252. package/lib/types/ink/components/ClockContext.js +108 -0
  253. package/lib/types/ink/components/CursorDeclarationContext.d.ts +30 -0
  254. package/lib/types/ink/components/CursorDeclarationContext.d.ts.map +1 -0
  255. package/lib/types/ink/components/CursorDeclarationContext.js +6 -0
  256. package/lib/types/ink/components/ErrorOverview.d.ts +7 -0
  257. package/lib/types/ink/components/ErrorOverview.d.ts.map +1 -0
  258. package/lib/types/ink/components/ErrorOverview.js +49 -0
  259. package/lib/types/ink/components/Link.d.ts +8 -0
  260. package/lib/types/ink/components/Link.d.ts.map +1 -0
  261. package/lib/types/ink/components/Link.js +33 -0
  262. package/lib/types/ink/components/Newline.d.ts +13 -0
  263. package/lib/types/ink/components/Newline.d.ts.map +1 -0
  264. package/lib/types/ink/components/Newline.js +29 -0
  265. package/lib/types/ink/components/NoSelect.d.ts +20 -0
  266. package/lib/types/ink/components/NoSelect.d.ts.map +1 -0
  267. package/lib/types/ink/components/NoSelect.js +56 -0
  268. package/lib/types/ink/components/RawAnsi.d.ts +17 -0
  269. package/lib/types/ink/components/RawAnsi.d.ts.map +1 -0
  270. package/lib/types/ink/components/RawAnsi.js +45 -0
  271. package/lib/types/ink/components/ScrollBox.d.ts +78 -0
  272. package/lib/types/ink/components/ScrollBox.d.ts.map +1 -0
  273. package/lib/types/ink/components/ScrollBox.js +174 -0
  274. package/lib/types/ink/components/Spacer.d.ts +6 -0
  275. package/lib/types/ink/components/Spacer.d.ts.map +1 -0
  276. package/lib/types/ink/components/Spacer.js +19 -0
  277. package/lib/types/ink/components/StdinContext.d.ts +32 -0
  278. package/lib/types/ink/components/StdinContext.d.ts.map +1 -0
  279. package/lib/types/ink/components/StdinContext.js +16 -0
  280. package/lib/types/ink/components/TerminalFocusContext.d.ts +11 -0
  281. package/lib/types/ink/components/TerminalFocusContext.d.ts.map +1 -0
  282. package/lib/types/ink/components/TerminalFocusContext.js +45 -0
  283. package/lib/types/ink/components/TerminalSizeContext.d.ts +6 -0
  284. package/lib/types/ink/components/TerminalSizeContext.d.ts.map +1 -0
  285. package/lib/types/ink/components/TerminalSizeContext.js +3 -0
  286. package/lib/types/ink/components/Text.d.ts +56 -0
  287. package/lib/types/ink/components/Text.d.ts.map +1 -0
  288. package/lib/types/ink/components/Text.js +194 -0
  289. package/lib/types/ink/constants.d.ts +3 -0
  290. package/lib/types/ink/constants.d.ts.map +1 -0
  291. package/lib/types/ink/constants.js +2 -0
  292. package/lib/types/ink/cursor.d.ts +11 -0
  293. package/lib/types/ink/cursor.d.ts.map +1 -0
  294. package/lib/types/ink/cursor.js +1 -0
  295. package/lib/types/ink/devtools.d.ts +7 -0
  296. package/lib/types/ink/devtools.d.ts.map +1 -0
  297. package/lib/types/ink/devtools.js +1 -0
  298. package/lib/types/ink/dom.d.ts +178 -0
  299. package/lib/types/ink/dom.d.ts.map +1 -0
  300. package/lib/types/ink/dom.js +424 -0
  301. package/lib/types/ink/events/click-event.d.ts +32 -0
  302. package/lib/types/ink/events/click-event.d.ts.map +1 -0
  303. package/lib/types/ink/events/click-event.js +36 -0
  304. package/lib/types/ink/events/dispatcher.d.ts +63 -0
  305. package/lib/types/ink/events/dispatcher.d.ts.map +1 -0
  306. package/lib/types/ink/events/dispatcher.js +194 -0
  307. package/lib/types/ink/events/emitter.d.ts +20 -0
  308. package/lib/types/ink/events/emitter.d.ts.map +1 -0
  309. package/lib/types/ink/events/emitter.js +43 -0
  310. package/lib/types/ink/events/event-handlers.d.ts +47 -0
  311. package/lib/types/ink/events/event-handlers.d.ts.map +1 -0
  312. package/lib/types/ink/events/event-handlers.js +30 -0
  313. package/lib/types/ink/events/event.d.ts +19 -0
  314. package/lib/types/ink/events/event.d.ts.map +1 -0
  315. package/lib/types/ink/events/event.js +22 -0
  316. package/lib/types/ink/events/focus-event.d.ts +19 -0
  317. package/lib/types/ink/events/focus-event.d.ts.map +1 -0
  318. package/lib/types/ink/events/focus-event.js +21 -0
  319. package/lib/types/ink/events/input-event.d.ts +53 -0
  320. package/lib/types/ink/events/input-event.d.ts.map +1 -0
  321. package/lib/types/ink/events/input-event.js +180 -0
  322. package/lib/types/ink/events/keyboard-event.d.ts +40 -0
  323. package/lib/types/ink/events/keyboard-event.d.ts.map +1 -0
  324. package/lib/types/ink/events/keyboard-event.js +65 -0
  325. package/lib/types/ink/events/paste-event.d.ts +11 -0
  326. package/lib/types/ink/events/paste-event.d.ts.map +1 -0
  327. package/lib/types/ink/events/paste-event.js +13 -0
  328. package/lib/types/ink/events/resize-event.d.ts +13 -0
  329. package/lib/types/ink/events/resize-event.d.ts.map +1 -0
  330. package/lib/types/ink/events/resize-event.js +16 -0
  331. package/lib/types/ink/events/terminal-event.d.ts +112 -0
  332. package/lib/types/ink/events/terminal-event.d.ts.map +1 -0
  333. package/lib/types/ink/events/terminal-event.js +131 -0
  334. package/lib/types/ink/events/terminal-focus-event.d.ts +21 -0
  335. package/lib/types/ink/events/terminal-focus-event.d.ts.map +1 -0
  336. package/lib/types/ink/events/terminal-focus-event.js +18 -0
  337. package/lib/types/ink/focus.d.ts +74 -0
  338. package/lib/types/ink/focus.d.ts.map +1 -0
  339. package/lib/types/ink/focus.js +188 -0
  340. package/lib/types/ink/frame.d.ts +119 -0
  341. package/lib/types/ink/frame.d.ts.map +1 -0
  342. package/lib/types/ink/frame.js +43 -0
  343. package/lib/types/ink/get-max-width.d.ts +20 -0
  344. package/lib/types/ink/get-max-width.d.ts.map +1 -0
  345. package/lib/types/ink/get-max-width.js +25 -0
  346. package/lib/types/ink/hit-test.d.ts +47 -0
  347. package/lib/types/ink/hit-test.d.ts.map +1 -0
  348. package/lib/types/ink/hit-test.js +126 -0
  349. package/lib/types/ink/hooks/use-animation-frame.d.ts +27 -0
  350. package/lib/types/ink/hooks/use-animation-frame.d.ts.map +1 -0
  351. package/lib/types/ink/hooks/use-animation-frame.js +48 -0
  352. package/lib/types/ink/hooks/use-app.d.ts +8 -0
  353. package/lib/types/ink/hooks/use-app.d.ts.map +1 -0
  354. package/lib/types/ink/hooks/use-app.js +8 -0
  355. package/lib/types/ink/hooks/use-copy-on-select.d.ts +22 -0
  356. package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -0
  357. package/lib/types/ink/hooks/use-copy-on-select.js +40 -0
  358. package/lib/types/ink/hooks/use-declared-cursor.d.ts +31 -0
  359. package/lib/types/ink/hooks/use-declared-cursor.d.ts.map +1 -0
  360. package/lib/types/ink/hooks/use-declared-cursor.js +65 -0
  361. package/lib/types/ink/hooks/use-input.d.ts +41 -0
  362. package/lib/types/ink/hooks/use-input.d.ts.map +1 -0
  363. package/lib/types/ink/hooks/use-input.js +73 -0
  364. package/lib/types/ink/hooks/use-interval.d.ts +23 -0
  365. package/lib/types/ink/hooks/use-interval.d.ts.map +1 -0
  366. package/lib/types/ink/hooks/use-interval.js +58 -0
  367. package/lib/types/ink/hooks/use-search-highlight.d.ts +34 -0
  368. package/lib/types/ink/hooks/use-search-highlight.d.ts.map +1 -0
  369. package/lib/types/ink/hooks/use-search-highlight.js +35 -0
  370. package/lib/types/ink/hooks/use-selection.d.ts +44 -0
  371. package/lib/types/ink/hooks/use-selection.d.ts.map +1 -0
  372. package/lib/types/ink/hooks/use-selection.js +64 -0
  373. package/lib/types/ink/hooks/use-stdin.d.ts +8 -0
  374. package/lib/types/ink/hooks/use-stdin.d.ts.map +1 -0
  375. package/lib/types/ink/hooks/use-stdin.js +8 -0
  376. package/lib/types/ink/hooks/use-tab-status.d.ts +18 -0
  377. package/lib/types/ink/hooks/use-tab-status.d.ts.map +1 -0
  378. package/lib/types/ink/hooks/use-tab-status.js +58 -0
  379. package/lib/types/ink/hooks/use-terminal-focus.d.ts +11 -0
  380. package/lib/types/ink/hooks/use-terminal-focus.d.ts.map +1 -0
  381. package/lib/types/ink/hooks/use-terminal-focus.js +15 -0
  382. package/lib/types/ink/hooks/use-terminal-size.d.ts +6 -0
  383. package/lib/types/ink/hooks/use-terminal-size.d.ts.map +1 -0
  384. package/lib/types/ink/hooks/use-terminal-size.js +12 -0
  385. package/lib/types/ink/hooks/use-terminal-title.d.ts +14 -0
  386. package/lib/types/ink/hooks/use-terminal-title.d.ts.map +1 -0
  387. package/lib/types/ink/hooks/use-terminal-title.js +30 -0
  388. package/lib/types/ink/hooks/use-terminal-viewport.d.ts +32 -0
  389. package/lib/types/ink/hooks/use-terminal-viewport.d.ts.map +1 -0
  390. package/lib/types/ink/hooks/use-terminal-viewport.js +79 -0
  391. package/lib/types/ink/ink.d.ts +370 -0
  392. package/lib/types/ink/ink.d.ts.map +1 -0
  393. package/lib/types/ink/ink.js +1665 -0
  394. package/lib/types/ink/instances.d.ts +10 -0
  395. package/lib/types/ink/instances.d.ts.map +1 -0
  396. package/lib/types/ink/instances.js +13 -0
  397. package/lib/types/ink/layout/engine.d.ts +7 -0
  398. package/lib/types/ink/layout/engine.d.ts.map +1 -0
  399. package/lib/types/ink/layout/engine.js +8 -0
  400. package/lib/types/ink/layout/geometry.d.ts +86 -0
  401. package/lib/types/ink/layout/geometry.d.ts.map +1 -0
  402. package/lib/types/ink/layout/geometry.js +95 -0
  403. package/lib/types/ink/layout/node.d.ts +151 -0
  404. package/lib/types/ink/layout/node.d.ts.map +1 -0
  405. package/lib/types/ink/layout/node.js +72 -0
  406. package/lib/types/ink/layout/yoga.d.ts +69 -0
  407. package/lib/types/ink/layout/yoga.d.ts.map +1 -0
  408. package/lib/types/ink/layout/yoga.js +249 -0
  409. package/lib/types/ink/line-width-cache.d.ts +9 -0
  410. package/lib/types/ink/line-width-cache.d.ts.map +1 -0
  411. package/lib/types/ink/line-width-cache.js +45 -0
  412. package/lib/types/ink/log-update.d.ts +57 -0
  413. package/lib/types/ink/log-update.d.ts.map +1 -0
  414. package/lib/types/ink/log-update.js +710 -0
  415. package/lib/types/ink/measure-element.d.ts +19 -0
  416. package/lib/types/ink/measure-element.d.ts.map +1 -0
  417. package/lib/types/ink/measure-element.js +10 -0
  418. package/lib/types/ink/measure-text.d.ts +13 -0
  419. package/lib/types/ink/measure-text.d.ts.map +1 -0
  420. package/lib/types/ink/measure-text.js +38 -0
  421. package/lib/types/ink/node-cache.d.ts +33 -0
  422. package/lib/types/ink/node-cache.d.ts.map +1 -0
  423. package/lib/types/ink/node-cache.js +42 -0
  424. package/lib/types/ink/optimizer.d.ts +18 -0
  425. package/lib/types/ink/optimizer.d.ts.map +1 -0
  426. package/lib/types/ink/optimizer.js +83 -0
  427. package/lib/types/ink/output.d.ts +200 -0
  428. package/lib/types/ink/output.d.ts.map +1 -0
  429. package/lib/types/ink/output.js +663 -0
  430. package/lib/types/ink/parse-keypress.d.ts +132 -0
  431. package/lib/types/ink/parse-keypress.d.ts.map +1 -0
  432. package/lib/types/ink/parse-keypress.js +707 -0
  433. package/lib/types/ink/reconciler.d.ts +43 -0
  434. package/lib/types/ink/reconciler.d.ts.map +1 -0
  435. package/lib/types/ink/reconciler.js +413 -0
  436. package/lib/types/ink/render-border.d.ts +36 -0
  437. package/lib/types/ink/render-border.d.ts.map +1 -0
  438. package/lib/types/ink/render-border.js +143 -0
  439. package/lib/types/ink/render-node-to-output.d.ts +93 -0
  440. package/lib/types/ink/render-node-to-output.d.ts.map +1 -0
  441. package/lib/types/ink/render-node-to-output.js +1290 -0
  442. package/lib/types/ink/render-to-screen.d.ts +65 -0
  443. package/lib/types/ink/render-to-screen.d.ts.map +1 -0
  444. package/lib/types/ink/render-to-screen.js +189 -0
  445. package/lib/types/ink/renderer.d.ts +24 -0
  446. package/lib/types/ink/renderer.d.ts.map +1 -0
  447. package/lib/types/ink/renderer.js +136 -0
  448. package/lib/types/ink/root.d.ts +91 -0
  449. package/lib/types/ink/root.d.ts.map +1 -0
  450. package/lib/types/ink/root.js +93 -0
  451. package/lib/types/ink/screen.d.ts +443 -0
  452. package/lib/types/ink/screen.d.ts.map +1 -0
  453. package/lib/types/ink/screen.js +1295 -0
  454. package/lib/types/ink/searchHighlight.d.ts +25 -0
  455. package/lib/types/ink/searchHighlight.d.ts.map +1 -0
  456. package/lib/types/ink/searchHighlight.js +82 -0
  457. package/lib/types/ink/selection.d.ts +323 -0
  458. package/lib/types/ink/selection.d.ts.map +1 -0
  459. package/lib/types/ink/selection.js +881 -0
  460. package/lib/types/ink/squash-text-nodes.d.ts +30 -0
  461. package/lib/types/ink/squash-text-nodes.d.ts.map +1 -0
  462. package/lib/types/ink/squash-text-nodes.js +63 -0
  463. package/lib/types/ink/stringWidth.d.ts +11 -0
  464. package/lib/types/ink/stringWidth.d.ts.map +1 -0
  465. package/lib/types/ink/stringWidth.js +209 -0
  466. package/lib/types/ink/styles.d.ts +324 -0
  467. package/lib/types/ink/styles.d.ts.map +1 -0
  468. package/lib/types/ink/styles.js +307 -0
  469. package/lib/types/ink/supports-hyperlinks.d.ts +20 -0
  470. package/lib/types/ink/supports-hyperlinks.d.ts.map +1 -0
  471. package/lib/types/ink/supports-hyperlinks.js +44 -0
  472. package/lib/types/ink/tabstops.d.ts +9 -0
  473. package/lib/types/ink/tabstops.d.ts.map +1 -0
  474. package/lib/types/ink/tabstops.js +46 -0
  475. package/lib/types/ink/terminal-focus-state.d.ts +35 -0
  476. package/lib/types/ink/terminal-focus-state.d.ts.map +1 -0
  477. package/lib/types/ink/terminal-focus-state.js +57 -0
  478. package/lib/types/ink/terminal-querier.d.ts +161 -0
  479. package/lib/types/ink/terminal-querier.d.ts.map +1 -0
  480. package/lib/types/ink/terminal-querier.js +204 -0
  481. package/lib/types/ink/terminal.d.ts +80 -0
  482. package/lib/types/ink/terminal.d.ts.map +1 -0
  483. package/lib/types/ink/terminal.js +268 -0
  484. package/lib/types/ink/termio/ansi.d.ts +75 -0
  485. package/lib/types/ink/termio/ansi.d.ts.map +1 -0
  486. package/lib/types/ink/termio/ansi.js +79 -0
  487. package/lib/types/ink/termio/csi.d.ts +253 -0
  488. package/lib/types/ink/termio/csi.d.ts.map +1 -0
  489. package/lib/types/ink/termio/csi.js +347 -0
  490. package/lib/types/ink/termio/dec.d.ts +61 -0
  491. package/lib/types/ink/termio/dec.d.ts.map +1 -0
  492. package/lib/types/ink/termio/dec.js +76 -0
  493. package/lib/types/ink/termio/esc.d.ts +15 -0
  494. package/lib/types/ink/termio/esc.d.ts.map +1 -0
  495. package/lib/types/ink/termio/esc.js +57 -0
  496. package/lib/types/ink/termio/osc.d.ts +208 -0
  497. package/lib/types/ink/termio/osc.d.ts.map +1 -0
  498. package/lib/types/ink/termio/osc.js +466 -0
  499. package/lib/types/ink/termio/parser.d.ts +46 -0
  500. package/lib/types/ink/termio/parser.d.ts.map +1 -0
  501. package/lib/types/ink/termio/parser.js +366 -0
  502. package/lib/types/ink/termio/sgr.d.ts +17 -0
  503. package/lib/types/ink/termio/sgr.d.ts.map +1 -0
  504. package/lib/types/ink/termio/sgr.js +300 -0
  505. package/lib/types/ink/termio/tokenize.d.ts +50 -0
  506. package/lib/types/ink/termio/tokenize.d.ts.map +1 -0
  507. package/lib/types/ink/termio/tokenize.js +266 -0
  508. package/lib/types/ink/termio/types.d.ts +211 -0
  509. package/lib/types/ink/termio/types.d.ts.map +1 -0
  510. package/lib/types/ink/termio/types.js +68 -0
  511. package/lib/types/ink/termio.d.ts +25 -0
  512. package/lib/types/ink/termio.d.ts.map +1 -0
  513. package/lib/types/ink/termio.js +24 -0
  514. package/lib/types/ink/truncateToWidth.d.ts +7 -0
  515. package/lib/types/ink/truncateToWidth.d.ts.map +1 -0
  516. package/lib/types/ink/truncateToWidth.js +18 -0
  517. package/lib/types/ink/useTerminalNotification.d.ts +45 -0
  518. package/lib/types/ink/useTerminalNotification.d.ts.map +1 -0
  519. package/lib/types/ink/useTerminalNotification.js +70 -0
  520. package/lib/types/ink/warn.d.ts +7 -0
  521. package/lib/types/ink/warn.d.ts.map +1 -0
  522. package/lib/types/ink/warn.js +15 -0
  523. package/lib/types/ink/widest-line.d.ts +7 -0
  524. package/lib/types/ink/widest-line.d.ts.map +1 -0
  525. package/lib/types/ink/widest-line.js +19 -0
  526. package/lib/types/ink/wrap-text.d.ts +10 -0
  527. package/lib/types/ink/wrap-text.d.ts.map +1 -0
  528. package/lib/types/ink/wrap-text.js +61 -0
  529. package/lib/types/ink/wrapAnsi.d.ts +18 -0
  530. package/lib/types/ink/wrapAnsi.d.ts.map +1 -0
  531. package/lib/types/ink/wrapAnsi.js +16 -0
  532. package/lib/types/invariant.d.ts +20 -0
  533. package/lib/types/invariant.d.ts.map +1 -0
  534. package/lib/types/invariant.js +26 -0
  535. package/lib/types/modelPrefs.d.ts +37 -0
  536. package/lib/types/modelPrefs.d.ts.map +1 -0
  537. package/lib/types/modelPrefs.js +66 -0
  538. package/lib/types/modelRoute.d.ts +79 -0
  539. package/lib/types/modelRoute.d.ts.map +1 -0
  540. package/lib/types/modelRoute.js +96 -0
  541. package/lib/types/native-ts/yoga-layout/enums.d.ts +183 -0
  542. package/lib/types/native-ts/yoga-layout/enums.d.ts.map +1 -0
  543. package/lib/types/native-ts/yoga-layout/enums.js +150 -0
  544. package/lib/types/native-ts/yoga-layout/index.d.ts +788 -0
  545. package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -0
  546. package/lib/types/native-ts/yoga-layout/index.js +2571 -0
  547. package/lib/types/packaged-skills.d.ts +10 -0
  548. package/lib/types/packaged-skills.d.ts.map +1 -0
  549. package/lib/types/packaged-skills.js +63 -0
  550. package/lib/types/plugin.d.ts +33 -0
  551. package/lib/types/plugin.d.ts.map +1 -0
  552. package/lib/types/plugin.js +454 -0
  553. package/lib/types/presetPrefs.d.ts +29 -0
  554. package/lib/types/presetPrefs.d.ts.map +1 -0
  555. package/lib/types/presetPrefs.js +61 -0
  556. package/lib/types/presets.d.ts +110 -0
  557. package/lib/types/presets.d.ts.map +1 -0
  558. package/lib/types/presets.js +114 -0
  559. package/lib/types/questions.d.ts +97 -0
  560. package/lib/types/questions.d.ts.map +1 -0
  561. package/lib/types/questions.js +201 -0
  562. package/lib/types/screens/Chat.d.ts +23 -0
  563. package/lib/types/screens/Chat.d.ts.map +1 -0
  564. package/lib/types/screens/Chat.js +1263 -0
  565. package/lib/types/screens/StatusLine.d.ts +16 -0
  566. package/lib/types/screens/StatusLine.d.ts.map +1 -0
  567. package/lib/types/screens/StatusLine.js +105 -0
  568. package/lib/types/screens/StatusMetrics.d.ts +87 -0
  569. package/lib/types/screens/StatusMetrics.d.ts.map +1 -0
  570. package/lib/types/screens/StatusMetrics.js +252 -0
  571. package/lib/types/sessionHistory.d.ts +32 -0
  572. package/lib/types/sessionHistory.d.ts.map +1 -0
  573. package/lib/types/sessionHistory.js +87 -0
  574. package/lib/types/theme.d.ts +115 -0
  575. package/lib/types/theme.d.ts.map +1 -0
  576. package/lib/types/theme.js +300 -0
  577. package/lib/types/themePrefs.d.ts +28 -0
  578. package/lib/types/themePrefs.d.ts.map +1 -0
  579. package/lib/types/themePrefs.js +59 -0
  580. package/lib/types/ui.d.ts +28 -0
  581. package/lib/types/ui.d.ts.map +1 -0
  582. package/lib/types/ui.js +25 -0
  583. package/lib/types/update.d.ts +76 -0
  584. package/lib/types/update.d.ts.map +1 -0
  585. package/lib/types/update.js +203 -0
  586. package/lib/types/utils/clipboard.d.ts +43 -0
  587. package/lib/types/utils/clipboard.d.ts.map +1 -0
  588. package/lib/types/utils/clipboard.js +82 -0
  589. package/lib/types/utils/debug.d.ts +8 -0
  590. package/lib/types/utils/debug.d.ts.map +1 -0
  591. package/lib/types/utils/debug.js +12 -0
  592. package/lib/types/utils/earlyInput.d.ts +7 -0
  593. package/lib/types/utils/earlyInput.d.ts.map +1 -0
  594. package/lib/types/utils/earlyInput.js +6 -0
  595. package/lib/types/utils/env.d.ts +10 -0
  596. package/lib/types/utils/env.d.ts.map +1 -0
  597. package/lib/types/utils/env.js +9 -0
  598. package/lib/types/utils/envUtils.d.ts +8 -0
  599. package/lib/types/utils/envUtils.d.ts.map +1 -0
  600. package/lib/types/utils/envUtils.js +13 -0
  601. package/lib/types/utils/execFileNoThrow.d.ts +34 -0
  602. package/lib/types/utils/execFileNoThrow.d.ts.map +1 -0
  603. package/lib/types/utils/execFileNoThrow.js +31 -0
  604. package/lib/types/utils/fullscreen.d.ts +8 -0
  605. package/lib/types/utils/fullscreen.d.ts.map +1 -0
  606. package/lib/types/utils/fullscreen.js +10 -0
  607. package/lib/types/utils/intl.d.ts +7 -0
  608. package/lib/types/utils/intl.d.ts.map +1 -0
  609. package/lib/types/utils/intl.js +9 -0
  610. package/lib/types/utils/loaded-context.d.ts +20 -0
  611. package/lib/types/utils/loaded-context.d.ts.map +1 -0
  612. package/lib/types/utils/loaded-context.js +36 -0
  613. package/lib/types/utils/log.d.ts +7 -0
  614. package/lib/types/utils/log.d.ts.map +1 -0
  615. package/lib/types/utils/log.js +9 -0
  616. package/lib/types/utils/mentions.d.ts +30 -0
  617. package/lib/types/utils/mentions.d.ts.map +1 -0
  618. package/lib/types/utils/mentions.js +72 -0
  619. package/lib/types/utils/narration.d.ts +11 -0
  620. package/lib/types/utils/narration.d.ts.map +1 -0
  621. package/lib/types/utils/narration.js +16 -0
  622. package/lib/types/utils/semver.d.ts +9 -0
  623. package/lib/types/utils/semver.d.ts.map +1 -0
  624. package/lib/types/utils/semver.js +24 -0
  625. package/lib/types/utils/sliceAnsi.d.ts +12 -0
  626. package/lib/types/utils/sliceAnsi.d.ts.map +1 -0
  627. package/lib/types/utils/sliceAnsi.js +79 -0
  628. package/lib/types/working-activity.d.ts +19 -0
  629. package/lib/types/working-activity.d.ts.map +1 -0
  630. package/lib/types/working-activity.js +18 -0
  631. package/package.json +141 -0
  632. package/skills/audit/SKILL.md +24 -0
  633. package/skills/bug/SKILL.md +27 -0
  634. package/skills/pr-comments/SKILL.md +20 -0
  635. package/skills/practice/SKILL.md +22 -0
  636. package/skills/release-notes/SKILL.md +25 -0
  637. package/skills/review/SKILL.md +25 -0
  638. package/skills/vuln-check/SKILL.md +25 -0
@@ -0,0 +1,672 @@
1
+ import { type Agent, type AgentHandle, type AgentStatus } from '@deepseek-ai/dsh-agent';
2
+ import type { LlmModelInfo } from '@deepseek-ai/dsh-llm';
3
+ import { type SessionEvent } from '@deepseek-ai/dsh-session';
4
+ import type { Context } from '@deepseek-ai/cordis';
5
+ import { type LocalCommand } from './commands.js';
6
+ import { type SessionRecord } from './sessionHistory.js';
7
+ import type { SpinnerMode } from './components/Spinner/spinnerMode.js';
8
+ /** Tool-call card state, mirroring the Claude Code tool-use presentation. */
9
+ export interface ToolRow {
10
+ readonly callId: string;
11
+ readonly name: string;
12
+ /** Raw JSON arguments as the model produced them (displayed truncated). */
13
+ readonly argsText: string;
14
+ /** Full arguments, shown when Ctrl+O verbose mode is on; dropped when the
15
+ * row is folded (session log retains it). */
16
+ argsFull?: string;
17
+ status: 'running' | 'ok' | 'error';
18
+ resultText?: string;
19
+ /** Full result text, shown when Ctrl+O verbose mode is on. */
20
+ resultFull?: string;
21
+ errorText?: string;
22
+ /** Tool-owned render intent from dsh-tools `presentCall` (diff/terminal/
23
+ * generic). Drives the structured card body instead of the raw text. */
24
+ callView?: ToolCallView;
25
+ /** Tool-owned completed-state view from `presentResult` (applied diff
26
+ * hunks, terminal output, read content…). Wins over callView once set. */
27
+ resultView?: ToolResultView;
28
+ /** Wall-clock start of the call (live elapsed while running). */
29
+ startedAt: number;
30
+ /** Settled wall-clock duration, written by tool/result. */
31
+ durationMs?: number;
32
+ }
33
+ /** One file change in a tool presentation (dsh-tools FileDiff). */
34
+ export interface ToolFileDiff {
35
+ readonly path: string;
36
+ /** Prior content, or null for a new file / no before-image. */
37
+ readonly oldText: string | null;
38
+ readonly newText: string;
39
+ }
40
+ /** Pending-call render intent (structural subset of dsh-tools ToolCallView). */
41
+ export type ToolCallView = {
42
+ readonly card: 'generic';
43
+ readonly title: string;
44
+ readonly kind?: string;
45
+ } | {
46
+ readonly card: 'terminal';
47
+ readonly title: string;
48
+ readonly description?: string;
49
+ readonly cwd?: string;
50
+ } | {
51
+ readonly card: 'diff';
52
+ readonly title: string;
53
+ readonly diffs: readonly ToolFileDiff[];
54
+ };
55
+ /** Completed-call render intent (structural subset of dsh-tools
56
+ * ToolResultView). `web` results and unknown shapes fall back to raw text. */
57
+ export type ToolResultView = {
58
+ readonly card: 'generic';
59
+ readonly title?: string;
60
+ readonly content?: ReadonlyArray<{
61
+ readonly type: string;
62
+ readonly text?: string;
63
+ }>;
64
+ } | {
65
+ readonly card: 'terminal';
66
+ readonly title?: string;
67
+ readonly output?: string;
68
+ readonly exitCode?: number;
69
+ readonly signal?: string;
70
+ } | {
71
+ readonly card: 'diff';
72
+ readonly title?: string;
73
+ readonly diffs: readonly ToolFileDiff[];
74
+ } | {
75
+ readonly card: 'read';
76
+ readonly title?: string;
77
+ readonly path?: string;
78
+ readonly content?: ReadonlyArray<{
79
+ readonly type: string;
80
+ readonly text?: string;
81
+ }>;
82
+ } | {
83
+ readonly card: 'search';
84
+ readonly shape: 'matches';
85
+ readonly title?: string;
86
+ readonly files: ReadonlyArray<{
87
+ readonly path: string;
88
+ readonly matches: ReadonlyArray<{
89
+ readonly lineNumber: number;
90
+ readonly line: string;
91
+ }>;
92
+ }>;
93
+ readonly truncated: boolean;
94
+ readonly total: number;
95
+ } | {
96
+ readonly card: 'search';
97
+ readonly shape: 'paths';
98
+ readonly title?: string;
99
+ readonly paths: readonly string[];
100
+ readonly truncated: boolean;
101
+ readonly total: number;
102
+ };
103
+ /** Re-derives the presentation views foldRows dropped, threaded into
104
+ * foldBack (module-level, no ctx access) by the channel. */
105
+ export interface ToolViewPresenter {
106
+ call(name: string, rawArgs: string): ToolCallView | undefined;
107
+ result(name: string, rawArgs: string, data: SessionEvent<'tool/result'>['data']): ToolResultView | undefined;
108
+ }
109
+ /**
110
+ * One rendered transcript row. The DSH session log is the source of truth:
111
+ * rows are derived from `session/event` records (and the initial
112
+ * `agent.session.events` replay), never from optimistic local state.
113
+ */
114
+ export interface ChatRow {
115
+ id: number;
116
+ kind: 'user' | 'assistant' | 'tool' | 'notice' | 'reasoning' | 'interrupt' | 'local' | 'local-output' | 'compact';
117
+ /** Extra label for non-human user rows (e.g. `steering`). */
118
+ label?: string;
119
+ text: string;
120
+ /** True while an assistant step is still streaming chunks. */
121
+ streaming?: boolean;
122
+ /** Present on `tool` rows; the card model. */
123
+ tool?: ToolRow;
124
+ /** Event wall-clock time (transcript-mode metadata, assistant rows). */
125
+ time?: number;
126
+ /** Present on `reasoning` rows once settled: thinking wall-clock duration. */
127
+ durationMs?: number;
128
+ /** Source session event seq — present on every log-derived row (rewind
129
+ * fork anchor on user rows; window-floor bookkeeping for the rest). */
130
+ seq?: number;
131
+ /** True when the row's full text was folded to keep the transcript window
132
+ * bounded (see MAX_ROWS); the session log still holds the full content
133
+ * and loadOlder() restores it. */
134
+ folded?: boolean;
135
+ /** True when loadOlder() restored this row from the log; restored rows are
136
+ * exempt from the next fold pass so a restore is not instantly undone. */
137
+ restored?: boolean;
138
+ }
139
+ /** Running token totals across the session's assistant messages. */
140
+ export interface TokenUsage {
141
+ input: number;
142
+ output: number;
143
+ }
144
+ /**
145
+ * Latest `activity/status` snapshot (the log-only event appended by
146
+ * `@deepseek-ai/dsh-working-activity` for any UI consumer): the model's
147
+ * live working line — thinking copy, running tool, turn summary. dsh-tui
148
+ * renders it on the status line; nothing here requires the plugin (absent
149
+ * events simply leave the slot empty).
150
+ */
151
+ export interface ActivityStatus {
152
+ readonly phase: 'idle' | 'waiting' | 'thinking' | 'tool' | 'done';
153
+ /** Human-readable status line (plain text, no ANSI). */
154
+ readonly line: string;
155
+ readonly label?: string;
156
+ readonly detail?: string;
157
+ readonly phrase?: string;
158
+ readonly toolCount: number;
159
+ readonly turnElapsedMs: number;
160
+ }
161
+ /** A transient status message shown above the prompt input. */
162
+ export interface NotificationItem {
163
+ id: number;
164
+ text: string;
165
+ /** Theme color key; defaults to dim. */
166
+ color?: 'error' | 'warning' | 'success';
167
+ /** Auto-dismiss after this many ms (default 4000). */
168
+ timeoutMs: number;
169
+ }
170
+ /**
171
+ * Durable same-session goal projection surfaced on the channel (see
172
+ * {@link Channel['goal']}). Mirrors the goal domain's `GoalSnapshot` +
173
+ * replay counters; declared locally so the UI needs no dsh-goal dependency.
174
+ */
175
+ export interface ChannelGoal {
176
+ id: string;
177
+ revision: number;
178
+ objective: string;
179
+ phase: 'active' | 'paused' | 'blocked' | 'complete';
180
+ /** Total admitted goal-round cap. */
181
+ maxGoalRounds: number;
182
+ /** Highest admitted continuation round so far. */
183
+ roundsStarted: number;
184
+ /** Present exactly while `phase` is `blocked`. */
185
+ blockedReason?: {
186
+ code: string;
187
+ message: string;
188
+ };
189
+ }
190
+ /** One entry of the latest todo-list snapshot (mirrors the session domain's
191
+ * `TodoItem`; declared locally for the same reason as {@link ChannelGoal}). */
192
+ export interface TodoPanelItem {
193
+ content: string;
194
+ status: 'pending' | 'in_progress' | 'completed';
195
+ }
196
+ /** One named prompt contribution with its model-visible text. */
197
+ export interface LoadedContextEntry {
198
+ /** Provider-declared name (e.g. `harness:identity`, `deployment:persona`). */
199
+ readonly name: string;
200
+ /** The interpolated text the model receives for this entry. */
201
+ readonly text: string;
202
+ }
203
+ /** One discovered workspace instruction file (AGENTS.md-family). */
204
+ export interface LoadedContextFile {
205
+ /** Model-facing path (e.g. `./AGENTS.md`). */
206
+ readonly displayPath: string;
207
+ }
208
+ /** One model-invocable skill from the skill registry. */
209
+ export interface LoadedContextSkill {
210
+ readonly name: string;
211
+ readonly description: string;
212
+ }
213
+ /** One model-visible tool from the prompt assembly. */
214
+ export interface LoadedContextTool {
215
+ readonly name: string;
216
+ readonly description: string;
217
+ }
218
+ /**
219
+ * Snapshot of everything a fresh conversation for the current agent will
220
+ * load: the assembled system prompt (ordered sections, dynamic context,
221
+ * tools), the workspace instruction files baseline discovery would inject,
222
+ * and the skill catalog. Declared locally so screens and helpers consume a
223
+ * self-contained contract instead of the dsh-system-prompt/dsh-skill types.
224
+ */
225
+ export interface LoadedContext {
226
+ /** Ordered system-prompt sections after strict variable interpolation. */
227
+ readonly sections: readonly LoadedContextEntry[];
228
+ /** Dynamic context contributions (runtime snapshot parts). */
229
+ readonly contexts: readonly LoadedContextEntry[];
230
+ /** Workspace instruction files (AGENTS.md-family) discovered for the cwd. */
231
+ readonly files: readonly LoadedContextFile[];
232
+ /** Model-invocable skills, when the skill registry is mounted. */
233
+ readonly skills: readonly LoadedContextSkill[];
234
+ /** Model-visible tools in assembly order. */
235
+ readonly tools: readonly LoadedContextTool[];
236
+ }
237
+ /**
238
+ * The public channel surface a screen renders: the full transcript and live
239
+ * status snapshot (tokens, spinner, working activity, goals, todos, loaded
240
+ * context) plus every action the TUI can take (submit, steer, cancel,
241
+ * rewind, resume, model switching, …). Implementations mutate internal state
242
+ * and bump `version` so subscribed screens re-render.
243
+ */
244
+ export interface Channel {
245
+ /** Monotonic version — bump on every mutation so screens can re-render. */
246
+ readonly version: number;
247
+ readonly rows: readonly ChatRow[];
248
+ readonly status: AgentStatus | 'starting' | 'disposed';
249
+ readonly sessionTitle: string;
250
+ readonly agentId: string;
251
+ /** Resolved model id (from the plugin config). */
252
+ readonly model: string;
253
+ /** Provider route of the live agent. */
254
+ readonly provider: string;
255
+ /** Running token totals across the session's assistant messages. */
256
+ readonly tokens: TokenUsage;
257
+ /** Working directory of the session. */
258
+ readonly cwd: string;
259
+ /** Current git branch, when the cwd is inside a git worktree. */
260
+ readonly gitBranch: string | undefined;
261
+ /** True between turn/start and turn/end — drives the working spinner. */
262
+ readonly working: boolean;
263
+ /** Which phase the spinner should present while working. */
264
+ readonly spinnerMode: SpinnerMode;
265
+ /** Chars streamed as text this turn (feeds the spinner token counter). */
266
+ readonly responseChars: number;
267
+ /** Number of tool calls still in flight this turn. */
268
+ readonly activeToolCount: number;
269
+ /** Wall-clock ms of turn/start (spinner elapsed timer). */
270
+ readonly turnStart: number;
271
+ /** Last user prompt text (sticky header + statusline). */
272
+ readonly lastUserText: string;
273
+ /** Transient notifications, newest last. */
274
+ readonly notifications: readonly NotificationItem[];
275
+ /** Adapter-advertised context capacity for the model route, when known. */
276
+ readonly contextWindow: number | undefined;
277
+ /** Reasoning effort of the latest request header, when the adapter sets one. */
278
+ readonly reasoningEffort: string | undefined;
279
+ /** Usage of the most recent request (context share + cache hits come from
280
+ * this, not the running totals — each request's input IS the context). */
281
+ readonly lastUsage: {
282
+ input: number;
283
+ output: number;
284
+ cacheRead: number;
285
+ cacheWrite: number;
286
+ } | undefined;
287
+ /** Output tokens per second of the current/last turn's response, when known. */
288
+ readonly tps: number | undefined;
289
+ /** Per-turn tps samples (sparkline history), oldest first. */
290
+ readonly tpsSamples: readonly {
291
+ tps: number;
292
+ at: number;
293
+ }[];
294
+ /** Latest working-activity snapshot (log-only `activity/status` event),
295
+ * when the leaf mounts dsh-working-activity. */
296
+ readonly workingActivity: ActivityStatus | undefined;
297
+ /** Working-activity indicator preset name (`claude`/`moon`/…/`random`). */
298
+ readonly activityFrames: string | undefined;
299
+ /** Whether working-activity events are consumed (config.activity). */
300
+ readonly activityEnabled: boolean;
301
+ /** Whether the segmented context bar row shows in the status footer
302
+ * (config.contextBar; the status/mode lines are unaffected). */
303
+ readonly contextBarEnabled: boolean;
304
+ /**
305
+ * Current same-session goal projection, when a goal exists. Derived live
306
+ * from the durable `goal/change` context events (round-zero goal-sourced
307
+ * user messages) in the session log — every goal mutation appends one, so
308
+ * this snapshot tracks create/edit/pause/resume/complete/block/clear in
309
+ * real time and replays correctly on resume/rewind.
310
+ */
311
+ readonly goal: ChannelGoal | undefined;
312
+ /**
313
+ * Latest todo-list snapshot (`todo/write` whole-list event, last write
314
+ * wins). Log-only UI state, updated live and on replay.
315
+ */
316
+ readonly todos: readonly TodoPanelItem[];
317
+ /**
318
+ * Snapshot of the context a fresh conversation for this agent will load
319
+ * (system prompt sections, dynamic context, workspace instructions, skill
320
+ * catalog, tools), computed at boot and on every agent swap. `undefined`
321
+ * while loading or when the snapshot could not be assembled — the startup
322
+ * panel stays hidden until it lands.
323
+ */
324
+ readonly loadedContext: LoadedContext | undefined;
325
+ /**
326
+ * Messages submitted while the model was working and not yet claimed by a
327
+ * turn (`steer` → next step boundary of the running turn, `followup` →
328
+ * after the turn ends). Driven by agent inbox events.
329
+ */
330
+ readonly pending: readonly PendingMessage[];
331
+ /**
332
+ * Effective slash commands: built-in locals plus plugin-registered
333
+ * commands (plan/goal/…) merged from the DSH command registry. The
334
+ * registry is the source of truth for external names — a plugin shadows
335
+ * nothing here; locals win on name collisions.
336
+ */
337
+ readonly commandList: readonly LocalCommand[];
338
+ /**
339
+ * Run a plugin-registered slash command against the live agent (DSH
340
+ * `dsh-commands` registry): logs `command/run`/`command/done` and returns
341
+ * the handler's result text — `''` when the handler succeeded silently,
342
+ * `undefined` when the registry has no such command (the caller falls
343
+ * back to sending the line to the model).
344
+ */
345
+ runExternalCommand(name: string, rawInput: string): Promise<string | undefined>;
346
+ /** Estimated context segments by content type (pi-nano-context style bar). */
347
+ readonly contextSegments: {
348
+ system: number;
349
+ prompt: number;
350
+ assistant: number;
351
+ thinking: number;
352
+ tools: number;
353
+ };
354
+ subscribe: (listener: () => void) => () => void;
355
+ submit(text: string): void;
356
+ /**
357
+ * Steer a message into the running turn (Codex/pi semantics): injected at
358
+ * the next step boundary, the agent continues without aborting.
359
+ */
360
+ steer(text: string): void;
361
+ /** Pull a pending message back out of the inbox (Alt+Up) for re-editing. */
362
+ removePending(id: string): boolean;
363
+ /** Abort the in-flight turn (`Ctrl+C` while working). */
364
+ cancel(): void;
365
+ /** Abort the in-flight turn and process `texts` right away (Esc/Ctrl+Enter
366
+ * with queued input): each text is re-queued as a followup once the abort
367
+ * settles, so the new turn starts immediately. Returns the count queued. */
368
+ interruptAndDeliver(texts: readonly string[]): number;
369
+ /** Rewind the conversation to a past user message (CC's double-Esc rewind):
370
+ * forks the session through that message, swaps in a fresh agent, and
371
+ * returns the message text for re-editing — or `null` when unwritable. */
372
+ rewindTo(row: ChatRow): Promise<string | null>;
373
+ /** Switch the live agent to a persisted session, replaying its history. */
374
+ resumeTo(sessionId: string): Promise<boolean>;
375
+ /** Start a fresh conversation (`/new`): a brand-new agent + session, the
376
+ * transcript cleared, the resume marker forgotten. */
377
+ newSession(): Promise<boolean>;
378
+ /** Switch the live model (`/model` picker): forks the conversation at its
379
+ * current end and continues it with a new agent routed to `provider`/`model`.
380
+ * The history replays unchanged; only the request route changes. */
381
+ switchModel(provider: string, model: string): Promise<boolean>;
382
+ /** Cycle the live route's reasoning effort (Shift+Tab) through the
383
+ * adapter's own level list (dsh parity: deepseek Off→High→Max), taking
384
+ * effect on the next request and persisting across restarts. */
385
+ cycleEffort(): Promise<void>;
386
+ /** The preset the CURRENT session runs under (issue #8), resolved from its
387
+ * log at create/resume time; undefined when no roster is mounted. */
388
+ readonly agentPreset: string | undefined;
389
+ /** The roster's presets for the `/preset` picker (empty without a roster). */
390
+ listPresets(): Promise<readonly PresetOption[]>;
391
+ /** Switch the agent preset (`/preset`): a blank session swaps composition
392
+ * in place (official `recompose` + logged `agent-preset/selected`); a
393
+ * started session is locked, so the choice persists as the default for
394
+ * future sessions instead. False when the roster is absent, the id is
395
+ * unknown/broken, or a turn is running. */
396
+ switchPreset(presetId: string): Promise<boolean>;
397
+ /** Reset the visible transcript (`/clear`). */
398
+ clear(): void;
399
+ /**
400
+ * Re-render rows older than the current in-memory window from the session
401
+ * log (rows beyond {@link ChannelState.rows}' cap are folded away; this
402
+ * restores them for review). Returns the number of rows restored, 0 when
403
+ * the whole log is already materialized.
404
+ */
405
+ loadOlder(): number;
406
+ /** Push a transient notification above the prompt input. */
407
+ notify(text: string, options?: {
408
+ color?: NotificationItem['color'];
409
+ timeoutMs?: number;
410
+ }): void;
411
+ /** Switch the working-activity indicator preset (`/activity`): validates
412
+ * the name, persists it to `~/.dsh-cc/working-activity.json`, and
413
+ * re-renders the indicator immediately; false when the name is unknown
414
+ * or the preference cannot be written. */
415
+ setActivityFrames(name: string): boolean;
416
+ /** Advertised models across every registered provider route (empty when the LLM service is absent). */
417
+ listModels(): Promise<readonly LlmModelInfo[]>;
418
+ /** Top-level entries of the session cwd for `@` file completion. */
419
+ listFiles(): Promise<readonly string[]>;
420
+ /** Recent sessions recorded by the DSH persistence backend (for `/resume`). */
421
+ listSessions(): Promise<readonly SessionRecord[]>;
422
+ /** Mark a session for `dsh-tui --resume` on the next launch. */
423
+ setResumeTarget(sessionId: string): void;
424
+ /** Manually compact the session history (CC's /compact); no-op notify when the leaf lacks a compaction service. */
425
+ compact(): void;
426
+ /** Render a multi-line local report in the transcript (`/status`,
427
+ * `/doctor`, …): a `local` row plus one `local-output` row per line. */
428
+ pushLocal(title: string, lines: readonly string[]): void;
429
+ /** MCP server/tool status for /mcp: one line per server, or setup guidance. */
430
+ mcpStatus(): string[];
431
+ /** Write the conversation transcript to `dsh-tui-export-<ts>.md` in the
432
+ * session cwd; returns the written path, or null on failure. */
433
+ exportSession(): string | null;
434
+ /** Create `AGENTS.md` in the session cwd (DSH workspace-context file);
435
+ * returns the path, `'exists'` when already present, or null on failure. */
436
+ initWorkspace(): string | null;
437
+ /** Environment diagnostics for `/doctor`. */
438
+ doctorInfo(): string[];
439
+ /** Subagent rows for `/agents` (DSH subagent service; empty message when
440
+ * the service is absent). */
441
+ listSubagents(): Promise<string[]>;
442
+ }
443
+ /** @internal */
444
+ /** One roster entry in the `/preset` picker (see {@link Channel.listPresets}). */
445
+ export interface PresetOption {
446
+ id: string;
447
+ name?: string;
448
+ description?: string;
449
+ /** Present when the roster marked this preset unloadable (shown verbatim). */
450
+ broken?: string;
451
+ isDefault: boolean;
452
+ }
453
+ /** @internal */
454
+ /** One user message submitted while the model was working, not yet claimed
455
+ * by a turn. `steer` lands at the next step boundary of the running turn;
456
+ * `followup` waits for the turn to end. */
457
+ export interface PendingMessage {
458
+ id: string;
459
+ text: string;
460
+ placement: 'steer' | 'followup';
461
+ }
462
+ /**
463
+ * Mutable channel state owned by {@link createChannel}: the screen's
464
+ * reactive store. Screens subscribe and re-render on `version` bumps; the
465
+ * fields mirror the public {@link Channel} contract, and the `@internal`
466
+ * emit hooks belong to the implementation.
467
+ */
468
+ export interface ChannelState {
469
+ version: number;
470
+ rows: ChatRow[];
471
+ status: AgentStatus | 'starting' | 'disposed';
472
+ sessionTitle: string;
473
+ agentId: string;
474
+ model: string;
475
+ provider: string;
476
+ tokens: TokenUsage;
477
+ cwd: string;
478
+ gitBranch: string | undefined;
479
+ working: boolean;
480
+ spinnerMode: SpinnerMode;
481
+ responseChars: number;
482
+ activeToolCount: number;
483
+ turnStart: number;
484
+ lastUserText: string;
485
+ notifications: NotificationItem[];
486
+ /** Adapter-advertised context capacity for the model route, when known. */
487
+ contextWindow: number | undefined;
488
+ /** Reasoning effort of the latest request header, when the adapter sets one. */
489
+ reasoningEffort: string | undefined;
490
+ /** Usage of the most recent request (context share + cache hits). */
491
+ lastUsage: {
492
+ input: number;
493
+ output: number;
494
+ cacheRead: number;
495
+ cacheWrite: number;
496
+ } | undefined;
497
+ /** Output tokens per second of the current/last turn's response, when known. */
498
+ tps: number | undefined;
499
+ /** Per-turn tps samples (sparkline history), oldest first. */
500
+ tpsSamples: {
501
+ tps: number;
502
+ at: number;
503
+ }[];
504
+ /** Latest working-activity snapshot (see the public Channel type). */
505
+ workingActivity: ActivityStatus | undefined;
506
+ /** Working-activity indicator preset (see the public Channel type). */
507
+ activityFrames: string | undefined;
508
+ /** Working-activity consumption switch (see the public Channel type). */
509
+ activityEnabled: boolean;
510
+ /** Context bar row switch (see the public Channel type). */
511
+ contextBarEnabled: boolean;
512
+ /** Current same-session goal projection (see the public Channel type). */
513
+ goal: ChannelGoal | undefined;
514
+ /** Latest todo-list snapshot (see the public Channel type). */
515
+ todos: TodoPanelItem[];
516
+ /** Loaded-context snapshot (see the public Channel type). */
517
+ loadedContext: LoadedContext | undefined;
518
+ /** Messages submitted while working, awaiting their turn/step boundary.
519
+ * Driven by agent inbox events (inserted/claimed/discarded). */
520
+ pending: PendingMessage[];
521
+ /** Effective slash commands (see the public Channel type). */
522
+ commandList: readonly LocalCommand[];
523
+ /** Run a plugin-registered command (see the public Channel type). */
524
+ runExternalCommand(name: string, rawInput: string): Promise<string | undefined>;
525
+ /** Estimated context segments by content type (pi-nano-context style bar). */
526
+ contextSegments: {
527
+ system: number;
528
+ prompt: number;
529
+ assistant: number;
530
+ thinking: number;
531
+ tools: number;
532
+ };
533
+ subscribe: (listener: () => void) => () => void;
534
+ /** @internal event bump (the public `notify(text)` posts a notification). */
535
+ emit(): void;
536
+ /** @internal frame-aligned emit for high-frequency streaming deltas:
537
+ * version bumps synchronously but listeners fire at most once per 16ms
538
+ * window (trailing edge). */
539
+ emitStream(): void;
540
+ submit(text: string): void;
541
+ steer(text: string): void;
542
+ removePending(id: string): boolean;
543
+ cancel(): void;
544
+ /** @internal interrupt-and-deliver (see the public Channel type). */
545
+ interruptAndDeliver(texts: readonly string[]): number;
546
+ rewindTo(row: ChatRow): Promise<string | null>;
547
+ /** Switch the live agent to a persisted session, replaying its history. */
548
+ resumeTo(sessionId: string): Promise<boolean>;
549
+ /** Start a fresh conversation (`/new`). */
550
+ newSession(): Promise<boolean>;
551
+ /** Switch the live model (`/model` picker). */
552
+ switchModel(provider: string, model: string): Promise<boolean>;
553
+ /** Cycle reasoning effort (see the public Channel type). */
554
+ cycleEffort(): Promise<void>;
555
+ /** The preset the current session runs under (see the public Channel type). */
556
+ agentPreset: string | undefined;
557
+ /** The roster's presets for the `/preset` picker (see the public Channel type). */
558
+ listPresets(): Promise<readonly PresetOption[]>;
559
+ /** Switch the agent preset (see the public Channel type). */
560
+ switchPreset(presetId: string): Promise<boolean>;
561
+ clear(): void;
562
+ /** @internal older-row restoration (see the public Channel.loadOlder). */
563
+ loadOlder(): number;
564
+ notify(text: string, options?: {
565
+ color?: NotificationItem['color'];
566
+ timeoutMs?: number;
567
+ }): void;
568
+ /** Switch the working-activity indicator preset (see the public Channel). */
569
+ setActivityFrames(name: string): boolean;
570
+ listModels(): Promise<readonly LlmModelInfo[]>;
571
+ listFiles(): Promise<readonly string[]>;
572
+ listSessions(): Promise<readonly SessionRecord[]>;
573
+ setResumeTarget(sessionId: string): void;
574
+ /** Manually compact the session history (CC's /compact). */
575
+ compact(): void;
576
+ /** Multi-line local report (`/status`, `/doctor`, …). */
577
+ pushLocal(title: string, lines: readonly string[]): void;
578
+ /** MCP server/tool status for /mcp: one line per server, or setup guidance. */
579
+ mcpStatus(): string[];
580
+ /** Export the transcript to a markdown file (CC's /export). */
581
+ exportSession(): string | null;
582
+ /** Create `AGENTS.md` in the session cwd (CC's /init). */
583
+ initWorkspace(): string | null;
584
+ /** Environment diagnostics (CC's /doctor). */
585
+ doctorInfo(): string[];
586
+ /** Subagent rows (CC's /agents). */
587
+ listSubagents(): Promise<string[]>;
588
+ }
589
+ /**
590
+ * Create the live channel state for one agent session: replay the durable
591
+ * transcript, subscribe to the agent's events, and expose every TUI action.
592
+ * @internal
593
+ * @param ctx - The plugin context; optional services are resolved via ctx.get.
594
+ * @param initialAgent - The agent whose session the channel renders; rewinds,
595
+ * resumes, and model switches replace it.
596
+ * @param options - Boot options: model route, cwd, provider, and the
597
+ * reasoning-effort / working-activity / agent-handle preferences.
598
+ * @returns The live channel state, subscribed and ready to render.
599
+ */
600
+ export declare function createChannel(ctx: Context, initialAgent: Agent, options: {
601
+ model: string;
602
+ cwd: string;
603
+ provider: string;
604
+ /** Configured reasoning effort: applied to the agent's requests when the
605
+ * live route offers it (silently ignored otherwise), and shown from
606
+ * startup until the first request/header event reports the adapter's
607
+ * live value. */
608
+ effort?: string;
609
+ /** Consume `activity/status` session events (dsh-working-activity) into
610
+ * the status line; default on. */
611
+ activity?: boolean;
612
+ /** Indicator preset for the working-activity line (`claude`/`moon`/
613
+ * `comet`/`dots`/… or `random`); default `claude`. */
614
+ activityFrames?: string;
615
+ /** Show the segmented context bar row in the status footer; default on
616
+ * (cordis.yml `contextBar: false` hides it, issue #29). */
617
+ contextBar?: boolean;
618
+ /** cordis.yml's static preset choice (`preset` key): wins over the
619
+ * persisted `/preset` preference for NEW sessions this channel starts. */
620
+ configuredPreset?: string;
621
+ /** cordis.yml's static route (`provider`/`model` keys), undefined when
622
+ * unset: wins over the persisted `/model` preference for NEW sessions
623
+ * only when BOTH halves are pinned (atomic rule, issue #67), and is the
624
+ * only route a resume overrides the target's own record with. */
625
+ configuredProvider?: string;
626
+ configuredModel?: string;
627
+ /** The preset the initial agent's session runs under (from resolveAgent). */
628
+ agentPreset?: string;
629
+ /** Handle of the initial agent; disposed when a rewind replaces it. */
630
+ handle?: AgentHandle;
631
+ }): ChannelState;
632
+ /** The fs-service surface `@`-mention expansion consumes (dsh-fs-local). */
633
+ export interface MentionFs {
634
+ resolve(path: string): Promise<{
635
+ displayPath: string;
636
+ }>;
637
+ stat(target: {
638
+ displayPath: string;
639
+ }): Promise<{
640
+ type: 'file' | 'directory' | 'other';
641
+ } | undefined>;
642
+ readText(target: {
643
+ displayPath: string;
644
+ }): Promise<string>;
645
+ listDir(target: {
646
+ displayPath: string;
647
+ }): Promise<Array<{
648
+ name: string;
649
+ type: 'file' | 'directory' | 'other';
650
+ }>>;
651
+ }
652
+ export interface MentionExpansion {
653
+ /** Model-facing blocks: the typed text first, one block per attachment. */
654
+ blocks: Array<{
655
+ type: 'text';
656
+ text: string;
657
+ }>;
658
+ /** Paths that resolved and were attached (for the confirmation notice). */
659
+ attached: string[];
660
+ /** Mention tokens that failed to resolve (kept literal, warned about). */
661
+ missing: string[];
662
+ }
663
+ /**
664
+ * Expand a submitted text's `@` mentions (issue #15) into model-facing
665
+ * attachment blocks: each referenced file contributes its (capped) content,
666
+ * each directory a shallow listing. The typed text stays the first block
667
+ * verbatim — mentions that resolve keep their `@path` spelling in it, and
668
+ * unresolved ones stay literal everywhere. Best-effort: an unreadable or
669
+ * binary file degrades to `missing`, never a failed send.
670
+ */
671
+ export declare function expandMentions(fs: MentionFs | undefined, cwd: string, text: string): Promise<MentionExpansion>;
672
+ //# sourceMappingURL=channel.d.ts.map