@deepseek-harness-tui/dsh-tui 0.10.1 → 0.11.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 (321) hide show
  1. package/README.md +175 -269
  2. package/bin/dsh-tui.js +748 -22
  3. package/cordis.patch.yml +38 -10
  4. package/cordis.yml +2 -0
  5. package/lib/types/adapter/channel/session-projection.d.ts.map +1 -1
  6. package/lib/types/adapter/channel/session-projection.js +2 -0
  7. package/lib/types/adapter/channel/ui-policy.d.ts +4 -1
  8. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
  9. package/lib/types/adapter/channel/ui-policy.js +5 -1
  10. package/lib/types/adapter/kernel/host-facade.d.ts.map +1 -1
  11. package/lib/types/adapter/kernel/host-facade.js +1 -0
  12. package/lib/types/adapter/kernel/replay.d.ts.map +1 -1
  13. package/lib/types/adapter/kernel/replay.js +3 -0
  14. package/lib/types/adapter/kernel/runtime.d.ts.map +1 -1
  15. package/lib/types/adapter/kernel/runtime.js +2 -0
  16. package/lib/types/adapter/kernel/slices/workspace.d.ts.map +1 -1
  17. package/lib/types/adapter/kernel/slices/workspace.js +1 -0
  18. package/lib/types/adapter/ports/channel-session.d.ts +3 -1
  19. package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
  20. package/lib/types/adapter/ports/channel-ui.d.ts +22 -2
  21. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  22. package/lib/types/adapter/ports/channel-view.d.ts +66 -0
  23. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  24. package/lib/types/adapter/ports/channel-workspace.d.ts +23 -0
  25. package/lib/types/adapter/ports/channel-workspace.d.ts.map +1 -1
  26. package/lib/types/adapter/ports/workspace.d.ts +2 -0
  27. package/lib/types/adapter/ports/workspace.d.ts.map +1 -1
  28. package/lib/types/adapter/upstream/workspace-driver.d.ts.map +1 -1
  29. package/lib/types/adapter/upstream/workspace-driver.js +10 -2
  30. package/lib/types/commands.d.ts.map +1 -1
  31. package/lib/types/commands.js +1 -0
  32. package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
  33. package/lib/types/components/Chat/JobCard.js +8 -1
  34. package/lib/types/components/ContextBarView.d.ts +15 -7
  35. package/lib/types/components/ContextBarView.d.ts.map +1 -1
  36. package/lib/types/components/ContextBarView.js +26 -22
  37. package/lib/types/components/ImagePreviewOverlay.d.ts.map +1 -1
  38. package/lib/types/components/ImagePreviewOverlay.js +11 -5
  39. package/lib/types/components/Markdown.d.ts +13 -3
  40. package/lib/types/components/Markdown.d.ts.map +1 -1
  41. package/lib/types/components/Markdown.js +47 -4
  42. package/lib/types/components/MermaidDiagram.d.ts +13 -0
  43. package/lib/types/components/MermaidDiagram.d.ts.map +1 -0
  44. package/lib/types/components/MermaidDiagram.js +61 -0
  45. package/lib/types/components/MessageList.d.ts +26 -1
  46. package/lib/types/components/MessageList.d.ts.map +1 -1
  47. package/lib/types/components/MessageList.js +82 -16
  48. package/lib/types/components/PageMargin.d.ts +1 -1
  49. package/lib/types/components/PromptInput.d.ts +37 -1
  50. package/lib/types/components/PromptInput.d.ts.map +1 -1
  51. package/lib/types/components/PromptInput.js +243 -28
  52. package/lib/types/components/ScrollbarGutter.d.ts +20 -5
  53. package/lib/types/components/ScrollbarGutter.d.ts.map +1 -1
  54. package/lib/types/components/ScrollbarGutter.js +88 -10
  55. package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
  56. package/lib/types/components/StreamingMarkdown.js +88 -34
  57. package/lib/types/components/Tooltip.d.ts.map +1 -1
  58. package/lib/types/components/Tooltip.js +45 -7
  59. package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
  60. package/lib/types/components/messages/UserPromptMessage.js +5 -7
  61. package/lib/types/components/messages/useImageInspection.d.ts.map +1 -1
  62. package/lib/types/components/messages/useImageInspection.js +19 -9
  63. package/lib/types/components/promptDraftCache.d.ts +102 -0
  64. package/lib/types/components/promptDraftCache.d.ts.map +1 -0
  65. package/lib/types/components/promptDraftCache.js +76 -0
  66. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +17 -1
  67. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
  68. package/lib/types/components/questions/AskUserQuestionPanel.js +40 -7
  69. package/lib/types/components/questions/QuestionMinimizedBar.d.ts +12 -0
  70. package/lib/types/components/questions/QuestionMinimizedBar.d.ts.map +1 -0
  71. package/lib/types/components/questions/QuestionMinimizedBar.js +43 -0
  72. package/lib/types/components/sessions/SessionListRow.d.ts +23 -1
  73. package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
  74. package/lib/types/components/sessions/SessionListRow.js +52 -5
  75. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +49 -0
  76. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -0
  77. package/lib/types/components/workspaces/HomeWorkspaceRow.js +50 -0
  78. package/lib/types/dsh-adapter/bundled-presets.d.ts +10 -0
  79. package/lib/types/dsh-adapter/bundled-presets.d.ts.map +1 -0
  80. package/lib/types/dsh-adapter/bundled-presets.js +80 -0
  81. package/lib/types/dsh-adapter/channel/action-readiness.d.ts +1 -1
  82. package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
  83. package/lib/types/dsh-adapter/channel/action-readiness.js +3 -0
  84. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +1 -1
  85. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -1
  86. package/lib/types/dsh-adapter/channel/agent-view-projection.js +19 -2
  87. package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
  88. package/lib/types/dsh-adapter/channel/background-action.js +52 -29
  89. package/lib/types/dsh-adapter/channel/binding-events.d.ts +5 -0
  90. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
  91. package/lib/types/dsh-adapter/channel/binding-events.js +12 -2
  92. package/lib/types/dsh-adapter/channel/binding.d.ts +19 -2
  93. package/lib/types/dsh-adapter/channel/binding.d.ts.map +1 -1
  94. package/lib/types/dsh-adapter/channel/binding.js +78 -18
  95. package/lib/types/dsh-adapter/channel/composer-images.d.ts +5 -0
  96. package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
  97. package/lib/types/dsh-adapter/channel/composer-images.js +105 -6
  98. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +8 -0
  99. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
  100. package/lib/types/dsh-adapter/channel/context-bookkeeping.js +3 -2
  101. package/lib/types/dsh-adapter/channel/ide-selection.d.ts +58 -0
  102. package/lib/types/dsh-adapter/channel/ide-selection.d.ts.map +1 -0
  103. package/lib/types/dsh-adapter/channel/ide-selection.js +226 -0
  104. package/lib/types/dsh-adapter/channel/input-delivery.d.ts +11 -3
  105. package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
  106. package/lib/types/dsh-adapter/channel/input-delivery.js +80 -8
  107. package/lib/types/dsh-adapter/channel/local-actions.d.ts +3 -19
  108. package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
  109. package/lib/types/dsh-adapter/channel/local-actions.js +2 -1
  110. package/lib/types/dsh-adapter/channel/model-actions.d.ts +4 -1
  111. package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
  112. package/lib/types/dsh-adapter/channel/model-actions.js +82 -6
  113. package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
  114. package/lib/types/dsh-adapter/channel/model-switch.js +49 -31
  115. package/lib/types/dsh-adapter/channel/permissions.d.ts.map +1 -1
  116. package/lib/types/dsh-adapter/channel/permissions.js +10 -7
  117. package/lib/types/dsh-adapter/channel/projection.d.ts +4 -0
  118. package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
  119. package/lib/types/dsh-adapter/channel/projection.js +29 -19
  120. package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -1
  121. package/lib/types/dsh-adapter/channel/reports.js +4 -12
  122. package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
  123. package/lib/types/dsh-adapter/channel/session-fork.js +26 -2
  124. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +3 -0
  125. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
  126. package/lib/types/dsh-adapter/channel/session-live-adoption.js +1 -0
  127. package/lib/types/dsh-adapter/channel/session-metadata.d.ts +10 -0
  128. package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
  129. package/lib/types/dsh-adapter/channel/session-metadata.js +2 -2
  130. package/lib/types/dsh-adapter/channel/session-resume.d.ts +11 -2
  131. package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
  132. package/lib/types/dsh-adapter/channel/session-resume.js +291 -94
  133. package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
  134. package/lib/types/dsh-adapter/channel/session-rewind.js +42 -17
  135. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
  136. package/lib/types/dsh-adapter/channel/session-tree-actions.js +28 -6
  137. package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
  138. package/lib/types/dsh-adapter/channel/settings-host.js +4 -3
  139. package/lib/types/dsh-adapter/channel/skill-catalog.d.ts +8 -2
  140. package/lib/types/dsh-adapter/channel/skill-catalog.d.ts.map +1 -1
  141. package/lib/types/dsh-adapter/channel/skill-catalog.js +49 -17
  142. package/lib/types/dsh-adapter/channel/state.d.ts +1 -1
  143. package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
  144. package/lib/types/dsh-adapter/channel/state.js +1 -1
  145. package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
  146. package/lib/types/dsh-adapter/channel/transcript.js +6 -12
  147. package/lib/types/dsh-adapter/channel/types.d.ts +6 -1
  148. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
  149. package/lib/types/dsh-adapter/channel/workspace-actions.d.ts +4 -1
  150. package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -1
  151. package/lib/types/dsh-adapter/channel/workspace-actions.js +41 -1
  152. package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
  153. package/lib/types/dsh-adapter/channel.js +72 -8
  154. package/lib/types/dsh-adapter/compat/liveSession.d.ts +5 -3
  155. package/lib/types/dsh-adapter/compat/liveSession.d.ts.map +1 -1
  156. package/lib/types/dsh-adapter/compat/liveSession.js +5 -3
  157. package/lib/types/dsh-adapter/compat/messages.d.ts +15 -0
  158. package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -0
  159. package/lib/types/dsh-adapter/compat/messages.js +15 -0
  160. package/lib/types/dsh-adapter/compat/settings.d.ts +33 -0
  161. package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -0
  162. package/lib/types/dsh-adapter/compat/settings.js +43 -0
  163. package/lib/types/dsh-adapter/compat/shell.d.ts +25 -0
  164. package/lib/types/dsh-adapter/compat/shell.d.ts.map +1 -0
  165. package/lib/types/dsh-adapter/compat/shell.js +11 -0
  166. package/lib/types/dsh-adapter/contract.d.ts +4 -4
  167. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  168. package/lib/types/dsh-adapter/contract.js +15 -6
  169. package/lib/types/dsh-adapter/ide-channel.d.ts +224 -0
  170. package/lib/types/dsh-adapter/ide-channel.d.ts.map +1 -0
  171. package/lib/types/dsh-adapter/ide-channel.js +556 -0
  172. package/lib/types/dsh-adapter/index.d.ts +18 -3
  173. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  174. package/lib/types/dsh-adapter/index.js +32 -5
  175. package/lib/types/dsh-adapter/plugin.d.ts +5 -2
  176. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  177. package/lib/types/dsh-adapter/plugin.js +173 -42
  178. package/lib/types/dsh-adapter/preset-resolution.d.ts +8 -0
  179. package/lib/types/dsh-adapter/preset-resolution.d.ts.map +1 -1
  180. package/lib/types/dsh-adapter/preset-resolution.js +10 -0
  181. package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts +53 -0
  182. package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts.map +1 -0
  183. package/lib/types/dsh-adapter/session-mount-heartbeat.js +100 -0
  184. package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -1
  185. package/lib/types/dsh-adapter/sessionTree.js +3 -2
  186. package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -1
  187. package/lib/types/dsh-adapter/sessions/digest.js +40 -19
  188. package/lib/types/dsh-adapter/sessions/frames.js +2 -0
  189. package/lib/types/dsh-adapter/sessions/list.js +3 -3
  190. package/lib/types/dsh-adapter/sessions/store.d.ts +2 -2
  191. package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
  192. package/lib/types/dsh-adapter/sessions/store.js +12 -11
  193. package/lib/types/dsh-adapter/sessions/types.d.ts +2 -0
  194. package/lib/types/dsh-adapter/sessions/types.d.ts.map +1 -1
  195. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
  196. package/lib/types/dsh-adapter/subagents.js +6 -5
  197. package/lib/types/dsh-adapter/workspaces.d.ts +46 -3
  198. package/lib/types/dsh-adapter/workspaces.d.ts.map +1 -1
  199. package/lib/types/dsh-adapter/workspaces.js +116 -0
  200. package/lib/types/effortPrefs.d.ts +15 -3
  201. package/lib/types/effortPrefs.d.ts.map +1 -1
  202. package/lib/types/effortPrefs.js +37 -3
  203. package/lib/types/homePrefs.d.ts +15 -0
  204. package/lib/types/homePrefs.d.ts.map +1 -0
  205. package/lib/types/homePrefs.js +53 -0
  206. package/lib/types/i18n.d.ts +257 -296
  207. package/lib/types/i18n.d.ts.map +1 -1
  208. package/lib/types/i18n.js +78 -84
  209. package/lib/types/ink/colorize.d.ts +10 -0
  210. package/lib/types/ink/colorize.d.ts.map +1 -1
  211. package/lib/types/ink/colorize.js +21 -0
  212. package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
  213. package/lib/types/ink/components/ScrollBox.js +41 -33
  214. package/lib/types/ink/dom.d.ts +1 -0
  215. package/lib/types/ink/dom.d.ts.map +1 -1
  216. package/lib/types/ink/dom.js +32 -64
  217. package/lib/types/ink/get-max-width.d.ts +7 -15
  218. package/lib/types/ink/get-max-width.d.ts.map +1 -1
  219. package/lib/types/ink/get-max-width.js +7 -20
  220. package/lib/types/ink/hooks/use-copy-on-select.d.ts +5 -1
  221. package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -1
  222. package/lib/types/ink/hooks/use-copy-on-select.js +15 -1
  223. package/lib/types/ink/ink.d.ts +1 -0
  224. package/lib/types/ink/ink.d.ts.map +1 -1
  225. package/lib/types/ink/ink.js +58 -4
  226. package/lib/types/ink/layout/node.d.ts +2 -0
  227. package/lib/types/ink/layout/node.d.ts.map +1 -1
  228. package/lib/types/ink/layout/yoga.d.ts +1 -0
  229. package/lib/types/ink/layout/yoga.d.ts.map +1 -1
  230. package/lib/types/ink/layout/yoga.js +3 -0
  231. package/lib/types/ink/node-cache.d.ts +11 -0
  232. package/lib/types/ink/node-cache.d.ts.map +1 -1
  233. package/lib/types/ink/node-cache.js +3 -0
  234. package/lib/types/ink/output.d.ts +16 -2
  235. package/lib/types/ink/output.d.ts.map +1 -1
  236. package/lib/types/ink/output.js +163 -81
  237. package/lib/types/ink/render-border.d.ts +6 -1
  238. package/lib/types/ink/render-border.d.ts.map +1 -1
  239. package/lib/types/ink/render-border.js +25 -9
  240. package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
  241. package/lib/types/ink/render-node-to-output.js +140 -73
  242. package/lib/types/ink/renderer.d.ts +6 -0
  243. package/lib/types/ink/renderer.d.ts.map +1 -1
  244. package/lib/types/ink/renderer.js +2 -1
  245. package/lib/types/ink/selection.d.ts +60 -0
  246. package/lib/types/ink/selection.d.ts.map +1 -1
  247. package/lib/types/ink/selection.js +129 -0
  248. package/lib/types/ink/sixel-graphics.d.ts +19 -1
  249. package/lib/types/ink/sixel-graphics.d.ts.map +1 -1
  250. package/lib/types/ink/sixel-graphics.js +124 -12
  251. package/lib/types/ink/tabstops.d.ts +3 -2
  252. package/lib/types/ink/tabstops.d.ts.map +1 -1
  253. package/lib/types/ink/tabstops.js +5 -4
  254. package/lib/types/ink/terminal-image.d.ts +18 -1
  255. package/lib/types/ink/terminal-image.d.ts.map +1 -1
  256. package/lib/types/ink/terminal.d.ts +17 -0
  257. package/lib/types/ink/terminal.d.ts.map +1 -1
  258. package/lib/types/ink/terminal.js +20 -1
  259. package/lib/types/ink/wrap-text.js +2 -2
  260. package/lib/types/native-ts/yoga-layout/index.d.ts +8 -3
  261. package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -1
  262. package/lib/types/native-ts/yoga-layout/index.js +23 -8
  263. package/lib/types/screens/Chat.d.ts +17 -1
  264. package/lib/types/screens/Chat.d.ts.map +1 -1
  265. package/lib/types/screens/Chat.js +303 -79
  266. package/lib/types/screens/SessionSupervisor.d.ts +84 -0
  267. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -0
  268. package/lib/types/screens/SessionSupervisor.js +350 -0
  269. package/lib/types/screens/SessionTree.js +2 -2
  270. package/lib/types/screens/Settings.d.ts.map +1 -1
  271. package/lib/types/screens/Settings.js +32 -9
  272. package/lib/types/screens/StatusLine.d.ts +13 -0
  273. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  274. package/lib/types/screens/StatusLine.js +36 -17
  275. package/lib/types/screens/StatusMetrics.d.ts +79 -22
  276. package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
  277. package/lib/types/screens/StatusMetrics.js +153 -88
  278. package/lib/types/screens/sessionSupervisor/model.d.ts +83 -0
  279. package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -0
  280. package/lib/types/screens/sessionSupervisor/model.js +69 -0
  281. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +120 -0
  282. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -0
  283. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +593 -0
  284. package/lib/types/sessionMounts.d.ts +272 -0
  285. package/lib/types/sessionMounts.d.ts.map +1 -0
  286. package/lib/types/sessionMounts.js +706 -0
  287. package/lib/types/sessions/format.d.ts.map +1 -1
  288. package/lib/types/sessions/format.js +4 -1
  289. package/lib/types/sessions/resumeFailure.d.ts +38 -0
  290. package/lib/types/sessions/resumeFailure.d.ts.map +1 -0
  291. package/lib/types/sessions/resumeFailure.js +58 -0
  292. package/lib/types/terminal-utils/mermaid.d.ts +44 -0
  293. package/lib/types/terminal-utils/mermaid.d.ts.map +1 -0
  294. package/lib/types/terminal-utils/mermaid.js +83 -0
  295. package/lib/types/tips.d.ts.map +1 -1
  296. package/lib/types/tips.js +175 -19
  297. package/lib/types/tuiDisplayPrefs.d.ts +7 -9
  298. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
  299. package/lib/types/tuiDisplayPrefs.js +31 -28
  300. package/lib/types/update.d.ts +61 -0
  301. package/lib/types/update.d.ts.map +1 -1
  302. package/lib/types/update.js +194 -0
  303. package/lib/types/utils/imageResize.d.ts +90 -0
  304. package/lib/types/utils/imageResize.d.ts.map +1 -0
  305. package/lib/types/utils/imageResize.js +272 -0
  306. package/lib/types/utils/keymap.d.ts +5 -1
  307. package/lib/types/utils/keymap.d.ts.map +1 -1
  308. package/lib/types/utils/keymap.js +23 -0
  309. package/lib/types/workspaces.d.ts +2 -1
  310. package/lib/types/workspaces.d.ts.map +1 -1
  311. package/lib/types/workspaces.js +1 -1
  312. package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +10 -10
  313. package/package.json +121 -103
  314. package/presets/liangshen/.dsh-tui-managed.json +1 -1
  315. package/presets/liangshen/agent.cordis.yml +15 -0
  316. package/lib/types/screens/AgentView.d.ts +0 -23
  317. package/lib/types/screens/AgentView.d.ts.map +0 -1
  318. package/lib/types/screens/AgentView.js +0 -546
  319. package/lib/types/screens/SessionBrowser.d.ts +0 -42
  320. package/lib/types/screens/SessionBrowser.d.ts.map +0 -1
  321. package/lib/types/screens/SessionBrowser.js +0 -911
