@agi-fans/dsh-tui 0.21.0 → 0.23.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 (389) hide show
  1. package/LICENSE +26 -0
  2. package/lib/CHANGELOG.md +356 -1
  3. package/lib/chrome/box.d.ts +32 -18
  4. package/lib/chrome/box.js +131 -132
  5. package/lib/chrome/box.js.map +1 -1
  6. package/lib/chrome/code-highlight.d.ts +15 -0
  7. package/lib/chrome/code-highlight.js +61 -5
  8. package/lib/chrome/code-highlight.js.map +1 -1
  9. package/lib/chrome/command-output.d.ts +28 -2
  10. package/lib/chrome/command-output.js +106 -4
  11. package/lib/chrome/command-output.js.map +1 -1
  12. package/lib/chrome/goal-bar.js +1 -1
  13. package/lib/chrome/goal-bar.js.map +1 -1
  14. package/lib/chrome/main-screen-renderer.d.ts +16 -0
  15. package/lib/chrome/main-screen-renderer.js +57 -8
  16. package/lib/chrome/main-screen-renderer.js.map +1 -1
  17. package/lib/chrome/markdown.d.ts +3 -3
  18. package/lib/chrome/markdown.js +101 -32
  19. package/lib/chrome/markdown.js.map +1 -1
  20. package/lib/chrome/md-style.d.ts +5 -2
  21. package/lib/chrome/md-style.js +13 -4
  22. package/lib/chrome/md-style.js.map +1 -1
  23. package/lib/chrome/relative-time.d.ts +17 -0
  24. package/lib/chrome/relative-time.js +36 -0
  25. package/lib/chrome/relative-time.js.map +1 -1
  26. package/lib/chrome/renderer.d.ts +37 -1
  27. package/lib/chrome/renderer.js.map +1 -1
  28. package/lib/chrome/secret-mask.d.ts +35 -0
  29. package/lib/chrome/secret-mask.js +180 -0
  30. package/lib/chrome/secret-mask.js.map +1 -0
  31. package/lib/chrome/status-config.d.ts +161 -51
  32. package/lib/chrome/status-config.js +237 -126
  33. package/lib/chrome/status-config.js.map +1 -1
  34. package/lib/chrome/status-line.d.ts +6 -5
  35. package/lib/chrome/status-line.js +110 -68
  36. package/lib/chrome/status-line.js.map +1 -1
  37. package/lib/chrome/terminal-colors.d.ts +85 -0
  38. package/lib/chrome/terminal-colors.js +230 -0
  39. package/lib/chrome/terminal-colors.js.map +1 -0
  40. package/lib/chrome/terminal-images.d.ts +9 -1
  41. package/lib/chrome/terminal-images.js +27 -4
  42. package/lib/chrome/terminal-images.js.map +1 -1
  43. package/lib/chrome/theme.d.ts +38 -10
  44. package/lib/chrome/theme.js +537 -542
  45. package/lib/chrome/theme.js.map +1 -1
  46. package/lib/chrome/tool-renderers.js +69 -13
  47. package/lib/chrome/tool-renderers.js.map +1 -1
  48. package/lib/chrome/tools-list.d.ts +1 -4
  49. package/lib/chrome/tools-list.js +1 -41
  50. package/lib/chrome/tools-list.js.map +1 -1
  51. package/lib/commands/auth-account.d.ts +9 -0
  52. package/lib/commands/auth-account.js +202 -0
  53. package/lib/commands/auth-account.js.map +1 -0
  54. package/lib/commands/auth-ids.d.ts +25 -0
  55. package/lib/commands/auth-ids.js +27 -0
  56. package/lib/commands/auth-ids.js.map +1 -0
  57. package/lib/commands/auth-input.d.ts +34 -0
  58. package/lib/commands/auth-input.js +96 -0
  59. package/lib/commands/auth-input.js.map +1 -0
  60. package/lib/commands/auth-providers.d.ts +39 -0
  61. package/lib/commands/auth-providers.js +125 -0
  62. package/lib/commands/auth-providers.js.map +1 -0
  63. package/lib/commands/auth.d.ts +12 -20
  64. package/lib/commands/auth.js +264 -627
  65. package/lib/commands/auth.js.map +1 -1
  66. package/lib/commands/btw.d.ts +13 -1
  67. package/lib/commands/btw.js +37 -104
  68. package/lib/commands/btw.js.map +1 -1
  69. package/lib/commands/diff.js +23 -112
  70. package/lib/commands/diff.js.map +1 -1
  71. package/lib/commands/export.d.ts +0 -1
  72. package/lib/commands/export.js +98 -57
  73. package/lib/commands/export.js.map +1 -1
  74. package/lib/commands/files.d.ts +17 -1
  75. package/lib/commands/files.js +68 -114
  76. package/lib/commands/files.js.map +1 -1
  77. package/lib/commands/integrations.d.ts +12 -1
  78. package/lib/commands/integrations.js +120 -23
  79. package/lib/commands/integrations.js.map +1 -1
  80. package/lib/commands/jobs-browser.d.ts +3 -0
  81. package/lib/commands/jobs-browser.js +152 -0
  82. package/lib/commands/jobs-browser.js.map +1 -0
  83. package/lib/commands/jobs.d.ts +12 -8
  84. package/lib/commands/jobs.js +65 -14
  85. package/lib/commands/jobs.js.map +1 -1
  86. package/lib/commands/model.d.ts +3 -0
  87. package/lib/commands/model.js +223 -114
  88. package/lib/commands/model.js.map +1 -1
  89. package/lib/commands/open-external.d.ts +2 -0
  90. package/lib/commands/open-external.js +19 -0
  91. package/lib/commands/open-external.js.map +1 -0
  92. package/lib/commands/permission.js +70 -60
  93. package/lib/commands/permission.js.map +1 -1
  94. package/lib/commands/plugins.js +427 -68
  95. package/lib/commands/plugins.js.map +1 -1
  96. package/lib/commands/schedule-catalog.d.ts +12 -0
  97. package/lib/commands/schedule-catalog.js +41 -0
  98. package/lib/commands/schedule-catalog.js.map +1 -0
  99. package/lib/commands/schedule-history.d.ts +4 -0
  100. package/lib/commands/schedule-history.js +62 -0
  101. package/lib/commands/schedule-history.js.map +1 -0
  102. package/lib/commands/schedule.d.ts +16 -9
  103. package/lib/commands/schedule.js +226 -162
  104. package/lib/commands/schedule.js.map +1 -1
  105. package/lib/commands/session-configuration.d.ts +3 -0
  106. package/lib/commands/session-configuration.js +58 -32
  107. package/lib/commands/session-configuration.js.map +1 -1
  108. package/lib/commands/session.js +118 -97
  109. package/lib/commands/session.js.map +1 -1
  110. package/lib/commands/terminal.d.ts +14 -8
  111. package/lib/commands/terminal.js +32 -185
  112. package/lib/commands/terminal.js.map +1 -1
  113. package/lib/commands/trajectory.js +4 -1
  114. package/lib/commands/trajectory.js.map +1 -1
  115. package/lib/definition.d.ts +226 -29
  116. package/lib/definition.js.map +1 -1
  117. package/lib/index.d.ts +2 -0
  118. package/lib/index.js +2 -0
  119. package/lib/index.js.map +1 -1
  120. package/lib/input/actions.d.ts +51 -0
  121. package/lib/input/actions.js +123 -0
  122. package/lib/input/actions.js.map +1 -0
  123. package/lib/input/composer-files.d.ts +2 -0
  124. package/lib/input/composer-files.js +13 -3
  125. package/lib/input/composer-files.js.map +1 -1
  126. package/lib/input/editor.d.ts +0 -10
  127. package/lib/input/editor.js +11 -9
  128. package/lib/input/editor.js.map +1 -1
  129. package/lib/input/image-paste.d.ts +12 -1
  130. package/lib/input/image-paste.js +86 -1
  131. package/lib/input/image-paste.js.map +1 -1
  132. package/lib/input/key-test.d.ts +5 -0
  133. package/lib/input/key-test.js +19 -0
  134. package/lib/input/key-test.js.map +1 -0
  135. package/lib/input/keybindings-config.d.ts +12 -5
  136. package/lib/input/keybindings-config.js +30 -57
  137. package/lib/input/keybindings-config.js.map +1 -1
  138. package/lib/input/keys.d.ts +18 -0
  139. package/lib/input/keys.js +42 -4
  140. package/lib/input/keys.js.map +1 -1
  141. package/lib/input/wheel-scroll.d.ts +46 -0
  142. package/lib/input/wheel-scroll.js +69 -0
  143. package/lib/input/wheel-scroll.js.map +1 -0
  144. package/lib/locale/index.d.ts +6 -0
  145. package/lib/locale/index.js +32 -0
  146. package/lib/locale/index.js.map +1 -0
  147. package/lib/locale/prompt.d.ts +4 -0
  148. package/lib/locale/prompt.js +24 -0
  149. package/lib/locale/prompt.js.map +1 -0
  150. package/lib/locale/zh.d.ts +1114 -0
  151. package/lib/locale/zh.js +1115 -0
  152. package/lib/locale/zh.js.map +1 -0
  153. package/lib/prompt-intents.d.ts +186 -0
  154. package/lib/prompt-intents.js +131 -0
  155. package/lib/prompt-intents.js.map +1 -0
  156. package/lib/runtime/account-settings.d.ts +18 -0
  157. package/lib/runtime/account-settings.js +241 -0
  158. package/lib/runtime/account-settings.js.map +1 -0
  159. package/lib/runtime/agent-profile.d.ts +3 -3
  160. package/lib/runtime/agent-profile.js +4 -4
  161. package/lib/runtime/agent-profile.js.map +1 -1
  162. package/lib/runtime/btw-policy.js +2 -1
  163. package/lib/runtime/btw-policy.js.map +1 -1
  164. package/lib/runtime/btw.js +1 -2
  165. package/lib/runtime/btw.js.map +1 -1
  166. package/lib/runtime/cancellable.d.ts +75 -0
  167. package/lib/runtime/cancellable.js +76 -0
  168. package/lib/runtime/cancellable.js.map +1 -0
  169. package/lib/runtime/composer-images.d.ts +2 -2
  170. package/lib/runtime/composer-images.js +7 -6
  171. package/lib/runtime/composer-images.js.map +1 -1
  172. package/lib/runtime/composer-shell.d.ts +17 -2
  173. package/lib/runtime/composer-shell.js +133 -41
  174. package/lib/runtime/composer-shell.js.map +1 -1
  175. package/lib/runtime/file-browser.d.ts +19 -0
  176. package/lib/runtime/file-browser.js +291 -0
  177. package/lib/runtime/file-browser.js.map +1 -0
  178. package/lib/runtime/file-recovery-review.d.ts +0 -1
  179. package/lib/runtime/file-recovery-review.js +29 -30
  180. package/lib/runtime/file-recovery-review.js.map +1 -1
  181. package/lib/runtime/file-recovery-store.js +5 -1
  182. package/lib/runtime/file-recovery-store.js.map +1 -1
  183. package/lib/runtime/file-review.d.ts +6 -9
  184. package/lib/runtime/file-review.js +92 -8
  185. package/lib/runtime/file-review.js.map +1 -1
  186. package/lib/runtime/help-reader.d.ts +12 -0
  187. package/lib/runtime/help-reader.js +50 -0
  188. package/lib/runtime/help-reader.js.map +1 -0
  189. package/lib/runtime/hook-settings.d.ts +2 -2
  190. package/lib/runtime/human-interaction.js +1 -1
  191. package/lib/runtime/human-interaction.js.map +1 -1
  192. package/lib/runtime/model-catalog-editor.d.ts +12 -0
  193. package/lib/runtime/model-catalog-editor.js +215 -0
  194. package/lib/runtime/model-catalog-editor.js.map +1 -0
  195. package/lib/runtime/model-settings.d.ts +11 -0
  196. package/lib/runtime/model-settings.js +404 -0
  197. package/lib/runtime/model-settings.js.map +1 -0
  198. package/lib/runtime/plain-tui.d.ts +2 -0
  199. package/lib/runtime/plain-tui.js +7 -1
  200. package/lib/runtime/plain-tui.js.map +1 -1
  201. package/lib/runtime/plugin-settings.d.ts +4 -1
  202. package/lib/runtime/plugin-settings.js +170 -92
  203. package/lib/runtime/plugin-settings.js.map +1 -1
  204. package/lib/runtime/prompt-browser.d.ts +9 -0
  205. package/lib/runtime/prompt-browser.js +19 -0
  206. package/lib/runtime/prompt-browser.js.map +1 -0
  207. package/lib/runtime/provider-local.d.ts +80 -38
  208. package/lib/runtime/provider-local.js +2280 -683
  209. package/lib/runtime/provider-local.js.map +1 -1
  210. package/lib/runtime/reference-reader.d.ts +15 -0
  211. package/lib/runtime/reference-reader.js +78 -0
  212. package/lib/runtime/reference-reader.js.map +1 -0
  213. package/lib/runtime/runner.js +42 -39
  214. package/lib/runtime/runner.js.map +1 -1
  215. package/lib/runtime/session-runtime.js +1 -1
  216. package/lib/runtime/session-runtime.js.map +1 -1
  217. package/lib/runtime/settings-draft.d.ts +21 -0
  218. package/lib/runtime/settings-draft.js +166 -0
  219. package/lib/runtime/settings-draft.js.map +1 -0
  220. package/lib/runtime/settings-preferences.js +1 -1
  221. package/lib/runtime/settings-preferences.js.map +1 -1
  222. package/lib/runtime/startup-notices.d.ts +0 -1
  223. package/lib/runtime/startup-notices.js +35 -4
  224. package/lib/runtime/startup-notices.js.map +1 -1
  225. package/lib/runtime/subagent-model-selection.js +2 -1
  226. package/lib/runtime/subagent-model-selection.js.map +1 -1
  227. package/lib/runtime/subagent-settings.d.ts +14 -0
  228. package/lib/runtime/subagent-settings.js +288 -0
  229. package/lib/runtime/subagent-settings.js.map +1 -0
  230. package/lib/runtime/terminal-modes.d.ts +47 -0
  231. package/lib/runtime/terminal-modes.js +86 -0
  232. package/lib/runtime/terminal-modes.js.map +1 -0
  233. package/lib/runtime/terminal-notifications.d.ts +6 -5
  234. package/lib/runtime/terminal-notifications.js +17 -16
  235. package/lib/runtime/terminal-notifications.js.map +1 -1
  236. package/lib/runtime/terminal-probe.d.ts +38 -0
  237. package/lib/runtime/terminal-probe.js +46 -0
  238. package/lib/runtime/terminal-probe.js.map +1 -0
  239. package/lib/runtime/terminal-session.d.ts +57 -0
  240. package/lib/runtime/terminal-session.js +164 -0
  241. package/lib/runtime/terminal-session.js.map +1 -0
  242. package/lib/runtime/tool-presentation.js.map +1 -1
  243. package/lib/runtime/tool-reader.d.ts +5 -0
  244. package/lib/runtime/tool-reader.js +27 -0
  245. package/lib/runtime/tool-reader.js.map +1 -0
  246. package/lib/runtime/web-settings.d.ts +14 -0
  247. package/lib/runtime/web-settings.js +339 -0
  248. package/lib/runtime/web-settings.js.map +1 -0
  249. package/lib/session/command-attachments.d.ts +17 -0
  250. package/lib/session/command-attachments.js +50 -0
  251. package/lib/session/command-attachments.js.map +1 -0
  252. package/lib/session/context-diagnostics.d.ts +16 -0
  253. package/lib/session/context-diagnostics.js +15 -0
  254. package/lib/session/context-diagnostics.js.map +1 -1
  255. package/lib/session/external-agents.d.ts +3 -1
  256. package/lib/session/external-agents.js +35 -10
  257. package/lib/session/external-agents.js.map +1 -1
  258. package/lib/session/generation-continuation.d.ts +11 -0
  259. package/lib/session/generation-continuation.js +34 -0
  260. package/lib/session/generation-continuation.js.map +1 -0
  261. package/lib/session/goal-controls.d.ts +5 -0
  262. package/lib/session/goal-controls.js +81 -0
  263. package/lib/session/goal-controls.js.map +1 -0
  264. package/lib/session/interaction-adapter.d.ts +7 -3
  265. package/lib/session/interaction-adapter.js +125 -54
  266. package/lib/session/interaction-adapter.js.map +1 -1
  267. package/lib/session/message-queue.d.ts +2 -0
  268. package/lib/session/message-queue.js +102 -17
  269. package/lib/session/message-queue.js.map +1 -1
  270. package/lib/session/package-metadata.d.ts +8 -0
  271. package/lib/session/package-metadata.js +8 -0
  272. package/lib/session/package-metadata.js.map +1 -1
  273. package/lib/session/pending-inputs.d.ts +30 -0
  274. package/lib/session/pending-inputs.js +183 -0
  275. package/lib/session/pending-inputs.js.map +1 -0
  276. package/lib/session/session-configuration.js +1 -1
  277. package/lib/session/session-configuration.js.map +1 -1
  278. package/lib/session/session-controller.d.ts +42 -24
  279. package/lib/session/session-controller.js +534 -106
  280. package/lib/session/session-controller.js.map +1 -1
  281. package/lib/session/session-tree.d.ts +2 -0
  282. package/lib/session/session-tree.js +2 -0
  283. package/lib/session/session-tree.js.map +1 -1
  284. package/lib/session/subagent-roster.d.ts +1 -0
  285. package/lib/session/subagent-roster.js +16 -5
  286. package/lib/session/subagent-roster.js.map +1 -1
  287. package/lib/session/subagent-tracker.d.ts +2 -0
  288. package/lib/session/subagent-tracker.js +18 -0
  289. package/lib/session/subagent-tracker.js.map +1 -1
  290. package/lib/session/tui-settings.d.ts +48 -15
  291. package/lib/session/tui-settings.js +75 -34
  292. package/lib/session/tui-settings.js.map +1 -1
  293. package/lib/session/workflow-projection.d.ts +2 -1
  294. package/lib/session/workflow-projection.js +34 -4
  295. package/lib/session/workflow-projection.js.map +1 -1
  296. package/lib/views/autocomplete.d.ts +28 -9
  297. package/lib/views/autocomplete.js +90 -70
  298. package/lib/views/autocomplete.js.map +1 -1
  299. package/lib/views/context-overview.d.ts +4 -0
  300. package/lib/views/context-overview.js +43 -0
  301. package/lib/views/context-overview.js.map +1 -0
  302. package/lib/views/copy-targets.d.ts +18 -15
  303. package/lib/views/copy-targets.js +35 -60
  304. package/lib/views/copy-targets.js.map +1 -1
  305. package/lib/views/document-reader.d.ts +10 -1
  306. package/lib/views/document-reader.js +76 -9
  307. package/lib/views/document-reader.js.map +1 -1
  308. package/lib/views/event-views.js +71 -17
  309. package/lib/views/event-views.js.map +1 -1
  310. package/lib/views/file-actions.js +21 -0
  311. package/lib/views/file-actions.js.map +1 -1
  312. package/lib/views/file-browser.d.ts +98 -0
  313. package/lib/views/file-browser.js +120 -0
  314. package/lib/views/file-browser.js.map +1 -0
  315. package/lib/views/history-search.js +19 -25
  316. package/lib/views/history-search.js.map +1 -1
  317. package/lib/views/hotkey-format.d.ts +3 -2
  318. package/lib/views/hotkey-format.js +4 -3
  319. package/lib/views/hotkey-format.js.map +1 -1
  320. package/lib/views/hotkeys.d.ts +7 -1
  321. package/lib/views/hotkeys.js +59 -37
  322. package/lib/views/hotkeys.js.map +1 -1
  323. package/lib/views/list-navigation.d.ts +62 -0
  324. package/lib/views/list-navigation.js +73 -0
  325. package/lib/views/list-navigation.js.map +1 -0
  326. package/lib/views/list-view.d.ts +99 -0
  327. package/lib/views/list-view.js +170 -0
  328. package/lib/views/list-view.js.map +1 -0
  329. package/lib/views/prompt-selector.d.ts +54 -4
  330. package/lib/views/prompt-selector.js +349 -162
  331. package/lib/views/prompt-selector.js.map +1 -1
  332. package/lib/views/session-files.d.ts +1 -2
  333. package/lib/views/session-files.js +1 -11
  334. package/lib/views/session-files.js.map +1 -1
  335. package/lib/views/settings-list.d.ts +16 -9
  336. package/lib/views/settings-list.js +171 -315
  337. package/lib/views/settings-list.js.map +1 -1
  338. package/lib/views/tool-actions.d.ts +16 -0
  339. package/lib/views/tool-actions.js +29 -0
  340. package/lib/views/tool-actions.js.map +1 -0
  341. package/lib/views/trajectory-timeline.d.ts +71 -0
  342. package/lib/views/trajectory-timeline.js +143 -0
  343. package/lib/views/trajectory-timeline.js.map +1 -0
  344. package/lib/views/trajectory.d.ts +36 -4
  345. package/lib/views/trajectory.js +842 -190
  346. package/lib/views/trajectory.js.map +1 -1
  347. package/lib/views/transcript-render.d.ts +132 -38
  348. package/lib/views/transcript-render.js +792 -260
  349. package/lib/views/transcript-render.js.map +1 -1
  350. package/lib/views/transcript-search.d.ts +39 -6
  351. package/lib/views/transcript-search.js +46 -11
  352. package/lib/views/transcript-search.js.map +1 -1
  353. package/lib/views/transcript-types.d.ts +64 -5
  354. package/lib/views/transcript-types.js +23 -11
  355. package/lib/views/transcript-types.js.map +1 -1
  356. package/lib/views/workflow.d.ts +16 -0
  357. package/lib/views/workflow.js +42 -0
  358. package/lib/views/workflow.js.map +1 -0
  359. package/package.json +74 -90
  360. package/lib/chrome/welcome-tips.d.ts +0 -11
  361. package/lib/chrome/welcome-tips.js +0 -44
  362. package/lib/chrome/welcome-tips.js.map +0 -1
  363. package/lib/commands/advisor.d.ts +0 -15
  364. package/lib/commands/advisor.js +0 -200
  365. package/lib/commands/advisor.js.map +0 -1
  366. package/lib/commands/loop.d.ts +0 -52
  367. package/lib/commands/loop.js +0 -307
  368. package/lib/commands/loop.js.map +0 -1
  369. package/lib/commands/rate.d.ts +0 -33
  370. package/lib/commands/rate.js +0 -212
  371. package/lib/commands/rate.js.map +0 -1
  372. package/lib/commands/steer.d.ts +0 -5
  373. package/lib/commands/steer.js +0 -24
  374. package/lib/commands/steer.js.map +0 -1
  375. package/lib/commands/worktree.d.ts +0 -5
  376. package/lib/commands/worktree.js +0 -103
  377. package/lib/commands/worktree.js.map +0 -1
  378. package/lib/runtime/terminal-reader.d.ts +0 -11
  379. package/lib/runtime/terminal-reader.js +0 -87
  380. package/lib/runtime/terminal-reader.js.map +0 -1
  381. package/lib/session/steering.d.ts +0 -3
  382. package/lib/session/steering.js +0 -9
  383. package/lib/session/steering.js.map +0 -1
  384. package/lib/views/agent-hub.d.ts +0 -32
  385. package/lib/views/agent-hub.js +0 -209
  386. package/lib/views/agent-hub.js.map +0 -1
  387. package/lib/views/copy-selector.d.ts +0 -54
  388. package/lib/views/copy-selector.js +0 -170
  389. package/lib/views/copy-selector.js.map +0 -1
