@deepseek-harness-tui/dsh-tui 0.16.1 → 0.18.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 (488) hide show
  1. package/README.md +213 -34
  2. package/assets/plugin-icon.svg +13 -0
  3. package/assets/windows-installer.cs +308 -0
  4. package/assets/windows-installer.ps1 +17 -0
  5. package/bin/dsh-tui.js +64 -5
  6. package/cli/adapters/dsh/index.mjs +111 -0
  7. package/cli/adapters/dsh/locate.mjs +73 -0
  8. package/cli/adapters/dsh/management-plugin.mjs +111 -0
  9. package/cli/args.mjs +154 -0
  10. package/cli/contracts.d.ts +48 -0
  11. package/cli/engine.mjs +92 -0
  12. package/cli/entry.mjs +48 -0
  13. package/cli/process.mjs +118 -0
  14. package/cli/protocol.mjs +23 -0
  15. package/cli/schema-v1.json +33 -0
  16. package/cordis.patch.yml +3 -1
  17. package/cordis.yml +3 -1
  18. package/guide/dsh-tui-guide/SKILL.md +1 -0
  19. package/guide/dsh-tui-guide/cli.en.md +114 -0
  20. package/guide/dsh-tui-guide/cli.md +114 -0
  21. package/guide/dsh-tui-guide/configuration.en.md +7 -5
  22. package/guide/dsh-tui-guide/configuration.md +7 -5
  23. package/guide/dsh-tui-guide/getting-started.en.md +33 -3
  24. package/guide/dsh-tui-guide/getting-started.md +23 -2
  25. package/guide/dsh-tui-guide/interaction.en.md +50 -17
  26. package/guide/dsh-tui-guide/interaction.md +35 -13
  27. package/guide/dsh-tui-guide/plugins.en.md +63 -11
  28. package/guide/dsh-tui-guide/plugins.md +41 -7
  29. package/guide/dsh-tui-guide/user-guide.en.md +55 -34
  30. package/guide/dsh-tui-guide/user-guide.md +45 -28
  31. package/lib/settings.json +85 -42
  32. package/lib/types/adapter/channel/plugins.d.ts.map +1 -1
  33. package/lib/types/adapter/channel/plugins.js +8 -0
  34. package/lib/types/adapter/channel/ui-policy.d.ts +2 -1
  35. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
  36. package/lib/types/adapter/channel/ui-policy.js +4 -0
  37. package/lib/types/adapter/ports/channel-display.d.ts +10 -0
  38. package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
  39. package/lib/types/adapter/ports/channel-session.d.ts +2 -0
  40. package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
  41. package/lib/types/adapter/ports/channel-settings.d.ts +20 -0
  42. package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
  43. package/lib/types/adapter/ports/channel-ui.d.ts +22 -2
  44. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  45. package/lib/types/adapter/ports/channel-view.d.ts +11 -1
  46. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  47. package/lib/types/adapter/ports/channel.d.ts +7 -0
  48. package/lib/types/adapter/ports/channel.d.ts.map +1 -1
  49. package/lib/types/adapter/standard/grants.d.ts +60 -0
  50. package/lib/types/adapter/standard/grants.d.ts.map +1 -1
  51. package/lib/types/adapter/standard/grants.js +74 -0
  52. package/lib/types/agent/capabilities.d.ts +2 -0
  53. package/lib/types/agent/capabilities.d.ts.map +1 -1
  54. package/lib/types/agent/events.d.ts +15 -1
  55. package/lib/types/agent/events.d.ts.map +1 -1
  56. package/lib/types/api.d.ts +2 -2
  57. package/lib/types/api.d.ts.map +1 -1
  58. package/lib/types/backends/claude/translate/events.d.ts.map +1 -1
  59. package/lib/types/backends/claude/translate/events.js +2 -1
  60. package/lib/types/backends/codex/auth/status.js +1 -1
  61. package/lib/types/backends/codex/session/controls.d.ts.map +1 -1
  62. package/lib/types/backends/codex/session/controls.js +6 -5
  63. package/lib/types/backends/codex/session/goals.d.ts.map +1 -1
  64. package/lib/types/backends/codex/session/side-query.d.ts.map +1 -1
  65. package/lib/types/backends/codex/translate/events.d.ts.map +1 -1
  66. package/lib/types/backends/codex/translate/events.js +3 -1
  67. package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -1
  68. package/lib/types/backends/shared/channel-tokens.js +9 -8
  69. package/lib/types/channel/history-restore.d.ts.map +1 -1
  70. package/lib/types/channel/history-restore.js +2 -0
  71. package/lib/types/channel/interaction.d.ts.map +1 -1
  72. package/lib/types/channel/interaction.js +1 -0
  73. package/lib/types/channel/projection.d.ts +1 -1
  74. package/lib/types/channel/projection.d.ts.map +1 -1
  75. package/lib/types/channel/projection.js +19 -4
  76. package/lib/types/channel/questions.d.ts +2 -0
  77. package/lib/types/channel/questions.d.ts.map +1 -1
  78. package/lib/types/channel/sanitize.d.ts +14 -0
  79. package/lib/types/channel/sanitize.d.ts.map +1 -1
  80. package/lib/types/channel/sanitize.js +55 -0
  81. package/lib/types/channel/working-directory.d.ts +9 -0
  82. package/lib/types/channel/working-directory.d.ts.map +1 -0
  83. package/lib/types/channel/working-directory.js +7 -0
  84. package/lib/types/commands.d.ts +8 -1
  85. package/lib/types/commands.d.ts.map +1 -1
  86. package/lib/types/commands.js +14 -5
  87. package/lib/types/components/ChatTitle.d.ts +7 -0
  88. package/lib/types/components/ChatTitle.d.ts.map +1 -0
  89. package/lib/types/components/ChatTitle.js +15 -0
  90. package/lib/types/components/CodeBlockFrame.d.ts.map +1 -1
  91. package/lib/types/components/CodeBlockFrame.js +10 -5
  92. package/lib/types/components/CompactionStatusRow.d.ts.map +1 -1
  93. package/lib/types/components/CompactionStatusRow.js +24 -3
  94. package/lib/types/components/GoalTodoPanel.d.ts +73 -6
  95. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
  96. package/lib/types/components/GoalTodoPanel.js +165 -17
  97. package/lib/types/components/Markdown.d.ts +9 -1
  98. package/lib/types/components/Markdown.d.ts.map +1 -1
  99. package/lib/types/components/Markdown.js +5 -4
  100. package/lib/types/components/MessageList.d.ts.map +1 -1
  101. package/lib/types/components/MessageList.js +20 -14
  102. package/lib/types/components/PluginGrantList.d.ts +45 -0
  103. package/lib/types/components/PluginGrantList.d.ts.map +1 -0
  104. package/lib/types/components/PluginGrantList.js +126 -0
  105. package/lib/types/components/PluginInstallPane.d.ts.map +1 -1
  106. package/lib/types/components/PluginInstallPane.js +35 -6
  107. package/lib/types/components/PluginManagePane.d.ts.map +1 -1
  108. package/lib/types/components/PluginManagePane.js +65 -8
  109. package/lib/types/components/PromptInput.d.ts +13 -5
  110. package/lib/types/components/PromptInput.d.ts.map +1 -1
  111. package/lib/types/components/PromptInput.js +190 -108
  112. package/lib/types/components/SplitDiffView.d.ts.map +1 -1
  113. package/lib/types/components/SplitDiffView.js +232 -22
  114. package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
  115. package/lib/types/components/SubagentDashboard.js +10 -0
  116. package/lib/types/components/SubagentDetailScene.d.ts +3 -1
  117. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
  118. package/lib/types/components/SubagentDetailScene.js +17 -1
  119. package/lib/types/components/Whale.d.ts.map +1 -1
  120. package/lib/types/components/Whale.js +8 -5
  121. package/lib/types/components/approvals/ApprovalPanel.d.ts +1 -1
  122. package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
  123. package/lib/types/components/approvals/ApprovalPanel.js +93 -11
  124. package/lib/types/components/bigfont.d.ts.map +1 -1
  125. package/lib/types/components/bigfont.js +2 -1
  126. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +2 -1
  127. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  128. package/lib/types/components/messages/AssistantToolUseMessage.js +24 -11
  129. package/lib/types/components/onboardingModel.d.ts +2 -2
  130. package/lib/types/components/onboardingModel.js +3 -3
  131. package/lib/types/components/onboardingProviderPlan.d.ts +110 -0
  132. package/lib/types/components/onboardingProviderPlan.d.ts.map +1 -0
  133. package/lib/types/components/onboardingProviderPlan.js +78 -0
  134. package/lib/types/components/previewRows.d.ts +19 -0
  135. package/lib/types/components/previewRows.d.ts.map +1 -0
  136. package/lib/types/components/previewRows.js +46 -0
  137. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
  138. package/lib/types/components/questions/AskUserQuestionPanel.js +75 -10
  139. package/lib/types/components/sessions/ForeignSessionRow.d.ts +3 -9
  140. package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -1
  141. package/lib/types/components/sessions/ForeignSessionRow.js +6 -10
  142. package/lib/types/components/sessions/SessionListRow.d.ts +4 -9
  143. package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
  144. package/lib/types/components/sessions/SessionListRow.js +18 -10
  145. package/lib/types/components/sidePanel/InfoPanel.d.ts.map +1 -1
  146. package/lib/types/components/sidePanel/InfoPanel.js +4 -3
  147. package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -1
  148. package/lib/types/components/sidePanel/SidePanelLayout.js +5 -5
  149. package/lib/types/components/sidePanel/WorkspacePanel.d.ts.map +1 -1
  150. package/lib/types/components/sidePanel/WorkspacePanel.js +19 -7
  151. package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +7 -0
  152. package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
  153. package/lib/types/components/sidePanel/btw/BtwComposer.js +16 -0
  154. package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
  155. package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +8 -1
  156. package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +7 -1
  157. package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
  158. package/lib/types/components/sidePanel/btw/BtwThreadScene.js +8 -1
  159. package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts +30 -0
  160. package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts.map +1 -0
  161. package/lib/types/components/sidePanel/btw/useBtwComposerPaste.js +94 -0
  162. package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
  163. package/lib/types/components/sidePanel/builtinPanels.js +36 -18
  164. package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts.map +1 -1
  165. package/lib/types/components/sidePanel/companion/CompanionPanel.js +2 -1
  166. package/lib/types/components/sidePanel/panelMarkdown.d.ts +32 -0
  167. package/lib/types/components/sidePanel/panelMarkdown.d.ts.map +1 -0
  168. package/lib/types/components/sidePanel/panelMarkdown.js +45 -0
  169. package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts.map +1 -1
  170. package/lib/types/components/sidePanel/pluginPanelAdapter.js +6 -1
  171. package/lib/types/components/sidePanel/subagentFailureRead.d.ts +21 -0
  172. package/lib/types/components/sidePanel/subagentFailureRead.d.ts.map +1 -0
  173. package/lib/types/components/sidePanel/subagentFailureRead.js +66 -0
  174. package/lib/types/components/sidePanel/types.d.ts +2 -0
  175. package/lib/types/components/sidePanel/types.d.ts.map +1 -1
  176. package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
  177. package/lib/types/components/sidePanel/useSidePanel.js +39 -7
  178. package/lib/types/components/trajectory/MiniWake.d.ts +2 -2
  179. package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -1
  180. package/lib/types/components/trajectory/MiniWake.js +7 -3
  181. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
  182. package/lib/types/components/workspaces/HomeWorkspaceRow.js +4 -7
  183. package/lib/types/dsh-adapter/backend/session.d.ts +7 -1
  184. package/lib/types/dsh-adapter/backend/session.d.ts.map +1 -1
  185. package/lib/types/dsh-adapter/backend/session.js +62 -6
  186. package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
  187. package/lib/types/dsh-adapter/backend/translate.js +18 -4
  188. package/lib/types/dsh-adapter/backend-admission.d.ts +3 -3
  189. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +1 -1
  190. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -1
  191. package/lib/types/dsh-adapter/channel/agent-view-projection.js +3 -1
  192. package/lib/types/dsh-adapter/channel/binding-events.d.ts +5 -1
  193. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
  194. package/lib/types/dsh-adapter/channel/binding-events.js +18 -1
  195. package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
  196. package/lib/types/dsh-adapter/channel/command-completions.js +6 -8
  197. package/lib/types/dsh-adapter/channel/composer-images.d.ts +11 -1
  198. package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
  199. package/lib/types/dsh-adapter/channel/composer-images.js +121 -113
  200. package/lib/types/dsh-adapter/channel/composer-mentions.d.ts.map +1 -1
  201. package/lib/types/dsh-adapter/channel/composer-mentions.js +38 -17
  202. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +1 -1
  203. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
  204. package/lib/types/dsh-adapter/channel/context-bookkeeping.js +9 -5
  205. package/lib/types/dsh-adapter/channel/core/actions.d.ts +1 -1
  206. package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -1
  207. package/lib/types/dsh-adapter/channel/core/actions.js +23 -2
  208. package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +10 -1
  209. package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
  210. package/lib/types/dsh-adapter/channel/core/binding-feed.js +48 -3
  211. package/lib/types/dsh-adapter/channel/core/compose.d.ts +5 -2
  212. package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
  213. package/lib/types/dsh-adapter/channel/core/compose.js +7 -0
  214. package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -1
  215. package/lib/types/dsh-adapter/channel/core/files.js +2 -1
  216. package/lib/types/dsh-adapter/channel/core/host.d.ts +14 -10
  217. package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -1
  218. package/lib/types/dsh-adapter/channel/core/host.js +192 -13
  219. package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +1 -0
  220. package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
  221. package/lib/types/dsh-adapter/channel/core/local-actions.js +32 -3
  222. package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
  223. package/lib/types/dsh-adapter/channel/extensions.js +31 -5
  224. package/lib/types/dsh-adapter/channel/input-actions.d.ts +2 -2
  225. package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
  226. package/lib/types/dsh-adapter/channel/input-actions.js +34 -0
  227. package/lib/types/dsh-adapter/channel/input-delivery.d.ts +5 -2
  228. package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
  229. package/lib/types/dsh-adapter/channel/input-delivery.js +31 -4
  230. package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -1
  231. package/lib/types/dsh-adapter/channel/mentions.js +21 -7
  232. package/lib/types/dsh-adapter/channel/model-actions.d.ts +1 -1
  233. package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
  234. package/lib/types/dsh-adapter/channel/model-actions.js +7 -1
  235. package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -1
  236. package/lib/types/dsh-adapter/channel/model-selection.js +6 -4
  237. package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -1
  238. package/lib/types/dsh-adapter/channel/paths.js +11 -9
  239. package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
  240. package/lib/types/dsh-adapter/channel/session-fork.js +1 -0
  241. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +1 -1
  242. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
  243. package/lib/types/dsh-adapter/channel/session-live-adoption.js +6 -1
  244. package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
  245. package/lib/types/dsh-adapter/channel/session-metadata.js +15 -2
  246. package/lib/types/dsh-adapter/channel/session-reset.d.ts +1 -1
  247. package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
  248. package/lib/types/dsh-adapter/channel/session-reset.js +7 -1
  249. package/lib/types/dsh-adapter/channel/session-resume.d.ts +1 -1
  250. package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
  251. package/lib/types/dsh-adapter/channel/session-resume.js +56 -36
  252. package/lib/types/dsh-adapter/channel/session-rewind.d.ts +1 -1
  253. package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
  254. package/lib/types/dsh-adapter/channel/session-rewind.js +3 -1
  255. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +1 -1
  256. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
  257. package/lib/types/dsh-adapter/channel/session-tree-actions.js +3 -1
  258. package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
  259. package/lib/types/dsh-adapter/channel/settings-host.js +10 -3
  260. package/lib/types/dsh-adapter/channel/state.d.ts +1 -1
  261. package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
  262. package/lib/types/dsh-adapter/channel/state.js +2 -2
  263. package/lib/types/dsh-adapter/channel/types.d.ts +13 -1
  264. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
  265. package/lib/types/dsh-adapter/compat/liveSession.d.ts +3 -3
  266. package/lib/types/dsh-adapter/compat/liveSession.js +3 -3
  267. package/lib/types/dsh-adapter/compat/sessionLog.d.ts +1 -1
  268. package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
  269. package/lib/types/dsh-adapter/compat/sessionLog.js +17 -1
  270. package/lib/types/dsh-adapter/contract.d.ts +7 -5
  271. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  272. package/lib/types/dsh-adapter/contract.js +10 -5
  273. package/lib/types/dsh-adapter/effect-ledger.d.ts +1 -1
  274. package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -1
  275. package/lib/types/dsh-adapter/effect-ledger.js +1 -0
  276. package/lib/types/dsh-adapter/entry-slot.d.ts +6 -0
  277. package/lib/types/dsh-adapter/entry-slot.d.ts.map +1 -1
  278. package/lib/types/dsh-adapter/experimental-bundles.d.ts +29 -0
  279. package/lib/types/dsh-adapter/experimental-bundles.d.ts.map +1 -0
  280. package/lib/types/dsh-adapter/experimental-bundles.js +15 -0
  281. package/lib/types/dsh-adapter/grant-file.d.ts +70 -0
  282. package/lib/types/dsh-adapter/grant-file.d.ts.map +1 -0
  283. package/lib/types/dsh-adapter/grant-file.js +178 -0
  284. package/lib/types/dsh-adapter/host-access.d.ts +4 -0
  285. package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
  286. package/lib/types/dsh-adapter/host-access.js +54 -4
  287. package/lib/types/dsh-adapter/host-contract.d.ts +1 -1
  288. package/lib/types/dsh-adapter/host-contract.js +2 -2
  289. package/lib/types/dsh-adapter/host-dsh.js +3 -3
  290. package/lib/types/dsh-adapter/index.d.ts +8 -4
  291. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  292. package/lib/types/dsh-adapter/index.js +17 -12
  293. package/lib/types/dsh-adapter/panels.d.ts +28 -8
  294. package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
  295. package/lib/types/dsh-adapter/panels.js +11 -56
  296. package/lib/types/dsh-adapter/plugin-declaration.d.ts +28 -0
  297. package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -1
  298. package/lib/types/dsh-adapter/plugin-declaration.js +43 -1
  299. package/lib/types/dsh-adapter/plugin-install.d.ts +28 -1
  300. package/lib/types/dsh-adapter/plugin-install.d.ts.map +1 -1
  301. package/lib/types/dsh-adapter/plugin-install.js +160 -13
  302. package/lib/types/dsh-adapter/plugin-manage.d.ts +53 -10
  303. package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -1
  304. package/lib/types/dsh-adapter/plugin-manage.js +240 -51
  305. package/lib/types/dsh-adapter/plugin.d.ts +81 -0
  306. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  307. package/lib/types/dsh-adapter/plugin.js +378 -84
  308. package/lib/types/dsh-adapter/plugins-info.d.ts +6 -7
  309. package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
  310. package/lib/types/dsh-adapter/plugins-info.js +99 -31
  311. package/lib/types/dsh-adapter/presets.d.ts +19 -6
  312. package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
  313. package/lib/types/dsh-adapter/presets.js +69 -12
  314. package/lib/types/dsh-adapter/process-exit.d.ts +1 -1
  315. package/lib/types/dsh-adapter/process-exit.js +1 -1
  316. package/lib/types/dsh-adapter/providerWizard.d.ts +2 -0
  317. package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
  318. package/lib/types/dsh-adapter/providerWizard.js +11 -5
  319. package/lib/types/dsh-adapter/row-attachment.d.ts +30 -0
  320. package/lib/types/dsh-adapter/row-attachment.d.ts.map +1 -0
  321. package/lib/types/dsh-adapter/row-attachment.js +29 -0
  322. package/lib/types/dsh-adapter/session-tools.d.ts +34 -0
  323. package/lib/types/dsh-adapter/session-tools.d.ts.map +1 -0
  324. package/lib/types/dsh-adapter/session-tools.js +39 -0
  325. package/lib/types/dsh-adapter/settings-sections.d.ts +18 -1
  326. package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
  327. package/lib/types/dsh-adapter/settings-sections.js +73 -0
  328. package/lib/types/dsh-adapter/status.d.ts +88 -1
  329. package/lib/types/dsh-adapter/status.d.ts.map +1 -1
  330. package/lib/types/dsh-adapter/status.js +318 -3
  331. package/lib/types/dsh-adapter/team-mode.d.ts +42 -33
  332. package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -1
  333. package/lib/types/dsh-adapter/team-mode.js +76 -112
  334. package/lib/types/dsh-adapter/worktree-tool.d.ts +27 -0
  335. package/lib/types/dsh-adapter/worktree-tool.d.ts.map +1 -0
  336. package/lib/types/dsh-adapter/worktree-tool.js +87 -0
  337. package/lib/types/extensions.d.ts +1 -1
  338. package/lib/types/extensions.d.ts.map +1 -1
  339. package/lib/types/force-production-react.js +3 -3
  340. package/lib/types/heldInputs.d.ts +36 -0
  341. package/lib/types/heldInputs.d.ts.map +1 -0
  342. package/lib/types/heldInputs.js +173 -0
  343. package/lib/types/i18n.d.ts +543 -73
  344. package/lib/types/i18n.d.ts.map +1 -1
  345. package/lib/types/i18n.js +265 -46
  346. package/lib/types/ink/colorize.d.ts +7 -1
  347. package/lib/types/ink/colorize.d.ts.map +1 -1
  348. package/lib/types/ink/colorize.js +29 -8
  349. package/lib/types/ink/components/App.d.ts +2 -1
  350. package/lib/types/ink/components/App.d.ts.map +1 -1
  351. package/lib/types/ink/components/App.js +10 -3
  352. package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
  353. package/lib/types/ink/components/ScrollBox.js +1 -0
  354. package/lib/types/ink/dom.d.ts +1 -0
  355. package/lib/types/ink/dom.d.ts.map +1 -1
  356. package/lib/types/ink/hooks/use-program-status.d.ts +78 -0
  357. package/lib/types/ink/hooks/use-program-status.d.ts.map +1 -0
  358. package/lib/types/ink/hooks/use-program-status.js +96 -0
  359. package/lib/types/ink/ink.d.ts +13 -4
  360. package/lib/types/ink/ink.d.ts.map +1 -1
  361. package/lib/types/ink/ink.js +119 -25
  362. package/lib/types/ink/output.d.ts +17 -2
  363. package/lib/types/ink/output.d.ts.map +1 -1
  364. package/lib/types/ink/output.js +85 -2
  365. package/lib/types/ink/parse-keypress.d.ts +1 -0
  366. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  367. package/lib/types/ink/parse-keypress.js +5 -4
  368. package/lib/types/ink/render-node-to-output.d.ts +2 -0
  369. package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
  370. package/lib/types/ink/render-node-to-output.js +79 -10
  371. package/lib/types/ink/root.d.ts +8 -0
  372. package/lib/types/ink/root.d.ts.map +1 -1
  373. package/lib/types/ink/root.js +12 -3
  374. package/lib/types/ink/screen.d.ts +11 -0
  375. package/lib/types/ink/screen.d.ts.map +1 -1
  376. package/lib/types/ink/screen.js +44 -0
  377. package/lib/types/ink/selection.d.ts +7 -2
  378. package/lib/types/ink/selection.d.ts.map +1 -1
  379. package/lib/types/ink/selection.js +187 -44
  380. package/lib/types/ink/shutdown-input.d.ts +15 -0
  381. package/lib/types/ink/shutdown-input.d.ts.map +1 -0
  382. package/lib/types/ink/shutdown-input.js +28 -0
  383. package/lib/types/ink/sixel-cursor-heal.d.ts +21 -0
  384. package/lib/types/ink/sixel-cursor-heal.d.ts.map +1 -0
  385. package/lib/types/ink/sixel-cursor-heal.js +62 -0
  386. package/lib/types/ink/sixel-graphics.d.ts +6 -0
  387. package/lib/types/ink/sixel-graphics.d.ts.map +1 -1
  388. package/lib/types/ink/sixel-graphics.js +18 -0
  389. package/lib/types/ink/styles.d.ts +8 -1
  390. package/lib/types/ink/styles.d.ts.map +1 -1
  391. package/lib/types/ink/terminal-notification-windows.d.ts +195 -0
  392. package/lib/types/ink/terminal-notification-windows.d.ts.map +1 -0
  393. package/lib/types/ink/terminal-notification-windows.js +433 -0
  394. package/lib/types/ink/terminal-notification.d.ts +3 -1
  395. package/lib/types/ink/terminal-notification.d.ts.map +1 -1
  396. package/lib/types/ink/terminal-notification.js +4 -1
  397. package/lib/types/ink/terminal-querier.d.ts +9 -1
  398. package/lib/types/ink/terminal-querier.d.ts.map +1 -1
  399. package/lib/types/ink/terminal-querier.js +32 -1
  400. package/lib/types/ink/terminal.d.ts +23 -2
  401. package/lib/types/ink/terminal.d.ts.map +1 -1
  402. package/lib/types/ink/terminal.js +32 -2
  403. package/lib/types/ink/termio/osc.d.ts +2 -1
  404. package/lib/types/ink/termio/osc.d.ts.map +1 -1
  405. package/lib/types/ink/termio/osc.js +37 -8
  406. package/lib/types/ink/termio/osc7501.d.ts +102 -0
  407. package/lib/types/ink/termio/osc7501.d.ts.map +1 -0
  408. package/lib/types/ink/termio/osc7501.js +229 -0
  409. package/lib/types/ink/termio/tokenize.js +5 -7
  410. package/lib/types/onboardingDraft.d.ts +143 -0
  411. package/lib/types/onboardingDraft.d.ts.map +1 -0
  412. package/lib/types/onboardingDraft.js +71 -0
  413. package/lib/types/panels.d.ts +1 -1
  414. package/lib/types/panels.d.ts.map +1 -1
  415. package/lib/types/screens/AgentTranscriptScene.d.ts +3 -1
  416. package/lib/types/screens/AgentTranscriptScene.d.ts.map +1 -1
  417. package/lib/types/screens/AgentTranscriptScene.js +5 -1
  418. package/lib/types/screens/Chat.d.ts +6 -6
  419. package/lib/types/screens/Chat.d.ts.map +1 -1
  420. package/lib/types/screens/Chat.js +394 -141
  421. package/lib/types/screens/Launchpad.d.ts +8 -2
  422. package/lib/types/screens/Launchpad.d.ts.map +1 -1
  423. package/lib/types/screens/Launchpad.js +32 -12
  424. package/lib/types/screens/Onboarding.d.ts +22 -3
  425. package/lib/types/screens/Onboarding.d.ts.map +1 -1
  426. package/lib/types/screens/Onboarding.js +606 -36
  427. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
  428. package/lib/types/screens/SessionSupervisor.js +31 -21
  429. package/lib/types/screens/Settings.d.ts +5 -1
  430. package/lib/types/screens/Settings.d.ts.map +1 -1
  431. package/lib/types/screens/Settings.js +528 -51
  432. package/lib/types/screens/StatusLine.d.ts +9 -3
  433. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  434. package/lib/types/screens/StatusLine.js +91 -15
  435. package/lib/types/screens/StatusMetrics.d.ts +2 -11
  436. package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
  437. package/lib/types/screens/StatusMetrics.js +20 -14
  438. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
  439. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +1 -1
  440. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +1 -1
  441. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
  442. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +13 -21
  443. package/lib/types/sessionMounts.d.ts +14 -0
  444. package/lib/types/sessionMounts.d.ts.map +1 -1
  445. package/lib/types/sessionMounts.js +20 -9
  446. package/lib/types/sessions/format.d.ts +39 -0
  447. package/lib/types/sessions/format.d.ts.map +1 -1
  448. package/lib/types/sessions/format.js +83 -0
  449. package/lib/types/sessions/resumeFailure.d.ts +4 -0
  450. package/lib/types/sessions/resumeFailure.d.ts.map +1 -1
  451. package/lib/types/sessions/resumeFailure.js +12 -4
  452. package/lib/types/sessions/workspaceCounts.d.ts +6 -0
  453. package/lib/types/sessions/workspaceCounts.d.ts.map +1 -0
  454. package/lib/types/sessions/workspaceCounts.js +24 -0
  455. package/lib/types/settings/definitions.d.ts +24 -0
  456. package/lib/types/settings/definitions.d.ts.map +1 -1
  457. package/lib/types/settings/definitions.js +40 -15
  458. package/lib/types/tips.js +2 -2
  459. package/lib/types/tuiDisplayPrefs.d.ts +113 -5
  460. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
  461. package/lib/types/tuiDisplayPrefs.js +276 -14
  462. package/lib/types/update.d.ts +15 -14
  463. package/lib/types/update.d.ts.map +1 -1
  464. package/lib/types/update.js +163 -115
  465. package/lib/types/updateProcess.d.ts +28 -0
  466. package/lib/types/updateProcess.d.ts.map +1 -0
  467. package/lib/types/updateProcess.js +135 -0
  468. package/lib/types/utils/inputWordBoundary.d.ts +5 -0
  469. package/lib/types/utils/inputWordBoundary.d.ts.map +1 -0
  470. package/lib/types/utils/inputWordBoundary.js +18 -0
  471. package/lib/types/utils/keymap.d.ts +1 -1
  472. package/lib/types/utils/keymap.d.ts.map +1 -1
  473. package/lib/types/utils/keymap.js +6 -1
  474. package/lib/types/utils/paths.d.ts +15 -0
  475. package/lib/types/utils/paths.d.ts.map +1 -1
  476. package/lib/types/utils/paths.js +25 -0
  477. package/lib/types/windowsInstaller.d.ts +4 -0
  478. package/lib/types/windowsInstaller.d.ts.map +1 -0
  479. package/lib/types/windowsInstaller.js +237 -0
  480. package/locale/en.json +6 -0
  481. package/locale/zh.json +6 -0
  482. package/package.json +130 -111
  483. package/presets/liangshen/custom-bash.mjs +13 -1
  484. package/presets/liangshen/instruction-hint.mjs +4 -1
  485. package/presets/liangshen/skill-search.mjs +14 -2
  486. package/presets/winbash.mjs +16 -4
  487. package/tui-profile/feed/README.md +17 -8
  488. package/tui-profile/feed/first-party.json +1 -1
