@songtonyli/dsh-cli 0.1.93 → 0.1.95

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