@@ -9,9 +9,9 @@
9
9
  import type { Context } from '@deepseek-ai/cordis';
10
10
  import { type Agent, type ModelSelection } from '@deepseek-ai/dsh-agent';
11
11
  import type { AgentPreset } from '@deepseek-ai/dsh-agent-preset-registry';
12
- import { type LlmResolvedModelInfo, type UserMessage } from '@deepseek-ai/dsh-llm';
12
+ import { type ContentBlock, type LlmResolvedModelInfo, type UserMessage } from '@deepseek-ai/dsh-llm';
13
13
  import type { ImageAttachmentRef, SaveImageAttachment, StoredImageAttachment } from '@deepseek-ai/dsh-attachment';
14
- import type { CommandSubmitAttachment } from '@deepseek-ai/dsh-commands';
14
+ export { encodeCommandAttachments } from './command-attachments.ts';
15
15
  import type { PermissionSelection } from '@deepseek-ai/dsh-permission-presets/types';
16
16
  import type { PlanProjection } from '@deepseek-ai/dsh-plan-mode/types';
17
17
  import { type SkillSummary } from '@deepseek-ai/dsh-skill';
@@ -21,7 +21,7 @@ import { type SessionEvent } from '@deepseek-ai/dsh-session';
21
21
  import type { GoalProjection } from '@deepseek-ai/dsh-goal/types';
