@songtonyli/dsh-cli 0.1.93 → 0.1.94

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 (960) 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/README.md +10 -0
  6. package/node_modules/@deepseek-ai/cordis-plugin-include/lib/index.js +647 -149
  7. package/node_modules/@deepseek-ai/cordis-plugin-include/package.json +4 -4
  8. package/node_modules/@deepseek-ai/cordis-plugin-include/src/index.ts +362 -236
  9. package/node_modules/@deepseek-ai/cordis-plugin-include/src/journal.ts +242 -0
  10. package/node_modules/@deepseek-ai/cordis-plugin-include/src/patch.ts +261 -0
  11. package/node_modules/@deepseek-ai/cordis-plugin-loader/README.md +5 -1
  12. package/node_modules/@deepseek-ai/cordis-plugin-loader/lib/index.js +96 -20
  13. package/node_modules/@deepseek-ai/cordis-plugin-loader/package.json +4 -4
  14. package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/entry.ts +2 -2
  15. package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/group.ts +3 -2
  16. package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/tree.ts +77 -8
  17. package/node_modules/@deepseek-ai/cordis-plugin-loader/src/index.ts +24 -13
  18. package/node_modules/@deepseek-ai/cordis-plugin-timer/package.json +3 -3
  19. package/node_modules/@deepseek-ai/cosmokit/package.json +1 -1
  20. package/node_modules/@deepseek-ai/dsh/lib/bin-DQ1vWxS0.js +254 -0
  21. package/node_modules/@deepseek-ai/dsh/lib/bin.js +19 -245
  22. package/node_modules/@deepseek-ai/dsh/lib/{dump-config-D97dwXdd.js → dump-config-DCQrFN8g.js} +3 -3
  23. package/node_modules/@deepseek-ai/dsh/lib/dump-config-ekMiCsuS.js +2 -0
  24. package/node_modules/@deepseek-ai/dsh/lib/{dump-config-schema-r4V15-lg.js → dump-config-schema-C_NhxM7L.js} +2 -2
  25. package/node_modules/@deepseek-ai/dsh/lib/{plugin-DscIHF4k.js → plugin-cQMw2oZz.js} +4 -4
  26. package/node_modules/@deepseek-ai/dsh/lib/profile-boot.js +1 -1
  27. package/node_modules/@deepseek-ai/dsh/package.json +127 -127
  28. package/node_modules/@deepseek-ai/dsh-acp/lib/index.js +1 -1
  29. package/node_modules/@deepseek-ai/dsh-acp/package.json +26 -26
  30. package/node_modules/@deepseek-ai/dsh-acp-app/package.json +6 -6
  31. package/node_modules/@deepseek-ai/dsh-action-cards/README.i18n.yaml +2 -2
  32. package/node_modules/@deepseek-ai/dsh-action-cards/README.md +1 -1
  33. package/node_modules/@deepseek-ai/dsh-action-cards/README.zh.md +1 -1
  34. package/node_modules/@deepseek-ai/dsh-action-cards/lib/index.js +7 -4
  35. package/node_modules/@deepseek-ai/dsh-action-cards/lib/typert.host.js +16 -4
  36. package/node_modules/@deepseek-ai/dsh-action-cards/lib/typert.remote-client.js +1 -1
  37. package/node_modules/@deepseek-ai/dsh-action-cards/lib/types/index.js +7 -4
  38. package/node_modules/@deepseek-ai/dsh-action-cards/package.json +19 -19
  39. package/node_modules/@deepseek-ai/dsh-agent/README.i18n.yaml +2 -2
  40. package/node_modules/@deepseek-ai/dsh-agent/README.md +1 -1
  41. package/node_modules/@deepseek-ai/dsh-agent/README.zh.md +1 -1
  42. package/node_modules/@deepseek-ai/dsh-agent/lib/index.js +5 -30
  43. package/node_modules/@deepseek-ai/dsh-agent/lib/types/index.js +5 -32
  44. package/node_modules/@deepseek-ai/dsh-agent/package.json +21 -21
  45. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +10 -10
  46. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +28 -28
  47. package/node_modules/@deepseek-ai/dsh-agent-loop/README.i18n.yaml +2 -2
  48. package/node_modules/@deepseek-ai/dsh-agent-loop/README.md +1 -1
  49. package/node_modules/@deepseek-ai/dsh-agent-loop/README.zh.md +1 -1
  50. package/node_modules/@deepseek-ai/dsh-agent-loop/lib/index.js +5 -7
  51. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +27 -27
  52. package/node_modules/@deepseek-ai/dsh-agent-preset/package.json +13 -13
  53. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +12 -8
  54. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/index.js +1 -1
  55. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.host.js +15 -3
  56. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/types/mount.js +1 -1
  57. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/package.json +39 -39
  58. package/node_modules/@deepseek-ai/dsh-agent-team/README.i18n.yaml +97 -0
  59. package/node_modules/@deepseek-ai/dsh-agent-team/README.md +217 -0
  60. package/node_modules/@deepseek-ai/dsh-agent-team/README.zh.md +217 -0
  61. package/node_modules/@deepseek-ai/dsh-agent-team/lib/index.js +824 -0
  62. package/node_modules/@deepseek-ai/dsh-agent-team/lib/typert.host.js +825 -0
  63. package/node_modules/@deepseek-ai/dsh-agent-team/lib/typert.remote-client.js +79 -0
  64. package/node_modules/@deepseek-ai/dsh-agent-team/lib/types/client.js +3 -0
  65. package/node_modules/@deepseek-ai/dsh-agent-team/lib/types/error.js +10 -0
  66. package/node_modules/@deepseek-ai/dsh-agent-team/lib/types/index.js +176 -0
  67. package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/journal.js +17 -16
  68. package/node_modules/@deepseek-ai/dsh-agent-team/lib/types/projection.js +172 -0
  69. package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/task-board.js +47 -25
  70. package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/task-view.js +4 -10
  71. package/node_modules/@deepseek-ai/dsh-agent-team/locale/en.json +6 -0
  72. package/node_modules/@deepseek-ai/dsh-agent-team/locale/ja.json +6 -0
  73. package/node_modules/@deepseek-ai/dsh-agent-team/locale/zh.json +6 -0
  74. package/node_modules/@deepseek-ai/dsh-agent-team/package.json +83 -0
  75. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +13 -13
  76. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +7 -7
  77. package/node_modules/@deepseek-ai/dsh-api-account-controller/package.json +9 -9
  78. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/package.json +14 -14
  79. package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +14 -14
  80. package/node_modules/@deepseek-ai/dsh-api-job-controller/package.json +12 -12
  81. package/node_modules/@deepseek-ai/dsh-api-remote-access/package.json +9 -9
  82. package/node_modules/@deepseek-ai/dsh-api-remotes/README.i18n.yaml +4 -4
  83. package/node_modules/@deepseek-ai/dsh-api-remotes/README.md +2 -2
  84. package/node_modules/@deepseek-ai/dsh-api-remotes/README.zh.md +2 -2
  85. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +1048 -558
  86. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/index.js +4 -0
  87. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/client/index.js +8 -3
  88. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/remote-events.js +1 -0
  89. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +49 -46
  90. package/node_modules/@deepseek-ai/dsh-api-session-controller/README.i18n.yaml +4 -4
  91. package/node_modules/@deepseek-ai/dsh-api-session-controller/README.md +4 -4
  92. package/node_modules/@deepseek-ai/dsh-api-session-controller/README.zh.md +4 -4
  93. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +16 -48
  94. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +46 -44
  95. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +252 -264
  96. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +209 -245
  97. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.js +10 -19
  98. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/archived-session-gate.js +6 -3
  99. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/manager.js +8 -32
  100. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/session.js +4 -21
  101. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.js +2 -2
  102. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/control.js +3 -3
  103. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/controller.js +2 -2
  104. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/listener.js +7 -7
  105. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +2 -2
  106. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.js +14 -7
  107. package/node_modules/@deepseek-ai/dsh-api-session-controller/package.json +77 -77
  108. package/node_modules/@deepseek-ai/dsh-api-settings-controller/package.json +16 -16
  109. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +15 -3
  110. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/package.json +22 -22
  111. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/package.json +21 -21
  112. package/node_modules/@deepseek-ai/dsh-api-workspace-files/package.json +15 -15
  113. package/node_modules/@deepseek-ai/dsh-app-boot/README.i18n.yaml +2 -2
  114. package/node_modules/@deepseek-ai/dsh-app-boot/README.md +2 -0
  115. package/node_modules/@deepseek-ai/dsh-app-boot/README.zh.md +2 -0
  116. package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +841 -145
  117. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +19 -19
  118. package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +3 -3
  119. package/node_modules/@deepseek-ai/dsh-attachment/package.json +5 -5
  120. package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +9 -9
  121. package/node_modules/@deepseek-ai/dsh-authorization/package.json +7 -7
  122. package/node_modules/@deepseek-ai/dsh-base/README.i18n.yaml +2 -2
  123. package/node_modules/@deepseek-ai/dsh-base/README.md +2 -0
  124. package/node_modules/@deepseek-ai/dsh-base/README.zh.md +2 -0
  125. package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +29 -15
  126. package/node_modules/@deepseek-ai/dsh-base/package.json +103 -101
  127. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +11 -11
  128. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +14 -14
  129. package/node_modules/@deepseek-ai/dsh-brand/package.json +3 -3
  130. package/node_modules/@deepseek-ai/dsh-chunked-list/package.json +3 -3
  131. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +13 -13
  132. package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +15 -3
  133. package/node_modules/@deepseek-ai/dsh-client-file-upload/package.json +12 -12
  134. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +7 -7
  135. package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +16 -0
  136. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +10 -10
  137. package/node_modules/@deepseek-ai/dsh-client-modules/README.i18n.yaml +2 -2
  138. package/node_modules/@deepseek-ai/dsh-client-modules/README.md +1 -1
  139. package/node_modules/@deepseek-ai/dsh-client-modules/README.zh.md +1 -1
  140. package/node_modules/@deepseek-ai/dsh-client-modules/lib/client.js +5 -1
  141. package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +1 -1
  142. package/node_modules/@deepseek-ai/dsh-client-modules/package.json +6 -6
  143. package/node_modules/@deepseek-ai/dsh-client-product-analytics/package.json +16 -16
  144. package/node_modules/@deepseek-ai/dsh-client-resources/package.json +5 -5
  145. package/node_modules/@deepseek-ai/dsh-client-shortcuts/package.json +9 -9
  146. package/node_modules/@deepseek-ai/dsh-client-ui-action-cards/lib/client.js +1 -1
  147. package/node_modules/@deepseek-ai/dsh-client-ui-action-cards/package.json +15 -15
  148. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
  149. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +17 -17
  150. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/README.i18n.yaml +40 -0
  151. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/README.md +100 -0
  152. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/README.zh.md +100 -0
  153. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/lib/client.js +1425 -0
  154. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/locale/en.json +6 -0
  155. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/locale/ja.json +6 -0
  156. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/locale/zh.json +6 -0
  157. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/package.json +72 -0
  158. package/node_modules/@deepseek-ai/dsh-client-ui-approval/package.json +13 -13
  159. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +12 -12
  160. package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/package.json +5 -5
  161. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.i18n.yaml +4 -4
  162. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.md +3 -1
  163. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.zh.md +3 -1
  164. package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +74 -7
  165. package/node_modules/@deepseek-ai/dsh-client-ui-chat/package.json +40 -40
  166. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +14 -14
  167. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/package.json +10 -10
  168. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.i18n.yaml +4 -4
  169. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.md +5 -4
  170. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.zh.md +5 -4
  171. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +56 -48
  172. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +35 -35
  173. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +13 -13
  174. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/README.i18n.yaml +8 -8
  175. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/README.md +4 -4
  176. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/README.zh.md +4 -4
  177. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/lib/client.js +24 -61
  178. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/de.json +1 -1
  179. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/en.json +1 -1
  180. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/es.json +1 -1
  181. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/fr.json +1 -1
  182. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/ja.json +1 -1
  183. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/pt.json +1 -1
  184. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/ru.json +1 -1
  185. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/zh.json +1 -1
  186. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/package.json +11 -11
  187. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +28 -28
  188. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +7 -7
  189. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +6 -6
  190. package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/README.i18n.yaml +6 -6
  191. package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/README.md +5 -5
  192. package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/README.zh.md +5 -5
  193. package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/lib/client.js +73 -21
  194. package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/package.json +11 -11
  195. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/package.json +10 -10
  196. package/node_modules/@deepseek-ai/dsh-client-ui-file-drag/package.json +7 -7
  197. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +14 -14
  198. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +11 -11
  199. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.i18n.yaml +4 -4
  200. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.md +5 -1
  201. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.zh.md +5 -1
  202. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +185 -89
  203. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +10 -10
  204. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +9 -9
  205. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +15 -15
  206. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.i18n.yaml +8 -8
  207. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.md +5 -3
  208. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.zh.md +5 -3
  209. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +106 -111
  210. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +16 -16
  211. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/package.json +25 -25
  212. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +14 -14
  213. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +19 -19
  214. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.i18n.yaml +4 -4
  215. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.md +3 -3
  216. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.zh.md +3 -3
  217. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +4 -6
  218. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/package.json +18 -18
  219. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/package.json +12 -12
  220. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-recommendations/package.json +13 -13
  221. package/node_modules/@deepseek-ai/dsh-client-ui-reference/package.json +16 -16
  222. package/node_modules/@deepseek-ai/dsh-client-ui-renderer/README.i18n.yaml +4 -4
  223. package/node_modules/@deepseek-ai/dsh-client-ui-renderer/README.md +2 -2
  224. package/node_modules/@deepseek-ai/dsh-client-ui-renderer/README.zh.md +2 -2
  225. package/node_modules/@deepseek-ai/dsh-client-ui-renderer/package.json +3 -3
  226. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.i18n.yaml +8 -8
  227. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.md +12 -8
  228. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.zh.md +12 -8
  229. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +4002 -400
  230. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/package.json +21 -21
  231. package/node_modules/@deepseek-ai/dsh-client-ui-secret-mask/package.json +6 -6
  232. package/node_modules/@deepseek-ai/dsh-client-ui-session/package.json +9 -9
  233. package/node_modules/@deepseek-ai/dsh-client-ui-settings/README.i18n.yaml +4 -4
  234. package/node_modules/@deepseek-ai/dsh-client-ui-settings/README.md +3 -0
  235. package/node_modules/@deepseek-ai/dsh-client-ui-settings/README.zh.md +3 -0
  236. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +7 -7
  237. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2 -2
  238. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/package.json +17 -17
  239. package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/package.json +8 -8
  240. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.i18n.yaml +4 -4
  241. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.md +3 -1
  242. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.zh.md +3 -1
  243. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +469 -41
  244. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +17 -17
  245. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +11 -11
  246. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +11 -11
  247. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +7 -7
  248. package/node_modules/@deepseek-ai/dsh-client-ui-settings-session-log/package.json +8 -8
  249. package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/package.json +8 -8
  250. package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/package.json +7 -7
  251. package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/package.json +8 -8
  252. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.i18n.yaml +12 -12
  253. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.md +15 -10
  254. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.zh.md +15 -10
  255. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/lib/client.js +773 -335
  256. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/de.json +2 -2
  257. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/es.json +2 -2
  258. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/fr.json +2 -2
  259. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/ja.json +2 -2
  260. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/pt.json +2 -2
  261. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/ru.json +2 -2
  262. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/zh.json +2 -2
  263. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/package.json +10 -9
  264. package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/package.json +9 -9
  265. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.i18n.yaml +8 -8
  266. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.md +11 -6
  267. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.zh.md +11 -6
  268. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +269 -111
  269. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +11 -11
  270. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/package.json +10 -10
  271. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.i18n.yaml +2 -2
  272. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.md +1 -1
  273. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.zh.md +1 -1
  274. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +1 -1
  275. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/package.json +21 -21
  276. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/package.json +14 -14
  277. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/package.json +15 -15
  278. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/package.json +14 -14
  279. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +16 -16
  280. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.i18n.yaml +12 -12
  281. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.md +16 -8
  282. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.zh.md +16 -8
  283. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +310 -150
  284. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +18 -17
  285. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +12 -12
  286. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.i18n.yaml +4 -4
  287. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.md +4 -2
  288. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.zh.md +4 -2
  289. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +128 -50
  290. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +31 -31
  291. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +20 -20
  292. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +22 -22
  293. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +13 -13
  294. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.i18n.yaml +2 -2
  295. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.md +6 -2
  296. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.zh.md +6 -2
  297. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +44 -37
  298. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +26 -26
  299. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +6 -6
  300. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +12 -12
  301. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +15 -15
  302. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +14 -14
  303. package/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +15 -3
  304. package/node_modules/@deepseek-ai/dsh-commands/package.json +18 -18
  305. package/node_modules/@deepseek-ai/dsh-compaction/package.json +11 -11
  306. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +27 -27
  307. package/node_modules/@deepseek-ai/dsh-compaction-image-offload/package.json +18 -18
  308. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +17 -17
  309. package/node_modules/@deepseek-ai/dsh-computer-use/README.i18n.yaml +37 -0
  310. package/node_modules/@deepseek-ai/dsh-computer-use/README.md +90 -0
  311. package/node_modules/@deepseek-ai/dsh-computer-use/README.zh.md +90 -0
  312. package/node_modules/@deepseek-ai/dsh-computer-use/lib/index.js +35 -0
  313. package/node_modules/@deepseek-ai/dsh-computer-use/lib/types/brand.js +10 -0
  314. package/node_modules/@deepseek-ai/dsh-computer-use/lib/types/index.js +36 -0
  315. package/node_modules/@deepseek-ai/dsh-computer-use/locale/de.json +6 -0
  316. package/node_modules/@deepseek-ai/dsh-computer-use/locale/en.json +6 -0
  317. package/node_modules/@deepseek-ai/dsh-computer-use/locale/es.json +6 -0
  318. package/node_modules/@deepseek-ai/dsh-computer-use/locale/fr.json +6 -0
  319. package/node_modules/@deepseek-ai/dsh-computer-use/locale/ja.json +6 -0
  320. package/node_modules/@deepseek-ai/dsh-computer-use/locale/pt.json +6 -0
  321. package/node_modules/@deepseek-ai/dsh-computer-use/locale/ru.json +6 -0
  322. package/node_modules/@deepseek-ai/dsh-computer-use/locale/zh.json +6 -0
  323. package/node_modules/@deepseek-ai/dsh-computer-use/package.json +44 -0
  324. package/node_modules/@deepseek-ai/dsh-config-editor/package.json +12 -12
  325. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +230 -62
  326. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +10 -10
  327. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +30 -6
  328. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +23 -23
  329. package/node_modules/@deepseek-ai/dsh-creation-recommendations/README.i18n.yaml +6 -6
  330. package/node_modules/@deepseek-ai/dsh-creation-recommendations/README.md +5 -3
  331. package/node_modules/@deepseek-ai/dsh-creation-recommendations/README.zh.md +5 -3
  332. package/node_modules/@deepseek-ai/dsh-creation-recommendations/lib/index.js +75 -77
  333. package/node_modules/@deepseek-ai/dsh-creation-recommendations/lib/types/index.js +59 -54
  334. package/node_modules/@deepseek-ai/dsh-creation-recommendations/package.json +21 -21
  335. package/node_modules/@deepseek-ai/dsh-credentials/package.json +4 -4
  336. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +12 -12
  337. package/node_modules/@deepseek-ai/dsh-cua/README.i18n.yaml +49 -0
  338. package/node_modules/@deepseek-ai/dsh-cua/README.md +132 -0
  339. package/node_modules/@deepseek-ai/dsh-cua/README.zh.md +132 -0
  340. package/node_modules/@deepseek-ai/dsh-cua/lib/api.js +597 -0
  341. package/node_modules/@deepseek-ai/dsh-cua/lib/bridge.js +611 -0
  342. package/node_modules/@deepseek-ai/dsh-cua/lib/client.js +1803 -0
  343. package/node_modules/@deepseek-ai/dsh-cua/lib/index.js +1922 -0
  344. package/node_modules/@deepseek-ai/dsh-cua/lib/native-client.js +285 -0
  345. package/node_modules/@deepseek-ai/dsh-cua/lib/protocol.js +305 -0
  346. package/node_modules/@deepseek-ai/dsh-cua/lib/remote-types.js +1 -0
  347. package/node_modules/@deepseek-ai/dsh-cua/lib/typert.host.js +458 -0
  348. package/node_modules/@deepseek-ai/dsh-cua/lib/typert.remote-client.js +343 -0
  349. package/node_modules/@deepseek-ai/dsh-cua/locale/de.json +6 -0
  350. package/node_modules/@deepseek-ai/dsh-cua/locale/en.json +6 -0
  351. package/node_modules/@deepseek-ai/dsh-cua/locale/es.json +6 -0
  352. package/node_modules/@deepseek-ai/dsh-cua/locale/fr.json +6 -0
  353. package/node_modules/@deepseek-ai/dsh-cua/locale/ja.json +6 -0
  354. package/node_modules/@deepseek-ai/dsh-cua/locale/pt.json +6 -0
  355. package/node_modules/@deepseek-ai/dsh-cua/locale/ru.json +6 -0
  356. package/node_modules/@deepseek-ai/dsh-cua/locale/zh.json +6 -0
  357. package/node_modules/@deepseek-ai/dsh-cua/package.json +151 -0
  358. package/node_modules/@deepseek-ai/dsh-cua-bundle/README.i18n.yaml +46 -0
  359. package/node_modules/@deepseek-ai/dsh-cua-bundle/README.md +94 -0
  360. package/node_modules/@deepseek-ai/dsh-cua-bundle/README.zh.md +94 -0
  361. package/node_modules/@deepseek-ai/dsh-cua-bundle/cordis.patch.yml +10 -0
  362. package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/DETAIL.md +1 -0
  363. package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/DETAIL.zh.md +1 -0
  364. package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/preview.svg +33 -0
  365. package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/preview.zh.svg +33 -0
  366. package/node_modules/@deepseek-ai/dsh-cua-bundle/icon.svg +35 -0
  367. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/de.json +7 -0
  368. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/en.json +7 -0
  369. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/es.json +7 -0
  370. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/fr.json +7 -0
  371. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/ja.json +7 -0
  372. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/pt.json +7 -0
  373. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/ru.json +7 -0
  374. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/zh.json +7 -0
  375. package/node_modules/@deepseek-ai/{dsh-experimental-agent-team-profile → dsh-cua-bundle}/package.json +15 -12
  376. package/node_modules/@deepseek-ai/dsh-deepseek-account/package.json +11 -11
  377. package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/package.json +12 -12
  378. package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/package.json +3 -3
  379. package/node_modules/@deepseek-ai/dsh-deliverable-file-references/package.json +5 -5
  380. package/node_modules/@deepseek-ai/dsh-deque/package.json +3 -3
  381. package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/package.json +8 -8
  382. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/package.json +46 -46
  383. package/node_modules/@deepseek-ai/dsh-experimental-badge-skill-bundle/package.json +4 -4
  384. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/package.json +20 -20
  385. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.i18n.yaml +2 -2
  386. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.md +2 -2
  387. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.zh.md +2 -2
  388. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/client.js +5773 -5757
  389. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/typert.host.js +15 -3
  390. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/package.json +42 -42
  391. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/package.json +19 -18
  392. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/package.json +15 -15
  393. package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/package.json +6 -6
  394. package/node_modules/@deepseek-ai/dsh-experimental-forge/package.json +6 -6
  395. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/README.i18n.yaml +10 -10
  396. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/README.md +6 -4
  397. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/README.zh.md +6 -4
  398. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/cordis.patch.yml +4 -0
  399. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.de.md +1 -0
  400. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.es.md +1 -0
  401. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.fr.md +1 -0
  402. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.ja.md +1 -0
  403. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.md +1 -0
  404. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.pt.md +1 -0
  405. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.ru.md +1 -0
  406. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.zh.md +1 -0
  407. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/preview.svg +28 -0
  408. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/preview.zh.svg +28 -0
  409. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/de.json +2 -1
  410. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/en.json +2 -1
  411. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/es.json +2 -1
  412. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/fr.json +2 -1
  413. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/ja.json +2 -1
  414. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/pt.json +2 -1
  415. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/ru.json +2 -1
  416. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/zh.json +2 -1
  417. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/package.json +10 -8
  418. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/package.json +10 -10
  419. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/lib/index.js +11 -1
  420. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/package.json +33 -33
  421. package/node_modules/@deepseek-ai/dsh-experimental-inspector/package.json +17 -17
  422. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/package.json +7 -7
  423. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/README.i18n.yaml +8 -8
  424. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/README.md +8 -8
  425. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/README.zh.md +8 -8
  426. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/cordis.patch.yml +0 -4
  427. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/client.js +892 -501
  428. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/index.js +607 -229
  429. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/typert.host.js +45 -31
  430. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/typert.remote-client.js +33 -27
  431. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/package.json +73 -75
  432. package/node_modules/@deepseek-ai/dsh-experimental-liveshare-protocol/package.json +4 -4
  433. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/package.json +5 -5
  434. package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/package.json +5 -5
  435. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/README.i18n.yaml +2 -2
  436. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/README.md +1 -1
  437. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/README.zh.md +1 -1
  438. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/lib/client.js +6 -2
  439. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/package.json +12 -12
  440. package/node_modules/@deepseek-ai/dsh-experimental-session-search/package.json +5 -5
  441. package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/package.json +4 -4
  442. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/package.json +11 -11
  443. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/package.json +10 -10
  444. package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/package.json +6 -6
  445. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/README.i18n.yaml +4 -4
  446. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/README.md +2 -2
  447. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/README.zh.md +2 -2
  448. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/package.json +23 -23
  449. package/node_modules/@deepseek-ai/dsh-experimental-translator/package.json +29 -29
  450. package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/package.json +8 -8
  451. package/node_modules/@deepseek-ai/dsh-experimental-worktree/package.json +23 -23
  452. package/node_modules/@deepseek-ai/dsh-file-reference/package.json +5 -5
  453. package/node_modules/@deepseek-ai/dsh-file-reference-local/package.json +17 -17
  454. package/node_modules/@deepseek-ai/dsh-fs/package.json +10 -10
  455. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +8 -8
  456. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/README.i18n.yaml +2 -2
  457. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/README.md +1 -1
  458. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/README.zh.md +1 -1
  459. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +6 -6
  460. package/node_modules/@deepseek-ai/dsh-fs-patch/package.json +3 -3
  461. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +12 -12
  462. package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +15 -3
  463. package/node_modules/@deepseek-ai/dsh-goal/package.json +23 -23
  464. package/node_modules/@deepseek-ai/dsh-goal-round-driver/README.i18n.yaml +2 -2
  465. package/node_modules/@deepseek-ai/dsh-goal-round-driver/README.md +1 -1
  466. package/node_modules/@deepseek-ai/dsh-goal-round-driver/README.zh.md +1 -1
  467. package/node_modules/@deepseek-ai/dsh-goal-round-driver/lib/index.js +5 -1
  468. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +17 -17
  469. package/node_modules/@deepseek-ai/dsh-harness-dev-context/package.json +13 -13
  470. package/node_modules/@deepseek-ai/dsh-headless/README.i18n.yaml +2 -2
  471. package/node_modules/@deepseek-ai/dsh-headless/README.md +2 -0
  472. package/node_modules/@deepseek-ai/dsh-headless/README.zh.md +2 -0
  473. package/node_modules/@deepseek-ai/dsh-headless/lib/index.js +1 -1
  474. package/node_modules/@deepseek-ai/dsh-headless/package.json +30 -30
  475. package/node_modules/@deepseek-ai/dsh-hmr/lib/index.js +5 -1
  476. package/node_modules/@deepseek-ai/dsh-hmr/package.json +15 -15
  477. package/node_modules/@deepseek-ai/dsh-home-paths/package.json +3 -3
  478. package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +3 -3
  479. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/README.i18n.yaml +2 -2
  480. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/README.md +1 -1
  481. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/README.zh.md +1 -1
  482. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +20 -20
  483. package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +5 -5
  484. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +5 -5
  485. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +10 -10
  486. package/node_modules/@deepseek-ai/dsh-host-open-in-app/package.json +9 -9
  487. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/typert.host.js +2 -2
  488. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/typert.remote-client.js +2 -2
  489. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +13 -13
  490. package/node_modules/@deepseek-ai/dsh-host-product-telemetry-otel/package.json +8 -8
  491. package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +5 -5
  492. package/node_modules/@deepseek-ai/dsh-http-proxy/README.i18n.yaml +6 -6
  493. package/node_modules/@deepseek-ai/dsh-http-proxy/README.md +4 -1
  494. package/node_modules/@deepseek-ai/dsh-http-proxy/README.zh.md +4 -1
  495. package/node_modules/@deepseek-ai/dsh-http-proxy/lib/index.js +54 -16
  496. package/node_modules/@deepseek-ai/dsh-http-proxy/package.json +3 -3
  497. package/node_modules/@deepseek-ai/dsh-jobs/package.json +11 -11
  498. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +16 -16
  499. package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +3 -3
  500. package/node_modules/@deepseek-ai/dsh-lazy-require/package.json +3 -3
  501. package/node_modules/@deepseek-ai/dsh-llm/README.i18n.yaml +2 -2
  502. package/node_modules/@deepseek-ai/dsh-llm/README.md +1 -1
  503. package/node_modules/@deepseek-ai/dsh-llm/README.zh.md +1 -1
  504. package/node_modules/@deepseek-ai/dsh-llm/lib/index.js +37 -14
  505. package/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +14 -2
  506. package/node_modules/@deepseek-ai/dsh-llm/lib/types/content.js +38 -20
  507. package/node_modules/@deepseek-ai/dsh-llm/package.json +11 -11
  508. package/node_modules/@deepseek-ai/dsh-llm-cursor/package.json +26 -26
  509. package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.i18n.yaml +6 -6
  510. package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.md +4 -1
  511. package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.zh.md +4 -1
  512. package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +52 -2
  513. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +45 -45
  514. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/README.i18n.yaml +2 -2
  515. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/README.md +1 -1
  516. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/README.zh.md +1 -1
  517. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/lib/index.js +5 -8
  518. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/package.json +17 -17
  519. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/README.i18n.yaml +2 -2
  520. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/README.md +1 -1
  521. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/README.zh.md +1 -1
  522. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/lib/index.js +4 -10
  523. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/package.json +14 -14
  524. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.i18n.yaml +8 -8
  525. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.md +7 -2
  526. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.zh.md +7 -2
  527. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +18 -8
  528. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +28 -28
  529. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +25 -25
  530. package/node_modules/@deepseek-ai/dsh-mcp-client/README.i18n.yaml +15 -12
  531. package/node_modules/@deepseek-ai/dsh-mcp-client/README.md +29 -6
  532. package/node_modules/@deepseek-ai/dsh-mcp-client/README.zh.md +29 -6
  533. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js +870 -202
  534. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/connection.js +379 -0
  535. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/credentials.js +99 -0
  536. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/deadline.js +27 -0
  537. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/diagnostic.js +56 -0
  538. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/generation.js +111 -0
  539. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/index.js +163 -0
  540. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/probe.js +89 -0
  541. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/server-context.js +25 -0
  542. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/status.js +95 -0
  543. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/templates.js +66 -0
  544. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/tools.js +432 -0
  545. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/transport.js +39 -0
  546. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/types.js +7 -0
  547. package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +34 -24
  548. package/node_modules/@deepseek-ai/dsh-mcp-manager/README.i18n.yaml +64 -0
  549. package/node_modules/@deepseek-ai/dsh-mcp-manager/README.md +196 -0
  550. package/node_modules/@deepseek-ai/dsh-mcp-manager/README.zh.md +196 -0
  551. package/node_modules/@deepseek-ai/dsh-mcp-manager/lib/index.js +572 -0
  552. package/node_modules/@deepseek-ai/dsh-mcp-manager/lib/typert.host.js +323 -0
  553. package/node_modules/@deepseek-ai/dsh-mcp-manager/lib/typert.remote-client.js +170 -0
  554. package/node_modules/@deepseek-ai/dsh-mcp-manager/lib/types/index.js +582 -0
  555. package/node_modules/@deepseek-ai/dsh-mcp-manager/lib/types/types.js +8 -0
  556. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/de.json +6 -0
  557. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/en.json +6 -0
  558. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/es.json +6 -0
  559. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/fr.json +6 -0
  560. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/ja.json +6 -0
  561. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/pt.json +6 -0
  562. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/ru.json +6 -0
  563. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/zh.json +6 -0
  564. package/node_modules/@deepseek-ai/dsh-mcp-manager/package.json +77 -0
  565. package/node_modules/@deepseek-ai/dsh-mcp-resources/package.json +16 -16
  566. package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +19 -19
  567. package/node_modules/@deepseek-ai/dsh-message-quotes/lib/client.js +2 -2
  568. package/node_modules/@deepseek-ai/dsh-message-quotes/package.json +9 -9
  569. package/node_modules/@deepseek-ai/dsh-native-command/package.json +4 -4
  570. package/node_modules/@deepseek-ai/dsh-no-progress-reminder/lib/index.js +38 -15
  571. package/node_modules/@deepseek-ai/dsh-no-progress-reminder/package.json +16 -16
  572. package/node_modules/@deepseek-ai/dsh-office-to-pdf/package.json +11 -11
  573. package/node_modules/@deepseek-ai/dsh-official-bundles/README.i18n.yaml +2 -2
  574. package/node_modules/@deepseek-ai/dsh-official-bundles/README.md +1 -1
  575. package/node_modules/@deepseek-ai/dsh-official-bundles/README.zh.md +1 -1
  576. package/node_modules/@deepseek-ai/dsh-official-bundles/lib/index.js +57 -95
  577. package/node_modules/@deepseek-ai/dsh-official-bundles/package.json +4 -4
  578. package/node_modules/@deepseek-ai/dsh-otel/package.json +5 -5
  579. package/node_modules/@deepseek-ai/dsh-output-retention/package.json +3 -3
  580. package/node_modules/@deepseek-ai/dsh-package-manifest/package.json +3 -3
  581. package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +15 -3
  582. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +23 -23
  583. package/node_modules/@deepseek-ai/dsh-persona/README.i18n.yaml +2 -2
  584. package/node_modules/@deepseek-ai/dsh-persona/README.md +1 -1
  585. package/node_modules/@deepseek-ai/dsh-persona/README.zh.md +1 -1
  586. package/node_modules/@deepseek-ai/dsh-persona/package.json +7 -7
  587. package/node_modules/@deepseek-ai/dsh-personalized-recommendations/package.json +23 -23
  588. package/node_modules/@deepseek-ai/dsh-plan-mode/README.i18n.yaml +2 -2
  589. package/node_modules/@deepseek-ai/dsh-plan-mode/README.md +1 -1
  590. package/node_modules/@deepseek-ai/dsh-plan-mode/README.zh.md +1 -1
  591. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +24 -24
  592. package/node_modules/@deepseek-ai/dsh-plugin-detail/package.json +3 -3
  593. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/index.js +0 -1
  594. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.host.js +12 -12
  595. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.remote-client.js +12 -12
  596. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/index.js +0 -1
  597. package/node_modules/@deepseek-ai/dsh-plugin-manager/package.json +38 -38
  598. package/node_modules/@deepseek-ai/dsh-plugin-market/README.i18n.yaml +2 -2
  599. package/node_modules/@deepseek-ai/dsh-plugin-market/README.md +1 -1
  600. package/node_modules/@deepseek-ai/dsh-plugin-market/README.zh.md +1 -1
  601. package/node_modules/@deepseek-ai/dsh-plugin-market/lib/index.js +37 -7
  602. package/node_modules/@deepseek-ai/dsh-plugin-market/lib/types/index.js +1 -1
  603. package/node_modules/@deepseek-ai/dsh-plugin-market/lib/types/repository-cache.js +40 -7
  604. package/node_modules/@deepseek-ai/dsh-plugin-market/package.json +31 -31
  605. package/node_modules/@deepseek-ai/dsh-plugin-market-index/package.json +4 -4
  606. package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/package.json +19 -19
  607. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/README.i18n.yaml +2 -2
  608. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/README.md +1 -1
  609. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/README.zh.md +1 -1
  610. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/lib/index.js +2 -2
  611. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/lib/typert.host.js +15 -3
  612. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/lib/types/index.js +2 -2
  613. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/package.json +17 -17
  614. package/node_modules/@deepseek-ai/dsh-ptc-runtime/package.json +5 -5
  615. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.i18n.yaml +11 -8
  616. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.md +21 -1
  617. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.zh.md +22 -2
  618. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/index.js +2 -3
  619. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/persistent-process.js +428 -31
  620. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/process.js +423 -28
  621. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/package.json +23 -23
  622. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +11 -11
  623. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +14 -14
  624. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/lib/index.js +39 -16
  625. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +12 -12
  626. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +8 -8
  627. package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/package.json +26 -26
  628. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +12 -12
  629. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +14 -14
  630. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +14 -14
  631. package/node_modules/@deepseek-ai/dsh-schedule/package.json +40 -40
  632. package/node_modules/@deepseek-ai/dsh-scope/package.json +3 -3
  633. package/node_modules/@deepseek-ai/dsh-sdk-app/package.json +19 -19
  634. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.i18n.yaml +4 -4
  635. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.md +3 -3
  636. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.zh.md +3 -3
  637. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/lib/index.js +21 -18
  638. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/package.json +48 -48
  639. package/node_modules/@deepseek-ai/dsh-sdk-minimal/package.json +39 -39
  640. package/node_modules/@deepseek-ai/dsh-sdk-protocol/package.json +13 -13
  641. package/node_modules/@deepseek-ai/dsh-session/lib/index.js +1 -0
  642. package/node_modules/@deepseek-ai/dsh-session/lib/types/known-event-types.js +1 -0
  643. package/node_modules/@deepseek-ai/dsh-session/package.json +10 -10
  644. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +19 -19
  645. package/node_modules/@deepseek-ai/dsh-session-format/package.json +4 -4
  646. package/node_modules/@deepseek-ai/dsh-session-format-catalog/package.json +11 -11
  647. package/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/lib/index.js +36 -13
  648. package/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/package.json +7 -7
  649. package/node_modules/@deepseek-ai/dsh-session-format-v1-to-v2/package.json +8 -8
  650. package/node_modules/@deepseek-ai/dsh-session-format-v2-to-v3/package.json +6 -6
  651. package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/package.json +5 -5
  652. package/node_modules/@deepseek-ai/dsh-session-log-deepseek/package.json +18 -18
  653. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +24 -24
  654. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +11 -11
  655. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +76 -29
  656. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +13 -13
  657. package/node_modules/@deepseek-ai/dsh-session-projection/README.i18n.yaml +12 -12
  658. package/node_modules/@deepseek-ai/dsh-session-projection/README.md +10 -6
  659. package/node_modules/@deepseek-ai/dsh-session-projection/README.zh.md +10 -6
  660. package/node_modules/@deepseek-ai/dsh-session-projection/lib/index.js +107 -42
  661. package/node_modules/@deepseek-ai/dsh-session-projection/lib/types/index.js +128 -47
  662. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +6 -6
  663. package/node_modules/@deepseek-ai/dsh-session-projection-cache/README.i18n.yaml +2 -2
  664. package/node_modules/@deepseek-ai/dsh-session-projection-cache/README.md +1 -1
  665. package/node_modules/@deepseek-ai/dsh-session-projection-cache/README.zh.md +1 -1
  666. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +13 -13
  667. package/node_modules/@deepseek-ai/dsh-session-query/package.json +20 -20
  668. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +13 -13
  669. package/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +15 -3
  670. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +41 -41
  671. package/node_modules/@deepseek-ai/dsh-session-stats/package.json +11 -11
  672. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +7 -7
  673. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +25 -25
  674. package/node_modules/@deepseek-ai/dsh-session-title/package.json +17 -17
  675. package/node_modules/@deepseek-ai/dsh-session-title-all-prompts-llm/package.json +15 -15
  676. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +20 -20
  677. package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +13 -13
  678. package/node_modules/@deepseek-ai/dsh-session-turn-outline/package.json +11 -11
  679. package/node_modules/@deepseek-ai/dsh-settings/package.json +17 -17
  680. package/node_modules/@deepseek-ai/dsh-shell/package.json +7 -7
  681. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +14 -14
  682. package/node_modules/@deepseek-ai/dsh-skill/package.json +9 -9
  683. package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +5 -5
  684. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +10 -10
  685. package/node_modules/@deepseek-ai/dsh-skill-office/package.json +10 -10
  686. package/node_modules/@deepseek-ai/dsh-spill/package.json +9 -9
  687. package/node_modules/@deepseek-ai/dsh-spill-local/package.json +11 -11
  688. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +35 -35
  689. package/node_modules/@deepseek-ai/dsh-storage/package.json +3 -3
  690. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +6 -6
  691. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +6 -6
  692. package/node_modules/@deepseek-ai/dsh-subagent/README.i18n.yaml +39 -24
  693. package/node_modules/@deepseek-ai/dsh-subagent/README.md +41 -20
  694. package/node_modules/@deepseek-ai/dsh-subagent/README.zh.md +41 -20
  695. package/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +574 -873
  696. package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +64 -120
  697. package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.remote-client.js +17 -63
  698. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/activation.js +1 -1
  699. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/archive-admission.js +39 -115
  700. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/child-agent.js +6 -4
  701. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/continuation-messages.js +12 -14
  702. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/control.js +1 -5
  703. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/descriptor.js +1 -1
  704. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/index.js +83 -146
  705. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/lifecycle.js +5 -31
  706. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/manager.js +396 -570
  707. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/structured.js +2 -2
  708. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/types.js +2 -4
  709. package/node_modules/@deepseek-ai/dsh-subagent/package.json +51 -55
  710. package/node_modules/@deepseek-ai/dsh-subagent-acp/package.json +24 -24
  711. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +15 -15
  712. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/README.i18n.yaml +2 -2
  713. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/README.md +1 -1
  714. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/README.zh.md +1 -1
  715. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +19 -19
  716. package/node_modules/@deepseek-ai/dsh-subprocess/package.json +6 -6
  717. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +9 -9
  718. package/node_modules/@deepseek-ai/dsh-system-prompt/lib/index.js +0 -1
  719. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +8 -8
  720. package/node_modules/@deepseek-ai/dsh-terminal/package.json +8 -8
  721. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +22 -22
  722. package/node_modules/@deepseek-ai/dsh-time-context/package.json +23 -23
  723. package/node_modules/@deepseek-ai/dsh-timeout/package.json +3 -3
  724. package/node_modules/@deepseek-ai/dsh-tmux-context/lib/index.js +38 -15
  725. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +14 -14
  726. package/node_modules/@deepseek-ai/dsh-token-meter/lib/index.js +4 -2
  727. package/node_modules/@deepseek-ai/dsh-token-meter/lib/types/breakdown-projection.js +1 -0
  728. package/node_modules/@deepseek-ai/dsh-token-meter/lib/types/usage-projection.js +1 -0
  729. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +17 -17
  730. package/node_modules/@deepseek-ai/dsh-tool-agent-team/README.i18n.yaml +85 -0
  731. package/node_modules/@deepseek-ai/dsh-tool-agent-team/README.md +178 -0
  732. package/node_modules/@deepseek-ai/dsh-tool-agent-team/README.zh.md +178 -0
  733. package/node_modules/@deepseek-ai/dsh-tool-agent-team/lib/index.js +308 -0
  734. package/node_modules/@deepseek-ai/dsh-tool-agent-team/locale/en.json +6 -0
  735. package/node_modules/@deepseek-ai/dsh-tool-agent-team/locale/ja.json +6 -0
  736. package/node_modules/@deepseek-ai/dsh-tool-agent-team/locale/zh.json +6 -0
  737. package/node_modules/@deepseek-ai/dsh-tool-agent-team/package.json +63 -0
  738. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +13 -13
  739. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +37 -37
  740. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +27 -27
  741. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +10 -10
  742. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +230 -184
  743. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +17 -17
  744. package/node_modules/@deepseek-ai/dsh-tool-executor-native/package.json +5 -5
  745. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/package.json +28 -28
  746. package/node_modules/@deepseek-ai/dsh-tool-fs/README.i18n.yaml +4 -4
  747. package/node_modules/@deepseek-ai/dsh-tool-fs/README.md +7 -7
  748. package/node_modules/@deepseek-ai/dsh-tool-fs/README.zh.md +7 -7
  749. package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +5 -5
  750. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +39 -39
  751. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +31 -31
  752. package/node_modules/@deepseek-ai/dsh-tool-goal/README.i18n.yaml +2 -2
  753. package/node_modules/@deepseek-ai/dsh-tool-goal/README.md +1 -1
  754. package/node_modules/@deepseek-ai/dsh-tool-goal/README.zh.md +1 -1
  755. package/node_modules/@deepseek-ai/dsh-tool-goal/lib/index.js +1 -1
  756. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +20 -20
  757. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +19 -19
  758. package/node_modules/@deepseek-ai/dsh-tool-present/package.json +21 -21
  759. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +35 -35
  760. package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/package.json +28 -28
  761. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +24 -24
  762. package/node_modules/@deepseek-ai/dsh-tool-schedule/package.json +19 -19
  763. package/node_modules/@deepseek-ai/dsh-tool-session-query/package.json +27 -27
  764. package/node_modules/@deepseek-ai/dsh-tool-skill/lib/index.js +1 -0
  765. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +18 -18
  766. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +23 -23
  767. package/node_modules/@deepseek-ai/dsh-tool-subagent/README.i18n.yaml +19 -19
  768. package/node_modules/@deepseek-ai/dsh-tool-subagent/README.md +15 -13
  769. package/node_modules/@deepseek-ai/dsh-tool-subagent/README.zh.md +14 -12
  770. package/node_modules/@deepseek-ai/dsh-tool-subagent/lib/index.js +40 -43
  771. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +25 -25
  772. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.i18n.yaml +53 -38
  773. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.md +41 -21
  774. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.zh.md +41 -21
  775. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/lib/index.js +235 -98
  776. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +25 -22
  777. package/node_modules/@deepseek-ai/dsh-tool-terminal/package.json +32 -32
  778. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +19 -19
  779. package/node_modules/@deepseek-ai/dsh-tool-web/README.i18n.yaml +6 -6
  780. package/node_modules/@deepseek-ai/dsh-tool-web/README.md +5 -4
  781. package/node_modules/@deepseek-ai/dsh-tool-web/README.zh.md +5 -4
  782. package/node_modules/@deepseek-ai/dsh-tool-web/lib/index.js +4 -4
  783. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +25 -24
  784. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +24 -24
  785. package/node_modules/@deepseek-ai/dsh-tool-working-directory/package.json +13 -13
  786. package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/package.json +12 -12
  787. package/node_modules/@deepseek-ai/dsh-tools/package.json +20 -20
  788. package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +6 -6
  789. package/node_modules/@deepseek-ai/dsh-tui-app/README.md +10 -8
  790. package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +10 -8
  791. package/node_modules/@deepseek-ai/dsh-tui-app/cordis.patch.yml +17 -0
  792. package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +113 -99
  793. package/node_modules/@deepseek-ai/dsh-tui-app/package.json +87 -87
  794. package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +10 -10
  795. package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +4 -4
  796. package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +4 -4
  797. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +18 -18
  798. package/node_modules/@deepseek-ai/dsh-user-questions/README.i18n.yaml +2 -2
  799. package/node_modules/@deepseek-ai/dsh-user-questions/README.md +1 -1
  800. package/node_modules/@deepseek-ai/dsh-user-questions/README.zh.md +1 -1
  801. package/node_modules/@deepseek-ai/dsh-user-questions/lib/index.js +5 -6
  802. package/node_modules/@deepseek-ai/dsh-user-questions/lib/typert.host.js +16 -4
  803. package/node_modules/@deepseek-ai/dsh-user-questions/lib/types/index.js +5 -6
  804. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +18 -18
  805. package/node_modules/@deepseek-ai/dsh-util-code-language/package.json +3 -3
  806. package/node_modules/@deepseek-ai/dsh-util-crypto/package.json +3 -3
  807. package/node_modules/@deepseek-ai/dsh-util-time/package.json +3 -3
  808. package/node_modules/@deepseek-ai/dsh-util-values/package.json +3 -3
  809. package/node_modules/@deepseek-ai/dsh-util-workspace-path/package.json +3 -3
  810. package/node_modules/@deepseek-ai/dsh-web/README.i18n.yaml +18 -12
  811. package/node_modules/@deepseek-ai/dsh-web/README.md +38 -7
  812. package/node_modules/@deepseek-ai/dsh-web/README.zh.md +38 -7
  813. package/node_modules/@deepseek-ai/dsh-web/lib/index.js +220 -112
  814. package/node_modules/@deepseek-ai/dsh-web/lib/typert.host.js +178 -0
  815. package/node_modules/@deepseek-ai/dsh-web/lib/typert.remote-client.js +45 -0
  816. package/node_modules/@deepseek-ai/dsh-web/lib/types/index.js +277 -0
  817. package/node_modules/@deepseek-ai/dsh-web/lib/types/types.js +18 -0
  818. package/node_modules/@deepseek-ai/dsh-web/package.json +26 -7
  819. package/node_modules/@deepseek-ai/dsh-web-app/README.i18n.yaml +2 -2
  820. package/node_modules/@deepseek-ai/dsh-web-app/README.md +2 -0
  821. package/node_modules/@deepseek-ai/dsh-web-app/README.zh.md +2 -0
  822. package/node_modules/@deepseek-ai/dsh-web-app/cordis.patch.yml +14 -6
  823. package/node_modules/@deepseek-ai/dsh-web-app/package.json +157 -154
  824. package/node_modules/@deepseek-ai/dsh-web-app/presets/standard.patch.yml +1 -1
  825. package/node_modules/@deepseek-ai/dsh-web-deepseek-api/README.i18n.yaml +12 -12
  826. package/node_modules/@deepseek-ai/dsh-web-deepseek-api/README.md +22 -12
  827. package/node_modules/@deepseek-ai/dsh-web-deepseek-api/README.zh.md +22 -12
  828. package/node_modules/@deepseek-ai/dsh-web-deepseek-api/lib/index.js +394 -163
  829. package/node_modules/@deepseek-ai/dsh-web-deepseek-api/package.json +30 -19
  830. package/node_modules/@deepseek-ai/dsh-web-fetch-http/lib/index.js +11 -0
  831. package/node_modules/@deepseek-ai/dsh-web-fetch-http/package.json +9 -9
  832. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-B2q7cWGa.js +199 -0
  833. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-uWlUD22X.css +1 -0
  834. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{graphql-C-Uijqkk.js → graphql-DFkUqiqq.js} +2 -2
  835. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{http-CLu1VCSi.js → http-BbPA7N5Y.js} +2 -2
  836. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/php-BcJWnZHR.js +2 -0
  837. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{rst-BuDKiyD7.js → rst-CtdShwKQ.js} +2 -2
  838. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{ruby-ZtjE4NPI.js → ruby-DllPV2XI.js} +2 -2
  839. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{svelte-Tt81icjn.js → svelte-ZPgsG5h9.js} +2 -2
  840. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{vue-B5SDFeDA.js → vue-CnLRC5W9.js} +2 -2
  841. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{vendor-7utBqO4o.js → vendor-BUMdD3V7.js} +3 -3
  842. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +3 -3
  843. package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +21 -21
  844. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.i18n.yaml +8 -8
  845. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.md +6 -4
  846. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.zh.md +6 -4
  847. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/index.js +30 -18
  848. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +20 -18
  849. package/node_modules/@deepseek-ai/dsh-win32-process/package.json +4 -4
  850. package/node_modules/@deepseek-ai/dsh-workflow/package.json +11 -11
  851. package/node_modules/@deepseek-ai/dsh-workflow-ptc/lib/index.js +11 -13
  852. package/node_modules/@deepseek-ai/dsh-workflow-ptc/package.json +39 -39
  853. package/node_modules/@deepseek-ai/dsh-working-directory/package.json +21 -21
  854. package/node_modules/@deepseek-ai/dsh-workspace/package.json +14 -14
  855. package/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +26 -26
  856. package/node_modules/@deepseek-ai/schemastery/package.json +2 -2
  857. package/package.json +346 -343
  858. package/node_modules/@deepseek-ai/dsh/lib/dump-config-DuXZcU0e.js +0 -2
  859. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.i18n.yaml +0 -100
  860. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.md +0 -227
  861. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.zh.md +0 -227
  862. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/index.js +0 -1650
  863. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/activity.js +0 -85
  864. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/client.js +0 -3
  865. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/error.js +0 -23
  866. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/index.js +0 -232
  867. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/lifecycle.js +0 -103
  868. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/persisted.js +0 -20
  869. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/projection.js +0 -327
  870. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/roster.js +0 -452
  871. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/session-message.js +0 -23
  872. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/locale/en.json +0 -6
  873. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/locale/ja.json +0 -6
  874. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/locale/zh.json +0 -6
  875. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/package.json +0 -68
  876. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.i18n.yaml +0 -52
  877. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.md +0 -118
  878. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.zh.md +0 -118
  879. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/cordis.patch.yml +0 -29
  880. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/docs/DETAIL.md +0 -1
  881. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/docs/DETAIL.zh.md +0 -1
  882. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/docs/preview.svg +0 -1
  883. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/docs/preview.zh.svg +0 -1
  884. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/icon.svg +0 -12
  885. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/de.json +0 -7
  886. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/en.json +0 -7
  887. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/es.json +0 -7
  888. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/fr.json +0 -7
  889. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/ja.json +0 -7
  890. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/pt.json +0 -7
  891. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/ru.json +0 -7
  892. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/zh.json +0 -7
  893. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/README.i18n.yaml +0 -43
  894. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/README.md +0 -102
  895. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/README.zh.md +0 -102
  896. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/lib/client.js +0 -690
  897. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/locale/en.json +0 -6
  898. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/locale/ja.json +0 -6
  899. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/locale/zh.json +0 -6
  900. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/package.json +0 -66
  901. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/viewer-declarations-krUNq6VU.js +0 -287
  902. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/viewer-declarations.js +0 -26
  903. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.i18n.yaml +0 -70
  904. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.md +0 -155
  905. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.zh.md +0 -155
  906. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/lib/index.js +0 -626
  907. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/locale/en.json +0 -6
  908. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/locale/ja.json +0 -6
  909. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/locale/zh.json +0 -6
  910. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/package.json +0 -62
  911. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-BCbHmUSs.js +0 -197
  912. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-BUDGJY4R.css +0 -1
  913. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/php-CjQPq1Mz.js +0 -2
  914. package/node_modules/@deepseek-ai/dsh-web-search-exa/README.i18n.yaml +0 -61
  915. package/node_modules/@deepseek-ai/dsh-web-search-exa/README.md +0 -142
  916. package/node_modules/@deepseek-ai/dsh-web-search-exa/README.zh.md +0 -142
  917. package/node_modules/@deepseek-ai/dsh-web-search-exa/lib/index.js +0 -154
  918. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/de.json +0 -6
  919. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/en.json +0 -6
  920. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/es.json +0 -6
  921. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/fr.json +0 -6
  922. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/ja.json +0 -6
  923. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/pt.json +0 -6
  924. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/ru.json +0 -6
  925. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/zh.json +0 -6
  926. package/node_modules/@deepseek-ai/dsh-web-search-exa/package.json +0 -45
  927. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/README.i18n.yaml +0 -82
  928. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/README.md +0 -165
  929. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/README.zh.md +0 -165
  930. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/lib/index.js +0 -152
  931. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/de.json +0 -6
  932. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/en.json +0 -6
  933. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/es.json +0 -6
  934. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/fr.json +0 -6
  935. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/ja.json +0 -6
  936. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/pt.json +0 -6
  937. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/ru.json +0 -6
  938. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/zh.json +0 -6
  939. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/package.json +0 -45
  940. package/node_modules/@deepseek-ai/dsh/lib/{profile-boot-e2mS45fC.js → profile-boot-xiaehH2x.js} +3 -3
  941. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/task-graph.js +0 -0
  942. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/types.js +0 -0
  943. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/validation.js +0 -0
  944. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/locale/de.json +0 -0
  945. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/locale/es.json +0 -0
  946. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/locale/fr.json +0 -0
  947. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/locale/pt.json +0 -0
  948. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/locale/ru.json +0 -0
  949. /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/lib/index.js +0 -0
  950. /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/locale/de.json +0 -0
  951. /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/locale/es.json +0 -0
  952. /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/locale/fr.json +0 -0
  953. /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/locale/pt.json +0 -0
  954. /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/locale/ru.json +0 -0
  955. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team-profile → dsh-cua-bundle}/lib/index.js +0 -0
  956. /package/node_modules/@deepseek-ai/{dsh-experimental-tool-agent-team → dsh-tool-agent-team}/locale/de.json +0 -0
  957. /package/node_modules/@deepseek-ai/{dsh-experimental-tool-agent-team → dsh-tool-agent-team}/locale/es.json +0 -0
  958. /package/node_modules/@deepseek-ai/{dsh-experimental-tool-agent-team → dsh-tool-agent-team}/locale/fr.json +0 -0
  959. /package/node_modules/@deepseek-ai/{dsh-experimental-tool-agent-team → dsh-tool-agent-team}/locale/pt.json +0 -0
  960. /package/node_modules/@deepseek-ai/{dsh-experimental-tool-agent-team → dsh-tool-agent-team}/locale/ru.json +0 -0
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Owns subagent startup, message admission, cold resume, and execution lifetimes.
3
3
  * One child lock orders input acceptance and closure; one activation map owns
