@songtonyli/dsh-cli 0.1.94 → 0.1.95

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 (565) hide show
  1. package/README.md +1 -1
  2. package/bin/dsh.mjs +1 -1
  3. package/node_modules/@deepseek-ai/cordis/package.json +4 -4
  4. package/node_modules/@deepseek-ai/cordis-plugin-group/package.json +3 -3
  5. package/node_modules/@deepseek-ai/cordis-plugin-include/package.json +4 -4
  6. package/node_modules/@deepseek-ai/cordis-plugin-loader/package.json +4 -4
  7. package/node_modules/@deepseek-ai/cordis-plugin-timer/package.json +3 -3
  8. package/node_modules/@deepseek-ai/cosmokit/package.json +1 -1
  9. package/node_modules/@deepseek-ai/dsh/package.json +126 -126
  10. package/node_modules/@deepseek-ai/dsh-acp/package.json +26 -26
  11. package/node_modules/@deepseek-ai/dsh-acp-app/package.json +6 -6
  12. package/node_modules/@deepseek-ai/dsh-action-cards/lib/typert.host.js +7 -3
  13. package/node_modules/@deepseek-ai/dsh-action-cards/package.json +19 -19
  14. package/node_modules/@deepseek-ai/dsh-agent/package.json +21 -21
  15. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +10 -10
  16. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +28 -28
  17. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +27 -27
  18. package/node_modules/@deepseek-ai/dsh-agent-preset/package.json +13 -13
  19. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +2 -2
  20. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.host.js +7 -3
  21. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/package.json +39 -39
  22. package/node_modules/@deepseek-ai/dsh-agent-team/README.i18n.yaml +12 -12
  23. package/node_modules/@deepseek-ai/dsh-agent-team/README.md +6 -6
  24. package/node_modules/@deepseek-ai/dsh-agent-team/README.zh.md +6 -6
  25. package/node_modules/@deepseek-ai/dsh-agent-team/lib/index.js +25 -11
  26. package/node_modules/@deepseek-ai/dsh-agent-team/lib/typert.host.js +8 -4
  27. package/node_modules/@deepseek-ai/dsh-agent-team/lib/types/projection.js +6 -1
  28. package/node_modules/@deepseek-ai/dsh-agent-team/lib/types/task-board.js +12 -8
  29. package/node_modules/@deepseek-ai/dsh-agent-team/lib/types/task-view.js +2 -1
  30. package/node_modules/@deepseek-ai/dsh-agent-team/package.json +25 -25
  31. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +13 -13
  32. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +7 -7
  33. package/node_modules/@deepseek-ai/dsh-api-account-controller/package.json +9 -9
  34. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/package.json +13 -13
  35. package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +14 -14
  36. package/node_modules/@deepseek-ai/dsh-api-job-controller/package.json +12 -12
  37. package/node_modules/@deepseek-ai/dsh-api-remote-access/package.json +9 -9
  38. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +67 -47
  39. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +48 -48
  40. package/node_modules/@deepseek-ai/dsh-api-session-controller/README.i18n.yaml +6 -6
  41. package/node_modules/@deepseek-ai/dsh-api-session-controller/README.md +6 -1
  42. package/node_modules/@deepseek-ai/dsh-api-session-controller/README.zh.md +6 -1
  43. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +19 -5
  44. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +52 -18
  45. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +69 -41
  46. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +51 -31
  47. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/service.js +20 -5
  48. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.js +58 -18
  49. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/continuation.js +48 -0
  50. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +5 -2
  51. package/node_modules/@deepseek-ai/dsh-api-session-controller/package.json +79 -77
  52. package/node_modules/@deepseek-ai/dsh-api-settings-controller/package.json +16 -16
  53. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +7 -3
  54. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/package.json +22 -22
  55. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/package.json +21 -21
  56. package/node_modules/@deepseek-ai/dsh-api-workspace-files/package.json +15 -15
  57. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +19 -19
  58. package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +3 -3
  59. package/node_modules/@deepseek-ai/dsh-attachment/package.json +5 -5
  60. package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +9 -9
  61. package/node_modules/@deepseek-ai/dsh-authorization/package.json +7 -7
  62. package/node_modules/@deepseek-ai/dsh-base/README.i18n.yaml +2 -2
  63. package/node_modules/@deepseek-ai/dsh-base/README.md +1 -1
  64. package/node_modules/@deepseek-ai/dsh-base/README.zh.md +1 -1
  65. package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +3 -0
  66. package/node_modules/@deepseek-ai/dsh-base/package.json +103 -102
  67. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +11 -11
  68. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +14 -14
  69. package/node_modules/@deepseek-ai/dsh-brand/package.json +3 -3
  70. package/node_modules/@deepseek-ai/dsh-chunked-list/package.json +3 -3
  71. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +13 -13
  72. package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +7 -3
  73. package/node_modules/@deepseek-ai/dsh-client-file-upload/package.json +12 -12
  74. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +7 -7
  75. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +10 -10
  76. package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +1 -1
  77. package/node_modules/@deepseek-ai/dsh-client-modules/package.json +6 -6
  78. package/node_modules/@deepseek-ai/dsh-client-product-analytics/package.json +16 -16
  79. package/node_modules/@deepseek-ai/dsh-client-resources/package.json +5 -5
  80. package/node_modules/@deepseek-ai/dsh-client-shortcuts/package.json +9 -9
  81. package/node_modules/@deepseek-ai/dsh-client-ui-action-cards/package.json +15 -15
  82. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +17 -17
  83. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/README.i18n.yaml +2 -2
  84. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/README.md +1 -1
  85. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/README.zh.md +1 -1
  86. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/lib/client.js +1 -1
  87. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/package.json +17 -17
  88. package/node_modules/@deepseek-ai/dsh-client-ui-approval/README.i18n.yaml +2 -2
  89. package/node_modules/@deepseek-ai/dsh-client-ui-approval/README.md +2 -0
  90. package/node_modules/@deepseek-ai/dsh-client-ui-approval/README.zh.md +2 -0
  91. package/node_modules/@deepseek-ai/dsh-client-ui-approval/lib/client.js +125 -5
  92. package/node_modules/@deepseek-ai/dsh-client-ui-approval/package.json +14 -13
  93. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +12 -12
  94. package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/README.i18n.yaml +19 -16
  95. package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/README.md +16 -7
  96. package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/README.zh.md +16 -7
  97. package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/lib/assets/breach-atlas-43c5305a3d4d.webp +0 -0
  98. package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/lib/client.js +395 -3
  99. package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/package.json +13 -9
  100. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.i18n.yaml +6 -6
  101. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.md +4 -2
  102. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.zh.md +4 -2
  103. package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +60 -37
  104. package/node_modules/@deepseek-ai/dsh-client-ui-chat/package.json +40 -40
  105. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +14 -14
  106. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/README.i18n.yaml +2 -2
  107. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/README.md +2 -0
  108. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/README.zh.md +2 -0
  109. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/lib/client.js +164 -40
  110. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/package.json +10 -10
  111. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.i18n.yaml +18 -9
  112. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.md +24 -4
  113. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.zh.md +24 -4
  114. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +205 -56
  115. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/index.js +1 -1
  116. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +37 -36
  117. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +13 -13
  118. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/package.json +10 -10
  119. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +28 -28
  120. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +7 -7
  121. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +6 -6
  122. package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/package.json +11 -11
  123. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/package.json +10 -10
  124. package/node_modules/@deepseek-ai/dsh-client-ui-file-drag/package.json +7 -7
  125. package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
  126. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +14 -14
  127. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +11 -11
  128. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.i18n.yaml +2 -2
  129. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.md +1 -1
  130. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.zh.md +1 -1
  131. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +4 -19
  132. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +10 -10
  133. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +9 -9
  134. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +15 -15
  135. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.i18n.yaml +4 -4
  136. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.md +2 -2
  137. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.zh.md +2 -2
  138. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +4 -18
  139. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +16 -16
  140. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.i18n.yaml +14 -14
  141. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.md +12 -10
  142. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.zh.md +12 -10
  143. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +65 -58
  144. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/locale/zh.json +1 -1
  145. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/package.json +26 -26
  146. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +14 -14
  147. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +19 -19
  148. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.i18n.yaml +2 -2
  149. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.md +1 -1
  150. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.zh.md +1 -1
  151. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +6 -17
  152. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/package.json +18 -18
  153. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/package.json +12 -12
  154. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-recommendations/package.json +13 -13
  155. package/node_modules/@deepseek-ai/dsh-client-ui-reference/package.json +16 -16
  156. package/node_modules/@deepseek-ai/dsh-client-ui-renderer/lib/client.js +175 -20
  157. package/node_modules/@deepseek-ai/dsh-client-ui-renderer/package.json +3 -3
  158. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.i18n.yaml +2 -2
  159. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.md +1 -1
  160. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.zh.md +1 -1
  161. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +27 -65
  162. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/package.json +21 -21
  163. package/node_modules/@deepseek-ai/dsh-client-ui-secret-mask/package.json +6 -6
  164. package/node_modules/@deepseek-ai/dsh-client-ui-session/package.json +9 -9
  165. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +7 -7
  166. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2 -2
  167. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/package.json +17 -17
  168. package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/package.json +8 -8
  169. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
  170. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +17 -17
  171. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +11 -11
  172. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +11 -11
  173. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +7 -7
  174. package/node_modules/@deepseek-ai/dsh-client-ui-settings-session-log/package.json +8 -8
  175. package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/package.json +8 -8
  176. package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/package.json +6 -6
  177. package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/package.json +8 -8
  178. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/package.json +9 -9
  179. package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/package.json +9 -9
  180. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  181. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +11 -11
  182. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/package.json +10 -10
  183. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.i18n.yaml +4 -4
  184. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.md +2 -2
  185. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.zh.md +2 -2
  186. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +6 -15
  187. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.pdf.js +11 -3
  188. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/package.json +21 -21
  189. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/package.json +14 -14
  190. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/package.json +15 -15
  191. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/package.json +14 -14
  192. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +16 -16
  193. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.i18n.yaml +6 -6
  194. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.md +4 -4
  195. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.zh.md +4 -4
  196. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +12 -12
  197. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +18 -18
  198. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +12 -12
  199. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.i18n.yaml +6 -6
  200. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.md +6 -6
  201. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.zh.md +6 -6
  202. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +285 -14
  203. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +32 -31
  204. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +20 -20
  205. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +22 -22
  206. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +13 -13
  207. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.i18n.yaml +4 -4
  208. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.md +2 -2
  209. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.zh.md +2 -2
  210. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +35 -73
  211. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +26 -26
  212. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +6 -6
  213. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +12 -12
  214. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +15 -15
  215. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +14 -14
  216. package/node_modules/@deepseek-ai/dsh-commands/README.i18n.yaml +4 -4
  217. package/node_modules/@deepseek-ai/dsh-commands/README.md +2 -2
  218. package/node_modules/@deepseek-ai/dsh-commands/README.zh.md +2 -2
  219. package/node_modules/@deepseek-ai/dsh-commands/lib/index.js +37 -2
  220. package/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +28 -5
  221. package/node_modules/@deepseek-ai/dsh-commands/lib/typert.remote-client.js +2 -2
  222. package/node_modules/@deepseek-ai/dsh-commands/lib/types/index.js +36 -2
  223. package/node_modules/@deepseek-ai/dsh-commands/package.json +18 -18
  224. package/node_modules/@deepseek-ai/dsh-compaction/package.json +11 -11
  225. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +27 -27
  226. package/node_modules/@deepseek-ai/dsh-compaction-image-offload/package.json +18 -18
  227. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +17 -17
  228. package/node_modules/@deepseek-ai/dsh-computer-use/package.json +5 -5
  229. package/node_modules/@deepseek-ai/dsh-config-editor/package.json +12 -12
  230. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +83 -39
  231. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +10 -10
  232. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +14 -6
  233. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +23 -23
  234. package/node_modules/@deepseek-ai/dsh-creation-recommendations/package.json +21 -21
  235. package/node_modules/@deepseek-ai/dsh-credentials/package.json +4 -4
  236. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +12 -12
  237. package/node_modules/@deepseek-ai/dsh-cua/README.i18n.yaml +2 -2
  238. package/node_modules/@deepseek-ai/dsh-cua/README.md +2 -0
  239. package/node_modules/@deepseek-ai/dsh-cua/README.zh.md +2 -0
  240. package/node_modules/@deepseek-ai/dsh-cua/lib/client.js +30 -1
  241. package/node_modules/@deepseek-ai/dsh-cua/lib/index.js +16 -16
  242. package/node_modules/@deepseek-ai/dsh-cua/package.json +53 -53
  243. package/node_modules/@deepseek-ai/dsh-cua-bundle/package.json +7 -7
  244. package/node_modules/@deepseek-ai/dsh-deepseek-account/package.json +11 -11
  245. package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/package.json +12 -12
  246. package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/package.json +3 -3
  247. package/node_modules/@deepseek-ai/dsh-deliverable-file-references/package.json +5 -5
  248. package/node_modules/@deepseek-ai/dsh-deque/package.json +3 -3
  249. package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/package.json +8 -8
  250. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/package.json +45 -45
  251. package/node_modules/@deepseek-ai/dsh-experimental-badge-skill-bundle/package.json +4 -4
  252. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/package.json +20 -20
  253. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.i18n.yaml +8 -8
  254. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.md +9 -7
  255. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.zh.md +9 -7
  256. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/client.js +779 -137
  257. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/index.js +142 -10
  258. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/typert.host.js +131 -29
  259. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/typert.remote-client.js +103 -24
  260. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/package.json +42 -42
  261. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/package.json +19 -19
  262. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/package.json +15 -15
  263. package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/package.json +6 -6
  264. package/node_modules/@deepseek-ai/dsh-experimental-forge/package.json +6 -6
  265. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/package.json +9 -9
  266. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/package.json +10 -10
  267. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/package.json +33 -33
  268. package/node_modules/@deepseek-ai/dsh-experimental-inspector/README.i18n.yaml +2 -2
  269. package/node_modules/@deepseek-ai/dsh-experimental-inspector/README.md +1 -1
  270. package/node_modules/@deepseek-ai/dsh-experimental-inspector/README.zh.md +1 -1
  271. package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/client.js +150 -136
  272. package/node_modules/@deepseek-ai/dsh-experimental-inspector/lib/index.js +200 -186
  273. package/node_modules/@deepseek-ai/dsh-experimental-inspector/package.json +17 -17
  274. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/package.json +7 -7
  275. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/README.i18n.yaml +6 -6
  276. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/README.md +6 -4
  277. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/README.zh.md +6 -4
  278. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/package.json +72 -72
  279. package/node_modules/@deepseek-ai/dsh-experimental-liveshare-protocol/package.json +4 -4
  280. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/package.json +5 -5
  281. package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/package.json +5 -5
  282. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/README.i18n.yaml +2 -2
  283. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/README.md +1 -1
  284. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/README.zh.md +1 -1
  285. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/lib/client.js +6 -16
  286. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/package.json +12 -12
  287. package/node_modules/@deepseek-ai/dsh-experimental-session-search/package.json +5 -5
  288. package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/package.json +4 -4
  289. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/package.json +11 -11
  290. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/package.json +10 -10
  291. package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/package.json +6 -6
  292. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/package.json +23 -23
  293. package/node_modules/@deepseek-ai/dsh-experimental-translator/package.json +29 -29
  294. package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/package.json +8 -8
  295. package/node_modules/@deepseek-ai/dsh-experimental-worktree/package.json +23 -23
  296. package/node_modules/@deepseek-ai/dsh-file-reference/package.json +5 -5
  297. package/node_modules/@deepseek-ai/dsh-file-reference-local/package.json +17 -17
  298. package/node_modules/@deepseek-ai/dsh-fs/package.json +10 -10
  299. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +8 -8
  300. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +6 -6
  301. package/node_modules/@deepseek-ai/dsh-fs-patch/package.json +3 -3
  302. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +12 -12
  303. package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +7 -3
  304. package/node_modules/@deepseek-ai/dsh-goal/package.json +23 -23
  305. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +17 -17
  306. package/node_modules/@deepseek-ai/dsh-harness-dev-context/package.json +13 -13
  307. package/node_modules/@deepseek-ai/dsh-headless/package.json +30 -30
  308. package/node_modules/@deepseek-ai/dsh-hmr/package.json +15 -15
  309. package/node_modules/@deepseek-ai/dsh-home-paths/package.json +3 -3
  310. package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +3 -3
  311. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +20 -20
  312. package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +5 -5
  313. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +5 -5
  314. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +10 -10
  315. package/node_modules/@deepseek-ai/dsh-host-open-in-app/package.json +9 -9
  316. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +13 -13
  317. package/node_modules/@deepseek-ai/dsh-host-product-telemetry-otel/package.json +8 -8
  318. package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +5 -5
  319. package/node_modules/@deepseek-ai/dsh-http-proxy/package.json +3 -3
  320. package/node_modules/@deepseek-ai/dsh-jobs/package.json +11 -11
  321. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +16 -16
  322. package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +3 -3
  323. package/node_modules/@deepseek-ai/dsh-lazy-require/package.json +3 -3
  324. package/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +5 -1
  325. package/node_modules/@deepseek-ai/dsh-llm/package.json +11 -11
  326. package/node_modules/@deepseek-ai/dsh-llm-cursor/package.json +25 -25
  327. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +45 -45
  328. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/package.json +17 -17
  329. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/package.json +14 -14
  330. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +28 -28
  331. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +25 -25
  332. package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +26 -26
  333. package/node_modules/@deepseek-ai/dsh-mcp-manager/package.json +22 -22
  334. package/node_modules/@deepseek-ai/dsh-mcp-resources/package.json +16 -16
  335. package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +19 -19
  336. package/node_modules/@deepseek-ai/dsh-message-quotes/package.json +9 -9
  337. package/node_modules/@deepseek-ai/dsh-native-command/package.json +4 -4
  338. package/node_modules/@deepseek-ai/dsh-no-progress-reminder/package.json +15 -15
  339. package/node_modules/@deepseek-ai/dsh-office-to-pdf/package.json +11 -11
  340. package/node_modules/@deepseek-ai/dsh-official-bundles/package.json +4 -4
  341. package/node_modules/@deepseek-ai/dsh-otel/package.json +5 -5
  342. package/node_modules/@deepseek-ai/dsh-output-retention/package.json +3 -3
  343. package/node_modules/@deepseek-ai/dsh-package-manifest/package.json +3 -3
  344. package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +7 -3
  345. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +23 -23
  346. package/node_modules/@deepseek-ai/dsh-persona/package.json +7 -7
  347. package/node_modules/@deepseek-ai/dsh-personalized-recommendations/package.json +23 -23
  348. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +24 -24
  349. package/node_modules/@deepseek-ai/dsh-plugin-detail/package.json +3 -3
  350. package/node_modules/@deepseek-ai/dsh-plugin-manager/package.json +38 -38
  351. package/node_modules/@deepseek-ai/dsh-plugin-market/package.json +31 -31
  352. package/node_modules/@deepseek-ai/dsh-plugin-market-index/package.json +4 -4
  353. package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/package.json +19 -19
  354. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/lib/typert.host.js +7 -3
  355. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/package.json +17 -17
  356. package/node_modules/@deepseek-ai/dsh-ptc-runtime/package.json +5 -5
  357. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.i18n.yaml +14 -14
  358. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.md +12 -6
  359. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.zh.md +12 -6
  360. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/index.js +93 -38
  361. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/persistent-process.js +112 -93
  362. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/process.js +112 -93
  363. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/package.json +23 -23
  364. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +11 -11
  365. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +14 -14
  366. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +12 -12
  367. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +8 -8
  368. package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/package.json +25 -25
  369. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +12 -12
  370. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +14 -14
  371. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +14 -14
  372. package/node_modules/@deepseek-ai/dsh-schedule/package.json +40 -40
  373. package/node_modules/@deepseek-ai/dsh-scope/package.json +3 -3
  374. package/node_modules/@deepseek-ai/dsh-sdk-app/package.json +19 -19
  375. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/package.json +48 -48
  376. package/node_modules/@deepseek-ai/dsh-sdk-minimal/cordis.patch.yml +3 -0
  377. package/node_modules/@deepseek-ai/dsh-sdk-minimal/package.json +40 -39
  378. package/node_modules/@deepseek-ai/dsh-sdk-protocol/package.json +13 -13
  379. package/node_modules/@deepseek-ai/dsh-session/README.i18n.yaml +2 -2
  380. package/node_modules/@deepseek-ai/dsh-session/README.md +1 -1
  381. package/node_modules/@deepseek-ai/dsh-session/README.zh.md +1 -1
  382. package/node_modules/@deepseek-ai/dsh-session/package.json +10 -10
  383. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +19 -19
  384. package/node_modules/@deepseek-ai/dsh-session-continuation/README.i18n.yaml +37 -0
  385. package/node_modules/@deepseek-ai/dsh-session-continuation/README.md +84 -0
  386. package/node_modules/@deepseek-ai/dsh-session-continuation/README.zh.md +84 -0
  387. package/node_modules/@deepseek-ai/dsh-session-continuation/lib/index.js +109 -0
  388. package/node_modules/@deepseek-ai/dsh-session-continuation/lib/types/index.js +51 -0
  389. package/node_modules/@deepseek-ai/dsh-session-continuation/lib/types/projection.js +48 -0
  390. package/node_modules/@deepseek-ai/dsh-session-continuation/lib/types/types.js +2 -0
  391. package/node_modules/@deepseek-ai/dsh-session-continuation/package.json +55 -0
  392. package/node_modules/@deepseek-ai/dsh-session-format/package.json +4 -4
  393. package/node_modules/@deepseek-ai/dsh-session-format-catalog/package.json +11 -11
  394. package/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/package.json +7 -7
  395. package/node_modules/@deepseek-ai/dsh-session-format-v1-to-v2/package.json +8 -8
  396. package/node_modules/@deepseek-ai/dsh-session-format-v2-to-v3/package.json +6 -6
  397. package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/README.i18n.yaml +2 -2
  398. package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/README.md +1 -1
  399. package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/README.zh.md +1 -1
  400. package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/lib/index.js +19 -1
  401. package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/package.json +5 -5
  402. package/node_modules/@deepseek-ai/dsh-session-log-deepseek/package.json +18 -18
  403. package/node_modules/@deepseek-ai/dsh-session-log-export/README.i18n.yaml +10 -10
  404. package/node_modules/@deepseek-ai/dsh-session-log-export/README.md +6 -6
  405. package/node_modules/@deepseek-ai/dsh-session-log-export/README.zh.md +6 -6
  406. package/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +100 -120
  407. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +26 -26
  408. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +11 -11
  409. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +19 -1
  410. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +13 -13
  411. package/node_modules/@deepseek-ai/dsh-session-projection/README.i18n.yaml +2 -2
  412. package/node_modules/@deepseek-ai/dsh-session-projection/README.md +1 -1
  413. package/node_modules/@deepseek-ai/dsh-session-projection/README.zh.md +1 -1
  414. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +6 -6
  415. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +13 -13
  416. package/node_modules/@deepseek-ai/dsh-session-query/package.json +20 -20
  417. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +13 -13
  418. package/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +7 -3
  419. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +41 -41
  420. package/node_modules/@deepseek-ai/dsh-session-stats/package.json +11 -11
  421. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +7 -7
  422. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +25 -25
  423. package/node_modules/@deepseek-ai/dsh-session-title/package.json +17 -17
  424. package/node_modules/@deepseek-ai/dsh-session-title-all-prompts-llm/package.json +15 -15
  425. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +20 -20
  426. package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +13 -13
  427. package/node_modules/@deepseek-ai/dsh-session-turn-outline/package.json +11 -11
  428. package/node_modules/@deepseek-ai/dsh-settings/package.json +17 -17
  429. package/node_modules/@deepseek-ai/dsh-shell/package.json +7 -7
  430. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +14 -14
  431. package/node_modules/@deepseek-ai/dsh-skill/package.json +9 -9
  432. package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +5 -5
  433. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +10 -10
  434. package/node_modules/@deepseek-ai/dsh-skill-office/package.json +10 -10
  435. package/node_modules/@deepseek-ai/dsh-spill/package.json +9 -9
  436. package/node_modules/@deepseek-ai/dsh-spill-local/package.json +11 -11
  437. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +35 -35
  438. package/node_modules/@deepseek-ai/dsh-storage/package.json +3 -3
  439. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +6 -6
  440. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +6 -6
  441. package/node_modules/@deepseek-ai/dsh-subagent/README.i18n.yaml +15 -12
  442. package/node_modules/@deepseek-ai/dsh-subagent/README.md +14 -6
  443. package/node_modules/@deepseek-ai/dsh-subagent/README.zh.md +14 -6
  444. package/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +276 -42
  445. package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +31 -9
  446. package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.remote-client.js +2 -2
  447. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/catalog.js +31 -8
  448. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/continuation-messages.js +10 -8
  449. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/index.js +44 -2
  450. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/list-children.js +35 -6
  451. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/manager.js +78 -12
  452. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/names.js +96 -0
  453. package/node_modules/@deepseek-ai/dsh-subagent/package.json +51 -51
  454. package/node_modules/@deepseek-ai/dsh-subagent-acp/README.i18n.yaml +2 -2
  455. package/node_modules/@deepseek-ai/dsh-subagent-acp/README.md +1 -1
  456. package/node_modules/@deepseek-ai/dsh-subagent-acp/README.zh.md +1 -1
  457. package/node_modules/@deepseek-ai/dsh-subagent-acp/package.json +24 -24
  458. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/README.i18n.yaml +6 -6
  459. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/README.md +3 -3
  460. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/README.zh.md +3 -3
  461. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +15 -15
  462. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/README.i18n.yaml +4 -4
  463. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/README.md +2 -2
  464. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/README.zh.md +2 -2
  465. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +19 -19
  466. package/node_modules/@deepseek-ai/dsh-subprocess/package.json +6 -6
  467. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +9 -9
  468. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +8 -8
  469. package/node_modules/@deepseek-ai/dsh-terminal/package.json +8 -8
  470. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +22 -22
  471. package/node_modules/@deepseek-ai/dsh-time-context/package.json +23 -23
  472. package/node_modules/@deepseek-ai/dsh-timeout/package.json +3 -3
  473. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +14 -14
  474. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +17 -17
  475. package/node_modules/@deepseek-ai/dsh-tool-agent-team/README.i18n.yaml +8 -8
  476. package/node_modules/@deepseek-ai/dsh-tool-agent-team/README.md +6 -6
  477. package/node_modules/@deepseek-ai/dsh-tool-agent-team/README.zh.md +6 -6
  478. package/node_modules/@deepseek-ai/dsh-tool-agent-team/lib/index.js +26 -17
  479. package/node_modules/@deepseek-ai/dsh-tool-agent-team/package.json +27 -27
  480. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +13 -13
  481. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +37 -37
  482. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +27 -27
  483. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +10 -10
  484. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +73 -8
  485. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +17 -17
  486. package/node_modules/@deepseek-ai/dsh-tool-executor-native/package.json +5 -5
  487. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/README.i18n.yaml +19 -16
  488. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/README.md +22 -9
  489. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/README.zh.md +22 -9
  490. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/lib/index.js +185 -74
  491. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/lib/types/config.js +2 -1
  492. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/lib/types/errors.js +25 -0
  493. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/lib/types/index.js +36 -6
  494. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/lib/types/ptc-calls.js +57 -7
  495. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/lib/types/ptc.js +29 -14
  496. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/package.json +28 -28
  497. package/node_modules/@deepseek-ai/dsh-tool-fs/README.i18n.yaml +4 -4
  498. package/node_modules/@deepseek-ai/dsh-tool-fs/README.md +2 -2
  499. package/node_modules/@deepseek-ai/dsh-tool-fs/README.zh.md +2 -2
  500. package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +2 -2
  501. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +39 -39
  502. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +31 -31
  503. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +20 -20
  504. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +19 -19
  505. package/node_modules/@deepseek-ai/dsh-tool-present/package.json +21 -21
  506. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +35 -35
  507. package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/package.json +28 -28
  508. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +24 -24
  509. package/node_modules/@deepseek-ai/dsh-tool-schedule/package.json +19 -19
  510. package/node_modules/@deepseek-ai/dsh-tool-session-query/package.json +27 -27
  511. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +18 -18
  512. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +23 -23
  513. package/node_modules/@deepseek-ai/dsh-tool-subagent/README.i18n.yaml +12 -12
  514. package/node_modules/@deepseek-ai/dsh-tool-subagent/README.md +6 -6
  515. package/node_modules/@deepseek-ai/dsh-tool-subagent/README.zh.md +6 -6
  516. package/node_modules/@deepseek-ai/dsh-tool-subagent/lib/index.js +11 -6
  517. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +25 -25
  518. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.i18n.yaml +39 -36
  519. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.md +29 -17
  520. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.zh.md +29 -17
  521. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/lib/index.js +74 -122
  522. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +24 -25
  523. package/node_modules/@deepseek-ai/dsh-tool-terminal/package.json +32 -32
  524. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +19 -19
  525. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +25 -25
  526. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +24 -24
  527. package/node_modules/@deepseek-ai/dsh-tool-working-directory/package.json +13 -13
  528. package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/package.json +12 -12
  529. package/node_modules/@deepseek-ai/dsh-tools/package.json +20 -20
  530. package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +8 -8
  531. package/node_modules/@deepseek-ai/dsh-tui-app/README.md +5 -3
  532. package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +5 -3
  533. package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +454 -84
  534. package/node_modules/@deepseek-ai/dsh-tui-app/package.json +87 -85
  535. package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +10 -10
  536. package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +4 -4
  537. package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +4 -4
  538. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +18 -18
  539. package/node_modules/@deepseek-ai/dsh-user-questions/lib/typert.host.js +7 -3
  540. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +18 -18
  541. package/node_modules/@deepseek-ai/dsh-util-code-language/package.json +3 -3
  542. package/node_modules/@deepseek-ai/dsh-util-crypto/package.json +3 -3
  543. package/node_modules/@deepseek-ai/dsh-util-time/package.json +3 -3
  544. package/node_modules/@deepseek-ai/dsh-util-values/package.json +3 -3
  545. package/node_modules/@deepseek-ai/dsh-util-workspace-path/package.json +3 -3
  546. package/node_modules/@deepseek-ai/dsh-web/package.json +8 -8
  547. package/node_modules/@deepseek-ai/dsh-web-app/cordis.patch.yml +4 -4
  548. package/node_modules/@deepseek-ai/dsh-web-app/package.json +155 -155
  549. package/node_modules/@deepseek-ai/dsh-web-deepseek-api/package.json +30 -30
  550. package/node_modules/@deepseek-ai/dsh-web-fetch-http/package.json +9 -9
  551. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-CZZasi1N.css +1 -0
  552. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-CnyQSzND.js +199 -0
  553. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +2 -2
  554. package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +21 -21
  555. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +20 -20
  556. package/node_modules/@deepseek-ai/dsh-win32-process/package.json +4 -4
  557. package/node_modules/@deepseek-ai/dsh-workflow/package.json +11 -11
  558. package/node_modules/@deepseek-ai/dsh-workflow-ptc/package.json +39 -39
  559. package/node_modules/@deepseek-ai/dsh-working-directory/package.json +21 -21
  560. package/node_modules/@deepseek-ai/dsh-workspace/package.json +14 -14
  561. package/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +26 -26
  562. package/node_modules/@deepseek-ai/schemastery/package.json +2 -2
  563. package/package.json +335 -333
  564. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-B2q7cWGa.js +0 -199
  565. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-uWlUD22X.css +0 -1