package/README.md CHANGED
@@ -1,357 +1,263 @@
1
-
2
1
  <p align="center">
3
2
  <img src="docs/assets/logo.svg" alt="dsh-TUI - DeepSeek Harness terminal interface" width="560">
4
3
  </p>
4
+
5
5
  <p align="center">
6
- <strong>简体中文</strong> | <a href="README_EN.md">English</a>
6
+ <strong>English</strong> | <a href="README_ZH.md">简体中文</a>
7
7
  </p>
8
8
 
9
-
10
9
  <p align="center">
11
10
  <a href="https://www.npmjs.com/package/@deepseek-harness-tui/dsh-tui"><img alt="npm" src="https://img.shields.io/npm/v/@deepseek-harness-tui/dsh-tui?style=flat-square&color=4b6fff"></a>
12
11
  <a href="https://github.com/ccch1mneyyy/dsh-TUI/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/ccch1mneyyy/dsh-TUI/actions/workflows/ci.yml/badge.svg"></a>
13
12
  <a href="LICENSE"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-263146?style=flat-square"></a>
14
13
  <img alt="Public beta" src="https://img.shields.io/badge/status-public%20beta-7da1de?style=flat-square">
15
- <img alt="官方收录" src="https://img.shields.io/badge/DeepSeek%20Harness%20官方公众号-收录-brightgreen">
14
+ <a href="https://github.com/ccch1mneyyy/dsh-TUI/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/ccch1mneyyy/dsh-TUI?style=flat-square&color=4b6fff"></a>
15
+ <a href="https://www.npmjs.com/package/@deepseek-harness-tui/dsh-tui"><img alt="npm downloads" src="https://img.shields.io/npm/dm/@deepseek-harness-tui/dsh-tui?style=flat-square&color=4b6fff"></a>
16
16
  </p>