4
- * capacity, parent relationships, and resource release across all providers.
4
+ * capacity, runtime ownership, and resource release across all providers.
5
5
  *
6
6
  * @module @deepseek-ai/dsh-subagent/manager
7
7
  */
@@ -63,12 +63,12 @@ import { brandString } from '@deepseek-ai/dsh-brand';
63
63
  import { ReasoningEffortId, contentHasImage, createUserMessage, errorChain } from '@deepseek-ai/dsh-llm';
64
64
  import { SessionLogOffset } from '@deepseek-ai/dsh-session';
65
65
  import { appendDelegatedPolicyOverrides, applyChildComposition, captureDelegatedPolicyOverrides, childSessionMeta, resolveChildAgentOptions, resolveChildDepth, } from "./child-agent.js";
66
- import { createAgentMessage, withContinuableReturnGuidance, createSettlementMessage } from "./continuation-messages.js";
67
- import { assertSubagentMaxDepth } from "./depth.js";
66
+ import { createAgentMessage, createSettlementMessage, withResultDeliveryGuidance, } from "./continuation-messages.js";
67
+ import { installSubagentArchiveAdmission } from "./archive-admission.js";
68
68
  import { foldSubagentDescriptor, snapshotSubagentDescriptor } from "./descriptor.js";
69
69
  import { establishCatalogChild, establishExternalCatalogChild } from "./catalog.js";
