@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
@@ -23,7 +23,7 @@ function permissionOptions() {
23
23
  const planOption = () => ({ id: 'plan', label: codexText('codex-mode-plan'), description: codexText('codex-mode-plan-desc') });
24
24
  export function createCodexControls(deps) {
25
25
  const { hub, settings, ctx, prefs } = deps;
26
- let rows = [];
26
+ let rows;
27
27
  let planSupported = true;
28
28
  let settingsSupported = true;
29
29
  let pending = {};
@@ -56,7 +56,7 @@ export function createCodexControls(deps) {
56
56
  options.push(mapped);
57
57
  return options;
58
58
  };
59
- const currentRow = () => rows.find(row => row.model === settings.model || row.id === settings.model);
59
+ const currentRow = () => rows?.find(row => row.model === settings.model || row.id === settings.model);
60
60
  const collaboration = (mode, model = settings.model, effort = settings.effort) => ({ mode, settings: { model, reasoning_effort: effort, developer_instructions: null } });
61
61
  /** An accepted update is sticky server-side, not an override for every turn. */
62
62
  const acknowledge = (applied) => {
@@ -122,7 +122,7 @@ export function createCodexControls(deps) {
122
122
  async set(ref) {
123
123
  await models();
124
124
  const model = deps.actualModel?.(ref.model) ?? ref.model;
125
- const nextRow = rows.find(row => row.model === model || row.id === model);
125
+ const nextRow = rows?.find(row => row.model === model || row.id === model);
126
126
  const available = arr(nextRow?.supportedReasoningEfforts).map(raw => str(rec(raw)?.reasoningEffort));
127
127
  const effort = settings.effort !== null && available.length > 0 && !available.includes(settings.effort) ? str(nextRow?.defaultReasoningEffort) ?? null : settings.effort;
128
128
  await update({ model, ...(effort === settings.effort ? {} : { effort }) });
@@ -136,15 +136,16 @@ export function createCodexControls(deps) {
136
136
  },
137
137
  },
138
138
  effort: {
139
+ get levelsAvailable() { return rows !== undefined; },
139
140
  levels: () => effortLevels(currentRow()),
140
141
  forModel: ref => {
141
142
  const model = deps.actualModel?.(ref.model) ?? ref.model;
142
- const row = rows.find(row => row.model === model || row.id === model);
143
+ const row = rows?.find(row => row.model === model || row.id === model);
143
144
  return { levels: effortLevels(row), defaultEffort: str(row?.defaultReasoningEffort) };
144
145
  },
145
146
  current: () => settings.effort ?? undefined,
146
147
  async set(id) {
147
- if (rows.length === 0)
148
+ if (rows === undefined || rows.length === 0)
148
149
  await models();
149
150
  if (id !== null && !effortLevels(currentRow()).some(option => option.id === id))
150
151
  throw new Error(codexText('effort-invalid', { id, ids: effortLevels(currentRow()).map(option => option.id).join(', ') }));
@@ -1 +1 @@
1
- {"version":3,"file":"goals.d.ts","sourceRoot":"","sources":["../../../../../src/backends/codex/session/goals.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAExE,OAAO,EAAiB,KAAK,GAAG,EAAE,MAAM,cAAc,CAAA;AAEtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAG7C,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,SAAW,GAAG,YAAY,CAAC,aAAa,CAAC,GAAG,SAAS,CAmB1G;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE;IACrC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;IACpC,QAAQ,IAAI,MAAM,CAAA;IAClB,IAAI,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,IAAI,CAAA;IACzC,KAAK,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;;;gCAwDs0W,CAAC;;;;;;kBAxBhzW,OAAO,CAAC,IAAI,CAAC;yBAeZ,MAAM,UAAU,GAAG,GAAG,OAAO;aAKzC,IAAI;aACJ,IAAI;EAEhB"}
1
+ {"version":3,"file":"goals.d.ts","sourceRoot":"","sources":["../../../../../src/backends/codex/session/goals.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAExE,OAAO,EAAiB,KAAK,GAAG,EAAE,MAAM,cAAc,CAAA;AAEtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAG7C,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,SAAW,GAAG,YAAY,CAAC,aAAa,CAAC,GAAG,SAAS,CAmB1G;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE;IACrC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;IACpC,QAAQ,IAAI,MAAM,CAAA;IAClB,IAAI,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,IAAI,CAAA;IACzC,KAAK,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;;;gCAwDw8W,CAAC;;;;;;kBAxBl7W,OAAO,CAAC,IAAI,CAAC;yBAeZ,MAAM,UAAU,GAAG,GAAG,OAAO;aAKzC,IAAI;aACJ,IAAI;EAEhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"side-query.d.ts","sourceRoot":"","sources":["../../../../../src/backends/codex/session/side-query.ts"],"names":[],"mappings":"AAMA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAc,MAAM,eAAe,CAAA;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAG5D,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IAAC,QAAQ,IAAI,MAAM,CAAC;IAAC,MAAM,IAAI,OAAO,CAAC;IAAC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE;;;2BA6GuiM,CAAC;2BAA8B,CAAC;;;0BAAsF,CAAC;;;iBA1Gr2M,IAAI;aAwGsB,IAAI;EACrD"}
1
+ {"version":3,"file":"side-query.d.ts","sourceRoot":"","sources":["../../../../../src/backends/codex/session/side-query.ts"],"names":[],"mappings":"AAMA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAc,MAAM,eAAe,CAAA;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAG5D,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IAAC,QAAQ,IAAI,MAAM,CAAC;IAAC,MAAM,IAAI,OAAO,CAAC;IAAC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE;;;2BA6GyqM,CAAC;2BAA8B,CAAC;;;0BAAsF,CAAC;;;iBA1Gv+M,IAAI;aAwGsB,IAAI;EACrD"}
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../src/backends/codex/translate/events.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAiExD"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../src/backends/codex/translate/events.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAmExD"}
@@ -55,8 +55,10 @@ export function codexEmits(type) {
55
55
  case 'question.settled':
56
56
  return true;
57
57
  // No native source: task metadata patches, compaction summary progress,
58
- // DSH presets/prompts/request headers, or direct agent-message receipts.
58
+ // DSH presets/prompts/request headers/directory moves, or direct
59
+ // agent-message receipts.
59
60
  case 'task.update':
61
+ case 'session.cwd':
60
62
  case 'compaction.progress':
61
63
  case 'preset.selected':
62
64
  case 'system.prompt':
@@ -1 +1 @@
1
- {"version":3,"file":"channel-tokens.d.ts","sourceRoot":"","sources":["../../../../src/backends/shared/channel-tokens.ts"],"names":[],"mappings":"AAsCA;mDACmD;AACnD,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAGlD;AAED,0EAA0E;AAC1E,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACrC;mEAC+D;IAC/D,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACvC,4CAA4C;IAC5C,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,2DAA2D;IAC3D,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAC/B;AAID;kCACkC;AAClC,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,MAAqB,EAAE,KAAK,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAsB,GAAG,iBAAiB,CA6FpI;AAED,6CAA6C;AAC7C,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAAG,iBAAiB,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAAE,CASjJ;AAED,oFAAoF;AACpF,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAA;AACnD,oFAAoF;AACpF,eAAO,MAAM,uBAAuB,0BAAoB,CAAA;AACxD,sFAAsF;AACtF,eAAO,MAAM,yBAAyB,4BAAsB,CAAA"}
1
+ {"version":3,"file":"channel-tokens.d.ts","sourceRoot":"","sources":["../../../../src/backends/shared/channel-tokens.ts"],"names":[],"mappings":"AAuCA;mDACmD;AACnD,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAGlD;AAED,0EAA0E;AAC1E,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACrC;mEAC+D;IAC/D,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACvC,4CAA4C;IAC5C,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,2DAA2D;IAC3D,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAC/B;AAID;kCACkC;AAClC,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,MAAqB,EAAE,KAAK,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAsB,GAAG,iBAAiB,CA6FpI;AAED,6CAA6C;AAC7C,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAAG,iBAAiB,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAAE,CASjJ;AAED,oFAAoF;AACpF,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAA;AACnD,oFAAoF;AACpF,eAAO,MAAM,uBAAuB,0BAAoB,CAAA;AACxD,sFAAsF;AACtF,eAAO,MAAM,yBAAyB,4BAAsB,CAAA"}
@@ -8,9 +8,10 @@
8
8
  *
9
9
  * This module is a direct, host-side file view of that store (a non-DSH
10
10
  * backend has no cordis context to resolve `ctx.get('credentials')` from).
11
- * Reads consult the active home's store and then the default `~/.dsh` store
12
- * (`credentialStoreFiles`), so a `DSH_HOME` override does not orphan a key the
13
- * user stored at the documented location; writes always target the active home.
11
+ * Channel refs belong to the active home's store. Other refs (provider
12
+ * env_key credentials) also consult the default `~/.dsh` store, so a
13
+ * `DSH_HOME` override does not orphan those keys. Writes and erases always
14
+ * target the active home.
14
15
  * The store is edited through a YAML document parser (`yaml`): the top-level
15
16
  * `refs` mapping is found in block or flow style, quoted keys included;
16
17
  * foreign fields, comments and multiline scalars keep their meaning, and a
@@ -46,10 +47,10 @@ const FILE = '.credentials.yaml';
46
47
  * `~/.dsh/.credentials.yaml`). */
47
48
  export function fileChannelTokens(home = dshHomeDir(), debug = () => undefined) {
48
49
  const path = join(home, FILE);
49
- // Writes stay in the active home; reads also consult the default `~/.dsh`
50
- // store so a key stored at the documented location survives a DSH_HOME
51
- // override (the codex bridge injects provider env keys from here).
50
+ // Only provider refs fall back: a removed channel must not inherit another
51
+ // home's old token. Keep read/declared aligned with write/erase ownership.
52
52
  const files = credentialStoreFiles(home);
53
+ const filesFor = (ref) => ref.startsWith('CHANNEL_') ? [path] : files;
53
54
  /** Parse one store into a YAML document; undefined for a file that
54
55
  * cannot be read or does not parse (never rebuilt over). An absent file
55
56
  * parses as an empty document, so the first write can create it. */
@@ -102,7 +103,7 @@ export function fileChannelTokens(home = dshHomeDir(), debug = () => undefined)
102
103
  };
103
104
  return {
104
105
  read: ref => {
105
- for (const file of files) {
106
+ for (const file of filesFor(ref)) {
106
107
  const value = refsAt(file)?.get(ref);
107
108
  // Only a non-empty string scalar is a token; null/number/boolean
108
109
  // scalars are declared but not usable credential material.
@@ -146,7 +147,7 @@ export function fileChannelTokens(home = dshHomeDir(), debug = () => undefined)
146
147
  refs.delete(ref);
147
148
  commit(doc.toString({ lineWidth: 0 }));
148
149
  },
149
- declared: ref => files.some(file => refsAt(file)?.has(ref) === true),
150
+ declared: ref => filesFor(ref).some(file => refsAt(file)?.has(ref) === true),
150
151
  };
151
152
  }
152
153
  /** An in-memory store (tests, embedders). */
@@ -1 +1 @@
1
- {"version":3,"file":"history-restore.d.ts","sourceRoot":"","sources":["../../../src/channel/history-restore.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAsB,OAAO,EAA+B,MAAM,kCAAkC,CAAA;AAChH,OAAO,KAAK,EAAE,UAAU,EAAgB,MAAM,oBAAoB,CAAA;AAGlE,OAAO,EAAyC,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAE7F,yEAAyE;AACzE,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAWjD;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,CAoFxF;AAuCD,+EAA+E;AAC/E,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,EAAE,YAAY,EAAE,eAAe,CAAC,cAAc,CAAC,GAAG,OAAO,EAAE,CAsB3H;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,OAAO,EAAE,GAAG,MAAM,CAcrF"}
1
+ {"version":3,"file":"history-restore.d.ts","sourceRoot":"","sources":["../../../src/channel/history-restore.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAsB,OAAO,EAA+B,MAAM,kCAAkC,CAAA;AAChH,OAAO,KAAK,EAAE,UAAU,EAAgB,MAAM,oBAAoB,CAAA;AAGlE,OAAO,EAAyC,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAE7F,yEAAyE;AACzE,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAWjD;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,CAoFxF;AAyCD,+EAA+E;AAC/E,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,EAAE,YAAY,EAAE,eAAe,CAAC,cAAc,CAAC,GAAG,OAAO,EAAE,CAsB3H;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,OAAO,EAAE,GAAG,MAAM,CAcrF"}
@@ -143,6 +143,7 @@ function scratchState(thinkingFold) {
143
143
  model: '',
144
144
  lastUsage: undefined,
145
145
  turnUsage: undefined,
146
+ turnOutcome: undefined,
146
147
  lastUserText: '',
147
148
  responseChars: 0,
148
149
  tps: undefined,
@@ -156,6 +157,7 @@ function scratchState(thinkingFold) {
156
157
  agentPreset: undefined,
157
158
  sessionColor: '',
158
159
  costReport: undefined,
160
+ workingDirectory: undefined,
159
161
  rows: [],
160
162
  tpsSamples: [],
161
163
  todos: [],
@@ -1 +1 @@
1
- {"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../src/channel/interaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,oBAAoB,CAAA;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAmB,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAExE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAA;IACrC,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAA;IACrC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B;AAED,+CAA+C;AAC/C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC,mBAAmB,EAAE,aAAa,GAAG,WAAW,CAAC,CAAA;CAC9E;AA4BD,0DAA0D;AAC1D,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,kBAAkB;IAiDtF,oDAAoD;iBACvC,SAAS,UAAU,EAAE,GAAG,IAAI;IAqBzC,4EAA4E;eACjE,IAAI;EAQlB"}
1
+ {"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../src/channel/interaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,oBAAoB,CAAA;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAmB,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAExE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAA;IACrC,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAA;IACrC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B;AAED,+CAA+C;AAC/C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC,mBAAmB,EAAE,aAAa,GAAG,WAAW,CAAC,CAAA;CAC9E;AA6BD,0DAA0D;AAC1D,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,kBAAkB;IAiDtF,oDAAoD;iBACvC,SAAS,UAAU,EAAE,GAAG,IAAI;IAqBzC,4EAA4E;eACjE,IAAI;EAQlB"}
@@ -8,6 +8,7 @@ function storeRequest(request, signal) {
8
8
  questions: request.questions.map((question, index) => ({
9
9
  id: String(index),
10
10
  question: question.question,
11
+ ...(question.purpose === undefined ? {} : { purpose: question.purpose }),
11
12
  ...(question.header === undefined ? {} : { header: question.header }),
12
13
  ...(question.detail === undefined ? {} : { detail: question.detail }),
13
14
  options: question.options.map(option => ({ label: option.label, ...(option.description === undefined ? {} : { description: option.description }) })),
@@ -21,7 +21,7 @@ type Mutable<T> = {
21
21
  -readonly [K in keyof T]: T[K];
22
22
  };
23
23
  /** The channel state slice the projector writes. */
24
- export interface ProjectionState extends Mutable<Pick<ChannelUi, 'thinkingFold' | 'activeToolCount' | 'spinnerMode' | 'goal' | 'contextSegments' | 'tokens' | 'mainCost' | 'model' | 'lastUsage' | 'turnUsage' | 'lastUserText' | 'responseChars' | 'tps' | 'cancelPending' | 'working' | 'compaction' | 'turnStart' | 'contextWindow' | 'reasoningEffort' | 'sessionTitle' | 'agentPreset' | 'sessionColor' | 'costReport'>> {
24
+ export interface ProjectionState extends Mutable<Pick<ChannelUi, 'thinkingFold' | 'activeToolCount' | 'spinnerMode' | 'goal' | 'contextSegments' | 'tokens' | 'mainCost' | 'model' | 'lastUsage' | 'turnUsage' | 'turnOutcome' | 'lastUserText' | 'responseChars' | 'tps' | 'cancelPending' | 'working' | 'compaction' | 'turnStart' | 'contextWindow' | 'reasoningEffort' | 'sessionTitle' | 'agentPreset' | 'sessionColor' | 'costReport' | 'workingDirectory'>> {
25
25
  rows: ChatRow[];
26
26
  tpsSamples: {
27
27
  tps: number;
@@ -1 +1 @@
1
- {"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../../src/channel/projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAkC,MAAM,kCAAkC,CAAA;AAEnI,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAgB,gBAAgB,EAAsC,MAAM,oBAAoB,CAAA;AASxI,OAAO,EAAiG,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AAE9I,KAAK,OAAO,CAAC,CAAC,IA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AAc,KAAG,IAAI;iBA2BvD,IAAI;2BAlqCM,IAAI;6BAmDF,IAAI;;;;;;;;;;;EA8oCnC;AAED,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
@@ -10,6 +10,8 @@ import { ARGS_PREVIEW_LIMIT, LOCAL_OUTPUT_LIMIT, preview, RESULT_PREVIEW_LIMIT }
10
10
  import { addUsageToBucket, emptyCostBuckets, estimateTokens, estimateTokensFraction, usageOutputTokens } from './usage.js';
11
11
  /** Notice keys whose live toast is tracked (a repeat replaces it). */
12
12
  const MAX_KEYED_TOASTS = 32;
13
+ /** Short buffered deliveries are not reliable decode-rate samples. */
14
+ const MIN_TPS_DECODE_MS = 500;
13
15
  const NO_IMAGES = [];
14
16
  /** Joined, trimmed text of every `text` block (what a bubble or card body shows). */
15
17
  export function textOfBlocks(blocks) {
@@ -436,7 +438,7 @@ export function createChannelProjection(state, deps) {
436
438
  tps.firstTokenTime ??= time;
437
439
  tps.outputEstimate += tokenDeltaEstimate(delta);
438
440
  const elapsedMs = Math.max(0, time - tps.firstTokenTime);
439
- if (elapsedMs > 500) {
441
+ if (elapsedMs > MIN_TPS_DECODE_MS) {
440
442
  const decodeMs = tpsTurnDecodeMs + elapsedMs;
441
443
  const outputTokens = tpsTurnDecodeTokens + Math.ceil(tps.outputEstimate);
442
444
  state.tps = outputTokens / (decodeMs / 1000);
@@ -611,14 +613,14 @@ export function createChannelProjection(state, deps) {
611
613
  if (usage !== undefined)
612
614
  bookUsage(usage, event);
613
615
  const tpsMessageStep = tpsStep;
614
- // Same-timestamp delivery has no measurable decode span; its tokens
615
- // must not inflate the rate of another step in this turn.
616
+ // Only reliable spans enter the rate ledger, including late-usage
617
+ // reconciliation. Billing above still includes every delivered token.
616
618
  if (tpsTurn === event.turn &&
617
619
  tpsMessageStep !== undefined &&
618
620
  tpsMessageStep.turn === event.turn &&
619
621
  tpsMessageStep.step === event.step &&
620
622
  tpsMessageStep.firstTokenTime !== undefined &&
621
- event.time > tpsMessageStep.firstTokenTime) {
623
+ event.time - tpsMessageStep.firstTokenTime > MIN_TPS_DECODE_MS) {
622
624
  const reported = usageOutputTokens(usage);
623
625
  const outputTokens = reported
624
626
  ?? (tpsMessageStep.outputEstimate > 0
@@ -960,6 +962,14 @@ export function createChannelProjection(state, deps) {
960
962
  const outcome = reason.kind === 'completed' ? 'completed'
961
963
  : reason.kind === 'aborted' || reason.kind === 'interrupted' ? 'interrupted'
962
964
  : 'error';
965
+ // The turn's terminal state is projected from the close reason itself,
966
+ // NOT from the ledger below: a turn that emitted no usage-bearing message
967
+ // still ended (and can have failed or been cancelled), and the ledger is
968
+ // only written for the turns that measured something. Anything that asks
969
+ // "how did the turn that just ended close" reads this, so a usage-less
970
+ // failure can never inherit the previous turn's `completed` — or leave
971
+ // nothing behind on the first turn.
972
+ state.turnOutcome = outcome;
963
973
  const emitTurnSummary = () => {
964
974
  if (!turnLedger.usageSeen)
965
975
  return;
@@ -1211,6 +1221,7 @@ export function createChannelProjection(state, deps) {
1211
1221
  deps.inputConvergence.cancelInFlight = false;
1212
1222
  state.cancelPending = false;
1213
1223
  state.working = true;
1224
+ state.turnOutcome = undefined;
1214
1225
  state.turnStart = Date.now();
1215
1226
  state.responseChars = 0;
1216
1227
  state.spinnerMode = 'requesting';
@@ -1291,6 +1302,10 @@ export function createChannelProjection(state, deps) {
1291
1302
  // write wins, '' clears to the default.
1292
1303
  state.sessionColor = event.color;
1293
1304
  return;
1305
+ case 'session.cwd':
1306
+ // Durable directory change, replayed like the title: last write wins.
1307
+ state.workingDirectory = event.cwd;
1308
+ return;
1294
1309
  case 'todo.write':
1295
1310
  // The snapshot array is adopted as-is (the durable record owns it).
1296
1311
  state.todos = event.items;
@@ -33,6 +33,8 @@ export interface QuestionOption {
33
33
  export interface QuestionItem {
34
34
  readonly id: string;
35
35
  readonly question: string;
36
+ /** Explicit authentication purpose; absent means an ordinary question. */
37
+ readonly purpose?: 'auth';
36
38
  readonly detail?: string;
37
39
  readonly header?: string;
38
40
  readonly options?: readonly QuestionOption[];
@@ -1 +1 @@
1
- {"version":3,"file":"questions.d.ts","sourceRoot":"","sources":["../../../src/channel/questions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAE9D,gCAAgC;AAChC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAC9B;AAED,4CAA4C;AAC5C,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,cAAc,EAAE,CAAA;IAC5C,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAA;IAC9B,wEAAwE;IACxE,QAAQ,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACrE,2EAA2E;IAC3E,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAA;IAClC,0DAA0D;IAC1D,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC5C;6CACyC;IACzC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB;sDACkD;IAClD,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED,oEAAoE;AACpE,MAAM,WAAW,eAAe;IAC9B,QAAQ,C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AE,oBAAyB;IAI9C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAwB;IAC9C,OAAO,CAAC,MAAM,CAA6B;IAC3C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwB;IAClD,OAAO,CAAC,QAAQ,CAAI;IACpB;;;OAGG;IACH,OAAO,CAAC,aAAa,CAAgC;IAErD;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAO3C;;;OAGG;IACH,WAAW,IAAI,gBAAgB,GAAG,IAAI;IAItC;;;;OAIG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIlC,OAAO,CAAC,IAAI;IAIZ,sEAAsE;IACtE,OAAO,CAAC,eAAe;IAyBvB;;;;;;;;OAQG;IACH,GAAG,CAAC,OAAO,EAAE,eAAe,EACxB,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAgC5D,8CAA8C;IAC9C,OAAO,CAAC,SAAS;IAOjB;;;;;OAKG;IACH,aAAa,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI;IAqCjD;;;;OAIG;IACH,cAAc,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI;IAW3C;;;;OAIG;IACH,WAAW,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI;IAWxC,6DAA6D;IAC7D,aAAa,IAAI,IAAI;IAUrB,+DAA+D;IAC/D,SAAS,IAAI,IAAI;IASjB,wEAAwE;IACxE,OAAO,CAAC,MAAM;IAId,sEAAsE;IACtE,OAAO,CAAC,IAAI;CAGb"}
@@ -23,6 +23,12 @@ export declare function cleanRenderText(value: string, maxCells: number): string
23
23
  * dropped so one reported line stays one transcript row.
24
24
  */
25
25
  export declare function cleanBlockLines(value: string, maxCells: number): string[];
26
+ /** Bounded, local-only registry output. Explicit command blocks keep the
27
+ * existing cleanBlockLines contract; reports retain indentation and empty rows. */
28
+ export declare function cleanCommandReport(value: string): {
29
+ lines: string[];
30
+ truncated: boolean;
31
+ };
26
32
  /**
27
33
  * Sanitize an untrusted (possibly non-string) value. Non-scalars — objects,
28
34
  * arrays, functions, symbols, null/undefined — yield '' so the caller takes
@@ -49,6 +55,14 @@ export declare function flattenInline(value: string): string;
49
55
  * {@link cleanRenderText}'s strip, and the final pass covers the rest.
50
56
  */
51
57
  export declare function flattenPasteInline(value: string): string;
58
+ /**
59
+ * Footer-field ingress: the common render cleanup PLUS bidi controls and
60
+ * invisible separators. Kept separate from {@link cleanRenderText} so the
61
+ * existing managed-UI callers keep their exact behaviour. Non-scalars yield
62
+ * '' (the caller decides between refuse and clear); scalars coerce then
63
+ * sanitize.
64
+ */
65
+ export declare function cleanStatusFieldText(value: unknown, maxCells: number): string;
52
66
  /** Toast-bound plugin text (veto reasons, handled notices, rewind summaries)
53
67
  * and single-line transcript notices are render-path data too: same
54
68
  * sanitization, toast-width cap. */
@@ -1 +1 @@
1
- {"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../src/channel/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,4DAA4D;AAC5D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAevE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAEzE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGxE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAQhE;AAED;;6CAE6C;AAC7C,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGnD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKxD;AAED;;qCAEqC;AACrC,eAAO,MAAM,YAAY,MAAM,CAAA"}
1
+ {"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../src/channel/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,4DAA4D;AAC5D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAevE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAEzE;AAED;mFACmF;AACnF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAyBzF;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGxE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAQhE;AAED;;6CAE6C;AAC7C,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGnD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKxD;AAaD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG7E;AAED;;qCAEqC;AACrC,eAAO,MAAM,YAAY,MAAM,CAAA"}
@@ -15,6 +15,7 @@
15
15
  * (string/number/boolean) coerce through String() first.
16
16
  */
17
17
  import { stringWidth } from '../ink/stringWidth.js';
18
+ import { getGraphemeSegmenter } from '../utils/intl.js';
18
19
  /** Sanitize an already-string value for the render path. */
19
20
  export function cleanRenderText(value, maxCells) {
20
21
  // Remove complete ANSI control sequences before stripping control bytes.
@@ -43,6 +44,38 @@ export function cleanRenderText(value, maxCells) {
43
44
  export function cleanBlockLines(value, maxCells) {
44
45
  return value.split(/\r?\n/u).map(line => cleanRenderText(line, maxCells)).filter(line => line !== '');
45
46
  }
47
+ /** Bounded, local-only registry output. Explicit command blocks keep the
48
+ * existing cleanBlockLines contract; reports retain indentation and empty rows. */
49
+ export function cleanCommandReport(value) {
50
+ const maxCodeUnits = 65_536;
51
+ const maxLines = 200;
52
+ const maxCells = 4000;
53
+ let bounded = value.slice(0, maxCodeUnits);
54
+ // Do not split a Unicode scalar at the allocation boundary.
55
+ if (bounded.length < value.length && /[\uD800-\uDBFF]$/u.test(bounded))
56
+ bounded = bounded.slice(0, -1);
57
+ let truncated = bounded.length < value.length;
58
+ const rows = bounded.split(/\r?\n/u);
59
+ if (rows.length > maxLines)
60
+ truncated = true;
61
+ const lines = rows.slice(0, maxLines).map(row => {
62
+ const plain = flattenPasteInline(row);
63
+ if (stringWidth(plain) <= maxCells)
64
+ return plain;
65
+ truncated = true;
66
+ let clipped = '';
67
+ let cells = 0;
68
+ for (const { segment } of getGraphemeSegmenter().segment(plain)) {
69
+ const width = stringWidth(segment);
70
+ if (cells + width > maxCells - 1)
71
+ break;
72
+ clipped += segment;
73
+ cells += width;
74
+ }
75
+ return `${clipped}…`;
76
+ });
77
+ return { lines: value === '' ? [] : lines, truncated };
78
+ }
46
79
  /**
47
80
  * Sanitize an untrusted (possibly non-string) value. Non-scalars — objects,
48
81
  * arrays, functions, symbols, null/undefined — yield '' so the caller takes
@@ -91,6 +124,28 @@ export function flattenPasteInline(value) {
91
124
  .replace(/\u001B\[[0-?]*[ -/]*[@-~]/gu, '');
92
125
  return flattenInline(withoutAnsi);
93
126
  }
127
+ /** Bidi overrides/isolates and invisible separators: invisible, and a single
128
+ * U+202E next to a host field (`#sessionId`, cwd) can flip the displayed
129
+ * direction of the text that follows it. Footer fields sit immediately
130
+ * beside those provenance tags, so they strip this class first.
131
+ *
132
+ * The joiners U+200C (ZWNJ) and U+200D (ZWJ) are deliberately NOT in it:
133
+ * they are orthographic (Persian, Indic) and compose emoji sequences, so
134
+ * stripping them would rewrite the plugin's text and inflate its cell
135
+ * width (a ZWJ family emoji measures 2 cells, 6 without the joiners). */
136
+ const BIDI_AND_INVISIBLE_MARKS = /[\u200B\u200E\u200F\u202A-\u202E\u2060-\u2064\u2066-\u2069\uFEFF]/gu;
137
+ /**
138
+ * Footer-field ingress: the common render cleanup PLUS bidi controls and
139
+ * invisible separators. Kept separate from {@link cleanRenderText} so the
140
+ * existing managed-UI callers keep their exact behaviour. Non-scalars yield
141
+ * '' (the caller decides between refuse and clear); scalars coerce then
142
+ * sanitize.
143
+ */
144
+ export function cleanStatusFieldText(value, maxCells) {
145
+ if (typeof value !== 'string' && typeof value !== 'number' && typeof value !== 'boolean')
146
+ return '';
147
+ return cleanRenderText(String(value).replace(BIDI_AND_INVISIBLE_MARKS, ''), maxCells);
148
+ }
94
149
  /** Toast-bound plugin text (veto reasons, handled notices, rewind summaries)
95
150
  * and single-line transcript notices are render-path data too: same
96
151
  * sanitization, toast-width cap. */
@@ -0,0 +1,9 @@
1
+ /** The directory a session works in now: where it moved after opening (DSH
2
+ * `working-directory/change`, folded by the projector as `workingDirectory`),
3
+ * else the project it opened in. Project identity (workspace registry,
4
+ * session lists, history) stays `cwd`. */
5
+ export declare function sessionWorkingDirectory(session: {
6
+ readonly cwd: string;
7
+ readonly workingDirectory: string | undefined;
8
+ }): string;
9
+ //# sourceMappingURL=working-directory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"working-directory.d.ts","sourceRoot":"","sources":["../../../src/channel/working-directory.ts"],"names":[],"mappings":"AAAA;;;2CAG2C;AAC3C,wBAAgB,uBAAuB,CAAC,OAAO,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,MAAM,CAEhI"}
@@ -0,0 +1,7 @@
1
+ /** The directory a session works in now: where it moved after opening (DSH
2
+ * `working-directory/change`, folded by the projector as `workingDirectory`),
3
+ * else the project it opened in. Project identity (workspace registry,
4
+ * session lists, history) stays `cwd`. */
5
+ export function sessionWorkingDirectory(session) {
6
+ return session.workingDirectory ?? session.cwd;
7
+ }
@@ -145,7 +145,6 @@ export declare const WORKING_GATE_NOTICES: {
145
145
  readonly preset: "preset-agent-running";
146
146
  readonly workspace: "workspace-switch-working";
147
147
  readonly update: "update-working";
148
- readonly restart: "update-working";
149
148
  readonly resume: "resume-while-working";
150
149
  readonly rewind: "rewind-while-working";
151
150
  readonly kernel: "kernel-switch-while-working";
@@ -175,6 +174,14 @@ export declare const GRAY_ZONE_EXEMPT_COMMANDS: readonly string[];
175
174
  * running turn keeps writing into it, `local-actions.ts`), and `exit` (with its
176
175
  * `quit`/`q` aliases) tears the process — and the running turn — down.
177
176
  *
177
+ * `/restart` belongs here too, and its presence is load-bearing: it respawns
178
+ * the process and resumes this session, which is the only way out of a turn
179
+ * whose abort never converges (a tool that ignores its `AbortSignal` leaves
180
+ * `working` true forever and every in-process gate stuck). Refusing it mid-turn
181
+ * produced the worst dead end of the bug report — "can't interrupt, and
182
+ * `/restart` says a turn is running". `Chat.tsx` answers it with a warning that
183
+ * the running turn is interrupted, then restarts.
184
+ *
178
185
  * `/rewind` used to live here, because it cancels only once a target is
179
186
  * CONFIRMED (`session-rewind.ts`) and replacing the conversation is its whole
180
187
  * purpose. It moved to {@link WORKING_GATE_NOTICES} when the session-switch
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AAChH,YAA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;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,SAAS,YAAY,EAAmB,GAC7C,YAAY,EAAE,CAKhB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,SAAS,YAAY,EAAmB,EAC/C,QAAQ,GAAE,eAA0B,GACnC,iBAAiB,EAAE,CAiDrB"}
@@ -56,13 +56,13 @@ export const LOCAL_COMMANDS = [
56
56
  { name: 'config', description: 'Show the dsh-tui configuration source' },
57
57
  { name: 'reload', description: 'Reload preference files from disk and apply live' },
58
58
  { name: 'settings', description: 'View and edit plugin settings' },
59
- { name: 'setup', description: 'Re-run the first-run guide (API key / language + theme / model + workspace / shortcuts)' },
59
+ { name: 'setup', description: 'Re-run the first-run guide (accounts + models / language + theme / model + workspace / shortcuts)' },
60
60
  { name: 'star', description: 'Star this project on GitHub (one-key via the gh CLI)' },
61
61
  { name: 'doctor', description: 'Run environment checks' },
62
62
  { name: 'migrate', description: 'Import conversations from other coding agents (claude-code / codex / omp / zcode / grok-build)' },
63
63
  { name: 'init', description: 'Create AGENTS.md in the working directory' },
64
64
  { name: 'agents', description: 'Show subagents of this session' },
65
- { name: 'team', description: 'Agent Teams: show status, or switch on / off (the team bundle)' },
65
+ { name: 'team', description: 'Agent Teams: show status while the team service is running' },
66
66
  { name: 'jobs', description: 'Show background jobs of this session' },
67
67
  { name: 'panel', description: 'Side panel: toggle / focus / zoom / switch panels' },
68
68
  // Model / display
@@ -84,7 +84,7 @@ export const LOCAL_COMMANDS = [
84
84
  { name: 'hooks', description: 'Show hooks status' },
85
85
  { name: 'mcp', description: 'Show MCP status' },
86
86
  { name: 'skills', description: 'List available skills' },
87
- { name: 'plugin', description: 'Show plugin diagnostics, and the plugins this profile added' },
87
+ { name: 'plugin', description: 'Show plugin diagnostics, added plugins, and switchable experimental features' },
88
88
  { name: 'update', description: 'Update dsh-tui and restart' },
89
89
  // Skills are discovered through the DSH registry and added at runtime.
90
90
  // A local entry of the same name would win the collision filter.
@@ -284,7 +284,8 @@ export const WORKING_GATE_NOTICES = {
284
284
  preset: 'preset-agent-running',
285
285
  workspace: 'workspace-switch-working',
286
286
  update: 'update-working',
287
- restart: 'update-working',
287
+ // `/restart` deliberately has no gate: it is the recovery hatch for a turn
288
+ // whose abort never converges (see WORKING_CONVERSATION_COMMANDS).
288
289
  // `/resume` and the core's `/rewind` refuse mid-turn in the session-switch
289
290
  // transaction; under DSH the rewind extension instead CANCELS the turn and
290
291
  // re-arms (session-rewind.ts), so the refusal is the core's own path. The
@@ -322,6 +323,14 @@ export const GRAY_ZONE_EXEMPT_COMMANDS = ['resume'];
322
323
  * running turn keeps writing into it, `local-actions.ts`), and `exit` (with its
323
324
  * `quit`/`q` aliases) tears the process — and the running turn — down.
324
325
  *
326
+ * `/restart` belongs here too, and its presence is load-bearing: it respawns
327
+ * the process and resumes this session, which is the only way out of a turn
328
+ * whose abort never converges (a tool that ignores its `AbortSignal` leaves
329
+ * `working` true forever and every in-process gate stuck). Refusing it mid-turn
330
+ * produced the worst dead end of the bug report — "can't interrupt, and
331
+ * `/restart` says a turn is running". `Chat.tsx` answers it with a warning that
332
+ * the running turn is interrupted, then restarts.
333
+ *
325
334
  * `/rewind` used to live here, because it cancels only once a target is
326
335
  * CONFIRMED (`session-rewind.ts`) and replacing the conversation is its whole
327
336
  * purpose. It moved to {@link WORKING_GATE_NOTICES} when the session-switch
@@ -337,7 +346,7 @@ export const GRAY_ZONE_EXEMPT_COMMANDS = ['resume'];
337
346
  * see {@link GRAY_ZONE_EXEMPT_COMMANDS}.
338
347
  */
339
348
  export const WORKING_CONVERSATION_COMMANDS = [
340
- 'clear', 'exit', 'quit', 'q',
349
+ 'clear', 'exit', 'quit', 'q', 'restart',
341
350
  ];
342
351
  /**
343
352
  * Classify a command by its impact on the running conversation.
@@ -0,0 +1,7 @@
1
+ /** Keep terminal-title ticks out of the transcript's render owner. */
2
+ export declare function ChatTitle({ title, working, focused }: {
3
+ title: string;
4
+ working: boolean;
5
+ focused: boolean;
6
+ }): null;
7
+ //# sourceMappingURL=ChatTitle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatTitle.d.ts","sourceRoot":"","sources":["../../../src/components/ChatTitle.tsx"],"names":[],"mappings":"AAKA,sEAAsE;AACtE,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IACrD,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,IAAI,CASP"}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { useTerminalTitle } from '../ink/hooks/use-terminal-title.js';
3
+ const FRAMES = ['⠂', '⠐'];
4
+ /** Keep terminal-title ticks out of the transcript's render owner. */
5
+ export function ChatTitle({ title, working, focused }) {
6
+ const [frame, setFrame] = React.useState(0);
7
+ React.useEffect(() => {
8
+ if (!working || !focused)
9
+ return;
10
+ const interval = setInterval(() => setFrame(value => (value + 1) % FRAMES.length), 960);
11
+ return () => clearInterval(interval);
12
+ }, [working, focused]);
13
+ useTerminalTitle(`${working ? FRAMES[frame] : '✦'} 🐋 ${title}`);
14
+ return null;
15
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlockFrame.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlockFrame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AASpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAqCrE;;;GAGG;AACH,wBAAgB,eAAe,IAAI,OAAO,GAAG,QAAQ,CAEpD;AAED,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC,IAAI,CAAA;IAClB,SAAS,EAAE,YAAY,GAAG,IAAI,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