@deepseek-harness-tui/dsh-tui 0.9.2 → 0.10.0-beta.1

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 (423) hide show
  1. package/README.md +27 -9
  2. package/bin/dsh-tui.js +26 -4
  3. package/cordis.patch.yml +117 -39
  4. package/cordis.yml +13 -10
  5. package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -13
  6. package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -59
  7. package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -15
  8. package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -32
  9. package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -59
  10. package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -166
  11. package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -42
  12. package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -143
  13. package/dsh-ecosystem-spec/registry/README.md +14 -14
  14. package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -56
  15. package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -13
  16. package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -149
  17. package/lib/types/api.d.ts +7 -0
  18. package/lib/types/api.d.ts.map +1 -0
  19. package/lib/types/api.js +1 -0
  20. package/lib/types/cc/hyperlink.d.ts.map +1 -1
  21. package/lib/types/cc/hyperlink.js +42 -4
  22. package/lib/types/cc/markdown.d.ts.map +1 -1
  23. package/lib/types/cc/markdown.js +15 -5
  24. package/lib/types/commands.d.ts +6 -0
  25. package/lib/types/commands.d.ts.map +1 -1
  26. package/lib/types/commands.js +13 -10
  27. package/lib/types/components/BalanceReportRow.d.ts +24 -0
  28. package/lib/types/components/BalanceReportRow.d.ts.map +1 -0
  29. package/lib/types/components/BalanceReportRow.js +87 -0
  30. package/lib/types/components/HistorySearchDialog.js +1 -1
  31. package/lib/types/components/MessageList.d.ts +6 -4
  32. package/lib/types/components/MessageList.d.ts.map +1 -1
  33. package/lib/types/components/MessageList.js +36 -31
  34. package/lib/types/components/PermissionsPicker.d.ts +6 -7
  35. package/lib/types/components/PermissionsPicker.d.ts.map +1 -1
  36. package/lib/types/components/PermissionsPicker.js +20 -14
  37. package/lib/types/components/PluginSceneBoundary.d.ts +1 -1
  38. package/lib/types/components/PluginSceneBoundary.js +1 -1
  39. package/lib/types/components/PromptEditor.d.ts +46 -0
  40. package/lib/types/components/PromptEditor.d.ts.map +1 -0
  41. package/lib/types/components/PromptEditor.js +60 -0
  42. package/lib/types/components/PromptInput.d.ts +12 -0
  43. package/lib/types/components/PromptInput.d.ts.map +1 -1
  44. package/lib/types/components/PromptInput.js +1256 -205
  45. package/lib/types/components/RewindPicker.js +1 -1
  46. package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
  47. package/lib/types/components/StreamingMarkdown.js +140 -3
  48. package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
  49. package/lib/types/components/SubagentDashboard.js +2 -2
  50. package/lib/types/components/SubagentDetailScene.js +1 -1
  51. package/lib/types/components/ThemePicker.d.ts +13 -15
  52. package/lib/types/components/ThemePicker.d.ts.map +1 -1
  53. package/lib/types/components/ThemePicker.js +24 -26
  54. package/lib/types/components/Tooltip.d.ts +67 -0
  55. package/lib/types/components/Tooltip.d.ts.map +1 -0
  56. package/lib/types/components/Tooltip.js +220 -0
  57. package/lib/types/components/Whale.d.ts +15 -4
  58. package/lib/types/components/Whale.d.ts.map +1 -1
  59. package/lib/types/components/Whale.js +9 -8
  60. package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
  61. package/lib/types/components/approvals/ApprovalPanel.js +1 -1
  62. package/lib/types/components/design-system/Divider.d.ts +9 -1
  63. package/lib/types/components/design-system/Divider.d.ts.map +1 -1
  64. package/lib/types/components/design-system/Divider.js +42 -8
  65. package/lib/types/components/design-system/ThemeProvider.d.ts +5 -2
  66. package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
  67. package/lib/types/components/design-system/ThemeProvider.js +52 -16
  68. package/lib/types/components/design-system/ThemedBox.d.ts +23 -2
  69. package/lib/types/components/design-system/ThemedBox.d.ts.map +1 -1
  70. package/lib/types/components/messages/AssistantThinkingMessage.d.ts +5 -5
  71. package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
  72. package/lib/types/components/messages/AssistantThinkingMessage.js +4 -4
  73. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +7 -1
  74. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  75. package/lib/types/components/messages/AssistantToolUseMessage.js +48 -7
  76. package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
  77. package/lib/types/components/messages/UserPromptMessage.js +7 -1
  78. package/lib/types/components/questions/AskUserQuestionPanel.js +1 -1
  79. package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
  80. package/lib/types/components/questions/PlanReviewPanel.js +29 -3
  81. package/lib/types/components/sessions/SessionListRow.d.ts +8 -1
  82. package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
  83. package/lib/types/components/sessions/SessionListRow.js +9 -2
  84. package/lib/types/components/sessions/SessionPreview.d.ts.map +1 -1
  85. package/lib/types/components/sessions/SessionPreview.js +5 -3
  86. package/lib/types/components/sessions/WorkspaceListRow.d.ts +17 -0
  87. package/lib/types/components/sessions/WorkspaceListRow.d.ts.map +1 -0
  88. package/lib/types/components/sessions/WorkspaceListRow.js +27 -0
  89. package/lib/types/customTheme.d.ts +4 -0
  90. package/lib/types/customTheme.d.ts.map +1 -1
  91. package/lib/types/customTheme.js +9 -5
  92. package/lib/types/deepseekBalance.d.ts +53 -0
  93. package/lib/types/deepseekBalance.d.ts.map +1 -0
  94. package/lib/types/deepseekBalance.js +86 -0
  95. package/lib/types/deepseekPricing.d.ts +82 -0
  96. package/lib/types/deepseekPricing.d.ts.map +1 -0
  97. package/lib/types/deepseekPricing.js +133 -0
  98. package/lib/types/dsh-adapter/approvals.d.ts +114 -2
  99. package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
  100. package/lib/types/dsh-adapter/approvals.js +241 -3
  101. package/lib/types/dsh-adapter/channel.d.ts +88 -3
  102. package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
  103. package/lib/types/dsh-adapter/channel.js +567 -89
  104. package/lib/types/dsh-adapter/childStderr.d.ts.map +1 -1
  105. package/lib/types/dsh-adapter/childStderr.js +9 -0
  106. package/lib/types/dsh-adapter/contract.d.ts +17 -13
  107. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  108. package/lib/types/dsh-adapter/contract.js +36 -27
  109. package/lib/types/dsh-adapter/credentialRefGuard.d.ts +40 -0
  110. package/lib/types/dsh-adapter/credentialRefGuard.d.ts.map +1 -0
  111. package/lib/types/dsh-adapter/credentialRefGuard.js +43 -0
  112. package/lib/types/dsh-adapter/effect-ledger.d.ts +1 -1
  113. package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -1
  114. package/lib/types/dsh-adapter/effect-ledger.js +1 -0
  115. package/lib/types/dsh-adapter/extensions.d.ts +4 -1
  116. package/lib/types/dsh-adapter/extensions.d.ts.map +1 -1
  117. package/lib/types/dsh-adapter/extensions.js +8 -1
  118. package/lib/types/dsh-adapter/index.d.ts +11 -1
  119. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  120. package/lib/types/dsh-adapter/index.js +2 -0
  121. package/lib/types/dsh-adapter/plugin-test-utils.d.ts +62 -0
  122. package/lib/types/dsh-adapter/plugin-test-utils.d.ts.map +1 -0
  123. package/lib/types/dsh-adapter/plugin-test-utils.js +61 -0
  124. package/lib/types/dsh-adapter/plugin.d.ts +26 -0
  125. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  126. package/lib/types/dsh-adapter/plugin.js +279 -56
  127. package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
  128. package/lib/types/dsh-adapter/plugins-info.js +12 -0
  129. package/lib/types/dsh-adapter/preset-resolution.d.ts +49 -0
  130. package/lib/types/dsh-adapter/preset-resolution.d.ts.map +1 -0
  131. package/lib/types/dsh-adapter/preset-resolution.js +42 -0
  132. package/lib/types/dsh-adapter/presets.d.ts +0 -26
  133. package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
  134. package/lib/types/dsh-adapter/presets.js +4 -14
  135. package/lib/types/dsh-adapter/promptDebug.d.ts.map +1 -1
  136. package/lib/types/dsh-adapter/promptDebug.js +4 -1
  137. package/lib/types/dsh-adapter/providerGuard.d.ts +75 -0
  138. package/lib/types/dsh-adapter/providerGuard.d.ts.map +1 -0
  139. package/lib/types/dsh-adapter/providerGuard.js +104 -0
  140. package/lib/types/dsh-adapter/questions-answerer.d.ts +49 -0
  141. package/lib/types/dsh-adapter/questions-answerer.d.ts.map +1 -0
  142. package/lib/types/dsh-adapter/questions-answerer.js +61 -0
  143. package/lib/types/dsh-adapter/recap.d.ts.map +1 -1
  144. package/lib/types/dsh-adapter/recap.js +12 -6
  145. package/lib/types/dsh-adapter/sanitize.d.ts.map +1 -1
  146. package/lib/types/dsh-adapter/sanitize.js +6 -1
  147. package/lib/types/dsh-adapter/sessions/digest.d.ts +21 -1
  148. package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -1
  149. package/lib/types/dsh-adapter/sessions/digest.js +229 -3
  150. package/lib/types/dsh-adapter/sessions/frames.d.ts +3 -0
  151. package/lib/types/dsh-adapter/sessions/frames.d.ts.map +1 -1
  152. package/lib/types/dsh-adapter/sessions/frames.js +34 -19
  153. package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
  154. package/lib/types/dsh-adapter/sessions/list.js +148 -31
  155. package/lib/types/dsh-adapter/sessions/store.d.ts +8 -0
  156. package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
  157. package/lib/types/dsh-adapter/sessions/store.js +24 -4
  158. package/lib/types/dsh-adapter/sessions/types.d.ts +3 -0
  159. package/lib/types/dsh-adapter/sessions/types.d.ts.map +1 -1
  160. package/lib/types/dsh-adapter/settings-sections.d.ts +1 -0
  161. package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
  162. package/lib/types/dsh-adapter/settings-sections.js +48 -3
  163. package/lib/types/dsh-adapter/settingsEditor.d.ts +6 -0
  164. package/lib/types/dsh-adapter/settingsEditor.d.ts.map +1 -1
  165. package/lib/types/dsh-adapter/settingsEditor.js +15 -3
  166. package/lib/types/dsh-adapter/subagents.d.ts +4 -0
  167. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
  168. package/lib/types/dsh-adapter/subagents.js +8 -0
  169. package/lib/types/dsh-adapter/themes.d.ts +51 -0
  170. package/lib/types/dsh-adapter/themes.d.ts.map +1 -0
  171. package/lib/types/dsh-adapter/themes.js +272 -0
  172. package/lib/types/dsh-adapter/toast.d.ts +67 -0
  173. package/lib/types/dsh-adapter/toast.d.ts.map +1 -0
  174. package/lib/types/dsh-adapter/toast.js +141 -0
  175. package/lib/types/dsh-adapter/types.d.ts +1 -1
  176. package/lib/types/extensions.d.ts +4 -0
  177. package/lib/types/extensions.d.ts.map +1 -1
  178. package/lib/types/extensions.js +5 -1
  179. package/lib/types/history.d.ts +4 -3
  180. package/lib/types/history.d.ts.map +1 -1
  181. package/lib/types/history.js +71 -18
  182. package/lib/types/hooks/useRuntimeThemeSnapshot.d.ts +10 -0
  183. package/lib/types/hooks/useRuntimeThemeSnapshot.d.ts.map +1 -0
  184. package/lib/types/hooks/useRuntimeThemeSnapshot.js +32 -0
  185. package/lib/types/i18n.d.ts +319 -94
  186. package/lib/types/i18n.d.ts.map +1 -1
  187. package/lib/types/i18n.js +118 -35
  188. package/lib/types/ink/components/App.d.ts +20 -0
  189. package/lib/types/ink/components/App.d.ts.map +1 -1
  190. package/lib/types/ink/components/App.js +142 -13
  191. package/lib/types/ink/components/Box.d.ts +39 -2
  192. package/lib/types/ink/components/Box.d.ts.map +1 -1
  193. package/lib/types/ink/components/Box.js +61 -37
  194. package/lib/types/ink/events/context-menu-event.d.ts +19 -0
  195. package/lib/types/ink/events/context-menu-event.d.ts.map +1 -0
  196. package/lib/types/ink/events/context-menu-event.js +20 -0
  197. package/lib/types/ink/events/drag-event.d.ts +44 -0
  198. package/lib/types/ink/events/drag-event.d.ts.map +1 -0
  199. package/lib/types/ink/events/drag-event.js +39 -0
  200. package/lib/types/ink/events/event-handlers.d.ts +8 -0
  201. package/lib/types/ink/events/event-handlers.d.ts.map +1 -1
  202. package/lib/types/ink/events/event-handlers.js +8 -0
  203. package/lib/types/ink/hit-test.d.ts +69 -0
  204. package/lib/types/ink/hit-test.d.ts.map +1 -1
  205. package/lib/types/ink/hit-test.js +260 -6
  206. package/lib/types/ink/ink.d.ts +25 -0
  207. package/lib/types/ink/ink.d.ts.map +1 -1
  208. package/lib/types/ink/ink.js +141 -27
  209. package/lib/types/ink/parse-keypress.d.ts +2 -0
  210. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  211. package/lib/types/ink/parse-keypress.js +12 -15
  212. package/lib/types/ink/renderer.d.ts.map +1 -1
  213. package/lib/types/ink/renderer.js +7 -0
  214. package/lib/types/ink/root.d.ts +16 -0
  215. package/lib/types/ink/root.d.ts.map +1 -1
  216. package/lib/types/ink/root.js +2 -0
  217. package/lib/types/ink/screen.d.ts +7 -0
  218. package/lib/types/ink/screen.d.ts.map +1 -1
  219. package/lib/types/ink/screen.js +8 -1
  220. package/lib/types/ink/terminal-querier.d.ts +8 -0
  221. package/lib/types/ink/terminal-querier.d.ts.map +1 -1
  222. package/lib/types/ink/terminal-querier.js +13 -0
  223. package/lib/types/ink/terminal.d.ts +42 -0
  224. package/lib/types/ink/terminal.d.ts.map +1 -1
  225. package/lib/types/ink/terminal.js +52 -2
  226. package/lib/types/ink/termio/osc.d.ts +2 -1
  227. package/lib/types/ink/termio/osc.d.ts.map +1 -1
  228. package/lib/types/ink/termio/osc.js +26 -5
  229. package/lib/types/plugin-spec/registry.d.ts +1 -1
  230. package/lib/types/plugin-spec/registry.js +1 -1
  231. package/lib/types/presetPrefs.d.ts +6 -5
  232. package/lib/types/presetPrefs.d.ts.map +1 -1
  233. package/lib/types/presetPrefs.js +10 -5
  234. package/lib/types/screens/Chat.d.ts +4 -1
  235. package/lib/types/screens/Chat.d.ts.map +1 -1
  236. package/lib/types/screens/Chat.js +240 -104
  237. package/lib/types/screens/SessionBrowser.d.ts +9 -4
  238. package/lib/types/screens/SessionBrowser.d.ts.map +1 -1
  239. package/lib/types/screens/SessionBrowser.js +497 -74
  240. package/lib/types/screens/SessionTree.d.ts.map +1 -1
  241. package/lib/types/screens/SessionTree.js +37 -9
  242. package/lib/types/screens/Settings.d.ts +7 -5
  243. package/lib/types/screens/Settings.d.ts.map +1 -1
  244. package/lib/types/screens/Settings.js +211 -100
  245. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  246. package/lib/types/screens/StatusLine.js +37 -2
  247. package/lib/types/screens/chatOverlay.d.ts +3 -2
  248. package/lib/types/screens/chatOverlay.d.ts.map +1 -1
  249. package/lib/types/screens/chatOverlay.js +2 -0
  250. package/lib/types/sessionHistory.d.ts +11 -0
  251. package/lib/types/sessionHistory.d.ts.map +1 -1
  252. package/lib/types/sessionHistory.js +29 -0
  253. package/lib/types/sessionPins.d.ts +33 -0
  254. package/lib/types/sessionPins.d.ts.map +1 -0
  255. package/lib/types/sessionPins.js +181 -0
  256. package/lib/types/sessions/format.d.ts +2 -0
  257. package/lib/types/sessions/format.d.ts.map +1 -1
  258. package/lib/types/sessions/format.js +23 -4
  259. package/lib/types/sessions/view.d.ts +42 -6
  260. package/lib/types/sessions/view.d.ts.map +1 -1
  261. package/lib/types/sessions/view.js +133 -35
  262. package/lib/types/test-utils.d.ts +2 -0
  263. package/lib/types/test-utils.d.ts.map +1 -0
  264. package/lib/types/test-utils.js +8 -0
  265. package/lib/types/theme.d.ts +22 -5
  266. package/lib/types/theme.d.ts.map +1 -1
  267. package/lib/types/theme.js +57 -7
  268. package/lib/types/themeCatalog.d.ts +36 -0
  269. package/lib/types/themeCatalog.d.ts.map +1 -0
  270. package/lib/types/themeCatalog.js +157 -0
  271. package/lib/types/tips.d.ts.map +1 -1
  272. package/lib/types/tips.js +115 -19
  273. package/lib/types/tuiDisplayPrefs.d.ts +3 -0
  274. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
  275. package/lib/types/tuiDisplayPrefs.js +1 -0
  276. package/lib/types/update.d.ts +202 -0
  277. package/lib/types/update.d.ts.map +1 -1
  278. package/lib/types/update.js +716 -6
  279. package/lib/types/utils/debug.d.ts.map +1 -1
  280. package/lib/types/utils/debug.js +2 -1
  281. package/lib/types/utils/keymap.d.ts +1 -1
  282. package/lib/types/utils/keymap.d.ts.map +1 -1
  283. package/lib/types/utils/keymap.js +19 -2
  284. package/lib/types/utils/urlGuard.d.ts +28 -0
  285. package/lib/types/utils/urlGuard.d.ts.map +1 -0
  286. package/lib/types/utils/urlGuard.js +21 -0
  287. package/node_modules/@deepseek-harness-tui/dsh-auth/LICENSE +21 -21
  288. package/node_modules/@deepseek-harness-tui/dsh-auth/README.md +3 -0
  289. package/node_modules/@deepseek-harness-tui/dsh-auth/dsh-plugin.json +44 -44
  290. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/credentials.d.ts +7 -11
  291. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/index.d.ts +16 -1
  292. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/index.js +23 -2
  293. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.d.ts +5 -5
  294. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/pi-ai.d.ts +23 -0
  295. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/pi-ai.js +27 -0
  296. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/profiles.d.ts +17 -3
  297. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/profiles.js +36 -4
  298. package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +11 -12
  299. package/node_modules/@dsh-std/command/CHANGELOG.md +8 -8
  300. package/node_modules/@dsh-std/command/LICENSE +21 -21
  301. package/node_modules/@dsh-std/command/README.md +26 -26
  302. package/node_modules/@dsh-std/command/README.zh.md +28 -28
  303. package/node_modules/@dsh-std/command/lib/index.js.map +1 -1
  304. package/node_modules/@dsh-std/command/package.json +22 -22
  305. package/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
  306. package/node_modules/@dsh-std/connection/LICENSE +21 -21
  307. package/node_modules/@dsh-std/connection/README.md +42 -42
  308. package/node_modules/@dsh-std/connection/README.zh.md +42 -42
  309. package/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
  310. package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
  311. package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
  312. package/node_modules/@dsh-std/connection/package.json +20 -20
  313. package/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  314. package/node_modules/@dsh-std/core/LICENSE +21 -21
  315. package/node_modules/@dsh-std/core/README.md +13 -13
  316. package/node_modules/@dsh-std/core/README.zh.md +13 -13
  317. package/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  318. package/node_modules/@dsh-std/core/package.json +21 -21
  319. package/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
  320. package/node_modules/@dsh-std/manifest/LICENSE +21 -21
  321. package/node_modules/@dsh-std/manifest/README.md +5 -5
  322. package/node_modules/@dsh-std/manifest/README.zh.md +5 -5
  323. package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
  324. package/node_modules/@dsh-std/manifest/package.json +20 -20
  325. package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
  326. package/node_modules/@dsh-std/messages/CHANGELOG.md +8 -8
  327. package/node_modules/@dsh-std/messages/LICENSE +21 -21
  328. package/node_modules/@dsh-std/messages/README.md +5 -5
  329. package/node_modules/@dsh-std/messages/README.zh.md +7 -7
  330. package/node_modules/@dsh-std/messages/lib/index.js.map +1 -1
  331. package/node_modules/@dsh-std/messages/package.json +20 -20
  332. package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -54
  333. package/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
  334. package/node_modules/@dsh-std/presentation/LICENSE +21 -21
  335. package/node_modules/@dsh-std/presentation/README.md +27 -27
  336. package/node_modules/@dsh-std/presentation/README.zh.md +29 -29
  337. package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
  338. package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
  339. package/node_modules/@dsh-std/presentation/package.json +25 -25
  340. package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -8
  341. package/node_modules/@dsh-std/storage/LICENSE +21 -21
  342. package/node_modules/@dsh-std/storage/README.md +5 -5
  343. package/node_modules/@dsh-std/storage/README.zh.md +7 -7
  344. package/node_modules/@dsh-std/storage/lib/index.js.map +1 -1
  345. package/node_modules/@dsh-std/storage/package.json +20 -20
  346. package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -56
  347. package/package.json +204 -75
  348. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
  349. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -21
  350. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -42
  351. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -42
  352. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
  353. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
  354. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
  355. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -20
  356. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  357. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -21
  358. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -13
  359. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -13
  360. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  361. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -21
  362. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
  363. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -21
  364. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -5
  365. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -5
  366. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
  367. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -20
  368. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
  369. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
  370. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -21
  371. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +27 -27
  372. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -29
  373. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
  374. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
  375. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +25 -25
  376. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  377. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -21
  378. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -13
  379. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -13
  380. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  381. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -21
  382. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  383. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -21
  384. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -13
  385. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -13
  386. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  387. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -21
  388. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  389. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -21
  390. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -13
  391. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -13
  392. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  393. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -21
  394. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
  395. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -21
  396. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -42
  397. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -42
  398. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
  399. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
  400. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
  401. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -20
  402. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  403. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -21
  404. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -13
  405. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -13
  406. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  407. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -21
  408. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  409. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -21
  410. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -13
  411. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -13
  412. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  413. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -21
  414. package/lib/types/dsh-adapter/packaged-skills.d.ts +0 -10
  415. package/lib/types/dsh-adapter/packaged-skills.d.ts.map +0 -1
  416. package/lib/types/dsh-adapter/packaged-skills.js +0 -63
  417. package/skills/audit/SKILL.md +0 -24
  418. package/skills/bug/SKILL.md +0 -27
  419. package/skills/pr-comments/SKILL.md +0 -20
  420. package/skills/practice/SKILL.md +0 -22
  421. package/skills/release-notes/SKILL.md +0 -25
  422. package/skills/review/SKILL.md +0 -25
  423. package/skills/vuln-check/SKILL.md +0 -25