70
70
  import { SubagentError } from "./error.js";
71
- import { isAdjacentAgentSendMessageTool } from "./internal.js";
71
+ import { SubagentRunId } from "./types.js";
72
72
  import { attachStructuredRuntime } from "./structured.js";
73
73
  import { ActivationPool, ChildLock, activationAgent, captureLocalResult, observeLocalFailure, requireLocalActivation } from "./activation.js";
74
74
  /** Render only the safe outer message from execution or teardown failures. */
@@ -90,34 +90,28 @@ export class SubagentManager {
90
90
  locks = new ChildLock();
91
91
  /** Structural Cordis owner of every Activation handle. */
92
92
  ownerCtx;
93
- /**
94
- * Exact roots whose host teardown has begun, with the live lineage members
95
- * observed under each root. Entries remain until that exact root leaves the
96
- * Agent registry, closing admission throughout its host's teardown without
97
- * poisoning a later same-id replacement.
98
- */
99
- closingScopes = new Map();
93
+ /** Exact subagent tree roots whose host teardown has closed admission. */
94
+ closingRoots = new Set();
100
95
  draining = false;
101
96
  /**
102
97
  * Build one manager inside the service's Agent-injected context.
103
98
  * @param ctx - context providing Agents, Sessions, and teardown ownership.
104
- * @param host - provider dispatch and lifecycle observation owned by the service.
99
+ * @param host - descriptor reads and lifecycle publication owned by the service.
105
100
  * @param maxActiveSubagents - the current configured child capacity.
106
101
  */
107
102
  constructor(ctx, host, maxActiveSubagents) {
108
103
  this.ctx = ctx;
109
104
  this.host = host;
110
105
  this.maxActiveSubagents = maxActiveSubagents;
111
- // Ordinary Cordis owner effects unwind in reverse registration order, which
112
- // cannot express the dynamic child graph. Register the private scope's
113
- // structural disposer FIRST and the drain SECOND, so reverse unwind invokes
114
- // the drain before releasing the scope; a cleanup effect on the same scope
115
- // as the Agent handles would let structural handle disposal bypass
116
- // child-first ordering.
106
+ // Drain managed instances before Cordis releases their owning scope.
117
107
  const scope = ctx.plugin(function activationOwner() { });
118
108
  this.ownerCtx = scope.ctx;
109
+ installSubagentArchiveAdmission(ctx, (agent) => {
110
+ const activation = this.resident.get(agent.id);
111
+ return activation !== undefined && activationAgent(activation) === agent ? activation.ancestors : undefined;
112
+ }, session => host.identityOf(session));
119
113
  ctx.on('agent/disposed', ({ agent }) => {
120
- this.closingScopes.delete(agent);
114
+ this.closingRoots.delete(agent);
121
115
  });
122
116
  ctx.effect(function* () {
123
117
  yield scope.dispose;
@@ -127,7 +121,7 @@ export class SubagentManager {
127
121
  /**
128
122
  * Interrupt one live continuable child's current turn under the supplied authority.
129
123
  * @param targetSessionId - the durable child session id to interrupt.
130
- * @param authority - the human parent address or exact live ancestor Agent.
124
+ * @param authority - a trusted user operation or exact live ancestor Agent.
131
125
  */
132
126
  interrupt(targetSessionId, authority) {
133
127
  if (authority.kind === 'ancestor') {
@@ -142,12 +136,8 @@ export class SubagentManager {
142
136
  const activation = this.resident.get(targetSessionId);
143
137
  if (activation === undefined)
144
138
  return;
145
- if (authority.kind === 'user') {
146
- if (activation.parent.id !== authority.parentSessionId) {
147
- throw new SubagentError(`subagent "${targetSessionId}" belongs to another parent session`, 'UNAUTHORIZED');
148
- }
149
- }
150
- else if (!activation.ancestry.has(authority.agent)) {
139
+ if (authority.kind === 'ancestor'
140
+ && (this.rootOf(authority.agent) !== activation.root || !activation.ancestors.includes(authority.agent.id))) {
151
141
  throw new SubagentError(`subagent "${targetSessionId}" is not a live descendant of agent "${authority.agent.id}"`, 'UNAUTHORIZED');
152
142
  }
153
143
  // Disposal already stopped the target with a whole-Activation teardown;
@@ -166,32 +156,27 @@ export class SubagentManager {
166
156
  }
167
157
  /**
168
158
  * Close admission, await every already-admitted materialization through
169
- * publication or rollback, then dispose the stable live Activation graph
170
- * child-first.
159
+ * publication or rollback, then dispose every agent in the subagent tree.
171
160
  */
172
161
  async drain() {
173
162
  this.draining = true;
174
163
  for (const pending of this.materializations)
175
164
  pending.controller.abort();
176
165
  await Promise.all([...this.materializations].map(materialization => materialization.settled));
177
- const owned = new Set();
178
- for (const activation of this.resident.values()) {
179
- for (const child of activation.ownedChildren)
180
- owned.add(child);
181
- }
182
- const roots = [...this.resident.values()].filter(activation => !owned.has(activation.childId));
183
- await this.disposeRoots(roots, 'activation(s)');
166
+ await this.disposeRoots([...this.resident.values()], 'activation(s)');
184
167
  }
185
168
  /**
186
- * Join progressing child work, leaving idle parked inboxes resident.
187
- * @param parent - exact live parent whose descendants are observed.
188
- * @returns whether work was joined and the host must recheck parent completion.
169
+ * Join progressing subagent tree work for its root, leaving idle parked inboxes resident.
170
+ * @param root - exact live subagent tree root; ordinary members return false.
171
+ * @returns whether work was joined and the host must recheck root completion.
189
172
  */
190
- async waitForChildren(parent) {
173
+ async waitForTreeWork(root) {
174
+ if (this.rootOf(root) !== root)
175
+ return false;
191
176
  let observed = false;
192
177
  while (true) {
193
- const pending = [...this.materializations].filter(item => item.lineage.includes(parent));
194
- const children = [...this.resident.values()].filter(item => activationAgent(item) !== parent && item.ancestry.has(parent));
178
+ const pending = [...this.materializations].filter(item => item.root === root);
179
+ const children = [...this.resident.values()].filter(item => item.root === root);
195
180
  observed ||= children.some(item => item.kind === 'local' && item.handle.agent.status !== 'idle');
196
181
  await Promise.all(children.flatMap(item => item.kind === 'local' ? [item.handle.agent.whenIdle()] : []));
197
182
  const waits = pending.map(item => item.settled);
@@ -204,13 +189,6 @@ export class SubagentManager {
204
189
  waits.push(item.handle.agent.whenIdle());
205
190
  continue;
206
191
  }
207
- if (item.ownedChildren.size > 0) {
208
- // Published descendants are observed separately; preparation holds
209
- // keep the owner pending until publication or rollback wakes it.
210
- if ([...item.ownedChildren].some(id => !this.resident.has(id)))
211
- waits.push(item.poke.promise);
212
- continue;
213
- }
214
192
  const inbox = item.handle.agent.inbox;
215
193
  if (item.failureAt === undefined && (inbox.nextTurn.length > 0 || inbox.nextStep.length > 0))
216
194
  continue;
@@ -222,147 +200,82 @@ export class SubagentManager {
222
200
  continue;
223
201
  }
224
202
  // A descendant can be published while whenIdle follows another child.
225
- if ([...this.materializations].some(item => item.lineage.includes(parent) && !pending.includes(item))
226
- || [...this.resident.values()].some(item => activationAgent(item) !== parent
227
- && item.ancestry.has(parent) && !children.includes(item)))
203
+ if ([...this.materializations].some(item => item.root === root && !pending.includes(item))
204
+ || [...this.resident.values()].some(item => item.root === root && !children.includes(item)))
228
205
  continue;
229
206
  return observed;
230
207
  }
231
208
  }
232
209
  /**
233
- * Stop the managed descendants of exact live host-owned parents.
234
- * @param parents - exact live roots whose managed descendants must stop.
210
+ * Stop every member of the selected subagent trees; ordinary members do not close a subagent tree.
211
+ * @param parents - exact live subagent tree roots whose instances must stop.
235
212
  */
236
213
  async drainDescendants(parents) {
237
- const roots = new Set(parents.filter(parent => this.ctx.agents.get(parent.id) === parent));
238
- if (roots.size === 0)
239
- return;
240
- for (const root of roots) {
241
- this.closingMembers(root).add(root);
242
- }
243
- const targets = [];
244
- for (const activation of this.resident.values()) {
245
- const child = activationAgent(activation);
246
- const lineage = this.liveLineage(child ?? activation.parent);
247
- const owners = [...roots].filter(root => child !== root
248
- && activation.ancestry.has(root));
249
- if (owners.length === 0)
250
- continue;
251
- targets.push(activation);
252
- for (const owner of owners) {
253
- const members = this.closingMembers(owner);
254
- if (child !== undefined)
255
- members.add(child);
256
- for (const agent of lineage)
257
- members.add(agent);
258
- }
259
- }
260
- const materializations = [...this.materializations].filter((materialization) => {
261
- const owners = [...roots].filter(root => materialization.lineage.includes(root));
262
- for (const owner of owners) {
263
- const members = this.closingMembers(owner);
264
- for (const agent of materialization.lineage)
265
- members.add(agent);
266
- }
267
- if (owners.length > 0)
268
- materialization.controller.abort();
269
- return owners.length > 0;
270
- });
271
- const ownedTargets = new Set();
272
- for (const activation of targets) {
273
- for (const child of activation.ownedChildren)
274
- ownedTargets.add(child);
275
- }
276
- const targetRoots = targets.filter(activation => !ownedTargets.has(activation.childId));
277
- for (const activation of targets) {
278
- const disposal = this.dispose(activation);
279
- void disposal.catch(() => undefined);
280
- }
281
- await Promise.all(materializations.map(materialization => materialization.settled));
282
- await this.disposeRoots(targetRoots, 'scoped activation(s)');
283
- }
284
- /**
285
- * Release selected resident direct children of one exact live parent.
286
- * @param parent - exact live direct parent authorizing the selected release.
287
- * @param childIds - durable direct-child ids to release when resident.
288
- */
289
- async drainChildren(parent, childIds) {
290
- if (this.ctx.agents.get(parent.id) !== parent) {
291
- throw new SubagentError('selected child teardown requires the exact live parent agent', 'UNAUTHORIZED');
292
- }
293
- const targets = [];
294
- for (const childId of new Set(childIds)) {
295
- const activation = this.resident.get(childId);
296
- if (activation === undefined)
297
- continue;
298
- if (activation.parent.id !== parent.id || !activation.ancestry.has(parent)) {
299
- throw new SubagentError(`subagent "${childId}" is not a direct child of agent "${parent.id}"`, 'UNAUTHORIZED');
300
- }
301
- targets.push(activation);
302
- }
303
- for (const activation of targets) {
304
- const disposal = this.dispose(activation);
305
- void disposal.catch(() => undefined);
306
- }
307
- await this.disposeRoots(targets, 'selected activation(s)');
214
+ const roots = new Set(parents.filter(root => this.ctx.agents.get(root.id) === root && this.rootOf(root) === root));
215
+ for (const root of roots)
216
+ this.closingRoots.add(root);
217
+ const pending = [...this.materializations].filter(item => roots.has(item.root));
218
+ for (const item of pending)
219
+ item.controller.abort();
220
+ const targets = [...this.resident.values()].filter(item => roots.has(item.root));
221
+ const disposal = this.disposeRoots(targets, 'scoped activation(s)');
222
+ const [disposed] = await Promise.allSettled([disposal, ...pending.map(item => item.settled)]);
223
+ if (disposed.status === 'rejected')
224
+ throw disposed.reason;
308
225
  }
309
226
  /**
310
227
  * Start one continuable background child and resolve at initial inbox acceptance.
311
228
  * Every earlier failure disposes any created handle and rolls back Activation
312
- * and parent ownership without returning either id.
229
+ * and its capacity slot without returning either id.
313
230
  * @param spec - provider, delegation request, and caller cancellation.
231
+ * @param prepare - creation contribution bound to the checked provider.
314
232
  * @returns the durable child id and accepted initial prompt message id.
315
233
  */
316
- async startLocal(spec) {
317
- const request = spec.request;
318
- const parent = request.parent;
234
+ async startLocal(spec, prepare) {
235
+ const parent = spec.parent;
319
236
  this.assertAdmitting(parent);
320
- const persistence = spec.delivery === 'caller' ? this.ctx.get('sessionPersistence') : this.requirePersistence();
321
- assertSubagentMaxDepth(request.maxDepth);
322
- const childId = spec.childId ?? brandString(randomUUID());
323
- this.assertChildIdAvailable(childId);
324
- const childDepth = resolveChildDepth(parent, request.maxDepth);
325
- // Snapshot before any await: invalid descriptor JSON rejects the call
326
- // before a child exists, and the detached value is what reaches the log.
327
- const agentOptions = resolveChildAgentOptions(parent, request.agentOptions, childDepth);
328
- const agentProvider = agentOptions.provider;
329
- const agentModel = agentOptions.model;
330
- const agentReasoningEffort = agentOptions.reasoningEffort;
331
- const descriptor = snapshotSubagentDescriptor({
332
- mode: 'continuable',
333
- provider: spec.provider,
334
- label: spec.label,
335
- ...agentProvider !== undefined ? { agentProvider } : {},
336
- ...agentModel !== undefined ? { agentModel } : {},
337
- ...agentReasoningEffort !== undefined ? { agentReasoningEffort } : {},
338
- });
339
- // Capture before the first await: a later parent switch belongs to the
340
- // parent's future, not to this child.
341
- const delegatedPolicies = captureDelegatedPolicyOverrides(parent);
342
- // An idle continuation-managed parent must not settle while a caller is
343
- // still creating its child. A turn-scoped delegation does not need this,
344
- // but the service is also callable outside a turn.
345
- const releaseHold = this.holdOwnership(parent, childId);
346
- try {
347
- const cwd = await this.resolveDirectory(request, spec.signal);
348
- const prepared = await this.host.prepareContinuable(spec.provider, {
237
+ const ancestry = this.ancestryForChild(parent);
238
+ return this.trackStartup(ancestry.root, spec.signal, async (signal) => {
239
+ const persistence = spec.delivery === 'caller' ? this.ctx.get('sessionPersistence') : this.requirePersistence();
240
+ const childId = spec.childId ?? brandString(randomUUID());
241
+ this.assertChildIdAvailable(childId);
242
+ const childDepth = resolveChildDepth(parent, spec.maxDepth);
243
+ // Snapshot before any await: invalid descriptor JSON rejects the call
244
+ // before a child exists, and the detached value is what reaches the log.
245
+ const agentOptions = resolveChildAgentOptions(parent, spec.agentOptions, childDepth);
246
+ const agentProvider = agentOptions.provider;
247
+ const agentModel = agentOptions.model;
248
+ const agentReasoningEffort = agentOptions.reasoningEffort;
249
+ const descriptor = snapshotSubagentDescriptor({
250
+ mode: 'continuable',
251
+ provider: spec.provider,
252
+ label: spec.label,
253
+ ...agentProvider !== undefined ? { agentProvider } : {},
254
+ ...agentModel !== undefined ? { agentModel } : {},
255
+ ...agentReasoningEffort !== undefined ? { agentReasoningEffort } : {},
256
+ });
257
+ // Capture before the first await: a later parent switch belongs to the
258
+ // parent's future, not to this child.
259
+ const delegatedPolicies = captureDelegatedPolicyOverrides(parent);
260
+ const cwd = await this.resolveDirectory(spec, signal);
261
+ const prepared = await prepare({
349
262
  sessionId: childId,
350
263
  cwd,
351
264
  parent,
352
- signal: spec.signal,
265
+ signal,
353
266
  });
354
- spec.signal.throwIfAborted();
267
+ signal.throwIfAborted();
355
268
  this.assertAdmitting(parent);
356
269
  const inheritedEventCount = SessionLogOffset(prepared.seed?.length ?? 0);
357
270
  const seed = prepared.seed;
358
271
  let established;
359
272
  const messageId = await this.locks.run(childId, async () => {
360
- spec.signal.throwIfAborted();
273
+ signal.throwIfAborted();
361
274
  this.assertAdmitting(parent);
362
275
  this.assertChildIdAvailable(childId);
363
276
  if (spec.childId !== undefined) {
364
- const persisted = await persistence?.stat(childId, { signal: spec.signal });
365
- spec.signal.throwIfAborted();
277
+ const persisted = await persistence?.stat(childId, { signal: signal });
278
+ signal.throwIfAborted();
366
279
  this.assertAdmitting(parent);
367
280
  this.assertChildIdAvailable(childId);
368
281
  if (persisted !== undefined) {
@@ -373,84 +286,80 @@ export class SubagentManager {
373
286
  kind: 'local',
374
287
  childId,
375
288
  provider: spec.provider,
376
- parent,
289
+ ...ancestry,
377
290
  create: {
291
+ parent,
378
292
  cwd,
379
293
  seed,
380
- meta: childSessionMeta(parent, childDepth, prepared.seed !== undefined, request.agentPreset),
294
+ meta: childSessionMeta(parent, childDepth, prepared.seed !== undefined, spec.agentPreset),
381
295
  inheritedEventCount,
382
296
  delegatedPolicies,
383
297
  descriptor,
384
298
  },
385
299
  agentOptions,
386
- composition: { agentPreset: request.agentPreset },
387
- signal: spec.signal,
300
+ composition: { agentPreset: spec.agentPreset },
301
+ signal,
388
302
  delivery: spec.delivery,
389
- outputSchema: spec.request.outputSchema,
303
+ outputSchema: spec.outputSchema,
390
304
  });
391
305
  established = activation;
392
306
  const child = requireLocalActivation(activation).handle.agent;
393
307
  const childHeader = child.session.header;
394
- return await this.submitMaterialized(activation, spec.delivery !== 'caller' && isAdjacentAgentSendMessageTool(this.ctx.get('tools')?.get('send_message', child))
395
- ? withContinuableReturnGuidance(parent.id, request.prompt)
396
- : request.prompt, { source: { kind: 'user' }, signal: spec.signal, delivery: 'queue' }, parent, () => {
308
+ return await this.submitMaterialized(activation, spec.delivery !== 'caller'
309
+ ? withResultDeliveryGuidance(spec.prompt)
310
+ : spec.prompt, { source: { kind: 'user' }, signal, delivery: 'queue', authorize: () => { this.assertAdmitting(parent); } }, ancestry.root, () => {
311
+ this.assertAdmitting(parent);
397
312
  establishCatalogChild(parent.session, childHeader, descriptor);
398
313
  });
399
314
  });
400
315
  return { ...this.receipt(established), childId, messageId };
401
- }
402
- catch (error) {
403
- releaseHold();
404
- throw error;
405
- }
316
+ });
406
317
  }
407
318
  /**
408
319
  * Start an external backend under activation ownership.
409
320
  * @param spec - task, provider, cancellation, and delivery policy.
321
+ * @param start - execution bound to the checked provider.
410
322
  * @returns the accepted activation and its result/disposal capabilities.
411
323
  */
412
- async startExternal(spec) {
413
- const parent = spec.request.parent;
324
+ async startExternal(spec, start) {
325
+ const { provider, delivery, childId: _childId, ...request } = spec;
326
+ const parent = request.parent;
414
327
  this.assertAdmitting(parent);
415
- const pendingId = brandString(randomUUID());
416
- const releaseHold = this.holdOwnership(parent, pendingId);
417
- let activation;
418
- try {
419
- const cwd = await this.resolveDirectory(spec.request, spec.signal);
420
- activation = await this.materialize({
421
- kind: 'external',
422
- childId: pendingId,
423
- provider: spec.provider,
424
- parent,
425
- signal: spec.signal,
426
- delivery: spec.delivery,
427
- start: signal => this.host.startExternal(spec.provider, {
428
- ...spec.request, cwd, label: spec.label, signal,
429
- }),
430
- });
431
- this.assertAdmitting(parent);
432
- this.assertLiveParent(parent, activation.childId);
433
- spec.signal.throwIfAborted();
434
- if (spec.delivery === 'parent') {
435
- establishExternalCatalogChild(parent.session, activation.childId, spec.label);
436
- }
437
- this.announce(activation);
438
- return this.receipt(activation);
439
- }
440
- catch (error) {
441
- if (activation !== undefined) {
442
- try {
443
- await this.dispose(activation);
328
+ const ancestry = this.ancestryForChild(parent);
329
+ return this.trackStartup(ancestry.root, spec.signal, async (signal) => {
330
+ let activation;
331
+ try {
332
+ const cwd = await this.resolveDirectory(spec, signal);
333
+ activation = await this.materialize({
334
+ kind: 'external',
335
+ provider,
336
+ ...ancestry,
337
+ signal,
338
+ delivery,
339
+ start: signal => start({
340
+ ...request, cwd, signal,
341
+ }),
342
+ });
343
+ this.assertAdmitting(parent);
344
+ signal.throwIfAborted();
345
+ if (delivery === 'parent') {
346
+ establishExternalCatalogChild(parent.session, activation.childId, spec.label);
444
347
  }
445
- catch (cleanupError) {
446
- this.ctx.logger.warn(`subagent "${activation.childId}" admission rollback failed: ${failureMessage(cleanupError)}`);
348
+ this.accept(activation);
349
+ return this.receipt(activation);
350
+ }
351
+ catch (error) {
352
+ if (activation !== undefined) {
353
+ try {
354
+ await this.dispose(activation);
355
+ }
356
+ catch (cleanupError) {
357
+ this.ctx.logger.warn(`subagent "${activation.childId}" admission rollback failed: ${failureMessage(cleanupError)}`);
358
+ }
447
359
  }
360
+ throw error;
448
361
  }
449
- throw error;
450
- }
451
- finally {
452
- releaseHold();
453
- }
362
+ });
454
363
  }
455
364
  /** Capture the explicit or inherited directory while the parent still owns startup. */
456
365
  async resolveDirectory(request, signal) {
@@ -461,59 +370,126 @@ export class SubagentManager {
461
370
  return cwd;
462
371
  }
463
372
  /**
464
- * Deliver one model-authored message to a direct continuable child or to the
465
- * sender's direct parent. A missing direct child cold-resumes through the
466
- * ordinary continuation lifecycle.
467
- * @param sender - exact live Agent authorizing and originating the message.
468
- * @param targetId - durable direct-parent or direct-child session id.
469
- * @param content - model-authored content to deliver.
470
- * @param options - caller cancellation before acceptance.
471
- * @returns the accepted message's inbox id.
373
+ * Resolve the live subagent tree root from runtime ownership, independent of creator residency.
374
+ * @param caller - exact live Agent selecting the subagent tree.
375
+ * @returns the live subagent tree root.
376
+ * @throws when the caller has no active runtime owner.
377
+ */
378
+ rootOf(caller) {
379
+ if (this.ctx.agents.get(caller.id) !== caller) {
380
+ throw new SubagentError('subagent tree access requires the exact live caller', 'UNAUTHORIZED');
381
+ }
382
+ const identity = this.host.identityOf(caller.session);
383
+ const delegated = caller.session.header.origin === 'subagent' || identity != null && caller.session.isOwnSeq(identity.seq);
384
+ const activation = this.resident.get(caller.id);
385
+ if (activation !== undefined && activationAgent(activation) === caller
386
+ && this.ctx.agents.get(activation.root.id) === activation.root)
387
+ return activation.root;
388
+ if (delegated || activation !== undefined) {
389
+ throw new SubagentError('agent has no active runtime owner', 'UNAUTHORIZED');
390
+ }
391
+ return caller;
392
+ }
393
+ /** Capture creation ancestry separately from the root that owns the new instance. */
394
+ ancestryForChild(creator) {
395
+ const root = this.rootOf(creator);
396
+ const ancestors = this.resident.get(creator.id)?.ancestors ?? [];
397
+ return { root, ancestors: [...ancestors, creator.id] };
398
+ }
399
+ /**
400
+ * Deliver to another agent in the subagent tree, restoring only the target when absent.
401
+ * @param sender - exact live root or resident continuable Agent.
402
+ * @param targetId - another member's durable Session id.
403
+ * @param content - model-authored message blocks.
404
+ * @param options - cancellation before inbox acceptance.
405
+ * @returns the accepted inbox message id.
472
406
  */
473
407
  async sendMessage(sender, targetId, content, options) {
474
- if (this.ctx.agents.get(sender.id) !== sender) {
475
- throw new SubagentError('message delivery requires the exact live sender agent', 'UNAUTHORIZED');
476
- }
408
+ options.signal.throwIfAborted();
409
+ const root = this.rootOf(sender);
410
+ if (sender.id === targetId)
411
+ throw new SubagentError('send_message requires another agent in the subagent tree', 'UNAUTHORIZED');
477
412
  this.assertAdmitting(sender);
478
- const senderActivation = this.resident.get(sender.id);
479
- if (senderActivation !== undefined
480
- && senderActivation.kind === 'local'
481
- && senderActivation.handle.agent === sender
482
- && senderActivation.parent.id === targetId) {
483
- options.signal.throwIfAborted();
484
- return this.sendToParent(senderActivation, sender, content);
485
- }
486
- if (sender.session.header.parentSession === targetId) {
487
- throw new SubagentError(`agent "${sender.id}" is not a resident continuable child and cannot send to parent "${targetId}"`, 'UNAUTHORIZED');
488
- }
489
- return this.deliverToChild(sender, targetId, content, {
490
- signal: options.signal,
491
- delivery: 'steer',
413
+ const message = createAgentMessage(sender, content);
414
+ const activation = this.resident.get(sender.id);
415
+ return this.deliverToMember(root, targetId, [...message.content], {
416
+ signal: options.signal, delivery: 'steer', source: message.source,
417
+ authorize: () => { this.assertAdmitting(sender); },
418
+ onAccepted: () => {
419
+ if (activation?.kind === 'local' && activation.ancestors.at(-1) === targetId) {
420
+ activation.omitClosingText = true;
421
+ }
422
+ },
492
423
  });
493
424
  }
494
- /**
495
- * Queue one human-authored prompt as a distinct direct-child turn.
496
- * @param parent - exact live direct parent authorizing delivery.
497
- * @param childId - durable direct-child session id.
498
- * @param content - model-visible prompt blocks.
499
- * @param source - durable attribution for the human prompt.
500
- * @param signal - caller cancellation before inbox acceptance.
501
- * @returns the accepted durable message id.
502
- */
503
- async queuePrompt(parent, childId, content, source, signal) {
504
- return this.deliverToChild(parent, childId, content, { source, signal, delivery: 'queue' });
425
+ /** Resolve the live owner through verified creation edges without activating ancestors. */
426
+ async resolveCreationAncestry(source, signal, root) {
427
+ const ancestors = [];
428
+ const seen = new Set([source.header.id]);
429
+ let { header, projections, inheritedEventCount } = source;
430
+ while (true) {
431
+ const env_1 = { stack: [], error: void 0, hasError: false };
432
+ try {
433
+ signal.throwIfAborted();
434
+ const parentId = header.parentSession;
435
+ const identity = projections?.values.subagent;
436
+ if (parentId === undefined || identity == null || identity.seq < inheritedEventCount)
437
+ break;
438
+ if (seen.has(parentId))
439
+ throw new SubagentError('cyclic subagent creation ancestry', 'UNAUTHORIZED');
440
+ seen.add(parentId);
441
+ const parent = __addDisposableResource(env_1, await this.observeContinuation(parentId, signal), false);
442
+ if (!parent.projections?.values.subagentCatalog?.some(entry => entry.id === header.id)) {
443
+ throw new SubagentError('subagent is absent from its creator catalog', 'UNAUTHORIZED');
444
+ }
445
+ ancestors.unshift(parentId);
446
+ if (parentId === root?.id)
447
+ return { root, ancestors };
448
+ ({ header, projections, inheritedEventCount } = parent);
449
+ }
450
+ catch (e_1) {
451
+ env_1.error = e_1;
452
+ env_1.hasError = true;
453
+ }
454
+ finally {
455
+ __disposeResources(env_1);
456
+ }
457
+ }
458
+ if (root === undefined && ancestors.length > 0 && header.origin !== 'subagent') {
459
+ const owner = this.ctx.agents.get(header.id);
460
+ if (owner === undefined || this.rootOf(owner) !== owner) {
461
+ throw new SubagentError('subagent tree root is not live', 'CONTINUATION_UNAVAILABLE');
462
+ }
463
+ return { root: owner, ancestors };
464
+ }
465
+ throw new SubagentError(`agent "${source.header.id}" is not a member of this subagent tree`, 'UNAUTHORIZED');
505
466
  }
506
467
  /**
507
- * Steer one host-authored prompt to a direct continuable child.
508
- * @param parent - exact live direct parent authorizing delivery.
509
- * @param childId - durable direct-child session id.
468
+ * Deliver one host-authored prompt through the target's live subagent tree root.
469
+ * Remote callers must be authorized for the target Session before invoking this operation.
470
+ * @param childId - durable continuable subagent session id.
510
471
  * @param content - model-visible prompt blocks.
511
- * @param source - durable attribution for the host prompt.
512
- * @param signal - caller cancellation before inbox acceptance.
472
+ * @param options - inbox destination, durable attribution, and cancellation before acceptance.
513
473
  * @returns the accepted durable message id.
514
474
  */
515
- async steerPrompt(parent, childId, content, source, signal) {
516
- return this.deliverToChild(parent, childId, content, { source, signal, delivery: 'steer' });
475
+ async deliverPrompt(childId, content, options) {
476
+ options.signal.throwIfAborted();
477
+ let root = this.resident.get(childId)?.root;
478
+ if (root === undefined) {
479
+ const env_2 = { stack: [], error: void 0, hasError: false };
480
+ try {
481
+ const source = __addDisposableResource(env_2, await this.observeContinuation(childId, options.signal), false);
482
+ ({ root } = await this.resolveCreationAncestry(source, options.signal));
483
+ }
484
+ catch (e_2) {
485
+ env_2.error = e_2;
486
+ env_2.hasError = true;
487
+ }
488
+ finally {
489
+ __disposeResources(env_2);
490
+ }
491
+ }
492
+ return this.deliverToMember(root, childId, content, options);
517
493
  }
518
494
  /** Admit local input synchronously before any teardown can begin. */
519
495
  deliver(activation, message, delivery) {
@@ -538,38 +514,6 @@ export class SubagentManager {
538
514
  throw new SubagentError(`subagent "${childId}" already exists`, 'DUPLICATE_CHILD');
539
515
  }
540
516
  }
541
- /**
542
- * Pre-register `childId` in a continuation-managed parent's owned set so the
543
- * parent cannot settle while a caller is still establishing or resuming that
544
- * child. Returns a releaser for the failure path; it removes only a hold
545
- * this call added, and leaves ownership in place once a live Activation for
546
- * the child exists.
547
- * @param parent - the live direct parent the operation is admitted under.
548
- * @param childId - the durable child the operation addresses.
549
- * @returns the failure-path releaser; a no-op when nothing was added.
550
- */
551
- holdOwnership(parent, childId) {
552
- const parentActivation = this.resident.get(parent.id);
553
- if (parentActivation === undefined || activationAgent(parentActivation) !== parent)
554
- return () => { };
555
- if (parentActivation.closing !== undefined) {
556
- throw new SubagentError(`subagent parent "${parent.id}" is being disposed; the child was not established`, 'ACTIVATION_CLOSING');
557
- }
558
- if (parentActivation.ownedChildren.has(childId))
559
- return () => { };
560
- parentActivation.ownedChildren.add(childId);
561
- return () => {
562
- const live = this.resident.get(childId);
563
- /* v8 ignore next 4 -- reaching this arm needs another delivery to establish the child
564
- * between this operation's failure and its releaser running, which no test can schedule
565
- * deterministically: the ownership edge then belongs to that live Activation, so the
566
- * conservative keep leaves it for finishDisposal's releaseOwnership. */
567
- if (live !== undefined && live.closing === undefined)
568
- return;
569
- if (parentActivation.ownedChildren.delete(childId))
570
- this.wake(parentActivation);
571
- };
572
- }
573
517
  /**
574
518
  * Apply activation admission to a resident parent before delivering input.
575
519
  * @param parent - exact live Agent receiving the message.
@@ -593,34 +537,20 @@ export class SubagentManager {
593
537
  parent.followup(message);
594
538
  }
595
539
  /**
596
- * Reject new admission once the manager or this exact parent tree began draining.
597
- * @param agent - exact live Agent whose lineage determines admission.
540
+ * Reject new work from closing members or subagent trees.
541
+ * @param agent - exact live caller whose instance and subagent tree must admit work.
598
542
  */
599
543
  assertAdmitting(agent) {
600
544
  const closing = this.closingTeardownFor(agent);
601
- if (closing === undefined)
545
+ if (closing === undefined) {
546
+ if (this.resident.get(agent.id)?.closing !== undefined) {
547
+ throw new SubagentError(`subagent "${agent.id}" is closing`, 'ACTIVATION_CLOSING');
548
+ }
602
549
  return;
550
+ }
603
551
  throw new SubagentError(closing === 'manager'
604
552
  ? 'subagents are draining; the operation was not admitted'
605
- : `subagents below parent "${closing.id}" are draining; the operation was not admitted`, 'DRAINING');
606
- }
607
- /**
608
- * Authorize one operation against the durable direct-parent lineage.
609
- * @param parent - exact live Agent claiming direct-parent authority.
610
- * @param childId - durable child session id addressed by the operation.
611
- * @param parentSession - durable direct-parent id recorded by the child.
612
- */
613
- authorizeLineage(parent, childId, parentSession) {
614
- this.assertLiveParent(parent, childId);
615
- if (parentSession !== parent.id) {
616
- throw new SubagentError(`subagent "${childId}" belongs to another parent session`, 'UNAUTHORIZED');
617
- }
618
- }
619
- /** Reject parent authority after the live registry entry changes. */
620
- assertLiveParent(parent, childId) {
621
- if (this.ctx.agents.get(parent.id) !== parent) {
622
- throw new SubagentError(`subagent "${childId}" delivery requires the exact live parent agent`, 'UNAUTHORIZED');
623
- }
553
+ : `subagent tree "${closing.id}" is draining; the operation was not admitted`, 'DRAINING');
624
554
  }
625
555
  /**
626
556
  * Create or resume one child Agent and publish its Activation.
@@ -628,23 +558,26 @@ export class SubagentManager {
628
558
  * @returns the published process-local Activation.
629
559
  */
630
560
  materialize(inputs) {
631
- this.assertAdmitting(inputs.parent);
561
+ this.assertAdmitting(inputs.root);
632
562
  inputs.signal.throwIfAborted();
633
- const lineage = this.liveLineage(inputs.parent);
634
- const pool = this.resident.get(inputs.parent.id)?.pool ?? this.rootPool(inputs.parent);
563
+ const pool = this.rootPool(inputs.root);
635
564
  const releaseSlot = pool.reserve(this.maxActiveSubagents());
565
+ return this.materializeTracked(inputs, releaseSlot).catch((error) => {
566
+ releaseSlot();
567
+ throw error;
568
+ });
569
+ }
570
+ /** Keep subagent tree shutdown and host waits joined to preparation, publication, and rollback. */
571
+ trackStartup(root, signal, start) {
572
+ this.assertAdmitting(root);
573
+ signal.throwIfAborted();
636
574
  const settled = Promise.withResolvers();
637
575
  const controller = new AbortController();
638
- const materialization = {
639
- lineage,
640
- settled: settled.promise,
641
- controller,
642
- };
576
+ const materialization = { root, settled: settled.promise, controller };
643
577
  this.materializations.add(materialization);
644
- return this.materializeTracked({ ...inputs, signal: AbortSignal.any([inputs.signal, controller.signal]) }, lineage, pool, releaseSlot).catch((error) => {
645
- releaseSlot();
578
+ return start(AbortSignal.any([signal, controller.signal])).catch((error) => {
646
579
  if (error instanceof Error && error.name === 'AbortError')
647
- this.assertAdmitting(inputs.parent);
580
+ this.assertAdmitting(root);
648
581
  throw error;
649
582
  }).finally(() => {
650
583
  this.materializations.delete(materialization);
@@ -685,42 +618,14 @@ export class SubagentManager {
685
618
  + reasons.map(reason => failureMessage(reason)).join('; '), 'ACTIVATION_TEARDOWN_FAILED');
686
619
  }
687
620
  }
688
- /** Return the retained member set for one exact scoped-teardown root. */
689
- closingMembers(root) {
690
- const existing = this.closingScopes.get(root);
691
- if (existing !== undefined)
692
- return existing;
693
- const members = new Set();
694
- this.closingScopes.set(root, members);
695
- return members;
696
- }
697
- /** Return the exact currently resolvable ancestry from `agent` upward. */
698
- liveLineage(agent) {
699
- const lineage = [agent];
700
- const seen = new Set([agent.id]);
701
- let parentSession = agent.session.header.parentSession;
702
- while (parentSession !== undefined) {
703
- const parent = this.ctx.agents.get(parentSession);
704
- if (parent === undefined || seen.has(parent.id))
705
- break;
706
- lineage.push(parent);
707
- seen.add(parent.id);
708
- parentSession = parent.session.header.parentSession;
709
- }
710
- return lineage;
711
- }
712
- /** Return the teardown that closed continuable admission for this agent's lineage. */
621
+ /** Return the subagent tree teardown that closed admission for this exact Agent. */
713
622
  closingTeardownFor(agent) {
714
623
  if (this.draining)
715
624
  return 'manager';
716
- const lineage = this.liveLineage(agent);
717
- for (const [root, members] of this.closingScopes) {
718
- if (members.has(agent) || lineage.includes(root))
719
- return root;
720
- }
721
- return undefined;
625
+ const root = this.rootOf(agent);
626
+ return this.closingRoots.has(root) ? root : undefined;
722
627
  }
723
- /** Resolve a root's pool once; descendants inherit their resident parent's pool directly. */
628
+ /** Share one capacity pool across every instance in a subagent tree. */
724
629
  rootPool(parent) {
725
630
  let pool = this.rootPools.get(parent);
726
631
  if (pool === undefined) {
@@ -730,9 +635,8 @@ export class SubagentManager {
730
635
  return pool;
731
636
  }
732
637
  /** Perform one tracked materialization through publication or rollback. */
733
- async materializeTracked(inputs, parentLineage, pool, releaseSlot) {
734
- const { provider, parent } = inputs;
735
- let childId = inputs.childId;
638
+ async materializeTracked(inputs, releaseSlot) {
639
+ const { provider, root } = inputs;
736
640
  inputs.signal.throwIfAborted();
737
641
  let resource;
738
642
  if (inputs.kind === 'external') {
@@ -743,9 +647,8 @@ export class SubagentManager {
743
647
  const run = await inputs.start(controller.signal);
744
648
  resource = { kind: 'external', run, controller };
745
649
  void run.result.catch(() => undefined);
746
- childId = run.id;
747
650
  try {
748
- this.assertChildIdAvailable(childId);
651
+ this.assertChildIdAvailable(run.id);
749
652
  }
750
653
  catch (error) {
751
654
  await run.dispose();
@@ -757,20 +660,20 @@ export class SubagentManager {
757
660
  }
758
661
  }
759
662
  else {
760
- const { create } = inputs;
663
+ const { create, childId } = inputs;
761
664
  let structured;
762
665
  const setup = async (childCtx, child) => {
763
666
  // Only fresh creation appends the descriptor and delegated policy after
764
667
  // the inherited marker; a cold resume replays those persisted events.
765
668
  if (inputs.composition.agentPreset !== undefined) {
766
- await applyChildComposition(childCtx, parent, inputs.composition);
669
+ await applyChildComposition(childCtx, create?.parent, inputs.composition);
767
670
  }
768
671
  if (create !== undefined) {
769
672
  const { provider, model, reasoningEffort } = inputs.agentOptions;
770
673
  const inherited = child.model.current();
771
- // A fork's inherited request headers must not override its resolved child route.
674
+ // A fork's inherited request headers must not override its resolved child selection.
772
675
  if (provider !== undefined && model !== undefined
773
- && (inherited?.provider !== provider || inherited.model !== model)) {
676
+ && (inherited?.provider !== provider || inherited.model !== model || inherited.reasoningEffort !== reasoningEffort)) {
774
677
  child.model.select({ provider, model, ...reasoningEffort === undefined ? {} : { reasoningEffort } });
775
678
  }
776
679
  if (inputs.composition.agentPreset !== undefined) {
@@ -784,24 +687,21 @@ export class SubagentManager {
784
687
  await workingDirectory.set(child, create.cwd, inputs.signal);
785
688
  }
786
689
  if (inputs.composition.agentPreset === undefined)
787
- await applyChildComposition(childCtx, parent, inputs.composition);
690
+ await applyChildComposition(childCtx, create?.parent, inputs.composition);
788
691
  if (inputs.outputSchema !== undefined) {
789
- structured = attachStructuredRuntime(childCtx, inputs.outputSchema, () => this.resident.get(childId)?.ownedChildren.size === 0
790
- && child.inbox.nextStep.length === 0
692
+ structured = attachStructuredRuntime(childCtx, inputs.outputSchema, () => child.inbox.nextStep.length === 0
791
693
  && child.inbox.nextTurn.length === 0);
792
694
  }
793
695
  };
794
696
  const handle = create === undefined
795
697
  ? await this.ownerCtx.agents.resume({
796
698
  resumeSessionId: childId,
797
- parentAgent: parent,
798
699
  agentOptions: inputs.agentOptions,
799
700
  signal: inputs.signal,
800
701
  setup,
801
702
  })
802
703
  : await this.ownerCtx.agents.create({
803
704
  sessionId: childId,
804
- parentAgent: parent,
805
705
  meta: create.meta,
806
706
  ...(create.seed === undefined ? {} : { seed: create.seed }),
807
707
  inheritedEventCount: create.inheritedEventCount,
@@ -819,29 +719,25 @@ export class SubagentManager {
819
719
  omitClosingText: false,
820
720
  };
821
721
  }
822
- const observer = this.host.observeActivation(provider, childId, parent);
722
+ const childId = resource.kind === 'local' ? resource.handle.agent.id : resource.run.id;
823
723
  const activation = {
824
- pool,
825
724
  releaseSlot,
826
725
  childId,
726
+ runId: SubagentRunId(randomUUID()),
727
+ provider,
827
728
  ...resource,
828
- parent,
729
+ root,
730
+ ancestors: inputs.ancestors,
829
731
  delivery: inputs.delivery ?? 'parent',
830
732
  result: Promise.withResolvers(),
831
733
  closing: undefined,
832
- ancestry: new WeakSet(resource.kind === 'external' ? parentLineage : [resource.handle.agent, ...parentLineage]),
833
- ownedChildren: new Set(),
834
- observer,
835
- announced: false,
734
+ accepted: false,
836
735
  };
837
736
  void activation.result.promise.catch(() => undefined);
838
737
  this.resident.set(childId, activation);
839
738
  try {
840
- this.assertAdmitting(parent);
739
+ this.assertAdmitting(root);
841
740
  inputs.signal.throwIfAborted();
842
- if (this.ctx.agents.get(parent.id) !== parent)
843
- throw new SubagentError('subagent parent is no longer live', 'UNAUTHORIZED');
844
- this.acquireOwnership(parent, childId);
845
741
  const wakeSettlement = () => { this.wake(activation); };
846
742
  if (activation.kind === 'local') {
847
743
  observeLocalFailure(activation, wakeSettlement);
@@ -861,7 +757,9 @@ export class SubagentManager {
861
757
  activation.omitClosingText = false;
862
758
  });
863
759
  }
864
- observer.start(activationAgent(activation));
760
+ // Listeners may read the resident Agent or drain it immediately. Publish
761
+ // after residency and inbox listeners, as the last rollback-protected step.
762
+ this.host.emitLifecycle('subagent/start', this.runInfo(activation), root);
865
763
  }
866
764
  catch (error) {
867
765
  /* v8 ignore next -- rollback failure must not mask the admission failure
@@ -871,14 +769,19 @@ export class SubagentManager {
871
769
  }
872
770
  return activation;
873
771
  }
874
- /**
875
- * Begin settlement observation after initial acceptance is recorded.
876
- * @param activation - accepted activation to observe.
877
- */
878
- announce(activation) {
879
- if (activation.announced)
880
- return;
881
- activation.announced = true;
772
+ /** Identity shared by one residency epoch's start/end pair, including cold resumes. */
773
+ runInfo(activation) {
774
+ return {
775
+ runId: activation.runId,
776
+ provider: activation.provider,
777
+ parentSessionId: activation.ancestors.at(-1),
778
+ id: activation.childId,
779
+ local: activation.kind === 'local',
780
+ };
781
+ }
782
+ /** Record acceptance and begin settlement observation before returning the receipt. */
783
+ accept(activation) {
784
+ activation.accepted = true;
882
785
  if (activation.kind === 'local') {
883
786
  this.watchLocalSettlement(activation);
884
787
  }
@@ -896,29 +799,10 @@ export class SubagentManager {
896
799
  finally {
897
800
  this.resident.delete(activation.childId);
898
801
  activation.releaseSlot();
899
- this.releaseOwnership(activation.childId);
900
802
  activation.result.reject(error);
901
803
  }
902
804
  });
903
805
  }
904
- /** Register the child in a continuation-managed parent's owned set. */
905
- acquireOwnership(parent, childId) {
906
- const parentActivation = this.resident.get(parent.id);
907
- if (parentActivation === undefined)
908
- return;
909
- if (parentActivation.closing !== undefined) {
910
- throw new SubagentError(`subagent parent "${parent.id}" is being disposed; the child was not established`, 'ACTIVATION_CLOSING');
911
- }
912
- parentActivation.ownedChildren.add(childId);
913
- this.wake(parentActivation);
914
- }
915
- /** Remove one child from its live owner's set and let that owner re-check settlement. */
916
- releaseOwnership(childId) {
917
- for (const candidate of this.resident.values()) {
918
- if (candidate.ownedChildren.delete(childId))
919
- this.wake(candidate);
920
- }
921
- }
922
806
  /** Let a settlement watcher re-check residency after relevant state changes. */
923
807
  wake(activation) {
924
808
  if (activation.kind === 'external')
@@ -984,20 +868,18 @@ export class SubagentManager {
984
868
  reportTeardownFailure(activation, error) {
985
869
  this.ctx.logger.warn(`subagent "${activation.childId}" activation teardown failed: ${failureMessage(error)}`);
986
870
  }
987
- /** Check pending input and owned children before closing admission. */
871
+ /** Check pending input before closing admission. */
988
872
  settlementState(activation, observation) {
989
873
  if (activation.closing !== undefined)
990
874
  return 'closed';
991
875
  if (activation.poke !== observation)
992
876
  return 'retry';
993
877
  const inbox = activation.handle.agent.inbox;
994
- if (activation.ownedChildren.size > 0)
995
- return 'wait';
996
878
  if (activation.failureAt === undefined && (inbox.nextTurn.length > 0 || inbox.nextStep.length > 0))
997
879
  return 'wait';
998
880
  return 'ready';
999
881
  }
1000
- /** Propagate stop synchronously and await descendant startup rollback before release. */
882
+ /** Stop and release one instance without affecting its creation descendants. */
1001
883
  async finishDisposal(activation, stop) {
1002
884
  this.wake(activation);
1003
885
  const { childId } = activation;
@@ -1023,27 +905,6 @@ export class SubagentManager {
1023
905
  if (stop) {
1024
906
  activation.handle.agent.cancel({ kind: 'parent' });
1025
907
  const idle = activation.handle.agent.whenIdle();
1026
- const children = [...activation.ownedChildren]
1027
- .map(child => this.resident.get(child))
1028
- .filter((child) => child !== undefined);
1029
- const pending = [...this.materializations].filter(item => item.lineage.includes(activation.handle.agent));
1030
- const childDisposals = children.map(child => this.dispose(child));
1031
- for (const item of pending)
1032
- item.controller.abort();
1033
- childDisposals.push(...pending.map(item => item.settled));
1034
- const childFailures = await Promise.all(childDisposals.map(async (disposal) => {
1035
- try {
1036
- await disposal;
1037
- return undefined;
1038
- }
1039
- catch (error) {
1040
- return error;
1041
- }
1042
- }));
1043
- const reasons = childFailures.filter(reason => reason !== undefined);
1044
- if (reasons.length > 0) {
1045
- failures.push(new SubagentError(`subagent "${childId}" child teardown failed: ${reasons.map(reason => failureMessage(reason)).join('; ')}`, 'ACTIVATION_TEARDOWN_FAILED'));
1046
- }
1047
908
  await idle;
1048
909
  await this.flushFinalState(activation);
1049
910
  }
@@ -1075,8 +936,13 @@ export class SubagentManager {
1075
936
  activation.releaseSlot();
1076
937
  const terminal = failure === undefined ? result : { output: [], stopReason: 'error' };
1077
938
  this.notifySettlement(activation, result);
1078
- this.releaseOwnership(childId);
1079
- activation.observer.settle(terminal);
939
+ // The sole end publication follows resource release and parent notification,
940
+ // before result delivery. Cleanup failure changes the event, not the captured result.
941
+ this.host.emitLifecycle('subagent/end', {
942
+ ...this.runInfo(activation),
943
+ stopReason: terminal.stopReason,
944
+ ...terminal.output.length === 0 ? {} : { lastAssistantMessage: terminal.output },
945
+ }, activation.root);
1080
946
  if (resultFailure === undefined)
1081
947
  activation.result.resolve(result);
1082
948
  else
@@ -1086,11 +952,12 @@ export class SubagentManager {
1086
952
  }
1087
953
  /** Deliver the captured execution result to the durable direct parent after cleanup. */
1088
954
  notifySettlement(activation, terminal) {
1089
- if (!activation.announced || activation.delivery === 'caller')
955
+ if (!activation.accepted || activation.delivery === 'caller')
1090
956
  return;
1091
957
  try {
1092
- const parent = this.ctx.agents.get(activation.parent.id);
1093
- if (parent !== activation.parent)
958
+ const parentId = activation.ancestors.at(-1);
959
+ const parent = this.ctx.agents.get(parentId);
960
+ if (parent === undefined || this.rootOf(parent) !== activation.root)
1094
961
  return;
1095
962
  const message = createSettlementMessage(activation.childId, terminal, activation.kind === 'local', activation.kind === 'local' && activation.omitClosingText);
1096
963
  if (this.closingTeardownFor(parent) !== undefined) {
@@ -1122,140 +989,112 @@ export class SubagentManager {
1122
989
  dispose: () => this.dispose(activation),
1123
990
  };
1124
991
  }
1125
- /** Route one parent-originated delivery through residency and cold resume. */
1126
- async deliverToChild(parent, childId, content, options) {
1127
- this.assertAdmitting(parent);
1128
- const releaseHold = this.holdOwnership(parent, childId);
1129
- try {
1130
- return await this.deliverFollowup(parent, childId, content, options);
1131
- }
1132
- catch (error) {
1133
- releaseHold();
1134
- throw error;
1135
- }
1136
- }
1137
- /** The delivery loop behind {@link deliverToChild}, run under the parent hold. */
1138
- async deliverFollowup(parent, childId, content, options) {
992
+ /** Serialize target restoration and inbox admission; closure is awaited outside the lock. */
993
+ async deliverToMember(root, childId, content, options) {
1139
994
  while (true) {
1140
- const live = await this.locks.run(childId, async () => {
995
+ this.assertAdmitting(root);
996
+ options.signal.throwIfAborted();
997
+ const result = await this.locks.run(childId, async () => {
998
+ if (childId === root.id) {
999
+ if (contentHasImage(content))
1000
+ await this.assertImageCapable(root, options.signal);
1001
+ options.signal.throwIfAborted();
1002
+ options.authorize?.();
1003
+ this.assertAdmitting(root);
1004
+ const message = createUserMessage({ content, source: options.source });
1005
+ this.sendWaking(root, message, options.delivery);
1006
+ options.onAccepted?.();
1007
+ return { messageId: message.id };
1008
+ }
1141
1009
  const activation = this.resident.get(childId);
1142
- if (activation === undefined)
1143
- return this.coldResume(parent, childId, content, options);
1144
- requireLocalActivation(activation);
1145
- const disposal = activation.closing;
1146
- /* v8 ignore next 3 -- the send-versus-dispose cutoff needs a delivery to
1147
- * observe the transaction inside the same critical section that opened it. */
1148
- if (disposal !== undefined) {
1149
- return disposal.then(() => undefined, () => undefined);
1010
+ if (activation === undefined) {
1011
+ const restored = await this.restoreTarget(root, childId, options.signal);
1012
+ return { messageId: await this.submitMaterialized(restored, content, options, root) };
1150
1013
  }
1151
- if (contentHasImage(content)) {
1014
+ if (activation.root !== root)
1015
+ throw new SubagentError('target belongs to another subagent tree', 'UNAUTHORIZED');
1016
+ requireLocalActivation(activation);
1017
+ if (activation.closing === undefined && contentHasImage(content)) {
1152
1018
  await this.assertImageCapable(requireLocalActivation(activation).handle.agent, options.signal);
1153
- if (activation.closing !== undefined) {
1154
- await Promise.allSettled([activation.closing]);
1155
- return undefined;
1156
- }
1157
1019
  }
1158
- const messageId = this.submitAdmitted(activation, content, options, parent);
1159
- this.announce(activation);
1160
- return messageId;
1020
+ if (activation.closing !== undefined)
1021
+ return { closing: activation.closing };
1022
+ const messageId = this.submitAdmitted(activation, content, options, root);
1023
+ return { messageId };
1161
1024
  });
1162
- /* v8 ignore start -- only a delivery that lost the disposal cutoff retries. */
1163
- if (live !== undefined)
1164
- return live;
1165
- this.assertAdmitting(parent);
1166
- options.signal.throwIfAborted();
1167
- /* v8 ignore stop */
1168
- }
1169
- }
1170
- /** Deliver one resident continuable child's message to its live direct parent. */
1171
- sendToParent(activation, sender, content) {
1172
- /* v8 ignore next 6 -- only synchronous re-entrant teardown can open this
1173
- * transaction between exact-agent authorization and this no-await span. */
1174
- if (activation.closing !== undefined) {
1175
- throw new SubagentError(`subagent "${sender.id}" activation is being disposed; the message was not delivered`, 'ACTIVATION_CLOSING');
1176
- }
1177
- const parent = this.ctx.agents.get(activation.parent.id);
1178
- if (parent !== activation.parent) {
1179
- throw new SubagentError('direct parent is not live; the message was not delivered', 'PARENT_UNAVAILABLE');
1025
+ if ('messageId' in result)
1026
+ return result.messageId;
1027
+ await Promise.allSettled([result.closing]);
1180
1028
  }
1181
- const message = createAgentMessage(sender, content);
1182
- this.sendAgentMessage(parent, message);
1183
- activation.omitClosingText = true;
1184
- return message.id;
1185
1029
  }
1186
- /** Send one Agent message while translating only the target's own rejection. */
1187
- sendAgentMessage(parent, message) {
1030
+ /** Read continuation history, preserving cancellation and reporting unavailable storage. */
1031
+ async observeContinuation(childId, signal) {
1032
+ const query = this.requireSessionQuery();
1188
1033
  try {
1189
- this.sendWaking(parent, message, 'steer');
1034
+ return await query.observeSession(childId, { signal });
1190
1035
  }
1191
1036
  catch (error) {
1192
- throw new SubagentError('direct parent is not live; the message was not delivered', 'PARENT_UNAVAILABLE', { cause: error });
1037
+ signal.throwIfAborted();
1038
+ throw new SubagentError(`subagent "${childId}" is unavailable`, 'NOT_RESUMABLE', { cause: error });
1193
1039
  }
1194
1040
  }
1195
- /**
1196
- * Cold-resume a persisted child and submit the waiting turn. The descriptor
1197
- * supplies every reconstruction input; no subagent provider is dispatched.
1198
- */
1199
- async coldResume(parent, childId, content, options) {
1200
- const env_1 = { stack: [], error: void 0, hasError: false };
1201
- try {
1202
- const query = this.requireSessionQuery();
1203
- let observation;
1041
+ /** Reconstruct only the target under its subagent tree root; the caller owns acceptance or rollback. */
1042
+ async restoreTarget(root, childId, signal) {
1043
+ return this.trackStartup(root, signal, async (signal) => {
1044
+ const env_3 = { stack: [], error: void 0, hasError: false };
1204
1045
  try {
1205
- observation = await query.observeSession(childId, {
1206
- signal: options.signal,
1207
- });
1208
- }
1209
- catch (error) {
1210
- options.signal.throwIfAborted();
1211
- throw new SubagentError(`subagent "${childId}" is unavailable`, 'NOT_RESUMABLE', { cause: error });
1212
- }
1213
- const source = __addDisposableResource(env_1, observation, false);
1214
- this.assertAdmitting(parent);
1215
- this.authorizeLineage(parent, childId, source.header.parentSession);
1216
- const ownEvents = source.events.slice(source.inheritedEventCount);
1217
- const descriptor = foldSubagentDescriptor(ownEvents);
1218
- if (descriptor === undefined || descriptor.mode !== 'continuable') {
1219
- throw new SubagentError(`subagent "${childId}" has no supported continuation state and cannot be resumed; choose a different target`, 'NOT_RESUMABLE');
1220
- }
1221
- let activation;
1222
- try {
1223
- const independentlySelected = hasIndependentPresetSelection(ownEvents);
1224
- const agentPreset = independentlySelected ? source.projections?.values.agentPreset : undefined;
1225
- if (independentlySelected && typeof agentPreset !== 'string') {
1226
- throw new SubagentError(`subagent "${childId}" has no agent preset projection for restoration`, 'NOT_RESUMABLE');
1046
+ const source = __addDisposableResource(env_3, await this.observeContinuation(childId, signal), false);
1047
+ this.assertAdmitting(root);
1048
+ const ownEvents = source.events.slice(source.inheritedEventCount);
1049
+ const descriptor = foldSubagentDescriptor(ownEvents);
1050
+ if (descriptor === undefined || descriptor.mode !== 'continuable') {
1051
+ throw new SubagentError(`subagent "${childId}" has no supported continuation state and cannot be resumed; choose a different target`, 'NOT_RESUMABLE');
1227
1052
  }
1228
- activation = await this.materialize({
1229
- kind: 'local',
1230
- childId,
1231
- provider: descriptor.provider,
1232
- parent,
1233
- agentOptions: {
1234
- ...descriptor.agentProvider !== undefined ? { provider: descriptor.agentProvider } : {},
1235
- ...descriptor.agentModel !== undefined ? { model: descriptor.agentModel } : {},
1236
- ...descriptor.agentReasoningEffort !== undefined
1237
- ? { reasoningEffort: ReasoningEffortId(descriptor.agentReasoningEffort) }
1238
- : {},
1239
- },
1240
- composition: { agentPreset: agentPreset ?? undefined, persona: descriptor.persona, toolFilter: descriptor.toolFilter },
1241
- signal: options.signal,
1242
- });
1053
+ const { ancestors } = await this.resolveCreationAncestry(source, signal, root);
1054
+ let activation;
1055
+ try {
1056
+ const projectedPreset = source.projections?.values.agentPreset;
1057
+ if (projectedPreset === undefined && source.events.some(event => event.type === 'agent-preset/selected')) {
1058
+ throw new SubagentError(`subagent "${childId}" has no agent preset projection for restoration`, 'NOT_RESUMABLE');
1059
+ }
1060
+ const agentPreset = projectedPreset ?? source.header.agentPreset;
1061
+ activation = await this.materialize({
1062
+ kind: 'local',
1063
+ childId,
1064
+ provider: descriptor.provider,
1065
+ root,
1066
+ ancestors,
1067
+ agentOptions: {
1068
+ ...descriptor.agentProvider !== undefined ? { provider: descriptor.agentProvider } : {},
1069
+ ...descriptor.agentModel !== undefined ? { model: descriptor.agentModel } : {},
1070
+ ...descriptor.agentReasoningEffort !== undefined
1071
+ ? { reasoningEffort: ReasoningEffortId(descriptor.agentReasoningEffort) }
1072
+ : {},
1073
+ },
1074
+ composition: {
1075
+ agentPreset: agentPreset ?? undefined,
1076
+ persona: descriptor.persona,
1077
+ toolFilter: descriptor.toolFilter,
1078
+ },
1079
+ signal,
1080
+ });
1081
+ }
1082
+ catch (error) {
1083
+ signal.throwIfAborted();
1084
+ if (error instanceof SubagentError)
1085
+ throw error;
1086
+ throw new SubagentError(`subagent "${childId}" is unavailable`, 'NOT_RESUMABLE', { cause: error });
1087
+ }
1088
+ return activation;
1243
1089
  }
1244
- catch (error) {
1245
- options.signal.throwIfAborted();
1246
- if (error instanceof SubagentError)
1247
- throw error;
1248
- throw new SubagentError(`subagent "${childId}" is unavailable`, 'NOT_RESUMABLE', { cause: error });
1090
+ catch (e_3) {
1091
+ env_3.error = e_3;
1092
+ env_3.hasError = true;
1249
1093
  }
1250
- return await this.submitMaterialized(activation, content, options, parent);
1251
- }
1252
- catch (e_1) {
1253
- env_1.error = e_1;
1254
- env_1.hasError = true;
1255
- }
1256
- finally {
1257
- __disposeResources(env_1);
1258
- }
1094
+ finally {
1095
+ __disposeResources(env_3);
1096
+ }
1097
+ });
1259
1098
  }
1260
1099
  /** Admit a materialized child, commit its creation fact, and release it on failure. */
1261
1100
  async submitMaterialized(activation, content, options, parent, commit) {
@@ -1268,7 +1107,7 @@ export class SubagentManager {
1268
1107
  }
1269
1108
  const messageId = this.submitAdmitted(activation, content, options, parent);
1270
1109
  commit?.();
1271
- this.announce(activation);
1110
+ this.accept(activation);
1272
1111
  return messageId;
1273
1112
  }
1274
1113
  catch (error) {
@@ -1283,19 +1122,17 @@ export class SubagentManager {
1283
1122
  }
1284
1123
  /** Build and submit one message across the final synchronous admission cutoff. */
1285
1124
  submitAdmitted(activation, content, options, parent) {
1286
- const message = options.source === undefined
1287
- ? createAgentMessage(parent, content)
1288
- : createUserMessage({ content, source: options.source });
1125
+ const message = createUserMessage({ content, source: options.source });
1289
1126
  options.signal.throwIfAborted();
1127
+ options.authorize?.();
1290
1128
  this.assertAdmitting(parent);
1291
- this.authorizeLineage(parent, activation.childId, activation.parent.id);
1292
- this.acquireOwnership(parent, activation.childId);
1293
1129
  try {
1294
1130
  this.deliver(activation, message, options.delivery);
1295
1131
  }
1296
1132
  finally {
1297
1133
  this.wake(activation);
1298
1134
  }
1135
+ options.onAccepted?.();
1299
1136
  return message.id;
1300
1137
  }
1301
1138
  /** Refuse image content for a child whose fixed model accepts text only. */
@@ -1330,15 +1167,4 @@ export class SubagentManager {
1330
1167
  }
1331
1168
  }
1332
1169
  export default SubagentManager;
1333
- /** Creation-time selection precedes the own descriptor; historical forks can select after it. */
1334
- function hasIndependentPresetSelection(events) {
1335
- for (const event of events) {
1336
- if (event.type === 'subagent/descriptor')
1337
- return false;
1338
- if (event.type === 'agent-preset/selected')
1339
- return true;
1340
- }
1341
- /* v8 ignore next -- coldResume rejects logs without a supported own descriptor before this lookup. */
1342
- return false;
1343
- }
1344
1170
  //# sourceMappingURL=manager.js.map