@songtonyli/dsh-cli 0.1.88 → 0.1.90

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 (900) hide show
  1. package/README.md +1 -1
  2. package/bin/dsh.mjs +1 -1
  3. package/node_modules/@deepseek-ai/cordis/package.json +4 -4
  4. package/node_modules/@deepseek-ai/cordis-plugin-group/package.json +3 -3
  5. package/node_modules/@deepseek-ai/cordis-plugin-include/package.json +4 -4
  6. package/node_modules/@deepseek-ai/cordis-plugin-loader/package.json +4 -4
  7. package/node_modules/@deepseek-ai/cordis-plugin-timer/package.json +3 -3
  8. package/node_modules/@deepseek-ai/cosmokit/package.json +1 -1
  9. package/node_modules/@deepseek-ai/dsh/package.json +127 -125
  10. package/node_modules/@deepseek-ai/dsh-acp/package.json +26 -26
  11. package/node_modules/@deepseek-ai/dsh-acp-app/package.json +6 -6
  12. package/node_modules/@deepseek-ai/dsh-action-cards/lib/typert.host.js +7 -3
  13. package/node_modules/@deepseek-ai/dsh-action-cards/package.json +19 -19
  14. package/node_modules/@deepseek-ai/dsh-agent/package.json +21 -21
  15. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +10 -10
  16. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +28 -28
  17. package/node_modules/@deepseek-ai/dsh-agent-loop/README.i18n.yaml +2 -2
  18. package/node_modules/@deepseek-ai/dsh-agent-loop/README.md +1 -1
  19. package/node_modules/@deepseek-ai/dsh-agent-loop/README.zh.md +1 -1
  20. package/node_modules/@deepseek-ai/dsh-agent-loop/lib/index.js +8 -6
  21. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +27 -27
  22. package/node_modules/@deepseek-ai/dsh-agent-preset/package.json +13 -13
  23. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +7 -3
  24. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.host.js +7 -3
  25. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/package.json +39 -39
  26. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +13 -13
  27. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +7 -7
  28. package/node_modules/@deepseek-ai/dsh-api-account-controller/package.json +9 -9
  29. package/node_modules/@deepseek-ai/dsh-api-authorization-controller/package.json +13 -13
  30. package/node_modules/@deepseek-ai/dsh-api-gateway/README.i18n.yaml +2 -2
  31. package/node_modules/@deepseek-ai/dsh-api-gateway/README.md +2 -0
  32. package/node_modules/@deepseek-ai/dsh-api-gateway/README.zh.md +2 -0
  33. package/node_modules/@deepseek-ai/dsh-api-gateway/lib/index.js +10 -0
  34. package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/index.js +7 -0
  35. package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +14 -14
  36. package/node_modules/@deepseek-ai/dsh-api-job-controller/package.json +12 -12
  37. package/node_modules/@deepseek-ai/dsh-api-remote-access/README.i18n.yaml +2 -2
  38. package/node_modules/@deepseek-ai/dsh-api-remote-access/README.md +2 -0
  39. package/node_modules/@deepseek-ai/dsh-api-remote-access/README.zh.md +2 -0
  40. package/node_modules/@deepseek-ai/dsh-api-remote-access/lib/typert.host.js +5 -1
  41. package/node_modules/@deepseek-ai/dsh-api-remote-access/package.json +9 -9
  42. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +1541 -184
  43. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/index.js +4 -0
  44. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/client/index.js +2 -1
  45. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/remote-events.js +1 -0
  46. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +45 -44
  47. package/node_modules/@deepseek-ai/dsh-api-session-controller/README.i18n.yaml +2 -2
  48. package/node_modules/@deepseek-ai/dsh-api-session-controller/README.md +6 -4
  49. package/node_modules/@deepseek-ai/dsh-api-session-controller/README.zh.md +6 -4
  50. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +56 -27
  51. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +1426 -454
  52. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +715 -57
  53. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +560 -40
  54. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/catalog.js +1 -0
  55. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/session.js +70 -35
  56. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/transport.js +1 -0
  57. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.js +5 -102
  58. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/assistant-stream.js +80 -0
  59. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/controller.js +294 -0
  60. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/listener.js +297 -0
  61. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history.js +52 -341
  62. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +98 -67
  63. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/state/controller.js +289 -0
  64. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/state/listener.js +112 -0
  65. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/web/controller.js +139 -0
  66. package/node_modules/@deepseek-ai/dsh-api-session-controller/package.json +77 -75
  67. package/node_modules/@deepseek-ai/dsh-api-settings-controller/package.json +16 -16
  68. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +7 -3
  69. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/package.json +22 -22
  70. package/node_modules/@deepseek-ai/dsh-api-workspace-controller/package.json +21 -21
  71. package/node_modules/@deepseek-ai/dsh-api-workspace-files/package.json +15 -15
  72. package/node_modules/@deepseek-ai/dsh-app-boot/README.i18n.yaml +4 -4
  73. package/node_modules/@deepseek-ai/dsh-app-boot/README.md +6 -2
  74. package/node_modules/@deepseek-ai/dsh-app-boot/README.zh.md +6 -2
  75. package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +143 -7
  76. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +19 -19
  77. package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +3 -3
  78. package/node_modules/@deepseek-ai/dsh-attachment/README.i18n.yaml +4 -4
  79. package/node_modules/@deepseek-ai/dsh-attachment/README.md +2 -2
  80. package/node_modules/@deepseek-ai/dsh-attachment/README.zh.md +2 -2
  81. package/node_modules/@deepseek-ai/dsh-attachment/lib/index.js +1 -1
  82. package/node_modules/@deepseek-ai/dsh-attachment/lib/types/index.js +1 -1
  83. package/node_modules/@deepseek-ai/dsh-attachment/package.json +5 -5
  84. package/node_modules/@deepseek-ai/dsh-attachment-local/README.i18n.yaml +2 -2
  85. package/node_modules/@deepseek-ai/dsh-attachment-local/README.md +2 -0
  86. package/node_modules/@deepseek-ai/dsh-attachment-local/README.zh.md +2 -0
  87. package/node_modules/@deepseek-ai/dsh-attachment-local/lib/index.js +1 -1
  88. package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +9 -9
  89. package/node_modules/@deepseek-ai/dsh-authorization/package.json +7 -7
  90. package/node_modules/@deepseek-ai/dsh-base/package.json +100 -100
  91. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +11 -11
  92. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +14 -14
  93. package/node_modules/@deepseek-ai/dsh-brand/package.json +3 -3
  94. package/node_modules/@deepseek-ai/dsh-chunked-list/package.json +3 -3
  95. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +13 -13
  96. package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +7 -3
  97. package/node_modules/@deepseek-ai/dsh-client-file-upload/package.json +12 -12
  98. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +7 -7
  99. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +10 -10
  100. package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +1 -1
  101. package/node_modules/@deepseek-ai/dsh-client-modules/package.json +6 -6
  102. package/node_modules/@deepseek-ai/dsh-client-product-analytics/package.json +16 -16
  103. package/node_modules/@deepseek-ai/dsh-client-resources/package.json +5 -5
  104. package/node_modules/@deepseek-ai/dsh-client-shortcuts/package.json +9 -9
  105. package/node_modules/@deepseek-ai/dsh-client-ui-action-cards/package.json +15 -15
  106. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +17 -17
  107. package/node_modules/@deepseek-ai/dsh-client-ui-approval/package.json +13 -13
  108. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/lib/client.js +1 -1
  109. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +11 -11
  110. package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/package.json +5 -5
  111. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.i18n.yaml +4 -4
  112. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.md +7 -3
  113. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.zh.md +7 -3
  114. package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +245 -76
  115. package/node_modules/@deepseek-ai/dsh-client-ui-chat/package.json +39 -39
  116. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +14 -14
  117. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.i18n.yaml +6 -6
  118. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.md +9 -9
  119. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.zh.md +9 -9
  120. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +290 -290
  121. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +34 -34
  122. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +13 -13
  123. package/node_modules/@deepseek-ai/dsh-client-ui-creation-recommendations/package.json +10 -10
  124. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.i18n.yaml +2 -2
  125. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.md +1 -1
  126. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.zh.md +1 -1
  127. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +19 -59
  128. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +27 -27
  129. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +7 -7
  130. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +6 -6
  131. package/node_modules/@deepseek-ai/dsh-client-ui-entry-customization/package.json +11 -11
  132. package/node_modules/@deepseek-ai/dsh-client-ui-file-drag/package.json +7 -7
  133. package/node_modules/@deepseek-ai/dsh-client-ui-goal/README.i18n.yaml +4 -4
  134. package/node_modules/@deepseek-ai/dsh-client-ui-goal/README.md +2 -1
  135. package/node_modules/@deepseek-ai/dsh-client-ui-goal/README.zh.md +2 -1
  136. package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +5 -5
  137. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +14 -14
  138. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +11 -11
  139. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +10 -10
  140. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +9 -9
  141. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +15 -15
  142. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.i18n.yaml +6 -6
  143. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.md +3 -2
  144. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.zh.md +3 -2
  145. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +28 -3
  146. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +16 -16
  147. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.i18n.yaml +4 -4
  148. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.md +5 -3
  149. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.zh.md +5 -3
  150. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +118 -69
  151. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/package.json +18 -18
  152. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +14 -14
  153. package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +15 -21
  154. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +19 -19
  155. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.i18n.yaml +6 -6
  156. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.md +6 -2
  157. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.zh.md +6 -2
  158. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +164 -106
  159. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/package.json +18 -18
  160. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/package.json +12 -12
  161. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-recommendations/package.json +13 -13
  162. package/node_modules/@deepseek-ai/dsh-client-ui-reference/package.json +15 -15
  163. package/node_modules/@deepseek-ai/dsh-client-ui-renderer/package.json +3 -3
  164. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/package.json +20 -20
  165. package/node_modules/@deepseek-ai/dsh-client-ui-secret-mask/package.json +6 -6
  166. package/node_modules/@deepseek-ai/dsh-client-ui-session/package.json +9 -9
  167. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +7 -7
  168. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.i18n.yaml +2 -2
  169. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.md +1 -1
  170. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.zh.md +1 -1
  171. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +4 -3
  172. package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/package.json +17 -17
  173. package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/package.json +8 -8
  174. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.i18n.yaml +2 -2
  175. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.md +1 -1
  176. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.zh.md +1 -1
  177. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +2 -2
  178. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +17 -17
  179. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +11 -11
  180. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +11 -11
  181. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +7 -7
  182. package/node_modules/@deepseek-ai/dsh-client-ui-settings-session-log/package.json +8 -8
  183. package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/package.json +8 -8
  184. package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/lib/client.js +176 -2
  185. package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/package.json +6 -6
  186. package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/package.json +8 -8
  187. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.i18n.yaml +2 -2
  188. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.md +1 -1
  189. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/README.zh.md +1 -1
  190. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/lib/client.js +42 -18
  191. package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/package.json +8 -8
  192. package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/package.json +9 -9
  193. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.i18n.yaml +2 -2
  194. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.md +4 -0
  195. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.zh.md +4 -0
  196. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +2 -2
  197. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +11 -11
  198. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/package.json +10 -10
  199. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/package.json +19 -19
  200. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/package.json +13 -13
  201. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.i18n.yaml +2 -2
  202. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.md +1 -1
  203. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.zh.md +1 -1
  204. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +10 -0
  205. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/package.json +14 -14
  206. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/package.json +14 -14
  207. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +16 -16
  208. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +17 -17
  209. package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.i18n.yaml +4 -4
  210. package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.md +2 -2
  211. package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.zh.md +2 -2
  212. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +5 -4
  213. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +12 -12
  214. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.i18n.yaml +4 -4
  215. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.md +3 -1
  216. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.zh.md +3 -1
  217. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +1 -1
  218. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +29 -29
  219. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.i18n.yaml +6 -6
  220. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.md +5 -3
  221. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.zh.md +5 -3
  222. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +158 -21
  223. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/index.js +239 -4
  224. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/typert.host.js +75 -0
  225. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/typert.remote-client.js +64 -0
  226. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +43 -21
  227. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/README.i18n.yaml +2 -2
  228. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/README.md +1 -1
  229. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/README.zh.md +1 -1
  230. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +8 -6
  231. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +22 -22
  232. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +13 -13
  233. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.i18n.yaml +6 -6
  234. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.md +5 -3
  235. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.zh.md +5 -3
  236. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +36 -17
  237. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +25 -25
  238. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +6 -6
  239. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +12 -12
  240. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +15 -15
  241. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +14 -14
  242. package/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +7 -3
  243. package/node_modules/@deepseek-ai/dsh-commands/package.json +18 -18
  244. package/node_modules/@deepseek-ai/dsh-compaction/package.json +11 -11
  245. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +26 -26
  246. package/node_modules/@deepseek-ai/dsh-compaction-image-offload/package.json +18 -18
  247. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +17 -17
  248. package/node_modules/@deepseek-ai/dsh-computer-use/package.json +5 -5
  249. package/node_modules/@deepseek-ai/dsh-config-editor/package.json +12 -12
  250. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +98 -40
  251. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +10 -10
  252. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +14 -6
  253. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +23 -23
  254. package/node_modules/@deepseek-ai/dsh-creation-recommendations/package.json +21 -21
  255. package/node_modules/@deepseek-ai/dsh-credentials/package.json +4 -4
  256. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +12 -12
  257. package/node_modules/@deepseek-ai/dsh-cua/README.i18n.yaml +10 -10
  258. package/node_modules/@deepseek-ai/dsh-cua/README.md +16 -7
  259. package/node_modules/@deepseek-ai/dsh-cua/README.zh.md +16 -7
  260. package/node_modules/@deepseek-ai/dsh-cua/lib/client.js +18 -38
  261. package/node_modules/@deepseek-ai/dsh-cua/lib/index.js +342 -146
  262. package/node_modules/@deepseek-ai/dsh-cua/lib/typert.host.js +19 -20
  263. package/node_modules/@deepseek-ai/dsh-cua/lib/typert.remote-client.js +13 -14
  264. package/node_modules/@deepseek-ai/dsh-cua/package.json +53 -50
  265. package/node_modules/@deepseek-ai/dsh-cua-bundle/README.i18n.yaml +8 -8
  266. package/node_modules/@deepseek-ai/dsh-cua-bundle/README.md +9 -9
  267. package/node_modules/@deepseek-ai/dsh-cua-bundle/README.zh.md +9 -9
  268. package/node_modules/@deepseek-ai/dsh-cua-bundle/package.json +12 -8
  269. package/node_modules/@deepseek-ai/dsh-deepseek-account/package.json +11 -11
  270. package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/package.json +12 -12
  271. package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/package.json +3 -3
  272. package/node_modules/@deepseek-ai/dsh-deliverable-file-references/package.json +5 -5
  273. package/node_modules/@deepseek-ai/dsh-deque/package.json +3 -3
  274. package/node_modules/@deepseek-ai/dsh-experimental-agent-team/package.json +22 -22
  275. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/docs/DETAIL.md +0 -17
  276. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/docs/DETAIL.zh.md +0 -17
  277. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/de.json +1 -1
  278. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/en.json +1 -1
  279. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/es.json +1 -1
  280. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/fr.json +1 -1
  281. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/ja.json +1 -1
  282. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/pt.json +1 -1
  283. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/ru.json +1 -1
  284. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/locale/zh.json +1 -1
  285. package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/package.json +7 -7
  286. package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/lib/typert.host.js +4 -4
  287. package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/lib/typert.remote-client.js +4 -4
  288. package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/package.json +8 -8
  289. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/docs/DETAIL.md +0 -16
  290. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/docs/DETAIL.zh.md +0 -16
  291. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/locale/de.json +1 -1
  292. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/locale/en.json +1 -1
  293. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/locale/es.json +1 -1
  294. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/locale/fr.json +1 -1
  295. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/locale/ja.json +1 -1
  296. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/locale/pt.json +1 -1
  297. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/locale/ru.json +1 -1
  298. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/locale/zh.json +1 -1
  299. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/package.json +45 -45
  300. package/node_modules/@deepseek-ai/dsh-experimental-badge-skill-bundle/package.json +4 -4
  301. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/package.json +12 -12
  302. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/package.json +20 -20
  303. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.i18n.yaml +37 -0
  304. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.md +135 -0
  305. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.zh.md +135 -0
  306. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/client.js +8745 -0
  307. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/index.js +3131 -0
  308. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/typert.host.js +2222 -0
  309. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/typert.remote-client.js +1284 -0
  310. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/locale/de.json +6 -0
  311. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/locale/en.json +6 -0
  312. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/locale/es.json +6 -0
  313. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/locale/fr.json +6 -0
  314. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/locale/ja.json +6 -0
  315. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/locale/pt.json +6 -0
  316. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/locale/ru.json +6 -0
  317. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/locale/zh.json +6 -0
  318. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/package.json +117 -0
  319. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/README.i18n.yaml +43 -0
  320. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/README.md +121 -0
  321. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/README.zh.md +121 -0
  322. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/lib/client.js +6272 -0
  323. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/lib/index.js +6 -0
  324. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/locale/de.json +6 -0
  325. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/locale/en.json +6 -0
  326. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/locale/es.json +6 -0
  327. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/locale/fr.json +6 -0
  328. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/locale/ja.json +6 -0
  329. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/locale/pt.json +6 -0
  330. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/locale/ru.json +6 -0
  331. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/locale/zh.json +6 -0
  332. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-stats/package.json +71 -0
  333. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/lib/client.js +4 -4
  334. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/package.json +15 -15
  335. package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/docs/DETAIL.md +0 -17
  336. package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/docs/DETAIL.zh.md +0 -17
  337. package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/locale/de.json +1 -1
  338. package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/locale/en.json +1 -1
  339. package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/locale/es.json +1 -1
  340. package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/locale/fr.json +1 -1
  341. package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/locale/ja.json +1 -1
  342. package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/locale/pt.json +1 -1
  343. package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/locale/ru.json +1 -1
  344. package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/locale/zh.json +1 -1
  345. package/node_modules/@deepseek-ai/dsh-experimental-cot-translation-bundle/package.json +6 -6
  346. package/node_modules/@deepseek-ai/dsh-experimental-forge/README.i18n.yaml +37 -0
  347. package/node_modules/@deepseek-ai/dsh-experimental-forge/README.md +100 -0
  348. package/node_modules/@deepseek-ai/dsh-experimental-forge/README.zh.md +100 -0
  349. package/node_modules/@deepseek-ai/dsh-experimental-forge/lib/index.js +495 -0
  350. package/node_modules/@deepseek-ai/dsh-experimental-forge/locale/de.json +6 -0
  351. package/node_modules/@deepseek-ai/dsh-experimental-forge/locale/en.json +6 -0
  352. package/node_modules/@deepseek-ai/dsh-experimental-forge/locale/es.json +6 -0
  353. package/node_modules/@deepseek-ai/dsh-experimental-forge/locale/fr.json +6 -0
  354. package/node_modules/@deepseek-ai/dsh-experimental-forge/locale/ja.json +6 -0
  355. package/node_modules/@deepseek-ai/dsh-experimental-forge/locale/pt.json +6 -0
  356. package/node_modules/@deepseek-ai/dsh-experimental-forge/locale/ru.json +6 -0
  357. package/node_modules/@deepseek-ai/dsh-experimental-forge/locale/zh.json +6 -0
  358. package/node_modules/@deepseek-ai/dsh-experimental-forge/package.json +45 -0
  359. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/README.i18n.yaml +37 -0
  360. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/README.md +77 -0
  361. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/README.zh.md +77 -0
  362. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/cordis.patch.yml +17 -0
  363. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/icon.svg +11 -0
  364. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/lib/index.js +1 -0
  365. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/de.json +6 -0
  366. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/en.json +6 -0
  367. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/es.json +6 -0
  368. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/fr.json +6 -0
  369. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/ja.json +6 -0
  370. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/pt.json +6 -0
  371. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/ru.json +6 -0
  372. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/locale/zh.json +6 -0
  373. package/node_modules/@deepseek-ai/dsh-experimental-forge-bundle/package.json +53 -0
  374. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/README.i18n.yaml +37 -0
  375. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/README.md +105 -0
  376. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/README.zh.md +105 -0
  377. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/lib/index.js +813 -0
  378. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/locale/de.json +6 -0
  379. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/locale/en.json +6 -0
  380. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/locale/es.json +6 -0
  381. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/locale/fr.json +6 -0
  382. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/locale/ja.json +6 -0
  383. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/locale/pt.json +6 -0
  384. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/locale/ru.json +6 -0
  385. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/locale/zh.json +6 -0
  386. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/package.json +47 -0
  387. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/README.i18n.yaml +37 -0
  388. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/README.md +105 -0
  389. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/README.zh.md +105 -0
  390. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/lib/index.js +844 -0
  391. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/locale/de.json +6 -0
  392. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/locale/en.json +6 -0
  393. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/locale/es.json +6 -0
  394. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/locale/fr.json +6 -0
  395. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/locale/ja.json +6 -0
  396. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/locale/pt.json +6 -0
  397. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/locale/ru.json +6 -0
  398. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/locale/zh.json +6 -0
  399. package/node_modules/@deepseek-ai/dsh-experimental-forge-session/package.json +88 -0
  400. package/node_modules/@deepseek-ai/dsh-experimental-inspector/package.json +17 -17
  401. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/README.i18n.yaml +5 -5
  402. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/README.md +3 -3
  403. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/README.zh.md +2 -2
  404. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/cordis.patch.yml +2 -0
  405. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/docs/DETAIL.md +0 -15
  406. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/docs/DETAIL.zh.md +0 -15
  407. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/locale/de.json +1 -1
  408. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/locale/en.json +1 -1
  409. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/locale/es.json +1 -1
  410. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/locale/fr.json +1 -1
  411. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/locale/ja.json +1 -1
  412. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/locale/pt.json +1 -1
  413. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/locale/ru.json +1 -1
  414. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/locale/zh.json +1 -1
  415. package/node_modules/@deepseek-ai/dsh-experimental-inspector-profile/package.json +7 -6
  416. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/README.i18n.yaml +52 -0
  417. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/README.md +177 -0
  418. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/README.zh.md +177 -0
  419. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/cordis.patch.yml +17 -0
  420. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/icon.svg +12 -0
  421. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/client.js +7130 -0
  422. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/index.js +7781 -0
  423. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/owner-gateway/cli.js +370 -0
  424. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/retry-backoff-ccJYtzOj.js +121 -0
  425. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/typert.host.js +767 -0
  426. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/typert.remote-client.js +551 -0
  427. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/viewer-declarations-krUNq6VU.js +287 -0
  428. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/viewer-declarations.js +26 -0
  429. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/locale/de.json +6 -0
  430. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/locale/en.json +6 -0
  431. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/locale/es.json +6 -0
  432. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/locale/fr.json +6 -0
  433. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/locale/ja.json +6 -0
  434. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/locale/pt.json +6 -0
  435. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/locale/ru.json +6 -0
  436. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/locale/zh.json +6 -0
  437. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/package.json +160 -0
  438. package/node_modules/@deepseek-ai/dsh-experimental-liveshare-protocol/README.i18n.yaml +37 -0
  439. package/node_modules/@deepseek-ai/dsh-experimental-liveshare-protocol/README.md +93 -0
  440. package/node_modules/@deepseek-ai/dsh-experimental-liveshare-protocol/README.zh.md +93 -0
  441. package/node_modules/@deepseek-ai/dsh-experimental-liveshare-protocol/lib/index.js +738 -0
  442. package/node_modules/@deepseek-ai/dsh-experimental-liveshare-protocol/package.json +37 -0
  443. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/docs/DETAIL.md +1 -18
  444. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/docs/DETAIL.zh.md +1 -18
  445. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/docs/preview.svg +1 -1
  446. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/docs/preview.zh.svg +1 -1
  447. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/locale/de.json +1 -1
  448. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/locale/en.json +1 -1
  449. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/locale/es.json +1 -1
  450. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/locale/fr.json +1 -1
  451. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/locale/ja.json +1 -1
  452. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/locale/pt.json +1 -1
  453. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/locale/ru.json +1 -1
  454. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/locale/zh.json +1 -1
  455. package/node_modules/@deepseek-ai/dsh-experimental-plugin-market-bundle/package.json +5 -5
  456. package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/docs/DETAIL.md +0 -16
  457. package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/docs/DETAIL.zh.md +0 -16
  458. package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/locale/de.json +1 -1
  459. package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/locale/en.json +1 -1
  460. package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/locale/es.json +1 -1
  461. package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/locale/fr.json +1 -1
  462. package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/locale/ja.json +1 -1
  463. package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/locale/pt.json +1 -1
  464. package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/locale/ru.json +1 -1
  465. package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/locale/zh.json +1 -1
  466. package/node_modules/@deepseek-ai/dsh-experimental-ralph-bundle/package.json +5 -5
  467. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/package.json +12 -12
  468. package/node_modules/@deepseek-ai/dsh-experimental-session-search/docs/DETAIL.md +0 -16
  469. package/node_modules/@deepseek-ai/dsh-experimental-session-search/docs/DETAIL.zh.md +0 -16
  470. package/node_modules/@deepseek-ai/dsh-experimental-session-search/locale/de.json +1 -1
  471. package/node_modules/@deepseek-ai/dsh-experimental-session-search/locale/en.json +1 -1
  472. package/node_modules/@deepseek-ai/dsh-experimental-session-search/locale/es.json +1 -1
  473. package/node_modules/@deepseek-ai/dsh-experimental-session-search/locale/fr.json +1 -1
  474. package/node_modules/@deepseek-ai/dsh-experimental-session-search/locale/ja.json +1 -1
  475. package/node_modules/@deepseek-ai/dsh-experimental-session-search/locale/pt.json +1 -1
  476. package/node_modules/@deepseek-ai/dsh-experimental-session-search/locale/ru.json +1 -1
  477. package/node_modules/@deepseek-ai/dsh-experimental-session-search/locale/zh.json +1 -1
  478. package/node_modules/@deepseek-ai/dsh-experimental-session-search/package.json +5 -5
  479. package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/docs/DETAIL.md +0 -10
  480. package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/docs/DETAIL.zh.md +0 -10
  481. package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/locale/de.json +1 -1
  482. package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/locale/en.json +1 -1
  483. package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/locale/es.json +1 -1
  484. package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/locale/fr.json +1 -1
  485. package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/locale/ja.json +1 -1
  486. package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/locale/pt.json +1 -1
  487. package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/locale/ru.json +1 -1
  488. package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/locale/zh.json +1 -1
  489. package/node_modules/@deepseek-ai/dsh-experimental-session-titles-bundle/package.json +4 -4
  490. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/package.json +11 -11
  491. package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/package.json +10 -10
  492. package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/docs/DETAIL.md +0 -16
  493. package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/docs/DETAIL.zh.md +0 -16
  494. package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/locale/de.json +1 -1
  495. package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/locale/en.json +1 -1
  496. package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/locale/es.json +1 -1
  497. package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/locale/fr.json +1 -1
  498. package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/locale/ja.json +1 -1
  499. package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/locale/pt.json +1 -1
  500. package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/locale/ru.json +1 -1
  501. package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/locale/zh.json +1 -1
  502. package/node_modules/@deepseek-ai/dsh-experimental-terminal-bundle/package.json +6 -6
  503. package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/package.json +25 -25
  504. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/docs/DETAIL.md +0 -15
  505. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/docs/DETAIL.zh.md +0 -15
  506. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/lib/index.js +2 -2
  507. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/locale/de.json +1 -1
  508. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/locale/en.json +1 -1
  509. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/locale/es.json +1 -1
  510. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/locale/fr.json +1 -1
  511. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/locale/ja.json +1 -1
  512. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/locale/pt.json +1 -1
  513. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/locale/ru.json +1 -1
  514. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/locale/zh.json +1 -1
  515. package/node_modules/@deepseek-ai/dsh-experimental-tool-worktree/package.json +23 -23
  516. package/node_modules/@deepseek-ai/dsh-experimental-translator/package.json +29 -29
  517. package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/package.json +8 -8
  518. package/node_modules/@deepseek-ai/dsh-experimental-worktree/README.i18n.yaml +4 -4
  519. package/node_modules/@deepseek-ai/dsh-experimental-worktree/README.md +5 -3
  520. package/node_modules/@deepseek-ai/dsh-experimental-worktree/README.zh.md +5 -3
  521. package/node_modules/@deepseek-ai/dsh-experimental-worktree/lib/index.js +213 -54
  522. package/node_modules/@deepseek-ai/dsh-experimental-worktree/package.json +24 -25
  523. package/node_modules/@deepseek-ai/dsh-file-reference/package.json +5 -5
  524. package/node_modules/@deepseek-ai/dsh-file-reference-local/package.json +17 -17
  525. package/node_modules/@deepseek-ai/dsh-fs/package.json +9 -9
  526. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +7 -7
  527. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +6 -6
  528. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +12 -12
  529. package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +7 -3
  530. package/node_modules/@deepseek-ai/dsh-goal/package.json +23 -23
  531. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +17 -17
  532. package/node_modules/@deepseek-ai/dsh-harness-dev-context/package.json +13 -13
  533. package/node_modules/@deepseek-ai/dsh-headless/package.json +30 -30
  534. package/node_modules/@deepseek-ai/dsh-hmr/package.json +15 -15
  535. package/node_modules/@deepseek-ai/dsh-home-paths/package.json +3 -3
  536. package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +3 -3
  537. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +20 -20
  538. package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +5 -5
  539. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/README.i18n.yaml +4 -4
  540. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/README.md +2 -1
  541. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/README.zh.md +2 -1
  542. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/lib/index.js +5 -1
  543. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +5 -5
  544. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +10 -10
  545. package/node_modules/@deepseek-ai/dsh-host-open-in-app/package.json +9 -9
  546. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/README.i18n.yaml +2 -2
  547. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/README.md +2 -0
  548. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/README.zh.md +2 -0
  549. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/index.js +10 -1
  550. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/typert.host.js +1 -0
  551. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/typert.remote-client.js +1 -0
  552. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/lib/types/index.js +13 -1
  553. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +13 -13
  554. package/node_modules/@deepseek-ai/dsh-host-product-telemetry-otel/package.json +8 -8
  555. package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +5 -5
  556. package/node_modules/@deepseek-ai/dsh-http-proxy/package.json +3 -3
  557. package/node_modules/@deepseek-ai/dsh-jobs/package.json +11 -11
  558. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +16 -16
  559. package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +3 -3
  560. package/node_modules/@deepseek-ai/dsh-lazy-require/package.json +3 -3
  561. package/node_modules/@deepseek-ai/dsh-llm/README.i18n.yaml +2 -2
  562. package/node_modules/@deepseek-ai/dsh-llm/README.md +1 -1
  563. package/node_modules/@deepseek-ai/dsh-llm/README.zh.md +1 -1
  564. package/node_modules/@deepseek-ai/dsh-llm/lib/index.js +6 -1
  565. package/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +40 -3
  566. package/node_modules/@deepseek-ai/dsh-llm/lib/types/index.js +4 -0
  567. package/node_modules/@deepseek-ai/dsh-llm/package.json +11 -10
  568. package/node_modules/@deepseek-ai/dsh-llm-cursor/package.json +25 -25
  569. package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.i18n.yaml +2 -2
  570. package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.md +1 -1
  571. package/node_modules/@deepseek-ai/dsh-llm-deepseek/README.zh.md +1 -1
  572. package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +264 -93
  573. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +45 -45
  574. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/README.i18n.yaml +2 -2
  575. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/README.md +4 -2
  576. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/README.zh.md +4 -2
  577. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/lib/index.js +8 -15
  578. package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/package.json +17 -17
  579. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/README.i18n.yaml +2 -2
  580. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/README.md +2 -2
  581. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/README.zh.md +2 -2
  582. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/lib/index.js +12 -17
  583. package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/package.json +14 -14
  584. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +28 -28
  585. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +25 -25
  586. package/node_modules/@deepseek-ai/dsh-mcp-client/README.i18n.yaml +2 -2
  587. package/node_modules/@deepseek-ai/dsh-mcp-client/README.md +1 -1
  588. package/node_modules/@deepseek-ai/dsh-mcp-client/README.zh.md +1 -1
  589. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js +3 -2
  590. package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +24 -24
  591. package/node_modules/@deepseek-ai/dsh-mcp-resources/README.i18n.yaml +2 -2
  592. package/node_modules/@deepseek-ai/dsh-mcp-resources/README.md +1 -1
  593. package/node_modules/@deepseek-ai/dsh-mcp-resources/README.zh.md +1 -1
  594. package/node_modules/@deepseek-ai/dsh-mcp-resources/package.json +16 -16
  595. package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +19 -19
  596. package/node_modules/@deepseek-ai/dsh-message-quotes/package.json +9 -9
  597. package/node_modules/@deepseek-ai/dsh-native-command/package.json +4 -4
  598. package/node_modules/@deepseek-ai/dsh-no-progress-reminder/lib/index.js +6 -1
  599. package/node_modules/@deepseek-ai/dsh-no-progress-reminder/package.json +15 -15
  600. package/node_modules/@deepseek-ai/dsh-office-to-pdf/package.json +11 -11
  601. package/node_modules/@deepseek-ai/dsh-official-bundles/README.i18n.yaml +2 -2
  602. package/node_modules/@deepseek-ai/dsh-official-bundles/README.md +1 -1
  603. package/node_modules/@deepseek-ai/dsh-official-bundles/README.zh.md +1 -1
  604. package/node_modules/@deepseek-ai/dsh-official-bundles/lib/index.js +6 -2
  605. package/node_modules/@deepseek-ai/dsh-official-bundles/package.json +4 -4
  606. package/node_modules/@deepseek-ai/dsh-otel/package.json +5 -5
  607. package/node_modules/@deepseek-ai/dsh-output-retention/package.json +3 -3
  608. package/node_modules/@deepseek-ai/dsh-package-manifest/README.i18n.yaml +2 -2
  609. package/node_modules/@deepseek-ai/dsh-package-manifest/README.md +1 -0
  610. package/node_modules/@deepseek-ai/dsh-package-manifest/README.zh.md +1 -0
  611. package/node_modules/@deepseek-ai/dsh-package-manifest/package.json +3 -3
  612. package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +7 -3
  613. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +23 -23
  614. package/node_modules/@deepseek-ai/dsh-persona/package.json +7 -7
  615. package/node_modules/@deepseek-ai/dsh-personalized-recommendations/package.json +23 -23
  616. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +24 -24
  617. package/node_modules/@deepseek-ai/dsh-plugin-detail/package.json +3 -3
  618. package/node_modules/@deepseek-ai/dsh-plugin-manager/README.i18n.yaml +6 -6
  619. package/node_modules/@deepseek-ai/dsh-plugin-manager/README.md +8 -2
  620. package/node_modules/@deepseek-ai/dsh-plugin-manager/README.zh.md +8 -2
  621. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/index.js +166 -34
  622. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.host.js +60 -37
  623. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.remote-client.js +37 -35
  624. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/diagnostic.js +72 -0
  625. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/index.js +137 -31
  626. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/operations.js +26 -4
  627. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/tools.js +1 -0
  628. package/node_modules/@deepseek-ai/dsh-plugin-manager/package.json +43 -39
  629. package/node_modules/@deepseek-ai/dsh-plugin-market/package.json +31 -31
  630. package/node_modules/@deepseek-ai/dsh-plugin-market-index/package.json +4 -4
  631. package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/package.json +19 -19
  632. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/README.i18n.yaml +2 -2
  633. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/README.md +1 -1
  634. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/README.zh.md +1 -1
  635. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/lib/typert.host.js +7 -3
  636. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/package.json +17 -17
  637. package/node_modules/@deepseek-ai/dsh-ptc-runtime/README.i18n.yaml +10 -10
  638. package/node_modules/@deepseek-ai/dsh-ptc-runtime/README.md +5 -5
  639. package/node_modules/@deepseek-ai/dsh-ptc-runtime/README.zh.md +5 -5
  640. package/node_modules/@deepseek-ai/dsh-ptc-runtime/lib/index.js +4 -0
  641. package/node_modules/@deepseek-ai/dsh-ptc-runtime/package.json +5 -5
  642. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.i18n.yaml +29 -29
  643. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.md +50 -22
  644. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/README.zh.md +49 -21
  645. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/configuration.js +24 -0
  646. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/index.js +413 -597
  647. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/persistent-process.js +5853 -125
  648. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/lib/process.js +5865 -91
  649. package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/package.json +31 -24
  650. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +11 -11
  651. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +14 -14
  652. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/lib/index.js +6 -1
  653. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +12 -12
  654. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +8 -8
  655. package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/package.json +25 -25
  656. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +12 -12
  657. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +14 -14
  658. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/index.js +1 -1
  659. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/runner.js +1 -1
  660. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/types-DFdfvhLN.js +1411 -0
  661. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +14 -14
  662. package/node_modules/@deepseek-ai/dsh-schedule/package.json +37 -37
  663. package/node_modules/@deepseek-ai/dsh-scope/package.json +3 -3
  664. package/node_modules/@deepseek-ai/dsh-sdk-app/package.json +19 -19
  665. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/package.json +33 -33
  666. package/node_modules/@deepseek-ai/dsh-sdk-minimal/package.json +39 -39
  667. package/node_modules/@deepseek-ai/dsh-sdk-protocol/package.json +11 -11
  668. package/node_modules/@deepseek-ai/dsh-session/package.json +10 -10
  669. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +19 -19
  670. package/node_modules/@deepseek-ai/dsh-session-format/package.json +4 -4
  671. package/node_modules/@deepseek-ai/dsh-session-format-catalog/package.json +11 -11
  672. package/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/package.json +7 -7
  673. package/node_modules/@deepseek-ai/dsh-session-format-v1-to-v2/package.json +8 -8
  674. package/node_modules/@deepseek-ai/dsh-session-format-v2-to-v3/package.json +6 -6
  675. package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/package.json +5 -5
  676. package/node_modules/@deepseek-ai/dsh-session-log-deepseek/package.json +18 -18
  677. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +24 -24
  678. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +11 -11
  679. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +6 -1
  680. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +13 -13
  681. package/node_modules/@deepseek-ai/dsh-session-projection/README.i18n.yaml +5 -2
  682. package/node_modules/@deepseek-ai/dsh-session-projection/README.md +15 -0
  683. package/node_modules/@deepseek-ai/dsh-session-projection/README.zh.md +15 -0
  684. package/node_modules/@deepseek-ai/dsh-session-projection/lib/index.js +4 -2
  685. package/node_modules/@deepseek-ai/dsh-session-projection/lib/types/index.js +3 -1
  686. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +6 -6
  687. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +13 -13
  688. package/node_modules/@deepseek-ai/dsh-session-query/package.json +20 -20
  689. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +13 -13
  690. package/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +7 -3
  691. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +41 -41
  692. package/node_modules/@deepseek-ai/dsh-session-stats/package.json +11 -11
  693. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +7 -7
  694. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +25 -25
  695. package/node_modules/@deepseek-ai/dsh-session-title/package.json +17 -17
  696. package/node_modules/@deepseek-ai/dsh-session-title-all-prompts-llm/package.json +15 -15
  697. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +20 -20
  698. package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +13 -13
  699. package/node_modules/@deepseek-ai/dsh-session-turn-outline/package.json +11 -11
  700. package/node_modules/@deepseek-ai/dsh-settings/package.json +17 -17
  701. package/node_modules/@deepseek-ai/dsh-shell/package.json +7 -7
  702. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +14 -14
  703. package/node_modules/@deepseek-ai/dsh-skill/README.i18n.yaml +2 -2
  704. package/node_modules/@deepseek-ai/dsh-skill/README.md +1 -1
  705. package/node_modules/@deepseek-ai/dsh-skill/README.zh.md +1 -1
  706. package/node_modules/@deepseek-ai/dsh-skill/package.json +9 -9
  707. package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +5 -5
  708. package/node_modules/@deepseek-ai/dsh-skill-filesystem/README.i18n.yaml +4 -4
  709. package/node_modules/@deepseek-ai/dsh-skill-filesystem/README.md +3 -2
  710. package/node_modules/@deepseek-ai/dsh-skill-filesystem/README.zh.md +3 -2
  711. package/node_modules/@deepseek-ai/dsh-skill-filesystem/lib/index.js +14 -3
  712. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +10 -10
  713. package/node_modules/@deepseek-ai/dsh-skill-office/package.json +10 -10
  714. package/node_modules/@deepseek-ai/dsh-spill/package.json +9 -9
  715. package/node_modules/@deepseek-ai/dsh-spill-local/package.json +11 -11
  716. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +35 -35
  717. package/node_modules/@deepseek-ai/dsh-storage/README.i18n.yaml +2 -2
  718. package/node_modules/@deepseek-ai/dsh-storage/README.md +1 -1
  719. package/node_modules/@deepseek-ai/dsh-storage/README.zh.md +1 -1
  720. package/node_modules/@deepseek-ai/dsh-storage/package.json +3 -3
  721. package/node_modules/@deepseek-ai/dsh-storage-domain/README.i18n.yaml +4 -4
  722. package/node_modules/@deepseek-ai/dsh-storage-domain/README.md +3 -3
  723. package/node_modules/@deepseek-ai/dsh-storage-domain/README.zh.md +3 -3
  724. package/node_modules/@deepseek-ai/dsh-storage-domain/lib/index.js +10 -12
  725. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +6 -6
  726. package/node_modules/@deepseek-ai/dsh-storage-json/README.i18n.yaml +10 -10
  727. package/node_modules/@deepseek-ai/dsh-storage-json/README.md +9 -7
  728. package/node_modules/@deepseek-ai/dsh-storage-json/README.zh.md +9 -7
  729. package/node_modules/@deepseek-ai/dsh-storage-json/lib/index.js +50 -49
  730. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +6 -6
  731. package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +7 -3
  732. package/node_modules/@deepseek-ai/dsh-subagent/package.json +51 -51
  733. package/node_modules/@deepseek-ai/dsh-subagent-acp/package.json +24 -24
  734. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +15 -15
  735. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +19 -19
  736. package/node_modules/@deepseek-ai/dsh-subprocess/package.json +6 -6
  737. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +9 -9
  738. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +8 -8
  739. package/node_modules/@deepseek-ai/dsh-terminal/package.json +8 -8
  740. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +22 -22
  741. package/node_modules/@deepseek-ai/dsh-time-context/package.json +23 -23
  742. package/node_modules/@deepseek-ai/dsh-timeout/package.json +3 -3
  743. package/node_modules/@deepseek-ai/dsh-tmux-context/lib/index.js +6 -1
  744. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +14 -14
  745. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +17 -17
  746. package/node_modules/@deepseek-ai/dsh-tool-ask-user/README.i18n.yaml +2 -2
  747. package/node_modules/@deepseek-ai/dsh-tool-ask-user/README.md +1 -1
  748. package/node_modules/@deepseek-ai/dsh-tool-ask-user/README.zh.md +1 -1
  749. package/node_modules/@deepseek-ai/dsh-tool-ask-user/lib/index.js +2 -2
  750. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +13 -13
  751. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +37 -37
  752. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +27 -27
  753. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +10 -10
  754. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +789 -26
  755. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +17 -17
  756. package/node_modules/@deepseek-ai/dsh-tool-executor-native/package.json +5 -5
  757. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/README.i18n.yaml +6 -6
  758. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/README.md +5 -3
  759. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/README.zh.md +5 -3
  760. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/lib/index.js +9 -3
  761. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/lib/types/errors.js +2 -1
  762. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/lib/types/ptc.js +7 -2
  763. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/lib/types/ts-types.js +1 -1
  764. package/node_modules/@deepseek-ai/dsh-tool-executor-ptc/package.json +28 -28
  765. package/node_modules/@deepseek-ai/dsh-tool-fs/README.i18n.yaml +4 -4
  766. package/node_modules/@deepseek-ai/dsh-tool-fs/README.md +1 -1
  767. package/node_modules/@deepseek-ai/dsh-tool-fs/README.zh.md +3 -3
  768. package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +8 -5
  769. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +36 -36
  770. package/node_modules/@deepseek-ai/dsh-tool-fs-search/README.i18n.yaml +9 -6
  771. package/node_modules/@deepseek-ai/dsh-tool-fs-search/README.md +19 -1
  772. package/node_modules/@deepseek-ai/dsh-tool-fs-search/README.zh.md +19 -1
  773. package/node_modules/@deepseek-ai/dsh-tool-fs-search/lib/index.js +21 -8
  774. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +31 -31
  775. package/node_modules/@deepseek-ai/dsh-tool-goal/README.i18n.yaml +2 -2
  776. package/node_modules/@deepseek-ai/dsh-tool-goal/README.md +1 -1
  777. package/node_modules/@deepseek-ai/dsh-tool-goal/README.zh.md +1 -1
  778. package/node_modules/@deepseek-ai/dsh-tool-goal/lib/index.js +5 -10
  779. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +20 -20
  780. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +19 -19
  781. package/node_modules/@deepseek-ai/dsh-tool-present/package.json +21 -21
  782. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +35 -35
  783. package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/package.json +28 -28
  784. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +24 -24
  785. package/node_modules/@deepseek-ai/dsh-tool-schedule/package.json +14 -14
  786. package/node_modules/@deepseek-ai/dsh-tool-session-query/package.json +27 -27
  787. package/node_modules/@deepseek-ai/dsh-tool-skill/README.i18n.yaml +23 -14
  788. package/node_modules/@deepseek-ai/dsh-tool-skill/README.md +27 -8
  789. package/node_modules/@deepseek-ai/dsh-tool-skill/README.zh.md +27 -8
  790. package/node_modules/@deepseek-ai/dsh-tool-skill/lib/index.js +27 -20
  791. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +18 -18
  792. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +23 -23
  793. package/node_modules/@deepseek-ai/dsh-tool-subagent/README.i18n.yaml +12 -12
  794. package/node_modules/@deepseek-ai/dsh-tool-subagent/README.md +7 -5
  795. package/node_modules/@deepseek-ai/dsh-tool-subagent/README.zh.md +7 -5
  796. package/node_modules/@deepseek-ai/dsh-tool-subagent/lib/index.js +145 -211
  797. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +25 -27
  798. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +22 -22
  799. package/node_modules/@deepseek-ai/dsh-tool-terminal/package.json +32 -32
  800. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +19 -19
  801. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +24 -24
  802. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +24 -24
  803. package/node_modules/@deepseek-ai/dsh-tool-working-directory/package.json +13 -13
  804. package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/package.json +12 -12
  805. package/node_modules/@deepseek-ai/dsh-tools/package.json +20 -20
  806. package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +2 -2
  807. package/node_modules/@deepseek-ai/dsh-tui-app/README.md +1 -1
  808. package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +1 -1
  809. package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +24 -8
  810. package/node_modules/@deepseek-ai/dsh-tui-app/package.json +85 -85
  811. package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +10 -10
  812. package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +4 -4
  813. package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +4 -4
  814. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +18 -18
  815. package/node_modules/@deepseek-ai/dsh-user-questions/README.i18n.yaml +2 -2
  816. package/node_modules/@deepseek-ai/dsh-user-questions/README.md +1 -1
  817. package/node_modules/@deepseek-ai/dsh-user-questions/README.zh.md +1 -1
  818. package/node_modules/@deepseek-ai/dsh-user-questions/lib/typert.host.js +7 -3
  819. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +18 -18
  820. package/node_modules/@deepseek-ai/dsh-util-code-language/package.json +3 -3
  821. package/node_modules/@deepseek-ai/dsh-util-crypto/package.json +3 -3
  822. package/node_modules/@deepseek-ai/dsh-util-time/package.json +3 -3
  823. package/node_modules/@deepseek-ai/dsh-util-values/package.json +3 -3
  824. package/node_modules/@deepseek-ai/dsh-util-workspace-path/package.json +3 -3
  825. package/node_modules/@deepseek-ai/dsh-web/package.json +6 -6
  826. package/node_modules/@deepseek-ai/dsh-web-app/cordis.patch.yml +0 -3
  827. package/node_modules/@deepseek-ai/dsh-web-app/package.json +150 -151
  828. package/node_modules/@deepseek-ai/dsh-web-deepseek-api/package.json +19 -19
  829. package/node_modules/@deepseek-ai/dsh-web-fetch-http/README.i18n.yaml +8 -8
  830. package/node_modules/@deepseek-ai/dsh-web-fetch-http/README.md +6 -3
  831. package/node_modules/@deepseek-ai/dsh-web-fetch-http/README.zh.md +6 -3
  832. package/node_modules/@deepseek-ai/dsh-web-fetch-http/lib/index.js +32 -21
  833. package/node_modules/@deepseek-ai/dsh-web-fetch-http/package.json +9 -9
  834. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{index-UeToUMuD.js → index--TtJvO-i.js} +84 -84
  835. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{index-91FlLSYh.css → index-Jtzf36XE.css} +1 -1
  836. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{graphql-BIiNFDN_.js → graphql-C-Uijqkk.js} +2 -2
  837. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{http-DIhnzaXE.js → http-CLu1VCSi.js} +2 -2
  838. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{php-B4EoFdzs.js → php-CjQPq1Mz.js} +2 -2
  839. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{rst-BHSXxbFM.js → rst-BuDKiyD7.js} +2 -2
  840. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{ruby-DYyEMX7k.js → ruby-ZtjE4NPI.js} +2 -2
  841. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{svelte-CwMGesqy.js → svelte-Tt81icjn.js} +2 -2
  842. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/langs/{vue-DgeFhH50.js → vue-B5SDFeDA.js} +2 -2
  843. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{vendor-D3p0kQ7Q.js → vendor-7utBqO4o.js} +25 -25
  844. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +3 -3
  845. package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +21 -20
  846. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +18 -18
  847. package/node_modules/@deepseek-ai/dsh-web-search-exa/package.json +9 -9
  848. package/node_modules/@deepseek-ai/dsh-web-search-perplexity/package.json +9 -9
  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/README.i18n.yaml +2 -2
  852. package/node_modules/@deepseek-ai/dsh-workflow-ptc/README.md +1 -1
  853. package/node_modules/@deepseek-ai/dsh-workflow-ptc/README.zh.md +1 -1
  854. package/node_modules/@deepseek-ai/dsh-workflow-ptc/lib/index.js +5 -1
  855. package/node_modules/@deepseek-ai/dsh-workflow-ptc/package.json +39 -39
  856. package/node_modules/@deepseek-ai/dsh-working-directory/package.json +21 -21
  857. package/node_modules/@deepseek-ai/dsh-workspace/package.json +14 -14
  858. package/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +23 -23
  859. package/node_modules/@deepseek-ai/schemastery/package.json +2 -2
  860. package/node_modules/acorn/CHANGELOG.md +1012 -0
  861. package/node_modules/acorn/LICENSE +21 -0
  862. package/node_modules/acorn/README.md +309 -0
  863. package/node_modules/acorn/bin/acorn +4 -0
  864. package/node_modules/acorn/dist/acorn.js +6370 -0
  865. package/node_modules/acorn/dist/acorn.mjs +6341 -0
  866. package/node_modules/acorn/dist/bin.js +90 -0
  867. package/node_modules/acorn/package.json +47 -0
  868. package/node_modules/acorn-walk/CHANGELOG.md +209 -0
  869. package/node_modules/{@deepseek-ai/dsh-experimental-worktree → acorn-walk}/LICENSE +5 -5
  870. package/node_modules/acorn-walk/README.md +124 -0
  871. package/node_modules/acorn-walk/dist/walk.js +485 -0
  872. package/node_modules/acorn-walk/dist/walk.mjs +467 -0
  873. package/node_modules/acorn-walk/package.json +47 -0
  874. package/node_modules/shell-quote/.github/FUNDING.yml +12 -0
  875. package/node_modules/shell-quote/LICENSE +24 -0
  876. package/node_modules/shell-quote/README.md +246 -0
  877. package/node_modules/shell-quote/index.js +4 -0
  878. package/node_modules/shell-quote/package.json +66 -0
  879. package/node_modules/shell-quote/parse.js +382 -0
  880. package/node_modules/shell-quote/quote.js +85 -0
  881. package/node_modules/shell-quote/tsconfig.json +10 -0
  882. package/package.json +346 -326
  883. package/node_modules/@deepseek-ai/dsh-client-ui-deepseek-model-label-1017/README.i18n.yaml +0 -37
  884. package/node_modules/@deepseek-ai/dsh-client-ui-deepseek-model-label-1017/README.md +0 -91
  885. package/node_modules/@deepseek-ai/dsh-client-ui-deepseek-model-label-1017/README.zh.md +0 -91
  886. package/node_modules/@deepseek-ai/dsh-client-ui-deepseek-model-label-1017/lib/client.js +0 -93
  887. package/node_modules/@deepseek-ai/dsh-client-ui-deepseek-model-label-1017/lib/index.js +0 -6
  888. package/node_modules/@deepseek-ai/dsh-client-ui-deepseek-model-label-1017/locale/de.json +0 -6
  889. package/node_modules/@deepseek-ai/dsh-client-ui-deepseek-model-label-1017/locale/en.json +0 -6
  890. package/node_modules/@deepseek-ai/dsh-client-ui-deepseek-model-label-1017/locale/es.json +0 -6
  891. package/node_modules/@deepseek-ai/dsh-client-ui-deepseek-model-label-1017/locale/fr.json +0 -6
  892. package/node_modules/@deepseek-ai/dsh-client-ui-deepseek-model-label-1017/locale/ja.json +0 -6
  893. package/node_modules/@deepseek-ai/dsh-client-ui-deepseek-model-label-1017/locale/pt.json +0 -6
  894. package/node_modules/@deepseek-ai/dsh-client-ui-deepseek-model-label-1017/locale/ru.json +0 -6
  895. package/node_modules/@deepseek-ai/dsh-client-ui-deepseek-model-label-1017/locale/zh.json +0 -6
  896. package/node_modules/@deepseek-ai/dsh-client-ui-deepseek-model-label-1017/package.json +0 -59
  897. package/node_modules/@deepseek-ai/dsh-experimental-worktree/lib/types/directory.d.ts +0 -7
  898. package/node_modules/@deepseek-ai/dsh-experimental-worktree/lib/types/index.d.ts +0 -54
  899. package/node_modules/@deepseek-ai/dsh-experimental-worktree/lib/types/process.d.ts +0 -29
  900. package/node_modules/@deepseek-ai/dsh-experimental-worktree/lib/types/types.d.ts +0 -20
