@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
@@ -17,13 +17,16 @@
17
17
  * the focus is in the right column — the active panel's own keys (Phase 3
18
18
  * dispatcher), then the host fallback below (panel switching, zoom,
19
19
  * resize, Esc). Plain Ctrl combos fall through to Chat so interrupt /
20
- * exit / redraw keep working from the panel.
20
+ * exit / redraw keep working from the panel; the one exception is the
21
+ * keymap `paste` action while the column actually renders — it is owned by
22
+ * the panel column (issue #1767), see the branch in handleKey.
21
23
  */
22
24
  import React from 'react';
23
25
  import { actionMatches } from '../../utils/keymap.js';
24
- import { applySidePanelOpen, applySidePanelRatio, getSidePanelOpen, getSidePanelPanels, getSidePanelRatio, getSidePanelSplitEnabled, parseSidePanelIds, SIDE_PANEL_ID_PATTERN, subscribeSidePanelOpen, subscribeSidePanelPanels, subscribeSidePanelRatio, subscribeSidePanelSplitEnabled, } from '../../tuiDisplayPrefs.js';
26
+ import { applySidePanelOpen, applySidePanelRatio, getHiddenTemporarySidePanels, getSidePanelOpen, getSidePanelPanels, getSidePanelRatio, getSidePanelSplitEnabled, resolveSidePanelIds, SIDE_PANEL_ID_PATTERN, subscribeHiddenTemporarySidePanels, subscribeSidePanelOpen, subscribeSidePanelPanels, subscribeSidePanelRatio, subscribeSidePanelSplitEnabled, } from '../../tuiDisplayPrefs.js';
25
27
  import { canSplit, nudgeRatio, resolveSidePanelGeometry, resolveSplit, RESIZE_STEP_COLUMNS, } from './dimensions.js';
26
28
  import { panelBridgeRequests, panelBridgeState } from './panelBridge.js';
29
+ import { panelStore } from './PanelStore.js';
27
30
  function useLive(subscribe, get) {
28
31
  return React.useSyncExternalStore(subscribe, get);
29
32
  }
@@ -33,6 +36,16 @@ export function useSidePanel(options) {
33
36
  const openSetting = useLive(subscribeSidePanelOpen, getSidePanelOpen);
34
37
  const ratio = useLive(subscribeSidePanelRatio, getSidePanelRatio);
35
38
  const panelsCsv = useLive(subscribeSidePanelPanels, getSidePanelPanels);
39
+ // The registry half of the enabled set (`sidePanel.panels: '*'`). Subscribe
40
+ // to panelStore but expose an id-string snapshot: badge/hint events also
41
+ // rebuild the store's array identity, and a per-delta Chat re-render would
42
+ // be pure waste — the joined string only changes when a panel registers or
43
+ // unregisters.
44
+ const registeredCsv = React.useSyncExternalStore(panelStore.subscribe, () => panelStore.list().map(entry => entry.definition.id).join(','));
45
+ // The temporary panels this run is hiding (`/settings` toggles them there,
46
+ // not in the stored value): a frozen array whose identity only moves when
47
+ // the set does, so it is a valid snapshot.
48
+ const hiddenTemporaryIds = React.useSyncExternalStore(subscribeHiddenTemporarySidePanels, getHiddenTemporarySidePanels);
36
49
  const [focus, setFocus] = React.useState('chat');
37
50
  const [zoom, setZoom] = React.useState(false);
38
51
  const [activeIdState, setActiveIdState] = React.useState(undefined);
@@ -55,7 +68,14 @@ export function useSidePanel(options) {
55
68
  return entry.handler(input, key) === true;
56
69
  },
57
70
  }), []);
58
- const enabledPanelIds = React.useMemo(() => parseSidePanelIds(panelsCsv), [panelsCsv]);
71
+ // ONE derivation of the enabled set, shared by the PanelBar, /panel, the
72
+ // digit keys, the bridge admission and /settings: the stored value plus the
73
+ // live registry (issue #1662).
74
+ const enabledPanelIds = React.useMemo(() => resolveSidePanelIds(panelsCsv, registeredCsv === '' ? [] : registeredCsv.split(','), hiddenTemporaryIds), [panelsCsv, registeredCsv, hiddenTemporaryIds]);
75
+ // Stable callbacks (the bridge subscription is mounted once) read the
76
+ // latest enabled set through this ref instead of capturing it.
77
+ const enabledIdsRef = React.useRef(enabledPanelIds);
78
+ enabledIdsRef.current = enabledPanelIds;
59
79
  const activePanelId = activeIdState !== undefined && enabledPanelIds.includes(activeIdState)
60
80
  ? activeIdState
61
81
  : enabledPanelIds[0];
@@ -104,7 +124,7 @@ export function useSidePanel(options) {
104
124
  setZoom(false);
105
125
  }, [columns, split]);