17
17
 
18
18
  # dsh-TUI
19
19
 
20
- >一个面向 DeepSeek Harness 的交互式终端界面插件:提供像素鲸鱼顶栏、实时工作状态行、流式思考展示、双击 Esc 时间回溯、上下文进度条与 TPS 仪表。
21
- >零核心改动,纯插件挂载。安装插件即可启用,卸载后不会留下核心补丁。
22
- >
23
- >An interactive terminal UI plugin for DeepSeek Harness: pixel-whale header, live work status, streaming thinking display, double-Esc time rewind, a context progress bar, and a TPS gauge.
24
- >Zero core changes, pure plugin mounting. Install to enable; uninstall leaves no core patches.
20
+ > An interactive terminal UI plugin for DeepSeek Harness. It ships a
21
+ > pixel-whale header, live work status, streaming thinking, double-Esc time
22
+ > rewind, a context progress bar, and a TPS gauge. It mounts as a pure plugin,
23
+ > with no core changes. Install to enable; uninstall leaves no patches behind.
25
24
 
26
- ## 🎉 官方收录
25
+ ## Highlights
27
26
 
28
- 本插件被 **DeepSeek Harness 官方公众号** 推文收录,也被 [dshfind](https://dshfind.com/ccch1mneyyy/dsh-TUI) 插件目录与 [GitHub Trending](https://trendshift.io/repositories/146168) 收录,同时登上了Github Treding日榜第七
27
+ - **Pixel whale pet** — three startup intros, click to wake; freezes after the first task.
28
+ - **Terminal-native UI** — streaming Markdown, tool cards, `/` and `@` completion, `#L12-14` ranges, history search, zh/en UI.
29
+ - **Images** — Kitty/Sixel thumbnails, centered preview with zoom and pan, paste-time fitting, text fallback.
30
+ - **Mermaid diagrams** — ```` ```mermaid ```` fences drawn as Unicode diagrams.
31
+ - **Timeline rail** — every turn clickable; timeline / scrollbar / hidden gutter.
32
+ - **Live state** — activity animation, context bar, TPS, cache hit rate, effort, tokens, Git and session metadata.
33
+ - **One session manager** — `/resume` `/home` `/agentview` `/bg` `⌸`.
34
+ - **Session workflow** — `/new` `/compact` `/export` `/btw`, model hot-switch, fork, rewind, vim, fullscreen draft editor.
35
+ - **IDE selection channel** — a VS Code selection lands in the prompt.
36
+ - **DSH integrations** — presets, skills, MCP, goals, todos, subagents, questionnaires.
37
+ - **Extensions** — browser interaction, computer use and more.
38
+ - **Built for long sessions** — event-driven projection, virtualization, bounded caches.
39
+
40
+ Keys and commands: [Interaction and commands](docs/interaction.en.md). Everything else: [documentation index](docs/README.md).
41
+
42
+ ## Preview
29
43
 
30
44
  <div align="center">
31
45
  <table>
32
46
  <tr>
33
47
  <td align="center" valign="middle" width="50%">
34
- <img src="screenshots/wechat-official.png" alt="DeepSeek Harness 官方公众号推文收录 dsh-TUI" width="480">
48
+ <img src="screenshots/splash.png" alt="dsh-TUI conversation with the pixel-whale header" width="480">
35
49
  <br>
36
- <strong>DeepSeek Harness 官方公众号推文收录</strong>
50
+ <strong>Conversation with the pixel-whale header</strong>
37
51
  </td>
38
52
  <td align="center" valign="middle" width="50%">
39
- <a href="https://dshfind.com/ccch1mneyyy/dsh-TUI"><img src="https://dshfind.com/api/card/ccch1mneyyy/dsh-TUI?lang=zh" alt="dsh-TUI on dshfind" width="420"></a>
53
+ <img src="screenshots/ide-selection-badge.png" alt="IDE selection badge: live line count under the prompt" width="480">
40
54
  <br>
41
- <strong>dshfind 插件目录收录</strong>
42
- <br><br>
43
- <a href="https://trendshift.io/repositories/146168" title="GitHub Trending 日榜 #7 · TypeScript 口径"><img alt="Trendshift" src="https://trendshift.io/api/badge/trendshift/repositories/146168/daily?language=TypeScript"></a>
44
- <br>
45
- <strong>dshfind Github Treding榜第七 </strong>
55
+ <strong>Live IDE selection badge</strong>
46
56
  </td>
47
57
  </tr>
48
58
  </table>
49
59
  </div>
50
60
 
51
- ## 核心能力
61
+ ## Featured & Listed
52
62
 
53
- Windows Terminal 支持 Sixel 时,全屏会话记录可直接显示内嵌缩略图,点击后打开大图预览;非全屏 inline 模式仍保留文字回退。
54
- Sixel 使用最多 256 色的自适应调色板,透明像素与背景合成;Worker 缓存量化结果,滚动时仅编码可见部分,移出视野或被浮层覆盖时擦除旧图。
55
- 附件读取与解码最多两路并发;最后一个使用者离开后取消读取,未启动的解码不再执行。多图缓存、排队任务与单帧传输均有容量上限,超限时保留文字回退。
56
- 自动探测优先 Kitty,其次使用 DA1 声明的 Sixel 能力。`DSH_TUI_IMAGE_PROTOCOL=auto|kitty|sixel|none` 可覆盖协议选择;
57
- `DSH_TUI_DISABLE_TERMINAL_IMAGES=1`、无障碍模式、非 TTY 输出以及 tmux/screen 仍禁用图形。
58
- 缺少图片依赖或编码失败时保留文字回退;强制协议也不会启用 inline Sixel。
59
- 浅色主题的面板和图片预览默认使用白底,图片预览边框使用中性色。
60
- 大图预览以对话区约 95% 宽高为预算,最长边可达 2048 像素,仍限制总像素量和后台开销;缩略图大小不变。
61
- 预览支持适应窗口、100% 原像素与 200%/400%/800% 放大,拖动、滚轮或方向按钮平移;100% 需终端报告字符格像素尺寸。
62
- 底部「打开原图」链接直接调用系统看图程序,打开未经重编码的原始附件,包括从历史会话恢复的图片。
63
- 大图弹窗用 `←`/`→` 或底部 `‹`/`›` 切换上一张、下一张,显示当前张数,首尾不循环;切图回到适应窗口。
64
-
65
- - **终端交互**:低资源占用,长会话稳定可靠;多种主题切换,样式美观,实时显示工作状态、TPS、缓存命中率等
66
- 推理等级、输入/输出 token 与 Git/会话信息;终端卡多行命令可经 `/settings` 折叠为首行 + 计数提示(Ctrl+O 或点击卡片展开);全屏模式下悬停在截断的工具卡标题、用户消息或会话标题上约 600ms,浮层显示完整内容。
67
- 用户附图及助手/工具结果中的持久图片块会直接显示在会话记录中;Kitty graphics 或 Sixel 可用时显示等比缩略图,否则保留同尺寸文字回退。全屏下点击输入框 `[Image #N]` 或 transcript 缩略图在对话区域居中打开大图预览,卡片外的对话文字变暗,不遮挡输入栏(Esc/点击外部关闭),标题为 `Image #N — 格式 · 尺寸 · 体积 · 文件名`,本会话暂存的图片在卡片底行显示来源路径;Finder 复制的图片文件粘贴时直接入附件库为 `[Image #N]`;输入框里的 `[Image #N]` 是一个整体,光标整体跳过、删除整体生效,光标落在其上时整块反显并自动打开预览、离开时关闭。Vim 的 `x`/`X`/`d…` 同样整张删除,`u` 同时恢复文字与附件;撤销仅限当前草稿。
68
- 终端图片预览默认开启,可在 `/settings → 终端图片预览` 或配置 `terminalImages: false` 中关闭,使用 `/restart` 后生效。已保存的 `/settings` 选择优先于 Cordis 配置;若曾保存为开启,请在 `/settings` 中关闭后再 `/restart`。关闭时保留文字信息并跳过预览解码,不影响向模型发送图片;`DSH_TUI_DISABLE_TERMINAL_IMAGES=1` 始终强制关闭预览。
69
- - **功能全面**:`/resume` 按工作目录分类浏览、搜索与预览历史会话(左键恢复、右键弹出操作菜单;可固定常用会话——「已固定」分组置顶显示,行内 ★ 或 `Ctrl+P` 切换,持久化到 `~/.dsh-tui`),另有 `/agentview` 会话总览(空输入 `←` 一键后台化,后台会话派发、预览、回复与停止一站式管理)、`/new`、`/compact`、`/export`、`/btw`,模型热切换(新会话默认推理强度可在 /settings → 默认推理强度 预设),原生subagent,会话fork,自动更新,输入框 `/vim` vim 编辑模式、鼠标选区编辑(拖选高亮、Shift+click 扩展、双击选词、Ctrl+C 复制选区)与全屏草稿编辑(`Ctrl+Shift+E` 或输入行 `⛶` 按钮:行号 + 当前行高亮、Enter 换行、Ctrl+Enter 发送、滚轮滚动、点击/拖选,长草稿独占整屏;`/settings` 可关);可在vs code中[以vscode插件形式启动](docs/vscode.md),已上架 VS Code Marketplace。
70
- - **扩展丰富**:原生浏览器交互,compter use等大量附属功能性扩展
71
- - **技能归 DSH 管理**:`/skills` 展示当前 profile、用户与项目发现的技能;dsh-TUI 不预装通用技能。
72
- - **工作状态动画**:默认使用 `moon8`;读取旧版本地配置中的 `claude` 值时自动映射为 `moon8`,选择器只显示当前预设。
73
- - **像素鲸鱼娘**:开屏随机三选一开场动画;欢迎期(开始第一个任务前)可**点击冒爱心并唤醒睡着的鲸鱼**,闲置时摆鱼鳍、拍尾巴、入睡冒 Z(`/settings → whaleIdle` 可关)。**开始第一个任务后永久定格为静态标准帧**,零持续开销。鲸鱼娘的 22 帧手绘原图与闲置行为移植自 [dsh-ui-whale](https://github.com/lhh010/dsh-ui-whale)(作者 [@lhh010](https://github.com/lhh010)),特此致谢。
74
-
75
-
76
-
77
- ## 界面预览
63
+ Featured by the **DeepSeek Harness official WeChat account**, listed in the
64
+ [dshfind](https://dshfind.com/en/plugins/ccch1mneyyy/dsh-TUI) plugin
65
+ directory, and ranked **#7 on [GitHub Trending](https://trendshift.io/repositories/146168)
66
+ daily** (TypeScript).
78
67
 
79
68
  <div align="center">
80
69
  <table>
81
70
  <tr>
82
71
  <td align="center" valign="middle" width="50%">
83
- <img src="screenshots/splash.png" alt="首屏:像素鲸鱼顶栏" width="480">
72
+ <img src="screenshots/wechat-official.png" alt="dsh-TUI featured by the DeepSeek Harness official WeChat account" width="480">
84
73
  <br>
85
- <strong>首屏:像素鲸鱼顶栏</strong>
74
+ <strong>Featured by the official WeChat account</strong>
75
+ </td>
76
+ <td align="center" valign="middle" width="50%">
77
+ <a href="https://dshfind.com/en/plugins/ccch1mneyyy/dsh-TUI"><img src="https://dshfind.com/api/card/ccch1mneyyy/dsh-TUI?lang=en" alt="dsh-TUI on dshfind" width="420"></a>
78
+ <br>
79
+ <strong>Listed in the dshfind directory</strong>
80
+ <br><br>
81
+ <a href="https://trendshift.io/repositories/146168" title="GitHub Trending Daily #7 · TypeScript"><img alt="Trendshift" src="https://trendshift.io/api/badge/trendshift/repositories/146168/daily?language=TypeScript"></a>
82
+ <br>
83
+ <strong>GitHub Trending Daily #7</strong>
86
84
  </td>
87
85
  </tr>
88
86
  </table>
89
87
  </div>
90
88
 
89
+ ## Quick Start
91
90
 
92
- ## 快速开始
91
+ Prerequisites: [Node.js](https://nodejs.org/en) and
92
+ [deepseek-harness](https://github.com/deepseek-ai/deepseek-harness), with
93
+ `DEEPSEEK_API_KEY` configured.
93
94
 
94
- 前置条件:安装[Nodejs](https://nodejs.org/zh-cn)与[deepseek-harness](https://github.com/deepseek-ai/deepseek-harness),注册`DEEPSEEK_API_KEY`。
95
-
96
- 安装命令:
95
+ The primary compatibility target is DSH `0.1.7-rc.1`. This adapter supports its
96
+ Shell API, V4 session messages, declarative presets, and profile-backed settings;
97
+ older supported hosts retain their compatibility paths. See [configuration](docs/configuration.en.md).
97
98
 
98
99
  ```sh
100
+ # Install the CLI and this plugin globally (ships the dsh-tui command)
99
101
  npm install -g @deepseek-ai/dsh @deepseek-harness-tui/dsh-tui
100
- ```
101
-
102
- 启动命令:
103
102
 
104
- ```bash
105
- # 完整命令
103
+ # Start (first run auto-initializes the profile; needs pnpm)
106
104
  dsh-tui
107
- # 如果你不想按键盘七次
105
+ # Both `dsh-tui` and the short `dst` alias start the same TUI.
108
106
  dst
109
107
  ```
110
108
 
111
- 如果你想手动安装,可以使用仓库根目录的 `install.sh`:
109
+ Manual alternative: `dsh plugin --profile dsh-tui add @deepseek-harness-tui/dsh-tui`.
110
+ The repo's `sh install.sh` runs that step and checks the required commands.
111
+ Afterwards `dsh-tui` and `dsh --profile dsh-tui` are equivalent.
112
112
 
113
- ```sh
114
- sh install.sh
115
- # 或:dsh plugin --profile dsh-tui add @deepseek-harness-tui/dsh-tui
116
- # 之后 dsh-tui 与 dsh --profile dsh-tui 等价
113
+ > **New-user note**: pnpm ≥11 blocks dependencies with install scripts by
114
+ > default and reports `ERR_PNPM_IGNORED_BUILDS`. Updates skip foreign-platform
115
+ > `@img/sharp-*` native packages, saving about 200MB of downloads. `/update`
116
+ > and `dsh-tui update` write both settings automatically. No manual step
117
+ > needed. Details:
118
+ > [Getting started](docs/getting-started.en.md#pnpm-install-script-blocks-and-foreign-platform-natives).
119
+
120
+ After startup the TUI checks for newer versions in the background. It never
121
+ blocks the first frame. Type `/update` for a one-shot upgrade. It restarts
122
+ automatically and resumes the current session. See
123
+ [Getting started](docs/getting-started.en.md) for the profile lifecycle,
124
+ source builds, and troubleshooting, including migration from the former
125
+ `dsh-cc-tui` package.
126
+
127
+ ### CLI
128
+
129
+ | Command | Purpose |
130
+ | --- | --- |
131
+ | `dsh-tui` / `dst` | Start the TUI; `dst` is a short alias for the same program |
132
+ | `dsh-tui --resume [id]` · `dsh-tui update` · `dsh-tui doctor` | Resume a session · update the profile and align the launcher · pre-flight environment checks |
133
+ | `dsh-tui safe` | Read-only diagnostics, plugin inventory and repair guidance; `safe --rescue` builds a clean rescue profile |
134
+ | `dsh-tui version` · `dsh-tui help` | Launcher and profile versions and usage; both work even without a `dsh` install |
135
+
136
+ Other arguments go to `dsh --profile dsh-tui`. Safe mode: [Getting started](docs/getting-started.en.md).
137
+
138
+ **VS Code**: use the integrated terminal or the `dsh-tui-vscode` extension. See [VS Code guide](docs/vscode.en.md). **Herdr**: run `dsh-tui` in a [Herdr](https://herdr.dev) pane; `idle` / `working` / `blocked` are reported through its local integration API.
139
+
140
+ ## Keybindings & Mouse
141
+
142
+ `Enter` send · `Tab` complete · `Ctrl+Enter` interrupt and send · `Alt+Up` recall the last message · `Esc` dismiss, double-`Esc` rewinds · `Ctrl+O` details · `Ctrl+R` history · `Ctrl+V` paste · `Ctrl+Shift+E` fullscreen draft editor · `?` shortcuts · `←` background the session.
143
+
144
+ While the model is working: `Enter` steers, `Tab` queues a follow-up, `Ctrl+Enter` interrupts and sends.
145
+
146
+ Mouse (fullscreen): drag to select and copy, double/triple click to select a word or line, click tool cards, timeline ticks and `[Image #N]` previews.
147
+
148
+ Full reference: [Interaction and commands](docs/interaction.en.md).
149
+
150
+ ## Built-in Commands
151
+
152
+ `/resume` · `/home` · `/agentview` · `/bg` · `⌸` open the same session manager: workspace rail, live state, filter, ★ pins. Also `/model` `/new` `/compact` `/export` `/btw` `/tree` `/fork` `/rewind` `/settings` `/status` `/cost` `/jobs` `/skills` `/mcp` `/login` `/update`.
153
+
154
+ **Background sessions**: `/bg` or `←` on an empty prompt; `Esc` returns. They run in this process and stop when the TUI exits. Logs survive.
155
+
156
+ Full commands: [Interaction and commands](docs/interaction.en.md).
157
+
158
+ ## Configuration & Extensions
159
+
160
+ Agent presets, themes, MCP servers, environment variables: [Configuration](docs/configuration.en.md) · [Themes](docs/themes.en.md).
161
+
162
+ ## How It Works
163
+
164
+ ```text
165
+ dsh profile → dsh-base → dsh-TUI Cordis patch → agent preset + DSH services
166
+ → session/event → Channel projection → React components → Ink/Yoga renderer → terminal
117
167
  ```
118
168
 
119
- > **新用户提示**:若 `dsh plugin` 安装时报 `ERR_PNPM_IGNORED_BUILDS`(pnpm ≥11 默认阻止带安装脚本的依赖,如 `@google/genai`、`protobufjs`——这些脚本运行时不需要,忽略即可),在 profile 的 `pnpm-workspace.yaml` 里加入:
120
- >
121
- > ```yaml
122
- > allowBuilds:
123
- > '@google/genai': false
124
- > protobufjs: false
125
- > ```
126
- >
127
- > `/update` 与 `dsh-tui update` 会自动写入这份配置,无需手工处理。
169
+ The TUI handles interaction and presentation. The session log is the source of truth. DSH services own models, tools, and persistence. Long sessions render in O(visible window).
128
170
 
129
- 更面向零基础的安装流程、profile 叠加机制、源码构建与常见问题见[安装与快速开始](docs/getting-started.md)。
171
+ Runtime path, module boundaries, performance notes and persistence locations: [Architecture and limitations](docs/architecture.en.md).
130
172
 
173
+ ## Known Limitations
131
174
 
175
+ - Injected plugin context has no standalone display; it counts into the context segments.
176
+ - `/model` switches by forking the session; the old session stays in `/resume`.
177
+ - `Ctrl+V` needs platform clipboard tools; unsupported bitmap formats are rejected.
178
+ - A background session lives inside this process and stops when the TUI exits.
179
+ - `/thinking` is not persisted; `/compact` is unavailable under the `minimal` preset; `/update` needs a `dsh --profile` launch and is refused while a turn is running.
132
180
 
133
- ## 插件扩展与开发指南
181
+ Full list: [Architecture and limitations → Known limitations](docs/architecture.en.md#known-limitations).
134
182
 
135
- 想为 dsh-TUI 做插件/扩展?欢迎加入生态!
183
+ ## Development
136
184
 
137
- - **接口与兼容性协定 / 插件开发指南**:[终端交互生态插件准入与开发指南](https://github.com/T-Auto/dsh-ecosystem-spec/blob/main/docs/plugin-admission-and-development.md)(准入规范、接缝、契约、验证清单)
138
- - **生态组织**:[dsh-tui-ecosystem](https://github.com/dsh-tui-ecosystem)(社区插件与模板的家)
139
- - **模板仓库**:[plugin-template](https://github.com/dsh-tui-ecosystem/plugin-template)(从模板起步,5 分钟出一个插件)
140
- - **参考实现**:`dsh-working-activity`(实时工作状态行:TUI 槽位 + `activity/status` 会话事件双出口)
185
+ CI uses Node 24 and pnpm 11. The package supports Node `^22.19 || >=24`.
141
186
 
142
- ### 接缝稳定性参考
187
+ ```sh
188
+ pnpm install --frozen-lockfile
189
+ pnpm build
190
+ pnpm smoke
191
+ ```
143
192
 
144
- 按当前实现成熟度给出的**非正式**分级,帮助插件作者评估投入;正式状态与兼容性协定以
145
- [准入与开发指南](https://github.com/T-Auto/dsh-ecosystem-spec/blob/main/docs/plugin-admission-and-development.md)为准:
193
+ `lib/types/` is ignored generated output. `pnpm build` recompiles it from a
194
+ clean output directory and runs the build gates. **Git URL installs are not
195
+ supported.** The source manifest keeps `@dsh-std/*` as workspace deps and
196
+ `vendor/dsh-std` as a submodule. pnpm ≥11 also refuses git-hosted `prepare`
197
+ scripts by default. Install the registry package instead:
198
+ `dsh plugin --profile dsh-tui add @deepseek-harness-tui/dsh-tui`. Rendering,
199
+ questionnaire, or tool-card changes also need the matching regression scripts.
146
200
 
147
- | 分级 | 接缝 |
148
- | --- | --- |
149
- | 稳定候选(形态冻结;如有破坏性变更,先在次版本弃用告警再移除) | 六 设置区块 · 八 全屏场景 · 十 托管对话框 · 十一 状态行 · 十二 键盘快捷键 · 十三 条目渲染器 |
150
- | 实验性(仍可能随 dsh-std / 准入规范演进调整) | 九 决策事件 · toast 通知(`ctx.tuiToast`,新增) |
151
- | 跟随上游(稳定性由 cordis / dsh 官方机制决定) | 一 会话事件 · 二 官方 prompt 槽位 · 三 技能打包 · 四 主题 · 五 system prompt 段 · 七 profile 组合 |
152
-
153
- 另:`@deepseek-harness-tui/dsh-tui/api`(纯类型入口)为实验性公开面。
154
- `@deepseek-harness-tui/dsh-tui/test-utils` 公共子路径已移除——它包含可注入真实
155
- activationId 的测试助手,不适合作为公共生产 API;需要 headless 测试请复制仓库内
156
- `scripts/lib/plugin-test-utils.ts` 的思路,在自己的测试环境走正式准入流程。
157
-
158
- 公共面的导入迁移:
159
- - **`ctx.tuiPluginHost.grants.corrupt` 已不存在**。新的 `HostGrantFacade` 只暴露
160
- `allows(pluginCtx, permission, scope)`、`defaultOf`、`knownPermissions` 和
161
- `onChange(pluginCtx, listener)`;损坏的 grant 文件不再通过一个布尔字段暴露给插件。
162
- `onChange` 是 subscribe 类托管能力:必须传入调用 activation,受 shadow 门禁约束,
163
- 返回的取消函数绑定到该 activation,避免文件轮询/监听器泄漏。需要诊断时请使用
164
- `ctx.tuiPluginHost.selfCheck()`、`/doctor`,或通过显式诊断查询在宿主侧检查
165
- grant 文件状态。
166
- - `createAdmissionCatalog` 不再从 `./plugin-host` 导出;诊断请使用
167
- `ctx.tuiPluginHost.selfCheck()` 与 `/doctor`。
168
- - `ctx.tuiPluginHost.grants` 改为调用方安全的 `HostGrantFacade`:
169
- `grants.allows(pluginCtx, permission, scope)` 由宿主从当前 activation 推导身份,
170
- 不再接受任意 `GrantPrincipal`/完整 `GrantStore`。
171
- - `GrantStore`、`GrantPrincipal` 不再是公开导出的插件 API;它们保留在
172
- `src/adapter/standard/grants.ts` 作为宿主内部实现类型。需要构造/校验 grant
173
- 文件的宿主方请走仓库内部路径,生态测试不要在公共包依赖这些类型。
174
- - `@deepseek-harness-tui/dsh-tui/test-utils` 子路径已删除;仓库内的
175
- `scripts/lib/plugin-test-utils.ts` 仅用于本仓库无头验证,不属于公共契约。
176
- 生态插件请在自己的测试环境通过正式 admission 流程复现。
177
-
178
- ### 平台已知边界(Shadow 门禁不承诺覆盖)
179
-
180
- TUI 的 shadow/门禁只覆盖自有托管接缝;以下由 Cordis/上游 DSH 拥有的路径属于已写死的
181
- 平台边界,不会被门禁描述为全路径覆盖:
182
-
183
- - 直接 `ctx.get('commands').register` / `ctx.get('commands').execute`(C-070);
184
- - `ctx.plugin()` / `candidate.plugin()` 子插件安装(Cordis 平台);
185
- - agent preset 名册 / recompose 注册(`@deepseek-ai/dsh-agent-presets`);
186
- - system prompt section 注册(`@deepseek-ai/dsh-system-prompt`);
187
- - skill registry 注册/调用(`@deepseek-ai/dsh-skill`)。
188
-
189
- 这些路径在 `verify-adapter-shadow` 中以 `platform-known boundary` 显式列出。
190
- 此外,`verify-adapter-shadow` 还显式记录两类门禁已知边界:未列入
191
- `NON_SERVICE_POLICY` 的内部 TUI 状态/视图辅助类,以及 `src/screens`/
192
- `src/components` 的 React UI 状态与事件处理——它们不是 adapter capability
193
- 入口,门禁不将其描述为已覆盖。
194
-
195
-
196
- ### Adapter live-probe 诚实性与 P2 边界
197
-
198
- 本轮把 `Command` / `LocalStorage` / `MessageObserver` 从“无实探的 staged”
199
- 推进到了“有可逆实探的 live”(在 legacy/new 模式下异步执行),并实现最小
200
- `KernelRuntime` 与 passive/replay harness:
201
-
202
- - **Command live probe**:在真实命令服务上临时注册唯一 no-op command,经
203
- `find` / `list` 验证可见,并以内存 fake agent session 执行一次,确认
204
- execute 返回 success;无论成功失败都在 `finally` 反注册。该操作不写任何
205
- DSH 持久化 session 日志,唯一瞬时副作用是进程内命令注册表的一次
206
- `commands/change` 通知。
207
- - **LocalStorage live probe**:在真实 storage 目录下创建随机临时 namespace
208
- 文件,完成 write/read/delete,并在 `finally` 删除;不触碰任何真实插件
209
- namespace,也不保留探针数据。
210
- - **MessageObserver live probe**:通过 broker 的内部 probe-only 发布通道添加一个临时探针订阅并投递一条合成事件;真实插件的 `session:*` 通配订阅不会收到任何探针消息,探针结束后订阅数回到原值。这些 live probe 方法不是插件可见的公开 service 方法,宿主内核通过内部 host-only accessor 调用。
211
- - **默认 legacy 兼容发布**:`DSH_TUI_ADAPTER_MODE` 默认是 `legacy`,不会加载新 Kernel、不会执行可逆 live probe。该模式保留旧发布语义,使用独立的 `buildLegacyHostDescriptor` 路径:只要 Command / LocalStorage / MessageObserver 的既有服务行已挂载,`describe()` / `hostDescriptor()` 就发布这些契约供插件准入使用;构建结果会在 warnings 中明确标注为 legacy 兼容声明,与新模式 live-only 的公开 descriptor 分离。
212
- - **模式配置 fail-closed**:只有未设置 `DSH_TUI_ADAPTER_MODE` 时才默认 `legacy`;显式值只接受 `legacy` / `passive-shadow` / `replay-shadow` / `new`(忽略大小写与首尾空白),空值或未知值会报错并拒绝启动。非 legacy 模式在 Kernel 未就绪、refresh skipped/failed 或已释放时返回空契约 descriptor,不回退兼容发布。
213
- - **Host probe 访问边界**:`host-probe-access` 内部的 token 是模块级不导出符号,普通包 exports 路径也拒绝 deep import。但插件与宿主同进程时,绝对路径加载内部文件仍无法被 `exports` 阻止——这是 **trusted-in-process 边界,不是安全沙箱**;宿主不会用“插件不可调用”这类无限定承诺。内部注册函数不会覆盖已引导的宿主 probe runner。
214
- - **Passive Shadow**:不执行上述可逆 probe,只做只读 detect/descriptor 快照;
215
- **Replay Shadow**:生产环境不接真实 DSH,必须通过 `scripts/verify-adapter-replay-harness.ts`
216
- 或 `src/adapter/kernel/replay.ts` 在隔离 replay context 上运行,否则 fail-closed
217
- 并输出明确提示。
218
- - Replay harness 用法:在隔离输入上运行
219
- `node --import tsx/esm scripts/verify-adapter-replay-harness.ts`(门禁脚本),
220
- 或在代码中调用 `runReplayShadow({ schemaVersion: 'tui-adapter-replay/v1', ... })`
221
- 获取 `{ kernelContracts, legacyContracts, missing, extra, lifecycles }` 对比报告。
222
- P5 起还支持真实 DSH session snapshot/transcript 的
223
- `runChannelReplay(...)` / `verify:adapter-channel-conformance`,走
224
- `tui.dsh/v1alpha1#Channel` 的 Provider/Consumer 与协议校验。
225
- - 公开 Host Descriptor 仍然只发布带真实 probe evidence 的 live 生命周期;
226
- 未完成 live refresh 或 passive/replay 下 `Command` / `LocalStorage` /
227
- `MessageObserver` 保持 staged/degraded,不伪造完整支持。`DecisionEvents`
228
- 维持逐 feature probe + 真实 channel/dispatch 拓扑发布规则。
229
- - P6 已彻底移除内部 `admissionCompat` 平行视图,并删除
230
- `src/plugin-spec/*` 与 `src/dsh-adapter/{grants,host-descriptor}.ts` compat
231
- shim。生产代码直接导入 `src/adapter/standard/*`;`verify:compat-removal`
232
- 现在扫描 `src/`、`scripts/`、`bin/`、生成 `lib/`(存在时)与 package export
233
- 图,`verify:package` 也会拒绝 npm tarball 中的旧 shim;仍保留的兼容别名
234
- (`ExtensionGrants`、`envelopeSchema`、`createAdmissionCatalog`、
235
- `facadeFromLegacy` 等)已明确标注为 P6 范围外/长期兼容面。
236
- - 新 Kernel 不再是 P1 空壳:`KernelRuntime` 管理 driver 注册/mount、detection、
237
- `declared → staged → live`、清理与诊断快照;生产 Host Descriptor、`getHostFacade()`、
238
- `/doctor`、`/plugins` 均走该 runtime。
239
- - **P3 feature-level live 拆分**:`Workspace` / `Scenes` / `Settings` /
240
- `Extensions` 不再用“注册+list+dispose”冒充整个能力 live。只有实际通过
241
- 只读/可逆探针验证的方法才进入 live(如 `host.workspaces.list`、
242
- `host.workspaces.resolve`、`host.scenes.register`、`host.settings.register`、
243
- `host.status.set`、`host.command-trees.children` 等);
244
- `host.toast.show` 因尚未验证真实生产 deliver 路径,保持 degraded;
245
- `rename` / `runCommand` / `commandShell` / `scenes.open` /
246
- `settings.subscribe` / 快捷键 dispatch / command-tree descriptions 等未验证
247
- 方法保持 degraded/staged。`Presentation` 的交互 `ask` 已桥接到真实
248
- `QuestionStore`,`approve` 在 P3 明确 staged。
249
- - **生产 P3 slices 接入**:非 `legacy` 的 `TuiPluginHostRuntime` 会把
250
- `ADAPTER_KERNEL_SLICES` 传入生产 `KernelRuntime`,进入 mount/refresh/
251
- descriptor 流程;依赖的服务未挂载时对应 slice 降级而不是崩溃。
252
- `DSH_TUI_ADAPTER_SLICES` 现在会按 slice id / capability / effect 矩阵过滤
253
- kernel slices,不再是无效果的死参数。
254
- - **宿主初始化运行时快照**:所有 adapter/宿主服务(storage/message/plugin-host、
255
- P3 的 status/workspaces/scenes/settings/toast/dialogs/command-trees/questions/approvals
256
- 等)都会在初始化时捕获不可变 `AdapterRuntimeOptions`。之后同一进程再修改
257
- `DSH_TUI_ADAPTER_MODE` / `DSH_TUI_ADAPTER_SLICES` 不能把 passive/replay 服务
258
- 解锁成 `new`;能力入口不再每次读 `process.env`。
259
- - **Slice 归属与边界**:`DSH_TUI_ADAPTER_SLICES` 现在会大小写/空白归一化、支持
260
- 常见别名(如 `dialogs` → `presentation`、`decisions` → `decisions`),未知
261
- slice id 直接拒绝并 fail-closed。`toast` 不再被 `presentation` 隐式加载,
262
- `decisions` 不再被 `messages` 隐式加载。
263
- - **P4 Channel Port/投影层(诚实表述)**:新增 `projection / actions / state /
264
- plugins / transcript` 五个 Host Port 与 `src/adapter/channel/*` 拆分模块,
265
- 并由 `channel` KernelSlice 挂载到生产 HostFacade;**生产 `src/dsh-adapter/channel.ts`
266
- 本体尚未物理拆分**,仍由 live Channel 作为实现来源,拆分模块是生产 driver
267
- 实际消费的 Port/投影层;**T1 已做核心迁移:生产 `plugin.ts` 中的通知与初始提交
268
- 已优先走 `HostFacade.channel.actions`;**非 shadow 模式下 facade 尚未 mount
269
- 时可回退原生 Channel,passive/replay shadow 下禁止回退,缺失或拒绝时丢弃**;
270
- 其余 UI/Channel 内部动作仍大部分直接调用原生 Channel,尚未完整迁移。
271
- `HostFacade` 按方法做 shadow 守卫,passive/replay 下只读投影可用、变更动作被拒。
272
- - **P5 Channel Provider/Consumer**:新增本地 Channel Provider/Consumer,
273
- 实现 `tui.dsh/v1alpha1#Channel` 的 open/subscribe/invoke/close 协议包络与
274
- 规范校验;`runChannelReplay` 支持录制 snapshot 数组,也支持把真实 DSH
275
- `agent.session.events` 形状事件投影为单调 `TuiChannelSnapshot`。该投影定位为
276
- **minimal transcript replay**:覆盖 transcript/status/基础 session 字段,
277
- 并在调用方提供元数据时带入 model/mode/preset/settings/scene/diagnostic/trace/
278
- context/pending/usage 等 RFC 相关字段;仍**不声明是完整 RFC 0007 Channel
279
- state/conformance**。未知方法按协议失败、
280
- features 必须显式声明且每个 feature 必须有 state/method 可观察证据、
281
- 重复 features 先拒绝、未知非 ignorable DSH event fail-closed、
282
- method handler 只能在 replay isolation 内执行、replay provider 不解析
283
- workspace/sessionId selector(显式 unsupported);连续性错误 fail-closed。
284
- - **P3 feature 生命周期稳定性**:`refresh` 之后执行 `mount()` / `descriptorBuild()` /
285
- `diagnosticSnapshot()` 再次触发同步 `detect()`,也不会清空已探测的 P3 feature;
286
- 这些 feature 是内部 Kernel/Port 事实,不进入公开 Host Descriptor。
287
- - **Settings section live 诚实性**:`host.settings.section` 的 live 依据是探针中
288
- 真实调用 `section()` 解析临时 namespace;解析缺失/失败时该 feature 降级,不再
289
- 仅凭 register/list 就标 live。
290
- - **Host Port 逐方法 shadow guard**:`KernelRuntime.facade()` 返回的每个
291
- Port 方法都会先执行统一 effect-class 检查。passive/replay 生产模式下
292
- `rename`、`runCommand`、`commandShell`、`scenes.open`、`settings.subscribe`、
293
- 各类 `register` 等会被拒绝;只读方法仍可用于诊断。
294
- - **Toast live probe** 使用独立 probe-only sink 管道,不替换/不吞并发生产
295
- toast;**Status live probe** 在 `clearIf` 失败或残留时降级,不会标 live。
296
- - `verify:adapter-slices` / `verify:adapter-detection` 现在同时检查生产
297
- plugin-host 确实传递 `ADAPTER_KERNEL_SLICES`,避免门禁只测直接 new
298
- KernelRuntime 的自证。
299
-
300
-
301
-
302
- ## 文档索引
303
-
304
- | 主题 | 内容 |
305
- | --- | --- |
306
- | [安装与快速开始](docs/getting-started.md) | 前置条件、安装、启动、profile 生命周期、源码开发 |
307
- | [配置参考](docs/configuration.md) | Cordis 覆盖、配置字段、Agent preset、MCP、环境变量 |
308
- | [主题系统](docs/themes.md) | 内置主题、自动检测、静态 JSON 与 npm 插件主题、校验规则 |
309
- | [交互与命令](docs/interaction.md) | 快捷键、鼠标、问卷、slash command 与会话工作流 |
310
- | [架构与限制](docs/architecture.md) | 运行链路、渲染与持久化设计、安全边界、已知限制 |
311
- | [社区管理框架](docs/community-management.md) | 社区入口、角色、提案流程、roadmap 规则与维护节奏 |
312
- | [项目路线图](docs/roadmap.md) | 公开目标、阶段、任务状态、退出条件与 Future Work |
313
- | [VS Code 使用指南](docs/vscode.md) | 在 VS Code 集成终端运行 dsh-tui;companion 扩展 `dsh-tui-vscode` 提供多会话、会话历史与指定会话恢复(已上架 Marketplace) |
314
- | [贡献与开发约定](docs/contributing.md) | 贡献流程、仓库地图、构建产物、验证矩阵与修改规则 |
315
- | [插件准入与开发指南](https://github.com/T-Auto/dsh-ecosystem-spec/blob/main/docs/plugin-admission-and-development.md) | 接口与兼容性协定 / 插件准入规范 / 插件接缝 / 契约 / 验证清单(已并入 dsh-ecosystem-spec) |
201
+ ## Plugin Ecosystem
202
+
203
+ Plugin development: [admission & development guide](https://github.com/T-Auto/dsh-ecosystem-spec/blob/main/docs/plugin-admission-and-development.md) · [plugin-template](https://github.com/dsh-tui-ecosystem/plugin-template) · [dsh-tui-ecosystem](https://github.com/dsh-tui-ecosystem). Reference implementation: `dsh-working-activity`.
316
204
 
317
- 完整的中英文索引见 [`docs/README.md`](docs/README.md)。
205
+ Seam grading and API notes: [Plugin development](docs/plugins.en.md). The organization maintains the listing only; it does not endorse community plugins.
318
206
 
207
+ ## Documentation
319
208
 
209
+ - **Start** — [Getting started](docs/getting-started.en.md) · [VS Code](docs/vscode.en.md)
210
+ - **Use** — [Keys and commands](docs/interaction.en.md) · [User guide](docs/user-guide.en.md) · [Themes](docs/themes.en.md)
211
+ - **Configure** — [Configuration](docs/configuration.en.md)
212
+ - **Internals** — [Architecture and limitations](docs/architecture.en.md) · [Session mounting](docs/session-mount-runtime.en.md)
213
+ - **Plugins** — [Admission and development](https://github.com/T-Auto/dsh-ecosystem-spec/blob/main/docs/plugin-admission-and-development.md) · [Seams](docs/plugins.en.md)
214
+ - **Contribute** — [Contributing](docs/contributing.en.md) · [Roadmap](docs/roadmap.en.md) · [Community](docs/community-management.en.md)
320
215
 
321
- ## 社区
216
+ Everything, bilingual: [docs/README.md](docs/README.md).
322
217
 
323
- - **生态组织**:[dsh-tui-ecosystem](https://github.com/dsh-tui-ecosystem) —— 社区插件、模板与收录列表的家。欢迎来发插件、提创意、互相取暖 🐋
324
- - **社区交流群**:使用问题、插件创意、功能许愿,都欢迎进来聊。
325
- - **行为准则**:参与前请读一遍[贡献者行为准则](CODE_OF_CONDUCT.md)。
218
+ ## Community
326
219
 
327
- | 微信群(dsh-TUI 社区交流 4 群) | QQ 群(群号 572549239) |
220
+ - **Ecosystem organization**: [dsh-tui-ecosystem](https://github.com/dsh-tui-ecosystem)
221
+ hosts community plugins, templates, and the curated list. Come ship a
222
+ plugin, pitch an idea, or just hang out 🐋
223
+ - **Chat groups** (Chinese-language): usage questions, plugin ideas, and
224
+ feature wishes are all welcome.
225
+ - **Code of conduct**: please read the
226
+ [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.en.md) before taking
227
+ part.
228
+
229
+ | WeChat group (dsh-TUI community 4) | QQ group (ID 572549239) |
328
230
  | :---: | :---: |
329
- | <img src="screenshots/wechat-group.jpg" alt="dsh-TUI 社区交流 4 群微信群二维码" width="200"> | <img src="screenshots/qq-group.png" alt="dsh-TUI 社区交流群 QQ 群二维码" width="200"> |
231
+ | <img src="screenshots/wechat-group.jpg" alt="dsh-TUI community WeChat group 4 QR code" width="200"> | <img src="screenshots/qq-group.png" alt="dsh-TUI community QQ group QR code" width="200"> |
330
232
 
331
- > 微信群二维码约 7 天过期一次,如遇失效请走 QQ 群(572549239),或开个 issue 提醒我们更新。
233
+ > The WeChat QR code expires roughly every 7 days; if it stops working, use
234
+ > the QQ group (572549239) or open an issue to nudge us for a refresh.
332
235
 
333
- ## 权限与安全边界
236
+ ## Permissions and Security Boundary
334
237
 
335
- > **Windows 安全警告:** Windows profile 默认使用 `danger-full-access`,且 approval 默认是 `never`。这会授予工具不受限制的访问权限;在敏感凭证或不可信仓库环境中启动前,务必先检查并收紧 profile 配置。
238
+ > **Windows security warning:** the Windows profile defaults to `danger-full-access` with approval set to `never`, so tools have unrestricted access. Inspect and tighten the profile before starting next to sensitive credentials or in an untrusted repository.
336
239
 
337
- `dsh-TUI` 不实现独立沙箱,而是使用当前 DSH profile 的文件、Shell、sandbox 与 approval 策略。权限预设来自 DSH `permissionPresets` registry:服务缺失时使用 legacy 三项兼容名册;服务已挂载但为空、损坏或不一致时标记为 unavailable,TUI fail closed,不伪造名册。可用 registry 按声明顺序提供第三方预设并自动进入补全、picker 与 `Shift+Tab` 循环(排除 `custom`/`status`、canonical 预设、重复 identity 与不安全 token);首次观察遵循 registry 顺序,后续刷新保留已见 identity 的相对顺序。服务可用时 `/permission` 以本地命令形式常驻菜单:切换优先调用官方 `/permission <preset>` 命令;命令行未暴露给本 agent 时,回退到 permissionPresets 服务自身的官方写路径(与命令 handler 同一实现,写真实 `permission/preset`/`sandbox/mode`/`approval/policy` 事件,绝不由 TUI 伪造),并以事件/读回确认;两条路都不可用时显式提示,绝不静默。计划模式退出先恢复进入前的 atom,再把权限身份还原到你进入前所在的预设(registry 仍提供时)。在包含敏感凭证或不可信仓库的环境中启动前,请先检查 profile 配置。
240
+ No sandbox of its own: dsh-TUI uses the active DSH profile's filesystem, shell, sandbox and approval policies. Permission presets come from the DSH `permissionPresets` registry.
338
241
 
339
- 详见[权限边界与已知限制](docs/architecture.md#权限与安全边界)。
242
+ Details: [Permissions and security boundary](docs/architecture.en.md#permissions-and-security-boundary).
340
243
 
341
- ### 致谢
244
+ ## Acknowledgments
342
245
 
343
- - 像素鲸鱼娘的 22 帧手绘原图(Excel 逐格绘制)与闲置动画行为(摆鱼鳍、拍尾巴、入睡冒 Z、点击冒爱心)移植自 **[dsh-ui-whale](https://github.com/lhh010/dsh-ui-whale)**(DeepSeek Harness Web 端鲸鱼宠物插件,作者 [@lhh010](https://github.com/lhh010),BSD-3-Clause),感谢作者与灵感 🐋💜
246
+ - The pixel whale's 22 hand-drawn frames and its idle behaviors are ported
247
+ from **[dsh-ui-whale](https://github.com/lhh010/dsh-ui-whale)**. The frames
248
+ were drawn cell by cell in Excel. The idle behaviors are fin flutters, tail
249
+ thumps, sleep Z's, and click hearts. dsh-ui-whale is the DeepSeek Harness
250
+ web whale-pet plugin by [@lhh010](https://github.com/lhh010), BSD-3-Clause.
251
+ Thank you for the art and the inspiration 🐋💜
344
252
 
345
- ### 友情链接
253
+ ## Friends' Links
346
254
 
347
- 朋友们开发的[社区、相关项目与周边工具](docs/links.md)
255
+ Community, related projects, and companion tools built by friends:
256
+ [see the links page](docs/links.md)
348
257
 
349
258
  ## Stars
350
259
 
351
- <!-- star-history:start -->
352
260
  [![Star History](https://raw.githubusercontent.com/ccch1mneyyy/dsh-TUI/bot-star-history/assets/star-history/star-history.png)](https://star-history.com/#ccch1mneyyy/dsh-TUI&Date)
353
- <!-- star-history:end -->
354
-
355
261
 
356
262
  ## License
357
263