22
22
  import type { UserQuestionProjectionView } from '@deepseek-ai/dsh-user-questions';
23
23
  export { conversationTurns, type ConversationTurn } from './conversation-turns.ts';
24
- import type { TuiCommand, TuiRecentSession, TuiService, TuiSessionControls, TuiSessionStats, TuiSubmission, TuiInputImage } from '../definition.ts';
24
+ import type { TuiCommand, TuiRecentSession, TuiService, TuiSessionControls, TuiSessionStats, TuiSubmission, TuiQueueEditRequest, TuiInputImage } from '../definition.ts';
25
25
  import type { ContextDiagnostics } from './context-diagnostics.ts';
26
26
  /** Projection values consumed as one consistent snapshot when the units exist. */
27
27
  export interface TuiStatsProjection {
@@ -37,7 +37,10 @@ export interface TuiStatsProjection {
37
37
  sandboxMode?: 'read-only' | 'workspace-write' | 'danger-full-access' | null;
38
38
  }
39
39
  /** Present only the session controls whose owning Harness plugins are composed. */
40
- export declare function sessionControls(projection?: TuiStatsProjection): TuiSessionControls;
40
+ export declare function sessionControls(projection?: TuiStatsProjection, livePlan?: {
41
+ active: boolean;
42
+ pending?: boolean;
43
+ }): TuiSessionControls;
41
44
  /** Composer projection of a Harness model selection and its adapter default. */
42
45
  export declare function modelStatus(selection: ModelSelection, info?: Pick<LlmResolvedModelInfo, 'reasoning'>): {
43
46
  model: string;
@@ -62,7 +65,7 @@ export declare function recentSessionContent(events: readonly SessionEvent[]): {
62
65
  preview?: string;
63
66
  } | undefined;
64
67
  /** Convert the human-visible part of a skill catalog into slash commands. */
65
- export declare function userSkillCommands(skills: readonly SkillSummary[]): TuiCommand[];
68
+ export declare function userSkillCommands(skills: readonly SkillSummary[], reserved?: ReadonlySet<string>): TuiCommand[];
66
69
  interface SubmissionAttachmentStore {
67
70
  saveImages(inputs: readonly SaveImageAttachment[]): Promise<readonly ImageAttachmentRef[]>;
68
71
  }
@@ -71,58 +74,65 @@ interface RestoreAttachmentStore {
71
74
  }
72
75
  /** Admit one ordered image batch, then build one atomic mixed user message. */
73
76
  export declare function createSubmissionMessage(submission: TuiSubmission, attachments?: SubmissionAttachmentStore): Promise<{
74
- content: ({
75
- type: "image";
76
- attachment: ImageAttachmentRef;
77
- } | {
78
- type: "file";
79
- attachment: import("@deepseek-ai/dsh-attachment").FileAttachmentRef;
80
- } | {
81
- type: "text";
82
- text: string;
83
- })[];
77
+ content: ContentBlock[];
84
78
  source: {
85
79
  kind: "user";
86
80
  };
87
81
  } & Pick<UserMessage, "id" | "role">>;
88
- /** Encode composer drafts for `ctx.commands.execute`. */
89
- export declare function encodeCommandAttachments(images: readonly TuiInputImage[]): CommandSubmitAttachment[];
90
82
  /** Rehydrate one durable human inbox message into an editable composer draft. */
91
83
  export declare function restoreSubmissionMessage(message: UserMessage, attachments?: RestoreAttachmentStore): Promise<TuiSubmission>;
84
+ /** The live selection succeeded, but the profile default still needs saving. */
85
+ export declare class DefaultModelSaveError extends Error {
86
+ constructor(selection: ModelSelection, cause: unknown);
87
+ }
92
88
  /** Own one switchable top-level Agent and project it onto a TuiService. */
93
89
  export declare class SessionRuntime {
94
90
  #private;
95
91
  constructor(ctx: Context, tui: TuiService, options?: {
96
92
  stateDir?: string;
97
93
  });
94
+ /** Presentation requests from a replaced root must not survive into its successor. */
95
+ get interactionSignal(): AbortSignal;
98
96
  get agent(): Agent | undefined;
99
97
  /**
100
98
  * Interrupt the visible continuable child when one is inspected.
101
99
  * @returns true when this consumed the gesture so the parent turn stays running.
102
100
  */
103
101
  interruptVisible(): boolean;
102
+ /** Accept only live descendants of the active root for shared approval prompts. */
103
+ beginSubagentApproval(agent: Agent): {
104
+ label: string;
105
+ signal: AbortSignal;
106
+ finish(): void;
107
+ } | undefined;
104
108
  start(): Promise<void>;
105
- /** Submit one human composer value; active turns retain it as a later follow-up. */
109
+ /** Admit a complete composer value through the selected Harness inbox entry. */
106
110
  send(input: string | TuiSubmission, agent?: Agent): Promise<void>;
107
- openQueue(signal: AbortSignal, agent?: Agent): Promise<void>;
108
- /** Remove and rehydrate the newest durable human follow-up for queue browsing. */
109
- editLatestFollowup(agent?: Agent): Promise<TuiSubmission | undefined>;
111
+ /** Wake an eligible failed generation with empty retry input; never duplicate the original prompt. */
112
+ continueGeneration(agent?: Agent, expectedFailure?: number, signal?: AbortSignal): Promise<void>;
113
+ /** Explicitly resend the complete latest human message with a fresh Harness identity. */
114
+ retryLastPrompt(agent?: Agent, signal?: AbortSignal): Promise<boolean>;
115
+ openQueue(signal: AbortSignal, requestingAgent?: Agent): Promise<void>;
116
+ /** Inspect durable membership; only a currently running, owned local member can be opened. */
117
+ openWorkflow(id: string): Promise<void>;
118
+ /** Rehydrate before withdrawing so navigation or missing attachments leave the inbox intact. */
119
+ editLatestFollowup(request?: TuiQueueEditRequest): Promise<TuiSubmission | undefined>;
110
120
  /** Execute a plugin-owned slash command, falling back to user-invocable skills. */
111
- execute(line: string, signal: AbortSignal, images?: readonly TuiInputImage[]): Promise<boolean>;
121
+ execute(input: string | TuiSubmission, signal: AbortSignal, images?: readonly TuiInputImage[]): Promise<boolean>;
112
122
  /** Fail when a command invocation targets a stale or background Agent. */
113
123
  assertActive(agent: Agent): void;
114
124
  /** Shared local metadata document for Session Library and Tree actions. */
115
125
  get sessionLibraryPath(): string;
116
126
  /** Immutable recent-session view used by the resume command. */
117
127
  get recentSessions(): readonly TuiRecentSession[];
118
- /** Current model selection for the active Agent. */
128
+ /** Current model selection for the active Agent, read from its durable projection. */
119
129
  selection(agent?: Agent): ModelSelection;
120
130
  /** Replace the active Agent's selection, optionally persisting it as the next default. */
121
131
  changeSelection(agent: Agent, selection: ModelSelection, info?: LlmResolvedModelInfo, options?: {
122
132
  persist?: boolean;
123
133
  }): Promise<void>;
124
134
  /** Start a new top-level session with the current model selection. */
125
- newSession(agent: Agent): Promise<void>;
135
+ newSession(agent: Agent, presetId?: string): Promise<void>;
126
136
  /** Replace the active top-level session with one durable session. */
127
137
  resumeSession(agent: Agent, id: string, signal: AbortSignal): Promise<void>;
128
138
  /** Rename a live or durable top-level session through the public log-backed title service. */
@@ -144,3 +154,11 @@ export declare class SessionRuntime {
144
154
  refreshRecent(): Promise<void>;
145
155
  dispose(): Promise<void>;
146
156
  }
157
+ /** Candidates for an argument prefix, matched the way the command list matches. */
158
+ export declare function matchArgumentOptions(options: readonly {
159
+ value: string;
160
+ description?: string;
161
+ }[], prefix: string): readonly {
162
+ value: string;
163
+ description?: string;
164
+ }[];