@deepseek-harness-tui/dsh-tui 0.16.0 → 0.17.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 (401) hide show
  1. package/README.md +214 -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/claude-backend.en.md +8 -0
  20. package/guide/dsh-tui-guide/claude-backend.md +5 -0
  21. package/guide/dsh-tui-guide/cli.en.md +114 -0
  22. package/guide/dsh-tui-guide/cli.md +114 -0
  23. package/guide/dsh-tui-guide/configuration.en.md +6 -5
  24. package/guide/dsh-tui-guide/configuration.md +6 -5
  25. package/guide/dsh-tui-guide/getting-started.en.md +44 -10
  26. package/guide/dsh-tui-guide/getting-started.md +31 -9
  27. package/guide/dsh-tui-guide/interaction.en.md +22 -10
  28. package/guide/dsh-tui-guide/interaction.md +18 -8
  29. package/guide/dsh-tui-guide/plugins.en.md +35 -4
  30. package/guide/dsh-tui-guide/plugins.md +23 -2
  31. package/guide/dsh-tui-guide/user-guide.en.md +30 -23
  32. package/guide/dsh-tui-guide/user-guide.md +29 -22
  33. package/lib/settings.json +83 -40
  34. package/lib/types/adapter/channel/plugins.d.ts.map +1 -1
  35. package/lib/types/adapter/channel/plugins.js +8 -0
  36. package/lib/types/adapter/channel/ui-policy.d.ts +1 -1
  37. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
  38. package/lib/types/adapter/channel/ui-policy.js +3 -0
  39. package/lib/types/adapter/ports/channel-display.d.ts +10 -0
  40. package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
  41. package/lib/types/adapter/ports/channel-session.d.ts +2 -0
  42. package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
  43. package/lib/types/adapter/ports/channel-settings.d.ts +20 -0
  44. package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
  45. package/lib/types/adapter/ports/channel-ui.d.ts +17 -2
  46. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  47. package/lib/types/adapter/ports/channel-view.d.ts +8 -1
  48. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  49. package/lib/types/adapter/ports/channel.d.ts +7 -0
  50. package/lib/types/adapter/ports/channel.d.ts.map +1 -1
  51. package/lib/types/agent/capabilities.d.ts +2 -0
  52. package/lib/types/agent/capabilities.d.ts.map +1 -1
  53. package/lib/types/agent/events.d.ts +8 -0
  54. package/lib/types/agent/events.d.ts.map +1 -1
  55. package/lib/types/api.d.ts +2 -2
  56. package/lib/types/api.d.ts.map +1 -1
  57. package/lib/types/backends/claude/translate/events.d.ts.map +1 -1
  58. package/lib/types/backends/claude/translate/events.js +2 -1
  59. package/lib/types/backends/codex/auth/status.js +1 -1
  60. package/lib/types/backends/codex/session/controls.d.ts.map +1 -1
  61. package/lib/types/backends/codex/session/controls.js +6 -5
  62. package/lib/types/backends/codex/session/goals.d.ts.map +1 -1
  63. package/lib/types/backends/codex/session/side-query.d.ts.map +1 -1
  64. package/lib/types/backends/codex/translate/events.d.ts.map +1 -1
  65. package/lib/types/backends/codex/translate/events.js +3 -1
  66. package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -1
  67. package/lib/types/backends/shared/channel-tokens.js +9 -8
  68. package/lib/types/channel/history-restore.d.ts.map +1 -1
  69. package/lib/types/channel/history-restore.js +2 -0
  70. package/lib/types/channel/interaction.d.ts.map +1 -1
  71. package/lib/types/channel/interaction.js +1 -0
  72. package/lib/types/channel/projection.d.ts +1 -1
  73. package/lib/types/channel/projection.d.ts.map +1 -1
  74. package/lib/types/channel/projection.js +19 -4
  75. package/lib/types/channel/questions.d.ts +2 -0
  76. package/lib/types/channel/questions.d.ts.map +1 -1
  77. package/lib/types/channel/sanitize.d.ts +14 -0
  78. package/lib/types/channel/sanitize.d.ts.map +1 -1
  79. package/lib/types/channel/sanitize.js +55 -0
  80. package/lib/types/channel/working-directory.d.ts +9 -0
  81. package/lib/types/channel/working-directory.d.ts.map +1 -0
  82. package/lib/types/channel/working-directory.js +7 -0
  83. package/lib/types/commands.d.ts +8 -1
  84. package/lib/types/commands.d.ts.map +1 -1
  85. package/lib/types/commands.js +13 -4
  86. package/lib/types/components/ChatTitle.d.ts +7 -0
  87. package/lib/types/components/ChatTitle.d.ts.map +1 -0
  88. package/lib/types/components/ChatTitle.js +15 -0
  89. package/lib/types/components/CodeBlockFrame.d.ts.map +1 -1
  90. package/lib/types/components/CodeBlockFrame.js +10 -5
  91. package/lib/types/components/CompactionStatusRow.d.ts.map +1 -1
  92. package/lib/types/components/CompactionStatusRow.js +24 -3
  93. package/lib/types/components/GoalTodoPanel.d.ts +3 -1
  94. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
  95. package/lib/types/components/GoalTodoPanel.js +2 -2
  96. package/lib/types/components/Markdown.d.ts +9 -1
  97. package/lib/types/components/Markdown.d.ts.map +1 -1
  98. package/lib/types/components/Markdown.js +5 -4
  99. package/lib/types/components/MessageList.d.ts.map +1 -1
  100. package/lib/types/components/MessageList.js +17 -12
  101. package/lib/types/components/PromptInput.d.ts +13 -5
  102. package/lib/types/components/PromptInput.d.ts.map +1 -1
  103. package/lib/types/components/PromptInput.js +189 -107
  104. package/lib/types/components/SplitDiffView.d.ts.map +1 -1
  105. package/lib/types/components/SplitDiffView.js +232 -22
  106. package/lib/types/components/SubagentDetailScene.d.ts +3 -1
  107. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
  108. package/lib/types/components/SubagentDetailScene.js +5 -1
  109. package/lib/types/components/Whale.d.ts.map +1 -1
  110. package/lib/types/components/Whale.js +8 -5
  111. package/lib/types/components/approvals/ApprovalPanel.d.ts +1 -1
  112. package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
  113. package/lib/types/components/approvals/ApprovalPanel.js +93 -11
  114. package/lib/types/components/bigfont.d.ts.map +1 -1
  115. package/lib/types/components/bigfont.js +2 -1
  116. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  117. package/lib/types/components/messages/AssistantToolUseMessage.js +13 -6
  118. package/lib/types/components/previewRows.d.ts +19 -0
  119. package/lib/types/components/previewRows.d.ts.map +1 -0
  120. package/lib/types/components/previewRows.js +46 -0
  121. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
  122. package/lib/types/components/questions/AskUserQuestionPanel.js +75 -10
  123. package/lib/types/components/sessions/ForeignSessionRow.d.ts +3 -9
  124. package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -1
  125. package/lib/types/components/sessions/ForeignSessionRow.js +6 -10
  126. package/lib/types/components/sessions/SessionListRow.d.ts +4 -9
  127. package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
  128. package/lib/types/components/sessions/SessionListRow.js +18 -10
  129. package/lib/types/components/sidePanel/InfoPanel.d.ts.map +1 -1
  130. package/lib/types/components/sidePanel/InfoPanel.js +4 -3
  131. package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -1
  132. package/lib/types/components/sidePanel/SidePanelLayout.js +5 -5
  133. package/lib/types/components/sidePanel/WorkspacePanel.d.ts.map +1 -1
  134. package/lib/types/components/sidePanel/WorkspacePanel.js +19 -7
  135. package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
  136. package/lib/types/components/sidePanel/builtinPanels.js +22 -16
  137. package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts.map +1 -1
  138. package/lib/types/components/sidePanel/companion/CompanionPanel.js +2 -1
  139. package/lib/types/components/sidePanel/panelMarkdown.d.ts +32 -0
  140. package/lib/types/components/sidePanel/panelMarkdown.d.ts.map +1 -0
  141. package/lib/types/components/sidePanel/panelMarkdown.js +45 -0
  142. package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts.map +1 -1
  143. package/lib/types/components/sidePanel/pluginPanelAdapter.js +6 -1
  144. package/lib/types/components/sidePanel/subagentFailureRead.d.ts +21 -0
  145. package/lib/types/components/sidePanel/subagentFailureRead.d.ts.map +1 -0
  146. package/lib/types/components/sidePanel/subagentFailureRead.js +66 -0
  147. package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
  148. package/lib/types/components/sidePanel/useSidePanel.js +24 -6
  149. package/lib/types/components/trajectory/MiniWake.d.ts +2 -2
  150. package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -1
  151. package/lib/types/components/trajectory/MiniWake.js +7 -3
  152. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
  153. package/lib/types/components/workspaces/HomeWorkspaceRow.js +4 -7
  154. package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
  155. package/lib/types/dsh-adapter/backend/translate.js +11 -1
  156. package/lib/types/dsh-adapter/backend-admission.d.ts +3 -3
  157. package/lib/types/dsh-adapter/channel/binding-events.d.ts +5 -1
  158. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
  159. package/lib/types/dsh-adapter/channel/binding-events.js +18 -1
  160. package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
  161. package/lib/types/dsh-adapter/channel/command-completions.js +6 -8
  162. package/lib/types/dsh-adapter/channel/composer-images.d.ts +9 -1
  163. package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
  164. package/lib/types/dsh-adapter/channel/composer-images.js +111 -111
  165. package/lib/types/dsh-adapter/channel/composer-mentions.d.ts.map +1 -1
  166. package/lib/types/dsh-adapter/channel/composer-mentions.js +16 -10
  167. package/lib/types/dsh-adapter/channel/core/actions.d.ts +1 -1
  168. package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -1
  169. package/lib/types/dsh-adapter/channel/core/actions.js +23 -2
  170. package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +4 -1
  171. package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
  172. package/lib/types/dsh-adapter/channel/core/binding-feed.js +13 -2
  173. package/lib/types/dsh-adapter/channel/core/compose.d.ts +4 -1
  174. package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
  175. package/lib/types/dsh-adapter/channel/core/compose.js +2 -0
  176. package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -1
  177. package/lib/types/dsh-adapter/channel/core/files.js +2 -1
  178. package/lib/types/dsh-adapter/channel/core/host.d.ts +14 -10
  179. package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -1
  180. package/lib/types/dsh-adapter/channel/core/host.js +192 -13
  181. package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +1 -0
  182. package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
  183. package/lib/types/dsh-adapter/channel/core/local-actions.js +32 -3
  184. package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
  185. package/lib/types/dsh-adapter/channel/extensions.js +31 -5
  186. package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
  187. package/lib/types/dsh-adapter/channel/input-actions.js +4 -0
  188. package/lib/types/dsh-adapter/channel/input-delivery.d.ts +4 -1
  189. package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
  190. package/lib/types/dsh-adapter/channel/input-delivery.js +24 -1
  191. package/lib/types/dsh-adapter/channel/model-actions.d.ts +1 -1
  192. package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
  193. package/lib/types/dsh-adapter/channel/model-actions.js +7 -1
  194. package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -1
  195. package/lib/types/dsh-adapter/channel/model-selection.js +6 -4
  196. package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
  197. package/lib/types/dsh-adapter/channel/session-fork.js +1 -0
  198. package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
  199. package/lib/types/dsh-adapter/channel/session-metadata.js +15 -2
  200. package/lib/types/dsh-adapter/channel/session-reset.d.ts +1 -1
  201. package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
  202. package/lib/types/dsh-adapter/channel/session-reset.js +4 -0
  203. package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
  204. package/lib/types/dsh-adapter/channel/session-resume.js +46 -33
  205. package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
  206. package/lib/types/dsh-adapter/channel/settings-host.js +10 -3
  207. package/lib/types/dsh-adapter/channel/state.d.ts +1 -1
  208. package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
  209. package/lib/types/dsh-adapter/channel/state.js +2 -2
  210. package/lib/types/dsh-adapter/channel/types.d.ts +13 -1
  211. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
  212. package/lib/types/dsh-adapter/compat/liveSession.d.ts +3 -3
  213. package/lib/types/dsh-adapter/compat/liveSession.js +3 -3
  214. package/lib/types/dsh-adapter/compat/sessionLog.d.ts +1 -1
  215. package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
  216. package/lib/types/dsh-adapter/compat/sessionLog.js +17 -1
  217. package/lib/types/dsh-adapter/contract.d.ts +6 -5
  218. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  219. package/lib/types/dsh-adapter/contract.js +7 -5
  220. package/lib/types/dsh-adapter/effect-ledger.d.ts +1 -1
  221. package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -1
  222. package/lib/types/dsh-adapter/effect-ledger.js +1 -0
  223. package/lib/types/dsh-adapter/experimental-bundles.d.ts +26 -0
  224. package/lib/types/dsh-adapter/experimental-bundles.d.ts.map +1 -0
  225. package/lib/types/dsh-adapter/experimental-bundles.js +11 -0
  226. package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
  227. package/lib/types/dsh-adapter/host-access.js +4 -0
  228. package/lib/types/dsh-adapter/host-contract.d.ts +1 -1
  229. package/lib/types/dsh-adapter/host-contract.js +2 -2
  230. package/lib/types/dsh-adapter/host-dsh.js +3 -3
  231. package/lib/types/dsh-adapter/host-entry.js +5 -3
  232. package/lib/types/dsh-adapter/index.d.ts +8 -4
  233. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  234. package/lib/types/dsh-adapter/index.js +9 -7
  235. package/lib/types/dsh-adapter/install/pnpm-profile-add.d.ts.map +1 -1
  236. package/lib/types/dsh-adapter/install/pnpm-profile-add.js +9 -3
  237. package/lib/types/dsh-adapter/panels.d.ts +21 -7
  238. package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
  239. package/lib/types/dsh-adapter/panels.js +11 -56
  240. package/lib/types/dsh-adapter/plugin.d.ts +81 -0
  241. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  242. package/lib/types/dsh-adapter/plugin.js +318 -70
  243. package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
  244. package/lib/types/dsh-adapter/plugins-info.js +65 -10
  245. package/lib/types/dsh-adapter/presets.d.ts +15 -6
  246. package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
  247. package/lib/types/dsh-adapter/presets.js +51 -12
  248. package/lib/types/dsh-adapter/process-exit.d.ts +1 -1
  249. package/lib/types/dsh-adapter/process-exit.js +1 -1
  250. package/lib/types/dsh-adapter/session-tools.d.ts +34 -0
  251. package/lib/types/dsh-adapter/session-tools.d.ts.map +1 -0
  252. package/lib/types/dsh-adapter/session-tools.js +39 -0
  253. package/lib/types/dsh-adapter/settings-sections.d.ts +18 -1
  254. package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
  255. package/lib/types/dsh-adapter/settings-sections.js +73 -0
  256. package/lib/types/dsh-adapter/status.d.ts +88 -1
  257. package/lib/types/dsh-adapter/status.d.ts.map +1 -1
  258. package/lib/types/dsh-adapter/status.js +318 -3
  259. package/lib/types/dsh-adapter/team-mode.d.ts +42 -33
  260. package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -1
  261. package/lib/types/dsh-adapter/team-mode.js +76 -112
  262. package/lib/types/extensions.d.ts +1 -1
  263. package/lib/types/extensions.d.ts.map +1 -1
  264. package/lib/types/force-production-react.js +3 -3
  265. package/lib/types/i18n.d.ts +195 -52
  266. package/lib/types/i18n.d.ts.map +1 -1
  267. package/lib/types/i18n.js +96 -30
  268. package/lib/types/ink/colorize.d.ts +7 -1
  269. package/lib/types/ink/colorize.d.ts.map +1 -1
  270. package/lib/types/ink/colorize.js +29 -8
  271. package/lib/types/ink/components/App.d.ts +2 -1
  272. package/lib/types/ink/components/App.d.ts.map +1 -1
  273. package/lib/types/ink/components/App.js +10 -3
  274. package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
  275. package/lib/types/ink/components/ScrollBox.js +1 -0
  276. package/lib/types/ink/dom.d.ts +1 -0
  277. package/lib/types/ink/dom.d.ts.map +1 -1
  278. package/lib/types/ink/hooks/use-program-status.d.ts +78 -0
  279. package/lib/types/ink/hooks/use-program-status.d.ts.map +1 -0
  280. package/lib/types/ink/hooks/use-program-status.js +96 -0
  281. package/lib/types/ink/ink.d.ts +13 -4
  282. package/lib/types/ink/ink.d.ts.map +1 -1
  283. package/lib/types/ink/ink.js +119 -25
  284. package/lib/types/ink/output.d.ts +17 -2
  285. package/lib/types/ink/output.d.ts.map +1 -1
  286. package/lib/types/ink/output.js +85 -2
  287. package/lib/types/ink/parse-keypress.d.ts +1 -0
  288. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  289. package/lib/types/ink/parse-keypress.js +5 -4
  290. package/lib/types/ink/render-node-to-output.d.ts +2 -0
  291. package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
  292. package/lib/types/ink/render-node-to-output.js +79 -10
  293. package/lib/types/ink/root.d.ts +8 -0
  294. package/lib/types/ink/root.d.ts.map +1 -1
  295. package/lib/types/ink/root.js +12 -3
  296. package/lib/types/ink/screen.d.ts +11 -0
  297. package/lib/types/ink/screen.d.ts.map +1 -1
  298. package/lib/types/ink/screen.js +44 -0
  299. package/lib/types/ink/selection.d.ts +7 -2
  300. package/lib/types/ink/selection.d.ts.map +1 -1
  301. package/lib/types/ink/selection.js +187 -44
  302. package/lib/types/ink/shutdown-input.d.ts +15 -0
  303. package/lib/types/ink/shutdown-input.d.ts.map +1 -0
  304. package/lib/types/ink/shutdown-input.js +28 -0
  305. package/lib/types/ink/sixel-cursor-heal.d.ts +21 -0
  306. package/lib/types/ink/sixel-cursor-heal.d.ts.map +1 -0
  307. package/lib/types/ink/sixel-cursor-heal.js +62 -0
  308. package/lib/types/ink/sixel-graphics.d.ts +6 -0
  309. package/lib/types/ink/sixel-graphics.d.ts.map +1 -1
  310. package/lib/types/ink/sixel-graphics.js +18 -0
  311. package/lib/types/ink/styles.d.ts +8 -1
  312. package/lib/types/ink/styles.d.ts.map +1 -1
  313. package/lib/types/ink/terminal-notification-windows.d.ts +195 -0
  314. package/lib/types/ink/terminal-notification-windows.d.ts.map +1 -0
  315. package/lib/types/ink/terminal-notification-windows.js +433 -0
  316. package/lib/types/ink/terminal-notification.d.ts +3 -1
  317. package/lib/types/ink/terminal-notification.d.ts.map +1 -1
  318. package/lib/types/ink/terminal-notification.js +4 -1
  319. package/lib/types/ink/terminal-querier.d.ts +9 -1
  320. package/lib/types/ink/terminal-querier.d.ts.map +1 -1
  321. package/lib/types/ink/terminal-querier.js +32 -1
  322. package/lib/types/ink/terminal.d.ts +23 -2
  323. package/lib/types/ink/terminal.d.ts.map +1 -1
  324. package/lib/types/ink/terminal.js +32 -2
  325. package/lib/types/ink/termio/osc.d.ts +2 -1
  326. package/lib/types/ink/termio/osc.d.ts.map +1 -1
  327. package/lib/types/ink/termio/osc.js +37 -8
  328. package/lib/types/ink/termio/osc7501.d.ts +102 -0
  329. package/lib/types/ink/termio/osc7501.d.ts.map +1 -0
  330. package/lib/types/ink/termio/osc7501.js +229 -0
  331. package/lib/types/ink/termio/tokenize.js +5 -7
  332. package/lib/types/panels.d.ts +1 -1
  333. package/lib/types/panels.d.ts.map +1 -1
  334. package/lib/types/screens/AgentTranscriptScene.d.ts +3 -1
  335. package/lib/types/screens/AgentTranscriptScene.d.ts.map +1 -1
  336. package/lib/types/screens/AgentTranscriptScene.js +5 -1
  337. package/lib/types/screens/Chat.d.ts +6 -6
  338. package/lib/types/screens/Chat.d.ts.map +1 -1
  339. package/lib/types/screens/Chat.js +304 -111
  340. package/lib/types/screens/Launchpad.d.ts +8 -2
  341. package/lib/types/screens/Launchpad.d.ts.map +1 -1
  342. package/lib/types/screens/Launchpad.js +32 -12
  343. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
  344. package/lib/types/screens/SessionSupervisor.js +31 -21
  345. package/lib/types/screens/Settings.d.ts +5 -1
  346. package/lib/types/screens/Settings.d.ts.map +1 -1
  347. package/lib/types/screens/Settings.js +528 -51
  348. package/lib/types/screens/StatusLine.d.ts +9 -3
  349. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  350. package/lib/types/screens/StatusLine.js +91 -15
  351. package/lib/types/screens/StatusMetrics.d.ts +2 -11
  352. package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
  353. package/lib/types/screens/StatusMetrics.js +20 -14
  354. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
  355. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +1 -1
  356. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +1 -1
  357. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
  358. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +13 -21
  359. package/lib/types/sessionMounts.d.ts +14 -0
  360. package/lib/types/sessionMounts.d.ts.map +1 -1
  361. package/lib/types/sessionMounts.js +20 -9
  362. package/lib/types/sessions/format.d.ts +39 -0
  363. package/lib/types/sessions/format.d.ts.map +1 -1
  364. package/lib/types/sessions/format.js +83 -0
  365. package/lib/types/sessions/resumeFailure.d.ts +4 -0
  366. package/lib/types/sessions/resumeFailure.d.ts.map +1 -1
  367. package/lib/types/sessions/resumeFailure.js +12 -4
  368. package/lib/types/sessions/workspaceCounts.d.ts +6 -0
  369. package/lib/types/sessions/workspaceCounts.d.ts.map +1 -0
  370. package/lib/types/sessions/workspaceCounts.js +24 -0
  371. package/lib/types/settings/definitions.d.ts +24 -0
  372. package/lib/types/settings/definitions.d.ts.map +1 -1
  373. package/lib/types/settings/definitions.js +38 -13
  374. package/lib/types/tips.js +2 -2
  375. package/lib/types/tuiDisplayPrefs.d.ts +113 -5
  376. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
  377. package/lib/types/tuiDisplayPrefs.js +276 -14
  378. package/lib/types/update.d.ts +46 -36
  379. package/lib/types/update.d.ts.map +1 -1
  380. package/lib/types/update.js +248 -157
  381. package/lib/types/updateProcess.d.ts +28 -0
  382. package/lib/types/updateProcess.d.ts.map +1 -0
  383. package/lib/types/updateProcess.js +135 -0
  384. package/lib/types/utils/inputWordBoundary.d.ts +5 -0
  385. package/lib/types/utils/inputWordBoundary.d.ts.map +1 -0
  386. package/lib/types/utils/inputWordBoundary.js +18 -0
  387. package/lib/types/utils/keymap.d.ts +1 -1
  388. package/lib/types/utils/keymap.d.ts.map +1 -1
  389. package/lib/types/utils/keymap.js +6 -1
  390. package/lib/types/windowsInstaller.d.ts +4 -0
  391. package/lib/types/windowsInstaller.d.ts.map +1 -0
  392. package/lib/types/windowsInstaller.js +237 -0
  393. package/locale/en.json +6 -0
  394. package/locale/zh.json +6 -0
  395. package/package.json +127 -111
  396. package/presets/liangshen/custom-bash.mjs +13 -1
  397. package/presets/liangshen/instruction-hint.mjs +4 -1
  398. package/presets/liangshen/skill-search.mjs +14 -2
  399. package/presets/winbash.mjs +16 -4
  400. package/tui-profile/feed/README.md +17 -8
  401. package/tui-profile/feed/first-party.json +1 -1