@@ -8,18 +8,19 @@ import { SessionId, SessionLogOffset, buildForkSeed } from "@deepseek-ai/dsh-ses
8
8
  import { SubagentError, appendDelegatedPolicyOverrides } from "@deepseek-ai/dsh-subagent";
9
9
  import { launchEnvironmentOf, launchedThroughSsh } from "@deepseek-ai/dsh-launch-environment";
10
10
  import { canOpenNativePath, openNativeUrl } from "@deepseek-ai/dsh-native-command";
11
+ import { SessionContinuationBusyError } from "@deepseek-ai/dsh-session-continuation";
11
12
  import { homedir } from "node:os";
12
13
  import "@deepseek-ai/cordis";
13
14
  import { activeAtToken, formatFileMention } from "@deepseek-ai/dsh-file-reference";
14
15
  import { formatSessionReferenceMention } from "@deepseek-ai/dsh-session-reference";
15
16
  import { AppleContainerSandboxProvider } from "@deepseek-ai/dsh-sandbox-apple-container";
16
17
  import { JobId } from "@deepseek-ai/dsh-jobs";
18
+ import { UserQuestionError, planReviewOptions } from "@deepseek-ai/dsh-user-questions";
17
19
  import { assertNever } from "@deepseek-ai/dsh-util-values";