package/README.md CHANGED
@@ -49,12 +49,14 @@
49
49
  </tr>
50
50
  </table>
51
51
  </div>
52
+
52
53
  ## 核心能力
53
54
 
54
55
  - **终端交互**:低资源占用,长会话稳定可靠;多种主题切换,样式美观,实时显示工作状态、TPS、缓存命中率等
55
- 推理等级、输入/输出 token 与 Git/会话信息。
56
- - **功能全面**:`/resume`、`/new`、`/compact`、`/export`、`/btw`,模型热切换,原生subagent,会话fork,自动更新;可在vs code中[以vscode插件形式启动](docs/vscode.md),已上架 VS Code Marketplace。
56
+ 推理等级、输入/输出 token 与 Git/会话信息;终端卡多行命令可经 `/settings` 折叠为首行 + 计数提示(Ctrl+O 或点击卡片展开);全屏模式下悬停在截断的工具卡标题、用户消息或会话标题上约 600ms,浮层显示完整内容。
57
+ - **功能全面**:`/resume` 按工作目录分类浏览、搜索与预览历史会话(左键恢复、右键弹出操作菜单;可固定常用会话——「已固定」分组置顶显示,行内 ★ 或 `Ctrl+P` 切换,持久化到 `~/.dsh-tui`),另有 `/new`、`/compact`、`/export`、`/btw`,模型热切换,原生subagent,会话fork,自动更新,输入框 `/vim` vim 编辑模式、鼠标选区编辑(拖选高亮、Shift+click 扩展、双击选词、Ctrl+C 复制选区)与全屏草稿编辑(`Ctrl+Shift+E` 或输入行 `⛶` 按钮:行号 + 当前行高亮、Enter 换行、Ctrl+Enter 发送、滚轮滚动、点击/拖选,长草稿独占整屏;`/settings` 可关);可在vs code中[以vscode插件形式启动](docs/vscode.md),已上架 VS Code Marketplace。
57
58
  - **扩展丰富**:原生浏览器交互,compter use等大量附属功能性扩展