@@ -5,13 +5,16 @@
5
5
  * sanitizes and joins every text contribution into one line. `registerView`
6
6
  * is the bounded rich companion for compact, pointer-only surfaces that need
7
7
  * host React and themed cells (for example a progress card). It deliberately
8
- * receives no input, channel, or raw-terminal capability.
8
+ * receives no input, channel, or raw-terminal capability. `setField` is the
9
+ * footer sibling: one keyed text cell admitted into the prompt footer's
10
+ * existing left/right groups, with the same lifecycle, ownership, token, and
11
+ * ledger rules as `set()`.
9
12
  *
10
13
  * Same split as the dialogs seam: a cordis-free store the chat screen
11
14
  * subscribes to, and a thin cordis service validating untrusted input.
12
15
  */
13
16
  import { Service } from '@deepseek-ai/cordis';
14
- import { cleanScalarText } from './sanitize.js';
17
+ import { cleanScalarText, cleanStatusFieldText } from './sanitize.js';
15
18
  import { activationFiber, assertCallerContext, bindCallerEffect, compositionRoot, concreteService, requirePluginCaller } from './host-access.js';
16
19
  import { componentIdentityOf } from './component-identity.js';
17
20
  import { assertCapabilityShadowPolicy, } from '../adapter/kernel/runtime.js';