@@ -0,0 +1,1411 @@
1
+ import { existsSync, mkdirSync, mkdtempSync, readFileSync, realpathSync, statSync, writeFileSync } from "node:fs";
2
+ import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
3
+ import { ERROR_INSUFFICIENT_BUFFER, Win32Error, allocPtrSlot, allocUint32, decodePtr, decodeUint32, drainPipe, extendWin32ProcessBindings, isNullPtr, isNullPtr as isNullPtr$1, spawnInheritedJobProcess, spawnPipedProcess, throwLastError, throwLastError as throwLastError$1, throwWin32, waitForProcessExit } from "@deepseek-ai/dsh-win32-process";
4
+ import { createHash } from "node:crypto";
5
+ import { createLazyRequire } from "@deepseek-ai/dsh-lazy-require";
6
+ import { readFile, rm } from "node:fs/promises";
7
+ import { tmpdir } from "node:os";
8
+ import { fileURLToPath } from "node:url";
9
+ import { BUNDLED_SKILL_RANK } from "@deepseek-ai/dsh-skill";
10
+ import { parse } from "yaml";
11
+ //#region lib/types/win32-abi.js
12
+ /** ACL/token-specific Win32 constants. */
13
+ /** OpenProcess access required to query the current process token. */
14
+ const PROCESS_QUERY_INFORMATION = 1024;
15
+ /** Group attribute identifying the token logon SID. */
16
+ const SE_GROUP_LOGON_ID = 3221225472;
17
+ /**
18
+ * Capability-SID access mask granting write, delete, and child deletion.
19
+ * WRITE_DAC and WRITE_OWNER stay excluded so a confined child cannot rewrite
20
+ * DACLs or take ownership to escape the allowlist.
21
+ */
22
+ const GRANT_MASK = 1114454;
23
+ /** Full access used in the restricted token default DACL. */
24
+ const FILE_ALL_ACCESS = 2032127;
25
+ //#endregion
26
+ //#region lib/types/ffi.js
27
+ /** ACL/token bindings layered on the shared Win32 process owner. */
28
+ const requireKoffi = createLazyRequire("koffi", import.meta.url);
29
+ let cachedTypes;
30
+ function ffiTypes() {
31
+ if (cachedTypes !== void 0) return cachedTypes;
32
+ const koffi = requireKoffi();
33
+ const PVOID = koffi.pointer("void");
34
+ return cachedTypes = {
35
+ PVOID,
36
+ PPVOID: koffi.pointer(PVOID)
37
+ };
38
+ }
39
+ /**
40
+ * Return whether CreateFileW produced INVALID_HANDLE_VALUE.
41
+ * @param handle - handle returned by CreateFileW.
42
+ * @returns true for null, zero, or the all-bits-one sentinel.
43
+ */
44
+ function isInvalidHandle(handle) {
45
+ if (isNullPtr(handle)) return true;
46
+ return handle === 18446744073709551615n || handle === -1n;
47
+ }
48
+ /**
49
+ * Encode a uint32 into an allocated slot.
50
+ * @param slot - slot allocated by allocUint32.
51
+ * @param value - unsigned value to store.
52
+ */
53
+ function encodeUint32(slot, value) {
54
+ requireKoffi().encode(slot, "uint32", value);
55
+ }
56
+ /**
57
+ * Return a Koffi pointer's numeric address for struct packing.
58
+ * @param ptr - native pointer.
59
+ * @returns pointer address.
60
+ */
61
+ function ptrAddress(ptr) {
62
+ return requireKoffi().address(ptr);
63
+ }
64
+ /**
65
+ * Allocate a raw byte block.
66
+ * @param length - byte count.
67
+ * @returns allocated pointer.
68
+ */
69
+ function allocBytes(length) {
70
+ return requireKoffi().alloc("uint8", length);
71
+ }
72
+ /**
73
+ * Allocate one zeroed x64 OVERLAPPED record.
74
+ * @returns allocated pointer.
75
+ * @remarks Koffi 3.1.1 crashes when LockFileEx or UnlockFileEx receives NULL;
76
+ * a zeroed OVERLAPPED is equivalent for the synchronous lock-file handle.
77
+ */
78
+ function allocOverlapped() {
79
+ return allocBytes(32);
80
+ }
81
+ /**
82
+ * Decode a pointer value from a Buffer field.
83
+ * @param buffer - encoded native record.
84
+ * @param offset - pointer field byte offset.
85
+ * @returns decoded pointer, or null for address zero.
86
+ */
87
+ function decodePtrAt(buffer, offset) {
88
+ const value = requireKoffi().decode(buffer, offset, ffiTypes().PVOID);
89
+ return isNullPtr(value) ? null : value;
90
+ }
91
+ /**
92
+ * Decode a uint8 field at a native pointer offset.
93
+ * @param ptr - native record pointer.
94
+ * @param offset - field byte offset.
95
+ * @returns decoded value.
96
+ */
97
+ function decodeUint8At(ptr, offset) {
98
+ return requireKoffi().decode(ptr, offset, "uint8");
99
+ }
100
+ /**
101
+ * Decode a uint16 field at a native pointer offset.
102
+ * @param ptr - native record pointer.
103
+ * @param offset - field byte offset.
104
+ * @returns decoded value.
105
+ */
106
+ function decodeUint16At(ptr, offset) {
107
+ return requireKoffi().decode(ptr, offset, "uint16");
108
+ }
109
+ /**
110
+ * Decode a uint32 field at a native pointer offset.
111
+ * @param ptr - native record pointer.
112
+ * @param offset - field byte offset.
113
+ * @returns decoded value.
114
+ */
115
+ function decodeUint32At(ptr, offset) {
116
+ return requireKoffi().decode(ptr, offset, "uint32");
117
+ }
118
+ /**
119
+ * Compare two in-memory SID records without allocating strings.
120
+ * @param left - first native buffer.
121
+ * @param leftOffset - first SID byte offset.
122
+ * @param right - second native buffer.
123
+ * @param rightOffset - second SID byte offset.
124
+ * @returns true when revision, authority, and every sub-authority match.
125
+ */
126
+ function sameSidAt(left, leftOffset, right, rightOffset) {
127
+ if (decodeUint8At(left, leftOffset) !== decodeUint8At(right, rightOffset)) return false;
128
+ const leftCount = decodeUint8At(left, leftOffset + 1);
129
+ if (leftCount !== decodeUint8At(right, rightOffset + 1) || leftCount > 15) return false;
130
+ for (let index = 0; index < 6; index += 1) if (decodeUint8At(left, leftOffset + 2 + index) !== decodeUint8At(right, rightOffset + 2 + index)) return false;
131
+ for (let index = 0; index < leftCount; index += 1) if (decodeUint32At(left, leftOffset + 8 + index * 4) !== decodeUint32At(right, rightOffset + 8 + index * 4)) return false;
132
+ return true;
133
+ }
134
+ let cached;
135
+ function bindings() {
136
+ if (cached !== void 0) return cached;
137
+ const koffi = requireKoffi();
138
+ const { PVOID, PPVOID } = ffiTypes();
139
+ cached = extendWin32ProcessBindings(({ kernel32, advapi32, bind }) => ({
140
+ openProcess: bind(kernel32, "OpenProcess", PVOID, [
141
+ "uint32",
142
+ "int",
143
+ "uint32"
144
+ ]),
145
+ openProcessToken: bind(advapi32, "OpenProcessToken", "int", [
146
+ PVOID,
147
+ "uint32",
148
+ PPVOID
149
+ ]),
150
+ localAlloc: bind(kernel32, "LocalAlloc", PVOID, ["uint32", "size_t"]),
151
+ localFree: bind(kernel32, "LocalFree", PVOID, [PVOID]),
152
+ convertStringSidToSidW: bind(advapi32, "ConvertStringSidToSidW", "int", ["str16", PPVOID]),
153
+ createWellKnownSid: bind(advapi32, "CreateWellKnownSid", "int", [
154
+ "int",
155
+ PVOID,
156
+ PVOID,
157
+ koffi.pointer("uint32")
158
+ ]),
159
+ isValidSid: bind(advapi32, "IsValidSid", "int", [PVOID]),
160
+ getLengthSid: bind(advapi32, "GetLengthSid", "uint32", [PVOID]),
161
+ copySid: bind(advapi32, "CopySid", "int", [
162
+ "uint32",
163
+ PVOID,
164
+ PVOID
165
+ ]),
166
+ getTokenInformation: bind(advapi32, "GetTokenInformation", "int", [
167
+ PVOID,
168
+ "int",
169
+ PVOID,
170
+ "uint32",
171
+ koffi.pointer("uint32")
172
+ ]),
173
+ setTokenInformation: bind(advapi32, "SetTokenInformation", "int", [
174
+ PVOID,
175
+ "int",
176
+ PVOID,
177
+ "uint32"
178
+ ]),
179
+ createRestrictedToken: bind(advapi32, "CreateRestrictedToken", "int", [
180
+ PVOID,
181
+ "uint32",
182
+ "uint32",
183
+ PVOID,
184
+ "uint32",
185
+ PVOID,
186
+ "uint32",
187
+ PVOID,
188
+ PPVOID
189
+ ]),
190
+ setEntriesInAclW: bind(advapi32, "SetEntriesInAclW", "uint32", [
191
+ "uint32",
192
+ PVOID,
193
+ PVOID,
194
+ PPVOID
195
+ ]),
196
+ initializeAcl: bind(advapi32, "InitializeAcl", "int", [
197
+ PVOID,
198
+ "uint32",
199
+ "uint32"
200
+ ]),
201
+ addMandatoryAce: bind(advapi32, "AddMandatoryAce", "int", [
202
+ PVOID,
203
+ "uint32",
204
+ "uint32",
205
+ "uint32",
206
+ PVOID
207
+ ]),
208
+ setNamedSecurityInfoW: bind(advapi32, "SetNamedSecurityInfoW", "uint32", [
209
+ "str16",
210
+ "int",
211
+ "uint32",
212
+ PVOID,
213
+ PVOID,
214
+ PVOID,
215
+ PVOID
216
+ ]),
217
+ getNamedSecurityInfoW: bind(advapi32, "GetNamedSecurityInfoW", "uint32", [
218
+ "str16",
219
+ "int",
220
+ "uint32",
221
+ PPVOID,
222
+ PPVOID,
223
+ PPVOID,
224
+ PPVOID,
225
+ PPVOID
226
+ ]),
227
+ getTempPathW: bind(kernel32, "GetTempPathW", "uint32", ["uint32", PVOID]),
228
+ setEnvironmentVariableW: bind(kernel32, "SetEnvironmentVariableW", "int", ["str16", "str16"]),
229
+ setConsoleCtrlHandler: bind(kernel32, "SetConsoleCtrlHandler", "int", [PVOID, "int"]),
230
+ createFileW: bind(kernel32, "CreateFileW", PVOID, [
231
+ "str16",
232
+ "uint32",
233
+ "uint32",
234
+ PVOID,
235
+ "uint32",
236
+ "uint32",
237
+ PVOID
238
+ ]),
239
+ lockFileEx: bind(kernel32, "LockFileEx", "int", [
240
+ PVOID,
241
+ "uint32",
242
+ "uint32",
243
+ "uint32",
244
+ "uint32",
245
+ PVOID
246
+ ]),
247
+ unlockFileEx: bind(kernel32, "UnlockFileEx", "int", [
248
+ PVOID,
249
+ "uint32",
250
+ "uint32",
251
+ "uint32",
252
+ PVOID
253
+ ])
254
+ }));
255
+ return cached;
256
+ }
257
+ /**
258
+ * Resolve the cached ACL/token binding table asynchronously.
259
+ * @returns generic process plus ACL/token bindings.
260
+ */
261
+ function win32() {
262
+ return Promise.resolve(bindings());
263
+ }
264
+ /**
265
+ * Resolve the cached ACL/token binding table synchronously.
266
+ * @returns generic process plus ACL/token bindings.
267
+ */
268
+ function win32Sync() {
269
+ return bindings();
270
+ }
271
+ /**
272
+ * Resolve the current Windows temporary directory.
273
+ * @param api - active ACL/token binding table.
274
+ * @returns UTF-16 path reported by GetTempPathW.
275
+ */
276
+ function getTempPath(api) {
277
+ const buffer = Buffer.alloc(261 * 2);
278
+ const length = api.getTempPathW(buffer.length / 2, buffer);
279
+ if (length === 0) throwLastError(api, "GetTempPathW");
280
+ if (length > buffer.length / 2) throw new Win32Error("GetTempPathW", ERROR_INSUFFICIENT_BUFFER, `required ${length} chars exceed the ${buffer.length / 2}-char buffer; nothing was written`);
281
+ return buffer.subarray(0, length * 2).toString("utf16le");
282
+ }
283
+ //#endregion
284
+ //#region lib/types/acl.js
285
+ /**
286
+ * ACL editing helpers: grant/revoke a capability SID on a directory via
287
+ * SetEntriesInAclW + SetNamedSecurityInfoW (the same calls the POC uses, with
288
+ * the failure handling the POC lacks). Every API call is checked and every
289
+ * failure is reported with the API name, the exact Win32 code, the formatted
290
+ * system text, and the affected path.
291
+ *
292
+ * Each grant applies three edits in ONE SetNamedSecurityInfoW call: the
293
+ * capability-SID allow ACE, a Deny ACE that removes the ambient
294
+ * `FILE_DELETE_CHILD` right from the world SID, and a Low no-write-up
295
+ * mandatory label ({@link buildLowLabelAcl}). The deny is what keeps one
296
+ * granted root out of another's reach: Windows also authorizes a delete from
297
+ * the parent directory's `FILE_DELETE_CHILD` right, which the token's
298
+ * write-restricted intersection does not reach, and every granted root carries
299
+ * the Low label that clears the integrity check.
300
+ *
301
+ * Concurrency: grants are read-merge-write against the directory's CURRENT
302
+ * DACL, and the whole get-merge-set sequence runs under a per-path exclusive
303
+ * LockFileEx lock (see {@link withPathLock}) so concurrent sandbox instances
304
+ * cannot clobber each other's ACEs.
305
+ * @module @deepseek-ai/dsh-sandbox-windows-acl/acl
306
+ */
307
+ /**
308
+ * Pack one EXPLICIT_ACCESS_W (48 bytes, layout verified by abi-probe.cpp):
309
+ * perms@0, mode@4, inheritance@8, Trustee@16 { pMultipleTrustee@16,
310
+ * MultipleTrusteeOperation@24, TrusteeForm@28, TrusteeType@32, ptstrName@40 }.
311
+ * `permissions` is the access mask; the POC passes 0 for REVOKE_ACCESS, which
312
+ * removes every ACE for the trustee. `inheritance` defaults to children of
313
+ * both kinds; the ambient-delete deny narrows it to containers because
314
+ * FILE_DELETE_CHILD is meaningless on a file and its bit would otherwise
315
+ * spread through the file's inherited mask.
316
+ * @param sidPtr - the trustee SID the entry names.
317
+ * @param mode - the access mode (GRANT_ACCESS, DENY_ACCESS, or REVOKE_ACCESS).
318
+ * @param permissions - the access mask to grant or deny (0 for REVOKE_ACCESS).
319
+ * @param inheritance - the ACE inheritance flags.
320
+ * @returns the packed entry buffer.
321
+ */
322
+ function buildExplicitAccess(sidPtr, mode, permissions, inheritance = 3) {
323
+ const entry = Buffer.alloc(48);
324
+ entry.writeUInt32LE(permissions, 0);
325
+ entry.writeUInt32LE(mode, 4);
326
+ entry.writeUInt32LE(inheritance, 8);
327
+ entry.writeUInt32LE(0, 24);
328
+ entry.writeUInt32LE(0, 28);
329
+ entry.writeUInt32LE(0, 32);
330
+ entry.writeBigUInt64LE(ptrAddress(sidPtr), 40);
331
+ return entry;
332
+ }
333
+ /**
334
+ * One lock file per protected path: `<GetTempPathW()>\dsh-acl-locks\<first 16
335
+ * hex of sha256(lowercased path)>.lock`. The lock root derives from
336
+ * GetTempPathW (never from runner argv or DSH_HOME), and the lowercasing
337
+ * maps Windows's case-insensitive path spellings onto one lock.
338
+ * @param api - the binding table.
339
+ * @param path - the protected directory (absolute).
340
+ * @returns the lock file path for that directory.
341
+ */
342
+ function lockFilePath(api, path) {
343
+ const digest = createHash("sha256").update(path.toLowerCase()).digest("hex").slice(0, 16);
344
+ return join(getTempPath(api), "dsh-acl-locks", `${digest}.lock`);
345
+ }
346
+ /**
347
+ * Run `action` holding the per-path exclusive lock: CreateFileW
348
+ * (OPEN_ALWAYS, shared read/write but NOT delete — a deletable lock file
349
+ * could be removed and recreated under the holder, letting two processes
350
+ * hold "the same" lock), then a one-byte LockFileEx
351
+ * (LOCKFILE_EXCLUSIVE_LOCK, zeroed OVERLAPPED = lock from offset 0 on the
352
+ * synchronous handle — see allocOverlapped for why not NULL), then
353
+ * UnlockFileEx + CloseHandle. Fail-closed: open/lock/unlock/close failures
354
+ * throw like every other Win32 call in this package; an `action` failure
355
+ * still unlocks (best-effort) and rethrows the original error.
356
+ * @param api - the binding table.
357
+ * @param path - the protected directory (absolute).
358
+ * @param action - the get-merge-set sequence to serialize.
359
+ * @returns the action's result.
360
+ */
361
+ function withPathLock(api, path, action) {
362
+ const lockPath = lockFilePath(api, path);
363
+ mkdirSync(dirname(lockPath), { recursive: true });
364
+ const handle = api.createFileW(lockPath, -1073741824, 3, null, 4, 0, null);
365
+ if (isInvalidHandle(handle)) throwLastError$1(api, "CreateFileW", lockPath);
366
+ const overlapped = allocOverlapped();
367
+ if (api.lockFileEx(handle, 2, 0, 1, 0, overlapped) === 0) {
368
+ const win32Code = api.getLastError();
369
+ api.closeHandle(handle);
370
+ throwWin32(api, "LockFileEx", win32Code, lockPath);
371
+ }
372
+ let result;
373
+ try {
374
+ result = action();
375
+ } catch (error) {
376
+ api.unlockFileEx(handle, 0, 1, 0, overlapped);
377
+ api.closeHandle(handle);
378
+ throw error;
379
+ }
380
+ if (api.unlockFileEx(handle, 0, 1, 0, overlapped) === 0) {
381
+ const win32Code = api.getLastError();
382
+ api.closeHandle(handle);
383
+ throwWin32(api, "UnlockFileEx", win32Code, lockPath);
384
+ }
385
+ if (api.closeHandle(handle) === 0) throwLastError$1(api, "CloseHandle", `lock file ${lockPath}`);
386
+ return result;
387
+ }
388
+ /**
389
+ * Read the directory's current explicit DACL and mandatory label via
390
+ * GetNamedSecurityInfoW.
391
+ * Allocation contract (the POC's RevokeAccess, minus its missing checks): the
392
+ * returned ACL pointer sits INSIDE the security descriptor allocation — only
393
+ * the descriptor may be LocalFree'd, and it must not be freed before
394
+ * SetEntriesInAclW has consumed the ACL. Freeing the ACL pointer itself
395
+ * corrupts the heap (verified the hard way).
396
+ * @param api - the binding table.
397
+ * @param path - the directory whose DACL and label are read.
398
+ * @returns the current explicit DACL and label ACL (null when the directory carries none) plus their owning descriptor.
399
+ */
400
+ function readCurrentSecurity(api, path) {
401
+ const ownerSlot = allocPtrSlot();
402
+ const groupSlot = allocPtrSlot();
403
+ const daclSlot = allocPtrSlot();
404
+ const saclSlot = allocPtrSlot();
405
+ const descriptorSlot = allocPtrSlot();
406
+ const readResult = api.getNamedSecurityInfoW(path, 1, 20, ownerSlot, groupSlot, daclSlot, saclSlot, descriptorSlot);
407
+ if (readResult !== 0) throwWin32(api, "GetNamedSecurityInfoW", readResult, path);
408
+ return {
409
+ oldAcl: decodePtr(daclSlot),
410
+ labelAcl: decodePtr(saclSlot),
411
+ descriptor: decodePtr(descriptorSlot)
412
+ };
413
+ }
414
+ /**
415
+ * Build the Low mandatory label applied with every write grant: one
416
+ * SYSTEM_MANDATORY_LABEL_ACE naming `lowLabelSidPtr` with the no-write-up
417
+ * policy, inheriting to subcontainers and objects so later children carry the
418
+ * same label. The caller frees the returned ACL with LocalFree
419
+ * (SetNamedSecurityInfoW copies it); every Win32 call is checked and a
420
+ * half-built ACL is released before the error is thrown.
421
+ * @param api - the binding table.
422
+ * @param lowLabelSidPtr - the Low integrity SID (S-1-16-4096) the label names.
423
+ * @returns the ACL carrying the single inheritable label ACE.
424
+ */
425
+ function buildLowLabelAcl(api, lowLabelSidPtr) {
426
+ const sidLength = api.getLengthSid(lowLabelSidPtr);
427
+ if (sidLength === 0) throwLastError$1(api, "GetLengthSid", "Low mandatory label SID");
428
+ const aclLength = 16 + sidLength;
429
+ const acl = api.localAlloc(64, aclLength);
430
+ if (isNullPtr$1(acl)) throwLastError$1(api, "LocalAlloc", "Low mandatory label ACL");
431
+ if (api.initializeAcl(acl, aclLength, 2) === 0) {
432
+ const win32Code = api.getLastError();
433
+ api.localFree(acl);
434
+ throwWin32(api, "InitializeAcl", win32Code, "Low mandatory label ACL");
435
+ }
436
+ if (api.addMandatoryAce(acl, 2, 3, 1, lowLabelSidPtr) === 0) {
437
+ const win32Code = api.getLastError();
438
+ api.localFree(acl);
439
+ throwWin32(api, "AddMandatoryAce", win32Code, "Low mandatory label ACL");
440
+ }
441
+ return acl;
442
+ }
443
+ /**
444
+ * True when the label ACL already carries the EXACT label this module would
445
+ * add (mandatory-label ACE, OI|CI inheritance, no-write-up policy, the Low
446
+ * SID), so a re-grant can skip the eager full-tree propagation.
447
+ * @param labelAcl - the current label ACL pointer (from {@link readCurrentSecurity}).
448
+ * @param lowLabelSidPtr - the Low integrity SID to match.
449
+ * @returns whether the exact label ACE is already present.
450
+ */
451
+ function hasExactLabel(labelAcl, lowLabelSidPtr) {
452
+ return hasExactEntry(labelAcl, 17, 3, 1, lowLabelSidPtr);
453
+ }
454
+ /**
455
+ * Shared tail of grantWrite and revokeWrite: merge `entries` into `oldAcl`
456
+ * (null = no explicit DACL yet; SetEntriesInAclW builds one from scratch),
457
+ * free the descriptor before applying the merged ACL, apply the merged DACL
458
+ * together with the label edit in one SetNamedSecurityInfoW call, then free
459
+ * every ACL this call owns — checking each call and reporting with the
460
+ * caller's label. The entry count derives from the buffer, so a grant can
461
+ * carry its capability ACE and its ambient-delete deny in one merge.
462
+ * @param api - the binding table.
463
+ * @param path - the directory the DACL and label edits apply to.
464
+ * @param entries - packed EXPLICIT_ACCESS_W records to merge (grant, deny, or revoke).
465
+ * @param oldAcl - the current explicit DACL (from {@link readCurrentSecurity}).
466
+ * @param labelEdit - the label change to apply alongside the DACL.
467
+ * @param descriptor - the descriptor allocation owning `oldAcl`.
468
+ * @param label - the caller's name for error details.
469
+ */
470
+ function mergeAndApply(api, path, entries, oldAcl, labelEdit, descriptor, label) {
471
+ const newAclSlot = allocPtrSlot();
472
+ const mergeResult = api.setEntriesInAclW(entries.length / 48, entries, oldAcl, newAclSlot);
473
+ if (mergeResult !== 0) {
474
+ if (descriptor !== null) api.localFree(descriptor);
475
+ if (labelEdit.kind === "apply") api.localFree(labelEdit.acl);
476
+ throwWin32(api, "SetEntriesInAclW", mergeResult, `${label}(${path})`);
477
+ }
478
+ const newAcl = decodePtr(newAclSlot);
479
+ if (newAcl === null) {
480
+ if (descriptor !== null) api.localFree(descriptor);
481
+ if (labelEdit.kind === "apply") api.localFree(labelEdit.acl);
482
+ throwWin32(api, "SetEntriesInAclW", api.getLastError(), `${label}(${path}): null new ACL`);
483
+ }
484
+ const freedDescriptor = descriptor !== null ? api.localFree(descriptor) : null;
485
+ const applyResult = api.setNamedSecurityInfoW(path, 1, labelEdit.kind === "keep" ? 4 : 20, null, null, newAcl, labelEdit.kind === "apply" ? labelEdit.acl : null);
486
+ const freedNew = api.localFree(newAcl);
487
+ const freedLabel = labelEdit.kind === "apply" ? api.localFree(labelEdit.acl) : null;
488
+ if (applyResult !== 0) throwWin32(api, "SetNamedSecurityInfoW", applyResult, `${label}(${path})`);
489
+ if (freedDescriptor !== null && !isNullPtr$1(freedDescriptor)) throwLastError$1(api, "LocalFree", `${label}(${path}) descriptor`);
490
+ if (!isNullPtr$1(freedNew)) throwLastError$1(api, "LocalFree", `${label}(${path}) new ACL`);
491
+ if (freedLabel !== null && !isNullPtr$1(freedLabel)) throwLastError$1(api, "LocalFree", `${label}(${path}) label ACL`);
492
+ }
493
+ /**
494
+ * True when the explicit DACL already carries the EXACT entry
495
+ * `(aceType, inheritance, mask, trustee SID)`. Every field is read through
496
+ * koffi.decode at pointer offsets — no memcpy, no pointer arithmetic. The
497
+ * ACE's SID is INLINE (embedded in the ACE after the 4-byte mask — there is
498
+ * no pointer to read; reading one yields garbage addresses and crashed
499
+ * EqualSid, verified by gdb), so it is compared field-by-field against the
500
+ * trustee SID through bounded offset reads ({@link sameSidAt}). Allowed and
501
+ * denied ACEs share the Mask@4/SID@8 layout. A malformed header reads as "no
502
+ * exact entry" so the caller falls back to the merge-apply path, which owns
503
+ * the robust failure handling.
504
+ * @param acl - the current explicit DACL pointer (from {@link readCurrentSecurity}).
505
+ * @param aceType - the ACE type to match.
506
+ * @param inheritance - the ACE inheritance flags to match.
507
+ * @param mask - the access mask to match.
508
+ * @param sidPtr - the trustee SID to match.
509
+ * @returns whether the exact entry is already present.
510
+ */
511
+ function hasExactEntry(acl, aceType, inheritance, mask, sidPtr) {
512
+ const aclSize = decodeUint16At(acl, 2);
513
+ const aceCount = decodeUint16At(acl, 4);
514
+ if (aclSize < 8 || aclSize > 1048576) return false;
515
+ let offset = 8;
516
+ for (let index = 0; index < aceCount; index++) {
517
+ const aceSize = decodeUint16At(acl, offset + 2);
518
+ if (aceSize < 8 || offset + aceSize > aclSize) return false;
519
+ if (decodeUint8At(acl, offset) === aceType && decodeUint8At(acl, offset + 1) === inheritance && decodeUint32At(acl, offset + 4) === mask && sameSidAt(acl, offset + 8, sidPtr, 0)) return true;
520
+ offset += aceSize;
521
+ }
522
+ return false;
523
+ }
524
+ /**
525
+ * True when the explicit DACL already carries the EXACT write grant this
526
+ * module would add: the Allow ACE for {@link abi.GRANT_MASK} naming the
527
+ * capability SID.
528
+ * @param oldAcl - the current explicit DACL pointer (from {@link readCurrentSecurity}).
529
+ * @param sidPtr - the capability SID to match.
530
+ * @returns whether the exact grant ACE is already present.
531
+ */
532
+ function hasExactGrant(oldAcl, sidPtr) {
533
+ return hasExactEntry(oldAcl, 0, 3, GRANT_MASK, sidPtr);
534
+ }
535
+ /**
536
+ * True when the explicit DACL already carries the EXACT ambient-delete deny:
537
+ * the container-inherited Deny ACE for {@link abi.FILE_DELETE_CHILD} naming
538
+ * the world SID. It is part of the idempotent skip, so a root granted by an
539
+ * earlier build receives the deny on its next provision.
540
+ * @param oldAcl - the current explicit DACL pointer (from {@link readCurrentSecurity}).
541
+ * @param worldSidPtr - the Everyone SID the deny names.
542
+ * @returns whether the exact deny ACE is already present.
543
+ */
544
+ function hasExactDeny(oldAcl, worldSidPtr) {
545
+ return hasExactEntry(oldAcl, 1, 2, 64, worldSidPtr);
546
+ }
547
+ /**
548
+ * True when a capability grant for a SID OTHER than `sidPtr` stands on this
549
+ * DACL — the condition under which a revoke must leave the shared Low label in
550
+ * place, or the remaining grant's child would lose its write authority.
551
+ * @param oldAcl - the current explicit DACL pointer (from {@link readCurrentSecurity}).
552
+ * @param sidPtr - the capability SID being revoked.
553
+ * @returns whether another capability grant remains.
554
+ */
555
+ function hasForeignGrant(oldAcl, sidPtr) {
556
+ const aclSize = decodeUint16At(oldAcl, 2);
557
+ const aceCount = decodeUint16At(oldAcl, 4);
558
+ if (aclSize < 8 || aclSize > 1048576) return false;
559
+ let offset = 8;
560
+ for (let index = 0; index < aceCount; index++) {
561
+ const aceSize = decodeUint16At(oldAcl, offset + 2);
562
+ if (aceSize < 8 || offset + aceSize > aclSize) return false;
563
+ if (decodeUint8At(oldAcl, offset) === 0 && decodeUint32At(oldAcl, offset + 4) === 1114454 && !sameSidAt(oldAcl, offset + 8, sidPtr, 0)) return true;
564
+ offset += aceSize;
565
+ }
566
+ return false;
567
+ }
568
+ /**
569
+ * Grant `GRANT_MASK` (Write+Delete, displays as "Modify") to the capability SID
570
+ * on `path`, deny the world SID the ambient `FILE_DELETE_CHILD` right, and
571
+ * apply the Low mandatory label — one merge. The deny inherits to containers
572
+ * only: the right is evaluated on directories, and inheriting its bit onto
573
+ * files would deny every `FILE_ALL_ACCESS`/`GENERIC_ALL` open inside the root
574
+ * (0x40 is a member of that mask). The capability ACE's DELETE bit is then the
575
+ * only delete authority inside the root, so a file whose own DACL grants no
576
+ * DELETE is no longer deletable through its parent's rights.
577
+ *
578
+ * Idempotent: the exact ACE, deny, and label together SKIP the
579
+ * SetNamedSecurityInfoW apply, which would otherwise re-propagate the
580
+ * identical descriptor across the whole tree (eager inheritance; minutes on
581
+ * large workspaces). Otherwise read-merge-write, so pre-existing explicit ACEs
582
+ * survive (same shape as {@link revokeWrite}). Runs under the per-path lock.
583
+ * The directory must be owned by the caller AND grant WRITE_OWNER (the label
584
+ * lives in the SACL; owner-implicit rights cover only READ_CONTROL and
585
+ * WRITE_DAC) — a Full-control workspace satisfies both.
586
+ * @param api - the binding table.
587
+ * @param path - the directory whose DACL and label gain the grant (the workspace or temp root).
588
+ * @param sidPtr - the capability SID the ACE names.
589
+ * @param lowLabelSidPtr - the Low integrity SID the mandatory label names.
590
+ * @param worldSidPtr - the Everyone SID the ambient-delete deny names.
591
+ */
592
+ function grantWrite(api, path, sidPtr, lowLabelSidPtr, worldSidPtr) {
593
+ withPathLock(api, path, () => {
594
+ const { oldAcl, labelAcl, descriptor } = readCurrentSecurity(api, path);
595
+ if (oldAcl !== null && labelAcl !== null && hasExactGrant(oldAcl, sidPtr) && hasExactDeny(oldAcl, worldSidPtr) && hasExactLabel(labelAcl, lowLabelSidPtr)) {
596
+ if (descriptor !== null) {
597
+ if (!isNullPtr$1(api.localFree(descriptor))) throwLastError$1(api, "LocalFree", `grantWrite(${path}) descriptor`);
598
+ }
599
+ return;
600
+ }
601
+ let label;
602
+ try {
603
+ label = buildLowLabelAcl(api, lowLabelSidPtr);
604
+ } catch (error) {
605
+ if (descriptor !== null) api.localFree(descriptor);
606
+ throw error;
607
+ }
608
+ mergeAndApply(api, path, Buffer.concat([buildExplicitAccess(worldSidPtr, 3, 64, 2), buildExplicitAccess(sidPtr, 1, GRANT_MASK)]), oldAcl, {
609
+ kind: "apply",
610
+ acl: label
611
+ }, descriptor, "grantWrite");
612
+ });
613
+ }
614
+ /**
615
+ * Remove every ACE for the capability SID from the directory DACL (REVOKE_ACCESS
616
+ * merge — other entries are preserved). The shared Low label is cleared only
617
+ * when no other capability grant remains on the directory: two grants may
618
+ * target one directory, and the surviving one still needs the label for its
619
+ * child's writes. Returns whether an ACE removal was attempted (false when the
620
+ * directory carries no DACL at all).
621
+ *
622
+ * Runs under the per-path lock (the whole get-merge-set sequence); the
623
+ * descriptor/ACL allocation contract lives on {@link readCurrentSecurity}.
624
+ * @param api - the binding table.
625
+ * @param path - the directory whose DACL loses the capability-SID ACEs.
626
+ * @param sidPtr - the capability SID whose ACEs are removed.
627
+ * @returns whether an ACE removal was attempted (false when the directory carries no DACL at all).
628
+ */
629
+ function revokeWrite(api, path, sidPtr) {
630
+ return withPathLock(api, path, () => {
631
+ const { oldAcl, descriptor } = readCurrentSecurity(api, path);
632
+ if (oldAcl === null) {
633
+ if (descriptor !== null) {
634
+ if (!isNullPtr$1(api.localFree(descriptor))) throwLastError$1(api, "LocalFree", `revokeWrite(${path}) descriptor`);
635
+ }
636
+ return false;
637
+ }
638
+ mergeAndApply(api, path, buildExplicitAccess(sidPtr, 4, 0), oldAcl, hasForeignGrant(oldAcl, sidPtr) ? { kind: "keep" } : { kind: "clear" }, descriptor, "revokeWrite");
639
+ return true;
640
+ });
641
+ }
642
+ //#endregion
643
+ //#region lib/types/path-boundary.js
644
+ /**
645
+ * Canonical directory-boundary checks for the Windows ACL workspace and
646
+ * private-temp capabilities.
647
+ * @module @deepseek-ai/dsh-sandbox-windows-acl/path-boundary
648
+ */
649
+ /** Whether `root` is the same canonical directory as `candidate` or contains it. */
650
+ function containsDirectory(root, candidate) {
651
+ const relation = relative(realpathSync.native(root), realpathSync.native(candidate));
652
+ return relation === "" || !isAbsolute(relation) && relation !== ".." && !relation.startsWith(`..${sep}`);
653
+ }
654
+ /**
655
+ * Reject a temp parent that is inside the workspace: every child created
656
+ * below it would inherit the standing workspace capability.
657
+ * @param workspaceRoot - the canonical workspace root that receives the standing ACE.
658
+ * @param tempRoot - the existing parent beneath which a private temp child would be created.
659
+ */
660
+ function assertTempRootOutsideWorkspace(workspaceRoot, tempRoot) {
661
+ if (containsDirectory(workspaceRoot, tempRoot)) throw new Error(`Windows ACL temp root must be outside the workspace: workspace=${workspaceRoot}; temp=${tempRoot}`);
662
+ }
663
+ /**
664
+ * Reject overlap between an actual private temp directory and any writable
665
+ * directory: either inheritance direction would merge the two capabilities.
666
+ * @param writableDirs - directories carrying the standing workspace capability.
667
+ * @param tempDir - the existing directory carrying the revocable temp capability.
668
+ */
669
+ function assertPrivateTempDisjoint(writableDirs, tempDir) {
670
+ for (const writableDir of writableDirs) if (containsDirectory(writableDir, tempDir) || containsDirectory(tempDir, writableDir)) throw new Error(`AclSandbox private temp directory must be disjoint from writable directories: writable=${writableDir}; temp=${tempDir}`);
671
+ }
672
+ //#endregion
673
+ //#region lib/types/spawn.js
674
+ /** Restricted-token adapters over the shared Win32 process owner. */
675
+ /**
676
+ * Spawn a restricted-token child with piped stdout/stderr.
677
+ * @param api - ACL/token binding table.
678
+ * @param token - restricted primary token.
679
+ * @param options - command, args, and working directory.
680
+ * @returns process and caller-owned pipe handles.
681
+ */
682
+ function spawnSandboxed(api, token, options) {
683
+ return spawnPipedProcess(api, {
684
+ ...options,
685
+ token
686
+ });
687
+ }
688
+ /**
689
+ * Spawn a restricted-token child in a kill-on-close Job with inherited stdio.
690
+ * @param api - ACL/token binding table.
691
+ * @param token - restricted primary token.
692
+ * @param options - command, args, and working directory.
693
+ * @returns process and Job handles after assignment and resume.
694
+ */
695
+ function spawnSandboxedInherited(api, token, options) {
696
+ return spawnInheritedJobProcess(api, {
697
+ ...options,
698
+ token
699
+ });
700
+ }
701
+ /**
702
+ * Wait for a restricted child and close its process handle.
703
+ * @param api - ACL/token binding table.
704
+ * @param process - caller-owned process handle.
705
+ * @returns direct process exit code.
706
+ */
707
+ function waitForExit(api, process) {
708
+ return waitForProcessExit(api, process);
709
+ }
710
+ //#endregion
711
+ //#region lib/types/token.js
712
+ /**
713
+ * Restricted-token construction: open the current process token, extract its
714
+ * logon SID, build the well-known SIDs, and call CreateRestrictedToken with
715
+ * the POC's restricting-SID allowlist. Every API call is checked; any failure
716
+ * throws with the API name and the exact Win32 code — the original POC ignored
717
+ * all of these and silently ran children with the FULL, unrestricted token.
718
+ * @module @deepseek-ai/dsh-sandbox-windows-acl/token
719
+ */
720
+ /**
721
+ * Open the current process's access token with the rights
722
+ * CreateRestrictedToken requires (the POC's OpenProcessToken call; the token
723
+ * handle is obtained through a real OpenProcess handle because the
724
+ * GetCurrentProcess() pseudo-handle is not addressable through koffi).
725
+ * @param api - the binding table.
726
+ * @returns the opened token handle.
727
+ */
728
+ function openCurrentProcessToken(api) {
729
+ const processHandle = api.openProcess(PROCESS_QUERY_INFORMATION, 0, process.pid);
730
+ if (isNullPtr$1(processHandle)) throwLastError$1(api, "OpenProcess", `pid ${process.pid}`);
731
+ const tokenSlot = allocPtrSlot();
732
+ if (api.openProcessToken(processHandle, 139, tokenSlot) === 0) {
733
+ const win32Code = api.getLastError();
734
+ api.closeHandle(processHandle);
735
+ throwWin32(api, "OpenProcessToken", win32Code, `pid ${process.pid}`);
736
+ }
737
+ if (api.closeHandle(processHandle) === 0) throwLastError$1(api, "CloseHandle", "OpenProcess process handle");
738
+ const token = decodePtr(tokenSlot);
739
+ if (token === null) throwWin32(api, "OpenProcessToken", api.getLastError(), "null token handle");
740
+ return token;
741
+ }
742
+ /**
743
+ * Find and copy the token's logon session SID (S-1-5-5-x-y, attribute
744
+ * SE_GROUP_LOGON_ID). The restricted token needs it for WinSta0/desktop and
745
+ * other per-logon objects; the POC extracts it the same way.
746
+ * @param api - the binding table.
747
+ * @param token - the token whose groups are scanned.
748
+ * @returns a copied logon SID (thrown when the token carries none).
749
+ */
750
+ function findLogonSid(api, token) {
751
+ const neededSlot = allocUint32();
752
+ api.getTokenInformation(token, 2, null, 0, neededSlot);
753
+ const needed = decodeUint32(neededSlot);
754
+ if (needed === 0) throwLastError$1(api, "GetTokenInformation", "TokenGroups size query");
755
+ if (needed < 8) throwWin32(api, "GetTokenInformation", api.getLastError(), `implausible TokenGroups size ${needed}`);
756
+ const groups = Buffer.alloc(needed);
757
+ if (api.getTokenInformation(token, 2, groups, groups.length, neededSlot) === 0) throwLastError$1(api, "GetTokenInformation", "TokenGroups");
758
+ const groupCount = groups.readUInt32LE(0);
759
+ for (let index = 0; index < groupCount; index++) {
760
+ const sidPtr = decodePtrAt(groups, 8 + index * 16);
761
+ const isLogonId = (groups.readUInt32LE(8 + index * 16 + 8) & SE_GROUP_LOGON_ID) >>> 0 === SE_GROUP_LOGON_ID >>> 0;
762
+ if (sidPtr === null || !isLogonId) continue;
763
+ const sidLength = api.getLengthSid(sidPtr);
764
+ if (sidLength === 0) throwLastError$1(api, "GetLengthSid", `logon SID group ${index}`);
765
+ const copy = allocBytes(sidLength);
766
+ if (api.copySid(sidLength, copy, sidPtr) === 0) throwLastError$1(api, "CopySid", `logon SID group ${index}`);
767
+ return copy;
768
+ }
769
+ throw new Error(`CreateRestrictedToken prerequisite failed: no logon SID found among ${groupCount} token groups`);
770
+ }
771
+ /**
772
+ * Create one well-known SID (68-byte buffer) and assert its validity.
773
+ * @param api - the binding table.
774
+ * @param type - the WELL_KNOWN_SID_TYPE to create.
775
+ * @returns the created SID pointer.
776
+ */
777
+ function makeWellKnownSid(api, type) {
778
+ const sid = allocBytes(68);
779
+ const sizeSlot = allocUint32();
780
+ encodeUint32(sizeSlot, 68);
781
+ if (api.createWellKnownSid(type, null, sid, sizeSlot) === 0) throwLastError$1(api, "CreateWellKnownSid", `type ${type}`);
782
+ if (api.isValidSid(sid) === 0) throwLastError$1(api, "IsValidSid", `CreateWellKnownSid type ${type}`);
783
+ return sid;
784
+ }
785
+ /**
786
+ * Merge one full-access allow ACE for `sidPtr` into the token's DEFAULT DACL
787
+ * — the DACL every NEW object the token holder creates (without an explicit
788
+ * security descriptor) takes. The restricted token inherits the user's
789
+ * default DACL verbatim, which names no restricting SID: a new anonymous pipe
790
+ * (child stdio) therefore fails the write pass-2 check at creation
791
+ * (ERROR_ACCESS_DENIED; Node surfaces it as spawn EPERM), breaking every
792
+ * piped-stdio grandchild spawn. The merged ACE names a RESTRICTING SID (the
793
+ * write SID under workspace-write, Everyone under read-only), so each new
794
+ * object's own DACL passes pass-2 while object creation itself stays gated by
795
+ * the parent container's DACL (files outside the granted trees remain
796
+ * uncreatable). Fails closed: any Win32 failure throws before the spawn.
797
+ * @param api - the binding table.
798
+ * @param token - the restricted token to adjust (requires TOKEN_ADJUST_DEFAULT).
799
+ * @param sidPtr - the restricting SID whose full-access ACE joins the default DACL.
800
+ */
801
+ function setTokenDefaultDaclGrant(api, token, sidPtr) {
802
+ const neededSlot = allocUint32();
803
+ api.getTokenInformation(token, 6, null, 0, neededSlot);
804
+ const needed = decodeUint32(neededSlot);
805
+ if (needed === 0) throwLastError$1(api, "GetTokenInformation", "TokenDefaultDacl size query");
806
+ const buffer = Buffer.alloc(needed);
807
+ if (api.getTokenInformation(token, 6, buffer, buffer.length, neededSlot) === 0) throwLastError$1(api, "GetTokenInformation", "TokenDefaultDacl");
808
+ const currentDacl = decodePtrAt(buffer, 0);
809
+ if (currentDacl === null) throw new Error("setTokenDefaultDaclGrant: the token carries no default DACL to extend");
810
+ const newDaclSlot = allocPtrSlot();
811
+ const result = api.setEntriesInAclW(1, buildExplicitAccess(sidPtr, 1, FILE_ALL_ACCESS), currentDacl, newDaclSlot);
812
+ if (result !== 0) throwWin32(api, "SetEntriesInAclW", result, "default DACL merge");
813
+ const newDacl = decodePtr(newDaclSlot);
814
+ if (newDacl === null) throwWin32(api, "SetEntriesInAclW", result, "null merged default DACL");
815
+ const info = Buffer.alloc(8);
816
+ info.writeBigUInt64LE(newDacl, 0);
817
+ if (api.setTokenInformation(token, 6, info, info.length) === 0) {
818
+ const win32Code = api.getLastError();
819
+ api.localFree(newDacl);
820
+ throwWin32(api, "SetTokenInformation", win32Code, "TokenDefaultDacl");
821
+ }
822
+ api.localFree(newDacl);
823
+ }
824
+ /**
825
+ * Lower the restricted token's integrity level to Low (S-1-16-4096), the level
826
+ * the mandatory labels `grantWrite` applies are matched against; a token left
827
+ * at Medium would ignore them. Requires TOKEN_ADJUST_DEFAULT on the token;
828
+ * fails closed before any child is spawned.
829
+ * @param api - the binding table.
830
+ * @param token - the restricted token to lower.
831
+ * @param lowLabelSidPtr - the Low integrity SID (S-1-16-4096).
832
+ */
833
+ function restrictTokenIntegrity(api, token, lowLabelSidPtr) {
834
+ const sidLength = api.getLengthSid(lowLabelSidPtr);
835
+ if (sidLength === 0) throwLastError$1(api, "GetLengthSid", "Low integrity label SID");
836
+ const info = Buffer.alloc(16 + sidLength);
837
+ info.writeBigUInt64LE(ptrAddress(lowLabelSidPtr), 0);
838
+ info.writeUInt32LE(32, 8);
839
+ if (api.setTokenInformation(token, 25, info, info.length) === 0) throwLastError$1(api, "SetTokenInformation", "TokenIntegrityLevel (Low)");
840
+ }
841
+ /** Pack `SID_AND_ATTRIBUTES[count]` (16-byte stride; Attributes stay 0). */
842
+ function buildRestrictingSids(sids) {
843
+ const buffer = Buffer.alloc(16 * sids.length);
844
+ sids.forEach((sid, index) => {
845
+ buffer.writeBigUInt64LE(ptrAddress(sid), 16 * index);
846
+ });
847
+ return buffer;
848
+ }
849
+ /**
850
+ * Create the write-restricted token with the mode-selected restricting list
851
+ * (verified on Win11 26200, see the POC-worktree restrict-variant harness):
852
+ * - read-only: [logon SID, EVERYONE]
853
+ * - workspace-write: [logon SID, EVERYONE, workspace SID, optional temp SID]
854
+ *
855
+ * The logon SID + EVERYONE keep-alive group is shared by both modes: early
856
+ * DLL init dies with 0xC0000142 and CNG (`\Device\CNG` write trustee —
857
+ * pwsh crashes 0xE0434352) fails without them. The write SIDs join ONLY
858
+ * workspace-write — read-only carries no write SID, so a standing grant ACE
859
+ * from an earlier workspace-write period (a `/permission` mode downgrade, or
860
+ * a crash-resumed session) stays INERT under read-only: the WRITE_RESTRICTED
861
+ * pass-2 check grants only what the restricting list carries, keeping that
862
+ * workspace grant inert under read-only while the unrevoked ACE keeps the
863
+ * re-upgrade free (the grant's exact-ACE skip — no re-propagation).
864
+ * Everyone's own ambient grants remain the documented partial boundary.
865
+ * Authenticated Users is absent from BOTH lists: the WMI
866
+ * namespace security check fails (0x80041003), so CIM is unavailable in
867
+ * every confined mode, and the C:\-root tree-creation escape (standing
868
+ * `AU:(AD)` + `AU:(OI)(CI)(IO)(M)` ACEs) is closed in both — documented in
869
+ * README. INTERACTIVE/LOCAL are absent from BOTH lists too — the host's
870
+ * Public tree grants write to INTERACTIVE, so removing it closes that
871
+ * escape. S-1-2-1 (console logon) is intentionally absent: the package
872
+ * README's "Console isolation is unavailable" entry records the verified
873
+ * failure modes. FAILS CLOSED: any failure throws — never
874
+ * spawn unrestricted.
875
+ * @param api - the binding table.
876
+ * @param currentToken - the process token to restrict.
877
+ * @param logonSid - the copied logon session SID.
878
+ * @param writeSids - the distinct write SIDs forming the workspace and
879
+ * optional temp allowlists (workspace-write only; empty under read-only).
880
+ * @param known - the well-known SIDs entering the restricting list.
881
+ * @param mode - selects the restricting list (workspace-write adds the capability SIDs).
882
+ * @returns the restricted token handle.
883
+ */
884
+ function createRestrictedToken(api, currentToken, logonSid, writeSids, known, mode) {
885
+ const restrictingSids = buildRestrictingSids(mode === "read-only" ? [logonSid, known.world] : writeSids.length === 0 ? (() => {
886
+ throw new Error("createRestrictedToken: workspace-write restricting list requires at least one write SID");
887
+ })() : [
888
+ logonSid,
889
+ known.world,
890
+ ...writeSids
891
+ ]);
892
+ const tokenSlot = allocPtrSlot();
893
+ if (api.createRestrictedToken(currentToken, 9, 0, null, 0, null, restrictingSids.length / 16, restrictingSids, tokenSlot) === 0) throwLastError$1(api, "CreateRestrictedToken", `restricting SIDs: ${restrictingSids.length / 16}`);
894
+ const token = decodePtr(tokenSlot);
895
+ if (token === null) throwWin32(api, "CreateRestrictedToken", api.getLastError(), "null token handle");
896
+ return token;
897
+ }
898
+ //#endregion
899
+ //#region lib/types/grant.js
900
+ /**
901
+ * Server-side write-grant materialization. The sandbox seam holds one
902
+ * standing workspace grant per workspace and one revocable temp grant per
903
+ * live session/workspace pair. Workspace identities survive by deterministic
904
+ * derivation and their standing ACE; temp identities derive from random
905
+ * private paths and are deliberately new after a restart.
906
+ *
907
+ * Fail-closed: `add` throws on any grant failure and the caller disposes the
908
+ * instance (revoking every path granted so far); `dispose` revokes every
909
+ * revocable grant, leaves the standing workspace edits in place, and reports
910
+ * every cleanup failure.
911
+ * @module @deepseek-ai/dsh-sandbox-windows-acl/grant
912
+ */
913
+ /**
914
+ * One write SID's provider-lifetime grant materialization: the parsed SID
915
+ * pointer plus every directory whose DACL currently carries its ACE and whose
916
+ * label ACL carries the Low mandatory label. Workspace paths are added
917
+ * STANDING (their security descriptor edits are the cross-session reuse cache
918
+ * and outlive the grant — dispose() skips revoking them, or the next
919
+ * provision would re-propagate the whole tree); temp paths are revocable
920
+ * (dispose() revokes them — an inheritable ACE must not outlive its
921
+ * session's temp directory). Create with {@link AclWriteGrant.create};
922
+ * dispose revokes the revocable paths and frees every SID.
923
+ */
924
+ var AclWriteGrant = class AclWriteGrant {
925
+ /** The write SID in SDDL string form. */
926
+ writeSid;
927
+ api;
928
+ sidPtr;
929
+ lowLabelSidPtr;
930
+ worldSidPtr;
931
+ revocablePaths = [];
932
+ standingPaths = [];
933
+ constructor(api, sidPtr, lowLabelSidPtr, worldSidPtr, writeSid) {
934
+ this.api = api;
935
+ this.sidPtr = sidPtr;
936
+ this.lowLabelSidPtr = lowLabelSidPtr;
937
+ this.worldSidPtr = worldSidPtr;
938
+ this.writeSid = writeSid;
939
+ }
940
+ /**
941
+ * Parse the SID string, create the Low integrity SID the grants label with
942
+ * and the world SID their ambient-delete deny names, and open the binding
943
+ * table (lazily, once per server). Fail-closed: any failure throws — nothing
944
+ * is granted yet.
945
+ * @param writeSid - the workspace (`S-1-4-x-y`) or temp (`S-1-4-x-y-1`) capability SID string.
946
+ * @param api - optional already-resolved bindings (tests).
947
+ * @returns the ready grant (no ACEs yet).
948
+ */
949
+ static create(writeSid, api) {
950
+ const bindings = api ?? win32Sync();
951
+ const sidSlot = allocPtrSlot();
952
+ if (bindings.convertStringSidToSidW(writeSid, sidSlot) === 0) throwLastError$1(bindings, "ConvertStringSidToSidW", writeSid);
953
+ const sidPtr = decodePtr(sidSlot);
954
+ if (sidPtr === null) throwLastError$1(bindings, "ConvertStringSidToSidW", `null SID for ${writeSid}`);
955
+ try {
956
+ const lowLabelSidPtr = makeWellKnownSid(bindings, 66);
957
+ try {
958
+ return new AclWriteGrant(bindings, sidPtr, lowLabelSidPtr, makeWellKnownSid(bindings, 1), writeSid);
959
+ } catch (error) {
960
+ bindings.localFree(lowLabelSidPtr);
961
+ throw error;
962
+ }
963
+ } catch (error) {
964
+ bindings.localFree(sidPtr);
965
+ throw error;
966
+ }
967
+ }
968
+ /**
969
+ * Grant the write ACE, the ambient-delete deny, and the Low mandatory label
970
+ * on one directory (idempotent: an already-standing exact ACE, deny, and
971
+ * label skip the eager full-tree re-propagation — see {@link grantWrite})
972
+ * and record the path for {@link dispose} unless it is standing. The path is
973
+ * recorded BEFORE the grant: a post-apply throw (a LocalFree failure after
974
+ * SetNamedSecurityInfoW succeeded) must still revoke it, and revoking an
975
+ * ungranted path is a no-op merge. Callers treat a throw as a failed
976
+ * materialization and dispose the instance to revoke the paths granted so
977
+ * far.
978
+ * @param path - the directory whose DACL and label gain the grant.
979
+ * @param standing - the edits outlive this grant (the workspace reuse
980
+ * cache; dispose() skips revoking it). Default false (revoked on
981
+ * dispose — the temp-directory lifecycle).
982
+ */
983
+ add(path, standing = false) {
984
+ (standing ? this.standingPaths : this.revocablePaths).push(path);
985
+ grantWrite(this.api, path, this.sidPtr, this.lowLabelSidPtr, this.worldSidPtr);
986
+ }
987
+ /** Every directory currently carrying the grant, in grant order. */
988
+ get paths() {
989
+ return [...this.standingPaths, ...this.revocablePaths];
990
+ }
991
+ /** Revoke every revocable grant (standing security descriptor edits stay) and free the SIDs; reports every cleanup failure. */
992
+ dispose() {
993
+ const failures = [];
994
+ for (const path of this.revocablePaths) try {
995
+ revokeWrite(this.api, path, this.sidPtr);
996
+ } catch (error) {
997
+ failures.push(error);
998
+ }
999
+ for (const [label, sidPtr] of [
1000
+ ["write SID", this.sidPtr],
1001
+ ["Low label SID", this.lowLabelSidPtr],
1002
+ ["world SID", this.worldSidPtr]
1003
+ ]) try {
1004
+ if (!isNullPtr$1(this.api.localFree(sidPtr))) throwLastError$1(this.api, "LocalFree", label);
1005
+ } catch (error) {
1006
+ failures.push(error);
1007
+ }
1008
+ if (failures.length > 0) throw new AggregateError(failures, `AclWriteGrant dispose completed with ${failures.length} cleanup failure(s)`);
1009
+ }
1010
+ };
1011
+ //#endregion
1012
+ //#region lib/types/workspace-sid.js
1013
+ /**
1014
+ * The per-workspace write identity: a deterministic `S-1-4-x-y` SID derived
1015
+ * from the canonical workspace path, whose ACEs form that workspace's write
1016
+ * allowlist. Every confined execution of the same workspace — across
1017
+ * sessions, server restarts, and calls — carries the SAME write SID, so the
1018
+ * workspace-root ACE materializes once per workspace per machine (the
1019
+ * grant's exact-ACE skip then makes every later provision O(1)) instead of
1020
+ * once per session. The SID's power is defined solely by the ACEs that name
1021
+ * it (which exist only on the workspace tree and the session's private temp
1022
+ * directory), and only tokens minted for that workspace carry it — the SID
1023
+ * string itself is not a secret. Temporary directories use a separate,
1024
+ * per-directory identity from {@link tempWriteSid}; sharing the workspace
1025
+ * identity with temp would let sibling sessions write one another's temp
1026
+ * trees.
1027
+ *
1028
+ * The input MUST be the canonical workspace path (`realpathSync.native` on
1029
+ * Windows — the sandbox-policy `resolveWorkspaceRoot` already applies it):
1030
+ * canonicalization converges case/alias spellings, so two spellings of one
1031
+ * workspace derive one SID; an as-spelled fallback path would mint a second
1032
+ * identity for the same directory (self-healing, at the cost of one extra
1033
+ * tree propagation). Renaming the workspace directory derives a new SID —
1034
+ * the old standing ACEs are inert residue, and the next session re-propagates
1035
+ * once.
1036
+ * @module @deepseek-ai/dsh-sandbox-windows-acl/workspace-sid
1037
+ */
1038
+ /**
1039
+ * Derive the workspace's write SID (`S-1-4-x-y`; subauthorities 30-bit,
1040
+ * matching the workspace-capability shape the token and ACE layers carry).
1041
+ * @param workspaceRoot - the canonical workspace path.
1042
+ * @returns the SDDL string form.
1043
+ */
1044
+ function workspaceWriteSid(workspaceRoot) {
1045
+ const digest = createHash("sha256").update(workspaceRoot, "utf8").digest();
1046
+ return `S-1-4-${digest.readUInt32LE(0) % (2 ** 30 - 1) + 1}-${digest.readUInt32LE(4) % (2 ** 30 - 1) + 1}`;
1047
+ }
1048
+ /**
1049
+ * Derive one private temp directory's write SID. The random directory path
1050
+ * is the capability identity; a fixed third subauthority domain-separates
1051
+ * the result from every two-subauthority workspace SID.
1052
+ * @param tempDir - the private temp directory's absolute path.
1053
+ * @returns the SDDL string form.
1054
+ */
1055
+ function tempWriteSid(tempDir) {
1056
+ const digest = createHash("sha256").update("temp\0", "utf8").update(tempDir, "utf8").digest();
1057
+ return `S-1-4-${digest.readUInt32LE(0) % (2 ** 30 - 1) + 1}-${digest.readUInt32LE(4) % (2 ** 30 - 1) + 1}-1`;
1058
+ }
1059
+ //#endregion
1060
+ //#region lib/types/acl-skill.js
1061
+ /**
1062
+ * Registers the bundled Windows sandbox ACL diagnosis skill.
1063
+ *
1064
+ * The provider owns a private filesystem copy of its resources so external
1065
+ * PowerShell can execute them even when the package lives inside ASAR or SEA.
1066
+ * Disposing the registration removes both the provider and its resource copy.
1067
+ *
1068
+ * @module @deepseek-ai/dsh-sandbox-windows-acl
1069
+ */
1070
+ /** Bundled skill that diagnoses Windows sandbox ACL failures. */
1071
+ const ACL_DIAGNOSIS_SKILL = "diagnose-windows-sandbox-acl";
1072
+ /** Provider name this module registers the skill under. */
1073
+ const PROVIDER = "dsh-windows-acl";
1074
+ function parseSkill(raw, path) {
1075
+ const frontmatter = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/u.exec(raw);
1076
+ if (frontmatter?.[1] === void 0) throw new Error(`dsh-sandbox-windows-acl: ${path} has no YAML frontmatter`);
1077
+ const metadata = parse(frontmatter[1]);
1078
+ const description = typeof metadata === "object" && metadata !== null && "description" in metadata ? metadata.description : void 0;
1079
+ if (typeof description !== "string" || description.length === 0) throw new Error(`dsh-sandbox-windows-acl: ${path} has no description`);
1080
+ return {
1081
+ description,
1082
+ content: raw.slice(frontmatter[0].length).trim()
1083
+ };
1084
+ }
1085
+ /**
1086
+ * Register the bundled diagnosis skill with a private resource directory owned by this fiber.
1087
+ * Missing or invalid packaged assets fail registration; disposal removes the directory.
1088
+ * @param ctx - Context carrying the skill registry.
1089
+ */
1090
+ function registerAclDiagnosisSkill(ctx) {
1091
+ const packaged = fileURLToPath(new URL(`../assets/${ACL_DIAGNOSIS_SKILL}/`, import.meta.url));
1092
+ ctx.effect(function* () {
1093
+ const directory = mkdtempSync(join(tmpdir(), "dsh-acl-skill-"));
1094
+ yield async () => {
1095
+ await rm(directory, {
1096
+ recursive: true,
1097
+ force: true
1098
+ });
1099
+ };
1100
+ mkdirSync(join(directory, "scripts"));
1101
+ for (const path of ["SKILL.md", "scripts/diagnose-windows-sandbox-acl.ps1"]) writeFileSync(join(directory, path), readFileSync(join(packaged, path)), {
1102
+ flag: "wx",
1103
+ mode: 384
1104
+ });
1105
+ const locator = join(directory, "SKILL.md");
1106
+ const { description } = parseSkill(readFileSync(locator, "utf8"), locator);
1107
+ const candidate = {
1108
+ name: ACL_DIAGNOSIS_SKILL,
1109
+ description,
1110
+ invocation: {
1111
+ modelInvocable: true,
1112
+ userInvocable: true
1113
+ },
1114
+ provider: PROVIDER,
1115
+ source: "bundled",
1116
+ rank: BUNDLED_SKILL_RANK,
1117
+ resourceBase: {
1118
+ kind: "directory",
1119
+ path: directory
1120
+ },
1121
+ locator
1122
+ };
1123
+ const provider = {
1124
+ name: PROVIDER,
1125
+ list: () => Promise.resolve([candidate]),
1126
+ async get(entry, options) {
1127
+ const { rank: _rank, locator: entryPath, ...summary } = entry;
1128
+ const raw = await readFile(entryPath, {
1129
+ encoding: "utf8",
1130
+ signal: options.signal
1131
+ });
1132
+ return {
1133
+ ...summary,
1134
+ content: parseSkill(raw, entryPath).content
1135
+ };
1136
+ }
1137
+ };
1138
+ yield ctx.skills.registerProvider(() => provider);
1139
+ }, "Windows ACL diagnosis skill resources");
1140
+ }
1141
+ //#endregion
1142
+ //#region lib/types/index.js
1143
+ /**
1144
+ * Windows ACL write-restriction sandbox backend for the DeepSeek Harness
1145
+ * sandbox seam. Mirrors the mechanism of github.com/huoyaoyuan/
1146
+ * windows-acl-restrict-poc @ 10e4dfb (the fixed revision): a WRITE_RESTRICTED
1147
+ * token whose restricting SIDs include distinct workspace and temp write
1148
+ * SIDs that this sandbox adds to their owning directories' DACLs — the
1149
+ * intersection check then allows writes exactly where either capability has
1150
+ * a Write ACE, and nowhere else those SIDs are concerned (the check ALSO
1151
+ * inherits the ambient write ACEs of the other restricting SIDs — the
1152
+ * keep-alive group logon SID + Everyone; Authenticated Users, INTERACTIVE,
1153
+ * and LOCAL are absent from both lists — see the seam's dual-list contract
1154
+ * in `packages/sandbox/sandbox-local` and the package README's Modes section
1155
+ * for the complete boundary). The intersection covers only the object's own
1156
+ * access check, so the token is also lowered to Low integrity and every
1157
+ * granted directory carries a Low no-write-up label and the ambient-delete
1158
+ * deny the `acl` module documents. The write SID is the per-WORKSPACE identity
1159
+ * ({@link workspaceWriteSid}): deterministic from the canonical workspace
1160
+ * path, so the workspace-root ACE materializes once per workspace per
1161
+ * machine and every later provision hits the exact-ACE skip — the
1162
+ * grant-reuse story the per-session random SID paid a full tree propagation
1163
+ * per session for. Each private temp directory instead receives its own SID,
1164
+ * so sibling sessions sharing a workspace cannot enter one another's temp
1165
+ * trees. Unlike the POC, every API failure throws with the API
1166
+ * name and exact Win32 code; a child is NEVER spawned unrestricted.
1167
+ *
1168
+ * Known boundaries (inherent to restricted tokens, not this port):
1169
+ * - writes are restricted; reads, network, and process visibility are NOT
1170
+ * (WRITE_RESTRICTED intersects only write accesses);
1171
+ * - console isolation is unavailable — children share the host console
1172
+ * (CREATE_NO_WINDOW / CREATE_NEW_CONSOLE children die with
1173
+ * STATUS_DLL_INIT_FAILED under the restriction);
1174
+ * - the private temp directory and every writable directory must be owned by the
1175
+ * caller (owner-implicit WRITE_DAC);
1176
+ * - grants are standing ACE mutations on real directories. WORKSPACE grants
1177
+ * are deliberately never revoked — the ACE is the cross-session reuse
1178
+ * cache (revoking would force the next session to re-propagate the whole
1179
+ * tree). TEMP grants are revocable: dispose() removes them so a standing
1180
+ * inheritable ACE never outlives its session's temp directory. The
1181
+ * ambient temp root is never granted implicitly. With `manageDacls: false`
1182
+ * the CALLER owns the DACLs (the sandbox seam's grant reuse):
1183
+ * init()/dispose() skip grant/revoke entirely and the caller must not
1184
+ * revoke under live children.
1185
+ * @module @deepseek-ai/dsh-sandbox-windows-acl
1186
+ */
1187
+ /** Free one optional SID while retaining a failure for best-effort sibling cleanup. */
1188
+ function freeSidBestEffort(api, sidPtr, label, failures) {
1189
+ if (sidPtr === void 0) return;
1190
+ try {
1191
+ if (!isNullPtr$1(api.localFree(sidPtr))) throwLastError$1(api, "LocalFree", label);
1192
+ } catch (error) {
1193
+ failures.push(error);
1194
+ }
1195
+ }
1196
+ /**
1197
+ * One write-restricted sandbox instance: token + write-SID grants + spawn.
1198
+ * `init()` is fail-closed — any Win32 failure revokes the revocable (temp)
1199
+ * grants and throws; `dispose()` revokes the temp grants, leaves the
1200
+ * standing workspace ACEs in place (the cross-instance reuse cache), frees
1201
+ * every allocation, and reports every cleanup failure. With
1202
+ * `manageDacls: false` the caller owns the grants (the sandbox seam's grant
1203
+ * reuse): init() applies none and dispose() revokes none.
1204
+ */
1205
+ var AclSandbox = class {
1206
+ /** Absolute writable directories (constructor-validated). */
1207
+ writableDirs;
1208
+ /** The workspace SID string whose ACEs form the workspace allowlist. */
1209
+ writeSid;
1210
+ /** The private temp directory's write SID (workspace-write with temp only). */
1211
+ tempWriteSid;
1212
+ /** The file-effect mode — the restricted token's restricting-SID list selection. */
1213
+ mode;
1214
+ tempDirOption;
1215
+ manageDacls;
1216
+ tempDirResolved;
1217
+ api;
1218
+ token;
1219
+ writeSidPtr;
1220
+ tempWriteSidPtr;
1221
+ /** The well-known/logon SID allocations init() makes; freed by dispose() alongside the write SIDs. */
1222
+ sidAllocations = [];
1223
+ grantedPaths = [];
1224
+ constructor(options) {
1225
+ this.mode = options.mode;
1226
+ this.manageDacls = options.manageDacls ?? true;
1227
+ this.writableDirs = options.writableDirs.map((directory) => {
1228
+ const absolute = resolve(directory);
1229
+ if (!existsSync(absolute) || !statSync(absolute).isDirectory()) throw new Error(`AclSandbox writable dir does not exist or is not a directory: ${absolute}`);
1230
+ return absolute;
1231
+ });
1232
+ this.tempDirOption = options.tempDir;
1233
+ this.writeSid = options.writeSid;
1234
+ this.tempWriteSid = options.tempWriteSid;
1235
+ if (this.mode === "workspace-write" && this.writeSid === void 0) throw new Error("AclSandbox workspace-write requires a write SID — derive it from the workspace via workspaceWriteSid()");
1236
+ if (this.mode === "workspace-write" && this.tempDirOption === void 0) throw new Error("AclSandbox workspace-write requires an explicit private temp directory or null");
1237
+ if (this.mode === "read-only" && this.tempDirOption !== void 0 && this.tempDirOption !== null) throw new Error("AclSandbox read-only does not accept a temp directory");
1238
+ if (this.mode === "read-only" && (this.writeSid !== void 0 || this.tempWriteSid !== void 0)) throw new Error("AclSandbox read-only does not accept write SIDs");
1239
+ if (this.mode === "workspace-write" && this.tempDirOption !== null && this.tempWriteSid === void 0) throw new Error("AclSandbox workspace-write with temp requires a temp write SID — derive it via tempWriteSid()");
1240
+ if (this.tempDirOption === null && this.tempWriteSid !== void 0) throw new Error("AclSandbox temp write SID requires a temp directory");
1241
+ if (this.writeSid !== void 0 && this.tempWriteSid === this.writeSid) throw new Error("AclSandbox workspace and temp write SIDs must be distinct");
1242
+ }
1243
+ /** Resolved temp directory (available after init; null when temp grants are disabled). */
1244
+ get tempDir() {
1245
+ return this.tempDirResolved;
1246
+ }
1247
+ /** Create the restricted token and apply the capability-SID grants. Idempotent-unsafe: once per instance. */
1248
+ async init() {
1249
+ if (this.api !== void 0) throw new Error("AclSandbox is already initialized");
1250
+ const api = await win32();
1251
+ const currentToken = openCurrentProcessToken(api);
1252
+ let currentTokenOpen = true;
1253
+ let restrictedToken;
1254
+ try {
1255
+ const parseSid = (sid) => {
1256
+ const sidSlot = allocPtrSlot();
1257
+ if (api.convertStringSidToSidW(sid, sidSlot) === 0) throwLastError$1(api, "ConvertStringSidToSidW", sid);
1258
+ const parsedSid = decodePtr(sidSlot);
1259
+ if (parsedSid === null) throw new Win32Error("ConvertStringSidToSidW", api.getLastError(), sid);
1260
+ return parsedSid;
1261
+ };
1262
+ this.writeSidPtr = this.writeSid === void 0 ? void 0 : parseSid(this.writeSid);
1263
+ this.tempWriteSidPtr = this.tempWriteSid === void 0 ? void 0 : parseSid(this.tempWriteSid);
1264
+ const tempDir = this.mode === "read-only" || this.tempDirOption === null ? null : this.tempDirOption;
1265
+ /* v8 ignore next -- constructor validation requires workspace-write to supply
1266
+ an explicit temp directory or null; the other branches normalize to null. */
1267
+ if (tempDir === void 0) throw new Error("AclSandbox workspace-write temp directory was not resolved");
1268
+ if (tempDir !== null) {
1269
+ if (!existsSync(tempDir) || !statSync(tempDir).isDirectory()) throw new Error(`AclSandbox temp dir does not exist or is not a directory: ${tempDir}`);
1270
+ assertPrivateTempDisjoint(this.writableDirs, tempDir);
1271
+ }
1272
+ this.tempDirResolved = tempDir;
1273
+ const lowLabelSid = makeWellKnownSid(api, 66);
1274
+ const worldSid = makeWellKnownSid(api, 1);
1275
+ this.sidAllocations.push(lowLabelSid, worldSid);
1276
+ if (this.manageDacls) {
1277
+ if (this.writeSidPtr !== void 0) {
1278
+ for (const path of this.writableDirs) grantWrite(api, path, this.writeSidPtr, lowLabelSid, worldSid);
1279
+ if (tempDir !== null && this.tempWriteSidPtr !== void 0) {
1280
+ this.grantedPaths.push({
1281
+ path: tempDir,
1282
+ sidPtr: this.tempWriteSidPtr
1283
+ });
1284
+ grantWrite(api, tempDir, this.tempWriteSidPtr, lowLabelSid, worldSid);
1285
+ }
1286
+ }
1287
+ }
1288
+ const logonSid = findLogonSid(api, currentToken);
1289
+ this.sidAllocations.push(logonSid);
1290
+ restrictedToken = createRestrictedToken(api, currentToken, logonSid, [this.writeSidPtr, this.tempWriteSidPtr].filter((sid) => sid !== void 0), { world: worldSid }, this.mode);
1291
+ restrictTokenIntegrity(api, restrictedToken, lowLabelSid);
1292
+ this.token = restrictedToken;
1293
+ setTokenDefaultDaclGrant(api, restrictedToken, this.tempWriteSidPtr ?? this.writeSidPtr ?? worldSid);
1294
+ if (api.closeHandle(currentToken) === 0) throwLastError$1(api, "CloseHandle", "current process token");
1295
+ currentTokenOpen = false;
1296
+ this.api = api;
1297
+ } catch (error) {
1298
+ const cleanupFailures = [];
1299
+ if (currentTokenOpen && api.closeHandle(currentToken) === 0) cleanupFailures.push(new Win32Error("CloseHandle", api.getLastError(), "current process token after init failure"));
1300
+ if (restrictedToken !== void 0 && api.closeHandle(restrictedToken) === 0) cleanupFailures.push(new Win32Error("CloseHandle", api.getLastError(), "restricted token after init failure"));
1301
+ for (const grant of this.grantedPaths) try {
1302
+ revokeWrite(api, grant.path, grant.sidPtr);
1303
+ } catch (cleanupError) {
1304
+ cleanupFailures.push(cleanupError);
1305
+ }
1306
+ for (const [label, sidPtr] of [["workspace write SID", this.writeSidPtr], ["temp write SID", this.tempWriteSidPtr]]) freeSidBestEffort(api, sidPtr, label, cleanupFailures);
1307
+ for (const sidPtr of this.sidAllocations.splice(0)) freeSidBestEffort(api, sidPtr, "init SID allocation", cleanupFailures);
1308
+ this.token = void 0;
1309
+ this.writeSidPtr = void 0;
1310
+ this.tempWriteSidPtr = void 0;
1311
+ this.tempDirResolved = void 0;
1312
+ this.grantedPaths = [];
1313
+ if (cleanupFailures.length > 0) throw new AggregateError([error, ...cleanupFailures], `AclSandbox init failed and ${cleanupFailures.length} cleanup operation(s) also failed`);
1314
+ throw error;
1315
+ }
1316
+ }
1317
+ /**
1318
+ * Spawn a process under the restricted token. Fails closed: throws on every
1319
+ * Win32 failure; the child is never created unrestricted. With
1320
+ * `stdio: 'inherit'` the child shares the caller's stdio directly and is
1321
+ * placed in a kill-on-close job (dies with the caller). Call dispose() only
1322
+ * after all children have exited — revoking grants under a live child
1323
+ * removes its remaining write allowance.
1324
+ * @param options - the program, argv/cwd, and stdio shape.
1325
+ * @returns the running child.
1326
+ */
1327
+ spawn(options) {
1328
+ const api = this.api;
1329
+ const token = this.token;
1330
+ if (api === void 0 || token === void 0) throw new Error("AclSandbox is not initialized: call init() first");
1331
+ if (options.controlFileDescriptor !== void 0 && options.stdio !== "inherit") throw new Error("control pipe requires inherited stdio");
1332
+ const args = options.args ?? [];
1333
+ const cwd = options.cwd ?? process.cwd();
1334
+ if (options.stdio === "inherit") {
1335
+ const native = spawnSandboxedInherited(api, token, {
1336
+ command: options.command,
1337
+ args,
1338
+ cwd,
1339
+ ...options.controlFileDescriptor === void 0 ? {} : { controlFileDescriptor: options.controlFileDescriptor }
1340
+ });
1341
+ let exitCodePromise;
1342
+ return {
1343
+ pid: native.pid,
1344
+ wait: async () => {
1345
+ exitCodePromise ??= Promise.resolve(waitForExit(api, native.process));
1346
+ const exitCode = await exitCodePromise;
1347
+ if (api.closeHandle(native.job) === 0) throwLastError$1(api, "CloseHandle", "kill-on-close job");
1348
+ return {
1349
+ stdout: Buffer.alloc(0),
1350
+ stderr: Buffer.alloc(0),
1351
+ exitCode
1352
+ };
1353
+ }
1354
+ };
1355
+ }
1356
+ const native = spawnSandboxed(api, token, {
1357
+ command: options.command,
1358
+ args,
1359
+ cwd
1360
+ });
1361
+ const stdout = drainPipe(api, native.stdoutRead);
1362
+ const stderr = drainPipe(api, native.stderrRead);
1363
+ let exitCodePromise;
1364
+ return {
1365
+ pid: native.pid,
1366
+ wait: async () => {
1367
+ const stdoutBuffer = await stdout;
1368
+ const stderrBuffer = await stderr;
1369
+ exitCodePromise ??= Promise.resolve(waitForExit(api, native.process));
1370
+ return {
1371
+ stdout: stdoutBuffer,
1372
+ stderr: stderrBuffer,
1373
+ exitCode: await exitCodePromise
1374
+ };
1375
+ }
1376
+ };
1377
+ }
1378
+ /**
1379
+ * Revoke the revocable (temp) grants, free the SID, close the token; the
1380
+ * standing workspace ACEs stay (the reuse cache). Reports every cleanup
1381
+ * failure.
1382
+ */
1383
+ dispose() {
1384
+ const api = this.api;
1385
+ if (api === void 0) return;
1386
+ const failures = [];
1387
+ if (this.manageDacls) for (const grant of this.grantedPaths) try {
1388
+ revokeWrite(api, grant.path, grant.sidPtr);
1389
+ } catch (error) {
1390
+ failures.push(error);
1391
+ }
1392
+ for (const [label, sidPtr] of [["workspace write SID", this.writeSidPtr], ["temp write SID", this.tempWriteSidPtr]]) freeSidBestEffort(api, sidPtr, label, failures);
1393
+ const token = this.token;
1394
+ /* v8 ignore next -- init assigns this.api only after this.token, so an initialized instance always
1395
+ has its token; the guard mirrors the write-SID guard. */
1396
+ if (token !== void 0) try {
1397
+ if (api.closeHandle(token) === 0) throwLastError$1(api, "CloseHandle", "restricted token");
1398
+ } catch (error) {
1399
+ failures.push(error);
1400
+ }
1401
+ for (const sidPtr of this.sidAllocations.splice(0)) freeSidBestEffort(api, sidPtr, "init SID allocation", failures);
1402
+ this.api = void 0;
1403
+ this.token = void 0;
1404
+ this.writeSidPtr = void 0;
1405
+ this.tempWriteSidPtr = void 0;
1406
+ this.grantedPaths = [];
1407
+ if (failures.length > 0) throw new AggregateError(failures, `AclSandbox dispose completed with ${failures.length} cleanup failure(s)`);
1408
+ }
1409
+ };
1410
+ //#endregion
1411
+ export { workspaceWriteSid as a, win32 as c, tempWriteSid as i, ACL_DIAGNOSIS_SKILL as n, AclWriteGrant as o, registerAclDiagnosisSkill as r, assertTempRootOutsideWorkspace as s, AclSandbox as t };