106
126
  const openPanel = React.useCallback((id, opts) => {
107
- if (!parseSidePanelIds(getSidePanelPanels()).includes(id))
127
+ if (!enabledIdsRef.current.includes(id))
108
128
  return;
109
129
  setActiveIdState(id);
110
130
  applySidePanelOpen(true);
@@ -112,7 +132,7 @@ export function useSidePanel(options) {
112
132
  setFocus('panel');
113
133
  }, []);
114
134
  const cyclePanel = React.useCallback((delta) => {
115
- const ids = parseSidePanelIds(getSidePanelPanels());
135
+ const ids = enabledIdsRef.current;
116
136
  if (ids.length === 0)
117
137
  return;
118
138
  const current = activeIdState !== undefined && ids.includes(activeIdState)
@@ -149,7 +169,7 @@ export function useSidePanel(options) {
149
169
  setZoom(previous => !previous);
150
170
  return true;
151
171
  }
152
- if (SIDE_PANEL_ID_PATTERN.test(arg) && parseSidePanelIds(getSidePanelPanels()).includes(arg)) {
172
+ if (SIDE_PANEL_ID_PATTERN.test(arg) && enabledIdsRef.current.includes(arg)) {
153
173
  if (!splitAvailable)
154
174
  return false;
155
175
  setActiveIdState(arg);
@@ -177,6 +197,18 @@ export function useSidePanel(options) {
177
197
  }
178
198
  if (focus !== 'panel')
179
199
  return false;
200
+ // 粘贴是 Ctrl/Alt 组合里唯一会把剪贴板内容写进草稿的动作:分栏渲染时
201
+ // 先给活动 Panel(btw composer 能接),它不接也必须吞掉——否则键继续
202
+ // 漏给仍处于 active 的主输入框(issue #1767)。分栏没渲染时(编辑器
203
+ // 展开 / 窄屏)不拦:PanelHost 已卸载、dispatchKey 必然落空,可见的
204
+ // 输入框只有主输入框/全屏编辑器。其余会改草稿的组合(Ctrl+W/U/K/Z、
205
+ // Alt+Backspace 等)仍照旧放行,属既有行为,不在本次范围。
206
+ if (split && actionMatches('paste', input, key)) {
207
+ if (activePanelId !== undefined)
208
+ runtime.dispatchKey(activePanelId, input, key);
209
+ stop();
210
+ return true;
211
+ }
180
212
  // Panel-focused keys. Ctrl/Alt combos fall through to Chat
181
213
  // (interrupt, exit, redraw and the other global actions keep working
182
214
  // from the panel); plain keys are the panel surface's own. Esc is the
@@ -222,7 +254,7 @@ export function useSidePanel(options) {
222
254
  return true;
223
255
  }
224
256
  if (input >= '1' && input <= '9') {
225
- const ids = parseSidePanelIds(getSidePanelPanels());
257
+ const ids = enabledIdsRef.current;
226
258
  const target = ids[Number.parseInt(input, 10) - 1];
227
259
  if (target !== undefined)
228
260
  setActiveIdState(target);
@@ -11,7 +11,7 @@ import type { WaveBand } from '../../dsh-adapter/types.js';
11
11
  * @returns Glyph count, or 0 when the strip should not render at all.
12
12
  */
13
13
  export declare function miniWakeWidth(columns: number): number;
14
- export declare function MiniWake({ band, hint, tick, onOpen, hoverHint, }: {
14
+ export declare function MiniWake({ band, hint, working, onOpen, hoverHint, }: {
15
15
  /** The session projected onto {@link miniWakeWidth} columns. */
16
16
  band: WaveBand;
17
17
  /**
@@ -19,7 +19,7 @@ export declare function MiniWake({ band, hint, tick, onOpen, hoverHint, }: {
19
19
  * opened for the first time. Absent afterwards.
20
20
  */
21
21
  hint?: string;
22
- tick: number;
22
+ working: boolean;
23
23
  /**
24
24
  * Open the trajectory scene. The strip is the conversation's permanent
25
25
  * pointer at that second view, so pointing AT it and clicking is the
@@ -1 +1 @@
1
- {"version":3,"file":"MiniWake.d.ts","sourceRoot":"","sources":["../../../../src/components/trajectory/MiniWake.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,QAAQ,EAAe,MAAM,4BAA4B,CAAA;AAwCvE;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKrD;AAED,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,SAAS,GACV,EAAE;IACD,gEAAgE;IAChE,IAAI,EAAE,QAAQ,CAAA;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB;6CACyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,KAAK,CAAC,SAAS,CAmDlB"}
1
+ {"version":3,"file":"MiniWake.d.ts","sourceRoot":"","sources":["../../../../src/components/trajectory/MiniWake.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,QAAQ,EAAe,MAAM,4BAA4B,CAAA;AA0CvE;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKrD;AAED,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,MAAM,EACN,SAAS,GACV,EAAE;IACD,gEAAgE;IAChE,IAAI,EAAE,QAAQ,CAAA;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;IAChB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB;6CACyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,KAAK,CAAC,SAAS,CAsDlB"}
@@ -6,6 +6,8 @@ import { getTheme } from '../../theme.js';
6
6
  import { alive, mix } from '../../trajectory/motion.js';
7
7
  import { parseRGB } from '../Spinner/spinnerUtils.js';
8
8
  import { dominantChannel } from '../../dsh-adapter/trajectory/index.js';
9
+ import { useAnimationFrame } from '../../ink/hooks/use-animation-frame.js';
10
+ import { useTerminalFocus } from '../../ink/hooks/use-terminal-focus.js';
9
11
  /**
10
12
  * The mini wake — the whole session as a dozen glyphs in the status line.
11
13
  *
@@ -60,15 +62,17 @@ export function miniWakeWidth(columns) {
60
62
  return 8;
61
63
  return 0;
62
64
  }
63
- export function MiniWake({ band, hint, tick, onOpen, hoverHint, }) {
65
+ export function MiniWake({ band, hint, working, onOpen, hoverHint, }) {
64
66
  const [themeName] = useTheme();
65
67
  const theme = getTheme(themeName);
66
68
  const [hovered, setHovered] = React.useState(false);
69
+ const focused = useTerminalFocus();
70
+ const [animationRef, time] = useAnimationFrame(working && focused && band.buckets.length > 0 ? 120 : null);
67
71
  if (band.buckets.length === 0)
68
72
  return null;
69
73
  const logFloor = Math.log1p(Math.max(0, band.floor));
70
74
  const logSpan = Math.max(1e-6, Math.log1p(Math.max(1, band.peak)) - logFloor);
71
- const breath = alive(tick);
75
+ const breath = alive(Math.floor(time / 120));
72
76
  let strip = '';
73
77
  for (const bucket of band.buckets) {
74
78
  if (bucket.count === 0) {
@@ -91,7 +95,7 @@ export function MiniWake({ band, hint, tick, onOpen, hoverHint, }) {
91
95
  // pointer is on the strip — the chord again, because that is the moment the
92
96
  // user is asking "what does this thing do".
93
97
  const shownHint = hint ?? (hovered && onOpen !== undefined ? hoverHint : undefined);
94
- return (_jsx(NoSelect, { children: _jsxs(Box, { flexShrink: 0, flexDirection: "row", gap: 1, onClick: onOpen, onMouseEnter: onOpen !== undefined ? () => setHovered(true) : undefined, onMouseLeave: onOpen !== undefined ? () => setHovered(false) : undefined, children: [_jsx(Text, { children: strip }), shownHint !== undefined ? _jsx(Text, { color: hovered && hint === undefined ? 'accent' : 'subtle', children: shownHint }) : null] }) }));
98
+ return (_jsx(NoSelect, { children: _jsxs(Box, { ref: animationRef, flexShrink: 0, flexDirection: "row", gap: 1, onClick: onOpen, onMouseEnter: onOpen !== undefined ? () => setHovered(true) : undefined, onMouseLeave: onOpen !== undefined ? () => setHovered(false) : undefined, children: [_jsx(Text, { children: strip }), shownHint !== undefined ? _jsx(Text, { color: hovered && hint === undefined ? 'accent' : 'subtle', children: shownHint }) : null] }) }));
95
99
  }
96
100
  /** Theme colour → `#rrggbb`, the form chalk needs. */
97
101
  function toHex(colour) {
@@ -1 +1 @@
1
- {"version":3,"file":"HomeWorkspaceRow.d.ts","sourceRoot":"","sources":["../../../../src/components/workspaces/HomeWorkspaceRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAI9E;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,WAAmB,EACnB,OAAO,EACP,QAAQ,EACR,OAAO,EACP,aAAqB,EACrB,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAA;IACZ,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,sEAAsE;IACtE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0DAA0D;IAC1D,OAAO,EAAE,OAAO,CAAA;IAChB,mEAAmE;IACnE,QAAQ,EAAE,OAAO,CAAA;IACjB,uBAAuB;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,gEAAgE;IAChE,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,QAAQ,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;IAClC,mDAAmD;IACnD,MAAM,CAAC,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAA;CACvC,GAAG,KAAK,CAAC,SAAS,CA0ClB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,KAAK,EACL,MAAM,GACP,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;CACjC,GAAG,KAAK,CAAC,SAAS,CAoBlB"}
1
+ {"version":3,"file":"HomeWorkspaceRow.d.ts","sourceRoot":"","sources":["../../../../src/components/workspaces/HomeWorkspaceRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAI9E;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,WAAmB,EACnB,OAAO,EACP,QAAQ,EACR,OAAO,EACP,aAAqB,EACrB,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAA;IACZ,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,sEAAsE;IACtE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0DAA0D;IAC1D,OAAO,EAAE,OAAO,CAAA;IAChB,mEAAmE;IACnE,QAAQ,EAAE,OAAO,CAAA;IACjB,uBAAuB;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,gEAAgE;IAChE,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,QAAQ,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;IAClC,mDAAmD;IACnD,MAAM,CAAC,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAA;CACvC,GAAG,KAAK,CAAC,SAAS,CAuClB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,KAAK,EACL,MAAM,GACP,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;CACjC,GAAG,KAAK,CAAC,SAAS,CAoBlB"}
@@ -22,14 +22,11 @@ export function HomeWorkspaceRow({ title, path, home, sessionCount, historyOnly
22
22
  const nativeCursor = useNativeCursor();
23
23
  const cursorRef = useDeclaredCursor({ line: 0, column: 0, active: focused && declareCursor, visible: nativeCursor, hideOnIdle: true });
24
24
  const body = Math.max(8, width - 4);
25
- // The presence marker leads the badge on purpose: `spreadRow` may truncate
26
- // the right-hand segment, and "this directory is gone" is the one fact that
27
- // must never be the part that gets cut (the session count is also visible in
28
- // the pane, the missing directory is not).
29
- const count = t('home-sessions-count', { n: sessionCount });
30
- const badge = present ? count : `${t('home-workspace-missing')} · ${count}`;
25
+ // The pane already labels the count; keep the rail's badge numeric and use
26
+ // its selected ring rather than a second check mark for the same state.
27
+ const badge = present ? String(sessionCount) : `${t('home-workspace-missing')} · ${sessionCount}`;
31
28
  const name = historyOnly ? `${t('supervisor-history-only')} · ${title}` : title;
32
- const heading = spreadRow(`${selected ? '▣' : '▢'} ${name}`, `${selected ? '✓ ' : ''}${badge}`, body);
29
+ const heading = spreadRow(`${selected ? '▣' : '▢'} ${name}`, badge, body);
33
30
  const detail = formatProject(path, home);
34
31
  // The cursor (green) outranks the selection ring (green); both outrank the
35
32
  // idle colour. Blue is not part of this ladder at all — see the background.
@@ -56,8 +56,14 @@ export declare function isAgentSession(value: unknown): value is AgentSession;
56
56
  * `AgentSession`. Creating the wrapper acquires nothing: listeners exist only
57
57
  * while `subscribe`/`subscribeRaw` subscriptions are live, and only `dispose()`
58
58
  * releases the handle.
59
+ *
60
+ * `screenOutlivesContext`: the screen showing this session lives longer than
61
+ * `ctx` (the entry's screen over its profile row), so when `ctx` unloads the
62
+ * screen holds this session's queued inputs, and the agent must not run them.
59
63
  */
60
- export declare function createDshSession(ctx: Context, target: DshSessionTarget): AgentSession;
64
+ export declare function createDshSession(ctx: Context, target: DshSessionTarget, options?: {
65
+ readonly screenOutlivesContext?: boolean;
66
+ }): AgentSession;
61
67
  /** The lifetime handle of a DSH session this process created or resumed;
62
68
  * throws when the session borrows its agent (or is not a DSH session). */
63
69
  export declare function dshHandleOf(session: AgentSession): AgentHandle;
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adap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SAAS,YAAY,EAAE,GAAG,SAAS,UAAU,EAAE,CAAA;QACvE,iFAAiF;QACjF,gBAAgB,IAAI,IAAI,CAAA;QACxB,gEAAgE;QAChE,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAA;QAC1D,QAAQ,CAAC,iBAAiB,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;KAC/D;CACF;AAED;2EAC2E;AAC3E,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,CAAA;CAAE,CAAA;AAUhH,wEAAwE;AACxE,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAIpE;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,GAAE;IAAE,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,YAAY,CAmRjJ;AAED;2EAC2E;AAC3E,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,WAAW,CAI9D"}
@@ -1,4 +1,5 @@
1
1
  import { createUserMessage, MessageId } from '@deepseek-ai/dsh-llm';
2
+ import { t } from '../../i18n.js';
2
3
  import { isTokenDelta, tokenDeltaChars } from '../channel/usage.js';
3
4
  import { snapshotLiveSessionEvents } from '../compat/liveSession.js';
4
5
  import { createDshTranslator } from './translate.js';
@@ -19,8 +20,12 @@ export function isAgentSession(value) {
19
20
  * `AgentSession`. Creating the wrapper acquires nothing: listeners exist only
20
21
  * while `subscribe`/`subscribeRaw` subscriptions are live, and only `dispose()`
21
22
  * releases the handle.
23
+ *
24
+ * `screenOutlivesContext`: the screen showing this session lives longer than
25
+ * `ctx` (the entry's screen over its profile row), so when `ctx` unloads the
26
+ * screen holds this session's queued inputs, and the agent must not run them.
22
27
  */
23
- export function createDshSession(ctx, target) {
28
+ export function createDshSession(ctx, target, options = {}) {
24
29
  const agent = target.agent;
25
30
  const handle = isHandle(target) ? target : target.handle;
26
31
  // The tools registry is read lazily, once per session, on the first
@@ -35,6 +40,20 @@ export function createDshSession(ctx, target) {
35
40
  let disposed = false;
36
41
  /** Inputs this session queued that the inbox has not claimed or discarded. */
37
42
  const pending = new Map();
43
+ /** Set while this session's own call (a cancel, a retraction) drops queued
44
+ * inputs: the inbox reports those discards synchronously, inside the call.
45
+ * Any other discard is the kernel's own (the agent's teardown, a hook or
46
+ * parent cancel). */
47
+ let dropping = false;
48
+ const dropOwn = (drop) => {
49
+ dropping = true;
50
+ try {
51
+ return drop();
52
+ }
53
+ finally {
54
+ dropping = false;
55
+ }
56
+ };
38
57
  /**
39
58
  * One `session/event` listener per subscription period, shared by raw and
40
59
  * translated subscribers. Raw subscribers (the DSH extensions) see each
@@ -132,7 +151,7 @@ export function createDshSession(ctx, target) {
132
151
  capabilities: {
133
152
  pendingRetraction: {
134
153
  remove(clientMessageId) {
135
- const removed = agent.inbox.remove(MessageId(clientMessageId));
154
+ const removed = dropOwn(() => agent.inbox.remove(MessageId(clientMessageId)));
136
155
  if (removed)
137
156
  pending.delete(clientMessageId);
138
157
  return removed;
@@ -163,9 +182,40 @@ export function createDshSession(ctx, target) {
163
182
  disposed = true;
164
183
  listener([{ type: 'session.status', status: 'disposed' }], QUIET);
165
184
  }));
185
+ // Every listener here lives on `ctx`. When its fiber unloads (the
186
+ // dsh-tui row goes with the `agents` service it injects), they go
187
+ // with it, and the agent's closing `agent/status` / `agent/disposed`
188
+ // can no longer arrive: the screen would project the turn forever
189
+ // (#1651). Nothing can reach this agent through this session any
190
+ // more, so report it disposed. An unsubscribe has already cleared
191
+ // `active` when it releases this effect, so it reports nothing.
192
+ // Test doubles that serve only `on` have no fiber to follow.
193
+ own(ctx.effect?.(() => () => {
194
+ if (!active)
195
+ return;
196
+ active = false;
197
+ // The agent can outlive the row (a borrowed agent, a row reloaded
198
+ // alone) and would still run what this session queued, while the
199
+ // screen holds those inputs as never sent: take them back, quietly
200
+ // (the screen holds them from the status below). A screen that
201
+ // unloads with `ctx` holds nothing: a surviving agent keeps them.
202
+ if (options.screenOutlivesContext === true) {
203
+ for (const id of [...pending.keys()]) {
204
+ try {
205
+ if (agent.inbox.remove(MessageId(id)))
206
+ pending.delete(id);
207
+ }
208
+ catch { }
209
+ }
210
+ }
211
+ disposed = true;
212
+ listener([{ type: 'session.status', status: 'disposed' }], QUIET);
213
+ }, 'dsh-tui session listeners') ?? (() => undefined));
166
214
  /**
167
215
  * The inbox removed one message. Both events retire the pending entry;
168
- * the channel retires attached context only for a discard.
216
+ * the channel retires attached context only for a discard. A discard
217
+ * this session did not ask for goes out as `dropped`: the input never
218
+ * ran, and the channel keeps it for the user.
169
219
  * `agent/inbox/claimed` fires while the loop claims the batch, before
170
220
  * the resident `agent/pre-step` listener can append the attachment
171
221
  * (dsh-agent-loop: `inbox.claim()` → claimed event → `agent/pre-step`).
@@ -180,7 +230,9 @@ export function createDshSession(ctx, target) {
180
230
  const items = [...pending.values()];
181
231
  listener([how === 'claimed'
182
232
  ? { type: 'pending.changed', items, claimed: [messageId] }
183
- : { type: 'pending.changed', items, discarded: [messageId] }], QUIET);
233
+ : dropping
234
+ ? { type: 'pending.changed', items, discarded: [messageId] }
235
+ : { type: 'pending.changed', items, dropped: [messageId] }], QUIET);
184
236
  };
185
237
  own(ctx.on('agent/inbox/claimed', payload => retire(payload, 'claimed')));
186
238
  own(ctx.on('agent/inbox/discarded', payload => retire(payload, 'discarded')));
@@ -243,12 +295,16 @@ export function createDshSession(ctx, target) {
243
295
  // and a synchronous throw reaches the caller synchronously (the input
244
296
  // pipeline rolls its bookkeeping back on it).
245
297
  submit(input, placement) {
298
+ // A disposed agent can neither run nor report this input: refuse it
299
+ // instead of queuing a preview nothing will ever retire.
300
+ if (disposed)
301
+ return Promise.resolve({ accepted: false, reason: t('input-session-disposed') });
246
302
  const message = messageFor(input);
247
303
  const queued = placement === 'steer' ? 'steer' : 'followup';
248
304
  pending.set(message.id, { id: message.id, text: input.text, placement: queued });
249
305
  try {
250
306
  if (placement === 'now')
251
- agent.cancel({ kind: 'user' });
307
+ dropOwn(() => agent.cancel({ kind: 'user' }));
252
308
  if (placement === 'steer')
253
309
  agent.steer(message);
254
310
  else
@@ -269,7 +325,7 @@ export function createDshSession(ctx, target) {
269
325
  if (cause === 'user')
270
326
  agent.cancel({ kind: 'user' }, { keepInbox: true });
271
327
  else
272
- agent.cancel({ kind: 'user' });
328
+ dropOwn(() => agent.cancel({ kind: 'user' }));
273
329
  // The kernel cancel settles its bookkeeping synchronously: the answer
274
330
  // is definitive either way (kept ids for a 'user' cancel, an emptied
275
331
  // queue otherwise).
@@ -1 +1 @@
1
- {"version":3,"file":"translate.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/backend/translate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAElE,OAAO,KAAK,EAAE,YAAY,EAAqC,MAAM,0BAA0B,CAAA;AAC/F,OAAO,EAAa,KAAK,UAAU,EAAqB,KAAK,cAAc,EAA0D,MAAM,uBAAuB,CAAA;AAElK,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAI3D,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAM1F,MAAM,WAAW,iBAAiB;IAChC;;0DAEsD;IACtD,KAAK,IAAI,iBAAiB,GAAG,SAAS,CAAA;IACtC;4EACwE;IACxE,KAAK,IAAI,OAAO,CAAA;IAChB;+DAC2D;IAC3D,WAAW,IAAI,OAAO,CAAA;CACvB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAE5D;AAED;;;;;;;GA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;GAOG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAmEtD;AA6FD,2EAA2E;AAC3E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB;4BAoL1B,YAAY,KAAG,SAAS,UAAU,EAAE;4BAgKpC,oBAAoB,KAAG,SAAS,UAAU,EAAE;8BAmB1C,SAAS,YAAY,EAAE,KAAG,SAAS,UAAU,EAAE;iBAW9D,IAAI;4BAxUS,MAAM,WAAW,MAAM,KAAG,YAAY,GAAG,SAAS;8BAgBhD,MAAM,WAAW,MAAM,QAAQ,YAAY,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,KAAG,cAAc,GAAG,SAAS;EAgUjI;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
@@ -5,6 +5,8 @@ import { harnessToolResultView, prepareReplayEvents, toolErrorText } from '../ch
5
5
  import { isCompactionCheckpointSource, toolResultPayload } from '../compat/messages.js';
6
6
  import { transcriptImagesOf } from '../transcript-images.js';
7
7
  import { isTeamToolName, TEAM_SPAWN_TOOL, teamMessageOf, teamToolCallView, teamToolResultView } from '../team-tools.js';
8
+ import { refineSessionSearchTitle } from '../session-tools.js';
9
+ import { refineWorktreeCallTitle, WORKTREE_TOOL, worktreeResultView } from '../worktree-tool.js';
8
10
  import { teamMailboxAsRelay, withoutTeammateReminder } from '../compat/agent-team-0.2.0.js';
9
11
  /**
10
12
  * DeepSeek's rate windows, injected into the shared projector as its
@@ -25,6 +27,7 @@ export function dshEmits(type) {
25
27
  switch (type) {
26
28
  case 'session.title':
27
29
  case 'session.color':
30
+ case 'session.cwd':
28
31
  case 'session.status':
29
32
  case 'turn.start':
30
33
  case 'turn.end':
@@ -197,7 +200,11 @@ export function createDshTranslator(deps) {
197
200
  const tool = deps.tools()?.get(name, deps.scope());
198
201
  if (tool?.presentCall === undefined)
199
202
  return teamToolCallView(name, rawArgs);
200
- return tool.presentCall(JSON.parse(rawArgs));
203
+ // The session-search calls carry a static sentence the card header would
204
+ // repeat verbatim; put the query back in the header (session-tools.ts),
205
+ // and the branch in a create_worktree header (worktree-tool.ts).
206
+ const view = tool.presentCall(JSON.parse(rawArgs));
207
+ return refineWorktreeCallTitle(name, refineSessionSearchTitle(name, view, rawArgs), rawArgs);
201
208
  }
202
209
  catch {
203
210
  return undefined;
@@ -216,11 +223,12 @@ export function createDshTranslator(deps) {
216
223
  return local;
217
224
  const tool = deps.tools()?.get(name, deps.scope());
218
225
  if (tool?.presentResult === undefined) {
219
- // Only the team tools read the text: skip joining every other result.
220
- if (!isTeamToolName(name))
226
+ // Only the team and worktree tools read the text: skip joining every
227
+ // other result.
228
+ if (!isTeamToolName(name) && name !== WORKTREE_TOOL)
221
229
  return undefined;
222
230
  const text = toolResultPayload(data.message).content.map(item => (item.type === 'text' ? item.text : '')).join('').trim();
223
- return teamToolResultView(name, rawArgs, text);
231
+ return name === WORKTREE_TOOL ? worktreeResultView(name, rawArgs, text) : teamToolResultView(name, rawArgs, text);
224
232
  }
225
233
  return tool.presentResult(JSON.parse(rawArgs), {
226
234
  ...toolResultPayload(data.message),
@@ -464,6 +472,12 @@ export function createDshTranslator(deps) {
464
472
  const aliases = PRESET_ALIASES.get(preset);
465
473
  return [{ type: 'preset.selected', preset, ...(aliases === undefined ? {} : { aliases }) }];
466
474
  }
475
+ case 'working-directory/change': {
476
+ // DSH 0.2.1+ (`dsh-working-directory`, not in dsh-session's typed
477
+ // union — matched by name). The header keeps the original project.
478
+ const cwd = data.cwd;
479
+ return typeof cwd === 'string' && cwd !== '' ? [{ type: 'session.cwd', cwd }] : NO_EVENTS;
480
+ }
467
481
  case 'session/color': {
468
482
  // `/color` accent (dsh-tui plugin event): '' clears to the default.
469
483
  const color = data.color;
@@ -19,9 +19,9 @@
19
19
  * descriptor chain by itself. Since W-2 (stage C) that chain *is* wired —
20
20
  * `Backend` is a host-published contract, the profile pins this family's contract
21
21
  * profile by digest and the descriptor publishes the coordinate only on real
22
- * probe evidence ({@link probeBackendAdmission}) — while the step that reads a
23
- * mounted bundle's declaration into {@link registerBackend} is still the stage C
24
- * install chain's work.
22
+ * probe evidence ({@link probeBackendAdmission}) — and since D-1 the step that
23
+ * reads a mounted bundle's declaration into {@link registerBackend} is the
24
+ * boot-time assembly (`backend-assembly.ts`), not the install chain's work.
25
25
  *
26
26
  * **Published codes.** The contract profile
27
27
  * (`tui-profile/registry/contracts/backend-v1alpha1.json`) publishes exactly the
@@ -18,7 +18,7 @@ type ApprovalStore = {
18
18
  /** Owns detached background handles and the agent-view projection. */
19
19
  export declare function createAgentViewProjection(ctx: Context, deps: {
20
20
  owner: Pick<ChannelOwner, 'current' | 'assertActive' | 'own'>;
21
- binding: Pick<Binding, 'agent' | 'capture' | 'isCurrent' | 'prepare' | 'abandon' | 'waitForDisposal'>;
21
+ binding: Pick<Binding, 'agent' | 'session' | 'capture' | 'isCurrent' | 'prepare' | 'abandon' | 'waitForDisposal'>;
22
22
  cwd(): string;
23
23
  configuredPreset?: string;
24
24
  configuredProvider?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"agent-view-projection.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/agent-view-projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAsB,MAAM,wBAAwB,CAAA;AACpF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAqBlD,OAAO,EAAqD,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAG7G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,KAAK,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
218
  return true;
219
219
  };
220
220
  const attach = async (sessionId) => {
221
- if (sessionId === String(deps.binding.agent.session.id))
221
+ // Same rule as `/resume` (#1651): a foreground whose agent unloaded under
222
+ // the screen has ended, so attaching to its own id reopens the log.
223
+ if (sessionId === String(deps.binding.agent.session.id) && deps.binding.session.status !== 'disposed')
222
224
  return { ok: true };
223
225
  const capture = deps.binding.capture();
224
226
  // A retiring Agent can remain in the registry until its JSONL writer has
@@ -36,7 +36,7 @@ export declare function createBindingEvents(ctx: Context, deps: {
36
36
  inputConvergence: InputConvergence;
37
37
  modelSelection: ReturnType<typeof createModelSelection>;
38
38
  modelActions: {
39
- applyPreferredEffort(): Promise<void>;
39
+ applyPreferredEffort(preserveSessionEffort?: boolean): Promise<void>;
40
40
  };
41
41
  modeActions: {
42
42
  refreshMode(): void;
@@ -84,6 +84,10 @@ export declare function createBindingEvents(ctx: Context, deps: {
84
84
  * Optional for direct/embed constructors that never emit inbox discards;
85
85
  * channel.ts always wires it. */
86
86
  retireAttachment?(messageId: string): void;
87
+ /** The session's current directory moved (DSH `working-directory/change`),
88
+ * called once the projector has folded the move. Directory-scoped views
89
+ * (skill commands, loaded context) re-read against it. */
90
+ onWorkingDirectoryChange?(): void;
87
91
  }): {
88
92
  bind: (seed?: readonly import("../../agent/events.js").AgentEvent[]) => void;
89
93
  hooks: {
@@ -1 +1 @@
1
- {"version":3,"file":"binding-events.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/binding-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AACzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAIpE,OAAO,EAAwE,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAChI,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,C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M,GAAG,IAAI,CAAA;IAC1C;;+DAE2D;IAC3D,wBAAwB,CAAC,IAAI,IAAI,CAAA;CAClC;;;;wBAsEmB,IAAI;+CAImB,YAAY,GAAG,IAAI;;EAsE7D;AAED,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA"}
@@ -3,6 +3,7 @@ import { t } from '../../i18n.js';
3
3
  import { runningPresetOf } from '../presets.js';
4
4
  import { agentCapabilityEvidence, resolveAgentCapabilities } from './capabilities.js';
5
5
  import { createSessionBatchRouter, createSessionBinder } from './core/binding-feed.js';
6
+ import { sessionWorkingDirectory } from '../../channel/working-directory.js';
6
7
  /**
7
8
  * Foreground transcript listeners capture a binding generation: the bound
8
9
  * `AgentSession`'s event batches feed the shared projector, and the DSH
@@ -107,7 +108,14 @@ export function createBindingEvents(ctx, deps) {
107
108
  deps.state.provider = selected.provider;
108
109
  deps.state.model = selected.model;
109
110
  }
110
- void deps.modelActions.applyPreferredEffort();
111
+ const recorded = deps.binding.agent.session.requestHeader?.()?.config;
112
+ // Reattachment keeps a live pin; an adopted header also owns the
113
+ // absence of a pin. A child on a different route still seeds normally.
114
+ const preserveSessionEffort = selected?.reasoningEffort !== undefined ||
115
+ (recorded?.provider === deps.state.provider && recorded?.model === deps.state.model);
116
+ if (preserveSessionEffort)
117
+ deps.state.reasoningEffort = selected === undefined ? recorded?.reasoningEffort : selected.reasoningEffort;
118
+ void deps.modelActions.applyPreferredEffort(preserveSessionEffort);
111
119
  deps.modeActions.refreshMode();
112
120
  // Same pattern as the preferred effort above: the remembered
113
121
  // permission preference seeds sessions that never chose their own.
@@ -132,6 +140,15 @@ export function createBindingEvents(ctx, deps) {
132
140
  deps.messageObserver?.publish(native.agent.session, event);
133
141
  deps.modeActions.onSessionEvent(native.agent.session, event);
134
142
  deps.jobs?.onSessionEvent(event);
143
+ if (event.type === 'working-directory/change') {
144
+ // The projector folds this event later in the same dispatch; only a
145
+ // move to a different directory refreshes.
146
+ const before = sessionWorkingDirectory(deps.state);
147
+ queueMicrotask(() => {
148
+ if (current() && sessionWorkingDirectory(deps.state) !== before)
149
+ deps.onWorkingDirectoryChange?.();
150
+ });
151
+ }
135
152
  }));
136
153
  },
137
154
  };
@@ -1 +1 @@
1
- {"version":3,"file":"command-completions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/command-completions.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8C,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAM1G,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAmC9C,wFAAwF;AACxF,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAC7C,KAAK,EAAE,MAAM,YAAY,CAAA;IACzB,SAAS,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;IACjD,YAAY,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,qBAAqB,EAAE,CAAA;KAAE,CAAA;IACtF,iBAAiB,IAAI,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACnG;4EACwE;IACxE,UAAU,CAAC,IAAI,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;IAC5C,yEAAyE;IACzE,MAAM,CAAC,EAAE;QACP,eAAe,IAAI,IAAI,CAAA;QACvB,WAAW,IAAI,SAAS,qBAAqB,EAAE,CAAA;KAChD,CAAA;IACD,KAAK,EAAE;QACL,cAAc,IAAI,IAAI,CAAA;QACtB,UAAU,IAAI,SAAS,qBAAqB,EAAE,CAAA;QAC9C,iBAAiB,IAAI,IAAI,CAAA;QACzB,aAAa,IAAI,SAAS;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,SAAS,CAAC,EAAE,OAAO,CAAA;SAAE,EAAE,CAAA;QACpG,gBAAgB,IAAI,IAAI,CAAA;KACzB,CAAA;CACF,IAES,OAAO,MAAM,qDAiJtB"}
1
+ {"version":3,"file":"command-completions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/command-completions.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8C,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAO1G,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAmC9C,wFAAwF;AACxF,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAC7C,KAAK,EAAE,MAAM,YAAY,CAAA;IACzB,SAAS,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;IACjD,YAAY,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,qBAAqB,EAAE,CAAA;KAAE,CAAA;IACtF,iBAAiB,IAAI,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACnG;4EACwE;IACxE,UAAU,CAAC,IAAI,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;IAC5C,yEAAyE;IACzE,MAAM,CAAC,EAAE;QACP,eAAe,IAAI,IAAI,CAAA;QACvB,WAAW,IAAI,SAAS,qBAAqB,EAAE,CAAA;KAChD,CAAA;IACD,KAAK,EAAE;QACL,cAAc,IAAI,IAAI,CAAA;QACtB,UAAU,IAAI,SAAS,qBAAqB,EAAE,CAAA;QAC9C,iBAAiB,IAAI,IAAI,CAAA;QACzB,aAAa,IAAI,SAAS;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,SAAS,CAAC,EAAE,OAAO,CAAA;SAAE,EAAE,CAAA;QACpG,gBAAgB,IAAI,IAAI,CAAA;KACzB,CAAA;CACF,IAES,OAAO,MAAM,qDAmJtB"}
@@ -1,5 +1,6 @@
1
1
  import { completeCommands, isCommandCompletionToken } from '../../commands.js';
2
- import { getSidePanelPanels, parseSidePanelIds } from '../../tuiDisplayPrefs.js';
2
+ import { getHiddenTemporarySidePanels, getSidePanelPanels, resolveSidePanelIds } from '../../tuiDisplayPrefs.js';
3
+ import { panelStore } from '../../components/sidePanel/PanelStore.js';
3
4
  import { SESSION_COLOR_NAMES } from '../../terminal-utils/sessionColors.js';
4
5
  import { getLang, LANGS, t } from '../../i18n.js';
5
6
  import { PERMISSION_PRESET_AUTO, permissionPresetKeys } from '../../permissionPresetLabels.js';
@@ -86,12 +87,6 @@ export function createCommandCompletions(deps) {
86
87
  model.warmPresetOptions();
87
88
  return [{ name: 'status', description: 'Show the current agent preset', descriptionKey: 'sugg-status-desc' }, ...model.presetOptions().map(preset => ({ name: preset.id, description: preset.description ?? preset.name ?? preset.id, ...(preset.id === state.agentPreset ? { tag: 'current' } : preset.isDefault ? { tag: 'default' } : {}) }))];
88
89
  }
89
- if (path.length === 1 && path[0] === 'team')
90
- return [
91
- { name: 'status', description: 'Show the team mode state', descriptionKey: 'sugg-status-desc' },
92
- { name: 'on', description: 'Switch Agent Teams on', descriptionKey: 'sugg-team-on-desc' },
93
- { name: 'off', description: 'Switch Agent Teams off', descriptionKey: 'sugg-team-off-desc' },
94
- ];
95
90
  if (path.length === 1 && path[0] === 'activity')
96
91
  return [
97
92
  { name: 'status', description: 'Show the current activity preset', descriptionKey: 'sugg-status-desc' },
@@ -159,7 +154,10 @@ export function createCommandCompletions(deps) {
159
154
  { name: 'toggle', description: 'Toggle the sidebar', descriptionKey: 'sugg-panel-toggle-desc' },
160
155
  { name: 'focus', description: 'Focus the side panel', descriptionKey: 'sugg-panel-focus-desc' },
161
156
  { name: 'zoom', description: 'Zoom the active panel', descriptionKey: 'sugg-panel-zoom-desc' },
162
- ...parseSidePanelIds(getSidePanelPanels()).map(id => ({ name: id, description: `Open the ${id} panel`, descriptionKey: 'sugg-panel-id-desc' })),
157
+ // Same derivation as the bar and the picker: a temporary panel hidden
158
+ // for this run must not be suggested, or running the suggestion only
159
+ // reaches the "unavailable" fallback.
160
+ ...resolveSidePanelIds(getSidePanelPanels(), panelStore.list().map(entry => entry.definition.id), getHiddenTemporarySidePanels()).map(id => ({ name: id, description: `Open the ${id} panel`, descriptionKey: 'sugg-panel-id-desc' })),
163
161
  ];
164
162
  if (path.length === 1 && path[0] === 'plan')
165
163
  return [