@songtonyli/dsh-cli 0.1.93 → 0.1.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (960) hide show
  1. package/README.md +1 -1
  2. package/bin/dsh.mjs +1 -1
  3. package/node_modules/@deepseek-ai/cordis/package.json +4 -4
  4. package/node_modules/@deepseek-ai/cordis-plugin-group/package.json +3 -3
  5. package/node_modules/@deepseek-ai/cordis-plugin-include/README.md +10 -0
  6. package/node_modules/@deepseek-ai/cordis-plugin-include/lib/index.js +647 -149
  7. package/node_modules/@deepseek-ai/cordis-plugin-include/package.json +4 -4
  8. package/node_modules/@deepseek-ai/cordis-plugin-include/src/index.ts +362 -236
  9. package/node_modules/@deepseek-ai/cordis-plugin-include/src/journal.ts +242 -0
  10. package/node_modules/@deepseek-ai/cordis-plugin-include/src/patch.ts +261 -0
  11. package/node_modules/@deepseek-ai/cordis-plugin-loader/README.md +5 -1
  12. package/node_modules/@deepseek-ai/cordis-plugin-loader/lib/index.js +96 -20
  13. package/node_modules/@deepseek-ai/cordis-plugin-loader/package.json +4 -4
  14. package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/entry.ts +2 -2
  15. package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/group.ts +3 -2
  16. package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/tree.ts +77 -8
  17. package/node_modules/@deepseek-ai/cordis-plugin-loader/src/index.ts +24 -13
  18. package/node_modules/@deepseek-ai/cordis-plugin-timer/package.json +3 -3
  19. package/node_modules/@deepseek-ai/cosmokit/package.json +1 -1
  20. package/node_modules/@deepseek-ai/dsh/lib/bin-DQ1vWxS0.js +254 -0
  21. package/node_modules/@deepseek-ai/dsh/lib/bin.js +19 -245
  22. package/node_modules/@deepseek-ai/dsh/lib/{dump-config-D97dwXdd.js → dump-config-DCQrFN8g.js} +3 -3
  23. package/node_modules/@deepseek-ai/dsh/lib/dump-config-ekMiCsuS.js +2 -0
  24. package/node_modules/@deepseek-ai/dsh/lib/{dump-config-schema-r4V15-lg.js → dump-config-schema-C_NhxM7L.js} +2 -2
  25. package/node_modules/@deepseek-ai/dsh/lib/{plugin-DscIHF4k.js → plugin-cQMw2oZz.js} +4 -4
  26. package/node_modules/@deepseek-ai/dsh/lib/profile-boot.js +1 -1
  27. package/node_modules/@deepseek-ai/dsh/package.json +127 -127
  28. package/node_modules/@deepseek-ai/dsh-acp/lib/index.js +1 -1
  29. package/node_modules/@deepseek-ai/dsh-acp/package.json +26 -26
  30. package/node_modules/@deepseek-ai/dsh-acp-app/package.json +6 -6
  31. package/node_modules/@deepseek-ai/dsh-action-cards/README.i18n.yaml +2 -2
  32. package/node_modules/@deepseek-ai/dsh-action-cards/README.md +1 -1
  33. package/node_modules/@deepseek-ai/dsh-action-cards/README.zh.md +1 -1
  34. package/node_modules/@deepseek-ai/dsh-action-cards/lib/index.js +7 -4
  35. package/node_modules/@deepseek-ai/dsh-action-cards/lib/typert.host.js +16 -4
  36. package/node_modules/@deepseek-ai/dsh-action-cards/lib/typert.remote-client.js +1 -1
  37. package/node_modules/@deepseek-ai/dsh-action-cards/lib/types/index.js +7 -4
  38. package/node_modules/@deepseek-ai/dsh-action-cards/package.json +19 -19
  39. package/node_modules/@deepseek-ai/dsh-agent/README.i18n.yaml +2 -2
  40. package/node_modules/@deepseek-ai/dsh-agent/README.md +1 -1
  41. package/node_modules/@deepseek-ai/dsh-agent/README.zh.md +1 -1
  42. package/node_modules/@deepseek-ai/dsh-agent/lib/index.js +5 -30
  43. package/node_modules/@deepseek-ai/dsh-agent/lib/types/index.js +5 -32
  44. package/node_modules/@deepseek-ai/dsh-agent/package.json +21 -21
  45. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +10 -10
  46. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +28 -28
  47. package/node_modules/@deepseek-ai/dsh-agent-loop/README.i18n.yaml +2 -2
  48. package/node_modules/@deepseek-ai/dsh-agent-loop/README.md +1 -1
  49. package/node_modules/@deepseek-ai/dsh-agent-loop/README.zh.md +1 -1
  50. package/node_modules/@deepseek-ai/dsh-agent-loop/lib/index.js +5 -7
  51. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +27 -27
  52. package/node_modules/@deepseek-ai/dsh-agent-preset/package.json +13 -13
  53. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +12 -8
  54. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/index.js +1 -1
  55. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.host.js +15 -3
  56. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/types/mount.js +1 -1
  57. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/package.json +39 -39
  58. package/node_modules/@deepseek-ai/dsh-agent-team/README.i18n.yaml +97 -0
  59. package/node_modules/@deepseek-ai/dsh-agent-team/README.md +217 -0
  60. package/node_modules/@deepseek-ai/dsh-agent-team/README.zh.md +217 -0
  61. package/node_modules/@deepseek-ai/dsh-agent-team/lib/index.js +824 -0
  62. package/node_modules/@deepseek-ai/dsh-agent-team/lib/typert.host.js +825 -0
  63. package/node_modules/@deepseek-ai/dsh-agent-team/lib/typert.remote-client.js +79 -0
  64. package/node_modules/@deepseek-ai/dsh-agent-team/lib/types/client.js +3 -0
  65. package/node_modules/@deepseek-ai/dsh-agent-team/lib/types/error.js +10 -0
  66. package/node_modules/@deepseek-ai/dsh-agent-team/lib/types/index.js +176 -0
  67. package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/journal.js +17 -16
  68. package/node_modules/@deepseek-ai/dsh-agent-team/lib/types/projection.js +172 -0
  69. package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/task-board.js +47 -25
  70. package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/task-view.js +4 -10
  71. package/node_modules/@deepseek-ai/dsh-agent-team/locale/en.json +6 -0
  72. package/node_modules/@deepseek-ai/dsh-agent-team/locale/ja.json +6 -0
  73. package/node_modules/@deepseek-ai/dsh-agent-team/locale/zh.json +6 -0
  74. package/node_modules/@deepseek-ai/dsh-agent-team/package.json +83 -0
  75. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +13 -13
  76. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +7 -7
  77. package/node_modules/@deepseek-ai/dsh-api-account-controller/package.json +9 -9
  78. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/package.json +14 -14
  79. package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +14 -14
  80. package/node_modules/@deepseek-ai/dsh-api-job-controller/package.json +12 -12
  81. package/node_modules/@deepseek-ai/dsh-api-remote-access/package.json +9 -9
  82. package/node_modules/@deepseek-ai/dsh-api-remotes/README.i18n.yaml +4 -4
  83. package/node_modules/@deepseek-ai/dsh-api-remotes/README.md +2 -2
  84. package/node_modules/@deepseek-ai/dsh-api-remotes/README.zh.md +2 -2
  85. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +1048 -558
  86. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/index.js +4 -0
  87. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/client/index.js +8 -3
  88. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/remote-events.js +1 -0
  89. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +49 -46
  90. package/node_modules/@deepseek-ai/dsh-api-session-controller/README.i18n.yaml +4 -4
  91. package/node_modules/@deepseek-ai/dsh-api-session-controller/README.md +4 -4
  92. package/node_modules/@deepseek-ai/dsh-api-session-controller/README.zh.md +4 -4
  93. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +16 -48
  94. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +46 -44
  95. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +252 -264
  96. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +209 -245
  97. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.js +10 -19
  98. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/archived-session-gate.js +6 -3
  99. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/manager.js +8 -32
  100. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/session.js +4 -21
  101. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.js +2 -2
  102. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/control.js +3 -3
  103. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/controller.js +2 -2
  104. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/listener.js +7 -7
  105. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +2 -2
  106. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.js +14 -7
  107. package/node_modules/@deepseek-ai/dsh-api-session-controller/package.json +77 -77
  108. package/node_modules/@deepseek-ai/dsh-api-settings-controller/package.json +16 -16
  109. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +15 -3
  110. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/package.json +22 -22
  111. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/package.json +21 -21
  112. package/node_modules/@deepseek-ai/dsh-api-workspace-files/package.json +15 -15
  113. package/node_modules/@deepseek-ai/dsh-app-boot/README.i18n.yaml +2 -2
  114. package/node_modules/@deepseek-ai/dsh-app-boot/README.md +2 -0
  115. package/node_modules/@deepseek-ai/dsh-app-boot/README.zh.md +2 -0
  116. package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +841 -145
  117. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +19 -19
  118. package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +3 -3
  119. package/node_modules/@deepseek-ai/dsh-attachment/package.json +5 -5
  120. package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +9 -9
  121. package/node_modules/@deepseek-ai/dsh-authorization/package.json +7 -7
  122. package/node_modules/@deepseek-ai/dsh-base/README.i18n.yaml +2 -2
  123. package/node_modules/@deepseek-ai/dsh-base/README.md +2 -0
  124. package/node_modules/@deepseek-ai/dsh-base/README.zh.md +2 -0
  125. package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +29 -15
  126. package/node_modules/@deepseek-ai/dsh-base/package.json +103 -101
  127. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +11 -11
  128. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +14 -14
  129. package/node_modules/@deepseek-ai/dsh-brand/package.json +3 -3
  130. package/node_modules/@deepseek-ai/dsh-chunked-list/package.json +3 -3
  131. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +13 -13
  132. package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +15 -3
  133. package/node_modules/@deepseek-ai/dsh-client-file-upload/package.json +12 -12
  134. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +7 -7
  135. package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +16 -0
  136. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +10 -10
  137. package/node_modules/@deepseek-ai/dsh-client-modules/README.i18n.yaml +2 -2
  138. package/node_modules/@deepseek-ai/dsh-client-modules/README.md +1 -1
  139. package/node_modules/@deepseek-ai/dsh-client-modules/README.zh.md +1 -1
  140. package/node_modules/@deepseek-ai/dsh-client-modules/lib/client.js +5 -1
  141. package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +1 -1
  142. package/node_modules/@deepseek-ai/dsh-client-modules/package.json +6 -6
  143. package/node_modules/@deepseek-ai/dsh-client-product-analytics/package.json +16 -16
  144. package/node_modules/@deepseek-ai/dsh-client-resources/package.json +5 -5
  145. package/node_modules/@deepseek-ai/dsh-client-shortcuts/package.json +9 -9
  146. package/node_modules/@deepseek-ai/dsh-client-ui-action-cards/lib/client.js +1 -1
  147. package/node_modules/@deepseek-ai/dsh-client-ui-action-cards/package.json +15 -15
  148. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
  149. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +17 -17
  150. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/README.i18n.yaml +40 -0
  151. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/README.md +100 -0
  152. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/README.zh.md +100 -0
  153. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/lib/client.js +1425 -0
  154. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/locale/en.json +6 -0
  155. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/locale/ja.json +6 -0
  156. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/locale/zh.json +6 -0
  157. package/node_modules/@deepseek-ai/dsh-client-ui-agent-team/package.json +72 -0
  158. package/node_modules/@deepseek-ai/dsh-client-ui-approval/package.json +13 -13
  159. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +12 -12
  160. package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/package.json +5 -5
  161. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.i18n.yaml +4 -4
  162. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.md +3 -1
  163. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.zh.md +3 -1
  164. package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +74 -7
  165. package/node_modules/@deepseek-ai/dsh-client-ui-chat/package.json +40 -40
  166. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +14 -14
  167. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/package.json +10 -10
  168. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.i18n.yaml +4 -4
  169. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.md +5 -4
  170. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.zh.md +5 -4
  171. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +56 -48
  172. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +35 -35
  173. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +13 -13
  174. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/README.i18n.yaml +8 -8
  175. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/README.md +4 -4
  176. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/README.zh.md +4 -4
  177. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/lib/client.js +24 -61
  178. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/de.json +1 -1
  179. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/en.json +1 -1
  180. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/es.json +1 -1
  181. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/fr.json +1 -1
  182. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/ja.json +1 -1
  183. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/pt.json +1 -1
  184. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/ru.json +1 -1
  185. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/locale/zh.json +1 -1
  186. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/package.json +11 -11
  187. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +28 -28
  188. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +7 -7
  189. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +6 -6
  190. package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/README.i18n.yaml +6 -6
  191. package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/README.md +5 -5
  192. package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/README.zh.md +5 -5
  193. package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/lib/client.js +73 -21
  194. package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/package.json +11 -11
  195. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/package.json +10 -10
  196. package/node_modules/@deepseek-ai/dsh-client-ui-file-drag/package.json +7 -7
  197. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +14 -14
  198. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +11 -11
  199. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.i18n.yaml +4 -4
  200. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.md +5 -1
  201. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/README.zh.md +5 -1
  202. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +185 -89
  203. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +10 -10
  204. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +9 -9
  205. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +15 -15
  206. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.i18n.yaml +8 -8
  207. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.md +5 -3
  208. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.zh.md +5 -3
  209. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +106 -111
  210. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +16 -16
  211. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/package.json +25 -25
  212. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +14 -14
  213. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +19 -19
  214. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.i18n.yaml +4 -4
  215. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.md +3 -3
  216. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.zh.md +3 -3
  217. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +4 -6
  218. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/package.json +18 -18
  219. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/package.json +12 -12
  220. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-recommendations/package.json +13 -13
  221. package/node_modules/@deepseek-ai/dsh-client-ui-reference/package.json +16 -16
  222. package/node_modules/@deepseek-ai/dsh-client-ui-renderer/README.i18n.yaml +4 -4
  223. package/node_modules/@deepseek-ai/dsh-client-ui-renderer/README.md +2 -2
  224. package/node_modules/@deepseek-ai/dsh-client-ui-renderer/README.zh.md +2 -2
  225. package/node_modules/@deepseek-ai/dsh-client-ui-renderer/package.json +3 -3
  226. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.i18n.yaml +8 -8
  227. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.md +12 -8
  228. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.zh.md +12 -8
  229. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +4002 -400
  230. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/package.json +21 -21
  231. package/node_modules/@deepseek-ai/dsh-client-ui-secret-mask/package.json +6 -6
  232. package/node_modules/@deepseek-ai/dsh-client-ui-session/package.json +9 -9
  233. package/node_modules/@deepseek-ai/dsh-client-ui-settings/README.i18n.yaml +4 -4
  234. package/node_modules/@deepseek-ai/dsh-client-ui-settings/README.md +3 -0
  235. package/node_modules/@deepseek-ai/dsh-client-ui-settings/README.zh.md +3 -0
  236. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +7 -7
  237. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2 -2
  238. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/package.json +17 -17
  239. package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/package.json +8 -8
  240. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.i18n.yaml +4 -4
  241. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.md +3 -1
  242. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.zh.md +3 -1
  243. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +469 -41
  244. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +17 -17
  245. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +11 -11
  246. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +11 -11
  247. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +7 -7
  248. package/node_modules/@deepseek-ai/dsh-client-ui-settings-session-log/package.json +8 -8
  249. package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/package.json +8 -8
  250. package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/package.json +7 -7
  251. package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/package.json +8 -8
  252. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.i18n.yaml +12 -12
  253. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.md +15 -10
  254. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.zh.md +15 -10
  255. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/lib/client.js +773 -335
  256. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/de.json +2 -2
  257. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/es.json +2 -2
  258. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/fr.json +2 -2
  259. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/ja.json +2 -2
  260. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/pt.json +2 -2
  261. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/ru.json +2 -2
  262. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/locale/zh.json +2 -2
  263. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/package.json +10 -9
  264. package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/package.json +9 -9
  265. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.i18n.yaml +8 -8
  266. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.md +11 -6
  267. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.zh.md +11 -6
  268. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +269 -111
  269. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +11 -11
  270. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/package.json +10 -10
  271. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.i18n.yaml +2 -2
  272. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.md +1 -1
  273. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.zh.md +1 -1
  274. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +1 -1
  275. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/package.json +21 -21
  276. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/package.json +14 -14
  277. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/package.json +15 -15
  278. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/package.json +14 -14
  279. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +16 -16
  280. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.i18n.yaml +12 -12
  281. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.md +16 -8
  282. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/README.zh.md +16 -8
  283. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +310 -150
  284. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +18 -17
  285. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +12 -12
  286. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.i18n.yaml +4 -4
  287. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.md +4 -2
  288. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.zh.md +4 -2
  289. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +128 -50
  290. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +31 -31
  291. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +20 -20
  292. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +22 -22
  293. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +13 -13
  294. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.i18n.yaml +2 -2
  295. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.md +6 -2
  296. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.zh.md +6 -2
  297. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +44 -37
  298. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +26 -26
  299. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +6 -6
  300. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +12 -12
  301. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +15 -15
  302. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +14 -14
  303. package/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +15 -3
  304. package/node_modules/@deepseek-ai/dsh-commands/package.json +18 -18
  305. package/node_modules/@deepseek-ai/dsh-compaction/package.json +11 -11
  306. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +27 -27
  307. package/node_modules/@deepseek-ai/dsh-compaction-image-offload/package.json +18 -18
  308. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +17 -17
  309. package/node_modules/@deepseek-ai/dsh-computer-use/README.i18n.yaml +37 -0
  310. package/node_modules/@deepseek-ai/dsh-computer-use/README.md +90 -0
  311. package/node_modules/@deepseek-ai/dsh-computer-use/README.zh.md +90 -0
  312. package/node_modules/@deepseek-ai/dsh-computer-use/lib/index.js +35 -0
  313. package/node_modules/@deepseek-ai/dsh-computer-use/lib/types/brand.js +10 -0
  314. package/node_modules/@deepseek-ai/dsh-computer-use/lib/types/index.js +36 -0
  315. package/node_modules/@deepseek-ai/dsh-computer-use/locale/de.json +6 -0
  316. package/node_modules/@deepseek-ai/dsh-computer-use/locale/en.json +6 -0
  317. package/node_modules/@deepseek-ai/dsh-computer-use/locale/es.json +6 -0
  318. package/node_modules/@deepseek-ai/dsh-computer-use/locale/fr.json +6 -0
  319. package/node_modules/@deepseek-ai/dsh-computer-use/locale/ja.json +6 -0
  320. package/node_modules/@deepseek-ai/dsh-computer-use/locale/pt.json +6 -0
  321. package/node_modules/@deepseek-ai/dsh-computer-use/locale/ru.json +6 -0
  322. package/node_modules/@deepseek-ai/dsh-computer-use/locale/zh.json +6 -0
  323. package/node_modules/@deepseek-ai/dsh-computer-use/package.json +44 -0
  324. package/node_modules/@deepseek-ai/dsh-config-editor/package.json +12 -12
  325. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +230 -62
  326. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +10 -10
  327. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +30 -6
  328. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +23 -23
  329. package/node_modules/@deepseek-ai/dsh-creation-recommendations/README.i18n.yaml +6 -6
  330. package/node_modules/@deepseek-ai/dsh-creation-recommendations/README.md +5 -3
  331. package/node_modules/@deepseek-ai/dsh-creation-recommendations/README.zh.md +5 -3
  332. package/node_modules/@deepseek-ai/dsh-creation-recommendations/lib/index.js +75 -77
  333. package/node_modules/@deepseek-ai/dsh-creation-recommendations/lib/types/index.js +59 -54
  334. package/node_modules/@deepseek-ai/dsh-creation-recommendations/package.json +21 -21
  335. package/node_modules/@deepseek-ai/dsh-credentials/package.json +4 -4
  336. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +12 -12
  337. package/node_modules/@deepseek-ai/dsh-cua/README.i18n.yaml +49 -0
  338. package/node_modules/@deepseek-ai/dsh-cua/README.md +132 -0
  339. package/node_modules/@deepseek-ai/dsh-cua/README.zh.md +132 -0
  340. package/node_modules/@deepseek-ai/dsh-cua/lib/api.js +597 -0
  341. package/node_modules/@deepseek-ai/dsh-cua/lib/bridge.js +611 -0
  342. package/node_modules/@deepseek-ai/dsh-cua/lib/client.js +1803 -0
  343. package/node_modules/@deepseek-ai/dsh-cua/lib/index.js +1922 -0
  344. package/node_modules/@deepseek-ai/dsh-cua/lib/native-client.js +285 -0
  345. package/node_modules/@deepseek-ai/dsh-cua/lib/protocol.js +305 -0
  346. package/node_modules/@deepseek-ai/dsh-cua/lib/remote-types.js +1 -0
  347. package/node_modules/@deepseek-ai/dsh-cua/lib/typert.host.js +458 -0
  348. package/node_modules/@deepseek-ai/dsh-cua/lib/typert.remote-client.js +343 -0
  349. package/node_modules/@deepseek-ai/dsh-cua/locale/de.json +6 -0
  350. package/node_modules/@deepseek-ai/dsh-cua/locale/en.json +6 -0
  351. package/node_modules/@deepseek-ai/dsh-cua/locale/es.json +6 -0
  352. package/node_modules/@deepseek-ai/dsh-cua/locale/fr.json +6 -0
  353. package/node_modules/@deepseek-ai/dsh-cua/locale/ja.json +6 -0
  354. package/node_modules/@deepseek-ai/dsh-cua/locale/pt.json +6 -0
  355. package/node_modules/@deepseek-ai/dsh-cua/locale/ru.json +6 -0
  356. package/node_modules/@deepseek-ai/dsh-cua/locale/zh.json +6 -0
  357. package/node_modules/@deepseek-ai/dsh-cua/package.json +151 -0
  358. package/node_modules/@deepseek-ai/dsh-cua-bundle/README.i18n.yaml +46 -0
  359. package/node_modules/@deepseek-ai/dsh-cua-bundle/README.md +94 -0
  360. package/node_modules/@deepseek-ai/dsh-cua-bundle/README.zh.md +94 -0
  361. package/node_modules/@deepseek-ai/dsh-cua-bundle/cordis.patch.yml +10 -0
  362. package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/DETAIL.md +1 -0
  363. package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/DETAIL.zh.md +1 -0
  364. package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/preview.svg +33 -0
  365. package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/preview.zh.svg +33 -0
  366. package/node_modules/@deepseek-ai/dsh-cua-bundle/icon.svg +35 -0
  367. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/de.json +7 -0
  368. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/en.json +7 -0
  369. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/es.json +7 -0
  370. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/fr.json +7 -0
  371. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/ja.json +7 -0
  372. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/pt.json +7 -0
  373. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/ru.json +7 -0
  374. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/zh.json +7 -0
  375. package/node_modules/@deepseek-ai/{dsh-experimental-agent-team-profile → dsh-cua-bundle}/package.json +15 -12
  376. package/node_modules/@deepseek-ai/dsh-deepseek-account/package.json +11 -11
  377. package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/package.json +12 -12
  378. package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/package.json +3 -3
  379. package/node_modules/@deepseek-ai/dsh-deliverable-file-references/package.json +5 -5
  380. package/node_modules/@deepseek-ai/dsh-deque/package.json +3 -3
  381. package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/package.json +8 -8
  382. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/package.json +46 -46
  383. package/node_modules/@deepseek-ai/dsh-experimental-badge-skill-bundle/package.json +4 -4
  384. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/package.json +20 -20
  385. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.i18n.yaml +2 -2
  386. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.md +2 -2
  387. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.zh.md +2 -2
  388. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/client.js +5773 -5757
  389. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/typert.host.js +15 -3
  390. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/package.json +42 -42
  391. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/package.json +19 -18
  392. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/package.json +15 -15
  393. package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/package.json +6 -6
  394. package/node_modules/@deepseek-ai/dsh-experimental-forge/package.json +6 -6
  395. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/README.i18n.yaml +10 -10
  396. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/README.md +6 -4
  397. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/README.zh.md +6 -4
  398. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/cordis.patch.yml +4 -0
  399. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.de.md +1 -0
  400. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.es.md +1 -0
  401. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.fr.md +1 -0
  402. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.ja.md +1 -0
  403. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.md +1 -0
  404. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.pt.md +1 -0
  405. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.ru.md +1 -0
  406. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/DETAIL.zh.md +1 -0
  407. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/preview.svg +28 -0
  408. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/docs/preview.zh.svg +28 -0
  409. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/de.json +2 -1
  410. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/en.json +2 -1
  411. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/es.json +2 -1
  412. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/fr.json +2 -1
  413. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/ja.json +2 -1
  414. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/pt.json +2 -1
  415. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/ru.json +2 -1
  416. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/zh.json +2 -1
  417. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/package.json +10 -8
  418. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/package.json +10 -10
  419. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/lib/index.js +11 -1
  420. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/package.json +33 -33
  421. package/node_modules/@deepseek-ai/dsh-experimental-inspector/package.json +17 -17
  422. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/package.json +7 -7
  423. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/README.i18n.yaml +8 -8
  424. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/README.md +8 -8
  425. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/README.zh.md +8 -8
  426. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/cordis.patch.yml +0 -4
  427. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/client.js +892 -501
  428. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/index.js +607 -229
  429. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/typert.host.js +45 -31
  430. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/typert.remote-client.js +33 -27
  431. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/package.json +73 -75
  432. package/node_modules/@deepseek-ai/dsh-experimental-liveshare-protocol/package.json +4 -4
  433. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/package.json +5 -5
  434. package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/package.json +5 -5
  435. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/README.i18n.yaml +2 -2
  436. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/README.md +1 -1
  437. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/README.zh.md +1 -1
  438. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/lib/client.js +6 -2
  439. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/package.json +12 -12
  440. package/node_modules/@deepseek-ai/dsh-experimental-session-search/package.json +5 -5
  441. package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/package.json +4 -4
  442. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/package.json +11 -11
  443. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/package.json +10 -10
  444. package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/package.json +6 -6
  445. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/README.i18n.yaml +4 -4
  446. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/README.md +2 -2
  447. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/README.zh.md +2 -2
  448. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/package.json +23 -23
  449. package/node_modules/@deepseek-ai/dsh-experimental-translator/package.json +29 -29
  450. package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/package.json +8 -8
  451. package/node_modules/@deepseek-ai/dsh-experimental-worktree/package.json +23 -23
  452. package/node_modules/@deepseek-ai/dsh-file-reference/package.json +5 -5
  453. package/node_modules/@deepseek-ai/dsh-file-reference-local/package.json +17 -17
  454. package/node_modules/@deepseek-ai/dsh-fs/package.json +10 -10
  455. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +8 -8
  456. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/README.i18n.yaml +2 -2
  457. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/README.md +1 -1
  458. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/README.zh.md +1 -1
  459. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +6 -6
  460. package/node_modules/@deepseek-ai/dsh-fs-patch/package.json +3 -3
  461. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +12 -12
  462. package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +15 -3
  463. package/node_modules/@deepseek-ai/dsh-goal/package.json +23 -23
  464. package/node_modules/@deepseek-ai/dsh-goal-round-driver/README.i18n.yaml +2 -2
  465. package/node_modules/@deepseek-ai/dsh-goal-round-driver/README.md +1 -1
  466. package/node_modules/@deepseek-ai/dsh-goal-round-driver/README.zh.md +1 -1
  467. package/node_modules/@deepseek-ai/dsh-goal-round-driver/lib/index.js +5 -1
  468. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +17 -17
  469. package/node_modules/@deepseek-ai/dsh-harness-dev-context/package.json +13 -13
  470. package/node_modules/@deepseek-ai/dsh-headless/README.i18n.yaml +2 -2
  471. package/node_modules/@deepseek-ai/dsh-headless/README.md +2 -0
  472. package/node_modules/@deepseek-ai/dsh-headless/README.zh.md +2 -0
  473. package/node_modules/@deepseek-ai/dsh-headless/lib/index.js +1 -1
  474. package/node_modules/@deepseek-ai/dsh-headless/package.json +30 -30
  475. package/node_modules/@deepseek-ai/dsh-hmr/lib/index.js +5 -1
  476. package/node_modules/@deepseek-ai/dsh-hmr/package.json +15 -15
  477. package/node_modules/@deepseek-ai/dsh-home-paths/package.json +3 -3
  478. package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +3 -3
  479. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/README.i18n.yaml +2 -2
  480. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/README.md +1 -1
  481. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/README.zh.md +1 -1
  482. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +20 -20
  483. package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +5 -5
  484. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +5 -5
  485. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +10 -10
  486. package/node_modules/@deepseek-ai/dsh-host-open-in-app/package.json +9 -9
  487. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/typert.host.js +2 -2
  488. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/typert.remote-client.js +2 -2
  489. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +13 -13
  490. package/node_modules/@deepseek-ai/dsh-host-product-telemetry-otel/package.json +8 -8
  491. package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +5 -5
  492. package/node_modules/@deepseek-ai/dsh-http-proxy/README.i18n.yaml +6 -6
  493. package/node_modules/@deepseek-ai/dsh-http-proxy/README.md +4 -1
  494. package/node_modules/@deepseek-ai/dsh-http-proxy/README.zh.md +4 -1
  495. package/node_modules/@deepseek-ai/dsh-http-proxy/lib/index.js +54 -16
  496. package/node_modules/@deepseek-ai/dsh-http-proxy/package.json +3 -3
  497. package/node_modules/@deepseek-ai/dsh-jobs/package.json +11 -11
  498. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +16 -16
  499. package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +3 -3
  500. package/node_modules/@deepseek-ai/dsh-lazy-require/package.json +3 -3
  501. package/node_modules/@deepseek-ai/dsh-llm/README.i18n.yaml +2 -2
  502. package/node_modules/@deepseek-ai/dsh-llm/README.md +1 -1
  503. package/node_modules/@deepseek-ai/dsh-llm/README.zh.md +1 -1
  504. package/node_modules/@deepseek-ai/dsh-llm/lib/index.js +37 -14
  505. package/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +14 -2
  506. package/node_modules/@deepseek-ai/dsh-llm/lib/types/content.js +38 -20
  507. package/node_modules/@deepseek-ai/dsh-llm/package.json +11 -11
  508. package/node_modules/@deepseek-ai/dsh-llm-cursor/package.json +26 -26
  509. package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.i18n.yaml +6 -6
  510. package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.md +4 -1
  511. package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.zh.md +4 -1
  512. package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +52 -2
  513. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +45 -45
  514. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/README.i18n.yaml +2 -2
  515. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/README.md +1 -1
  516. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/README.zh.md +1 -1
  517. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/lib/index.js +5 -8
  518. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/package.json +17 -17
  519. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/README.i18n.yaml +2 -2
  520. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/README.md +1 -1
  521. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/README.zh.md +1 -1
  522. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/lib/index.js +4 -10
  523. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/package.json +14 -14
  524. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.i18n.yaml +8 -8
  525. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.md +7 -2
  526. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.zh.md +7 -2
  527. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +18 -8
  528. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +28 -28
  529. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +25 -25
  530. package/node_modules/@deepseek-ai/dsh-mcp-client/README.i18n.yaml +15 -12
  531. package/node_modules/@deepseek-ai/dsh-mcp-client/README.md +29 -6
  532. package/node_modules/@deepseek-ai/dsh-mcp-client/README.zh.md +29 -6
  533. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js +870 -202
  534. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/connection.js +379 -0
  535. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/credentials.js +99 -0
  536. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/deadline.js +27 -0
  537. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/diagnostic.js +56 -0
  538. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/generation.js +111 -0
  539. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/index.js +163 -0
  540. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/probe.js +89 -0
  541. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/server-context.js +25 -0
  542. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/status.js +95 -0
  543. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/templates.js +66 -0
  544. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/tools.js +432 -0
  545. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/transport.js +39 -0
  546. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/types/types.js +7 -0
  547. package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +34 -24
  548. package/node_modules/@deepseek-ai/dsh-mcp-manager/README.i18n.yaml +64 -0
  549. package/node_modules/@deepseek-ai/dsh-mcp-manager/README.md +196 -0
  550. package/node_modules/@deepseek-ai/dsh-mcp-manager/README.zh.md +196 -0
  551. package/node_modules/@deepseek-ai/dsh-mcp-manager/lib/index.js +572 -0
  552. package/node_modules/@deepseek-ai/dsh-mcp-manager/lib/typert.host.js +323 -0
  553. package/node_modules/@deepseek-ai/dsh-mcp-manager/lib/typert.remote-client.js +170 -0
  554. package/node_modules/@deepseek-ai/dsh-mcp-manager/lib/types/index.js +582 -0
  555. package/node_modules/@deepseek-ai/dsh-mcp-manager/lib/types/types.js +8 -0
  556. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/de.json +6 -0
  557. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/en.json +6 -0
  558. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/es.json +6 -0
  559. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/fr.json +6 -0
  560. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/ja.json +6 -0
  561. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/pt.json +6 -0
  562. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/ru.json +6 -0
  563. package/node_modules/@deepseek-ai/dsh-mcp-manager/locale/zh.json +6 -0
  564. package/node_modules/@deepseek-ai/dsh-mcp-manager/package.json +77 -0
  565. package/node_modules/@deepseek-ai/dsh-mcp-resources/package.json +16 -16
  566. package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +19 -19
  567. package/node_modules/@deepseek-ai/dsh-message-quotes/lib/client.js +2 -2
  568. package/node_modules/@deepseek-ai/dsh-message-quotes/package.json +9 -9
  569. package/node_modules/@deepseek-ai/dsh-native-command/package.json +4 -4
  570. package/node_modules/@deepseek-ai/dsh-no-progress-reminder/lib/index.js +38 -15
  571. package/node_modules/@deepseek-ai/dsh-no-progress-reminder/package.json +16 -16
  572. package/node_modules/@deepseek-ai/dsh-office-to-pdf/package.json +11 -11
  573. package/node_modules/@deepseek-ai/dsh-official-bundles/README.i18n.yaml +2 -2
  574. package/node_modules/@deepseek-ai/dsh-official-bundles/README.md +1 -1
  575. package/node_modules/@deepseek-ai/dsh-official-bundles/README.zh.md +1 -1
  576. package/node_modules/@deepseek-ai/dsh-official-bundles/lib/index.js +57 -95
  577. package/node_modules/@deepseek-ai/dsh-official-bundles/package.json +4 -4
  578. package/node_modules/@deepseek-ai/dsh-otel/package.json +5 -5
  579. package/node_modules/@deepseek-ai/dsh-output-retention/package.json +3 -3
  580. package/node_modules/@deepseek-ai/dsh-package-manifest/package.json +3 -3
  581. package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +15 -3
  582. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +23 -23
  583. package/node_modules/@deepseek-ai/dsh-persona/README.i18n.yaml +2 -2
  584. package/node_modules/@deepseek-ai/dsh-persona/README.md +1 -1
  585. package/node_modules/@deepseek-ai/dsh-persona/README.zh.md +1 -1
  586. package/node_modules/@deepseek-ai/dsh-persona/package.json +7 -7
  587. package/node_modules/@deepseek-ai/dsh-personalized-recommendations/package.json +23 -23
  588. package/node_modules/@deepseek-ai/dsh-plan-mode/README.i18n.yaml +2 -2
  589. package/node_modules/@deepseek-ai/dsh-plan-mode/README.md +1 -1
  590. package/node_modules/@deepseek-ai/dsh-plan-mode/README.zh.md +1 -1
  591. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +24 -24
  592. package/node_modules/@deepseek-ai/dsh-plugin-detail/package.json +3 -3
  593. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/index.js +0 -1
  594. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.host.js +12 -12
  595. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.remote-client.js +12 -12
  596. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/index.js +0 -1
  597. package/node_modules/@deepseek-ai/dsh-plugin-manager/package.json +38 -38
  598. package/node_modules/@deepseek-ai/dsh-plugin-market/README.i18n.yaml +2 -2
  599. package/node_modules/@deepseek-ai/dsh-plugin-market/README.md +1 -1
  600. package/node_modules/@deepseek-ai/dsh-plugin-market/README.zh.md +1 -1
  601. package/node_modules/@deepseek-ai/dsh-plugin-market/lib/index.js +37 -7
  602. package/node_modules/@deepseek-ai/dsh-plugin-market/lib/types/index.js +1 -1
  603. package/node_modules/@deepseek-ai/dsh-plugin-market/lib/types/repository-cache.js +40 -7
  604. package/node_modules/@deepseek-ai/dsh-plugin-market/package.json +31 -31
  605. package/node_modules/@deepseek-ai/dsh-plugin-market-index/package.json +4 -4
  606. package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/package.json +19 -19
  607. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/README.i18n.yaml +2 -2
  608. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/README.md +1 -1
  609. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/README.zh.md +1 -1
  610. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/lib/index.js +2 -2
  611. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/lib/typert.host.js +15 -3
  612. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/lib/types/index.js +2 -2
  613. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/package.json +17 -17
  614. package/node_modules/@deepseek-ai/dsh-ptc-runtime/package.json +5 -5
  615. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.i18n.yaml +11 -8
  616. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.md +21 -1
  617. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.zh.md +22 -2
  618. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/index.js +2 -3
  619. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/persistent-process.js +428 -31
  620. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/process.js +423 -28
  621. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/package.json +23 -23
  622. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +11 -11
  623. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +14 -14
  624. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/lib/index.js +39 -16
  625. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +12 -12
  626. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +8 -8
  627. package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/package.json +26 -26
  628. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +12 -12
  629. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +14 -14
  630. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +14 -14
  631. package/node_modules/@deepseek-ai/dsh-schedule/package.json +40 -40
  632. package/node_modules/@deepseek-ai/dsh-scope/package.json +3 -3
  633. package/node_modules/@deepseek-ai/dsh-sdk-app/package.json +19 -19
  634. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.i18n.yaml +4 -4
  635. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.md +3 -3
  636. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.zh.md +3 -3
  637. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/lib/index.js +21 -18
  638. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/package.json +48 -48
  639. package/node_modules/@deepseek-ai/dsh-sdk-minimal/package.json +39 -39
  640. package/node_modules/@deepseek-ai/dsh-sdk-protocol/package.json +13 -13
  641. package/node_modules/@deepseek-ai/dsh-session/lib/index.js +1 -0
  642. package/node_modules/@deepseek-ai/dsh-session/lib/types/known-event-types.js +1 -0
  643. package/node_modules/@deepseek-ai/dsh-session/package.json +10 -10
  644. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +19 -19
  645. package/node_modules/@deepseek-ai/dsh-session-format/package.json +4 -4
  646. package/node_modules/@deepseek-ai/dsh-session-format-catalog/package.json +11 -11
  647. package/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/lib/index.js +36 -13
  648. package/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/package.json +7 -7
  649. package/node_modules/@deepseek-ai/dsh-session-format-v1-to-v2/package.json +8 -8
  650. package/node_modules/@deepseek-ai/dsh-session-format-v2-to-v3/package.json +6 -6
  651. package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/package.json +5 -5
  652. package/node_modules/@deepseek-ai/dsh-session-log-deepseek/package.json +18 -18
  653. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +24 -24
  654. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +11 -11
  655. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +76 -29
  656. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +13 -13
  657. package/node_modules/@deepseek-ai/dsh-session-projection/README.i18n.yaml +12 -12
  658. package/node_modules/@deepseek-ai/dsh-session-projection/README.md +10 -6
  659. package/node_modules/@deepseek-ai/dsh-session-projection/README.zh.md +10 -6
  660. package/node_modules/@deepseek-ai/dsh-session-projection/lib/index.js +107 -42
  661. package/node_modules/@deepseek-ai/dsh-session-projection/lib/types/index.js +128 -47
  662. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +6 -6
  663. package/node_modules/@deepseek-ai/dsh-session-projection-cache/README.i18n.yaml +2 -2
  664. package/node_modules/@deepseek-ai/dsh-session-projection-cache/README.md +1 -1
  665. package/node_modules/@deepseek-ai/dsh-session-projection-cache/README.zh.md +1 -1
  666. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +13 -13
  667. package/node_modules/@deepseek-ai/dsh-session-query/package.json +20 -20
  668. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +13 -13
  669. package/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +15 -3
  670. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +41 -41
  671. package/node_modules/@deepseek-ai/dsh-session-stats/package.json +11 -11
  672. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +7 -7
  673. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +25 -25
  674. package/node_modules/@deepseek-ai/dsh-session-title/package.json +17 -17
  675. package/node_modules/@deepseek-ai/dsh-session-title-all-prompts-llm/package.json +15 -15
  676. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +20 -20
  677. package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +13 -13
  678. package/node_modules/@deepseek-ai/dsh-session-turn-outline/package.json +11 -11
  679. package/node_modules/@deepseek-ai/dsh-settings/package.json +17 -17
  680. package/node_modules/@deepseek-ai/dsh-shell/package.json +7 -7
  681. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +14 -14
  682. package/node_modules/@deepseek-ai/dsh-skill/package.json +9 -9
  683. package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +5 -5
  684. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +10 -10
  685. package/node_modules/@deepseek-ai/dsh-skill-office/package.json +10 -10
  686. package/node_modules/@deepseek-ai/dsh-spill/package.json +9 -9
  687. package/node_modules/@deepseek-ai/dsh-spill-local/package.json +11 -11
  688. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +35 -35
  689. package/node_modules/@deepseek-ai/dsh-storage/package.json +3 -3
  690. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +6 -6
  691. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +6 -6
  692. package/node_modules/@deepseek-ai/dsh-subagent/README.i18n.yaml +39 -24
  693. package/node_modules/@deepseek-ai/dsh-subagent/README.md +41 -20
  694. package/node_modules/@deepseek-ai/dsh-subagent/README.zh.md +41 -20
  695. package/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +574 -873
  696. package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +64 -120
  697. package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.remote-client.js +17 -63
  698. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/activation.js +1 -1
  699. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/archive-admission.js +39 -115
  700. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/child-agent.js +6 -4
  701. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/continuation-messages.js +12 -14
  702. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/control.js +1 -5
  703. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/descriptor.js +1 -1
  704. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/index.js +83 -146
  705. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/lifecycle.js +5 -31
  706. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/manager.js +396 -570
  707. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/structured.js +2 -2
  708. package/node_modules/@deepseek-ai/dsh-subagent/lib/types/types.js +2 -4
  709. package/node_modules/@deepseek-ai/dsh-subagent/package.json +51 -55
  710. package/node_modules/@deepseek-ai/dsh-subagent-acp/package.json +24 -24
  711. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +15 -15
  712. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/README.i18n.yaml +2 -2
  713. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/README.md +1 -1
  714. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/README.zh.md +1 -1
  715. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +19 -19
  716. package/node_modules/@deepseek-ai/dsh-subprocess/package.json +6 -6
  717. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +9 -9
  718. package/node_modules/@deepseek-ai/dsh-system-prompt/lib/index.js +0 -1
  719. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +8 -8
  720. package/node_modules/@deepseek-ai/dsh-terminal/package.json +8 -8
  721. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +22 -22
  722. package/node_modules/@deepseek-ai/dsh-time-context/package.json +23 -23
  723. package/node_modules/@deepseek-ai/dsh-timeout/package.json +3 -3
  724. package/node_modules/@deepseek-ai/dsh-tmux-context/lib/index.js +38 -15
  725. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +14 -14
  726. package/node_modules/@deepseek-ai/dsh-token-meter/lib/index.js +4 -2
  727. package/node_modules/@deepseek-ai/dsh-token-meter/lib/types/breakdown-projection.js +1 -0
  728. package/node_modules/@deepseek-ai/dsh-token-meter/lib/types/usage-projection.js +1 -0
  729. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +17 -17
  730. package/node_modules/@deepseek-ai/dsh-tool-agent-team/README.i18n.yaml +85 -0
  731. package/node_modules/@deepseek-ai/dsh-tool-agent-team/README.md +178 -0
  732. package/node_modules/@deepseek-ai/dsh-tool-agent-team/README.zh.md +178 -0
  733. package/node_modules/@deepseek-ai/dsh-tool-agent-team/lib/index.js +308 -0
  734. package/node_modules/@deepseek-ai/dsh-tool-agent-team/locale/en.json +6 -0
  735. package/node_modules/@deepseek-ai/dsh-tool-agent-team/locale/ja.json +6 -0
  736. package/node_modules/@deepseek-ai/dsh-tool-agent-team/locale/zh.json +6 -0
  737. package/node_modules/@deepseek-ai/dsh-tool-agent-team/package.json +63 -0
  738. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +13 -13
  739. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +37 -37
  740. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +27 -27
  741. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +10 -10
  742. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +230 -184
  743. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +17 -17
  744. package/node_modules/@deepseek-ai/dsh-tool-executor-native/package.json +5 -5
  745. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/package.json +28 -28
  746. package/node_modules/@deepseek-ai/dsh-tool-fs/README.i18n.yaml +4 -4
  747. package/node_modules/@deepseek-ai/dsh-tool-fs/README.md +7 -7
  748. package/node_modules/@deepseek-ai/dsh-tool-fs/README.zh.md +7 -7
  749. package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +5 -5
  750. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +39 -39
  751. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +31 -31
  752. package/node_modules/@deepseek-ai/dsh-tool-goal/README.i18n.yaml +2 -2
  753. package/node_modules/@deepseek-ai/dsh-tool-goal/README.md +1 -1
  754. package/node_modules/@deepseek-ai/dsh-tool-goal/README.zh.md +1 -1
  755. package/node_modules/@deepseek-ai/dsh-tool-goal/lib/index.js +1 -1
  756. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +20 -20
  757. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +19 -19
  758. package/node_modules/@deepseek-ai/dsh-tool-present/package.json +21 -21
  759. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +35 -35
  760. package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/package.json +28 -28
  761. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +24 -24
  762. package/node_modules/@deepseek-ai/dsh-tool-schedule/package.json +19 -19
  763. package/node_modules/@deepseek-ai/dsh-tool-session-query/package.json +27 -27
  764. package/node_modules/@deepseek-ai/dsh-tool-skill/lib/index.js +1 -0
  765. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +18 -18
  766. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +23 -23
  767. package/node_modules/@deepseek-ai/dsh-tool-subagent/README.i18n.yaml +19 -19
  768. package/node_modules/@deepseek-ai/dsh-tool-subagent/README.md +15 -13
  769. package/node_modules/@deepseek-ai/dsh-tool-subagent/README.zh.md +14 -12
  770. package/node_modules/@deepseek-ai/dsh-tool-subagent/lib/index.js +40 -43
  771. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +25 -25
  772. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.i18n.yaml +53 -38
  773. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.md +41 -21
  774. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/README.zh.md +41 -21
  775. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/lib/index.js +235 -98
  776. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +25 -22
  777. package/node_modules/@deepseek-ai/dsh-tool-terminal/package.json +32 -32
  778. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +19 -19
  779. package/node_modules/@deepseek-ai/dsh-tool-web/README.i18n.yaml +6 -6
  780. package/node_modules/@deepseek-ai/dsh-tool-web/README.md +5 -4
  781. package/node_modules/@deepseek-ai/dsh-tool-web/README.zh.md +5 -4
  782. package/node_modules/@deepseek-ai/dsh-tool-web/lib/index.js +4 -4
  783. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +25 -24
  784. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +24 -24
  785. package/node_modules/@deepseek-ai/dsh-tool-working-directory/package.json +13 -13
  786. package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/package.json +12 -12
  787. package/node_modules/@deepseek-ai/dsh-tools/package.json +20 -20
  788. package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +6 -6
  789. package/node_modules/@deepseek-ai/dsh-tui-app/README.md +10 -8
  790. package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +10 -8
  791. package/node_modules/@deepseek-ai/dsh-tui-app/cordis.patch.yml +17 -0
  792. package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +113 -99
  793. package/node_modules/@deepseek-ai/dsh-tui-app/package.json +87 -87
  794. package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +10 -10
  795. package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +4 -4
  796. package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +4 -4
  797. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +18 -18
  798. package/node_modules/@deepseek-ai/dsh-user-questions/README.i18n.yaml +2 -2
  799. package/node_modules/@deepseek-ai/dsh-user-questions/README.md +1 -1
  800. package/node_modules/@deepseek-ai/dsh-user-questions/README.zh.md +1 -1
  801. package/node_modules/@deepseek-ai/dsh-user-questions/lib/index.js +5 -6
  802. package/node_modules/@deepseek-ai/dsh-user-questions/lib/typert.host.js +16 -4
  803. package/node_modules/@deepseek-ai/dsh-user-questions/lib/types/index.js +5 -6
  804. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +18 -18
  805. package/node_modules/@deepseek-ai/dsh-util-code-language/package.json +3 -3
  806. package/node_modules/@deepseek-ai/dsh-util-crypto/package.json +3 -3
  807. package/node_modules/@deepseek-ai/dsh-util-time/package.json +3 -3
  808. package/node_modules/@deepseek-ai/dsh-util-values/package.json +3 -3
  809. package/node_modules/@deepseek-ai/dsh-util-workspace-path/package.json +3 -3
  810. package/node_modules/@deepseek-ai/dsh-web/README.i18n.yaml +18 -12
  811. package/node_modules/@deepseek-ai/dsh-web/README.md +38 -7
  812. package/node_modules/@deepseek-ai/dsh-web/README.zh.md +38 -7
  813. package/node_modules/@deepseek-ai/dsh-web/lib/index.js +220 -112
  814. package/node_modules/@deepseek-ai/dsh-web/lib/typert.host.js +178 -0
  815. package/node_modules/@deepseek-ai/dsh-web/lib/typert.remote-client.js +45 -0
  816. package/node_modules/@deepseek-ai/dsh-web/lib/types/index.js +277 -0
  817. package/node_modules/@deepseek-ai/dsh-web/lib/types/types.js +18 -0
  818. package/node_modules/@deepseek-ai/dsh-web/package.json +26 -7
  819. package/node_modules/@deepseek-ai/dsh-web-app/README.i18n.yaml +2 -2
  820. package/node_modules/@deepseek-ai/dsh-web-app/README.md +2 -0
  821. package/node_modules/@deepseek-ai/dsh-web-app/README.zh.md +2 -0
  822. package/node_modules/@deepseek-ai/dsh-web-app/cordis.patch.yml +14 -6
  823. package/node_modules/@deepseek-ai/dsh-web-app/package.json +157 -154
  824. package/node_modules/@deepseek-ai/dsh-web-app/presets/standard.patch.yml +1 -1
  825. package/node_modules/@deepseek-ai/dsh-web-deepseek-api/README.i18n.yaml +12 -12
  826. package/node_modules/@deepseek-ai/dsh-web-deepseek-api/README.md +22 -12
  827. package/node_modules/@deepseek-ai/dsh-web-deepseek-api/README.zh.md +22 -12
  828. package/node_modules/@deepseek-ai/dsh-web-deepseek-api/lib/index.js +394 -163
  829. package/node_modules/@deepseek-ai/dsh-web-deepseek-api/package.json +30 -19
  830. package/node_modules/@deepseek-ai/dsh-web-fetch-http/lib/index.js +11 -0
  831. package/node_modules/@deepseek-ai/dsh-web-fetch-http/package.json +9 -9
  832. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-B2q7cWGa.js +199 -0
  833. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-uWlUD22X.css +1 -0
  834. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{graphql-C-Uijqkk.js → graphql-DFkUqiqq.js} +2 -2
  835. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{http-CLu1VCSi.js → http-BbPA7N5Y.js} +2 -2
  836. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/php-BcJWnZHR.js +2 -0
  837. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{rst-BuDKiyD7.js → rst-CtdShwKQ.js} +2 -2
  838. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{ruby-ZtjE4NPI.js → ruby-DllPV2XI.js} +2 -2
  839. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{svelte-Tt81icjn.js → svelte-ZPgsG5h9.js} +2 -2
  840. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{vue-B5SDFeDA.js → vue-CnLRC5W9.js} +2 -2
  841. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{vendor-7utBqO4o.js → vendor-BUMdD3V7.js} +3 -3
  842. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +3 -3
  843. package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +21 -21
  844. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.i18n.yaml +8 -8
  845. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.md +6 -4
  846. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/README.zh.md +6 -4
  847. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/lib/index.js +30 -18
  848. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +20 -18
  849. package/node_modules/@deepseek-ai/dsh-win32-process/package.json +4 -4
  850. package/node_modules/@deepseek-ai/dsh-workflow/package.json +11 -11
  851. package/node_modules/@deepseek-ai/dsh-workflow-ptc/lib/index.js +11 -13
  852. package/node_modules/@deepseek-ai/dsh-workflow-ptc/package.json +39 -39
  853. package/node_modules/@deepseek-ai/dsh-working-directory/package.json +21 -21
  854. package/node_modules/@deepseek-ai/dsh-workspace/package.json +14 -14
  855. package/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +26 -26
  856. package/node_modules/@deepseek-ai/schemastery/package.json +2 -2
  857. package/package.json +346 -343
  858. package/node_modules/@deepseek-ai/dsh/lib/dump-config-DuXZcU0e.js +0 -2
  859. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.i18n.yaml +0 -100
  860. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.md +0 -227
  861. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/README.zh.md +0 -227
  862. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/index.js +0 -1650
  863. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/activity.js +0 -85
  864. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/client.js +0 -3
  865. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/error.js +0 -23
  866. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/index.js +0 -232
  867. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/lifecycle.js +0 -103
  868. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/persisted.js +0 -20
  869. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/projection.js +0 -327
  870. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/roster.js +0 -452
  871. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/lib/types/session-message.js +0 -23
  872. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/locale/en.json +0 -6
  873. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/locale/ja.json +0 -6
  874. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/locale/zh.json +0 -6
  875. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/package.json +0 -68
  876. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.i18n.yaml +0 -52
  877. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.md +0 -118
  878. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/README.zh.md +0 -118
  879. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/cordis.patch.yml +0 -29
  880. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/docs/DETAIL.md +0 -1
  881. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/docs/DETAIL.zh.md +0 -1
  882. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/docs/preview.svg +0 -1
  883. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/docs/preview.zh.svg +0 -1
  884. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/icon.svg +0 -12
  885. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/de.json +0 -7
  886. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/en.json +0 -7
  887. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/es.json +0 -7
  888. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/fr.json +0 -7
  889. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/ja.json +0 -7
  890. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/pt.json +0 -7
  891. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/ru.json +0 -7
  892. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/zh.json +0 -7
  893. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/README.i18n.yaml +0 -43
  894. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/README.md +0 -102
  895. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/README.zh.md +0 -102
  896. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/lib/client.js +0 -690
  897. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/locale/en.json +0 -6
  898. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/locale/ja.json +0 -6
  899. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/locale/zh.json +0 -6
  900. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/package.json +0 -66
  901. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/viewer-declarations-krUNq6VU.js +0 -287
  902. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/viewer-declarations.js +0 -26
  903. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.i18n.yaml +0 -70
  904. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.md +0 -155
  905. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/README.zh.md +0 -155
  906. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/lib/index.js +0 -626
  907. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/locale/en.json +0 -6
  908. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/locale/ja.json +0 -6
  909. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/locale/zh.json +0 -6
  910. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/package.json +0 -62
  911. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-BCbHmUSs.js +0 -197
  912. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-BUDGJY4R.css +0 -1
  913. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/php-CjQPq1Mz.js +0 -2
  914. package/node_modules/@deepseek-ai/dsh-web-search-exa/README.i18n.yaml +0 -61
  915. package/node_modules/@deepseek-ai/dsh-web-search-exa/README.md +0 -142
  916. package/node_modules/@deepseek-ai/dsh-web-search-exa/README.zh.md +0 -142
  917. package/node_modules/@deepseek-ai/dsh-web-search-exa/lib/index.js +0 -154
  918. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/de.json +0 -6
  919. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/en.json +0 -6
  920. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/es.json +0 -6
  921. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/fr.json +0 -6
  922. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/ja.json +0 -6
  923. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/pt.json +0 -6
  924. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/ru.json +0 -6
  925. package/node_modules/@deepseek-ai/dsh-web-search-exa/locale/zh.json +0 -6
  926. package/node_modules/@deepseek-ai/dsh-web-search-exa/package.json +0 -45
  927. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/README.i18n.yaml +0 -82
  928. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/README.md +0 -165
  929. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/README.zh.md +0 -165
  930. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/lib/index.js +0 -152
  931. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/de.json +0 -6
  932. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/en.json +0 -6
  933. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/es.json +0 -6
  934. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/fr.json +0 -6
  935. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/ja.json +0 -6
  936. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/pt.json +0 -6
  937. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/ru.json +0 -6
  938. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/locale/zh.json +0 -6
  939. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/package.json +0 -45
  940. package/node_modules/@deepseek-ai/dsh/lib/{profile-boot-e2mS45fC.js → profile-boot-xiaehH2x.js} +3 -3
  941. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/task-graph.js +0 -0
  942. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/types.js +0 -0
  943. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/lib/types/validation.js +0 -0
  944. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/locale/de.json +0 -0
  945. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/locale/es.json +0 -0
  946. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/locale/fr.json +0 -0
  947. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/locale/pt.json +0 -0
  948. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team → dsh-agent-team}/locale/ru.json +0 -0
  949. /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/lib/index.js +0 -0
  950. /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/locale/de.json +0 -0
  951. /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/locale/es.json +0 -0
  952. /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/locale/fr.json +0 -0
  953. /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/locale/pt.json +0 -0
  954. /package/node_modules/@deepseek-ai/{dsh-experimental-client-ui-agent-team → dsh-client-ui-agent-team}/locale/ru.json +0 -0
  955. /package/node_modules/@deepseek-ai/{dsh-experimental-agent-team-profile → dsh-cua-bundle}/lib/index.js +0 -0
  956. /package/node_modules/@deepseek-ai/{dsh-experimental-tool-agent-team → dsh-tool-agent-team}/locale/de.json +0 -0
  957. /package/node_modules/@deepseek-ai/{dsh-experimental-tool-agent-team → dsh-tool-agent-team}/locale/es.json +0 -0
  958. /package/node_modules/@deepseek-ai/{dsh-experimental-tool-agent-team → dsh-tool-agent-team}/locale/fr.json +0 -0
  959. /package/node_modules/@deepseek-ai/{dsh-experimental-tool-agent-team → dsh-tool-agent-team}/locale/pt.json +0 -0
  960. /package/node_modules/@deepseek-ai/{dsh-experimental-tool-agent-team → dsh-tool-agent-team}/locale/ru.json +0 -0