@@ -0,0 +1,229 @@
1
+ /**
2
+ * OSC 7501 — Program Status Protocol
3
+ *
4
+ * A terminal escape sequence that lets a program tell the terminal what it is
5
+ * doing: idle, working, blocked on the user, done, or failed. The terminal
6
+ * owns presentation; the program only shares state.
7
+ *
8
+ * Spec: https://www.superlogical.com/rex/docs/build/program-status
9
+ *
10
+ * Wire format (the body is `:`-separated `key=value` pairs):
11
+ *
12
+ * ESC ] 7501 ; state=working:app=dsh-tui:msg=<base64> ESC \
13
+ * ESC ] 7501 ; ? ESC \ (detection)
14
+ *
15
+ * Every report REPLACES the addressed record, so a key that must survive has
16
+ * to be repeated on every report. Terminals that do not know the sequence
17
+ * ignore it, which is why reports are sent blind — no detection round trip.
18
+ *
19
+ * This module is pure encoding/parsing: no I/O, no React, no channel imports.
20
+ * The value charset excludes `:` and `;`, so nothing needs escaping; free-text
21
+ * values (`msg`, `title`) are base64 of single-line, control-free UTF-8.
22
+ */
23
+ import { Buffer } from 'buffer';
24
+ import { isEnvTruthy } from '../../utils/envUtils.js';
25
+ import { ESC, ESC_TYPE } from './ansi.js';
26
+ import { OSC } from './osc.js';
27
+ /** The OSC command number for the Program Status Protocol. */
28
+ const PROGRAM_STATUS = OSC.PROGRAM_STATUS;
29
+ /** `ESC ]` — the OSC introducer. */
30
+ const OSC_PREFIX = ESC + String.fromCharCode(ESC_TYPE.OSC);
31
+ /**
32
+ * Protocol hard caps. A report that breaks one is discarded whole by the
33
+ * terminal, so the encoder refuses to build it instead of truncating into a
34
+ * half-applied record.
35
+ */
36
+ const PROGRAM_STATUS_LIMITS = {
37
+ /** Whole sequence, OSC through ST. The largest legal report is under 3300. */
38
+ sequenceBytes: 4096,
39
+ /** Encoded `msg` bytes (base64 of at most 2048 decoded). */
40
+ msgEncodedBytes: 2732,
41
+ /** Decoded `msg` bytes. */
42
+ msgDecodedBytes: 2048,
43
+ /** Encoded `title` bytes (base64 of at most 192 decoded). */
44
+ titleEncodedBytes: 256,
45
+ /** Decoded `title` bytes. */
46
+ titleDecodedBytes: 192,
47
+ /** `app` bytes. */
48
+ appBytes: 32,
49
+ /** Total `id` bytes. */
50
+ idBytes: 128,
51
+ /** `id` bytes per `/`-separated segment. */
52
+ idSegmentBytes: 32,
53
+ };
54
+ /**
55
+ * Collapse free text to the single control-free line the protocol requires.
56
+ * Control characters (C0/C1, DEL) and line breaks would be rejected by a
57
+ * conforming terminal and can smuggle sequence boundaries, so they are
58
+ * dropped rather than escaped — there is no escape mechanism in the format.
59
+ * Bidi overrides and isolates are also removed to keep untrusted labels
60
+ * from changing the direction of surrounding status text.
61
+ * @param text - untrusted text (session titles, tool commands, model output).
62
+ * @returns the text with control characters and line breaks removed.
63
+ */
64
+ export function sanitizeProgramText(text) {
65
+ // eslint-disable-next-line no-control-regex
66
+ return text.replace(/[\x00-\x1f\x7f-\x9f\u202a-\u202e\u2066-\u2069]/g, ' ').replace(/\s+/g, ' ').trim();
67
+ }
68
+ /**
69
+ * Truncate to a byte budget on a code-point boundary, so a multi-byte
70
+ * character is never split into invalid UTF-8.
71
+ * @param text - the text to bound.
72
+ * @param maxBytes - the UTF-8 byte budget.
73
+ * @returns the longest prefix within the budget.
74
+ */
75
+ function truncateUtf8(text, maxBytes) {
76
+ if (Buffer.byteLength(text, 'utf8') <= maxBytes)
77
+ return text;
78
+ let out = '';
79
+ let used = 0;
80
+ for (const char of text) {
81
+ const size = Buffer.byteLength(char, 'utf8');
82
+ if (used + size > maxBytes)
83
+ break;
84
+ out += char;
85
+ used += size;
86
+ }
87
+ return out;
88
+ }
89
+ /**
90
+ * Base64 of sanitized, byte-bounded UTF-8 text.
91
+ *
92
+ * The protocol caps free text twice — on the decoded bytes and on the encoded
93
+ * base64 — and the decoded cap is the binding one (base64 of 2048 bytes is
94
+ * exactly 2732, of 192 exactly 256). Both are enforced so a future cap change
95
+ * cannot silently produce an over-long value.
96
+ * @param text - the raw text to encode.
97
+ * @param decodedMaxBytes - the decoded UTF-8 byte budget.
98
+ * @param encodedMaxBytes - the encoded base64 byte budget.
99
+ * @returns the base64 value, or `''` when the text is empty after sanitizing.
100
+ */
101
+ function encodeText(text, decodedMaxBytes, encodedMaxBytes) {
102
+ const clean = truncateUtf8(sanitizeProgramText(text), decodedMaxBytes);
103
+ if (clean === '')
104
+ return '';
105
+ const encoded = Buffer.from(clean, 'utf8').toString('base64');
106
+ return encoded.length > encodedMaxBytes ? '' : encoded;
107
+ }
108
+ /** `id` grammar: `/`-separated `[A-Za-z0-9_.+-]` segments. */
109
+ function isValidRecordId(id) {
110
+ if (id.length === 0 || Buffer.byteLength(id, 'utf8') > PROGRAM_STATUS_LIMITS.idBytes)
111
+ return false;
112
+ const segments = id.split('/');
113
+ if (segments.length > 8)
114
+ return false;
115
+ return segments.every(segment => segment.length > 0
116
+ && Buffer.byteLength(segment, 'utf8') <= PROGRAM_STATUS_LIMITS.idSegmentBytes
117
+ && /^[A-Za-z0-9_.+-]+$/.test(segment));
118
+ }
119
+ /** `app` grammar: `[A-Za-z0-9_.+-]{1,32}`. */
120
+ function isValidApp(app) {
121
+ return app.length > 0
122
+ && Buffer.byteLength(app, 'utf8') <= PROGRAM_STATUS_LIMITS.appBytes
123
+ && /^[A-Za-z0-9_.+-]+$/.test(app);
124
+ }
125
+ /**
126
+ * Build one OSC 7501 report.
127
+ *
128
+ * Returns `''` when the record cannot be encoded legally (unknown state,
129
+ * `kind`/`progress` on a state that forbids it, an `app`/`id` outside its
130
+ * grammar, or a body past the sequence cap) — callers skip the write rather
131
+ * than send a report the terminal would discard.
132
+ *
133
+ * The sequence is NOT wrapped for tmux/screen passthrough on purpose: a
134
+ * passthrough report would reach the outer terminal, which cannot tell panes
135
+ * apart and cannot see the program exit, breaking the protocol's record
136
+ * lifetime. A multiplexer that implements OSC 7501 receives it directly.
137
+ *
138
+ * @param record - the report to encode.
139
+ * @returns the complete sequence, or `''` when it cannot be encoded.
140
+ */
141
+ export function programStatus(record) {
142
+ const { state } = record;
143
+ // Forward `id`: dropping it would widen a targeted clear into "remove every
144
+ // record on the terminal", wiping records other programs own.
145
+ if (state === 'clear')
146
+ return clearProgramStatus(record.id);
147
+ const pairs = [`state=${state}`];
148
+ if (record.id !== undefined) {
149
+ if (!isValidRecordId(record.id))
150
+ return '';
151
+ pairs.push(`id=${record.id}`);
152
+ }
153
+ if (record.kind !== undefined) {
154
+ // `kind` is only defined for `blocked`; anything else must not carry it.
155
+ if (state !== 'blocked')
156
+ return '';
157
+ if (record.kind !== 'permission' && record.kind !== 'question' && record.kind !== 'auth')
158
+ return '';
159
+ pairs.push(`kind=${record.kind}`);
160
+ }
161
+ if (record.progress !== undefined) {
162
+ // `progress` is only defined for `working`/`blocked`.
163
+ if (state !== 'working' && state !== 'blocked')
164
+ return '';
165
+ if (!Number.isInteger(record.progress) || record.progress < 0 || record.progress > 100)
166
+ return '';
167
+ pairs.push(`progress=${record.progress}`);
168
+ }
169
+ if (record.app !== undefined) {
170
+ if (!isValidApp(record.app))
171
+ return '';
172
+ pairs.push(`app=${record.app}`);
173
+ }
174
+ if (record.title !== undefined) {
175
+ const encoded = encodeText(record.title, PROGRAM_STATUS_LIMITS.titleDecodedBytes, PROGRAM_STATUS_LIMITS.titleEncodedBytes);
176
+ if (encoded !== '')
177
+ pairs.push(`title=${encoded}`);
178
+ }
179
+ if (record.msg !== undefined) {
180
+ const encoded = encodeText(record.msg, PROGRAM_STATUS_LIMITS.msgDecodedBytes, PROGRAM_STATUS_LIMITS.msgEncodedBytes);
181
+ if (encoded !== '')
182
+ pairs.push(`msg=${encoded}`);
183
+ }
184
+ const body = pairs.join(':');
185
+ // ST-terminate: the spec allows BEL or ST, and ST avoids BEL side effects
186
+ // (tmux bell-action, terminal beeps) on the terminals that implement this.
187
+ const sequence = `${OSC_PREFIX}${PROGRAM_STATUS};${body}${ESC}\\`;
188
+ if (Buffer.byteLength(sequence, 'utf8') > PROGRAM_STATUS_LIMITS.sequenceBytes)
189
+ return '';
190
+ return sequence;
191
+ }
192
+ /**
193
+ * Build a `clear` report. With an `id`, removes that record and every record
194
+ * beneath it; without one, removes every record on the terminal.
195
+ *
196
+ * Note the protocol already drops `working`/`blocked` records when the process
197
+ * exits or the next shell prompt begins, and deliberately keeps `done`/`error`
198
+ * for the user to find — so a normal exit must NOT clear.
199
+ * @param id - the record path to remove; omitted clears every record.
200
+ * @returns the complete sequence, or `''` when the id is malformed.
201
+ */
202
+ export function clearProgramStatus(id) {
203
+ if (id === undefined)
204
+ return `${OSC_PREFIX}${PROGRAM_STATUS};state=clear${ESC}\\`;
205
+ if (!isValidRecordId(id))
206
+ return '';
207
+ return `${OSC_PREFIX}${PROGRAM_STATUS};state=clear:id=${id}${ESC}\\`;
208
+ }
209
+ /**
210
+ * Whether to report program status.
211
+ *
212
+ * On by default: the protocol is a no-op on terminals that do not implement
213
+ * it (unknown OSCs are ignored), so the only hard requirement is an
214
+ * interactive stdout — a piped or redirected one has no terminal to report
215
+ * to. `DSH_TUI_PROGRAM_STATUS` disables it with any falsy spelling
216
+ * (`0`, `false`, `no`, `off`).
217
+ *
218
+ * @param stdoutIsTTY - whether stdout is an interactive terminal.
219
+ * @param env - the environment to read the opt-out from.
220
+ * @returns true when reports should be emitted.
221
+ */
222
+ export function supportsProgramStatus(stdoutIsTTY = process.stdout.isTTY === true, env = process.env) {
223
+ if (!stdoutIsTTY)
224
+ return false;
225
+ const flag = env.DSH_TUI_PROGRAM_STATUS;
226
+ if (flag === undefined || flag === '')
227
+ return true;
228
+ return isEnvTruthy(flag);
229
+ }
@@ -132,13 +132,11 @@ function tokenize(input, initialState, initialBuffer, flush, x10Mouse, splitInpu
132
132
  i++;
133
133
  emitSequence(data.slice(seqStart, i));
134
134
  }