18
20
  import { readFile } from "node:fs/promises";
19
21
  import { basename, extname, join, resolve } from "node:path";
20
22
  import { pluginFiberPhase } from "@deepseek-ai/dsh-host-plugin-inventory";
21
23
  import { maskCredentialText } from "@deepseek-ai/dsh-client-ui-secret-mask";
22
- import { planReviewOptions } from "@deepseek-ai/dsh-user-questions";
23
24
  import { createWriteStream } from "node:fs";
24
25
  import { Readable } from "node:stream";
25
26
  import { pipeline } from "node:stream/promises";
@@ -842,7 +843,7 @@ function isTeamPanelEvent(type) {
842
843
  }
843
844
  /**
844
845
  * Read Team mode, current task owners, and continuable catalog descendants.
845
- * The catalog carries labels; a separate Team roster is not maintained.
846
+ * The catalog carries names and descriptions; a separate Team roster is not maintained.
846
847
  * @param ctx - context carrying the task board and subagent runtime.
847
848
  * @param agent - exact live caller.
848
849
  * @param entries - the terminal's latest descendant listing.
@@ -869,7 +870,10 @@ function readTeamSnapshot(ctx, agent, entries = []) {
869
870
  const members = [row(root, root.id, "lead", "lead")];
870
871
  for (const entry of entries) {
871
872
  if (entry.kind !== "child" || entry.mode !== "continuable") continue;
872
- members.push(row(ctx.get("agents")?.get(entry.id), entry.id, entry.label, "teammate"));
873
+ members.push({
874
+ ...row(ctx.get("agents")?.get(entry.id), entry.id, entry.path ?? entry.label, "teammate"),
875
+ ...entry.path === void 0 ? {} : { description: entry.label }
876
+ });
873
877
  }
874
878
  const names = new Map(members.map((member) => [member.id, member.name]));
875
879
  return {
@@ -877,7 +881,7 @@ function readTeamSnapshot(ctx, agent, entries = []) {
877
881
  members,
878
882
  tasks: teams.listTasks(agent).map((task) => ({
879
883
  ...task,
880
- ...task.ownerId === void 0 ? {} : { ownerName: names.get(task.ownerId) ?? task.ownerId }
884
+ ...task.ownerId === void 0 ? {} : { ownerName: names.get(task.ownerId) ?? task.ownerName ?? task.ownerId }
881
885
  }))
882
886
  };
883
887
  } catch (error) {
@@ -1148,8 +1152,10 @@ const TASK_GLYPH = {
1148
1152
  *
1149
1153
  * A tool call is listed when its name is in `toolNames`, the names the Agent
1150
1154
  * Teams plugin currently scopes onto this agent, or when `toolNames` is
1151
- * omitted and the arguments name a person or a task. Malformed tool arguments
1152
- * still name the tool when it is in `toolNames`. A user message is listed
1155
+ * omitted and the arguments name a person or a task. Successful subagent
1156
+ * activation results name their spawn recipients by matching tool call id;
1157
+ * pending and historical calls retain their argument-derived summaries.
1158
+ * Malformed tool arguments still name the tool when it is in `toolNames`. A user message is listed
1153
1159
  * when its source is `agent-message` or its text begins `Team message from`.
1154
1160
  *
1155
1161
  * The Team Lead's `team/` records are authoritative, so they replace the rows
@@ -1177,7 +1183,17 @@ const TASK_GLYPH = {
1177
1183
  * @returns the exchanges in log order.
1178
1184
  */