@@ -0,0 +1,1922 @@
1
+ import { join } from "node:path";
2
+ import { Buffer as Buffer$1 } from "node:buffer";
3
+ import { tmpdir } from "node:os";
4
+ import { withFileLock } from "@deepseek-ai/dsh-atomic-write";
5
+ import Schema from "@deepseek-ai/schemastery";
6
+ import { ComputerUseProviderName } from "@deepseek-ai/dsh-computer-use/brand";
7
+ import { admitEncodedImages } from "@deepseek-ai/dsh-attachment";
8
+ import { z } from "zod";
9
+ import { createHash, randomUUID } from "node:crypto";
10
+ import assert from "node:assert/strict";
11
+ import { realpath } from "node:fs/promises";
12
+ import { defineDomain } from "@deepseek-ai/dsh-storage-domain";
13
+ import { resolvePersistentExecution } from "@deepseek-ai/dsh-ptc-runtime-node/configuration";
14
+ import { Remote, TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
15
+ import { UserQuestionError } from "@deepseek-ai/dsh-user-questions";
16
+ import { createScope } from "@deepseek-ai/dsh-scope";
17
+ //#region lib/types/native-client.js
18
+ /** Agent-scoped JSONL requests over a connection to the shared native helper. */
19
+ const Reply = z.union([z.object({
20
+ id: z.string(),
21
+ result: z.json()
22
+ }).strict(), z.object({
23
+ id: z.string(),
24
+ error: z.object({
25
+ code: z.string().min(1),
26
+ message: z.string()
27
+ }).strict()
28
+ }).strict()]);
29
+ const screenshotPrefix = "[cua-screenshot] ";
30
+ const ScreenshotDiagnostic = z.object({
31
+ requestId: z.string(),
32
+ stage: z.string(),
33
+ elapsedMs: z.number().nonnegative(),
34
+ errorCode: z.string().optional()
35
+ });
36
+ const WireReply = z.union([Reply, ScreenshotDiagnostic.extend({ type: z.literal("diagnostic") })]);
37
+ /** Native refusal or transport failure with a stable machine-readable code. */
38
+ var NativeError = class extends Error {
39
+ code;
40
+ /**
41
+ * @param code - Native error code or a transport-owned NATIVE_* code.
42
+ * @param message - Actionable diagnostic, without its code prefix.
43
+ * @param options - Original failure when available.
44
+ */
45
+ constructor(code, message, options) {
46
+ super(`${code}: ${message}`, options);
47
+ this.code = code;
48
+ this.name = "NativeError";
49
+ }
50
+ };
51
+ /** One Agent owns this connection and its native handles; other Agents use independent connections. */
52
+ var NativeClient = class {
53
+ reportDiagnostic;
54
+ handle;
55
+ config;
56
+ chunks = [];
57
+ bufferedBytes = 0;
58
+ failure;
59
+ disposal;
60
+ diagnostics = [];
61
+ diagnosticBytes = 0;
62
+ discardedDiagnostics = false;
63
+ active;
64
+ /**
65
+ * @param owner - Managed subprocess provider.
66
+ * @param config - Executable, transport bounds and deadlines.
67
+ * @param createChannel - Platform-owned connection and process lifecycle.
68
+ * @param reportDiagnostic - Optional Host diagnostic sink; never receives captured content.
69
+ */
70
+ constructor(owner, config, createChannel, reportDiagnostic) {
71
+ this.reportDiagnostic = reportDiagnostic;
72
+ this.config = config;
73
+ this.handle = createChannel(owner, config);
74
+ this.handle.stdout.on("data", (chunk) => {
75
+ this.receive(chunk);
76
+ });
77
+ this.handle.stdout.on("error", (error) => {
78
+ this.fail(new NativeError("NATIVE_IO", `Native connection failed: ${error.message}`, { cause: error }));
79
+ });
80
+ this.handle.stdout.on("end", () => {
81
+ this.fail(new NativeError("NATIVE_EOF", "Native connection ended; acquire fresh application handles"));
82
+ });
83
+ this.handle.stdout.on("close", () => {
84
+ this.fail(new NativeError("NATIVE_EOF", "Native connection closed; acquire fresh application handles"));
85
+ });
86
+ this.handle.stdin.on("error", (error) => {
87
+ this.fail(new NativeError("NATIVE_IO", "Writing native requests failed", { cause: error }));
88
+ });
89
+ this.handle.done.then(() => {
90
+ this.fail(new NativeError("NATIVE_EXITED", "Native connection closed; acquire fresh application handles"));
91
+ }, (error) => {
92
+ this.fail(new NativeError("NATIVE_EXITED", "Native connection failed", { cause: error }));
93
+ });
94
+ }
95
+ /**
96
+ * Send one operation. Native refusals preserve this connection; transport failures invalidate its handles.
97
+ * @param method - Helper operation name.
98
+ * @param params - JSON operation parameters.
99
+ * @param signal - Cancellation stops this request; the connection survives when native cleanup acknowledges it.
100
+ * @param callId - Logged tool invocation ID, when this request belongs to a tool execution.
101
+ * @returns The validated helper result, after failure cleanup when needed.
102
+ */
103
+ async request(method, params, signal, callId) {
104
+ if (signal.aborted) throw new NativeError("NATIVE_CANCELLED", "Operation was cancelled before dispatch");
105
+ if (this.disposed) {
106
+ await this.dispose();
107
+ throw new NativeError("NATIVE_CLOSED", "Helper is closed; acquire fresh application handles", { cause: this.failure });
108
+ }
109
+ if (this.active) throw new NativeError("NATIVE_BUSY", "Await native operations sequentially");
110
+ const id = callId ?? randomUUID();
111
+ const capture = method === "screenshot";
112
+ this.diagnostics = [];
113
+ this.diagnosticBytes = 0;
114
+ this.discardedDiagnostics = false;
115
+ const started = performance.now();
116
+ let nativeFailure;
117
+ let interruption;
118
+ let cancellationTimer;
119
+ const frame = `${JSON.stringify({
120
+ id,
121
+ method,
122
+ params
123
+ })}\n`;
124
+ if (Buffer.byteLength(frame) > this.config.maxRequestBytes) throw new NativeError("NATIVE_REQUEST_LIMIT", "Request exceeded the configured byte limit before dispatch");
125
+ const outcome = Promise.withResolvers();
126
+ this.active = {
127
+ id,
128
+ resolve: outcome.resolve,
129
+ reject: (error) => {
130
+ nativeFailure = error;
131
+ outcome.reject(error);
132
+ }
133
+ };
134
+ if (capture) this.diagnostic(screenshotPrefix + JSON.stringify({
135
+ requestId: id,
136
+ stage: "host.dispatch",
137
+ elapsedMs: 0
138
+ }));
139
+ const interrupt = (error) => {
140
+ if (interruption || this.active?.id !== id) return;
141
+ interruption = error;
142
+ cancellationTimer = setTimeout(() => {
143
+ this.fail(new NativeError("NATIVE_CLEANUP", "Native operation did not acknowledge cancellation; acquire fresh application handles", { cause: error }));
144
+ }, this.config.graceMs);
145
+ try {
146
+ this.handle.stdin.write(`${JSON.stringify({
147
+ type: "cancel",
148
+ id
149
+ })}\n`, (failure) => {
150
+ if (failure) this.fail(new NativeError("NATIVE_IO", "Sending native cancellation failed", { cause: failure }));
151
+ });
152
+ } catch (failure) {
153
+ this.fail(new NativeError("NATIVE_IO", "Sending native cancellation failed", { cause: failure }));
154
+ }
155
+ };
156
+ const abort = () => {
157
+ interrupt(new NativeError("NATIVE_CANCELLED", "Operation cancelled; inspect fresh state before retrying input"));
158
+ };
159
+ signal.addEventListener("abort", abort, { once: true });
160
+ const timeoutMs = capture ? Math.min(this.config.timeoutMs, this.config.screenshotTimeoutMs) : this.config.timeoutMs;
161
+ const timer = setTimeout(() => {
162
+ interrupt(new NativeError("NATIVE_TIMEOUT", `Operation exceeded ${timeoutMs}ms`));
163
+ }, timeoutMs);
164
+ try {
165
+ try {
166
+ this.handle.stdin.write(frame, (error) => {
167
+ if (error) this.fail(new NativeError("NATIVE_IO", "Writing a helper request failed", { cause: error }));
168
+ });
169
+ } catch (error) {
170
+ this.fail(new NativeError("NATIVE_IO", "Writing a helper request failed", { cause: error }));
171
+ }
172
+ const result = await outcome.promise;
173
+ if (this.failure) throw this.failure;
174
+ if (interruption) throw interruption;
175
+ if (capture) this.diagnostic(screenshotPrefix + JSON.stringify({
176
+ requestId: id,
177
+ stage: "host.reply",
178
+ elapsedMs: performance.now() - started
179
+ }));
180
+ return result;
181
+ } catch (error) {
182
+ if (interruption && !this.failure) throw interruption;
183
+ throw error;
184
+ } finally {
185
+ clearTimeout(timer);
186
+ clearTimeout(cancellationTimer);
187
+ signal.removeEventListener("abort", abort);
188
+ try {
189
+ if (this.failure !== void 0) await this.dispose();
190
+ } finally {
191
+ if (capture) {
192
+ const diagnostics = this.screenshotDiagnostics();
193
+ const failure = this.failure ?? interruption ?? nativeFailure;
194
+ if (failure && diagnostics) failure.message += `\nScreenshot diagnostics:\n${diagnostics}`;
195
+ if (diagnostics) this.diagnostic(diagnostics);
196
+ this.diagnostic(screenshotPrefix + JSON.stringify({
197
+ requestId: id,
198
+ stage: "host.settled",
199
+ elapsedMs: performance.now() - started
200
+ }));
201
+ }
202
+ }
203
+ }
204
+ }
205
+ screenshotDiagnostics() {
206
+ const records = [...this.diagnostics];
207
+ if (this.discardedDiagnostics) records.unshift("[Earlier screenshot diagnostic records were discarded from the bounded diagnostic buffer.]");
208
+ return records.join("\n");
209
+ }
210
+ retainDiagnostic(value) {
211
+ if (value.requestId !== this.active?.id) return;
212
+ const line = screenshotPrefix + JSON.stringify(ScreenshotDiagnostic.parse(value));
213
+ this.diagnostics.push(line);
214
+ this.diagnosticBytes += Buffer.byteLength(line);
215
+ while (this.diagnosticBytes > 8192) {
216
+ const discarded = this.diagnostics.shift();
217
+ assert(discarded !== void 0, "Diagnostic bytes must belong to retained records");
218
+ this.diagnosticBytes -= Buffer.byteLength(discarded);
219
+ this.discardedDiagnostics = true;
220
+ }
221
+ }
222
+ diagnostic(message) {
223
+ try {
224
+ this.reportDiagnostic?.(message);
225
+ } catch (error) {}
226
+ }
227
+ /** Whether this Agent's connection has lost its retained native state. */
228
+ get disposed() {
229
+ return this.failure !== void 0;
230
+ }
231
+ /** Invalidate this Agent's handles and close its connection; await dispose for native cleanup. */
232
+ invalidate() {
233
+ this.fail(new NativeError("NATIVE_DISPOSED", "Helper disposed"));
234
+ }
235
+ /** Stop this Agent's pending work and await its native connection cleanup. */
236
+ dispose() {
237
+ this.invalidate();
238
+ this.disposal ??= (async () => {
239
+ try {
240
+ await this.handle.waitForClose();
241
+ } finally {
242
+ this.handle.stdout.destroy();
243
+ this.handle.stdin.destroy();
244
+ }
245
+ })();
246
+ return this.disposal;
247
+ }
248
+ fail(error) {
249
+ if (this.failure) return;
250
+ this.failure = error;
251
+ this.chunks.length = 0;
252
+ this.bufferedBytes = 0;
253
+ this.active?.reject(error);
254
+ this.active = void 0;
255
+ this.handle.close();
256
+ }
257
+ receive(chunk) {
258
+ let offset = 0;
259
+ while (offset < chunk.length && !this.failure) {
260
+ const newline = chunk.indexOf(10, offset);
261
+ const end = newline < 0 ? chunk.length : newline + 1;
262
+ const piece = chunk.subarray(offset, end);
263
+ if (this.bufferedBytes + piece.length > this.config.maxResponseBytes) {
264
+ this.fail(new NativeError("NATIVE_RESPONSE_LIMIT", "Helper response exceeded the configured byte limit"));
265
+ return;
266
+ }
267
+ this.chunks.push(piece);
268
+ this.bufferedBytes += piece.length;
269
+ if (newline >= 0) this.receiveFrame();
270
+ offset = end;
271
+ }
272
+ }
273
+ receiveFrame() {
274
+ try {
275
+ const frame = Buffer.concat(this.chunks, this.bufferedBytes);
276
+ const line = new TextDecoder("utf-8", { fatal: true }).decode(frame.subarray(0, frame.length - 1));
277
+ const reply = WireReply.parse(JSON.parse(line));
278
+ this.chunks.length = 0;
279
+ this.bufferedBytes = 0;
280
+ if ("type" in reply) {
281
+ this.retainDiagnostic(reply);
282
+ return;
283
+ }
284
+ const active = this.active;
285
+ if (!active || reply.id !== active.id) throw new Error("Helper reply has no matching request");
286
+ this.active = void 0;
287
+ if ("error" in reply) {
288
+ const error = new NativeError(reply.error.code, reply.error.message);
289
+ if (reply.error.code === "NATIVE_RESPONSE_LIMIT") this.fail(error);
290
+ active.reject(error);
291
+ } else active.resolve(reply.result);
292
+ } catch (error) {
293
+ this.fail(new NativeError("NATIVE_PROTOCOL", "Helper returned an invalid response; acquire fresh application handles", { cause: error }));
294
+ }
295
+ }
296
+ };
297
+ //#endregion
298
+ //#region lib/types/permission-store.js
299
+ /** Profile-scoped application consent over the existing domain storage service. */
300
+ const identity = z.object({
301
+ id: z.string().regex(/^[a-f0-9]{64}$/).transform((value) => value),
302
+ name: z.string(),
303
+ executablePath: z.string().min(1).optional()
304
+ });
305
+ const sessionDecision = z.object({
306
+ identity,
307
+ decision: z.enum([
308
+ "allow",
309
+ "deny",
310
+ "ask"
311
+ ]),
312
+ revision: z.number().int().nonnegative()
313
+ });
314
+ const application = z.object({
315
+ revoked: z.number().int().nonnegative(),
316
+ always: identity.optional(),
317
+ sessions: z.record(z.string(), sessionDecision)
318
+ });
319
+ const state = z.object({
320
+ migrated: z.boolean(),
321
+ applications: z.record(z.string().regex(/^[a-f0-9]{64}$/), application)
322
+ }).superRefine((value, context) => {
323
+ for (const [id, app] of Object.entries(value.applications)) if (app.always !== void 0 && app.always.id !== id || Object.values(app.sessions).some((session) => session.identity.id !== id)) context.addIssue({
324
+ code: "custom",
325
+ message: "Application identity does not match its stored key"
326
+ });
327
+ });
328
+ /**
329
+ * Open fresh domain state under a profile lock for every decision and native operation.
330
+ * Without a profile, only process-local session decisions are writable. A profile requires domain storage.
331
+ */
332
+ var CuaPermissionStore = class {
333
+ ctx;
334
+ legacy;
335
+ waitMs;
336
+ directory;
337
+ memory;
338
+ pending = /* @__PURE__ */ new Set();
339
+ tail = Promise.resolve();
340
+ /**
341
+ * @param ctx Provider context with optional profile and domain storage services.
342
+ * @param legacy Grants imported on the first access to this profile's store.
343
+ * @param waitMs Existing operation budget, also bounding profile-lock contention.
344
+ */
345
+ constructor(ctx, legacy, waitMs) {
346
+ this.ctx = ctx;
347
+ this.legacy = legacy;
348
+ this.waitMs = waitMs;
349
+ this.directory = ctx.get("profileContext")?.dir;
350
+ this.memory = this.importLegacy();
351
+ }
352
+ /** Whether this composition can retain application and session grants across restarts. */
353
+ get persistent() {
354
+ return this.directory !== void 0 && this.ctx.get("storageDomain") !== void 0;
355
+ }
356
+ /**
357
+ * Serialize a read, write, or authorized dispatch against all other users of this profile.
358
+ * @param signal Cancellation while waiting; admitted operations own their cancellation.
359
+ * @param operation Work using fresh state. Native dispatch uses its separate application lease.
360
+ * @returns The operation's result after its domain handle has closed.
361
+ */
362
+ withState(signal, operation) {
363
+ const pending = this.operate(signal, operation);
364
+ this.pending.add(pending);
365
+ pending.finally(() => {
366
+ this.pending.delete(pending);
367
+ }).catch(() => {});
368
+ return pending;
369
+ }
370
+ /**
371
+ * Coordinate native dispatch and whole-application revocation without blocking other applications.
372
+ * @param id Validated native application identity.
373
+ * @param signal Cancellation while waiting for admission.
374
+ * @param operation Authorized dispatch or revocation, after checking fresh state separately.
375
+ * @returns Result after releasing the application lease.
376
+ */
377
+ withApplication(id, signal, operation) {
378
+ const pending = (async () => {
379
+ signal.throwIfAborted();
380
+ if (this.directory === void 0) return operation();
381
+ return withFileLock(join(await realpath(this.directory), `cua-application-${id}`), operation, {
382
+ signal,
383
+ waitMs: this.waitMs
384
+ });
385
+ })();
386
+ this.pending.add(pending);
387
+ pending.finally(() => {
388
+ this.pending.delete(pending);
389
+ }).catch(() => {});
390
+ return pending;
391
+ }
392
+ /** Join accepted operations before withdrawing this provider. */
393
+ async drain() {
394
+ await Promise.allSettled(this.pending);
395
+ }
396
+ async operate(signal, operation) {
397
+ if (this.directory === void 0) {
398
+ const run = async () => {
399
+ signal.throwIfAborted();
400
+ return operation({
401
+ state: this.memory,
402
+ save: (next) => {
403
+ this.memory = next;
404
+ return Promise.resolve();
405
+ }
406
+ });
407
+ };
408
+ const pending = this.tail.then(run);
409
+ this.tail = pending.then(() => {}, () => {});
410
+ return pending;
411
+ }
412
+ const storage = this.ctx.get("storageDomain");
413
+ if (storage === void 0) throw new Error("Profile application permissions require storageDomain");
414
+ const directory = await realpath(this.directory);
415
+ const spec = defineDomain({
416
+ name: `cua_permissions_${createHash("sha256").update(directory).digest("hex")}`,
417
+ version: 1,
418
+ tables: {},
419
+ global: {
420
+ schema: state,
421
+ initial: {
422
+ migrated: false,
423
+ applications: {}
424
+ }
425
+ }
426
+ });
427
+ return withFileLock(join(directory, "cua-permissions"), async () => {
428
+ const domain = await storage.open(spec);
429
+ try {
430
+ if (!domain.global.get().migrated) await domain.global.set(this.importLegacy());
431
+ return await operation({
432
+ state: domain.global.get(),
433
+ save: (next) => domain.global.set(next)
434
+ });
435
+ } finally {
436
+ await domain.close();
437
+ }
438
+ }, {
439
+ signal,
440
+ waitMs: this.waitMs
441
+ });
442
+ }
443
+ importLegacy() {
444
+ return {
445
+ migrated: true,
446
+ applications: Object.fromEntries(this.legacy.map((grant) => [grant.id, {
447
+ revoked: 0,
448
+ always: grant,
449
+ sessions: {}
450
+ }]))
451
+ };
452
+ }
453
+ };
454
+ //#endregion
455
+ //#region lib/types/locales.js
456
+ /** Locale-owned application-access approval messages. */
457
+ /** English application-access messages. */
458
+ const en = {
459
+ question: "Allow computer use to launch, read, capture and control this application?",
460
+ detail: "Allowing or denying applies to every version and copy sharing the same application identity. Session access and denial apply only to this conversation.",
461
+ approve: "Allow for this session"
462
+ };
463
+ /** Chinese application-access messages. */
464
+ const zh = {
465
+ question: "允许 Computer Use 启动、读取、截图和控制此应用吗?",
466
+ detail: "允许或拒绝会应用于同一应用标识的所有版本和副本。会话许可和拒绝仅在当前对话中生效。",
467
+ approve: "本会话允许"
468
+ };
469
+ /** Japanese application-access messages. */
470
+ const ja = {
471
+ question: "Computer Use によるこのアプリの起動、読み取り、画面キャプチャ、操作を許可しますか?",
472
+ detail: "許可または拒否は、同じアプリ識別子を持つすべてのバージョンとコピーに適用されます。セッションの許可と拒否はこの会話にのみ適用されます。",
473
+ approve: "このセッションで許可"
474
+ };
475
+ /** Spanish dictionary, checked against the English keys. */
476
+ const es = {
477
+ question: "¿Permitir que Computer Use inicie, lea, capture y controle esta aplicación?",
478
+ detail: "Permitir o denegar se aplica a todas las versiones y copias que comparten la misma identidad de aplicación. El acceso de sesión y la denegación solo se aplican a esta conversación.",
479
+ approve: "Permitir durante esta sesión"
480
+ };
481
+ /** French dictionary, checked against the English keys. */
482
+ const fr = {
483
+ question: "Autoriser Computer Use à lancer, lire, capturer et contrôler cette application ?",
484
+ detail: "L’autorisation ou le refus s’applique à toutes les versions et copies partageant la même identité d’application. L’autorisation de session et le refus s’appliquent uniquement à cette conversation.",
485
+ approve: "Autoriser pour cette session"
486
+ };
487
+ /** German dictionary, checked against the English keys. */
488
+ const de = {
489
+ question: "Darf Computer Use diese Anwendung starten, lesen, aufnehmen und steuern?",
490
+ detail: "Erlauben oder Ablehnen gilt für alle Versionen und Kopien mit derselben Anwendungsidentität. Sitzungszugriff und Ablehnung gelten nur für diese Unterhaltung.",
491
+ approve: "Für diese Sitzung zulassen"
492
+ };
493
+ /** Russian dictionary, checked against the English keys. */
494
+ const ru = {
495
+ question: "Разрешить Computer Use запуск, чтение, захват и управление этим приложением?",
496
+ detail: "Разрешение или отказ распространяется на все версии и копии с тем же идентификатором приложения. Доступ для сеанса и отказ действуют только в этом разговоре.",
497
+ approve: "Разрешить для этого сеанса"
498
+ };
499
+ /** Portuguese dictionary, checked against the English keys. */
500
+ const pt = {
501
+ question: "Permitir que o Computer Use inicie, leia, capture e controle este aplicativo?",
502
+ detail: "Permitir ou negar se aplica a todas as versões e cópias com a mesma identidade de aplicativo. O acesso da sessão e a recusa se aplicam apenas a esta conversa.",
503
+ approve: "Permitir nesta sessão"
504
+ };
505
+ /** Display translations resolved by the Client; wire choices stay unchanged. */
506
+ const applicationAccessDisplay = {
507
+ question: {
508
+ en: en.question,
509
+ zh: zh.question,
510
+ ja: ja.question,
511
+ es: es.question,
512
+ fr: fr.question,
513
+ de: de.question,
514
+ ru: ru.question,
515
+ pt: pt.question
516
+ },
517
+ detail: {
518
+ en: en.detail,
519
+ zh: zh.detail,
520
+ ja: ja.detail,
521
+ es: es.detail,
522
+ fr: fr.detail,
523
+ de: de.detail,
524
+ ru: ru.detail,
525
+ pt: pt.detail
526
+ },
527
+ approve: {
528
+ en: en.approve,
529
+ zh: zh.approve,
530
+ ja: ja.approve,
531
+ es: es.approve,
532
+ fr: fr.approve,
533
+ de: de.approve,
534
+ ru: ru.approve,
535
+ pt: pt.approve
536
+ }
537
+ };
538
+ //#endregion
539
+ //#region lib/types/application-access.js
540
+ /** Native identity admission occurs before any application observation or input. */
541
+ const ApplicationAuthorizationResult = z.object({
542
+ id: z.string().regex(/^[a-f0-9]{64}$/).transform((value) => value),
543
+ name: z.string(),
544
+ executablePath: z.string().min(1).optional(),
545
+ persistable: z.boolean()
546
+ });
547
+ /** Owns application consent and cancels operations when saved access is removed. */
548
+ var ApplicationAccess = class {
549
+ ctx;
550
+ options;
551
+ clients = /* @__PURE__ */ new Map();
552
+ active = /* @__PURE__ */ new Set();
553
+ selections = /* @__PURE__ */ new Map();
554
+ lifetime = new AbortController();
555
+ disposal;
556
+ /** @param ctx Host context owning this provider. @param options Live saved grants and profile persistence. */
557
+ constructor(ctx, options) {
558
+ this.ctx = ctx;
559
+ this.options = options;
560
+ ctx.effect(() => () => this.dispose(), "cua-application-access.dispose");
561
+ }
562
+ /**
563
+ * Cancel consent waits and join owned operations.
564
+ * @returns Completion after consent waits and active operations settle.
565
+ */
566
+ dispose() {
567
+ return this.disposal ??= (async () => {
568
+ this.lifetime.abort();
569
+ await Promise.allSettled([this.options.store.drain(), ...[...this.active].map((operation) => operation.done.promise)]);
570
+ this.clients.clear();
571
+ })();
572
+ }
573
+ /**
574
+ * Project application decisions without requesting native permissions.
575
+ * @returns Current saved grants and refused applications for the permission page.
576
+ */
577
+ async status() {
578
+ return this.options.store.withState(this.lifetime.signal, ({ state }) => {
579
+ const allowedApps = [], blockedApps = [];
580
+ for (const app of Object.values(state.applications)) if (app.always) allowedApps.push(app.always);
581
+ else {
582
+ const denied = Object.values(app.sessions).find((session) => session.decision === "deny");
583
+ if (denied) blockedApps.push(denied.identity);
584
+ }
585
+ return {
586
+ allowedApps,
587
+ blockedApps,
588
+ persistentAvailable: this.options.store.persistent
589
+ };
590
+ });
591
+ }
592
+ /**
593
+ * Remove saved and session consent and join affected native operations.
594
+ * @param id Application identity shown in the permission page.
595
+ * @returns Completion after persistence and cancellation, including other processes' admitted operations.
596
+ */
597
+ async revoke(id) {
598
+ this.lifetime.signal.throwIfAborted();
599
+ id = ApplicationAuthorizationResult.shape.id.parse(id);
600
+ const clients = this.invalidate(id);
601
+ await this.options.store.withApplication(id, this.lifetime.signal, () => this.options.store.withState(this.lifetime.signal, async (transaction) => {
602
+ const app = transaction.state.applications[id] ?? this.empty();
603
+ if (app.always && !this.options.store.persistent) throw new Error("Application permissions cannot be saved in this composition");
604
+ await this.save(transaction, id, {
605
+ revoked: app.revoked + 1,
606
+ sessions: Object.fromEntries(Object.entries(app.sessions).map(([sessionId, session]) => [sessionId, {
607
+ ...session,
608
+ decision: "deny",
609
+ revision: session.revision + 1
610
+ }]))
611
+ });
612
+ }));
613
+ const results = await Promise.allSettled([...clients.map((client) => client.dispose()), ...[...this.active].filter((operation) => operation.identity.id === id).map((operation) => operation.done.promise)]);
614
+ const errors = [];
615
+ for (const result of results) if (result.status === "rejected") errors.push(result.reason);
616
+ if (errors.length) throw new AggregateError(errors, "Application access was revoked, but helper cleanup failed");
617
+ }
618
+ /** Clear refusals without granting access or restoring old handles.
619
+ * @param id Application selected by the human.
620
+ * @returns Completion after the new asking policy is durable.
621
+ */
622
+ async retryApproval(id) {
623
+ id = ApplicationAuthorizationResult.shape.id.parse(id);
624
+ await this.options.store.withState(this.lifetime.signal, async (transaction) => {
625
+ const app = transaction.state.applications[id];
626
+ if (!app || !Object.values(app.sessions).some((session) => session.decision === "deny")) return;
627
+ await this.save(transaction, id, {
628
+ ...app,
629
+ sessions: Object.fromEntries(Object.entries(app.sessions).map(([sessionId, session]) => [sessionId, session.decision === "deny" ? {
630
+ ...session,
631
+ decision: "ask",
632
+ revision: session.revision + 1
633
+ } : session]))
634
+ });
635
+ });
636
+ }
637
+ /**
638
+ * Obtain consent for a freshly selected native handle. Free text never grants access.
639
+ * @param agent Live agent whose session owns the decision.
640
+ * @param client Helper that issued the handle.
641
+ * @param handle Helper handle for a running instance or an approved pending launch.
642
+ * @param identity Platform-provided application or process-instance identity.
643
+ * @param signal Calling tool lifetime.
644
+ * @param icon Native application icon for the permission card; never saved as an identity.
645
+ * @returns Completion after consent; refusals reject before launch, AX, screenshots, or input.
646
+ */
647
+ async select(agent, client, handle, identity, signal, icon) {
648
+ await this.withOperation(agent, client, identity, signal, (signal) => this.selectInOrder(agent, identity.id, async () => {
649
+ signal.throwIfAborted();
650
+ const observed = await this.read(identity.id, signal);
651
+ const existing = this.clients.get(client)?.handles.get(handle);
652
+ if (!client.disposed && existing) {
653
+ if (this.permitted(existing, observed)) return;
654
+ this.invalidate(identity.id, agent);
655
+ throw new NativeError("APP_ACCESS_REVOKED", "Application access changed; acquire a fresh application handle after consent");
656
+ }
657
+ const saved = identity.persistable && observed.always !== void 0;
658
+ const decision = observed.sessions[agent.id];
659
+ let scope = saved ? "persistent" : "session";
660
+ if (!saved && decision?.decision === "deny") throw this.denied(identity);
661
+ if (client.disposed) throw new NativeError("NATIVE_CLOSED", "Helper is closed; acquire fresh application handles");
662
+ if (!saved && decision?.decision !== "allow") {
663
+ const questions = this.ctx.get("userQuestions");
664
+ if (!questions) throw new NativeError("APP_APPROVAL_UNAVAILABLE", "No human answerer is available for application access");
665
+ const options = [{ label: "Allow for this session" }, { label: "Deny" }];
666
+ if (identity.persistable && this.options.store.persistent) options.push({ label: "Always allow" });
667
+ let result;
668
+ try {
669
+ result = await questions.ask({
670
+ agent,
671
+ signal,
672
+ questions: [{
673
+ id: "cua-app-access",
674
+ question: `Allow computer use to launch if needed, read, capture, and control ${identity.name}?`,
675
+ detail: applicationAccessDisplay.detail.en,
676
+ options,
677
+ intent: {
678
+ kind: "approval",
679
+ approve: "Allow for this session",
680
+ reject: "Deny",
681
+ ...identity.persistable && this.options.store.persistent ? { always: "Always allow" } : {},
682
+ subject: {
683
+ name: identity.name,
684
+ ...icon === void 0 ? {} : { icon }
685
+ },
686
+ display: applicationAccessDisplay
687
+ }
688
+ }]
689
+ });
690
+ } catch (error) {
691
+ if (error instanceof UserQuestionError && error.code === "ASK_CANCELLED") {
692
+ this.invalidate(identity.id, agent);
693
+ if (!this.lifetime.signal.aborted) await this.decide(agent.id, identity, "deny");
694
+ throw this.denied(identity);
695
+ }
696
+ if (error instanceof UserQuestionError && error.code === "DELEGATED_CALLER") throw new NativeError("APP_APPROVAL_UNAVAILABLE", "Application approval is unavailable in delegated tasks; ask the main task to perform this operation");
697
+ throw error;
698
+ }
699
+ signal.throwIfAborted();
700
+ const answer = result.answers.find((answer) => answer.id === "cua-app-access");
701
+ const chosen = answer && !answer.custom?.trim() && answer.selected.length === 1 ? answer.selected[0] : void 0;
702
+ if (chosen === "Allow for this session") scope = "session";
703
+ else if (chosen === "Always allow" && identity.persistable && this.options.store.persistent) scope = "persistent";
704
+ else {
705
+ await this.decide(agent.id, identity, "deny");
706
+ this.invalidate(identity.id, agent);
707
+ throw this.denied(identity);
708
+ }
709
+ }
710
+ if (client.disposed) throw new NativeError("NATIVE_CLOSED", "Helper is closed; acquire fresh application handles");
711
+ const authorized = await this.options.store.withState(signal, async (transaction) => {
712
+ signal.throwIfAborted();
713
+ const app = transaction.state.applications[identity.id] ?? this.empty();
714
+ if (app.revoked !== observed.revoked || app.sessions[agent.id]?.revision !== observed.sessions[agent.id]?.revision) throw new NativeError("APP_ACCESS_REVOKED", "Application consent changed while awaiting approval; select the application again");
715
+ if (scope === "persistent" && !saved && !this.options.store.persistent) throw this.denied(identity);
716
+ const { persistable: _persistable, ...grant } = identity;
717
+ const previous = app.sessions[agent.id];
718
+ if (previous?.decision === "allow" && (scope === "session" || app.always)) return {
719
+ revoked: app.revoked,
720
+ revision: previous.revision
721
+ };
722
+ const revision = (previous?.revision ?? 0) + 1;
723
+ const next = {
724
+ ...app,
725
+ ...scope === "persistent" ? { always: grant } : {},
726
+ sessions: {
727
+ ...app.sessions,
728
+ [agent.id]: {
729
+ identity: grant,
730
+ decision: "allow",
731
+ revision
732
+ }
733
+ }
734
+ };
735
+ await this.save(transaction, identity.id, next);
736
+ return {
737
+ revoked: next.revoked,
738
+ revision
739
+ };
740
+ });
741
+ signal.throwIfAborted();
742
+ if (client.disposed) throw new NativeError("NATIVE_CLOSED", "Helper is closed; acquire fresh application handles");
743
+ const state = this.clients.get(client) ?? {
744
+ agent,
745
+ handles: /* @__PURE__ */ new Map()
746
+ };
747
+ const { persistable: _persistable, ...grant } = identity;
748
+ for (const [previous, previousState] of this.clients) if (previousState.agent === agent && previous !== client) {
749
+ for (const selected of previousState.handles.values()) selected.lifetime.abort();
750
+ this.clients.delete(previous);
751
+ }
752
+ state.handles.set(handle, {
753
+ identity: grant,
754
+ scope,
755
+ sessionId: agent.id,
756
+ revoked: authorized.revoked,
757
+ revision: authorized.revision,
758
+ lifetime: new AbortController()
759
+ });
760
+ this.clients.set(client, state);
761
+ }));
762
+ }
763
+ /**
764
+ * Enforce live consent at the operation that dispatches native work.
765
+ * @param client Helper owning the application handle.
766
+ * @param handle Selected application.
767
+ * @param signal Calling tool lifetime.
768
+ * @param dispatch One native operation, with revocation cancellation.
769
+ * @returns The native result, with no implicit retry after consent or cancellation.
770
+ */
771
+ async run(client, handle, signal, dispatch) {
772
+ const state = this.clients.get(client);
773
+ const selected = state?.handles.get(handle);
774
+ if (!state || !selected) throw new NativeError("APP_ACCESS_REQUIRED", "Select the application with getApp and obtain user consent before reading or controlling it");
775
+ if (selected.lifetime.signal.aborted) throw new NativeError("APP_ACCESS_REVOKED", "Application access was revoked; stop using this application");
776
+ const lifetime = AbortSignal.any([
777
+ signal,
778
+ this.lifetime.signal,
779
+ selected.lifetime.signal
780
+ ]);
781
+ return this.options.store.withApplication(selected.identity.id, lifetime, async () => {
782
+ if (!await this.options.store.withState(lifetime, ({ state: permissions }) => this.permitted(selected, permissions.applications[selected.identity.id] ?? this.empty()))) {
783
+ this.invalidate(selected.identity.id, state.agent);
784
+ throw new NativeError("APP_ACCESS_REVOKED", "Application access was revoked; stop using this application");
785
+ }
786
+ if (client.disposed) throw new NativeError("NATIVE_CLOSED", "Helper is closed; acquire fresh application handles");
787
+ return this.withOperation(state.agent, client, selected.identity, lifetime, dispatch);
788
+ });
789
+ }
790
+ async selectInOrder(agent, id, select) {
791
+ const selections = this.selections.get(agent.id) ?? /* @__PURE__ */ new Map();
792
+ this.selections.set(agent.id, selections);
793
+ const operation = (selections.get(id) ?? Promise.resolve()).then(select, select);
794
+ selections.set(id, operation);
795
+ try {
796
+ await operation;
797
+ } finally {
798
+ if (selections.get(id) === operation) selections.delete(id);
799
+ if (selections.size === 0) this.selections.delete(agent.id);
800
+ }
801
+ }
802
+ async withOperation(agent, client, identity, signal, dispatch) {
803
+ const operation = {
804
+ agent,
805
+ client,
806
+ identity,
807
+ controller: new AbortController(),
808
+ done: Promise.withResolvers()
809
+ };
810
+ this.active.add(operation);
811
+ const lifetime = AbortSignal.any([
812
+ signal,
813
+ this.lifetime.signal,
814
+ operation.controller.signal
815
+ ]);
816
+ try {
817
+ lifetime.throwIfAborted();
818
+ const result = await dispatch(lifetime);
819
+ lifetime.throwIfAborted();
820
+ return result;
821
+ } catch (error) {
822
+ if (operation.controller.signal.aborted) throw operation.controller.signal.reason;
823
+ throw error;
824
+ } finally {
825
+ this.active.delete(operation);
826
+ operation.done.resolve();
827
+ }
828
+ }
829
+ /**
830
+ * Release the disposed agent's handles while retaining its session decisions.
831
+ * @param agent Disposed agent whose selected handles are released.
832
+ */
833
+ forget(agent) {
834
+ for (const [client, state] of this.clients) if (state.agent === agent) this.clients.delete(client);
835
+ }
836
+ permitted(selection, app) {
837
+ const session = app.sessions[selection.sessionId];
838
+ return !selection.lifetime.signal.aborted && app.revoked === selection.revoked && (selection.scope === "persistent" ? app.always !== void 0 : session?.decision === "allow" && session.revision === selection.revision);
839
+ }
840
+ denied(identity) {
841
+ return new NativeError("APP_ACCESS_DENIED", `The user denied access to ${identity.name}. Do not retry or use another tool to bypass this decision.`);
842
+ }
843
+ async decide(sessionId, identity, decision) {
844
+ await this.options.store.withState(this.lifetime.signal, async (transaction) => {
845
+ const app = transaction.state.applications[identity.id] ?? this.empty();
846
+ await this.save(transaction, identity.id, {
847
+ ...app,
848
+ sessions: {
849
+ ...app.sessions,
850
+ [sessionId]: {
851
+ identity: {
852
+ id: identity.id,
853
+ name: identity.name,
854
+ executablePath: identity.executablePath
855
+ },
856
+ decision,
857
+ revision: (app.sessions[sessionId]?.revision ?? 0) + 1
858
+ }
859
+ }
860
+ });
861
+ });
862
+ }
863
+ invalidate(id, agent) {
864
+ const clients = /* @__PURE__ */ new Set();
865
+ for (const [client, state] of this.clients) for (const selection of state.handles.values()) if (selection.identity.id === id && (agent === void 0 || state.agent.id === agent.id)) {
866
+ selection.lifetime.abort(new NativeError("APP_ACCESS_REVOKED", "Application access was revoked; stop using this application"));
867
+ clients.add(client);
868
+ }
869
+ for (const operation of this.active) if (operation.identity.id === id && (agent === void 0 || operation.agent.id === agent.id)) {
870
+ operation.controller.abort(this.denied(operation.identity));
871
+ clients.add(operation.client);
872
+ }
873
+ for (const client of clients) client.invalidate();
874
+ return [...clients];
875
+ }
876
+ empty() {
877
+ return {
878
+ revoked: 0,
879
+ sessions: {}
880
+ };
881
+ }
882
+ read(id, signal = this.lifetime.signal) {
883
+ return this.options.store.withState(signal, ({ state }) => state.applications[id] ?? this.empty());
884
+ }
885
+ save(transaction, id, app) {
886
+ return transaction.save({
887
+ ...transaction.state,
888
+ applications: {
889
+ ...transaction.state.applications,
890
+ [id]: app
891
+ }
892
+ });
893
+ }
894
+ };
895
+ //#endregion
896
+ //#region lib/types/protocol.js
897
+ /** JSON validation shared by model tool admission and the native object facade. */
898
+ const id = z.number().int().positive().max(2 ** 32 - 1);
899
+ const pid = z.number().int().positive().max(2 ** 31 - 1);
900
+ const point = z.number().nonnegative();
901
+ const relativePoint = z.number().int().min(0).max(999);
902
+ const app = { appHandle: z.string().min(1) };
903
+ const pointer = {
904
+ mouseButton: z.enum([
905
+ "left",
906
+ "right",
907
+ "middle"
908
+ ]).optional(),
909
+ modifiers: z.array(z.enum([
910
+ "command",
911
+ "control",
912
+ "option",
913
+ "shift",
914
+ "fn"
915
+ ])).optional()
916
+ };
917
+ const click = {
918
+ ...pointer,
919
+ clickCount: z.union([z.literal(1), z.literal(2)]).optional(),
920
+ holdMs: z.number().int().nonnegative().optional().describe("Milliseconds between each mouse press and release; omitted for an ordinary click.")
921
+ };
922
+ const window = {
923
+ ...app,
924
+ windowId: id
925
+ };
926
+ const snapshot = {
927
+ ...app,
928
+ snapshotId: z.string().min(1),
929
+ elementIndex: z.number().int().nonnegative()
930
+ };
931
+ const coordinate = {
932
+ ...window,
933
+ snapshotId: z.string().min(1).optional(),
934
+ x: point,
935
+ y: point
936
+ };
937
+ const absoluteCoordinate = {
938
+ ...coordinate,
939
+ relative: z.literal(false).optional().describe("Omitted or false uses pixels in the latest screenshot returned by this tool.")
940
+ };
941
+ const relativeCoordinate = {
942
+ ...coordinate,
943
+ relative: z.literal(true).describe("Use integer thousandths of the window width and height, from 0 to 999."),
944
+ x: relativePoint,
945
+ y: relativePoint
946
+ };
947
+ const bounds = z.object({
948
+ x: z.number(),
949
+ y: z.number(),
950
+ width: z.number().nonnegative(),
951
+ height: z.number().nonnegative()
952
+ });
953
+ const operation = (method, params) => z.object({
954
+ method: z.literal(method),
955
+ params: z.object(params).strict()
956
+ }).strict();
957
+ const imageBase64 = z.string().min(1).refine((value) => Buffer$1.from(value, "base64").toString("base64") === value, { message: "Expected canonical base64 image data" });
958
+ /** Model-submittable operation parameters; Host resource fields and private continuations are separate. */
959
+ const Request = z.discriminatedUnion("method", [
960
+ operation("getCapabilities", {}),
961
+ operation("listApps", {}),
962
+ operation("findApps", { query: z.string().min(1, "Expected a non-empty search string").regex(/\S/, "Expected a non-empty search string") }),
963
+ operation("getApp", { selector: z.string().min(1) }),
964
+ operation("activate", app),
965
+ operation("show", {
966
+ ...app,
967
+ windowId: id.optional()
968
+ }),
969
+ operation("listWindows", app),
970
+ operation("getState", {
971
+ ...app,
972
+ windowId: id.optional(),
973
+ includeMenus: z.boolean().optional().describe("Expand menu contents; omitted or false shows menu-bar entries only."),
974
+ details: z.boolean().optional().describe("Include identifiers, global-point bounds and complete action names.")
975
+ }),
976
+ z.object({
977
+ method: z.literal("hover"),
978
+ params: z.union([
979
+ z.object(snapshot).strict(),
980
+ z.object(absoluteCoordinate).strict(),
981
+ z.object(relativeCoordinate).strict()
982
+ ])
983
+ }).strict(),
984
+ z.object({
985
+ method: z.literal("click"),
986
+ params: z.union([
987
+ z.object({
988
+ ...snapshot,
989
+ ...click
990
+ }).strict(),
991
+ z.object({
992
+ ...absoluteCoordinate,
993
+ ...click
994
+ }).strict(),
995
+ z.object({
996
+ ...relativeCoordinate,
997
+ ...click
998
+ }).strict()
999
+ ])
1000
+ }).strict(),
1001
+ operation("setValue", {
1002
+ ...snapshot,
1003
+ value: z.string()
1004
+ }),
1005
+ operation("selectText", {
1006
+ ...snapshot,
1007
+ text: z.string().min(1),
1008
+ prefix: z.string().optional(),
1009
+ suffix: z.string().optional(),
1010
+ selectionType: z.enum([
1011
+ "text",
1012
+ "cursor_before",
1013
+ "cursor_after"
1014
+ ]).optional()
1015
+ }),
1016
+ operation("performSecondaryAction", {
1017
+ ...snapshot,
1018
+ action: z.string().min(1)
1019
+ }),
1020
+ operation("typeText", {
1021
+ ...app,
1022
+ text: z.string()
1023
+ }),
1024
+ operation("paste", {
1025
+ ...app,
1026
+ text: z.string(),
1027
+ format: z.enum(["text", "html"]).optional()
1028
+ }),
1029
+ operation("pressKey", {
1030
+ ...app,
1031
+ key: z.string().min(1),
1032
+ modifiers: z.array(z.enum([
1033
+ "command",
1034
+ "control",
1035
+ "option",
1036
+ "shift",
1037
+ "fn"
1038
+ ])).optional()
1039
+ }),
1040
+ z.object({
1041
+ method: z.literal("scroll"),
1042
+ params: z.union([z.object({
1043
+ ...absoluteCoordinate,
1044
+ deltaLinesX: z.number().int().min(-10).max(10),
1045
+ deltaLinesY: z.number().int().min(-10).max(10)
1046
+ }).strict(), z.object({
1047
+ ...relativeCoordinate,
1048
+ deltaLinesX: z.number().int().min(-10).max(10),
1049
+ deltaLinesY: z.number().int().min(-10).max(10)
1050
+ }).strict()])
1051
+ }).strict(),
1052
+ z.object({
1053
+ method: z.literal("drag"),
1054
+ params: z.union([z.object({
1055
+ ...window,
1056
+ ...pointer,
1057
+ snapshotId: z.string().min(1).optional(),
1058
+ relative: z.literal(false).optional(),
1059
+ fromX: point,
1060
+ fromY: point,
1061
+ toX: point,
1062
+ toY: point
1063
+ }).strict(), z.object({
1064
+ ...window,
1065
+ ...pointer,
1066
+ snapshotId: z.string().min(1).optional(),
1067
+ relative: relativeCoordinate.relative,
1068
+ fromX: relativePoint,
1069
+ fromY: relativePoint,
1070
+ toX: relativePoint,
1071
+ toY: relativePoint
1072
+ }).strict()])
1073
+ }).strict(),
1074
+ operation("screenshot", window)
1075
+ ]);
1076
+ z.object({
1077
+ maxElements: z.number().int().min(1).max(1e4),
1078
+ maxDepth: z.number().int().min(1).max(100)
1079
+ }).strict(), z.object({
1080
+ durationMs: z.number().int().min(1).max(5e3),
1081
+ steps: z.number().int().min(1).max(240)
1082
+ }).strict(), z.object({
1083
+ maxClipboardBytes: z.number().int().min(1024),
1084
+ pasteReadTimeoutMs: z.number().int().min(1).max(2 ** 31 - 1),
1085
+ maxElements: z.number().int().min(1).max(1e4),
1086
+ maxDepth: z.number().int().min(1).max(100)
1087
+ }).strict(), z.object({ maxAppMatches: z.number().int().min(1).max(1e3) }).strict();
1088
+ operation("launchApp", app), operation("permissionStatus", {}), operation("applicationIcons", { paths: z.array(z.string().min(1)) }), operation("requestPermission", { permission: z.enum(["accessibility", "screenRecording"]) }), operation("openPermissionSettings", { permission: z.enum(["accessibility", "screenRecording"]) });
1089
+ /** Process identity returned only after a successful app selection. */
1090
+ const AppResult = z.object({
1091
+ appHandle: z.string().min(1).transform((value) => value),
1092
+ pid,
1093
+ name: z.string(),
1094
+ bundleId: z.string().optional()
1095
+ });
1096
+ z.array(z.object({
1097
+ pid,
1098
+ name: z.string(),
1099
+ bundleId: z.string().optional()
1100
+ }));
1101
+ z.array(z.intersection(z.object({
1102
+ id: z.string().min(1),
1103
+ displayName: z.string(),
1104
+ path: z.string().min(1)
1105
+ }), z.discriminatedUnion("isRunning", [z.object({
1106
+ isRunning: z.literal(true),
1107
+ pid
1108
+ }), z.object({ isRunning: z.literal(false) })])));
1109
+ /** Current windows and their global point bounds. */
1110
+ const WindowsResult = z.array(z.object({
1111
+ windowId: id,
1112
+ pid,
1113
+ appName: z.string(),
1114
+ title: z.string(),
1115
+ bounds,
1116
+ isOnScreen: z.boolean(),
1117
+ onCurrentSpace: z.boolean().nullable()
1118
+ }));
1119
+ /** Observed state with window and process identity for stale-target rejection. */
1120
+ const StateResult = z.object({
1121
+ appHandle: z.string().min(1).transform((value) => value),
1122
+ pid,
1123
+ windowId: id.nullable(),
1124
+ focusedWindowId: id.nullable().optional(),
1125
+ snapshotId: z.string().min(1).transform((value) => value),
1126
+ tree: z.string(),
1127
+ windows: WindowsResult,
1128
+ truncated: z.boolean()
1129
+ });
1130
+ /** Original native PNG and window-point geometry before Host image preparation. */
1131
+ const NativeScreenshotResult = z.object({
1132
+ mimeType: z.literal("image/png"),
1133
+ data: imageBase64,
1134
+ pixelWidth: id,
1135
+ pixelHeight: id,
1136
+ windowId: id,
1137
+ bounds: bounds.extend({
1138
+ width: z.number().positive(),
1139
+ height: z.number().positive()
1140
+ }),
1141
+ coordinateSpace: z.literal("window-points")
1142
+ });
1143
+ NativeScreenshotResult.extend({
1144
+ mimeType: z.enum([
1145
+ "image/png",
1146
+ "image/jpeg",
1147
+ "image/webp",
1148
+ "image/gif"
1149
+ ]),
1150
+ coordinateSpace: z.literal("screenshot-pixels")
1151
+ });
1152
+ z.object({
1153
+ platform: z.string(),
1154
+ permissions: z.object({
1155
+ accessibility: z.boolean(),
1156
+ screenRecording: z.boolean()
1157
+ }),
1158
+ sessionLocked: z.boolean().nullable(),
1159
+ methods: z.array(z.string()),
1160
+ coordinateSpace: z.literal("screenshot-pixels"),
1161
+ browser: z.literal(false)
1162
+ });
1163
+ /** An action has reached native dispatch; application state was not verified. */
1164
+ const ActionResult = z.object({
1165
+ dispatched: z.literal(true),
1166
+ verified: z.literal(false)
1167
+ });
1168
+ ActionResult.extend({
1169
+ hoverRoute: z.enum(["accessibility", "system-pointer"]),
1170
+ systemPointerMoved: z.boolean()
1171
+ });
1172
+ ActionResult.extend({
1173
+ windowId: id.nullable(),
1174
+ foregroundChanged: z.boolean().nullable()
1175
+ });
1176
+ /** Bounded native PNG thumbnail for human presentation, excluded from model results and saved grants. */
1177
+ const ApplicationIcon = z.string().max(65536).regex(/^data:image\/png;base64,[A-Za-z0-9+/]+={0,2}$/);
1178
+ //#endregion
1179
+ //#region lib/types/access.js
1180
+ var __runInitializers = function(thisArg, initializers, value) {
1181
+ var useValue = arguments.length > 2;
1182
+ for (var i = 0; i < initializers.length; i++) value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
1183
+ return useValue ? value : void 0;
1184
+ };
1185
+ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
1186
+ function accept(f) {
1187
+ if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
1188
+ return f;
1189
+ }
1190
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
1191
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
1192
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
1193
+ var _, done = false;
1194
+ for (var i = decorators.length - 1; i >= 0; i--) {
1195
+ var context = {};
1196
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
1197
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
1198
+ context.addInitializer = function(f) {
1199
+ if (done) throw new TypeError("Cannot add initializers after decoration has completed");
1200
+ extraInitializers.push(accept(f || null));
1201
+ };
1202
+ var result = (0, decorators[i])(kind === "accessor" ? {
1203
+ get: descriptor.get,
1204
+ set: descriptor.set
1205
+ } : descriptor[key], context);
1206
+ if (kind === "accessor") {
1207
+ if (result === void 0) continue;
1208
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
1209
+ if (_ = accept(result.get)) descriptor.get = _;
1210
+ if (_ = accept(result.set)) descriptor.set = _;
1211
+ if (_ = accept(result.init)) initializers.unshift(_);
1212
+ } else if (_ = accept(result)) if (kind === "field") initializers.unshift(_);
1213
+ else descriptor[key] = _;
1214
+ }
1215
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
1216
+ done = true;
1217
+ };
1218
+ const permissionProcess = z.object({
1219
+ pid: z.number().int().positive(),
1220
+ path: z.string().optional(),
1221
+ name: z.string().optional()
1222
+ });
1223
+ const systemPermissions = z.object({
1224
+ accessibility: z.boolean(),
1225
+ screenRecording: z.boolean(),
1226
+ helper: permissionProcess,
1227
+ parent: permissionProcess,
1228
+ launchApplication: z.object({
1229
+ name: z.string().min(1),
1230
+ path: z.string().min(1),
1231
+ icon: ApplicationIcon.optional()
1232
+ }).optional()
1233
+ });
1234
+ /** Browser controls for provider-owned native permission and application decisions. */
1235
+ let CuaAccess = (() => {
1236
+ let _classSuper = TypertRemoteService;
1237
+ let _instanceExtraInitializers = [];
1238
+ let _ptcConfiguration_decorators;
1239
+ let _enablePersistentPtc_decorators;
1240
+ let _applications_decorators;
1241
+ let _systemStatus_decorators;
1242
+ let _applicationIcons_decorators;
1243
+ let _requestPermission_decorators;
1244
+ let _openSettings_decorators;
1245
+ let _revoke_decorators;
1246
+ let _retryApproval_decorators;
1247
+ return class CuaAccess extends _classSuper {
1248
+ static {
1249
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1250
+ _ptcConfiguration_decorators = [Remote];
1251
+ _enablePersistentPtc_decorators = [Remote];
1252
+ _applications_decorators = [Remote];
1253
+ _systemStatus_decorators = [Remote];
1254
+ _applicationIcons_decorators = [Remote];
1255
+ _requestPermission_decorators = [Remote];
1256
+ _openSettings_decorators = [Remote];
1257
+ _revoke_decorators = [Remote];
1258
+ _retryApproval_decorators = [Remote];
1259
+ __esDecorate(this, null, _ptcConfiguration_decorators, {
1260
+ kind: "method",
1261
+ name: "ptcConfiguration",
1262
+ static: false,
1263
+ private: false,
1264
+ access: {
1265
+ has: (obj) => "ptcConfiguration" in obj,
1266
+ get: (obj) => obj.ptcConfiguration
1267
+ },
1268
+ metadata: _metadata
1269
+ }, null, _instanceExtraInitializers);
1270
+ __esDecorate(this, null, _enablePersistentPtc_decorators, {
1271
+ kind: "method",
1272
+ name: "enablePersistentPtc",
1273
+ static: false,
1274
+ private: false,
1275
+ access: {
1276
+ has: (obj) => "enablePersistentPtc" in obj,
1277
+ get: (obj) => obj.enablePersistentPtc
1278
+ },
1279
+ metadata: _metadata
1280
+ }, null, _instanceExtraInitializers);
1281
+ __esDecorate(this, null, _applications_decorators, {
1282
+ kind: "method",
1283
+ name: "applications",
1284
+ static: false,
1285
+ private: false,
1286
+ access: {
1287
+ has: (obj) => "applications" in obj,
1288
+ get: (obj) => obj.applications
1289
+ },
1290
+ metadata: _metadata
1291
+ }, null, _instanceExtraInitializers);
1292
+ __esDecorate(this, null, _systemStatus_decorators, {
1293
+ kind: "method",
1294
+ name: "systemStatus",
1295
+ static: false,
1296
+ private: false,
1297
+ access: {
1298
+ has: (obj) => "systemStatus" in obj,
1299
+ get: (obj) => obj.systemStatus
1300
+ },
1301
+ metadata: _metadata
1302
+ }, null, _instanceExtraInitializers);
1303
+ __esDecorate(this, null, _applicationIcons_decorators, {
1304
+ kind: "method",
1305
+ name: "applicationIcons",
1306
+ static: false,
1307
+ private: false,
1308
+ access: {
1309
+ has: (obj) => "applicationIcons" in obj,
1310
+ get: (obj) => obj.applicationIcons
1311
+ },
1312
+ metadata: _metadata
1313
+ }, null, _instanceExtraInitializers);
1314
+ __esDecorate(this, null, _requestPermission_decorators, {
1315
+ kind: "method",
1316
+ name: "requestPermission",
1317
+ static: false,
1318
+ private: false,
1319
+ access: {
1320
+ has: (obj) => "requestPermission" in obj,
1321
+ get: (obj) => obj.requestPermission
1322
+ },
1323
+ metadata: _metadata
1324
+ }, null, _instanceExtraInitializers);
1325
+ __esDecorate(this, null, _openSettings_decorators, {
1326
+ kind: "method",
1327
+ name: "openSettings",
1328
+ static: false,
1329
+ private: false,
1330
+ access: {
1331
+ has: (obj) => "openSettings" in obj,
1332
+ get: (obj) => obj.openSettings
1333
+ },
1334
+ metadata: _metadata
1335
+ }, null, _instanceExtraInitializers);
1336
+ __esDecorate(this, null, _revoke_decorators, {
1337
+ kind: "method",
1338
+ name: "revoke",
1339
+ static: false,
1340
+ private: false,
1341
+ access: {
1342
+ has: (obj) => "revoke" in obj,
1343
+ get: (obj) => obj.revoke
1344
+ },
1345
+ metadata: _metadata
1346
+ }, null, _instanceExtraInitializers);
1347
+ __esDecorate(this, null, _retryApproval_decorators, {
1348
+ kind: "method",
1349
+ name: "retryApproval",
1350
+ static: false,
1351
+ private: false,
1352
+ access: {
1353
+ has: (obj) => "retryApproval" in obj,
1354
+ get: (obj) => obj.retryApproval
1355
+ },
1356
+ metadata: _metadata
1357
+ }, null, _instanceExtraInitializers);
1358
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, {
1359
+ enumerable: true,
1360
+ configurable: true,
1361
+ writable: true,
1362
+ value: _metadata
1363
+ });
1364
+ }
1365
+ policy = __runInitializers(this, _instanceExtraInitializers);
1366
+ control;
1367
+ permissionParameters;
1368
+ /**
1369
+ * @param ctx Provider context.
1370
+ * @param policy Application decision owner.
1371
+ * @param control Serialized native permission dispatch.
1372
+ * @param permissionParameters Provider-owned native parameters for the selected action and Client language.
1373
+ */
1374
+ constructor(ctx, policy, control, permissionParameters) {
1375
+ super(ctx, "cuaAccess");
1376
+ this.policy = policy;
1377
+ this.control = control;
1378
+ this.permissionParameters = permissionParameters;
1379
+ }
1380
+ /** Read PTC execution state separately from native permission checks.
1381
+ * @returns Whether the shared runtime retains memory and has an editable profile entry.
1382
+ */
1383
+ ptcConfiguration() {
1384
+ return {
1385
+ persistent: this.ctx.get("ptcRuntime")?.retainsState === true,
1386
+ writable: this.ctx.get("configEditor")?.entries().some((entry) => entry.options.id === "ptc-runtime") ?? false
1387
+ };
1388
+ }
1389
+ /** Persist in-memory PTC execution through the existing profile editor and Loader lifecycle.
1390
+ * @returns Completion after the shared runtime reload; already-persistent runtimes are left intact.
1391
+ */
1392
+ async enablePersistentPtc() {
1393
+ if (this.ptcConfiguration().persistent) return;
1394
+ const editor = this.ctx.get("configEditor");
1395
+ const entry = editor?.entries().find((entry) => entry.options.id === "ptc-runtime");
1396
+ if (editor === void 0 || entry === void 0) throw new Error("PTC runtime has no editable profile entry");
1397
+ await editor.edit(entry, (current) => ({
1398
+ ...current,
1399
+ ...resolvePersistentExecution(this.ctx.get("ptcRuntime")?.programFormat)
1400
+ }));
1401
+ }
1402
+ /**
1403
+ * Read fresh stored application decisions without issuing a native request.
1404
+ * @returns Saved grants, refused applications and durable-storage availability.
1405
+ */
1406
+ applications() {
1407
+ return this.policy.status();
1408
+ }
1409
+ /**
1410
+ * Inspect system privileges independently of application decisions and icons.
1411
+ * @returns Fresh native preflight and launch metadata.
1412
+ */
1413
+ async systemStatus() {
1414
+ return systemPermissions.parse(await this.control("permissionStatus", {}));
1415
+ }
1416
+ /**
1417
+ * Load presentation icons separately from application decisions.
1418
+ * @returns Optional native PNG icons keyed by executable path; applications without paths are skipped.
1419
+ */
1420
+ async applicationIcons() {
1421
+ const state = await this.policy.status();
1422
+ const paths = [...new Set([...state.allowedApps, ...state.blockedApps].flatMap((app) => app.executablePath === void 0 ? [] : [app.executablePath]))];
1423
+ return paths.length === 0 ? {} : z.record(z.string(), ApplicationIcon).parse(await this.control("applicationIcons", { paths }));
1424
+ }
1425
+ /**
1426
+ * Request the selected system privilege through the native provider.
1427
+ * @param permission macOS privilege to request.
1428
+ * @param locale Current Client language for provider-owned permission UI.
1429
+ * @returns Current permission observations; requesting does not establish consent.
1430
+ */
1431
+ async requestPermission(permission, locale) {
1432
+ return systemPermissions.parse(await this.control("requestPermission", this.permissionParameters("requestPermission", permission, locale)));
1433
+ }
1434
+ /**
1435
+ * Open the macOS privacy pane selected by the user.
1436
+ * @param permission Corresponding system privilege.
1437
+ * @param locale Current Client language for provider-owned recovery instructions.
1438
+ * @returns Completion after macOS accepted the open request.
1439
+ */
1440
+ async openSettings(permission, locale) {
1441
+ z.object({ opened: z.literal(true) }).parse(await this.control("openPermissionSettings", this.permissionParameters("openPermissionSettings", permission, locale)));
1442
+ }
1443
+ /**
1444
+ * Remove saved and session access and join affected operations.
1445
+ * @param id Application identity displayed on the permission page.
1446
+ * @returns Completion after persistence and cancellation; dispatched input cannot be undone.
1447
+ */
1448
+ revoke(id) {
1449
+ return this.policy.revoke(id);
1450
+ }
1451
+ /**
1452
+ * Clear this application's refusals across sessions so each session may ask for access again.
1453
+ * @param id Refused or revoked application displayed on the permission page.
1454
+ * @returns Completion after clearing refusals; no permission is granted and no action is replayed.
1455
+ */
1456
+ async retryApproval(id) {
1457
+ await this.policy.retryApproval(id);
1458
+ }
1459
+ };
1460
+ })();
1461
+ /**
1462
+ * Install human-facing controls while keeping executor capabilities private to the provider.
1463
+ * @param ctx Provider context that owns decisions and operation lifetimes.
1464
+ * @param options Native transport and profile persistence.
1465
+ * @returns Consent selection, guarded dispatch, and task cleanup capabilities.
1466
+ */
1467
+ function installCuaAccess(ctx, options) {
1468
+ const policy = new ApplicationAccess(ctx, options);
1469
+ const lifetime = new AbortController();
1470
+ let client;
1471
+ let tail = Promise.resolve();
1472
+ const control = (method, params) => {
1473
+ lifetime.signal.throwIfAborted();
1474
+ const perform = async () => {
1475
+ lifetime.signal.throwIfAborted();
1476
+ if (client?.disposed) await client.dispose();
1477
+ lifetime.signal.throwIfAborted();
1478
+ if (!client || client.disposed) client = new NativeClient(ctx, options.native, options.createChannel);
1479
+ return client.request(method, params, lifetime.signal);
1480
+ };
1481
+ const operation = tail.then(perform, perform);
1482
+ tail = operation;
1483
+ return operation;
1484
+ };
1485
+ const dispose = ctx.effect(() => async () => {
1486
+ lifetime.abort();
1487
+ await Promise.allSettled([policy.dispose(), tail]);
1488
+ await client?.dispose();
1489
+ }, "cua-access.dispose");
1490
+ new CuaAccess(ctx, policy, control, options.permissionParameters);
1491
+ return {
1492
+ select: policy.select.bind(policy),
1493
+ run: policy.run.bind(policy),
1494
+ forget: policy.forget.bind(policy),
1495
+ dispose
1496
+ };
1497
+ }
1498
+ //#endregion
1499
+ //#region lib/types/coordinates.js
1500
+ /** Tracks only the current window geometry and last successfully prepared screenshot. */
1501
+ var CuaCoordinates = class {
1502
+ applications = /* @__PURE__ */ new Map();
1503
+ /**
1504
+ * Invalidate screenshot mappings when a window closes or changes size.
1505
+ * @param appHandle - native application selection.
1506
+ * @param windows - freshly observed windows.
1507
+ * @param windowId - selected window for a scoped observation; omission means a complete application inventory.
1508
+ */
1509
+ observe(appHandle, windows, windowId) {
1510
+ const previous = this.applications.get(appHandle);
1511
+ const current = new Map(windowId === void 0 ? [] : previous);
1512
+ if (windowId !== void 0 && !windows.some((window) => window.windowId === windowId)) current.delete(windowId);
1513
+ for (const window of windows) {
1514
+ const { width, height } = window.bounds;
1515
+ const old = previous?.get(window.windowId);
1516
+ current.set(window.windowId, old?.width === width && old.height === height ? old : {
1517
+ width,
1518
+ height
1519
+ });
1520
+ }
1521
+ this.applications.set(appHandle, current);
1522
+ }
1523
+ /**
1524
+ * Bind the exact image delivered to the model to its native window size.
1525
+ * @param appHandle - native application selection.
1526
+ * @param windowId - selected native window.
1527
+ * @param bounds - capture-time window size in points.
1528
+ * @param image - encoded model-request image dimensions.
1529
+ */
1530
+ screenshot(appHandle, windowId, bounds, image) {
1531
+ let frames = this.applications.get(appHandle);
1532
+ if (!frames) {
1533
+ frames = /* @__PURE__ */ new Map();
1534
+ this.applications.set(appHandle, frames);
1535
+ }
1536
+ frames.set(windowId, {
1537
+ width: bounds.width,
1538
+ height: bounds.height,
1539
+ image: {
1540
+ width: image.width,
1541
+ height: image.height
1542
+ }
1543
+ });
1544
+ }
1545
+ /**
1546
+ * Convert admitted coordinate arguments once, before native dispatch.
1547
+ * @param request - model request already checked by the operation schema.
1548
+ * @returns native parameters with Host-only coordinate options removed.
1549
+ */
1550
+ parameters(request) {
1551
+ const params = request.params;
1552
+ const native = z.record(z.string(), z.json()).parse(params);
1553
+ if (!("x" in params) && !("fromX" in params)) return native;
1554
+ const frame = this.applications.get(params.appHandle)?.get(params.windowId);
1555
+ if (!frame || frame.width <= 0 || frame.height <= 0) throw new NativeError("STALE_SNAPSHOT", "Read fresh window state before coordinate input");
1556
+ const relative = params.relative === true;
1557
+ if (!relative && !frame.image) throw new NativeError("SCREENSHOT_REQUIRED", "Take a fresh screenshot before using absolute pixel coordinates");
1558
+ const convert = (value, axis) => {
1559
+ const pixels = frame.image?.[axis] ?? frame[axis];
1560
+ if (relative) return Math.min(value / 1e3 * frame[axis], Math.max(0, frame[axis] - 1));
1561
+ if (value >= pixels) throw new NativeError("INVALID_ARGUMENT", "Coordinate is outside the latest screenshot");
1562
+ return value * frame[axis] / pixels;
1563
+ };
1564
+ delete native.relative;
1565
+ if ("x" in params) {
1566
+ native.x = convert(params.x, "width");
1567
+ native.y = convert(params.y, "height");
1568
+ } else {
1569
+ native.fromX = convert(params.fromX, "width");
1570
+ native.fromY = convert(params.fromY, "height");
1571
+ native.toX = convert(params.toX, "width");
1572
+ native.toY = convert(params.toY, "height");
1573
+ }
1574
+ return native;
1575
+ }
1576
+ };
1577
+ //#endregion
1578
+ //#region lib/types/index.js
1579
+ /** Shared CUA tool execution, application consent, and object-runtime integration. */
1580
+ /** Validated host configuration; no driver is downloaded at runtime. */
1581
+ const CuaConfig = Schema.object({
1582
+ agentPreset: Schema.union([Schema.string().min(1), Schema.const(false)]).default("ptc"),
1583
+ allowedApps: Schema.array(Schema.object({
1584
+ id: Schema.string().pattern(/^[a-f0-9]{64}$/).required(),
1585
+ name: Schema.string().required(),
1586
+ executablePath: Schema.string().min(1)
1587
+ })).default([]),
1588
+ helperPath: Schema.string(),
1589
+ buildTimeoutMs: Schema.number().step(1).min(1).max(2 ** 31 - 1).default(3e5),
1590
+ timeoutMs: Schema.number().step(1).min(1).max(2 ** 31 - 1).default(3e4),
1591
+ connectTimeoutMs: Schema.number().step(1).min(1).max(2 ** 31 - 1).default(5e3),
1592
+ screenshotTimeoutMs: Schema.number().step(1).min(1).max(2 ** 31 - 1).default(5e3),
1593
+ axTimeoutMs: Schema.number().step(1).min(1).max(2 ** 31 - 1).default(3e3),
1594
+ maxAppMatches: Schema.number().step(1).min(1).max(1e3).default(20),
1595
+ maxClipboardBytes: Schema.number().step(1).min(1024).default(32 * 1024 * 1024),
1596
+ pasteReadTimeoutMs: Schema.number().step(1).min(1).max(2 ** 31 - 1).default(1e3),
1597
+ maxRequestBytes: Schema.number().step(1).min(1024).default(1024 * 1024),
1598
+ dragDurationMs: Schema.number().step(1).min(1).max(5e3).default(400),
1599
+ maxClickHoldMs: Schema.number().step(1).min(0).max(2 ** 31 - 1).default(5e3),
1600
+ dragSteps: Schema.number().step(1).min(1).max(240).default(20),
1601
+ maxResponseBytes: Schema.number().step(1).min(1024).default(32 * 1024 * 1024),
1602
+ textEventIntervalMs: Schema.number().min(0).max(1e3).default(.25),
1603
+ graceMs: Schema.number().step(1).min(1).max(2 ** 31 - 1).default(3e3),
1604
+ maxElements: Schema.number().step(1).min(1).max(1e4).default(2e3),
1605
+ maxDepth: Schema.number().step(1).min(1).max(100).default(25)
1606
+ });
1607
+ function executionAgent(execution) {
1608
+ if (!execution.agent) throw new Error("dsh-cua requires an agent-owned execution");
1609
+ return execution.agent;
1610
+ }
1611
+ /** Native values stay available to programs; only metadata and the stored image enter model content. */
1612
+ function renderResult(args, value) {
1613
+ if (args.method !== "screenshot") return [{
1614
+ type: "text",
1615
+ text: JSON.stringify(value)
1616
+ }];
1617
+ const { data: _data, mimeType: _mimeType, attachment, ...metadata } = value;
1618
+ return [{
1619
+ type: "text",
1620
+ text: JSON.stringify(metadata)
1621
+ }, {
1622
+ type: "image",
1623
+ attachment
1624
+ }];
1625
+ }
1626
+ /** Resolve the exact calling model and attachment store before requesting a screenshot. */
1627
+ async function screenshotStore(ctx, execution) {
1628
+ const attachments = ctx.get("attachments");
1629
+ if (!attachments) throw new Error("CUA screenshots require an attachment store");
1630
+ const agent = execution.agent;
1631
+ const routed = agent.session.requestHeader()?.config;
1632
+ const provider = routed?.provider ?? agent.options.provider;
1633
+ const model = routed?.model ?? agent.options.model;
1634
+ const llm = ctx.get("llm");
1635
+ if (provider === void 0 || model === void 0 || llm === void 0) throw new Error("CUA screenshot model route could not be resolved");
1636
+ const info = await llm.resolveModelInfo(provider, model, execution.signal);
1637
+ execution.signal.throwIfAborted();
1638
+ if (!info.inputModalities?.includes("image")) throw new Error(`CUA screenshots require model "${model}" to declare image input`);
1639
+ return {
1640
+ attachments,
1641
+ target: (image) => llm.imageRequestTarget(provider, model, image)
1642
+ };
1643
+ }
1644
+ /**
1645
+ * Install authorized CUA calls and Agent-owned native connections.
1646
+ * @param ctx - Provider context with computer-use, subprocess, tools, prompt, and Agent services.
1647
+ * @param config - Validated resource limits and live application grants.
1648
+ * @param backend - Platform-owned executable, connection factory, and instructions.
1649
+ */
1650
+ function installCua(ctx, config, backend) {
1651
+ const { helperPath } = backend;
1652
+ const guidance = `${backend.guidance}\n\nMaximum click holdMs: ${config.maxClickHoldMs} ms.`;
1653
+ const native = {
1654
+ helperPath,
1655
+ cwd: process.cwd(),
1656
+ timeoutMs: config.timeoutMs,
1657
+ axTimeoutMs: config.axTimeoutMs,
1658
+ connectTimeoutMs: config.connectTimeoutMs,
1659
+ screenshotTimeoutMs: config.screenshotTimeoutMs,
1660
+ maxRequestBytes: config.maxRequestBytes,
1661
+ maxResponseBytes: config.maxResponseBytes,
1662
+ graceMs: config.graceMs,
1663
+ textEventIntervalMs: config.textEventIntervalMs,
1664
+ maxClickHoldMs: config.maxClickHoldMs
1665
+ };
1666
+ const access = installCuaAccess(ctx, {
1667
+ native,
1668
+ createChannel: backend.createChannel,
1669
+ permissionParameters: backend.permissionParameters,
1670
+ store: new CuaPermissionStore(ctx, config.allowedApps.map((grant) => ({
1671
+ ...grant,
1672
+ id: grant.id
1673
+ })), config.timeoutMs)
1674
+ });
1675
+ const clients = /* @__PURE__ */ new Map();
1676
+ const lifetime = new AbortController();
1677
+ const pending = /* @__PURE__ */ new Map();
1678
+ const ownerCleanups = /* @__PURE__ */ new Map();
1679
+ const closedOwners = /* @__PURE__ */ new WeakSet();
1680
+ function ownerFor(agent) {
1681
+ if (closedOwners.has(agent) || ctx.agents.get(agent.id) !== agent) throw new Error("dsh-cua agent has been disposed");
1682
+ const existing = ownerCleanups.get(agent);
1683
+ if (existing) return existing;
1684
+ const controller = new AbortController();
1685
+ let closing;
1686
+ const close = () => {
1687
+ closedOwners.add(agent);
1688
+ controller.abort();
1689
+ return closing ??= Promise.resolve().then(async () => {
1690
+ try {
1691
+ await clients.get(agent)?.dispose();
1692
+ } finally {
1693
+ await Promise.allSettled([...pending].filter(([, owner]) => owner === agent).map(([task]) => task));
1694
+ clients.delete(agent);
1695
+ access.forget(agent);
1696
+ ownerCleanups.delete(agent);
1697
+ }
1698
+ });
1699
+ };
1700
+ const owner = {
1701
+ close,
1702
+ release: agent.ctx.effect(() => close, "dsh-cua.agent"),
1703
+ signal: controller.signal,
1704
+ coordinates: new CuaCoordinates()
1705
+ };
1706
+ ownerCleanups.set(agent, owner);
1707
+ return owner;
1708
+ }
1709
+ ctx.effect(function* () {
1710
+ yield ctx.computerUse.register(ComputerUseProviderName("dsh-cua"));
1711
+ yield async () => {
1712
+ lifetime.abort();
1713
+ const permissions = Promise.allSettled([access.dispose()]);
1714
+ await Promise.allSettled(pending.keys());
1715
+ const owners = [...ownerCleanups.values()];
1716
+ const results = await Promise.allSettled(owners.map((owner) => owner.close()));
1717
+ const releases = await Promise.allSettled(owners.map((owner) => owner.release()));
1718
+ const errors = [];
1719
+ for (const result of [
1720
+ ...await permissions,
1721
+ ...results,
1722
+ ...releases
1723
+ ]) if (result.status === "rejected") errors.push(result.reason);
1724
+ if (errors.length > 0) throw new AggregateError(errors, "dsh-cua helper cleanup failed");
1725
+ };
1726
+ const callNative = async (request, execution) => {
1727
+ const { method, params: parsedParams } = request;
1728
+ const params = execution.coordinates.parameters(request);
1729
+ const agent = execution.agent;
1730
+ const signal = execution.signal;
1731
+ signal.throwIfAborted();
1732
+ const client = execution.nativeClient;
1733
+ const nativeParams = method === "findApps" ? {
1734
+ ...params,
1735
+ maxAppMatches: config.maxAppMatches
1736
+ } : method === "paste" ? {
1737
+ ...params,
1738
+ maxClipboardBytes: config.maxClipboardBytes,
1739
+ pasteReadTimeoutMs: config.pasteReadTimeoutMs,
1740
+ maxElements: config.maxElements,
1741
+ maxDepth: config.maxDepth
1742
+ } : method === "getState" ? {
1743
+ ...params,
1744
+ maxElements: config.maxElements,
1745
+ maxDepth: config.maxDepth
1746
+ } : method === "drag" ? {
1747
+ ...params,
1748
+ durationMs: config.dragDurationMs,
1749
+ steps: config.dragSteps
1750
+ } : params;
1751
+ const requestNative = () => client.request(method, nativeParams, signal, execution.callId);
1752
+ if (method === "screenshot") {
1753
+ const { attachments, target } = await screenshotStore(ctx, execution);
1754
+ const screenshot = NativeScreenshotResult.parse(await requestNative());
1755
+ signal.throwIfAborted();
1756
+ const refs = await admitEncodedImages(attachments, [{
1757
+ data: screenshot.data,
1758
+ mediaType: screenshot.mimeType
1759
+ }]);
1760
+ signal.throwIfAborted();
1761
+ const attachment = refs[0];
1762
+ const original = attachment.originalDimensions ?? attachment;
1763
+ if (original.width !== screenshot.pixelWidth || original.height !== screenshot.pixelHeight) throw new NativeError("NATIVE_PROTOCOL", "Native screenshot dimensions disagree with its decoded image");
1764
+ const image = await attachments.readImageRequest(attachment, target(attachment), signal);
1765
+ signal.throwIfAborted();
1766
+ execution.coordinates.screenshot(parsedParams.appHandle, screenshot.windowId, screenshot.bounds, image);
1767
+ return {
1768
+ ...screenshot,
1769
+ mimeType: image.mediaType,
1770
+ data: Buffer$1.from(image.data).toString("base64"),
1771
+ pixelWidth: image.width,
1772
+ pixelHeight: image.height,
1773
+ coordinateSpace: "screenshot-pixels",
1774
+ attachment
1775
+ };
1776
+ }
1777
+ const result = method === "paste" ? await withFileLock(join(tmpdir(), "dsh-cua-system-clipboard"), requestNative, {
1778
+ waitMs: config.timeoutMs,
1779
+ signal
1780
+ }) : await requestNative();
1781
+ if (method === "getApp") {
1782
+ const prepared = AppResult.extend({ pid: AppResult.shape.pid.nullable() }).parse(result);
1783
+ const { authorization, applicationIcon } = z.object({
1784
+ authorization: ApplicationAuthorizationResult,
1785
+ applicationIcon: ApplicationIcon.optional()
1786
+ }).parse(result);
1787
+ await access.select(agent, client, prepared.appHandle, authorization, signal, applicationIcon);
1788
+ signal.throwIfAborted();
1789
+ const selected = prepared.pid === null ? AppResult.parse(await access.run(client, prepared.appHandle, signal, (signal) => client.request("launchApp", { appHandle: prepared.appHandle }, signal, execution.callId))) : AppResult.parse(prepared);
1790
+ if (selected.appHandle !== prepared.appHandle) throw new NativeError("NATIVE_PROTOCOL", "Launched application has another handle");
1791
+ return selected;
1792
+ }
1793
+ signal.throwIfAborted();
1794
+ if (method === "getCapabilities") return {
1795
+ ...z.record(z.string(), z.json()).parse(result),
1796
+ coordinateSpace: "screenshot-pixels"
1797
+ };
1798
+ if (method === "getState") {
1799
+ const state = StateResult.parse(result);
1800
+ execution.coordinates.observe(state.appHandle, state.windows, state.windowId ?? void 0);
1801
+ return state;
1802
+ }
1803
+ if (method === "listWindows") execution.coordinates.observe(parsedParams.appHandle, WindowsResult.parse(result));
1804
+ return result;
1805
+ };
1806
+ const tool = {
1807
+ name: "cua",
1808
+ description: backend.description,
1809
+ parameters: {
1810
+ ...z.record(z.string(), z.json()).parse(z.toJSONSchema(Request)),
1811
+ type: "object"
1812
+ },
1813
+ output: {
1814
+ schema: {},
1815
+ render: renderResult
1816
+ },
1817
+ async execute(args, execution) {
1818
+ const request = Request.parse(args);
1819
+ const agent = executionAgent(execution);
1820
+ execution.signal.throwIfAborted();
1821
+ lifetime.signal.throwIfAborted();
1822
+ const owner = ownerFor(agent);
1823
+ const signal = AbortSignal.any([
1824
+ execution.signal,
1825
+ lifetime.signal,
1826
+ owner.signal
1827
+ ]);
1828
+ signal.throwIfAborted();
1829
+ const operation = (async () => {
1830
+ const previous = clients.get(agent);
1831
+ if (previous?.disposed) await previous.dispose();
1832
+ signal.throwIfAborted();
1833
+ let client = clients.get(agent);
1834
+ if ("appHandle" in request.params && !client) throw new NativeError("APP_ACCESS_REQUIRED", "Select the application with getApp before reading or controlling it");
1835
+ if (!client || client.disposed && !("appHandle" in request.params)) {
1836
+ client = new NativeClient(ctx, native, backend.createChannel, (message) => {
1837
+ ctx.logger.debug(message);
1838
+ });
1839
+ clients.set(agent, client);
1840
+ owner.coordinates = new CuaCoordinates();
1841
+ }
1842
+ const nativeClient = client;
1843
+ const dispatch = async (signal) => {
1844
+ const result = await callNative(request, {
1845
+ ...execution,
1846
+ agent,
1847
+ signal,
1848
+ nativeClient,
1849
+ coordinates: owner.coordinates
1850
+ });
1851
+ signal.throwIfAborted();
1852
+ return result;
1853
+ };
1854
+ return "appHandle" in request.params ? access.run(nativeClient, request.params.appHandle, signal, dispatch) : dispatch(signal);
1855
+ })();
1856
+ pending.set(operation, agent);
1857
+ try {
1858
+ return await operation;
1859
+ } finally {
1860
+ pending.delete(operation);
1861
+ }
1862
+ }
1863
+ };
1864
+ const prompt = {
1865
+ name: "computer-use:dsh-cua",
1866
+ order: ctx.systemPrompt.getSectionOrder("TOOL_COMPUTER_USE"),
1867
+ text: () => {
1868
+ return !ctx.get("ptcRuntime")?.retainsState ? guidance : `${guidance}
1869
+
1870
+ Persistent PTC initialization:
1871
+
1872
+ \`\`\`ts
1873
+ var { connectCua } = await import(${JSON.stringify(new URL("../lib/bridge.js", import.meta.url).href)});
1874
+ var cua = connectCua(() => tools.cua, text => console.log(text));
1875
+ \`\`\``;
1876
+ }
1877
+ };
1878
+ const register = (scope) => {
1879
+ scope.tools.register(tool);
1880
+ scope.systemPrompt.section(prompt);
1881
+ };
1882
+ if (config.agentPreset === false) register(ctx);
1883
+ else {
1884
+ const consumer = ctx.inject(["agentPresets"], async (presetCtx) => {
1885
+ const scopes = /* @__PURE__ */ new Map();
1886
+ const sync = async (agent) => {
1887
+ const previous = scopes.get(agent);
1888
+ if (presetCtx.agentPresets.composedPreset(agent.ctx) !== config.agentPreset) {
1889
+ scopes.delete(agent);
1890
+ await previous?.dispose();
1891
+ return;
1892
+ }
1893
+ if (previous !== void 0) return;
1894
+ const scope = createScope(agent.ctx, agent);
1895
+ scopes.set(agent, scope);
1896
+ scope.ctx.effect(() => () => {
1897
+ if (scopes.get(agent) === scope) scopes.delete(agent);
1898
+ }, "cua.agent-tools");
1899
+ register(scope.ctx);
1900
+ };
1901
+ presetCtx.effect(() => async () => {
1902
+ await Promise.all([...scopes.values()].map((scope) => scope.dispose()));
1903
+ }, "cua.agent-tools");
1904
+ presetCtx.on("agent/created", async ({ agent }) => {
1905
+ await sync(agent);
1906
+ });
1907
+ presetCtx.on("agent-preset/selected", (id) => {
1908
+ const agent = presetCtx.agents.get(id);
1909
+ if (agent !== void 0) sync(agent).catch((error) => {
1910
+ presetCtx.logger.warn(`CUA tool scope update failed: ${String(error)}`);
1911
+ });
1912
+ });
1913
+ await Promise.all(presetCtx.agents.list().map(sync));
1914
+ });
1915
+ yield () => consumer.dispose();
1916
+ }
1917
+ }, "dsh-cua.runtime");
1918
+ }
1919
+ /** Host marker for the optional Client contribution; platform providers install native execution separately. */
1920
+ function apply() {}
1921
+ //#endregion
1922
+ export { CuaAccess, CuaConfig, apply, installCua };