@@ -23,6 +26,16 @@ const TEXT_CELLS = 200;
23
26
  const MAX_ENTRIES = 20;
24
27
  const MAX_VIEW_ROWS = 3;
25
28
  const MAX_VIEW_ROW_BUDGET = 6;
29
+ // Footer budget: six plugin cells total (the row is one terminal line), two
30
+ // per activation so one plugin cannot own the whole footer.
31
+ const MAX_FIELDS = 6;
32
+ const MAX_FIELDS_PER_OWNER = 2;
33
+ const FIELD_CELLS_DEFAULT = 16;
34
+ const FIELD_CELLS_MAX = 32;
35
+ const FIELD_DETAIL_CELLS = 160;
36
+ const FIELD_MIN_COLUMNS_MAX = 400;
37
+ const FIELD_SLOTS = new Set(['left-tail', 'right-head', 'right-tail']);
38
+ const FIELD_TONES = new Set(['dim', 'accent', 'success', 'warning', 'error']);
26
39
  const HOST_STATUS_OWNER = Object.freeze({ kind: 'host-status-owner' });
27
40
  /** Cordis-free text + view store. Render order is first-set/register order
28
41
  * (Map insertion order), so plugin contributions do not jump on updates. */
@@ -35,10 +48,13 @@ export class TuiStatusStore {
35
48
  // same status text).
36
49
  entries = new Map();
37
50
  views = new Map();
51
+ fields = new Map();
38
52
  // useSyncExternalStore requires a referentially stable snapshot between
39
53
  // emits — a fresh array per call would re-render in an infinite loop.
40
54
  snapshot = [];
41
55
  viewSnapshot = [];
56
+ fieldSnapshot = [];
57
+ onFieldError;
42
58
  constructor(onViewError) {
43
59
  this.onViewError = onViewError;
44
60
  }
@@ -100,6 +116,54 @@ export class TuiStatusStore {
100
116
  reportViewError(key, error) {
101
117
  this.onViewError?.(key, error);
102
118
  }
119
+ /** Current footer fields, first-set first and referentially stable between
120
+ * mutations for `useSyncExternalStore`. */
121
+ getFieldSnapshot() {
122
+ return this.fieldSnapshot;
123
+ }
124
+ /** Store (or overwrite) one admitted field. Slot/option merging already
125
+ * happened in the service; the store only records normalized entries. */
126
+ setField(entry, token, owner, rawOnClick) {
127
+ this.fields.set(entry.key, { entry, token, owner, ...(rawOnClick === undefined ? {} : { rawOnClick }) });
128
+ this.fieldSnapshot = [...this.fields.values()].map(record => record.entry);
129
+ this.emit();
130
+ }
131
+ /** The full admission record for `key` (read by the service to merge an
132
+ * update onto the previous options and to check ownership). */
133
+ fieldEntry(key) {
134
+ return this.fields.get(key);
135
+ }
136
+ fieldCount() {
137
+ return this.fields.size;
138
+ }
139
+ /** How many footer fields one activation currently owns (cap enforcement). */
140
+ fieldsOwnedBy(owner) {
141
+ let count = 0;
142
+ for (const record of this.fields.values()) {
143
+ if (record.owner === owner)
144
+ count += 1;
145
+ }
146
+ return count;
147
+ }
148
+ /** Clear `key` only while it still holds this token AND owner. */
149
+ clearFieldIf(key, token, owner) {
150
+ const current = this.fields.get(key);
151
+ if (owner !== undefined && current?.owner !== owner)
152
+ return false;
153
+ if (current?.token !== token)
154
+ return false;
155
+ this.fields.delete(key);
156
+ this.fieldSnapshot = [...this.fields.values()].map(record => record.entry);
157
+ this.emit();
158
+ return true;
159
+ }
160
+ /** UI-side handler for a plugin click that threw; the service logs first. */
161
+ setFieldErrorHandler(handler) {
162
+ this.onFieldError = handler;
163
+ }
164
+ reportFieldError(key, error) {
165
+ this.onFieldError?.(key, error);
166
+ }
103
167
  /** Clear `key` only while it still holds the write tagged `token` — a
104
168
  * stale disposer must not wipe a newer contribution (even one with
105
169
  * identical text). Returns true when this call actually cleared. */
@@ -115,12 +179,14 @@ export class TuiStatusStore {
115
179
  }
116
180
  /** Drop everything (teardown). */
117
181
  clear() {
118
- if (this.entries.size === 0 && this.views.size === 0)
182
+ if (this.entries.size === 0 && this.views.size === 0 && this.fields.size === 0)
119
183
  return;
120
184
  this.entries.clear();
121
185
  this.views.clear();
186
+ this.fields.clear();
122
187
  this.snapshot = [];
123
188
  this.viewSnapshot = [];
189
+ this.fieldSnapshot = [];
124
190
  this.emit();
125
191
  }
126
192
  subscribe(listener) {
@@ -280,6 +346,255 @@ export class TuiStatusRuntime extends Service {
280
346
  ledgerApplied = true;
281
347
  return dispose;
282
348
  }
349
+ /**
350
+ * Insert (or update/clear) one keyed TEXT field in the prompt footer's
351
+ * existing left/right groups — no new row, no plugin component. The field
352
+ * keeps the same admission contract as `set()`: plugin caller, activation
353
+ * ownership, token-based disposers, effect-ledger records, never throws.
354
+ *
355
+ * Unlike `set()`, footer fields are capped (six total, two per activation)
356
+ * and each cell is truncated by the host to `maxCells` (default 16, at most
357
+ * 32) so the row's flex shrinking always has a definite bound. `detail` and
358
+ * `onClick` are optional; a click without a detail line is refused (the
359
+ * footer must never promise an action it cannot explain on hover).
360
+ *
361
+ * Passing `undefined` (or text that sanitizes to nothing) CLEARS the field;
362
+ * a stale disposer cannot clear a newer write for the same key.
363
+ */
364
+ setField(key, text, options, identity) {
365
+ const state = statusStateFor(this);
366
+ assertCapabilityShadowPolicy('host.status.set', state.runtime.mode, state.runtime.slices);
367
+ const noop = () => { };
368
+ let caller;
369
+ try {
370
+ caller = requirePluginCaller(this.ctx, 'tuiStatus.setField', this);
371
+ }
372
+ catch {
373
+ this.ctx.logger.warn('dsh-tui: tuiStatus.setField requires a live non-root plugin activation');
374
+ return noop;
375
+ }
376
+ const store = state.store;
377
+ // Capture the logger now: a click handler can outlive the activation, and
378
+ // reaching back through a disposed caller proxy would only mask the error.
379
+ const logger = caller.logger;
380
+ if (identity !== undefined) {
381
+ try {
382
+ assertCallerContext(caller, identity, 'tuiStatus.setField');
383
+ }
384
+ catch {
385
+ logger.warn('dsh-tui: tuiStatus.setField rejected an identity belonging to another activation');
386
+ return noop;
387
+ }
388
+ }
389
+ const owner = activationFiber(caller);
390
+ if (owner === undefined) {
391
+ logger.warn('dsh-tui: tuiStatus.setField requires a live activation owner');
392
+ return noop;
393
+ }
394
+ let normalized;
395
+ try {
396
+ normalized = String(key ?? '').trim().toLowerCase();
397
+ }
398
+ catch {
399
+ logger.warn('dsh-tui: tuiStatus.setField rejected an uncoercible key');
400
+ return noop;
401
+ }
402
+ if (!KEY_PATTERN.test(normalized)) {
403
+ logger.warn('dsh-tui: tuiStatus.setField rejected an invalid key');
404
+ return noop;
405
+ }
406
+ const existing = store.fieldEntry(normalized);
407
+ const ledger = caller.get('tuiEffectLedger');
408
+ // Clear path. Ownership is checked BEFORE anything is removed: another
409
+ // activation's field is not this caller's to clear.
410
+ const clear = () => {
411
+ if (existing === undefined)
412
+ return noop;
413
+ if (existing.owner !== owner) {
414
+ logger.warn(`dsh-tui: tuiStatus.setField rejected "${normalized}" — the field belongs to another activation`);
415
+ return noop;
416
+ }
417
+ if (store.clearFieldIf(normalized, existing.token, owner)) {
418
+ ledger?.record({ operation: 'release', resource: { kind: 'status-field', id: normalized }, result: 'applied' }, identity);
419
+ }
420
+ return noop;
421
+ };
422
+ if (text === undefined || text === '')
423
+ return clear();
424
+ // Scalar-only coercion, same rule as set(): an object must not become
425
+ // "[object Object]" nor be silently downgraded to a clear.
426
+ if (typeof text !== 'string' && typeof text !== 'number' && typeof text !== 'boolean') {
427
+ logger.warn(`dsh-tui: tuiStatus.setField rejected non-scalar text for "${normalized}"`);
428
+ return noop;
429
+ }
430
+ let rawOptions;
431
+ if (options === undefined) {
432
+ rawOptions = {};
433
+ }
434
+ else if (typeof options !== 'object' || options === null || Array.isArray(options)) {
435
+ logger.warn(`dsh-tui: tuiStatus.setField rejected invalid options for "${normalized}"`);
436
+ return noop;
437
+ }
438
+ else {
439
+ rawOptions = options;
440
+ }
441
+ // The options object is plugin-supplied, so a throwing getter (or a Proxy)
442
+ // must take the documented reject-and-warn path instead of escaping into
443
+ // the caller. Read every option once, inside one guard: the checks below
444
+ // then cannot re-trigger a getter.
445
+ let optionMaxCells;
446
+ let optionSlot;
447
+ let optionTone;
448
+ let optionMinColumns;
449
+ let optionDetail;
450
+ let optionOnClick;
451
+ try {
452
+ optionMaxCells = rawOptions.maxCells;
453
+ optionSlot = rawOptions.slot;
454
+ optionTone = rawOptions.tone;
455
+ optionMinColumns = rawOptions.minColumns;
456
+ optionDetail = rawOptions.detail;
457
+ optionOnClick = rawOptions.onClick;
458
+ }
459
+ catch {
460
+ logger.warn(`dsh-tui: tuiStatus.setField rejected "${normalized}" — unreadable options`);
461
+ return noop;
462
+ }
463
+ const prev = existing?.entry;
464
+ let maxCells = prev?.maxCells ?? FIELD_CELLS_DEFAULT;
465
+ if (optionMaxCells !== undefined) {
466
+ if (typeof optionMaxCells !== 'number' || !Number.isInteger(optionMaxCells)) {
467
+ logger.warn(`dsh-tui: tuiStatus.setField rejected "${normalized}" — maxCells must be an integer`);
468
+ return noop;
469
+ }
470
+ maxCells = Math.min(FIELD_CELLS_MAX, Math.max(1, optionMaxCells));
471
+ }
472
+ const cleaned = cleanStatusFieldText(text, maxCells);
473
+ // Whitespace/control/bidi-only text is a clear (set() folds it the same
474
+ // way). Checked before the remaining option gates: a clear carries no
475
+ // rendered options to validate.
476
+ if (cleaned === '')
477
+ return clear();
478
+ let slot = prev?.slot ?? 'left-tail';
479
+ if (optionSlot !== undefined) {
480
+ if (!FIELD_SLOTS.has(optionSlot)) {
481
+ logger.warn(`dsh-tui: tuiStatus.setField rejected "${normalized}" — invalid slot`);
482
+ return noop;
483
+ }
484
+ slot = optionSlot;
485
+ }
486
+ let tone = prev?.tone ?? 'dim';
487
+ if (optionTone !== undefined) {
488
+ if (!FIELD_TONES.has(optionTone)) {
489
+ logger.warn(`dsh-tui: tuiStatus.setField rejected "${normalized}" — invalid tone`);
490
+ return noop;
491
+ }
492
+ tone = optionTone;
493
+ }
494
+ let minColumns = prev?.minColumns ?? 0;
495
+ if (optionMinColumns !== undefined) {
496
+ if (typeof optionMinColumns !== 'number' || !Number.isInteger(optionMinColumns)) {
497
+ logger.warn(`dsh-tui: tuiStatus.setField rejected "${normalized}" — minColumns must be an integer`);
498
+ return noop;
499
+ }
500
+ minColumns = Math.min(FIELD_MIN_COLUMNS_MAX, Math.max(0, optionMinColumns));
501
+ }
502
+ let detail = prev?.detail;
503
+ if (optionDetail !== undefined) {
504
+ if (typeof optionDetail !== 'string') {
505
+ logger.warn(`dsh-tui: tuiStatus.setField rejected "${normalized}" — detail must be a string`);
506
+ return noop;
507
+ }
508
+ // An explicitly empty/unsafe detail means "no detail", not "keep the old
509
+ // one" — omitted is the only spelling that carries the previous value.
510
+ detail = cleanStatusFieldText(optionDetail, FIELD_DETAIL_CELLS) || undefined;
511
+ }
512
+ let rawOnClick = existing?.rawOnClick;
513
+ if (optionOnClick !== undefined) {
514
+ if (typeof optionOnClick !== 'function') {
515
+ logger.warn(`dsh-tui: tuiStatus.setField rejected "${normalized}" — onClick must be a function`);
516
+ return noop;
517
+ }
518
+ rawOnClick = optionOnClick;
519
+ }
520
+ if (rawOnClick !== undefined && detail === undefined) {
521
+ // D3: a clickable cell owes the user an explanation on hover.
522
+ logger.warn(`dsh-tui: tuiStatus.setField rejected "${normalized}" — onClick requires detail`);
523
+ return noop;
524
+ }
525
+ if (existing === undefined) {
526
+ if (store.fieldCount() >= MAX_FIELDS) {
527
+ logger.warn(`dsh-tui: tuiStatus.setField rejected "${normalized}": ${MAX_FIELDS} footer fields already shown`);
528
+ return noop;
529
+ }
530
+ if (store.fieldsOwnedBy(owner) >= MAX_FIELDS_PER_OWNER) {
531
+ logger.warn(`dsh-tui: tuiStatus.setField rejected "${normalized}": ${MAX_FIELDS_PER_OWNER} footer fields per plugin already shown`);
532
+ return noop;
533
+ }
534
+ }
535
+ else if (existing.owner !== owner) {
536
+ logger.warn(`dsh-tui: tuiStatus.setField rejected "${normalized}" — the field belongs to another activation`);
537
+ return noop;
538
+ }
539
+ // The wrapper lives HERE, not in the UI: a throwing click and a REJECTED
540
+ // async click share one funnel — both are logged and reported as a toast.
541
+ // A bare `rawOnClick()` leaves a returned promise unobserved, and an
542
+ // unhandled rejection is fatal to the process guard; `shortcuts.ts` uses
543
+ // the same deferred funnel for its handlers.
544
+ const onClick = rawOnClick === undefined
545
+ ? undefined
546
+ : () => {
547
+ Promise.resolve()
548
+ .then(() => rawOnClick())
549
+ .catch((error) => {
550
+ const failure = error instanceof Error ? error : new Error(String(error));
551
+ logger.warn(`dsh-tui: tuiStatus.setField "${normalized}" click failed: ${failure.message}`);
552
+ store.reportFieldError(normalized, failure);
553
+ });
554
+ };
555
+ const token = state.nextToken++;
556
+ const entry = Object.freeze({
557
+ key: normalized,
558
+ text: cleaned,
559
+ slot,
560
+ tone,
561
+ maxCells,
562
+ minColumns,
563
+ ...(detail === undefined ? {} : { detail }),
564
+ ...(onClick === undefined ? {} : { onClick }),
565
+ });
566
+ store.setField(entry, token, owner, rawOnClick);
567
+ const had = existing !== undefined;
568
+ let disposed = false;
569
+ let ledgerApplied = false;
570
+ let ownerCleanup;
571
+ const dispose = () => {
572
+ if (disposed)
573
+ return;
574
+ disposed = true;
575
+ if (store.clearFieldIf(normalized, token, owner) && ledgerApplied) {
576
+ caller.get('tuiEffectLedger')?.record({ operation: 'release', resource: { kind: 'status-field', id: normalized }, result: 'applied' }, identity);
577
+ }
578
+ const cleanup = ownerCleanup;
579
+ ownerCleanup = undefined;
580
+ cleanup?.();
581
+ };
582
+ const bound = bindCallerEffect(caller, dispose, cleanup => {
583
+ ownerCleanup = cleanup;
584
+ });
585
+ // bindCallerEffect runs the disposer itself when registration fails, so the
586
+ // store entry is already rolled back here.
587
+ if (!bound)
588
+ return noop;
589
+ ledger?.record({
590
+ operation: had ? 'replace' : 'bind',
591
+ resource: { kind: 'status-field', id: normalized },
592
+ result: 'applied',
593
+ ...(had ? { replaces: { resourceId: normalized } } : {}),
594
+ }, identity);
595
+ ledgerApplied = true;
596
+ return dispose;
597
+ }
283
598
  /**
284
599
  * Register a compact React view above the prompt. The component receives
285
600
  * the host's React plus a pointer-only UI kit; it owns its live data via an
@@ -1,30 +1,41 @@
1
1
  /**
2
- * Agent Teams on and off at run time (issue #1241, see
2
+ * Agent Teams status at run time (issue #1241, see
3
3
  * docs/agent-teams-design.md「开关机制」).
4
4
  *
5
- * The switch is the upstream team bundle itself: `/team on|off` selects or
6
- * drops its layer through the host plugin manager (the same write
7
- * `/plugin enable|disable` makes), which persists to the profile and, with
8
- * `hmr` mounted, applies at once. The team tool plugin installs into every
9
- * live root Agent and uninstalls on disposal, so the sessions already running
10
- * follow. What stays here is the one decision that cannot live in a preset —
11
- * which legacy delegation tools a request carries — and the `/team` command.
5
+ * Switching is the upstream team bundle itself: `/plugin enable|disable`
6
+ * selects or drops its layer through the host plugin manager, which persists
7
+ * to the profile and, with `hmr` mounted, applies at once. `/team` is the
8
+ * read-only side: it reports the bundle, the service and this session's
9
+ * teammates, and is exposed only while the `agentTeams` service is mounted —
10
+ * the same availability the desktop UI gives the feature. A typed `/team`
11
+ * before that still answers with the enable route instead of reaching the
12
+ * model.
13
+ *
14
+ * What stays here besides the command is the one decision that cannot live in
15
+ * a preset — which legacy delegation tools a request carries.
12
16
  *
13
17
  * @module
14
18
  */
15
19
  import type { Context } from '@deepseek-ai/cordis';
16
20
  import type { PromptAssembly } from '@deepseek-ai/dsh-system-prompt';
17
- import { type PluginManageFlow, type PluginManageSink, type TeamActiveMembers } from './plugin-manage.js';
21
+ import type { LocalCommand } from '../commands.js';
22
+ import type { TeamActiveMembers } from './plugin-manage.js';
23
+ /**
24
+ * Whether the team service is mounted. This is the one signal `/team` appears
25
+ * on: the desktop UI shows the same feature only while its service is there.
26
+ * @param ctx - Host context of the composition root.
27
+ */
28
+ export declare function teamServiceActive(ctx: Context): boolean;
18
29
  /**
19
- * The install spec the hints name. The team packages ship in lockstep with
20
- * DSH and pin their DSH peers exactly, so only the bundle of the running
21
- * kernel's own version installs into this host (npm `latest` and `next`
22
- * both name other lines).
23
- * @param kernel - The running DSH version; unknown falls back to the validated line.
24
- * @returns `<bundle>@<version>`, or undefined on a known kernel that is not a
25
- * team line: no bundle installs there, DSH has to move to a team line first.
30
+ * Hide `/team` from Help and `/` completion while the service is not mounted.
31
+ * The typed form stays a local command (`isLocalCommandName` still knows the
32
+ * name), so it can answer with the enable route instead of becoming text sent
33
+ * to the model.
34
+ * @param commands - The current command catalog.
35
+ * @param visible - Whether the team service is mounted.
36
+ * @returns The catalog with `/team` removed when it is not.
26
37
  */
27
- export declare function teamBundleSpec(kernel: string | undefined): string | undefined;
38
+ export declare function withTeamCommandVisibility(commands: readonly LocalCommand[], visible: boolean): readonly LocalCommand[];
28
39
  /**
29
40
  * Keep one delegation tool set per request. Presets keep their legacy rows,
30
41
  * so whether the team replaces them is decided where the tools are known: an
@@ -39,36 +50,34 @@ export declare function teamBundleSpec(kernel: string | undefined): string | und
39
50
  export declare function filterTeamReplacedTools(assembly: PromptAssembly): PromptAssembly;
40
51
  /** What `/team` was asked. */
41
52
  export type TeamCommand = {
42
- readonly kind: 'on' | 'off' | 'status';
53
+ readonly kind: 'status';
54
+ }
55
+ /** `on` / `off`: the switch moved to `/plugin enable|disable`. */
56
+ | {
57
+ readonly kind: 'switch';
43
58
  } | {
44
59
  readonly kind: 'unknown';
45
60
  readonly sub: string;
46
61
  };
47
62
  export declare function parseTeamArgs(args: string): TeamCommand;
48
- /** What the screen supplies: the plugin flow's sink, plus the team's live state. */
49
- export interface TeamCommandSink extends PluginManageSink {
63
+ /** What the screen supplies: the bound session's live team counts. */
64
+ export interface TeamCommandSink {
50
65
  /** Teammates of the bound session, how many are running or provisioning, and how many may be running. */
51
66
  readonly members: () => {
52
67
  readonly total: number;
53
68
  } & TeamActiveMembers;
54
69
  }
55
- /** What one `/team` input turned into. */
56
- export type TeamCommandOutcome = {
57
- readonly kind: 'flow';
58
- readonly flow: PluginManageFlow;
59
- } | {
60
- readonly kind: 'lines';
61
- readonly lines: Promise<readonly string[]>;
62
- };
70
+ /** The entry the screen calls: argument text in, report lines out. */
71
+ export type TeamCommandEntry = (args: string, sink: TeamCommandSink) => Promise<readonly string[]>;
63
72
  /**
64
- * Wire `/team` to the running composition.
73
+ * Wire `/team` to the running composition. The command only reports; the
74
+ * bundle switch is `/plugin enable|disable`, which shares the lifecycle flow
75
+ * and its confirmations.
65
76
  * @param ctx - Host context of the composition root.
66
- * @param options - The profile a manual route names, and the running host's
67
- * DSH version (this package's entry; otherwise the installed one is read).
77
+ * @param options - The profile a CLI route names.
68
78
  * @returns the command entry the screen calls.
69
79
  */
70
80
  export declare function createTeamCommandEntry(ctx: Context, options?: {
71
81
  readonly profileName?: string | undefined;
72
- readonly kernelVersion?: string | undefined;
73
- }): (args: string, sink: TeamCommandSink) => TeamCommandOutcome;
82
+ }): TeamCommandEntry;
74
83
  //# sourceMappingURL=team-mode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"team-mode.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/team-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAIpE,OAAO,EAA0B,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAejI;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAG7E;AAaD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc,CAIhF;AAED,8BAA8B;AAC9B,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,KAAK,GAAG,QAAQ,CAAA;CAAE,GAC1C;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAKvD;AAED,oFAAoF;AACpF,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,yGAAyG;IACzG,QAAQ,CAAC,OAAO,EAAE,MAAM;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,iBAAiB,CAAA;CACvE;AAED,0CAA0C;AAC1C,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;CAAE,GAC1D;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAA;CAAE,CAAA;AAE1E;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE;IAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAO,GACvG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,KAAK,kBAAkB,CAqE7D"}
1
+ {"version":3,"file":"team-mode.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/team-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAS3D;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,YAAY,EAAE,CAEtH;AAUD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc,CAIhF;AAED,8BAA8B;AAC9B,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE;AAC7B,kEAAkE;GAChE;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAKvD;AAED,sEAAsE;AACtE,MAAM,WAAW,eAAe;IAC9B,yGAAyG;IACzG,QAAQ,CAAC,OAAO,EAAE,MAAM;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,iBAAiB,CAAA;CACvE;AAED,sEAAsE;AACtE,MAAM,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,KAAK,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAA;AAElG;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE;IAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAO,GAC1D,gBAAgB,CAiBlB"}