59
+ - **技能归 DSH 管理**:`/skills` 展示当前 profile、用户与项目发现的技能;dsh-TUI 不预装通用技能。
58
60
 
59
61
 
60
62
 
@@ -123,12 +125,25 @@ sh install.sh
123
125
 
124
126
  想为 dsh-TUI 做插件/扩展?欢迎加入生态!
125
127
 
126
- - **接口与兼容性协定**:[终端交互生态插件准入规范与实施标准](https://github.com/T-Auto/dsh-ecosystem-spec)
127
- - **插件开发指南**:[`docs/plugins.md`](docs/plugins.md)(接缝、契约、规范与验证清单)
128
+ - **接口与兼容性协定 / 插件开发指南**:[终端交互生态插件准入与开发指南](https://github.com/T-Auto/dsh-ecosystem-spec/blob/main/docs/plugin-admission-and-development.md)(准入规范、接缝、契约、验证清单)
128
129
  - **生态组织**:[dsh-tui-ecosystem](https://github.com/dsh-tui-ecosystem)(社区插件与模板的家)
129
130
  - **模板仓库**:[plugin-template](https://github.com/dsh-tui-ecosystem/plugin-template)(从模板起步,5 分钟出一个插件)
130
131
  - **参考实现**:`dsh-working-activity`(实时工作状态行:TUI 槽位 + `activity/status` 会话事件双出口)
131
132
 
133
+ ### 接缝稳定性参考
134
+
135
+ 按当前实现成熟度给出的**非正式**分级,帮助插件作者评估投入;正式状态与兼容性协定以
136
+ [准入与开发指南](https://github.com/T-Auto/dsh-ecosystem-spec/blob/main/docs/plugin-admission-and-development.md)为准:
137
+
138
+ | 分级 | 接缝 |
139
+ | --- | --- |
140
+ | 稳定候选(形态冻结;如有破坏性变更,先在次版本弃用告警再移除) | 六 设置区块 · 八 全屏场景 · 十 托管对话框 · 十一 状态行 · 十二 键盘快捷键 · 十三 条目渲染器 |
141
+ | 实验性(仍可能随 dsh-std / 准入规范演进调整) | 九 决策事件 · toast 通知(`ctx.tuiToast`,新增) |
142
+ | 跟随上游(稳定性由 cordis / dsh 官方机制决定) | 一 会话事件 · 二 官方 prompt 槽位 · 三 技能打包 · 四 主题 · 五 system prompt 段 · 七 profile 组合 |
143
+
144
+ 另:`@deepseek-harness-tui/dsh-tui/test-utils`(headless 准入/挂载测试助手)与
145
+ `@deepseek-harness-tui/dsh-tui/api`(纯类型入口)为实验性公开面。
146
+
132
147
 
133
148
 
134
149
  ## 文档索引
@@ -137,12 +152,12 @@ sh install.sh
137
152
  | --- | --- |
138
153
  | [安装与快速开始](docs/getting-started.md) | 前置条件、安装、启动、profile 生命周期、源码开发 |
139
154
  | [配置参考](docs/configuration.md) | Cordis 覆盖、配置字段、Agent preset、MCP、环境变量 |
140
- | [主题系统](docs/themes.md) | 内置主题、自动检测、自定义 JSON 主题与校验规则 |
155
+ | [主题系统](docs/themes.md) | 内置主题、自动检测、静态 JSON 与 npm 插件主题、校验规则 |
141
156
  | [交互与命令](docs/interaction.md) | 快捷键、鼠标、问卷、slash command 与会话工作流 |
142
157
  | [架构与限制](docs/architecture.md) | 运行链路、渲染与持久化设计、安全边界、已知限制 |
143
158
  | [VS Code 使用指南](docs/vscode.md) | 在 VS Code 集成终端运行 dsh-tui;companion 扩展 `dsh-tui-vscode` 提供与 Claude Code 官方扩展几乎一致的体验(已上架 Marketplace) |
144
159
  | [贡献与开发约定](docs/contributing.md) | 贡献流程、仓库地图、构建产物、验证矩阵与修改规则 |
145
- | [插件开发指南](docs/plugins.md) | 插件接缝(会话事件 / 槽位 / 技能 / 主题 / prompt 段)、契约、规范与收录 |
160
+ | [插件准入与开发指南](https://github.com/T-Auto/dsh-ecosystem-spec/blob/main/docs/plugin-admission-and-development.md) | 接口与兼容性协定 / 插件准入规范 / 插件接缝 / 契约 / 验证清单(已并入 dsh-ecosystem-spec) |
146
161
 
147
162
  完整的中英文索引见 [`docs/README.md`](docs/README.md)。
148
163
 
@@ -152,16 +167,19 @@ sh install.sh
152
167
 
153
168
  - **生态组织**:[dsh-tui-ecosystem](https://github.com/dsh-tui-ecosystem) —— 社区插件、模板与收录列表的家。欢迎来发插件、提创意、互相取暖 🐋
154
169
  - **社区交流群**:使用问题、插件创意、功能许愿,都欢迎进来聊。
170
+ - **行为准则**:参与前请读一遍[贡献者行为准则](CODE_OF_CONDUCT.md)。
155
171
 
156
- | 微信群 | QQ 群(群号 572549239) | 微信三群 |
172
+ | 微信群 | QQ 群(群号 572549239) | 微信四群 |
157
173
  | :---: | :---: | :---: |
158
- | <img src="screenshots/wechat-group.jpg" alt="dsh-TUI 社区交流群微信群二维码" width="200"> | <img src="screenshots/qq-group.png" alt="dsh-TUI 社区交流群 QQ 群二维码" width="200"> | <img src="screenshots/wechat-group3.jpg" alt="dsh-TUI 社区交流群微信三群二维码" width="200"> |
174
+ | <img src="screenshots/wechat-group.jpg" alt="dsh-TUI 社区交流群微信群二维码" width="200"> | <img src="screenshots/qq-group.png" alt="dsh-TUI 社区交流群 QQ 群二维码" width="200"> | <img src="screenshots/wechat-group4.jpg" alt="dsh-TUI 社区交流四群微信群二维码" width="200"> |
159
175
 
160
176
  > 微信群二维码约 7 天过期一次,如遇失效请走 QQ 群(572549239),或开个 issue 提醒我们更新。
161
177
 
162
178
  ## 权限与安全边界
163
179
 
164
- `dsh-TUI` 不实现独立沙箱,而是使用当前 DSH profile 的文件、Shell、sandbox 与 approval 策略。仓库提供的 profile 在非 Windows 平台默认采用工作区约束与审批;Windows 当前没有对应的沙箱后端,组合会退回到 `danger-full-access` 且不弹审批。在包含敏感凭证或不可信仓库的环境中启动前,请先检查 profile 配置。
180
+ > **Windows 安全警告:** Windows profile 默认使用 `danger-full-access`,且 approval 默认是 `never`。这会授予工具不受限制的访问权限;在敏感凭证或不可信仓库环境中启动前,务必先检查并收紧 profile 配置。
181
+
182
+ `dsh-TUI` 不实现独立沙箱,而是使用当前 DSH profile 的文件、Shell、sandbox 与 approval 策略。权限预设来自 DSH `permissionPresets` registry:服务缺失时使用 legacy 三项兼容名册;服务已挂载但为空、损坏或不一致时标记为 unavailable,TUI fail closed,不伪造名册。可用 registry 按声明顺序提供第三方预设,只有符合既有 command-token 语法的 ID 才进入补全,`custom` 只显示为当前态,不是可选择目标;切换始终走官方 `/permission <preset>` 命令。若外部 `/permission` 命令本身未注册,输入沿用现有默认命令/model dispatch。在包含敏感凭证或不可信仓库的环境中启动前,请先检查 profile 配置。
165
183
 
166
184
  详见[权限边界与已知限制](docs/architecture.md#权限与安全边界)。
167
185
 
package/bin/dsh-tui.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * dsh-tui — 双态启动器(delegating launcher,0.9.2)。
3
+ * dsh-tui — 双态启动器(delegating launcher,0.9.3)。
4
4
  *
5
5
  * 同一个文件按“自己住在哪”决定扮演的角色:
6
6
  *
@@ -28,13 +28,29 @@
28
28
  * `DSH_TUI_LANG` 显式指定时从其值,否则默认中文(同 src/i18n.ts 的缺省)。
29
29
  */
30
30
  import { spawn, spawnSync } from 'node:child_process'
31
- import { existsSync, readFileSync, realpathSync } from 'node:fs'
31
+ import { existsSync, readFileSync, realpathSync, rmSync } from 'node:fs'
32
32
  import { homedir } from 'node:os'
33
33
  import { dirname, isAbsolute, join, resolve } from 'node:path'
34
34
  import { fileURLToPath, pathToFileURL } from 'node:url'
35
35
 
36
+ if (process.platform === 'win32' && process.env.DSH_TUI_STANDALONE_BINARY) {
37
+ try {
38
+ const oldBinary = `${process.env.DSH_TUI_STANDALONE_BINARY}.old`
39
+ if (existsSync(oldBinary)) rmSync(oldBinary, { force: true })
40
+ } catch {
41
+ // Best effort cleanup.
42
+ }
43
+ }
44
+
36
45
  const here = dirname(fileURLToPath(import.meta.url))
37
46
  const ownDir = dirname(here)
47
+
48
+ /**
49
+ * Read and parse a JSON file safely.
50
+ *
51
+ * @param {string} p - File path to parse.
52
+ * @returns {any} Parsed JSON content or undefined.
53
+ */
38
54
  const readJson = p => {
39
55
  try {
40
56
  return JSON.parse(readFileSync(p, 'utf8'))
@@ -50,6 +66,12 @@ const PROFILE = 'dsh-tui'
50
66
  // --- 内联小工具(见文件头:零 lib 依赖是迁移契约的一部分)---------------------
51
67
  // 与 lib/types/utils/shellQuote.js 同语义的最小实现:cmd.exe 以空格拼接参数
52
68
  // 且不做转义,含空格/引号的参数必须整体加引号(内层引号与反斜杠转义)。
69
+ /**
70
+ * Quote an array of arguments for cmd.exe.
71
+ *
72
+ * @param {string[]} args - Argument tokens.
73
+ * @returns {string[]} Quoted argument tokens.
74
+ */
53
75
  const shellQuote = args =>
54
76
  args.map(arg => {
55
77
  const s = String(arg)
@@ -190,7 +212,7 @@ const MSG = {
190
212
  },
191
213
  helpText: {
192
214
  en:
193
- `Usage: dsh-tui [command] [options] [path|url]\n\n` +
215
+ `Usage: dsh-tui|dst [command] [options] [path|url]\n\n` +
194
216
  `Commands:\n` +
195
217
  ` update Update the ${PROFILE} profile to the latest release\n` +
196
218
  ` doctor Pre-flight environment checks (dsh/pnpm/profile/key)\n` +
@@ -202,7 +224,7 @@ const MSG = {
202
224
  ` <path|url> Open with the given workspace target\n\n` +
203
225
  `Any other argument is forwarded to \`dsh --profile ${PROFILE}\`.`,
204
226
  zh:
205
- `用法:dsh-tui [命令] [选项] [路径|URL]\n\n` +
227
+ `用法:dsh-tui|dst [命令] [选项] [路径|URL]\n\n` +
206
228
  `命令:\n` +
207
229
  ` update 将 ${PROFILE} profile 升级到最新版本\n` +
208
230
  ` doctor 启动前环境诊断(dsh/pnpm/profile/密钥)\n` +
package/cordis.patch.yml CHANGED
@@ -7,7 +7,7 @@
7
7
  # restates every key it owns (see the dsh-base patch for the shared
8
8
  # defaults). The dsh-base core rows that need no dsh-tui value — tools,
9
9
  # sandbox/approval policy, skills, goal, plan mode, workspace context,
10
- # telemetry — are inherited unchanged.
10
+ # telemetry — are inherited unless this surface explicitly restates them.
11
11
 
12
12
  # ── surface-specific values over the dsh-base layer ─────────────────────────
13
13
 
@@ -37,18 +37,39 @@
37
37
  config:
38
38
  agents: []
39
39
 
40
+ # Preserve the TUI's opt-in privacy stance across the alpha base default
41
+ # change to FEEDBACK_ONLY. An explicit DSH_TELEMETRY_MODE still wins. This
42
+ # restates the whole alpha config because include patches replace config
43
+ # objects rather than merging them.
44
+ - id: session-telemetry-otel
45
+ config:
46
+ mode: !!js process.env.DSH_TELEMETRY_MODE || 'DISABLED'
47
+ shutdownTimeoutMillis: 3000
48
+ exporter:
49
+ url: !!js process.env.DSH_TELEMETRY_OTLP_URL ?? 'https://harness-telemetry.deepseeksvc.com/v1/logs'
50
+ compression: gzip
51
+ timeoutMillis: 1000
52
+ processor:
53
+ scheduledDelayMillis: 10000
54
+ maxQueueSize: 2048
55
+ maxExportBatchSize: 2048
56
+ exportTimeoutMillis: 1500
57
+
58
+ # The alpha base sends the active Loader package inventory on official
59
+ # DeepSeek requests by default. TUI keeps that diagnostic metadata opt-in.
60
+ - id: plugin-package-inventory-deepseek
61
+ config:
62
+ enabled: false
63
+
40
64
  # ── agent presets (issue #8) ────────────────────────────────────────────────
41
65
  #
42
66
  # The model-facing plugin set moves INTO the agent-presets roster: every
43
67
  # session composes its tools/prompt sections from one preset directory
44
- # (standard/code/minimal/cordis) instead of the host rows below. The TUI's
45
- # roster row uses the scoped `dsh-tui-agent-presets` id and carries the
46
- # shipped `config/agent-presets/` system root itself (derived from the dsh
47
- # CLI installation through the launcher-maintained `profiles/node_modules`
48
- # fallback link), because the official profile-boot root overlay only targets
49
- # the unscoped `agent-presets` id that surface bundles own. The roster itself
50
- # appends `$DSH_HOME/.agent-presets` (user-authored presets,
51
- # `includeUserRoot` default). Mirroring the official dsh-web-app patch: every
68
+ # (standard/ptc/minimal/cordis) instead of the host rows below. The TUI's
69
+ # roster row uses the scoped `dsh-tui-agent-presets` id. alpha packages prepend
70
+ # their bundled system root; the validated rc line still needs the dsh CLI's
71
+ # `config/agent-presets/` directory supplied explicitly. Both append
72
+ # `$DSH_HOME/.agent-presets`. Mirroring the official dsh-web-app patch: every
52
73
  # dsh-base row a preset now owns is disabled here, so a minimal agent does not
53
74
  # leak host-layer tools (an agent's registry view resolves agent → preset →
54
75
  # global).
@@ -59,7 +80,7 @@
59
80
  - id: command-compact
60
81
  disabled: true
61
82
 
62
- # compaction lives in the preset's own isolate realm (standard/code/cordis
83
+ # compaction lives in the preset's own isolate realm (standard/ptc/cordis
63
84
  # carry `compaction-basic` with package defaults; minimal has none). The
64
85
  # CC_TUI_COMPACT_RATIO/CC_TUI_COMPACT_RETAIN tunables retired with this host
65
86
  # row — preset compositions own their compaction config.
@@ -81,6 +102,27 @@
81
102
  - id: tool-fs-search
82
103
  disabled: true
83
104
 
105
+ - id: command-goal
106
+ # rc.2 presets do not carry this command, so their host row must remain
107
+ # active. alpha disables it only when the shipped standard preset really
108
+ # owns the command; reading the capability avoids guessing from another
109
+ # optional Loader row.
110
+ disabled: !!js >-
111
+ (() => {
112
+ const require = process.getBuiltinModule('node:module').createRequire(ctx.baseUrl)
113
+ const fs = process.getBuiltinModule('node:fs')
114
+ const path = process.getBuiltinModule('node:path')
115
+ try {
116
+ const manifest = require.resolve('@deepseek-ai/dsh-agent-presets/package.json')
117
+ const preset = path.join(path.dirname(manifest), 'presets', 'standard', 'agent.cordis.yml')
118
+ return fs.readFileSync(preset, 'utf8')
119
+ .split(/\r?\n/u)
120
+ .some(line => line.trim() === '- id: command-goal')
121
+ } catch {
122
+ return false
123
+ }
124
+ })()
125
+
84
126
  - id: tool-goal
85
127
  disabled: true
86
128
 
@@ -158,16 +200,17 @@
158
200
  # semantics would create a duplicate row. dsh-tui defensively creates the
159
201
  # service on its own context when no composition provides it (bare
160
202
  # `dsh --config cordis.yml` boots), then mounts the model-facing
161
- # ask_user_question tool and registers the questionnaire provider on
162
- # `ctx.userQuestions`.
203
+ # ask_user_question tool. On legacy hosts it registers the TUI provider on
204
+ # `ctx.userQuestions`; on Alpha it answers the scoped
205
+ # `user-questions/request` waterfall.
163
206
 
164
207
  - insert:
165
208
  # Workspace grouping is a separate durable ledger, not a cwd-derived
166
209
  # projection. Mount the same domain stack and storage root as dsh-web-app
167
210
  # so TUI-created sessions can attach to the exact registry Web reads.
168
211
  #
169
- # The six rows below own host-plane services that the official web-app
170
- # bundle may already mount. Loader entry ids are process-global, so these
212
+ # These rows own host-plane services that the official web-app bundle may
213
+ # already mount. Loader entry ids are process-global, so these
171
214
  # rows use dsh-tui-* scoped ids and self-disable when an enabled row with
172
215
  # the official id/name is already present in the tree. The disabled check
173
216
  # is evaluated during the same include update that inserts every row, so
@@ -188,10 +231,38 @@
188
231
  config:
189
232
  backend: json
190
233
 
234
+ # Alpha moved the durable storage stack into dsh-base, so these three
235
+ # scoped copies self-disable there. Keep them for the validated rc lines,
236
+ # whose base layer does not provide the stack to a TUI-only profile.
237
+
191
238
  - id: dsh-tui-workspace
192
239
  name: '@deepseek-ai/dsh-workspace'
193
240
  disabled: !!js "[...ctx.loader.entries()].some(entry => entry.options.id === 'workspace' && entry.options.name === '@deepseek-ai/dsh-workspace' && !entry.disabled)"
194
241
 
242
+ # PTC presentation waits on this Host service. The scoped row supports a
243
+ # TUI-only profile and yields to the official web-app row in mixed profiles.
244
+ - id: dsh-tui-code-runtime
245
+ name: '@deepseek-ai/dsh-code-runtime-worker-thread'
246
+ disabled: !!js "[...ctx.loader.entries()].some(entry => entry.options.id === 'code-runtime' && entry.options.name === '@deepseek-ai/dsh-code-runtime-worker-thread' && !entry.disabled)"
247
+
248
+ # Alpha presets opt their delegation tool into Host-owned model-selection
249
+ # settings. Without this service standard/ptc/cordis preset mounting fails.
250
+ # The package subpath does not exist on rc.2, so resolve that capability
251
+ # directly before Loader attempts the import. An enabled official row still
252
+ # owns the seat in mixed profiles.
253
+ - id: dsh-tui-subagent-model-selection-settings
254
+ name: '@deepseek-ai/dsh-tool-subagent/model-selection-settings'
255
+ disabled: !!js >-
256
+ (() => {
257
+ const require = process.getBuiltinModule('node:module').createRequire(ctx.baseUrl)
258
+ try {
259
+ require.resolve('@deepseek-ai/dsh-tool-subagent/model-selection-settings')
260
+ } catch {
261
+ return true
262
+ }
263
+ return [...ctx.loader.entries()].some(entry => entry.options.id === 'subagent-model-selection-settings' && entry.options.name === '@deepseek-ai/dsh-tool-subagent/model-selection-settings' && !entry.disabled)
264
+ })()
265
+
195
266
  # Generic terminal workspace registry. Optional plugins add providers;
196
267
  # the TUI itself always supplies LOCAL and has no provider-specific code.
197
268
  - id: dsh-tui-workspaces
@@ -231,27 +302,35 @@
231
302
  name: '@deepseek-harness-tui/dsh-tui/extensions'
232
303
 
233
304
  # The agent-preset roster (issue #8): `ctx.agentPresets`, the service the
234
- # TUI composes every session's model-facing world from. The scoped row
235
- # carries the official CLI's shipped `config/agent-presets/` directory
236
- # (standard/code/minimal/cordis, system trust) through the
237
- # launcher-maintained profiles/node_modules fallback link; the roster
238
- # itself appends `$DSH_HOME/.agent-presets` (user-authored presets,
239
- # `includeUserRoot` default). A boot that never reached profile-boot
240
- # leaves the system root empty and the roster finds only user presets.
305
+ # TUI composes every session's model-facing world from. alpha packages
306
+ # prepend their bundled presets as the read-only system root; rc.2 packages
307
+ # have no bundled root and still scan the dsh CLI directory. Both append
308
+ # `$DSH_HOME/.agent-presets` as the user root. Deployment-added roots may
309
+ # still be supplied by a later patch.
241
310
  - id: dsh-tui-agent-presets
242
311
  name: '@deepseek-ai/dsh-agent-presets'
243
312
  disabled: !!js "[...ctx.loader.entries()].some(entry => entry.options.id === 'agent-presets' && entry.options.name === '@deepseek-ai/dsh-agent-presets' && !entry.disabled)"
244
- config:
245
- default: standard
246
- roots: !!js >-
247
- (() => {
248
- const base = ctx.baseUrl
249
- if (!base) return undefined
250
- const root = new URL('../node_modules/@deepseek-ai/dsh/config/agent-presets/', base)
251
- let path = decodeURIComponent(root.pathname)
252
- if (/^\/[A-Za-z]:/.test(path)) path = path.slice(1)
253
- return [{ path, trust: 'system' }]
254
- })()
313
+ config: !!js >-
314
+ (() => {
315
+ const require = process.getBuiltinModule('node:module').createRequire(ctx.baseUrl)
316
+ const fs = process.getBuiltinModule('node:fs')
317
+ const path = process.getBuiltinModule('node:path')
318
+ try {
319
+ const manifest = require.resolve('@deepseek-ai/dsh-agent-presets/package.json')
320
+ if (fs.existsSync(path.join(path.dirname(manifest), 'presets'))) {
321
+ return { default: 'standard' }
322
+ }
323
+ } catch {
324
+ // Let the roster import report a missing package; preserve the rc
325
+ // root fallback below for every package generation without one.
326
+ }
327
+ const base = ctx.baseUrl
328
+ if (!base) return { default: 'standard' }
329
+ const root = new URL('../node_modules/@deepseek-ai/dsh/config/agent-presets/', base)
330
+ let rootPath = decodeURIComponent(root.pathname)
331
+ if (/^\/[A-Za-z]:/.test(rootPath)) rootPath = rootPath.slice(1)
332
+ return { default: 'standard', roots: [{ path: rootPath, trust: 'system' }] }
333
+ })()
255
334
 
256
335
  # Host-plane services the `cordis` preset's plugin-experimentation tool
257
336
  # waits on (dynamicCordisRunner/cordisInspect); dsh-base carries no such
@@ -281,10 +360,11 @@
281
360
  name: '@deepseek-harness-tui/dsh-tui'
282
361
  # The entry-level dependency augments the plugin's `agents` inject and
283
362
  # prevents startup Session creation from racing WorkspaceRegistry init.
284
- inject: [workspaceRegistry, agents, tuiWorkspaces, tuiScenes, tuiDialogs, tuiStatus, tuiShortcuts, tuiRenderers]
285
- # `tuiWorkspaces`/`tuiScenes` (and the dsh-tui-extensions services)
286
- # live in the entry-level inject ONLY as an
287
- # ordering (and reload-rebind) guarantee alongside their service rows
363
+ inject: [workspaceRegistry, agents, tuiWorkspaces, tuiScenes, tuiDialogs, tuiStatus, tuiShortcuts, tuiRenderers, tuiThemes]
364
+ # `tuiWorkspaces`/`tuiScenes` (and the dsh-tui-extensions services,
365
+ # including `tuiThemes`)
366
+ # live in the entry-level inject ONLY as an ordering (and reload-rebind)
367
+ # guarantee alongside their service rows
288
368
  # above — they are deliberately absent from the plugin's code-level
289
369
  # inject (issue #183): the dsh CLI may read this patch from an older
290
370
  # copy of the package than the plugin module it loads, and a hard
@@ -306,9 +386,7 @@
306
386
  # split(强制双栏)/ unified(强制统一式)。/settings 屏可实时改。
307
387
  # diffLayout: auto
308
388
  # 每个请求实际生效的推理强度,按当前路由的 adapter 档位校验
309
- # (deepseek: off/high/max)——不在档位表里的值被忽略,回落 adapter
310
- # 默认值。优先于持久化的 Shift+Tab 选择(~/.dsh-tui/effort.json);
311
- # 同时作为顶栏/状态栏的启动显示,首个请求头回来后以实际值为准。
389
+ #(deepseek: off/low/high/max);非法值回落 adapter 默认。
312
390
  effort: max
313
391
  # Shift+Tab session-mode cycle (array order IS the cycle order;
314
392
  # absent → the built-in default/plan/full trio below). Each entry
package/cordis.yml CHANGED
@@ -3,9 +3,10 @@
3
3
  # Requires DEEPSEEK_API_KEY; a terminal TTY is mandatory.
4
4
 
5
5
  # The user-interaction service: hosts `ctx.userQuestions`, the seam behind
6
- # the model-facing ask_user_question tool. dsh-tui registers its questionnaire
7
- # provider on it; the service must live at the root so the agent loop's tool
8
- # execution can reach it.
6
+ # the model-facing ask_user_question tool. dsh-tui uses the legacy provider
7
+ # API when present, otherwise the scoped user-questions/request waterfall;
8
+ # the service must live at the root so the agent loop's tool execution can
9
+ # reach it.
9
10
  - id: user-questions
10
11
  name: '@deepseek-ai/dsh-user-questions'
11
12
 
@@ -43,14 +44,17 @@
43
44
  name: '@deepseek-harness-tui/dsh-tui/plugin-host'
44
45
 
45
46
  # Plugin-facing UI seams: managed dialogs, status-line contributions,
46
- # keyboard shortcuts, custom session-entry renderers (decision events are
47
- # fired by the channel and need no row).
47
+ # keyboard shortcuts, custom session-entry renderers, and runtime themes
48
+ # (decision events are fired by the channel and need no row).
48
49
  - id: dsh-tui-extensions
49
50
  name: '@deepseek-harness-tui/dsh-tui/extensions'
50
51
 
51
52
  - id: dsh-tui
52
53
  name: '@deepseek-harness-tui/dsh-tui'
53
- inject: [agents, tuiWorkspaces, tuiScenes, tuiDialogs, tuiStatus, tuiShortcuts, tuiRenderers]
54
+ # Entry-level only: orders/rebinds optional extension services on reload;
55
+ # dsh-tui does not hard-inject them at code level, so stale profiles degrade
56
+ # to static themes and inert extension surfaces instead of deadlocking boot.
57
+ inject: [agents, tuiWorkspaces, tuiScenes, tuiDialogs, tuiStatus, tuiShortcuts, tuiRenderers, tuiThemes]
54
58
  config:
55
59
  provider: deepseek-official
56
60
  # Alt-screen fullscreen (CC 同款): 应用内鼠标选区(选择即复制, OSC 52 +
@@ -58,10 +62,9 @@
58
62
  # inline 渲染, 鼠标交给终端模拟器原生选择。
59
63
  fullscreen: true
60
64
  # Reasoning effort applied to every request, validated against the live
61
- # route's adapter levels (deepseek: off/high/max) — an unlisted level is
62
- # ignored and the adapter default applies. Wins over the persisted
63
- # Shift+Tab choice (~/.dsh-tui/effort.json); also seeds the startup
64
- # header/statusline until the first request header reports the live value.
65
+ # route's adapter levels. An unlisted level falls back to the adapter
66
+ # default; this wins over the persisted /effort choice and seeds the
67
+ # startup header/statusline.
65
68
  effort: max
66
69
  # Shift+Tab 会话模式循环(数组顺序即循环顺序;缺省为下面三档)。
67
70
  # 每档可声明 plan(计划模式开/关)、sandbox(read-only/
@@ -1,13 +1,13 @@
1
- import type { ApiReference, ProtocolCatalog, ProtocolDefinition } from '@dsh-std/core'
2
- export { registerTuiContributionExtensions } from './tui-contributions.js'
3
- export * from './tui-channel.js'
4
-
5
- export const DECISION_EVENTS: Readonly<ApiReference & {
6
- apiVersion: 'tui.dsh/v1alpha1'
7
- kind: 'DecisionEvents'
8
- }>
9
-
10
- export const decisionEventsDefinition: ProtocolDefinition
11
- export const profileDefinitions: readonly ProtocolDefinition[]
12
-
13
- export function registerProfileProtocols(catalog: ProtocolCatalog): () => void
1
+ import type { ApiReference, ProtocolCatalog, ProtocolDefinition } from '@dsh-std/core'
2
+ export { registerTuiContributionExtensions } from './tui-contributions.js'
3
+ export * from './tui-channel.js'
4
+
5
+ export const DECISION_EVENTS: Readonly<ApiReference & {
6
+ apiVersion: 'tui.dsh/v1alpha1'
7
+ kind: 'DecisionEvents'
8
+ }>
9
+
10
+ export const decisionEventsDefinition: ProtocolDefinition
11
+ export const profileDefinitions: readonly ProtocolDefinition[]
12
+
13
+ export function registerProfileProtocols(catalog: ProtocolCatalog): () => void
@@ -1,59 +1,59 @@
1
- /** dsh-TUI private protocol definitions evaluated by @dsh-std/core. */
2
-
3
- export { registerTuiContributionExtensions } from './tui-contributions.js'
4
- export * from './tui-channel.js'
5
- import { tuiChannelDefinition } from './tui-channel.js'
6
-
7
- export const DECISION_EVENTS = Object.freeze({
8
- apiVersion: 'tui.dsh/v1alpha1',
9
- kind: 'DecisionEvents',
10
- })
11
-
12
- function featureSupport(value, label) {
13
- if (value === undefined) return Object.freeze({ features: Object.freeze([]) })
14
- if (typeof value !== 'object' || value === null || Array.isArray(value)) {
15
- throw new TypeError(`${label} support spec must be an object`)
16
- }
17
- const unknown = Object.keys(value).filter(key => key !== 'features' && !key.startsWith('x-'))
18
- if (unknown.length > 0) throw new TypeError(`${label} support spec contains unknown field ${JSON.stringify(unknown[0])}`)
19
- if (value.features !== undefined && (!Array.isArray(value.features)
20
- || value.features.some(feature => typeof feature !== 'string' || feature.trim() === ''))) {
21
- throw new TypeError(`${label} support spec.features must be an array of non-empty strings`)
22
- }
23
- return Object.freeze({ features: Object.freeze([...(value.features ?? [])].sort()) })
24
- }
25
-
26
- function providerDefinition(reference, label) {
27
- return Object.freeze({
28
- ...reference,
29
- validateRequirement(value) {
30
- if (value !== undefined) throw new TypeError(`${label} requirement does not accept spec in manifest v0.15`)
31
- return undefined
32
- },
33
- validateSupport(value) { return featureSupport(value, label) },
34
- negotiate(input) {
35
- const providers = [...new Set(input.supports.map(row => row.participant))].sort()
36
- const issues = input.requirements.flatMap(row => providers.length === 0
37
- ? [{
38
- code: row.requirement.optional === true ? 'optional-support-missing' : 'required-support-missing',
39
- severity: row.requirement.optional === true ? 'warning' : 'error',
40
- participant: row.participant,
41
- message: `${label} has no provider in this negotiation scope`,
42
- }]
43
- : [])
44
- return { agreement: Object.freeze({ providers: Object.freeze(providers) }), issues: Object.freeze(issues) }
45
- },
46
- })
47
- }
48
-
49
- export const decisionEventsDefinition = providerDefinition(DECISION_EVENTS, 'DecisionEvents')
50
-
51
- export const profileDefinitions = Object.freeze([
52
- decisionEventsDefinition,
53
- tuiChannelDefinition,
54
- ])
55
-
56
- export function registerProfileProtocols(catalog) {
57
- const disposers = profileDefinitions.map(definition => catalog.register(definition))
58
- return () => { for (const dispose of disposers.reverse()) dispose() }
59
- }
1
+ /** dsh-TUI private protocol definitions evaluated by @dsh-std/core. */
2
+
3
+ export { registerTuiContributionExtensions } from './tui-contributions.js'
4
+ export * from './tui-channel.js'
5
+ import { tuiChannelDefinition } from './tui-channel.js'
6
+
7
+ export const DECISION_EVENTS = Object.freeze({
8
+ apiVersion: 'tui.dsh/v1alpha1',
9
+ kind: 'DecisionEvents',
10
+ })
11
+
12
+ function featureSupport(value, label) {
13
+ if (value === undefined) return Object.freeze({ features: Object.freeze([]) })
14
+ if (typeof value !== 'object' || value === null || Array.isArray(value)) {
15
+ throw new TypeError(`${label} support spec must be an object`)
16
+ }
17
+ const unknown = Object.keys(value).filter(key => key !== 'features' && !key.startsWith('x-'))
18
+ if (unknown.length > 0) throw new TypeError(`${label} support spec contains unknown field ${JSON.stringify(unknown[0])}`)
19
+ if (value.features !== undefined && (!Array.isArray(value.features)
20
+ || value.features.some(feature => typeof feature !== 'string' || feature.trim() === ''))) {
21
+ throw new TypeError(`${label} support spec.features must be an array of non-empty strings`)
22
+ }
23
+ return Object.freeze({ features: Object.freeze([...(value.features ?? [])].sort()) })
24
+ }
25
+
26
+ function providerDefinition(reference, label) {
27
+ return Object.freeze({
28
+ ...reference,
29
+ validateRequirement(value) {
30
+ if (value !== undefined) throw new TypeError(`${label} requirement does not accept spec in manifest v0.15`)
31
+ return undefined
32
+ },
33
+ validateSupport(value) { return featureSupport(value, label) },
34
+ negotiate(input) {
35
+ const providers = [...new Set(input.supports.map(row => row.participant))].sort()
36
+ const issues = input.requirements.flatMap(row => providers.length === 0
37
+ ? [{
38
+ code: row.requirement.optional === true ? 'optional-support-missing' : 'required-support-missing',
39
+ severity: row.requirement.optional === true ? 'warning' : 'error',
40
+ participant: row.participant,
41
+ message: `${label} has no provider in this negotiation scope`,
42
+ }]
43
+ : [])
44
+ return { agreement: Object.freeze({ providers: Object.freeze(providers) }), issues: Object.freeze(issues) }
45
+ },
46
+ })
47
+ }
48
+
49
+ export const decisionEventsDefinition = providerDefinition(DECISION_EVENTS, 'DecisionEvents')
50
+
51
+ export const profileDefinitions = Object.freeze([
52
+ decisionEventsDefinition,
53
+ tuiChannelDefinition,
54
+ ])
55
+
56
+ export function registerProfileProtocols(catalog) {
57
+ const disposers = profileDefinitions.map(definition => catalog.register(definition))
58
+ return () => { for (const dispose of disposers.reverse()) dispose() }
59
+ }
@@ -1,15 +1,15 @@
1
- export const TUI_CHANNEL_HTTP_API_VERSION: 'tui.dsh/v1alpha1'
2
- export const TUI_CHANNEL_HTTP_KIND: 'ChannelEndpoint'
3
- export const TUI_CHANNEL_HTTP_HEALTH_PATH: '/dsh-tui/v1/health'
4
- export const TUI_CHANNEL_HTTP_DESCRIPTOR_PATH: '/dsh-tui/v1/endpoint'
5
- export const TUI_CHANNEL_HTTP_WEBSOCKET_PATH: '/dsh-tui/v1/connection'
6
-
7
- export interface TuiChannelEndpointDescriptor {
8
- readonly apiVersion: typeof TUI_CHANNEL_HTTP_API_VERSION
9
- readonly kind: typeof TUI_CHANNEL_HTTP_KIND
10
- readonly origin: string
11
- readonly connection: typeof TUI_CHANNEL_HTTP_WEBSOCKET_PATH
12
- }
13
-
14
- export function createTuiChannelEndpointDescriptor(origin: string): TuiChannelEndpointDescriptor
15
- export function validateTuiChannelEndpointDescriptor(value: unknown): TuiChannelEndpointDescriptor
1
+ export const TUI_CHANNEL_HTTP_API_VERSION: 'tui.dsh/v1alpha1'
2
+ export const TUI_CHANNEL_HTTP_KIND: 'ChannelEndpoint'
3
+ export const TUI_CHANNEL_HTTP_HEALTH_PATH: '/dsh-tui/v1/health'
4
+ export const TUI_CHANNEL_HTTP_DESCRIPTOR_PATH: '/dsh-tui/v1/endpoint'
5
+ export const TUI_CHANNEL_HTTP_WEBSOCKET_PATH: '/dsh-tui/v1/connection'
6
+
7
+ export interface TuiChannelEndpointDescriptor {
8
+ readonly apiVersion: typeof TUI_CHANNEL_HTTP_API_VERSION
9
+ readonly kind: typeof TUI_CHANNEL_HTTP_KIND
10
+ readonly origin: string
11
+ readonly connection: typeof TUI_CHANNEL_HTTP_WEBSOCKET_PATH
12
+ }
13
+
14
+ export function createTuiChannelEndpointDescriptor(origin: string): TuiChannelEndpointDescriptor
15
+ export function validateTuiChannelEndpointDescriptor(value: unknown): TuiChannelEndpointDescriptor