135
- else if (code === C0.CR || code === C0.LF) {
136
- // Meta+Enter: ESC CR / ESC LF is how Option+Enter arrives from
137
- // terminals without extended key reporting ("Use Option as Meta").
138
- // CR/LF aren't ESC final bytes, but emitting the pair as a
139
- // sequence lets the keypress parser recognize it — otherwise it
140
- // merges with following text ('\x1b\rabc') and the CR submits
141
- // the prompt instead of inserting a newline (#110).
135
+ else if (code === C0.CR || code === C0.LF || code === C0.BS || code === C0.DEL) {
136
+ // Option-as-Meta prefixes Enter and Backspace with ESC. These
137
+ // controls are not ESC final bytes; keep each pair intact so it
138
+ // cannot become a bare Escape followed by an editing key (#110,
139
+ // #1448), including when stdin splits the pair across reads.
142
140
  i++;
143
141
  emitSequence(data.slice(seqStart, i));
144
142
  }
@@ -0,0 +1,143 @@
1
+ /**
2
+ * In-process progress for the first-run guide, at module scope.
3
+ *
4
+ * Not a persisted preference and deliberately not part of `onboardingPrefs`
5
+ * (that file owns the one-shot accounting, and a process that dies mid-guide
6
+ * must not burn the installation's only first run). This store exists for one
7
+ * mechanical reason:
8
+ *
9
+ * The question and approval panels share the interrupt lane with every
10
+ * full-screen surface — while a panel is pending the screen is UNMOUNTED
11
+ * and remounted once the answer lands (`Chat.tsx`, the `interruptPanel &&
12
+ * screenOpen` branch; `screenOpen` includes `onboardingOpen`). An access
13
+ * step that opens a panel (API-key entry, an OAuth device code or authorize
14
+ * URL) therefore loses all of its React state at exactly the moment the
15
+ * flow has something to report back.
16
+ *
17
+ * So the guide keeps the mechanical facts here: which step and row the user
18
+ * was on, the catalog snapshot taken BEFORE the action (the diff baseline for
19
+ * `onboardingProviderPlan`), the action that is in flight, and the one-line
20
+ * notice to restore. Everything else stays in component state.
21
+ *
22
+ * Lifecycle: written on change, read on mount, cleared when the guide closes
23
+ * either way (finish or skip) — a stale draft must never steer the next
24
+ * `/setup`. The slot is in-process only: nothing is serialized, so there is no
25
+ * stored shape to parse or normalize, and a fresh process starts at step 0.
26
+ *
27
+ * @module @deepseek-harness-tui/dsh-tui/onboardingDraft
28
+ */
29
+ import type { ProviderModelRef } from './components/onboardingProviderPlan.js';
30
+ /**
31
+ * The access action whose result the guide is waiting for.
32
+ *
33
+ * `id` is what makes completions unambiguous: closing the guide clears the
34
+ * draft but cannot cancel the provider flow, so a leftover promise can finish
35
+ * after the user reopened `/setup` and started a NEW action. Without an id that
36
+ * late callback would overwrite the new `pending` record with its own
37
+ * `completed` one — the guide would settle the abandoned action and the live
38
+ * one would lose its result.
39
+ */
40
+ export interface OnboardingPendingAction {
41
+ /** Monotonic id allocated when the action starts (see {@link nextOnboardingActionId}). */
42
+ readonly id: number;
43
+ readonly kind: 'sign-in' | 'add-provider';
44
+ /** Provider id for `sign-in`; absent for the add-provider wizard. */
45
+ readonly provider?: string | undefined;
46
+ }
47
+ /**
48
+ * How an in-flight access action ended. The neutral vocabulary the guide
49
+ * consumes; the adapter's richer outcome union is mapped onto it at the write
50
+ * site. `changed` is a flow that finished without adding anything by intent
51
+ * (a sign-out, a route edit or delete), so the guide must not report it as an
52
+ * add that brought nothing.
53
+ */
54
+ export type OnboardingCompletionStatus = 'added' | 'changed' | 'cancelled' | 'failed';
55
+ /** The finished action's result, written by whoever ran it. */
56
+ export interface OnboardingCompletion extends OnboardingPendingAction {
57
+ readonly status: OnboardingCompletionStatus;
58
+ /**
59
+ * The flow's newest notification since the action started — a failure's
60
+ * cause, or what a change did. The flows report only through the
61
+ * notification bar, which the full-screen guide covers, so the guide
62
+ * repeats it.
63
+ */
64
+ readonly notice?: string | undefined;
65
+ }
66
+ /** Mechanical guide progress (see the module doc for why it exists). */
67
+ export interface OnboardingDraft {
68
+ /** Zero-based step index, already clamped by the caller. */
69
+ readonly step: number;
70
+ /** Focus row inside the current step/layer. */
71
+ readonly focus: number;
72
+ /**
73
+ * Stable focus identity for step 1's action list (`'signin' | 'add' | …`).
74
+ * The list grows asynchronously, so an index alone would restore the wrong
75
+ * action: the same index means a different row once sign-in/add are present.
76
+ */
77
+ readonly focusId: string | undefined;
78
+ /**
79
+ * Catalog snapshot taken before the in-flight action; the diff baseline.
80
+ * Empty when no action has run, which makes the first diff "everything is
81
+ * new" — only reachable if a caller reads the plan without an action, and
82
+ * the callers never do.
83
+ */
84
+ readonly baseline: readonly ProviderModelRef[];
85
+ /**
86
+ * The action in flight. Stays set for the WHOLE run — a question panel can
87
+ * close between two questions (model discovery, profile write) and remount
88
+ * the guide while the flow is still working, and settling then would read a
89
+ * catalog that has not changed yet and drop the result.
90
+ */
91
+ readonly pending: OnboardingPendingAction | undefined;
92
+ /**
93
+ * Set by the runner when the action ends. Settling requires this: the
94
+ * remount that happens mid-run must wait for it, and a late completion must
95
+ * still be able to reach the instance that is on screen.
96
+ */
97
+ readonly completed: OnboardingCompletion | undefined;
98
+ /** Notice line to restore after a remount. */
99
+ readonly notice: OnboardingNotice | undefined;
100
+ }
101
+ /**
102
+ * The guide's one-line notice. The tone travels with the text: a failure or a
103
+ * cancellation restored after a remount must not come back in the success
104
+ * colour.
105
+ */
106
+ export interface OnboardingNotice {
107
+ readonly text: string;
108
+ readonly tone: 'success' | 'warning' | 'error';
109
+ }
110
+ /** What `readOnboardingDraft` answers when nothing is in flight. */
111
+ export declare const EMPTY_ONBOARDING_DRAFT: OnboardingDraft;
112
+ /**
113
+ * Allocate the id for a starting action.
114
+ *
115
+ * @returns A positive, strictly increasing id (1-based).
116
+ */
117
+ export declare function nextOnboardingActionId(): number;
118
+ /**
119
+ * Observe draft writes. The guide subscribes so a completion that lands while
120
+ * it is mounted (or after a remount) settles there, instead of being lost to
121
+ * the instance that started the action.
122
+ *
123
+ * @param listener - Called after every write and clear.
124
+ * @returns Unsubscribe.
125
+ */
126
+ export declare function subscribeOnboardingDraft(listener: () => void): () => void;
127
+ /**
128
+ * Read the draft in flight.
129
+ *
130
+ * @returns The stored draft, or `undefined` when the guide has no progress to
131
+ * restore (first mount, or after {@link clearOnboardingDraft}).
132
+ */
133
+ export declare function readOnboardingDraft(): OnboardingDraft | undefined;
134
+ /**
135
+ * Merge a patch into the draft, creating it on first write.
136
+ *
137
+ * @param patch - Fields to replace.
138
+ * @returns The stored draft after the write.
139
+ */
140
+ export declare function writeOnboardingDraft(patch: Partial<OnboardingDraft>): OnboardingDraft;
141
+ /** Drop the draft; called on both guide exits (finish and skip). */
142
+ export declare function clearOnboardingDraft(): void;
143
+ //# sourceMappingURL=onboardingDraft.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onboardingDraft.d.ts","sourceRoot":"","sources":["../../src/on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,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;CAC/C;AAED,oEAAoE;AACpE,eAAO,MAAM,sBAAsB,EAAE,eAQpC,CAAA;AAMD;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAG/C;AAYD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAKzE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,eAAe,GAAG,SAAS,CAEjE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,CAIrF;AAED,oEAAoE;AACpE,wBAAgB,oBAAoB,IAAI,IAAI,CAG3C"}
@@ -0,0 +1,71 @@
1
+ /** What `readOnboardingDraft` answers when nothing is in flight. */
2
+ export const EMPTY_ONBOARDING_DRAFT = {
3
+ step: 0,
4
+ focus: 0,
5
+ focusId: undefined,
6
+ baseline: [],
7
+ pending: undefined,
8
+ completed: undefined,
9
+ notice: undefined,
10
+ };
11
+ let current;
12
+ let actionSeq = 0;
13
+ const listeners = new Set();
14
+ /**
15
+ * Allocate the id for a starting action.
16
+ *
17
+ * @returns A positive, strictly increasing id (1-based).
18
+ */
19
+ export function nextOnboardingActionId() {
20
+ actionSeq += 1;
21
+ return actionSeq;
22
+ }
23
+ function emit() {
24
+ for (const listener of [...listeners]) {
25
+ try {
26
+ listener();
27
+ }
28
+ catch {
29
+ // A listener must never break the write that notified it.
30
+ }
31
+ }
32
+ }
33
+ /**
34
+ * Observe draft writes. The guide subscribes so a completion that lands while
35
+ * it is mounted (or after a remount) settles there, instead of being lost to
36
+ * the instance that started the action.
37
+ *
38
+ * @param listener - Called after every write and clear.
39
+ * @returns Unsubscribe.
40
+ */
41
+ export function subscribeOnboardingDraft(listener) {
42
+ listeners.add(listener);
43
+ return () => {
44
+ listeners.delete(listener);
45
+ };
46
+ }
47
+ /**
48
+ * Read the draft in flight.
49
+ *
50
+ * @returns The stored draft, or `undefined` when the guide has no progress to
51
+ * restore (first mount, or after {@link clearOnboardingDraft}).
52
+ */
53
+ export function readOnboardingDraft() {
54
+ return current;
55
+ }
56
+ /**
57
+ * Merge a patch into the draft, creating it on first write.
58
+ *
59
+ * @param patch - Fields to replace.
60
+ * @returns The stored draft after the write.
61
+ */
62
+ export function writeOnboardingDraft(patch) {
63
+ current = { ...(current ?? EMPTY_ONBOARDING_DRAFT), ...patch };
64
+ emit();
65
+ return current;
66
+ }
67
+ /** Drop the draft; called on both guide exits (finish and skip). */
68
+ export function clearOnboardingDraft() {
69
+ current = undefined;
70
+ emit();
71
+ }
@@ -1,4 +1,4 @@
1
1
  export { name, TuiPanelRuntime, TUI_PANEL_API_VERSION } from './dsh-adapter/panels.js';
2
- export type { TuiPanelDescriptor, TuiPanelProps, TuiPanelCompactProps, TuiPanelHostApi, TuiPanelSnapshot, TuiPanelKeyEvent, TuiPanelUi, TuiPanelEvent, TuiPanelSummary, } from './dsh-adapter/panels.js';
2
+ export type { TuiPanelDescriptor, TuiPanelProps, TuiPanelCompactProps, TuiPanelMarkdownProps, TuiPanelCodeBlockProps, TuiPanelHostApi, TuiPanelSnapshot, TuiPanelKeyEvent, TuiPanelUi, TuiPanelEvent, TuiPanelSummary, } from './dsh-adapter/panels.js';
3
3
  export { default } from './dsh-adapter/panels.js';
4
4
  //# sourceMappingURL=panels.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"panels.d.ts","sourceRoot":"","sources":["../../src/panels.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AACtF,YAAY,EACV,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,eAAe,GAChB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA"}
1
+ {"version":3,"file":"panels.d.ts","sourceRoot":"","sources":["../../src/panels.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AACtF,YAAY,EACV,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,eAAe,GAChB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA"}
@@ -6,6 +6,8 @@ export interface AgentTranscriptSceneProps {
6
6
  /** The child this view reads. Readonly by contract — the scene never
7
7
  * mutates the roster, the Channel or the parent's queues. */
8
8
  readonly subagent: SubagentState;
9
+ /** Called when this failed child is shown, never for its siblings. */
10
+ onFailureRead?: (subagent: SubagentState) => void;
9
11
  /** Where Esc returns to. */
10
12
  readonly source: AgentViewSource;
11
13
  onExit(): void;
@@ -38,5 +40,5 @@ export interface AgentTranscriptSceneProps {
38
40
  * The body uses the same transcript pager as the Detail page, with the
39
41
  * live SubagentState tail merged in.
40
42
  */
41
- export declare function AgentTranscriptScene({ subagent, source, onExit, loadTranscript, messages, compose, roster, onSwitchAgent }: AgentTranscriptSceneProps): React.ReactNode;
43
+ export declare function AgentTranscriptScene({ subagent, onFailureRead, source, onExit, loadTranscript, messages, compose, roster, onSwitchAgent }: AgentTranscriptSceneProps): React.ReactNode;
42
44
  //# sourceMappingURL=AgentTranscriptScene.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AgentTranscriptScene.d.ts","sourceRoot":"","sources":["../../../src/screens/AgentTranscriptScene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,aA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KAAK,gBAAgB,EACtB,MAAM,8CAA8C,CAAA;AAIrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAwDrI,MAAM,WAAW,yBAAyB;IACxC;kEAC8D;IAC9D,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAA;IAChC,sEAAsE;IACtE,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAA;IACjD,4BAA4B;IAC5B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;IAChC,MAAM,IAAI,IAAI,CAAA;IACd;;gCAE4B;IAC5B,cAAc,CAAC,EAAE,gBAAgB,CAAA;IACjC,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAA;IAC/C;6DACyD;IACzD,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;KAAE,CAAA;IACjG;;6BAEyB;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,aAAa,EAAE,CAAA;IAC1C;;8EAE0E;IAC1E,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAC1C;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,QAAa,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,yBAAyB,GAAG,KAAK,CAAC,SAAS,CAwT3L"}
@@ -53,7 +53,11 @@ const sourceLabel = (source) => source.kind === 'chat' ? t('agent-view-source-ch
53
53
  * The body uses the same transcript pager as the Detail page, with the
54
54
  * live SubagentState tail merged in.
55
55
  */
56
- export function AgentTranscriptScene({ subagent, source, onExit, loadTranscript, messages = [], compose, roster, onSwitchAgent }) {
56
+ export function AgentTranscriptScene({ subagent, onFailureRead, source, onExit, loadTranscript, messages = [], compose, roster, onSwitchAgent }) {
57
+ React.useEffect(() => {
58
+ if (subagent.status === 'failed')
59
+ onFailureRead?.(subagent);
60
+ }, [subagent, onFailureRead]);
57
61
  const scrollRef = React.useRef(null);
58
62
  const followRef = React.useRef(true);
59
63
  React.useEffect(() => {
@@ -14,7 +14,7 @@ import type { InjectController } from '../dsh-adapter/inject-channel.js';
14
14
  import type { SdkInstallSurface } from '../agent/backend.js';
15
15
  import type { PluginInstallFlow, PluginInstallSink } from '../dsh-adapter/plugin-install.js';
16
16
  import type { PluginManageFlow, PluginManageSink } from '../dsh-adapter/plugin-manage.js';
17
- import type { TeamCommandOutcome, TeamCommandSink } from '../dsh-adapter/team-mode.js';
17
+ import type { TeamCommandSink } from '../dsh-adapter/team-mode.js';
18
18
  import type { KernelEntry, KernelStatus } from '../components/kernelCatalog.js';
19
19
  import type { KernelBackendId } from '../kernelPrefs.js';
20
20
  export declare function Chat({ channel, questionStore, approvalStore, extensionDialogs, bonusNotices, extensionStatus, activityStore, extensionShortcuts, themeHost, onExit, onUpdate, onRestart, onSwitchBackend, onRestartFreshSession, onProbeKernels, kernelEntries, onResolveSdkInstall, onPluginInstall, onPluginManage, onTeamCommand, kernelPinned, fullscreen, trajectorySeen: trajectorySeenProp, injectControllerRef, promptControllerRef: promptControllerRefProp, renderScene, openHomeOnBoot, launchpadOnBoot, onboardingOnBoot, starPrompt, }: {
@@ -112,11 +112,11 @@ export declare function Chat({ channel, questionStore, approvalStore, extensionD
112
112
  */
113
113
  onPluginManage?: (args: string, sink: PluginManageSink) => PluginManageFlow | undefined;
114
114
  /**
115
- * `/team [status] | on | off`, wired to `createTeamCommandEntry`: on/off
116
- * hand back a lifecycle flow on the Agent Teams bundle (same pane as
117
- * `/plugin`), status a report. `undefined` on a backend without it.
115
+ * `/team [status]`, wired to `createTeamCommandEntry`: a report, or the
116
+ * enable/migration hint when the team service is not mounted. `undefined`
117
+ * on a backend without it.
118
118
  */
119
- onTeamCommand?: (args: string, sink: TeamCommandSink) => TeamCommandOutcome;
119
+ onTeamCommand?: (args: string, sink: TeamCommandSink) => Promise<readonly string[]>;
120
120
  /** 启动参数(Config 行 / DSH_TUI_BACKEND)压过了记忆:选择器明说。 */
121
121
  kernelPinned?: boolean;
122
122
  /**
@@ -192,5 +192,5 @@ export declare function Chat({ channel, questionStore, approvalStore, extensionD
192
192
  * question (does a screen swap lose it?) is about state, not about pixels.
193
193
  */
194
194
  promptControllerRef?: React.RefObject<PromptController | null>;
195
- }): React.JSX.Element | null;
195
+ }): React.ReactNode;
196
196
  //# sourceMappingURL=Chat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/screens/Chat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA2BzB,OAAO,KAAK,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iCAAiC,CAAA;AAE3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAwB,MAAM,0BAA0B,CAAA;AAC/E,OAAO,EAAE,aAAa,EAAe,MAAM,kCAAkC,CAAA;AAW7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAO5D,OAAO,EAAmB,KAAK,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAevF,OAAO,EAAiC,KAAK,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAQrE,OAAO,EAAyC,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAM3G,OAAO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