1179
1185
  function beatsFromEvents(events, speaker, toolNames, names = /* @__PURE__ */ new Map()) {
1180
- const calls = events.map((event) => event.type === "tool/call" ? beatFromCall(event.data, speaker, toolNames, names) : void 0);
1186
+ const activations = /* @__PURE__ */ new Map();
1187
+ for (const event of events) {
1188
+ if (event.type !== "tool/result") continue;
1189
+ const result = fields(event.data);
1190
+ const message = fields(result?.message);
1191
+ const meta = fields(result?.meta);
1192
+ const callId = text(message?.toolCallId);
1193
+ const name = meta?.kind === "activation" && message?.isError === false ? text(meta.name) : void 0;
1194
+ if (callId !== void 0 && name !== void 0) activations.set(callId, name);
1195
+ }
1196
+ const calls = events.map((event) => event.type === "tool/call" ? beatFromCall(event.data, speaker, toolNames, names, activations) : void 0);
1181
1197
  const spawnCalls = /* @__PURE__ */ new Set();
1182
1198
  for (const call of calls) if (call?.kind === "spawn") spawnCalls.add(call.to);
1183
1199
  const reading = {
@@ -1630,9 +1646,10 @@ function memberName(id, names) {
1630
1646
  * @param speaker - the caller.
1631
1647
  * @param toolNames - names the plugin currently scopes onto the agent.
1632
1648
  * @param names - catalog labels indexed by Session id.
1649
+ * @param activations - successful activation names indexed by tool call id.
1633
1650
  * @returns the exchange, or undefined when the call is not one this page plays.
1634
1651
  */
1635
- function beatFromCall(data, speaker, toolNames, names) {
1652
+ function beatFromCall(data, speaker, toolNames, names, activations) {
1636
1653
  const call = fields(data);
1637
1654
  const name = typeof call?.name === "string" ? call.name : void 0;
1638
1655
  if (name === void 0) return void 0;
@@ -1640,9 +1657,10 @@ function beatFromCall(data, speaker, toolNames, names) {
1640
1657
  const scoped = toolNames !== void 0 && toolNames.has(name);
1641
1658
  const summary = summarizeCall(name, args);
1642
1659
  if (!scoped && !summary.addressed) return void 0;
1660
+ const callId = text(call?.callId);
1643
1661
  return {
1644
1662
  from: speaker,
1645
- to: knownName(summary.to, names) ?? summary.to,
1663
+ to: ((name === "subagent" || name === "subagent_fork") && summary.kind === "spawn" && callId !== void 0 ? activations.get(callId) : void 0) ?? knownName(summary.to, names) ?? summary.to,
1646
1664
  kind: summary.kind,
1647
1665
  text: summary.text
1648
1666
  };
@@ -1657,7 +1675,7 @@ function beatFromCall(data, speaker, toolNames, names) {
1657
1675
  * @returns the lane fields, and whether the arguments themselves name an exchange.
1658
1676
  */
1659
1677
  function summarizeCall(name, args) {
1660
- const target = text(args?.agent_id) ?? text(args?.target);
1678
+ const target = text(args?.agent) ?? text(args?.agent_id) ?? text(args?.target);
1661
1679
  const teammate = text(args?.name) ?? (name === "subagent" || name === "subagent_fork" ? text(args?.description) : void 0);
1662
1680
  const prompt = text(args?.prompt);
1663
1681
  const message = text(args?.message);
@@ -1829,8 +1847,13 @@ function textBlocks(content) {
1829
1847
  * @returns the exchange, or undefined when the text is not a team message.
1830
1848
  */
1831
1849
  function beatFromUser(data, speaker, names) {
1832
- const message = fields(fields(data)?.message);
1833
- const body = textBlocks(message?.content).join("");
1850
+ const root = fields(data);
1851
+ const message = fields(root?.message) ?? root;
1852
+ const source = fields(message?.source);
1853
+ const content = message?.content;
1854
+ const first = Array.isArray(content) ? fields(content[0]) : void 0;
1855
+ const relayHeader = source?.kind === "agent-message" && first?.type === "text" && typeof first.text === "string" && /^Agent [^\s]+ sent a message: $/u.test(first.text);
1856
+ const body = textBlocks(relayHeader && Array.isArray(content) ? content.slice(1) : content).join("");
1834
1857
  const matched = /^Team message from ([^:]+):\s*([\s\S]*)$/u.exec(body);
1835
1858
  const named = matched?.[1]?.trim();
1836
1859
  const said = matched?.[2]?.trim();
@@ -1840,12 +1863,11 @@ function beatFromUser(data, speaker, names) {
1840
1863
  kind: "message",
1841
1864
  text: said
1842
1865
  };
1843
- const source = fields(message?.source);
1844
- if (source?.kind === "agent-message" && body !== "") return {
1866
+ if (source?.kind === "agent-message" && (body !== "" || relayHeader && Array.isArray(content) && content.length > 1)) return {
1845
1867
  from: knownName(text(source.senderSessionId), names) ?? text(source.senderName) ?? "teammate",
1846
1868
  to: speaker,
1847
1869
  kind: "message",
1848
- text: body
1870
+ text: body || NON_TEXT_MESSAGE
1849
1871
  };
1850
1872
  }
1851
1873
  /**
@@ -2708,9 +2730,10 @@ function contentResultBody(content) {
2708
2730
  * marker for terminal cards.
2709
2731
  * @param view - the tool's `presentResult` view, when it has one.
2710
2732
  * @param content - the model-facing result content.
2733
+ * @param includeDiffContent - retain result text alongside a diff view.
2711
2734
  * @returns the rows and their aligned presentation metadata.
2712
2735
  */
2713
- function toolResultBody(view, content) {
2736
+ function toolResultBody(view, content, includeDiffContent = false) {
2714
2737
  if (view === void 0) return contentResultBody(content);
2715
2738
  switch (view.card) {
2716
2739
  case "generic": return contentResultBody(view.content ?? content);
@@ -2733,7 +2756,18 @@ function toolResultBody(view, content) {
2733
2756
  ...json === void 0 ? {} : { json }
2734
2757
  };
2735
2758
  }
2736
- case "diff": return diffsBody(view.diffs);
2759
+ case "diff": {
2760
+ const body = diffsBody(view.diffs);
2761
+ if (!includeDiffContent) return body;
2762
+ const text = contentText(content);
2763
+ if (text === "") return body;
2764
+ const lines = text.split("\n");
2765
+ return {
2766
+ lines: [...lines, ...body.lines],
2767
+ code: [...lines.map(() => void 0), ...body.code ?? []],
2768
+ diff: [...lines.map(() => void 0), ...body.diff ?? []]
2769
+ };
2770
+ }
2737
2771
  case "search": {
2738
2772
  const lines = view.shape === "matches" ? view.files.flatMap((file) => file.matches.map((match) => `${file.path}:${String(match.lineNumber)}: ${match.line}`)) : [...view.paths];
2739
2773
  if (view.truncated) lines.push(`… ${String(view.total)} total`);
@@ -3260,6 +3294,17 @@ const IMAGE_MEDIA_TYPES = {
3260
3294
  ".gif": "image/gif"
3261
3295
  };
3262
3296
  /**
3297
+ * Prepare stored attachments for aggregate admission in their pending order.
3298
+ * @param pending - attachments retained by the current draft.
3299
+ * @returns stored image and file parts for trusted same-process admission.
3300
+ */
3301
+ function storedAttachmentParts(pending) {
3302
+ return pending.map((attachment) => "encodedBytes" in attachment ? {
3303
+ ...attachment.block,
3304
+ encodedBytes: attachment.encodedBytes
3305
+ } : attachment.block);
3306
+ }
3307
+ /**
3263
3308
  * Read `path` (relative to `cwd`) and store it.
3264
3309
  * @param store - the composed attachment store.
3265
3310
  * @param cwd - the directory relative paths resolve against.
@@ -3285,7 +3330,8 @@ async function attachLocalFile(store, cwd, path) {
3285
3330
  block: {
3286
3331
  type: "image",
3287
3332
  attachment: ref
3288
- }
3333
+ },
3334
+ encodedBytes: data.byteLength
3289
3335
  };
3290
3336
  }
3291
3337
  return {
@@ -3494,23 +3540,26 @@ function listPlugins(ctx) {
3494
3540
  }
3495
3541
  /**
3496
3542
  * One descendant listing entry as a picker row: a local child has its session
3497
- * id, activity, mode, and label; an external execution names its durable task
3498
- * record without offering a Session to open. A diagnostic candidate shows its
3499
- * reason. The live panel enters the same local-child row.
3543
+ * id, activity, mode, and label. An optional exact root-relative address is
3544
+ * shown beside the label. An external execution has no Session to open; a
3545
+ * diagnostic candidate shows its reason. The live panel enters the same row.
3500
3546
  * @param entry - the listing entry.
3547
+ * @param options - exact root-relative address, omitted when unavailable.
3501
3548
  * @returns the row; `enterable` is false for a diagnostic or external entry.
3502
3549
  */
3503
- function subagentChoice(entry) {
3550
+ function subagentChoice(entry, options) {
3504
3551
  const prefix = indent(entry.depth - 1);
3552
+ const address = options?.address;
3505
3553
  switch (entry.kind) {
3506
3554
  case "child": {
3507
3555
  const external = entry.mode === "external";
3508
3556
  const parts = external ? ["external task", "no local session"] : [entry.activity, entry.mode];
3509
- if (entry.label !== void 0) parts.push(entry.id);
3557
+ if (entry.label !== void 0 || address !== void 0) parts.push(entry.id);
3558
+ const label = address === void 0 ? entry.label ?? entry.id : `${address}${entry.label === void 0 ? "" : ` · ${entry.label}`}`;
3510
3559
  return {
3511
3560
  id: entry.id,
3512
3561
  depth: entry.depth,
3513
- label: `${prefix}${entry.label ?? entry.id}`,
3562
+ label: `${prefix}${label}`,
3514
3563
  description: parts.join(" · "),
3515
3564
  target: external ? "external-task" : "session",
3516
3565
  mode: entry.mode,
@@ -3520,8 +3569,8 @@ function subagentChoice(entry) {
3520
3569
  case "diagnostic": return {
3521
3570
  id: entry.id,
3522
3571
  depth: entry.depth,
3523
- label: `${prefix}${entry.id}`,
3524
- description: entry.reason,
3572
+ label: `${prefix}${address ?? entry.id}`,
3573
+ description: address === void 0 ? entry.reason : `${entry.reason} · ${entry.id}`,
3525
3574
  target: "diagnostic",
3526
3575
  enterable: false
3527
3576
  };
@@ -3529,19 +3578,6 @@ function subagentChoice(entry) {
3529
3578
  }
3530
3579
  }
3531
3580
  /**
3532
- * Every discovered subagent below one session in pre-order as picker rows.
3533
- * @param ctx - plugin context carrying the optional subagent runtime.
3534
- * @param sessionId - the root session whose descendants are listed.
3535
- * @param signal - cancels the listing.
3536
- * @returns one choice per descendant in listing order, empty when the session has no subagents.
3537
- * @throws {Error} when no subagent runtime is mounted.
3538
- */
3539
- async function listSubagentChoices(ctx, sessionId, signal) {
3540
- const subagents = ctx.get("subagents");
3541
- if (subagents === void 0) throw new Error("subagents are not mounted in this profile");
3542
- return (await subagents.listDescendants(sessionId, signal)).map(subagentChoice);
3543
- }
3544
- /**
3545
3581
  * The rows shown when the user enters one subagent picker row: the row's own
3546
3582
  * label and description, the session's creation time and workspace, its
3547
3583
  * title, its turn outline, and the files it presented. Turns and presented
@@ -8424,6 +8460,37 @@ function systemPromptView(text, update) {
8424
8460
  };
8425
8461
  }
8426
8462
  /**
8463
+ * Project developer text and tool changes without rendering tool schemas.
8464
+ * @param content - the developer message's blocks.
8465
+ * @returns a navigable section, or undefined for an empty message.
8466
+ */
8467
+ function developerContextView(content) {
8468
+ const rows = content.flatMap((block) => {
8469
+ switch (block.type) {
8470
+ case "text": return block.text === "" ? [] : block.text.split("\n");
8471
+ case "tool-addition": return [`Tool added: ${block.toolName}`];
8472
+ case "tool-removal": return [`Tool removed: ${block.toolName}`];
8473
+ default: return [`[${block.type}]`];
8474
+ }
8475
+ });
8476
+ return rows.length === 0 ? void 0 : {
8477
+ title: "developer message",
8478
+ parts: [{
8479
+ kind: "context",
8480
+ rows
8481
+ }]
8482
+ };
8483
+ }
8484
+ /**
8485
+ * Identify an empty manual continuation input, without changing other retry content.
8486
+ * @param source - the message's durable source.
8487
+ * @param content - the message's blocks.
8488
+ * @returns whether the message is an empty retry receipt.
8489
+ */
8490
+ function isEmptyRetry(source, content) {
8491
+ return recordOf(source)?.kind === "retry" && content.length === 0;
8492
+ }
8493
+ /**
8427
8494
  * Project one injected `user/message` into a transcript section.
8428
8495
  * @param source - the message's durable source.
8429
8496
  * @param content - the model-facing blocks.
@@ -14976,6 +15043,11 @@ var CompactionLedger = class {
14976
15043
  turn,
14977
15044
  text: firstLine(contentText(content))
14978
15045
  };
15046
+ if (isEmptyRetry(source, content)) return {
15047
+ kind: "context",
15048
+ turn,
15049
+ title: "continuing failed turn"
15050
+ };
14979
15051
  return {
14980
15052
  kind: "context",
14981
15053
  turn,
@@ -15200,17 +15272,21 @@ function elapsedOf(facts, now) {
15200
15272
  * One listing entry as a row.
15201
15273
  * @param entry - the listing entry.
15202
15274
  * @param facts - the live facts sampled for it, when it has any.
15275
+ * @param address - exact root-relative address, when known.
15203
15276
  * @param now - the wall clock the running time is measured against.
15204
15277
  * @returns the row.
15205
15278
  */
15206
- function rowOf(entry, facts, now) {
15279
+ function rowOf(entry, facts, address, now) {
15207
15280
  const indent = DEPTH_INDENT.repeat(entry.depth - 1);
15208
- if (entry.kind === "diagnostic") return {
15209
- id: entry.id,
15210
- enterable: false,
15211
- ticking: false,
15212
- text: `${indent}${entry.id}${SEPARATOR}unreadable: ${entry.reason}`
15213
- };
15281
+ if (entry.kind === "diagnostic") {
15282
+ const identity = address === void 0 ? entry.id : `${address}${SEPARATOR}${entry.id}`;
15283
+ return {
15284
+ id: entry.id,
15285
+ enterable: false,
15286
+ ticking: false,
15287
+ text: `${indent}${identity}${SEPARATOR}unreadable: ${entry.reason}`
15288
+ };
15289
+ }
15214
15290
  const status = facts?.running === true ? "running" : facts?.lastTurnCompleted === true ? "completed" : "idle";
15215
15291
  const parts = [
15216
15292
  entry.mode,
@@ -15220,11 +15296,12 @@ function rowOf(entry, facts, now) {
15220
15296
  const elapsed = elapsedOf(facts, now);
15221
15297
  if (elapsed !== void 0) parts.push(elapsed);
15222
15298
  if (facts?.usage !== void 0) parts.push(`↑${formatTokens(facts.usage.inputTokens)} ↓${formatTokens(facts.usage.outputTokens)}`);
15299
+ const label = address === void 0 ? entry.label ?? entry.id : `${address}${entry.label === void 0 ? "" : `${SEPARATOR}${entry.label}`}`;
15223
15300
  return {
15224
15301
  id: entry.id,
15225
15302
  enterable: true,
15226
15303
  ticking: facts?.activeSince !== void 0,
15227
- text: `${indent}${entry.label ?? entry.id}${SEPARATOR}${parts.join(SEPARATOR)}`
15304
+ text: `${indent}${label}${SEPARATOR}${parts.join(SEPARATOR)}`
15228
15305
  };
15229
15306
  }
15230
15307
  /**
@@ -15235,7 +15312,7 @@ function rowOf(entry, facts, now) {
15235
15312
  */
15236
15313
  function subagentPanelView(inputs) {
15237
15314
  const listed = inputs.entries.filter((entry) => entry.kind === "diagnostic" || entry.mode !== "external" && entry.activity === "running");
15238
- const rows = listed.slice(0, 6).map((entry) => rowOf(entry, inputs.facts.get(entry.id), inputs.now));
15315
+ const rows = listed.slice(0, 6).map((entry) => rowOf(entry, inputs.facts.get(entry.id), inputs.addresses?.get(entry.id), inputs.now));
15239
15316
  return {
15240
15317
  rows,
15241
15318
  hidden: listed.length - rows.length,
@@ -15666,6 +15743,8 @@ const COMPACTION_SWITCH_WAIT = "wait for the compaction to finish (Esc cancels i
15666
15743
  const COMPACTION_LOADER_DETAIL = "context · Esc cancels";
15667
15744
  /** What a prompt submitted while a dispatched `/compact` runs reports. */
15668
15745
  const COMPACTION_QUEUE_NOTICE = "queued: the prompt starts once compaction finishes";
15746
+ /** What input reports while staged attachments are still being admitted. */
15747
+ const ATTACHMENT_FLIGHT_WAIT = "wait for the attachment submission to finish (Esc cancels it)";
15669
15748
  /** The one extra key the model picker answers, stated above its rows. */
15670
15749
  const MODEL_PICKER_HINT = "Ctrl+S saves the highlighted model as the default for the next launch";
15671
15750
  /**
@@ -15850,12 +15929,16 @@ const LOCAL_COMMANDS = [
15850
15929
  },
15851
15930
  {
15852
15931
  name: "attach",
15853
- description: "Attach a file or image to the next prompt (/attach <path>, /attach clear)"
15932
+ description: "Attach a file or image to the next prompt or a command that accepts attachments (/attach <path>, /attach clear)"
15854
15933
  },
15855
15934
  {
15856
15935
  name: "queue",
15857
15936
  description: "Show or clear the messages queued for the Agent (/queue clear)"
15858
15937
  },
15938
+ {
15939
+ name: "retry",
15940
+ description: "Continue an eligible failed turn without a new prompt"
15941
+ },
15859
15942
  {
15860
15943
  name: "skills",
15861
15944
  description: "List the skills the Agent can load"
@@ -16112,6 +16195,8 @@ var TuiApp = class {
16112
16195
  /** When the running turn started, from its `turn/start` envelope; absent between turns. */
16113
16196
  turnStartedAt;
16114
16197
  pending = [];
16198
+ /** Admission of the staged attachments borrowed by one prompt or shared command. */
16199
+ attachmentFlight;
16115
16200
  /** The home directory the footer shortens the workspace path against. */
16116
16201
  home = homedir();
16117
16202
  /** The segments of the last footer draw, in bar order. */
@@ -16130,6 +16215,8 @@ var TuiApp = class {
16130
16215
  barSelection = FIRST_FOOTER_SEGMENT;
16131
16216
  /** The descendant listing the last reconcile produced, in pre-order. */
16132
16217
  subagentEntries = [];
16218
+ /** Exact root-relative addresses for the last listing, keyed by Session id. */
16219
+ subagentAddresses = /* @__PURE__ */ new Map();
16133
16220
  /** Latest root catalog used by Team views opened inside a descendant. */
16134
16221
  teamEntries = [];
16135
16222
  /** Lifecycle activity held until a fresh catalog confirms the named descendant. */
@@ -16261,6 +16348,7 @@ var TuiApp = class {
16261
16348
  * shows history and live progress only.
16262
16349
  */
16263
16350
  readOnlyViews = /* @__PURE__ */ new Set();
16351
+ retryingViews = /* @__PURE__ */ new Set();
16264
16352
  streaming;
16265
16353
  /** Whether the fold keys left every foldable block open; one appended later follows it. */
16266
16354
  toolsExpanded = false;
@@ -16576,6 +16664,7 @@ var TuiApp = class {
16576
16664
  this.dropCompaction();
16577
16665
  this.restoreQueueDraft();
16578
16666
  this.stopped = true;
16667
+ this.attachmentFlight?.abort();
16579
16668
  this.updateTicker();
16580
16669
  this.updateFadeTicker();
16581
16670
  this.updateSpinTicker();
@@ -16674,6 +16763,7 @@ var TuiApp = class {
16674
16763
  this.queueSelection = void 0;
16675
16764
  this.clearActivityBoard();
16676
16765
  this.subagentEntries = [];
16766
+ this.subagentAddresses = /* @__PURE__ */ new Map();
16677
16767
  this.teamEntries = [];
16678
16768
  this.pendingSubagentActivity.clear();
16679
16769
  this.panelSelection = void 0;
@@ -16718,6 +16808,7 @@ var TuiApp = class {
16718
16808
  this.notice(COMPACTION_SWITCH_WAIT, "error");
16719
16809
  return;
16720
16810
  }
16811
+ if (this.attachmentSubmissionPending()) return;
16721
16812
  this.cancelPickers();
16722
16813
  this.switching = true;
16723
16814
  let next;
@@ -16762,6 +16853,7 @@ var TuiApp = class {
16762
16853
  this.notice("wait for the session switch to finish", "error");
16763
16854
  return;
16764
16855
  }
16856
+ if (this.attachmentSubmissionPending()) return;
16765
16857
  this.switching = true;
16766
16858
  let next;
16767
16859
  try {
@@ -16809,6 +16901,7 @@ var TuiApp = class {
16809
16901
  * @param question - the text after `/btw`; empty opens the page without asking.
16810
16902
  */
16811
16903
  async openAside(question) {
16904
+ if (this.attachmentSubmissionPending()) return;
16812
16905
  if (this.asides.has(this.bound)) {
16813
16906
  if (question === "") this.notice("this is already a btw side agent; type a question, or Ctrl+P to end it");
16814
16907
  else this.submit(question);
@@ -16853,6 +16946,7 @@ var TuiApp = class {
16853
16946
  this.notice("wait for the session switch to finish", "error");
16854
16947
  return;
16855
16948
  }
16949
+ if (this.attachmentSubmissionPending()) return;
16856
16950
  this.switching = true;
16857
16951
  let history;
16858
16952
  try {
@@ -17283,7 +17377,8 @@ var TuiApp = class {
17283
17377
  if (member !== void 0) return memberLabel(member);
17284
17378
  const entry = this.subagentEntries.find((candidate) => candidate.id === id);
17285
17379
  if (entry?.kind !== "child") return id;
17286
- const label = entry.label ?? id;
17380
+ const address = this.subagentAddresses.get(id);
17381
+ const label = address === void 0 ? entry.label ?? id : `${address}${entry.label === void 0 ? "" : ` · ${entry.label}`}`;
17287
17382
  return entry.mode === "external" ? `${label} (external task)` : label;
17288
17383
  }
17289
17384
  /**
@@ -17356,6 +17451,7 @@ var TuiApp = class {
17356
17451
  const entries = this.subagentEntries.filter((entry) => !members.has(entry.id));
17357
17452
  const view = subagentPanelView({
17358
17453
  entries,
17454
+ addresses: this.subagentAddresses,
17359
17455
  facts: this.subagentFacts(entries),
17360
17456
  now: this.deps.now()
17361
17457
  });
@@ -17578,6 +17674,31 @@ var TuiApp = class {
17578
17674
  this.updateTicker();
17579
17675
  }
17580
17676
  /**
17677
+ * Read the live tree root's listing for exact addresses, reusing a root listing.
17678
+ * @param agent - the exact Agent that owns the local listing.
17679
+ * @param entries - its descendant listing.
17680
+ * @param signal - cancellation for a root listing.
17681
+ * @returns the root listing, or undefined when the live root is unavailable.
17682
+ */
17683
+ async rootSubagentEntries(agent, entries, signal) {
17684
+ const subagents = this.deps.ctx.get("subagents");
17685
+ if (subagents === void 0) return void 0;
17686
+ let root;
17687
+ try {
17688
+ root = subagents.rootOf(agent);
17689
+ } catch (error) {
17690
+ if (error instanceof SubagentError && error.code === "UNAUTHORIZED") return void 0;
17691
+ throw error;
17692
+ }
17693
+ return root === agent ? entries : await subagents.listDescendants(root.id, signal);
17694
+ }
17695
+ /** Build exact addresses from the live root's listing. */
17696
+ subagentAddressMap(entries) {
17697
+ const addresses = /* @__PURE__ */ new Map();
17698
+ for (const entry of entries ?? []) if (entry.path !== void 0) addresses.set(entry.id, entry.path);
17699
+ return addresses;
17700
+ }
17701
+ /**
17581
17702
  * Re-read the descendant listing once. Two listings never overlap and a
17582
17703
  * result the terminal moved away from is discarded — both leave the listing
17583
17704
  * stale, so the next tick reads again. A rejection keeps the rows the last
@@ -17594,19 +17715,29 @@ var TuiApp = class {
17594
17715
  }
17595
17716
  this.listing = true;
17596
17717
  this.subagentsStale = false;
17597
- const session = this.agent.session;
17718
+ const agent = this.agent;
17719
+ const session = agent.session;
17598
17720
  try {
17599
- const entries = await subagents.listDescendants(session.id, new AbortController().signal);
17600
- const root = readTeamSnapshot(this.deps.ctx, this.agent).kind === "team" ? subagents.rootOf(this.agent) : void 0;
17601
- const teamEntries = root === void 0 || root.session === session ? entries : await subagents.listDescendants(root.id, new AbortController().signal);
17602
- if (this.agent.session === session) {
17721
+ const signal = new AbortController().signal;
17722
+ const entries = await subagents.listDescendants(session.id, signal);
17723
+ let rootEntries;
17724
+ let addressFailure;
17725
+ try {
17726
+ rootEntries = await this.rootSubagentEntries(agent, entries, signal);
17727
+ } catch (error) {
17728
+ addressFailure = `address lookup: ${describeFailure(error)}`;
17729
+ }
17730
+ if (this.agent === agent) {
17603
17731
  this.subagentEntries = entries;
17604
- this.teamEntries = teamEntries;
17605
- this.listingFailure = void 0;
17732
+ this.subagentAddresses = this.subagentAddressMap(rootEntries);
17733
+ this.teamEntries = rootEntries ?? [];
17734
+ if (addressFailure === void 0) this.listingFailure = void 0;
17735
+ else this.reportListingFailure(addressFailure);
17606
17736
  this.flushPendingSubagentActivity();
17607
17737
  } else this.markSubagentsStale();
17608
17738
  } catch (error) {
17609
- this.reportListingFailure(describeFailure(error));
17739
+ if (this.agent === agent) this.reportListingFailure(describeFailure(error));
17740
+ else this.markSubagentsStale();
17610
17741
  } finally {
17611
17742
  this.listing = false;
17612
17743
  if (!this.stopped) {
@@ -18160,7 +18291,8 @@ var TuiApp = class {
18160
18291
  const entry = this.subagentEntries.find((candidate) => candidate.id === row.id);
18161
18292
  /* v8 ignore next -- every drawn row comes from the entries of the last listing */
18162
18293
  if (entry === void 0) return;
18163
- const choice = subagentChoice(entry);
18294
+ const address = this.subagentAddresses.get(entry.id);
18295
+ const choice = subagentChoice(entry, address === void 0 ? void 0 : { address });
18164
18296
  await this.enterSubagent(choice, this.subagentBrowseRow(choice));
18165
18297
  }
18166
18298
  async settings(argument) {
@@ -18461,6 +18593,10 @@ var TuiApp = class {
18461
18593
  this.shellAbort.abort();
18462
18594
  return { consume: true };
18463
18595
  }
18596
+ if (this.attachmentFlight !== void 0) {
18597
+ this.attachmentFlight.abort();
18598
+ return { consume: true };
18599
+ }
18464
18600
  if (this.compacting !== void 0) {
18465
18601
  this.compacting.abort();
18466
18602
  return { consume: true };
@@ -19116,6 +19252,10 @@ var TuiApp = class {
19116
19252
  onSubmit(raw, mode = "queue") {
19117
19253
  const text = raw.trim();
19118
19254
  if (text === "") return;
19255
+ if (this.attachmentFlight !== void 0 && !this.attachmentFlightAllows(text)) {
19256
+ this.notice(ATTACHMENT_FLIGHT_WAIT, "error");
19257
+ return;
19258
+ }
19119
19259
  if (this.switching) {
19120
19260
  this.notice(SESSION_SWITCH_WAIT, "error");
19121
19261
  return;
@@ -19126,12 +19266,18 @@ var TuiApp = class {
19126
19266
  this.syncEditorBorder();
19127
19267
  return;
19128
19268
  }
19269
+ if (this.queueDraft !== void 0 && /^\/retry(?:\s|$)/iu.test(text)) {
19270
+ this.notice("/retry: finish or cancel the queued draft first", "error");
19271
+ this.editor.setText(raw);
19272
+ this.syncEditorBorder();
19273
+ return;
19274
+ }
19129
19275
  this.editor.setText("");
19130
19276
  this.editor.addToHistory(text);
19131
19277
  const draft = this.queueDraft;
19132
19278
  this.queueDraft = void 0;
19133
19279
  if (draft === void 0 && text.startsWith("/")) {
19134
- this.dispatchCommand(text);
19280
+ this.dispatchCommand(text, raw);
19135
19281
  return;
19136
19282
  }
19137
19283
  const shell = draft === void 0 ? parseUserShellLine(text) : void 0;
@@ -19144,11 +19290,12 @@ var TuiApp = class {
19144
19290
  /**
19145
19291
  * Run one slash command and turn a rejection into a terminal notice.
19146
19292
  * @param line - the complete slash-command line.
19293
+ * @param original - the submitted editor text to restore after a refused retry.
19147
19294
  * @returns when the command or its failure notice settles.
19148
19295
  */
19149
- dispatchCommand(line) {
19296
+ dispatchCommand(line, original = line) {
19150
19297
  const name = line.slice(0, line.indexOf(" ") === -1 ? void 0 : line.indexOf(" "));
19151
- return this.runCommand(line).catch((error) => {
19298
+ return this.runCommand(line, original).catch((error) => {
19152
19299
  this.notice(`${name} failed: ${describeFailure(error)}`, "error");
19153
19300
  });
19154
19301
  }
@@ -19256,12 +19403,58 @@ var TuiApp = class {
19256
19403
  this.refreshFooter();
19257
19404
  }
19258
19405
  submit(text, mode = "queue", draft) {
19406
+ if (this.attachmentSubmissionPending()) return;
19407
+ const submitted = this.pending.slice();
19408
+ if (submitted.length === 0) {
19409
+ this.deliverPrompt(text, mode, draft, []);
19410
+ return;
19411
+ }
19412
+ const bound = this.bound;
19413
+ const controller = new AbortController();
19414
+ this.attachmentFlight = controller;
19415
+ this.admitAndDeliverPrompt(bound, controller, text, mode, draft, submitted);
19416
+ }
19417
+ /**
19418
+ * Admit one ordinary prompt's staged attachments before any message is created.
19419
+ * A refused batch, cancellation, or unexpected failure leaves the staged
19420
+ * attachments pending. Later additions stay pending too.
19421
+ */
19422
+ async admitAndDeliverPrompt(bound, controller, text, mode, draft, submitted) {
19423
+ const store = this.deps.ctx.get("attachments");
19424
+ try {
19425
+ if (store === void 0) {
19426
+ if (this.attachmentCurrent(bound, controller)) this.notice("no attachment store is composed", "error");
19427
+ return;
19428
+ }
19429
+ const admitted = await store.admitPromptContent(storedAttachmentParts(submitted));
19430
+ if (!this.attachmentCurrent(bound, controller)) return;
19431
+ if (controller.signal.aborted) {
19432
+ this.notice("prompt cancelled; attachments stayed pending", "error");
19433
+ return;
19434
+ }
19435
+ this.deliverPrompt(text, mode, draft, admitted.flatMap((part) => part.type === "text" ? [] : [part]), submitted);
19436
+ } catch (error) {
19437
+ if (!this.attachmentCurrent(bound, controller)) return;
19438
+ if (controller.signal.aborted) {
19439
+ this.notice("prompt cancelled; attachments stayed pending", "error");
19440
+ return;
19441
+ }
19442
+ if (store !== void 0 && store.isAttachmentError(error)) {
19443
+ this.notice(`${error.message}; attachments stayed pending`, "error");
19444
+ return;
19445
+ }
19446
+ this.notice(`prompt failed: ${describeFailure(error)}; the prompt was not sent; attachments stayed pending`, "error");
19447
+ } finally {
19448
+ this.finishAttachmentFlight(controller);
19449
+ }
19450
+ }
19451
+ /** Publish one prompt after its attachments, if any, were admitted. */
19452
+ deliverPrompt(text, mode, draft, attachments, submitted = []) {
19259
19453
  const agent = this.agent;
19260
- const attachments = this.pending.splice(0);
19261
19454
  const message = createUserMessage({
19262
19455
  content: [
19263
19456
  ...draft?.content.filter((block) => block.type !== "text") ?? [],
19264
- ...attachments.map((attachment) => attachment.block),
19457
+ ...attachments,
19265
19458
  {
19266
19459
  type: "text",
19267
19460
  text
@@ -19269,12 +19462,10 @@ var TuiApp = class {
19269
19462
  ],
19270
19463
  source: terminalPromptSource(draft)
19271
19464
  });
19272
- if (this.compacting !== void 0) {
19273
- agent.followup(message);
19274
- this.notice(COMPACTION_QUEUE_NOTICE);
19275
- } else if (agent.status !== "running") {
19465
+ if (this.compacting !== void 0) agent.followup(message);
19466
+ else if (agent.status !== "running") {
19276
19467
  this.submittedIds.add(message.id);
19277
- const shown = attachments.length === 0 ? text : `${text}\n${attachments.map((attachment) => `[${attachment.block.type}: ${attachment.name}]`).join(" ")}`;
19468
+ const shown = submitted.length === 0 ? text : `${text}\n${submitted.map((attachment) => `[${attachment.block.type}: ${attachment.name}]`).join(" ")}`;
19278
19469
  this.chat.addChild(new UserBlock(this.theme, shown, this.turn));
19279
19470
  agent.followup(message);
19280
19471
  } else if (mode === "steer") {
@@ -19284,10 +19475,52 @@ var TuiApp = class {
19284
19475
  agent.followup(message);
19285
19476
  this.notice("queued for the next turn (Ctrl+S steers the running turn instead)");
19286
19477
  }
19478
+ this.consumeSubmitted(submitted);
19479
+ if (this.compacting !== void 0) this.notice(COMPACTION_QUEUE_NOTICE);
19287
19480
  this.refreshQueue();
19288
19481
  this.refreshFooter();
19289
19482
  }
19290
- async runCommand(line) {
19483
+ /** Report that an attachment submission still owns the staged rows. */
19484
+ attachmentSubmissionPending() {
19485
+ if (this.attachmentFlight === void 0) return false;
19486
+ this.notice(ATTACHMENT_FLIGHT_WAIT, "error");
19487
+ return true;
19488
+ }
19489
+ /**
19490
+ * Whether `line` may run during admission.
19491
+ * Listing and adding stay available. Clearing, and any line that is not an
19492
+ * attach command, would race the batch already being admitted.
19493
+ * @param line - the trimmed editor line.
19494
+ * @returns true when the line lists or adds an attachment and no queued draft owns the editor.
19495
+ */
19496
+ attachmentFlightAllows(line) {
19497
+ if (this.queueDraft !== void 0) return false;
19498
+ const match = /^\/attach(?:\s+(\S(?:.*\S)?))?$/iu.exec(line);
19499
+ if (match === null) return false;
19500
+ return (match[1] ?? "").toLowerCase() !== "clear";
19501
+ }
19502
+ /**
19503
+ * Whether `controller` still owns admission for `bound`.
19504
+ * Quit and a session change make a late result silent.
19505
+ */
19506
+ attachmentCurrent(bound, controller) {
19507
+ return !this.stopped && this.bound === bound && this.attachmentFlight === controller;
19508
+ }
19509
+ /** Drop the flight marker once its admission settles. */
19510
+ finishAttachmentFlight(controller) {
19511
+ if (this.attachmentFlight === controller) this.attachmentFlight = void 0;
19512
+ }
19513
+ /** Remove exactly the attachments one successful submission admitted. */
19514
+ consumeSubmitted(submitted) {
19515
+ if (submitted.length === 0) return;
19516
+ const consumed = new Set(submitted);
19517
+ this.pending = this.pending.filter((attachment) => !consumed.has(attachment));
19518
+ }
19519
+ async runCommand(line, original = line) {
19520
+ if (/^\/retry(?:\s|$)/iu.test(line)) {
19521
+ await this.retryTurn(line.slice(6).trim(), original);
19522
+ return;
19523
+ }
19291
19524
  const space = line.indexOf(" ");
19292
19525
  const name = (space === -1 ? line : line.slice(0, space)).slice(1).toLowerCase();
19293
19526
  const argument = space === -1 ? "" : line.slice(space + 1).trim();
@@ -19429,7 +19662,23 @@ var TuiApp = class {
19429
19662
  this.setTeamPanel(argument);
19430
19663
  return;
19431
19664
  case "subagents": {
19432
- const choices = await listSubagentChoices(this.deps.ctx, this.agent.session.id, new AbortController().signal);
19665
+ const subagents = this.deps.ctx.get("subagents");
19666
+ if (subagents === void 0) throw new Error("subagents are not mounted in this profile");
19667
+ const agent = this.agent;
19668
+ const signal = new AbortController().signal;
19669
+ const entries = await subagents.listDescendants(agent.session.id, signal);
19670
+ let rootEntries;
19671
+ try {
19672
+ rootEntries = await this.rootSubagentEntries(agent, entries, signal);
19673
+ } catch (error) {
19674
+ if (this.agent === agent) this.notice(`subagent address lookup failed: ${describeFailure(error)}`, "error");
19675
+ }
19676
+ if (this.agent !== agent) return;
19677
+ const addresses = this.subagentAddressMap(rootEntries);
19678
+ const choices = entries.map((entry) => {
19679
+ const address = addresses.get(entry.id);
19680
+ return subagentChoice(entry, address === void 0 ? void 0 : { address });
19681
+ });
19433
19682
  if (choices.length === 0) {
19434
19683
  this.notice("no subagent sessions");
19435
19684
  return;
@@ -19453,9 +19702,63 @@ var TuiApp = class {
19453
19702
  await this.plugins(argument);
19454
19703
  return;
19455
19704
  case "compact":
19705
+ if (this.pending.length > 0) {
19706
+ await this.runUserSharedCommand(line, "compact");
19707
+ return;
19708
+ }
19456
19709
  await this.compact(line);
19457
19710
  return;
19458
- default: await this.runSharedCommand(line, name);
19711
+ default: await this.runUserSharedCommand(line, name);
19712
+ }
19713
+ }
19714
+ /** Admit a retry without consuming staged attachments or replacing a newer editor draft. */
19715
+ async retryTurn(argument, original) {
19716
+ const bound = this.bound;
19717
+ const restore = () => {
19718
+ if (this.stopped || this.bound !== bound) return;
19719
+ if (this.editor.getText() === "") {
19720
+ this.editor.setText(original);
19721
+ this.syncEditorBorder();
19722
+ } else this.notice(`/retry was not submitted; the current draft is unchanged: ${original}`, "error");
19723
+ };
19724
+ if (argument !== "") {
19725
+ this.notice("usage: /retry", "error");
19726
+ restore();
19727
+ return;
19728
+ }
19729
+ if (this.readOnlyViews.has(bound)) {
19730
+ this.notice("/retry is unavailable in a read-only session view", "error");
19731
+ restore();
19732
+ return;
19733
+ }
19734
+ if (this.retryingViews.has(bound)) {
19735
+ this.notice("/retry is already submitting", "error");
19736
+ restore();
19737
+ return;
19738
+ }
19739
+ const continuation = this.deps.ctx.get("sessionContinuation");
19740
+ if (continuation === void 0) {
19741
+ this.notice("/retry is unavailable: continuation service is not mounted", "error");
19742
+ restore();
19743
+ return;
19744
+ }
19745
+ this.retryingViews.add(bound);
19746
+ try {
19747
+ const result = await continuation.retry(bound.agent, {
19748
+ kind: "retry",
19749
+ rpcId: brandString(randomUUID())
19750
+ });
19751
+ if (this.stopped || this.bound !== bound) return;
19752
+ if (result === "unavailable") {
19753
+ this.notice("/retry: no eligible failed turn, or human input is still waiting", "error");
19754
+ restore();
19755
+ }
19756
+ } catch (error) {
19757
+ if (this.stopped || this.bound !== bound) return;
19758
+ this.notice(error instanceof SessionContinuationBusyError ? "/retry: wait for current work to finish, then retry" : `/retry failed: ${describeFailure(error)}`, "error");
19759
+ restore();
19760
+ } finally {
19761
+ this.retryingViews.delete(bound);
19459
19762
  }
19460
19763
  }
19461
19764
  /**
@@ -19475,11 +19778,55 @@ var TuiApp = class {
19475
19778
  this.tui.requestRender();
19476
19779
  }
19477
19780
  /**
19478
- * Run one command of the shared registry and print its result into the
19479
- * session it ran on. A success that names the `compaction/summary` this
19480
- * terminal just drew as a block prints nothing more; a run whose signal
19481
- * aborted reports the cancel; a result that settles after a session switch
19482
- * or quit prints nothing.
19781
+ * Run one user-typed shared command. Staged attachments are admitted with it
19782
+ * and removed only after success. A command that does not accept them fails
19783
+ * before its handler runs, and the staged rows stay. Permission and sandbox
19784
+ * submissions do not use this path.
19785
+ * @param line - the complete slash-command line.
19786
+ * @param name - the lowercase command name, for the notices.
19787
+ */
19788
+ async runUserSharedCommand(line, name) {
19789
+ const submitted = this.pending.slice();
19790
+ if (submitted.length === 0) {
19791
+ await this.runSharedCommand(line, name);
19792
+ return;
19793
+ }
19794
+ if (this.attachmentSubmissionPending()) return;
19795
+ const bound = this.bound;
19796
+ const controller = new AbortController();
19797
+ this.attachmentFlight = controller;
19798
+ const registry = this.deps.ctx.get("commands");
19799
+ try {
19800
+ if (registry === void 0) {
19801
+ this.notice(`unknown command /${name}; attachments stayed pending`, "error");
19802
+ return;
19803
+ }
19804
+ const execution = await registry.executeStored(bound.agent, line, storedAttachmentParts(submitted), controller.signal);
19805
+ if (!this.attachmentCurrent(bound, controller)) return;
19806
+ if (execution === void 0) {
19807
+ this.notice(`unknown command /${name}; attachments stayed pending`, "error");
19808
+ return;
19809
+ }
19810
+ const result = execution.result;
19811
+ if (result.kind === "error") {
19812
+ this.notice(`/${name}: ${result.text}; attachments stayed pending`, "error");
19813
+ return;
19814
+ }
19815
+ this.consumeSubmitted(submitted);
19816
+ if (result.sourceEventSeq === void 0 || result.sourceEventSeq !== this.drawnCompaction) this.notice(result.text === void 0 ? `/${name} done` : `/${name}: ${result.text}`, "success");
19817
+ } catch (error) {
19818
+ if (!this.attachmentCurrent(bound, controller)) return;
19819
+ this.notice(controller.signal.aborted ? `/${name} cancelled; attachments stayed pending and the command's use of them is unknown` : `/${name} failed: ${describeFailure(error)}; attachments stayed pending and the command's use of them is unknown`, "error");
19820
+ } finally {
19821
+ this.finishAttachmentFlight(controller);
19822
+ if (!this.stopped && this.bound === bound) this.refreshFooter();
19823
+ }
19824
+ }
19825
+ /**
19826
+ * Run one shared command without staged attachments and print its result into
19827
+ * the session it ran on. A success that names the compaction summary this
19828
+ * terminal just drew prints nothing more. A cancelled run reports that cancel.
19829
+ * A result that settles after a session switch or quit prints nothing.
19483
19830
  * @param line - the complete slash-command line.
19484
19831
  * @param name - the lowercase command name, for the notices.
19485
19832
  * @param signal - cancels the run; a run nothing cancels passes none.
@@ -19976,10 +20323,11 @@ var TuiApp = class {
19976
20323
  }
19977
20324
  async attachNow(argument) {
19978
20325
  if (argument === "") {
19979
- this.notice(this.pending.length === 0 ? "nothing attached; /attach <path> attaches a file or image to the next prompt" : `attached: ${this.pending.map((attachment) => attachment.name).join(", ")}`);
20326
+ this.notice(this.pending.length === 0 ? "nothing attached; /attach <path> attaches a file or image to the next prompt or a command that accepts attachments" : `attached: ${this.pending.map((attachment) => attachment.name).join(", ")}`);
19980
20327
  return;
19981
20328
  }
19982
20329
  if (argument === "clear") {
20330
+ if (this.attachmentSubmissionPending()) return;
19983
20331
  this.pending = [];
19984
20332
  this.notice("attachments cleared");
19985
20333
  this.refreshFooter();
@@ -19993,7 +20341,7 @@ var TuiApp = class {
19993
20341
  try {
19994
20342
  const pending = await attachLocalFile(store, this.deps.cwd, argument);
19995
20343
  this.pending.push(pending);
19996
- this.notice(`attached ${pending.block.type} ${pending.name}; it goes with the next prompt`, "success");
20344
+ this.notice(`attached ${pending.block.type} ${pending.name}; it goes with the next prompt or a command that accepts attachments`, "success");
19997
20345
  } catch (error) {
19998
20346
  this.notice(`attach failed: ${describeFailure(error)}`, "error");
19999
20347
  }
@@ -20131,8 +20479,16 @@ var TuiApp = class {
20131
20479
  async askQuestions(questions, signal) {
20132
20480
  const answers = [];
20133
20481
  for (const question of questions) {
20134
- const answer = await this.showModal(new QuestionPrompt(this.deps.palette, question), signal);
20135
- if (answer === null) throw new Error("the question was dismissed");
20482
+ const prompt = new QuestionPrompt(this.deps.palette, question);
20483
+ const withdraw = prompt.withdraw.bind(prompt);
20484
+ let withdrawn = false;
20485
+ prompt.withdraw = () => {
20486
+ withdrawn = true;
20487
+ withdraw();
20488
+ };
20489
+ const answer = await this.showModal(prompt, signal);
20490
+ if (withdrawn || signal?.aborted === true) throw new UserQuestionError("ask_user_question was aborted before the user answered", "ASK_ABORTED");
20491
+ if (answer === null) throw new UserQuestionError("the question was dismissed", "ASK_CANCELLED");
20136
20492
  answers.push(answer);
20137
20493
  }
20138
20494
  return { answers };
@@ -20662,6 +21018,11 @@ var TuiApp = class {
20662
21018
  case "system/message":
20663
21019
  this.onSystemMessage(event.data);
20664
21020
  break;
21021
+ case "developer/message": {
21022
+ const view = developerContextView(event.data.message.content);
21023
+ if (view !== void 0) this.addContext(view.title, view.parts, event.data.turn);
21024
+ break;
21025
+ }
20665
21026
  case "assistant/message": {
20666
21027
  const { message, usage, interrupted } = event.data;
20667
21028
  const text = message.content.filter((block) => block.type === "text").map((block) => block.text).join("");
@@ -20692,8 +21053,12 @@ var TuiApp = class {
20692
21053
  const isError = result.isError === true;
20693
21054
  const moved = isError ? movedJobId(result.content) : void 0;
20694
21055
  if (moved === void 0) {
20695
- const body = toolResultBody(this.presentResult(block.name, this.toolArguments.get(result.toolCallId), result.content, isError, event.data.meta), result.content);
20696
- block.setResult(body.lines, isError, body.code, body.diff, body);
21056
+ const view = this.presentResult(block.name, this.toolArguments.get(result.toolCallId), result.content, isError, event.data.meta);
21057
+ const patch = block.name === "apply_patch";
21058
+ const meta = event.data.meta;
21059
+ const stopped = patch && typeof meta === "object" && meta !== null && !Array.isArray(meta) && meta.stopped === true;
21060
+ const body = toolResultBody(view, result.content, patch);
21061
+ block.setResult(body.lines, isError || stopped, body.code, body.diff, body);
20697
21062
  } else block.setBackground([`◇ moved to the background as ${moved} · /jobs lists it`]);
20698
21063
  this.spinners.delete(block);
20699
21064
  this.updateSpinTicker();
@@ -20934,7 +21299,8 @@ var TuiApp = class {
20934
21299
  this.refreshWorkflowChildLinks();
20935
21300
  return;
20936
21301
  }
20937
- const choice = subagentChoice(entry);
21302
+ const address = this.subagentAddresses.get(entry.id);
21303
+ const choice = subagentChoice(entry, address === void 0 ? void 0 : { address });
20938
21304
  await this.enterSubagent(choice, this.subagentBrowseRow(choice), { liveOnly: true });
20939
21305
  }
20940
21306
  /**
@@ -20965,6 +21331,10 @@ var TuiApp = class {
20965
21331
  onUserMessage(message) {
20966
21332
  if (this.submittedIds.has(message.id)) return;
20967
21333
  const source = message.source;
21334
+ if (isEmptyRetry(source, message.content)) {
21335
+ this.notice("continuing failed turn");
21336
+ return;
21337
+ }
20968
21338
  if (source.kind === "user") {
20969
21339
  const attachments = message.content.filter((block) => block.type !== "text").map((block) => `[${block.type}]`);
20970
21340
  const text = [contentText(message.content), ...attachments].filter((part) => part !== "").join("\n");