tau-all-agent 0.3.1 → 0.4.0

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 (889) hide show
  1. package/README.md +2 -0
  2. package/extensions/branch-term/index.ts +49 -57
  3. package/extensions/loop.ts +33 -7
  4. package/extensions/review/README.md +24 -0
  5. package/extensions/review/config.ts +65 -0
  6. package/extensions/review/focus.ts +48 -0
  7. package/extensions/review/request.ts +44 -73
  8. package/extensions/review/runner.ts +5 -1
  9. package/extensions/review/schema.ts +1 -0
  10. package/extensions/sandbox/README.md +66 -1
  11. package/extensions/sandbox/bash.ts +237 -362
  12. package/extensions/sandbox/classifier/delegation.ts +160 -0
  13. package/extensions/sandbox/classifier/guardian.ts +146 -0
  14. package/extensions/sandbox/classifier.ts +848 -0
  15. package/extensions/sandbox/command.ts +40 -19
  16. package/extensions/sandbox/config.ts +160 -27
  17. package/extensions/sandbox/index.ts +65 -100
  18. package/extensions/sandbox/macos-sandbox-shell.mjs +2 -2
  19. package/extensions/sandbox/permissions/dialog.ts +326 -80
  20. package/extensions/sandbox/permissions/filesystem.ts +232 -335
  21. package/extensions/sandbox/permissions/mach-lookup.ts +80 -131
  22. package/extensions/sandbox/permissions/proposal.ts +50 -0
  23. package/extensions/sandbox/runtime.ts +516 -104
  24. package/extensions/stash.ts +2 -2
  25. package/extensions/subagent/README.md +9 -5
  26. package/extensions/subagent/index.ts +71 -53
  27. package/extensions/subagent/review.ts +304 -0
  28. package/extensions/subagent/rpc.ts +55 -15
  29. package/extensions/telegram/README.md +3 -1
  30. package/extensions/telegram/daemon.mjs +224 -113
  31. package/extensions/telegram/index.ts +195 -141
  32. package/extensions/telegram/startup.ts +277 -0
  33. package/extensions/worktree.ts +46 -65
  34. package/node_modules/@anthropic-ai/sandbox-runtime/LICENSE +201 -0
  35. package/node_modules/@anthropic-ai/sandbox-runtime/README.md +922 -0
  36. package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.d.ts +3 -0
  37. package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.d.ts.map +1 -0
  38. package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.js +487 -0
  39. package/node_modules/@anthropic-ai/sandbox-runtime/dist/cli.js.map +1 -0
  40. package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.d.ts +20 -0
  41. package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.d.ts.map +1 -0
  42. package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.js +18 -0
  43. package/node_modules/@anthropic-ai/sandbox-runtime/dist/index.js.map +1 -0
  44. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.d.ts +52 -0
  45. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.d.ts.map +1 -0
  46. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.js +153 -0
  47. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/address.js.map +1 -0
  48. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.d.ts +164 -0
  49. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.d.ts.map +1 -0
  50. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.js +246 -0
  51. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/aws-sigv4.js.map +1 -0
  52. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.d.ts +58 -0
  53. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.d.ts.map +1 -0
  54. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.js +128 -0
  55. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/body-substitution.js.map +1 -0
  56. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.d.ts +124 -0
  57. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.d.ts.map +1 -0
  58. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.js +258 -0
  59. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-aws-pairs.js.map +1 -0
  60. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.d.ts +87 -0
  61. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.d.ts.map +1 -0
  62. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.js +138 -0
  63. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-decode.js.map +1 -0
  64. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.d.ts +67 -0
  65. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.d.ts.map +1 -0
  66. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.js +113 -0
  67. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-extract.js.map +1 -0
  68. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.d.ts +70 -0
  69. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.d.ts.map +1 -0
  70. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.js +171 -0
  71. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-env.js.map +1 -0
  72. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.d.ts +120 -0
  73. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.d.ts.map +1 -0
  74. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.js +281 -0
  75. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-mask-files.js.map +1 -0
  76. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.d.ts +108 -0
  77. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.d.ts.map +1 -0
  78. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.js +208 -0
  79. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/credential-sentinel.js.map +1 -0
  80. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.d.ts +82 -0
  81. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.d.ts.map +1 -0
  82. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.js +155 -0
  83. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/domain-pattern.js.map +1 -0
  84. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.d.ts +44 -0
  85. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.d.ts.map +1 -0
  86. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.js +220 -0
  87. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/generate-seccomp-filter.js.map +1 -0
  88. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.d.ts +150 -0
  89. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.d.ts.map +1 -0
  90. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.js +678 -0
  91. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/http-proxy.js.map +1 -0
  92. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.d.ts +32 -0
  93. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.d.ts.map +1 -0
  94. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.js +111 -0
  95. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/java-proxy-agent.js.map +1 -0
  96. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.d.ts +327 -0
  97. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.d.ts.map +1 -0
  98. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.js +2801 -0
  99. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-sandbox-utils.js.map +1 -0
  100. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.d.ts +55 -0
  101. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.d.ts.map +1 -0
  102. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.js +152 -0
  103. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/linux-violation-monitor.js.map +1 -0
  104. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.d.ts +12 -0
  105. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.d.ts.map +1 -0
  106. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.js +43 -0
  107. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/listen-in-range.js.map +1 -0
  108. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.d.ts +117 -0
  109. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.d.ts.map +1 -0
  110. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.js +1227 -0
  111. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/macos-sandbox-utils.js.map +1 -0
  112. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.d.ts +200 -0
  113. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.d.ts.map +1 -0
  114. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.js +443 -0
  115. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-ca.js.map +1 -0
  116. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.d.ts +28 -0
  117. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.d.ts.map +1 -0
  118. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.js +114 -0
  119. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mitm-leaf.js.map +1 -0
  120. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.d.ts +59 -0
  121. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.d.ts.map +1 -0
  122. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.js +159 -0
  123. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/mux-proxy.js.map +1 -0
  124. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.d.ts +162 -0
  125. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.d.ts.map +1 -0
  126. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.js +479 -0
  127. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/parent-proxy.js.map +1 -0
  128. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/path-entries.d.ts +133 -0
  129. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/path-entries.d.ts.map +1 -0
  130. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/path-entries.js +340 -0
  131. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/path-entries.js.map +1 -0
  132. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.d.ts +28 -0
  133. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.d.ts.map +1 -0
  134. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.js +172 -0
  135. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/read-deny-glob.js.map +1 -0
  136. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.d.ts +83 -0
  137. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.d.ts.map +1 -0
  138. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.js +212 -0
  139. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/request-filter.js.map +1 -0
  140. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.d.ts +76 -0
  141. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.d.ts.map +1 -0
  142. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.js +221 -0
  143. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/resolved-address-guard.js.map +1 -0
  144. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.d.ts +1887 -0
  145. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.d.ts.map +1 -0
  146. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.js +1262 -0
  147. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-config.js.map +1 -0
  148. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.d.ts +101 -0
  149. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.d.ts.map +1 -0
  150. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.js +2054 -0
  151. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-manager.js.map +1 -0
  152. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.d.ts +126 -0
  153. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.d.ts.map +1 -0
  154. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.js +3 -0
  155. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-schemas.js.map +1 -0
  156. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.d.ts +462 -0
  157. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.d.ts.map +1 -0
  158. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.js +1525 -0
  159. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-utils.js.map +1 -0
  160. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.d.ts +37 -0
  161. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.d.ts.map +1 -0
  162. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.js +125 -0
  163. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/sandbox-violation-store.js.map +1 -0
  164. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.d.ts +57 -0
  165. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.d.ts.map +1 -0
  166. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.js +332 -0
  167. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/socks-proxy.js.map +1 -0
  168. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.d.ts +100 -0
  169. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.d.ts.map +1 -0
  170. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.js +546 -0
  171. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/tls-terminate-proxy.js.map +1 -0
  172. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.d.ts +933 -0
  173. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.d.ts.map +1 -0
  174. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.js +1446 -0
  175. package/node_modules/@anthropic-ai/sandbox-runtime/dist/sandbox/windows-sandbox-utils.js.map +1 -0
  176. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.d.ts +31 -0
  177. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.d.ts.map +1 -0
  178. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.js +69 -0
  179. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/config-loader.js.map +1 -0
  180. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.d.ts +7 -0
  181. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.d.ts.map +1 -0
  182. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.js +25 -0
  183. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/debug.js.map +1 -0
  184. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.d.ts +15 -0
  185. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.d.ts.map +1 -0
  186. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.js +49 -0
  187. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/platform.js.map +1 -0
  188. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.d.ts +29 -0
  189. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.d.ts.map +1 -0
  190. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.js +51 -0
  191. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/ripgrep.js.map +1 -0
  192. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.d.ts +27 -0
  193. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.d.ts.map +1 -0
  194. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.js +47 -0
  195. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/shell-quote.js.map +1 -0
  196. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.d.ts +9 -0
  197. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.d.ts.map +1 -0
  198. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.js +25 -0
  199. package/node_modules/@anthropic-ai/sandbox-runtime/dist/utils/which.js.map +1 -0
  200. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/@pondwader/socks5-server/.github/workflows/ci.yml +27 -0
  201. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/@pondwader/socks5-server/LICENSE +20 -0
  202. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/@pondwader/socks5-server/README.md +151 -0
  203. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/@pondwader/socks5-server/dist/index.d.mts +87 -0
  204. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/@pondwader/socks5-server/dist/index.d.ts +87 -0
  205. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/@pondwader/socks5-server/dist/index.js +346 -0
  206. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/@pondwader/socks5-server/dist/index.mjs +307 -0
  207. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/@pondwader/socks5-server/package.json +31 -0
  208. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/LICENSE +22 -0
  209. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/Readme.md +1157 -0
  210. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/esm.mjs +16 -0
  211. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/index.js +24 -0
  212. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/lib/argument.js +149 -0
  213. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/lib/command.js +2509 -0
  214. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/lib/error.js +39 -0
  215. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/lib/help.js +520 -0
  216. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/lib/option.js +330 -0
  217. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/lib/suggestSimilar.js +101 -0
  218. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/package-support.json +16 -0
  219. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/package.json +84 -0
  220. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/typings/esm.d.mts +3 -0
  221. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/typings/index.d.ts +969 -0
  222. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/LICENSE +331 -0
  223. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/README.md +2071 -0
  224. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/dist/forge.all.min.js +2 -0
  225. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/dist/forge.all.min.js.map +1 -0
  226. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/dist/forge.min.js +2 -0
  227. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/dist/forge.min.js.map +1 -0
  228. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/dist/prime.worker.min.js +2 -0
  229. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/dist/prime.worker.min.js.map +1 -0
  230. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/flash/swf/SocketPool.swf +0 -0
  231. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/aes.js +1091 -0
  232. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/aesCipherSuites.js +282 -0
  233. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/asn1-validator.js +91 -0
  234. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/asn1.js +1503 -0
  235. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/baseN.js +186 -0
  236. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/cipher.js +230 -0
  237. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/cipherModes.js +999 -0
  238. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/des.js +496 -0
  239. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/ed25519.js +1091 -0
  240. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/forge.js +13 -0
  241. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/form.js +149 -0
  242. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/hmac.js +146 -0
  243. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/http.js +1346 -0
  244. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/index.all.js +16 -0
  245. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/index.js +33 -0
  246. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/jsbn.js +1294 -0
  247. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/kem.js +168 -0
  248. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/log.js +319 -0
  249. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/md.all.js +13 -0
  250. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/md.js +11 -0
  251. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/md5.js +289 -0
  252. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/mgf.js +12 -0
  253. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/mgf1.js +57 -0
  254. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/oids.js +180 -0
  255. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/pbe.js +1023 -0
  256. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/pbkdf2.js +211 -0
  257. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/pem.js +237 -0
  258. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/pkcs1.js +276 -0
  259. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/pkcs12.js +1078 -0
  260. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/pkcs7.js +1260 -0
  261. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/pkcs7asn1.js +410 -0
  262. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/pki.js +102 -0
  263. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/prime.js +297 -0
  264. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/prime.worker.js +168 -0
  265. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/prng.js +419 -0
  266. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/pss.js +241 -0
  267. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/random.js +191 -0
  268. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/rc2.js +410 -0
  269. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/rsa.js +1968 -0
  270. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/sha1.js +319 -0
  271. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/sha256.js +327 -0
  272. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/sha512.js +561 -0
  273. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/socket.js +287 -0
  274. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/ssh.js +236 -0
  275. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/tls.js +4282 -0
  276. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/tlssocket.js +249 -0
  277. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/util.js +2652 -0
  278. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/x509.js +3251 -0
  279. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/lib/xhr.js +738 -0
  280. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/node-forge/package.json +123 -0
  281. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/LICENSE +21 -0
  282. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/README.md +208 -0
  283. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/index.cjs +33 -0
  284. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/index.d.cts +4 -0
  285. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/index.d.ts +4 -0
  286. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/index.js +4 -0
  287. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/package.json +118 -0
  288. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/index.ts +4 -0
  289. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/ZodError.ts +330 -0
  290. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  291. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  292. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  293. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  294. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  295. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  296. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  297. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  298. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  299. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/errors.ts +13 -0
  300. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/external.ts +6 -0
  301. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  302. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  303. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  304. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  305. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  306. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/helpers/util.ts +224 -0
  307. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/index.ts +4 -0
  308. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/locales/en.ts +124 -0
  309. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/standard-schema.ts +113 -0
  310. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  311. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  312. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  313. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  314. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  315. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  316. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  317. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  318. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  319. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  320. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  321. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
  322. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  323. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  324. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  325. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  326. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  327. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  328. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  329. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  330. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  331. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  332. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/function.test.ts +257 -0
  333. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  334. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  335. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  336. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  337. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  338. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  339. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  340. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  341. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  342. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
  343. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  344. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  345. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  346. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  347. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  348. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  349. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  350. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  351. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  352. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  353. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  354. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  355. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  356. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  357. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  358. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  359. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  360. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  361. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  362. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  363. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  364. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  365. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  366. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  367. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  368. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  369. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  370. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  371. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v3/types.ts +5136 -0
  372. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/checks.ts +30 -0
  373. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  374. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/compat.ts +66 -0
  375. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/errors.ts +75 -0
  376. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/external.ts +50 -0
  377. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/index.ts +5 -0
  378. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/iso.ts +90 -0
  379. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/parse.ts +33 -0
  380. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
  381. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  382. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  383. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
  384. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  385. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  386. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  387. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  388. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
  389. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
  390. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  391. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  392. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
  393. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  394. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
  395. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
  396. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
  397. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  398. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
  399. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  400. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
  401. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  402. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
  403. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
  404. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
  405. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  406. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
  407. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
  408. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
  409. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
  410. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  411. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
  412. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
  413. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  414. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  415. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
  416. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  417. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
  418. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
  419. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
  420. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
  421. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
  422. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
  423. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
  424. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
  425. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  426. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  427. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  428. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  429. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
  430. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
  431. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
  432. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
  433. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
  434. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
  435. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
  436. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
  437. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
  438. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
  439. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
  440. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
  441. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
  442. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
  443. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  444. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  445. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/api.ts +1594 -0
  446. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/checks.ts +1283 -0
  447. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/config.ts +15 -0
  448. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/core.ts +134 -0
  449. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/doc.ts +44 -0
  450. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/errors.ts +424 -0
  451. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/function.ts +176 -0
  452. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/index.ts +15 -0
  453. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/json-schema.ts +143 -0
  454. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/parse.ts +94 -0
  455. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/regexes.ts +135 -0
  456. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/registries.ts +96 -0
  457. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/schemas.ts +3842 -0
  458. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
  459. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  460. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  461. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  462. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  463. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  464. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
  465. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/util.ts +775 -0
  466. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/versions.ts +5 -0
  467. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/core/zsf.ts +323 -0
  468. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/index.ts +4 -0
  469. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/ar.ts +125 -0
  470. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/az.ts +121 -0
  471. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/be.ts +184 -0
  472. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/ca.ts +127 -0
  473. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/cs.ts +142 -0
  474. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/de.ts +124 -0
  475. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/en.ts +127 -0
  476. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/eo.ts +125 -0
  477. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/es.ts +125 -0
  478. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/fa.ts +134 -0
  479. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/fi.ts +131 -0
  480. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
  481. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/fr.ts +124 -0
  482. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/he.ts +125 -0
  483. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/hu.ts +126 -0
  484. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/id.ts +125 -0
  485. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/index.ts +39 -0
  486. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/it.ts +125 -0
  487. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/ja.ts +122 -0
  488. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/kh.ts +126 -0
  489. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/ko.ts +131 -0
  490. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/mk.ts +127 -0
  491. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/ms.ts +124 -0
  492. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/nl.ts +126 -0
  493. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/no.ts +124 -0
  494. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/ota.ts +125 -0
  495. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/pl.ts +126 -0
  496. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/ps.ts +133 -0
  497. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/pt.ts +123 -0
  498. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/ru.ts +184 -0
  499. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/sl.ts +126 -0
  500. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/sv.ts +127 -0
  501. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/ta.ts +125 -0
  502. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/th.ts +126 -0
  503. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/tr.ts +121 -0
  504. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/ua.ts +126 -0
  505. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/ur.ts +126 -0
  506. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/vi.ts +125 -0
  507. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
  508. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
  509. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/checks.ts +32 -0
  510. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/coerce.ts +22 -0
  511. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/external.ts +40 -0
  512. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/index.ts +3 -0
  513. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/iso.ts +62 -0
  514. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/parse.ts +1 -0
  515. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
  516. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  517. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
  518. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  519. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  520. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  521. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
  522. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
  523. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  524. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
  525. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  526. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
  527. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
  528. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/src/v4-mini/index.ts +1 -0
  529. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/ZodError.cjs +138 -0
  530. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/ZodError.d.cts +164 -0
  531. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/ZodError.d.ts +164 -0
  532. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/ZodError.js +133 -0
  533. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/errors.cjs +17 -0
  534. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/errors.d.cts +5 -0
  535. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/errors.d.ts +5 -0
  536. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/errors.js +9 -0
  537. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/external.cjs +22 -0
  538. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/external.d.cts +6 -0
  539. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/external.d.ts +6 -0
  540. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/external.js +6 -0
  541. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  542. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  543. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  544. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  545. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  546. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  547. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  548. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  549. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  550. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  551. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  552. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  553. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  554. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  555. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  556. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  557. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  558. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  559. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  560. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  561. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/util.cjs +137 -0
  562. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/util.d.cts +85 -0
  563. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/util.d.ts +85 -0
  564. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/helpers/util.js +133 -0
  565. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/index.cjs +33 -0
  566. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/index.d.cts +4 -0
  567. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/index.d.ts +4 -0
  568. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/index.js +4 -0
  569. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/locales/en.cjs +111 -0
  570. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/locales/en.d.cts +3 -0
  571. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/locales/en.d.ts +3 -0
  572. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/locales/en.js +109 -0
  573. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/standard-schema.cjs +2 -0
  574. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/standard-schema.d.cts +102 -0
  575. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/standard-schema.d.ts +102 -0
  576. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/standard-schema.js +1 -0
  577. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/types.cjs +3775 -0
  578. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/types.d.cts +1031 -0
  579. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/types.d.ts +1031 -0
  580. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v3/types.js +3693 -0
  581. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/checks.cjs +32 -0
  582. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/checks.d.cts +1 -0
  583. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/checks.d.ts +1 -0
  584. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/checks.js +1 -0
  585. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/coerce.cjs +47 -0
  586. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  587. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  588. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/coerce.js +17 -0
  589. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/compat.cjs +57 -0
  590. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/compat.d.cts +46 -0
  591. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/compat.d.ts +46 -0
  592. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/compat.js +27 -0
  593. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/errors.cjs +67 -0
  594. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/errors.d.cts +30 -0
  595. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/errors.d.ts +30 -0
  596. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/errors.js +41 -0
  597. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/external.cjs +70 -0
  598. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/external.d.cts +13 -0
  599. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/external.d.ts +13 -0
  600. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/external.js +18 -0
  601. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/index.cjs +33 -0
  602. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/index.d.cts +4 -0
  603. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/index.d.ts +4 -0
  604. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/index.js +4 -0
  605. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/iso.cjs +60 -0
  606. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/iso.d.cts +22 -0
  607. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/iso.d.ts +22 -0
  608. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/iso.js +30 -0
  609. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/parse.cjs +32 -0
  610. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/parse.d.cts +23 -0
  611. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/parse.d.ts +23 -0
  612. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/parse.js +6 -0
  613. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/schemas.cjs +1109 -0
  614. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/schemas.d.cts +630 -0
  615. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/schemas.d.ts +630 -0
  616. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/classic/schemas.js +1006 -0
  617. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/api.cjs +1039 -0
  618. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/api.d.cts +284 -0
  619. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/api.d.ts +284 -0
  620. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/api.js +906 -0
  621. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/checks.cjs +591 -0
  622. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/checks.d.cts +278 -0
  623. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/checks.d.ts +278 -0
  624. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/checks.js +565 -0
  625. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/core.cjs +67 -0
  626. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/core.d.cts +49 -0
  627. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/core.d.ts +49 -0
  628. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/core.js +61 -0
  629. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/doc.cjs +39 -0
  630. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/doc.d.cts +14 -0
  631. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/doc.d.ts +14 -0
  632. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/doc.js +35 -0
  633. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/errors.cjs +226 -0
  634. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/errors.d.cts +208 -0
  635. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/errors.d.ts +208 -0
  636. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/errors.js +195 -0
  637. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/function.cjs +102 -0
  638. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/function.d.cts +52 -0
  639. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/function.d.ts +52 -0
  640. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/function.js +75 -0
  641. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/index.cjs +44 -0
  642. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/index.d.cts +15 -0
  643. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/index.d.ts +15 -0
  644. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/index.js +15 -0
  645. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/json-schema.cjs +2 -0
  646. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/json-schema.d.cts +87 -0
  647. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/json-schema.d.ts +87 -0
  648. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/json-schema.js +1 -0
  649. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/parse.cjs +87 -0
  650. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/parse.d.cts +25 -0
  651. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/parse.d.ts +25 -0
  652. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/parse.js +57 -0
  653. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/regexes.cjs +103 -0
  654. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/regexes.d.cts +62 -0
  655. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/regexes.d.ts +62 -0
  656. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/regexes.js +95 -0
  657. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/registries.cjs +56 -0
  658. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/registries.d.cts +35 -0
  659. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/registries.d.ts +35 -0
  660. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/registries.js +51 -0
  661. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/schemas.cjs +1748 -0
  662. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/schemas.d.cts +1041 -0
  663. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/schemas.d.ts +1041 -0
  664. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/schemas.js +1717 -0
  665. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  666. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
  667. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
  668. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/standard-schema.js +1 -0
  669. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
  670. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
  671. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
  672. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/to-json-schema.js +849 -0
  673. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/util.cjs +539 -0
  674. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/util.d.cts +183 -0
  675. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/util.d.ts +183 -0
  676. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/util.js +493 -0
  677. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/versions.cjs +8 -0
  678. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/versions.d.cts +5 -0
  679. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/versions.d.ts +5 -0
  680. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/core/versions.js +5 -0
  681. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/index.cjs +22 -0
  682. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/index.d.cts +3 -0
  683. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/index.d.ts +3 -0
  684. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/index.js +3 -0
  685. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ar.cjs +142 -0
  686. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ar.d.cts +4 -0
  687. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ar.d.ts +4 -0
  688. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ar.js +116 -0
  689. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/az.cjs +141 -0
  690. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/az.d.cts +4 -0
  691. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/az.d.ts +4 -0
  692. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/az.js +115 -0
  693. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/be.cjs +190 -0
  694. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/be.d.cts +4 -0
  695. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/be.d.ts +4 -0
  696. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/be.js +164 -0
  697. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ca.cjs +144 -0
  698. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ca.d.cts +4 -0
  699. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ca.d.ts +4 -0
  700. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ca.js +118 -0
  701. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/cs.cjs +161 -0
  702. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/cs.d.cts +4 -0
  703. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/cs.d.ts +4 -0
  704. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/cs.js +135 -0
  705. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/de.cjs +142 -0
  706. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/de.d.cts +4 -0
  707. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/de.d.ts +4 -0
  708. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/de.js +116 -0
  709. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/en.cjs +145 -0
  710. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/en.d.cts +5 -0
  711. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/en.d.ts +5 -0
  712. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/en.js +117 -0
  713. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/eo.cjs +144 -0
  714. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/eo.d.cts +5 -0
  715. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/eo.d.ts +5 -0
  716. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/eo.js +116 -0
  717. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/es.cjs +143 -0
  718. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/es.d.cts +4 -0
  719. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/es.d.ts +4 -0
  720. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/es.js +117 -0
  721. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fa.cjs +148 -0
  722. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fa.d.cts +4 -0
  723. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fa.d.ts +4 -0
  724. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fa.js +122 -0
  725. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fi.cjs +148 -0
  726. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fi.d.cts +4 -0
  727. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fi.d.ts +4 -0
  728. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fi.js +122 -0
  729. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
  730. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
  731. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  732. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fr-CA.js +117 -0
  733. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fr.cjs +142 -0
  734. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fr.d.cts +4 -0
  735. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fr.d.ts +4 -0
  736. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/fr.js +116 -0
  737. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/he.cjs +143 -0
  738. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/he.d.cts +4 -0
  739. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/he.d.ts +4 -0
  740. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/he.js +117 -0
  741. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/hu.cjs +143 -0
  742. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/hu.d.cts +4 -0
  743. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/hu.d.ts +4 -0
  744. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/hu.js +117 -0
  745. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/id.cjs +142 -0
  746. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/id.d.cts +4 -0
  747. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/id.d.ts +4 -0
  748. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/id.js +116 -0
  749. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/index.cjs +84 -0
  750. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/index.d.cts +39 -0
  751. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/index.d.ts +39 -0
  752. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/index.js +39 -0
  753. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/it.cjs +143 -0
  754. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/it.d.cts +4 -0
  755. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/it.d.ts +4 -0
  756. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/it.js +117 -0
  757. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ja.cjs +141 -0
  758. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ja.d.cts +4 -0
  759. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ja.d.ts +4 -0
  760. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ja.js +115 -0
  761. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/kh.cjs +143 -0
  762. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/kh.d.cts +4 -0
  763. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/kh.d.ts +4 -0
  764. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/kh.js +117 -0
  765. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ko.cjs +147 -0
  766. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ko.d.cts +4 -0
  767. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ko.d.ts +4 -0
  768. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ko.js +121 -0
  769. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/mk.cjs +144 -0
  770. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/mk.d.cts +4 -0
  771. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/mk.d.ts +4 -0
  772. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/mk.js +118 -0
  773. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ms.cjs +142 -0
  774. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ms.d.cts +4 -0
  775. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ms.d.ts +4 -0
  776. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ms.js +116 -0
  777. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/nl.cjs +143 -0
  778. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/nl.d.cts +4 -0
  779. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/nl.d.ts +4 -0
  780. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/nl.js +117 -0
  781. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/no.cjs +142 -0
  782. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/no.d.cts +4 -0
  783. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/no.d.ts +4 -0
  784. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/no.js +116 -0
  785. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ota.cjs +143 -0
  786. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ota.d.cts +4 -0
  787. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ota.d.ts +4 -0
  788. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ota.js +117 -0
  789. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/pl.cjs +143 -0
  790. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/pl.d.cts +4 -0
  791. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/pl.d.ts +4 -0
  792. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/pl.js +117 -0
  793. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ps.cjs +148 -0
  794. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ps.d.cts +4 -0
  795. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ps.d.ts +4 -0
  796. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ps.js +122 -0
  797. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/pt.cjs +142 -0
  798. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/pt.d.cts +4 -0
  799. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/pt.d.ts +4 -0
  800. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/pt.js +116 -0
  801. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ru.cjs +190 -0
  802. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ru.d.cts +4 -0
  803. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ru.d.ts +4 -0
  804. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ru.js +164 -0
  805. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/sl.cjs +143 -0
  806. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/sl.d.cts +4 -0
  807. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/sl.d.ts +4 -0
  808. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/sl.js +117 -0
  809. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/sv.cjs +144 -0
  810. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/sv.d.cts +4 -0
  811. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/sv.d.ts +4 -0
  812. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/sv.js +118 -0
  813. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ta.cjs +143 -0
  814. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ta.d.cts +4 -0
  815. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ta.d.ts +4 -0
  816. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ta.js +117 -0
  817. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/th.cjs +143 -0
  818. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/th.d.cts +4 -0
  819. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/th.d.ts +4 -0
  820. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/th.js +117 -0
  821. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/tr.cjs +143 -0
  822. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/tr.d.cts +5 -0
  823. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/tr.d.ts +5 -0
  824. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/tr.js +115 -0
  825. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ua.cjs +143 -0
  826. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ua.d.cts +4 -0
  827. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ua.d.ts +4 -0
  828. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ua.js +117 -0
  829. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ur.cjs +143 -0
  830. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ur.d.cts +4 -0
  831. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ur.d.ts +4 -0
  832. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/ur.js +117 -0
  833. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/vi.cjs +142 -0
  834. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/vi.d.cts +4 -0
  835. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/vi.d.ts +4 -0
  836. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/vi.js +116 -0
  837. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
  838. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
  839. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  840. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/zh-CN.js +116 -0
  841. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
  842. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
  843. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  844. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/locales/zh-TW.js +117 -0
  845. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/checks.cjs +34 -0
  846. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/checks.d.cts +1 -0
  847. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/checks.d.ts +1 -0
  848. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/checks.js +1 -0
  849. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/coerce.cjs +47 -0
  850. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  851. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  852. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/coerce.js +17 -0
  853. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/external.cjs +62 -0
  854. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/external.d.cts +11 -0
  855. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/external.d.ts +11 -0
  856. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/external.js +13 -0
  857. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/index.cjs +32 -0
  858. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/index.d.cts +3 -0
  859. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/index.d.ts +3 -0
  860. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/index.js +3 -0
  861. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/iso.cjs +60 -0
  862. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/iso.d.cts +22 -0
  863. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/iso.d.ts +22 -0
  864. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/iso.js +30 -0
  865. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/parse.cjs +8 -0
  866. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/parse.d.cts +1 -0
  867. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/parse.d.ts +1 -0
  868. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/parse.js +1 -0
  869. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/schemas.cjs +839 -0
  870. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/schemas.d.cts +356 -0
  871. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/schemas.d.ts +356 -0
  872. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4/mini/schemas.js +732 -0
  873. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4-mini/index.cjs +17 -0
  874. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4-mini/index.d.cts +1 -0
  875. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4-mini/index.d.ts +1 -0
  876. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/v4-mini/index.js +1 -0
  877. package/node_modules/@anthropic-ai/sandbox-runtime/package.json +88 -0
  878. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/java-proxy-agent/build.ts +95 -0
  879. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/java-proxy-agent/srt-proxy-agent.jar +0 -0
  880. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/seccomp/arm64/apply-seccomp +0 -0
  881. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/seccomp/build.ts +69 -0
  882. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/seccomp/x64/apply-seccomp +0 -0
  883. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/srt-win/arm64/srt-win.exe +0 -0
  884. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/srt-win/build.ts +28 -0
  885. package/node_modules/@anthropic-ai/sandbox-runtime/vendor/srt-win/x64/srt-win.exe +0 -0
  886. package/package.json +5 -2
  887. package/themes/tau-dark.json +1 -1
  888. package/extensions/sandbox/permissions/network.ts +0 -169
  889. package/extensions/sandbox/permissions/unsandboxed.ts +0 -31
@@ -0,0 +1,2054 @@
1
+ import { hasNameReading, literalReadLists, literalWriteLists, reExposedBy, readRulesOf, samePathEntries, spelledOf, withOtherReadings, writeRootsOf, } from './path-entries.js';
2
+ import { createHttpProxyServer } from './http-proxy.js';
3
+ import { createSocksProxyServer } from './socks-proxy.js';
4
+ import { createMuxProxyServer } from './mux-proxy.js';
5
+ import { listenInRange } from './listen-in-range.js';
6
+ import { SentinelRegistry } from './credential-sentinel.js';
7
+ import { MaskedFileStore, buildMaskedFileBinds, } from './credential-mask-files.js';
8
+ import { buildMaskedEnvVars } from './credential-mask-env.js';
9
+ import { AwsPairRegistry, createSigv4Planner, registerAwsPairs, } from './credential-aws-pairs.js';
10
+ import { certThumbprint, createMitmCA, CRL_PATH, disposeMitmCA, } from './mitm-ca.js';
11
+ import { logForDebugging } from '../utils/debug.js';
12
+ import { whichSync } from '../utils/which.js';
13
+ import { getPlatform, getWslVersion } from '../utils/platform.js';
14
+ import * as fs from 'fs';
15
+ import { randomBytes } from 'node:crypto';
16
+ import { WorkingDirectoryChanged, wrapCommandWithSandboxLinux, initializeLinuxNetworkBridge, checkLinuxDependencies, cleanupBwrapMountPoints, linuxGetCwdMandatoryDenyPaths, } from './linux-sandbox-utils.js';
17
+ import { expandReadDenyGlobLinuxSteps } from './read-deny-glob.js';
18
+ import { wrapCommandWithSandboxMacOS, startMacOSSandboxLogMonitor, } from './macos-sandbox-utils.js';
19
+ import { startLinuxSandboxViolationMonitor, } from './linux-violation-monitor.js';
20
+ import { checkWindowsDependencies, checkWindowsDependenciesAsync, wrapCommandWithSandboxWindows, parseWindowsBinShell, expandWindowsFsPaths, stampWindowsAcl, restoreWindowsAcl, grantWindowsAcl, revokeWindowsAcl, getWindowsSandboxUserStatusAsync, getWindowsSandboxCaCert, ensurePersistentWindowsCa, verifyWindowsWfpEgress, resolveSrtWin, WindowsSandboxError, DEFAULT_WINDOWS_PROXY_PORT_RANGE, } from './windows-sandbox-utils.js';
21
+ import { getDefaultWritePaths, containsGlobChars, globPatternBaseDir, normalizePathForSandbox, removeTrailingGlobSuffix, walkGlobPatternSteps, workingDirectory, finish, finishInTurns, attributionKeyFor, decodeSandboxedCommand, encodeSandboxedCommand, } from './sandbox-utils.js';
22
+ import { SandboxViolationStore, sanitizeUnregisteredCommandKey, shouldIgnoreViolation, } from './sandbox-violation-store.js';
23
+ import { canonicalizeHost, isValidHost, redactUrl, resolveParentProxy, } from './parent-proxy.js';
24
+ import { matchesDomainPattern, matchesDomainPatternWithPort, stripDomainPatternPort, } from './domain-pattern.js';
25
+ import { createResolvedAddressGuard, isResolvedAddressDenied, } from './resolved-address-guard.js';
26
+ import { EOL } from 'node:os';
27
+ import { dirname } from 'node:path';
28
+ import { getJavaProxyAgentJarPathAsync } from './java-proxy-agent.js';
29
+ import { getApplySeccompBinaryPathAsync } from './generate-seccomp-filter.js';
30
+ // ============================================================================
31
+ // Private Module State
32
+ // ============================================================================
33
+ let config;
34
+ /** How many times a configuration has been installed. A wrap tells by this
35
+ * as well as by the object: initialize() keeps the caller's own, which can
36
+ * be handed to it again. */
37
+ let configInstalls = 0;
38
+ let httpProxyServer;
39
+ let socksProxyServer;
40
+ let muxProxyServer;
41
+ let managerContext;
42
+ let initializationPromise;
43
+ let cleanupRegistered = false;
44
+ let logMonitorShutdown;
45
+ let linuxMonitor;
46
+ let parentProxy;
47
+ /** Read live through {@link directLookup}, so a config update applies to the next dial. */
48
+ let resolvedAddressGuard = createResolvedAddressGuard();
49
+ let mitmCA;
50
+ /**
51
+ * Resolved path of the JVM proxy agent jar (see java-proxy-agent.ts); set
52
+ * while a proxy is advertised to the sandbox, undefined if the jar is not
53
+ * shipped/found (JVMs then just aren't proxy-aware, as before).
54
+ */
55
+ let javaAgentJarPath;
56
+ // Per-session proxy auth token. Generated at proxy start, exported only into
57
+ // the sandbox child env, checked on every CONNECT/request — so a host process
58
+ // dialing 127.0.0.1:<proxyPort> can't reach the filter callback.
59
+ let proxyAuthToken;
60
+ // Windows: the resolved access set that was actually applied at
61
+ // initialize(). `undefined` means no stamp/grant was applied
62
+ // (gates running `acl restore`/`acl revoke` at reset()).
63
+ let windowsFsStampedSet;
64
+ // The sandbox user SID captured at initialize(). reset() uses this
65
+ // so a config change between init and reset can't strand ACEs
66
+ // under a different SID.
67
+ let windowsFsSbUserSid;
68
+ // The RAW config inputs that produced `windowsFsStampedSet`.
69
+ // updateConfig() compares these (not the resolved set) so it never
70
+ // re-expands globs — see `sameWindowsStampSet`.
71
+ let windowsFsRawInputs;
72
+ // `verifyWindowsWfpEgress()` is once per PROCESS (it spawns a
73
+ // CreateProcessWithLogonW runner; first call may create the sandbox
74
+ // user's profile). The WFP fence is install-scoped, not config- or
75
+ // session-scoped — reset() does NOT clear this, so updateConfig()'s
76
+ // reset+reinit and the test suite's per-test reset() don't re-verify.
77
+ let windowsWfpVerified = false;
78
+ // Resolved once at initialize() (`resolveSrtWin` stats the disk).
79
+ // Captured so wrapWithSandboxArgv/reset() don't re-resolve per call
80
+ // and so reset()'s revoke/restore addresses the SAME binary the
81
+ // grants/stamps were applied with even if `config` mutated between.
82
+ let srtWinSpawn;
83
+ const sandboxViolationStore = new SandboxViolationStore();
84
+ // Per-session sentinel↔real-value map for masked credentials. Lives only in
85
+ // process memory; never written to disk or logged. Cleared on reset().
86
+ const sentinelRegistry = new SentinelRegistry();
87
+ // Per-session linked AWS credential pairs for SigV4 re-signing, keyed by
88
+ // the fake access key id. Same lifecycle and secrecy posture as the
89
+ // sentinel registry.
90
+ const awsPairRegistry = new AwsPairRegistry();
91
+ // Temp dir holding the sentinel-content fake files for masked credential
92
+ // files. Created lazily on first masked file; removed on reset().
93
+ const maskedFileStore = new MaskedFileStore();
94
+ // ============================================================================
95
+ // Private Helper Functions (not exported)
96
+ // ============================================================================
97
+ function registerCleanup() {
98
+ if (cleanupRegistered) {
99
+ return;
100
+ }
101
+ const cleanupHandler = () => reset().catch(e => {
102
+ logForDebugging(`Cleanup failed in registerCleanup ${e}`, {
103
+ level: 'error',
104
+ });
105
+ });
106
+ process.once('exit', cleanupHandler);
107
+ process.once('SIGINT', cleanupHandler);
108
+ process.once('SIGTERM', cleanupHandler);
109
+ cleanupRegistered = true;
110
+ }
111
+ /**
112
+ * Attribution key to command text for every wrapped invocation, so each
113
+ * producer can report (and ignoreViolations can match) the command an event
114
+ * belongs to rather than the opaque key. Keys are held decoded because that
115
+ * is the form the carriers deliver. Bounded FIFO: the violation store itself
116
+ * only retains the last 100 events, so long-gone invocations need no entry.
117
+ */
118
+ const MAX_COMMAND_TEXTS = 1024;
119
+ const commandTextsByKey = new Map();
120
+ /** Exported for testing. */
121
+ export function registerCommandText(command, options) {
122
+ const key = decodeSandboxedCommand(encodeSandboxedCommand(attributionKeyFor(command, options?.commandId)));
123
+ const text = options?.commandText ?? command;
124
+ commandTextsByKey.delete(key);
125
+ commandTextsByKey.set(key, text);
126
+ while (commandTextsByKey.size > MAX_COMMAND_TEXTS) {
127
+ const oldest = commandTextsByKey.keys().next().value;
128
+ if (oldest === undefined)
129
+ break;
130
+ commandTextsByKey.delete(oldest);
131
+ }
132
+ }
133
+ /**
134
+ * The command text for a decoded attribution key. Keys arrive over carriers
135
+ * the sandboxed process can write (the observe socket's event field, the
136
+ * macOS log tag, the proxy username), so only a key this process registered
137
+ * carries the embedder's own text; anything else is untrusted bytes.
138
+ * Exported for testing.
139
+ */
140
+ export function resolveCommandText(decodedKey) {
141
+ return (commandTextsByKey.get(decodedKey) ??
142
+ sanitizeUnregisteredCommandKey(decodedKey));
143
+ }
144
+ /**
145
+ * Record a proxy-side denial in the violation store so the model sees a
146
+ * structured <sandbox_violations> block alongside the raw 403 / SOCKS
147
+ * failure in stderr — parity with the macOS seatbelt log monitor and the
148
+ * Linux seccomp observer. The proxy is the only component that knows the
149
+ * destination host of a network deny, so neither of those can produce
150
+ * this line. `encodedCommand` (from the proxy username) attributes it to
151
+ * the invocation; without one the event is stored unattributed.
152
+ */
153
+ function recordProxyViolation(line, encodedCommand) {
154
+ const command = encodedCommand
155
+ ? resolveCommandText(decodeSandboxedCommand(encodedCommand))
156
+ : undefined;
157
+ // Same suppression the seatbelt / seccomp monitors apply, so a
158
+ // configured ignoreViolations pattern silences the event no matter
159
+ // which producer saw it.
160
+ if (shouldIgnoreViolation(line, command, config?.ignoreViolations)) {
161
+ return;
162
+ }
163
+ sandboxViolationStore.addViolation({
164
+ line,
165
+ encodedCommand,
166
+ command,
167
+ timestamp: new Date(),
168
+ });
169
+ }
170
+ function recordOutboundDeny(host, port, reason, encodedCommand) {
171
+ recordProxyViolation(`deny network-outbound ${host}:${port} (${reason})`, encodedCommand);
172
+ }
173
+ /** Direct-dial `lookup` for the proxies: the current guard's, with a refusal recorded as a violation. */
174
+ const directLookup = (port, encodedCommand) => (hostname, options, callback) => resolvedAddressGuard.lookupFor(port)(hostname, options, (err, address, family) => {
175
+ if (isResolvedAddressDenied(err)) {
176
+ recordOutboundDeny(hostname, port, err.reason, encodedCommand);
177
+ }
178
+ callback(err, address, family);
179
+ });
180
+ /**
181
+ * The request URL as it should appear in a model-visible violation line:
182
+ * origin + path, with any query string reduced to a `?…` marker (origin
183
+ * carries no userinfo, so an embedded `name:pass@` is dropped too). Query
184
+ * strings routinely carry credentials (api_key=, access_token=, signed
185
+ * URLs) that the sandboxed client interpolated at runtime and that were
186
+ * never in the model's context, so they must not enter the transcript via
187
+ * the <sandbox_violations> block. The full URL still reaches the embedder's
188
+ * filterRequest callback and its own debug logging.
189
+ */
190
+ function redactUrlForViolation(url) {
191
+ try {
192
+ const u = new URL(url);
193
+ return `${u.origin}${u.pathname}${u.search ? '?…' : ''}`;
194
+ }
195
+ catch {
196
+ // Not an absolute URL (shouldn't happen for proxy requests) — drop
197
+ // anything after '?' rather than risk leaking it.
198
+ const q = url.indexOf('?');
199
+ return q === -1 ? url : `${url.slice(0, q)}?…`;
200
+ }
201
+ }
202
+ async function filterNetworkRequest(port, host, sandboxAskCallback, encodedCommand) {
203
+ const denied = (reason) => {
204
+ recordOutboundDeny(host, port, reason, encodedCommand);
205
+ return false;
206
+ };
207
+ if (!config) {
208
+ logForDebugging('No config available, denying network request');
209
+ return denied('sandbox policy unavailable');
210
+ }
211
+ // Reject hosts containing control characters before pattern matching.
212
+ // `matchesDomainPattern` uses string suffix matching which is trivially
213
+ // fooled by e.g. `evil.com\x00.allowed.com` — the null byte passes
214
+ // `.endsWith()` but truncates at the libc DNS layer. The SOCKS path is the
215
+ // main exposure (DOMAINNAME is unvalidated bytes); HTTP is protected by
216
+ // llhttp/URL parsing, but we check here for defence in depth.
217
+ if (!isValidHost(host)) {
218
+ logForDebugging(`Denying malformed host: ${JSON.stringify(host)}:${port}`, {
219
+ level: 'error',
220
+ });
221
+ return denied('malformed host');
222
+ }
223
+ // Canonicalize so string comparisons match what getaddrinfo() will dial.
224
+ // Without this, inet_aton shorthand like `2852039166` (= 169.254.169.254)
225
+ // or `127.1` slips past a denylist entry for the dotted-decimal form.
226
+ const canonicalHost = canonicalizeHost(host) ?? host;
227
+ // Check denied domains first
228
+ for (const deniedDomain of config.network.deniedDomains) {
229
+ if (matchesDomainPatternWithPort(canonicalHost, port, deniedDomain)) {
230
+ logForDebugging(`Denied by config rule: ${host}:${port}`);
231
+ // The matched entry's own reason when the caller supplied one, so the
232
+ // model reads why this destination is off-limits (and the sanctioned
233
+ // alternative) instead of a generic deny; keyed by the exact entry.
234
+ return denied(config.network.deniedDomainReasons?.[deniedDomain] ??
235
+ 'host is on the deny list');
236
+ }
237
+ }
238
+ // Check allowed domains
239
+ for (const allowedDomain of config.network.allowedDomains) {
240
+ if (matchesDomainPatternWithPort(canonicalHost, port, allowedDomain)) {
241
+ logForDebugging(`Allowed by config rule: ${host}:${port}`);
242
+ return true;
243
+ }
244
+ }
245
+ // No matching rules - ask user or deny. strictAllowlist makes the
246
+ // allowlist deterministic enforcement: never fall through to the callback.
247
+ if (!sandboxAskCallback || config.network.strictAllowlist) {
248
+ logForDebugging(`No matching config rule, denying: ${host}:${port}`);
249
+ return denied('host is not on the allow list');
250
+ }
251
+ logForDebugging(`No matching config rule, asking user: ${host}:${port}`);
252
+ try {
253
+ const userAllowed = await sandboxAskCallback({ host, port });
254
+ if (userAllowed) {
255
+ logForDebugging(`User allowed: ${host}:${port}`);
256
+ return true;
257
+ }
258
+ logForDebugging(`User denied: ${host}:${port}`);
259
+ return denied('user denied');
260
+ }
261
+ catch (error) {
262
+ logForDebugging(`Error in permission callback: ${error}`, {
263
+ level: 'error',
264
+ });
265
+ return denied('permission prompt failed');
266
+ }
267
+ }
268
+ /**
269
+ * Build the header-mutation callback that substitutes sentinel→real for
270
+ * masked credentials. Returns undefined when no `credentials` block is
271
+ * configured — wiring the seam at all is unnecessary then.
272
+ *
273
+ * Per-host gating happens inside the registry: each sentinel carries its
274
+ * own injectHosts list and substitutes independently, so credential A's
275
+ * sentinel cannot be laundered through credential B's allowed host. The
276
+ * returned closure does not log header values; the registry holds the only
277
+ * copy of the real value.
278
+ */
279
+ function buildCredentialInjector() {
280
+ if (!config?.credentials)
281
+ return undefined;
282
+ return (headers, destHost) => {
283
+ sentinelRegistry.substituteInHeaders(headers, destHost, matchesDomainPattern);
284
+ };
285
+ }
286
+ /**
287
+ * Body counterpart of {@link buildCredentialInjector}: per-destination
288
+ * sentinel→real pairs for streaming substitution in request bodies, with
289
+ * the same per-credential injectHosts gating applied inside the registry.
290
+ */
291
+ function buildBodyCredentialInjector() {
292
+ if (!config?.credentials)
293
+ return undefined;
294
+ return destHost => sentinelRegistry.sentinelsForHost(destHost, matchesDomainPattern);
295
+ }
296
+ /**
297
+ * Build the per-request SigV4 hook for the TLS-terminating proxy.
298
+ * Returns undefined when no `credentials` block is configured. The hook
299
+ * consults {@link awsPairRegistry} at request time, so pairs registered
300
+ * later (wrapWithSandbox runs after the proxy starts) are picked up.
301
+ */
302
+ function buildSigv4Planner() {
303
+ if (!config?.credentials)
304
+ return undefined;
305
+ // Re-read the policies per request (not captured at proxy start) so an
306
+ // updateConfig() that changes credentials.sigv4 takes effect without a
307
+ // proxy restart, matching how the injector sees live registry state.
308
+ return (method, requestTarget, headers, destHost) => createSigv4Planner(awsPairRegistry, config?.credentials?.sigv4, matchesDomainPattern)(method, requestTarget, headers, destHost);
309
+ }
310
+ /**
311
+ * Get the MITM proxy socket path for a given host, if configured.
312
+ * Returns the socket path if the host matches any MITM domain pattern,
313
+ * otherwise returns undefined.
314
+ *
315
+ * Matches the canonicalized hostname, like the allow/deny filter
316
+ * (filterNetworkRequest) and the tlsTerminate exclusion below. This site
317
+ * fails OPEN on a miss — a host that matches no MITM pattern is dialed
318
+ * directly — so it must accept exactly the set of spellings the allowlist
319
+ * accepts: otherwise `api.example.com.` (trailing-dot FQDN, same name to
320
+ * DNS) passes the allowlist as `api.example.com` but misses every MITM
321
+ * pattern and skips the MITM proxy entirely. The proxies already hand this
322
+ * hook the canonical spelling; canonicalizing again here is defence in
323
+ * depth for any other caller.
324
+ */
325
+ function getMitmSocketPath(host) {
326
+ if (!config?.network.mitmProxy) {
327
+ return undefined;
328
+ }
329
+ const { socketPath, domains } = config.network.mitmProxy;
330
+ const canonicalHost = canonicalizeHost(host) ?? host;
331
+ for (const pattern of domains) {
332
+ if (matchesDomainPattern(canonicalHost, pattern)) {
333
+ logForDebugging(`Host ${host} matches MITM pattern ${pattern}`);
334
+ return socketPath;
335
+ }
336
+ }
337
+ return undefined;
338
+ }
339
+ /**
340
+ * Per-host TLS-termination opt-out from network.tlsTerminate.excludeDomains.
341
+ * Only consulted by the HTTP proxy when tlsTerminate is enabled; exempted
342
+ * hosts fall back to the opaque CONNECT tunnel (still allowlist-filtered),
343
+ * so mTLS / cert-pinning clients can complete their own handshake.
344
+ *
345
+ * Matches the canonicalized hostname, like the allow/deny filter
346
+ * (filterNetworkRequest) — otherwise a spelling the allowlist accepts after
347
+ * canonicalization (`127.1`, a trailing-dot FQDN) would dodge the exclusion
348
+ * and get terminated anyway.
349
+ */
350
+ function shouldTerminateTLSForHost(host) {
351
+ const excludeDomains = config?.network.tlsTerminate?.excludeDomains;
352
+ if (!excludeDomains?.length)
353
+ return true;
354
+ const canonicalHost = canonicalizeHost(host) ?? host;
355
+ for (const pattern of excludeDomains) {
356
+ if (!matchesDomainPattern(canonicalHost, pattern))
357
+ continue;
358
+ logForDebugging(`Host ${host} matches tlsTerminate.excludeDomains pattern ${pattern}; skipping TLS termination`);
359
+ // Masked-credential substitution only happens on the terminated path,
360
+ // so a credential whose injectHosts cover this host can never be
361
+ // injected here — the upstream gets the placeholder. Config validation
362
+ // rejects the fully-contradictory spellings; this flags the partial
363
+ // ones (e.g. default injectHosts = allowedDomains) at the moment they
364
+ // actually bite.
365
+ const masked = sentinelRegistry.namesInjectableAt(canonicalHost, matchesDomainPattern);
366
+ if (masked.length > 0) {
367
+ logForDebugging(`tlsTerminate.excludeDomains: masked credential(s) ${masked.join(', ')} ` +
368
+ `are configured for injection at ${host}, but its connections are ` +
369
+ `not terminated, so the upstream will receive the placeholder`, { level: 'error' });
370
+ }
371
+ return false;
372
+ }
373
+ return true;
374
+ }
375
+ async function startMuxProxyServer(sandboxAskCallback, portRange) {
376
+ const injectCredentials = buildCredentialInjector();
377
+ const injectBodyCredentials = buildBodyCredentialInjector();
378
+ httpProxyServer = createHttpProxyServer({
379
+ filter: (port, host, _socket, encodedCommand) => filterNetworkRequest(port, host, sandboxAskCallback, encodedCommand),
380
+ getMitmSocketPath,
381
+ mitmCA,
382
+ shouldTerminateTLS: shouldTerminateTLSForHost,
383
+ filterRequest: config?.network.filterRequest,
384
+ onFilterRequestDenied: ({ method, url, reason, encodedCommand }) => {
385
+ recordProxyViolation(`deny http-request ${method} ${redactUrlForViolation(url)} (${reason})`, encodedCommand);
386
+ },
387
+ // TLS-terminated path always gets the injector; the plain-HTTP path
388
+ // only when explicitly opted in. Without the opt-in, a sentinel sent
389
+ // over plain HTTP reaches the upstream unchanged (fails closed).
390
+ mutateHeaders: injectCredentials,
391
+ mutateHeadersPlaintext: config?.credentials?.allowPlaintextInject
392
+ ? injectCredentials
393
+ : undefined,
394
+ getBodySubstitutions: injectBodyCredentials,
395
+ getBodySubstitutionsPlaintext: config?.credentials?.allowPlaintextInject
396
+ ? injectBodyCredentials
397
+ : undefined,
398
+ // SigV4 re-signing is TLS-terminated-path only, like credential
399
+ // injection: the real signature must not travel over plaintext.
400
+ planSigv4: buildSigv4Planner(),
401
+ parentProxy,
402
+ lookupFor: directLookup,
403
+ proxyAuthToken,
404
+ });
405
+ socksProxyServer = createSocksProxyServer({
406
+ filter: (port, host, encodedCommand) => filterNetworkRequest(port, host, sandboxAskCallback, encodedCommand),
407
+ parentProxy,
408
+ lookupFor: directLookup,
409
+ proxyAuthToken,
410
+ probeUnauthenticated: async (port, host) => {
411
+ // Explicit deny rules only: an unauthenticated peer must never reach
412
+ // the ask callback, and a merely off-list host gets the generic
413
+ // cannot-authenticate refusal rather than a policy claim.
414
+ if (!config)
415
+ return {};
416
+ const canonical = canonicalizeHost(host) ?? host;
417
+ for (const entry of config.network.deniedDomains) {
418
+ if (matchesDomainPatternWithPort(canonical, port, entry)) {
419
+ const reason = config.network.deniedDomainReasons?.[entry] ??
420
+ 'host is on the deny list';
421
+ recordOutboundDeny(host, port, reason);
422
+ return { deniedReason: reason };
423
+ }
424
+ }
425
+ return {};
426
+ },
427
+ });
428
+ muxProxyServer = createMuxProxyServer({
429
+ httpServer: httpProxyServer,
430
+ handleSocksConnection: s => socksProxyServer.handleConnection(s),
431
+ httpBackendPortRange: portRange,
432
+ });
433
+ const mux = muxProxyServer;
434
+ // Backend first so the front-end never accepts a connection that would
435
+ // dispatch to an unbound backend. On Windows the backend's port is
436
+ // excluded when binding the front-end in the same WFP range.
437
+ const backendPort = await mux.listenHttpBackend();
438
+ await listenInRange(mux.server, p => mux.server.listen(p, '127.0.0.1'), portRange, backendPort !== undefined ? new Set([backendPort]) : new Set());
439
+ const muxPort = mux.getPort();
440
+ if (muxPort === undefined) {
441
+ throw new Error('Failed to get mux proxy server port');
442
+ }
443
+ mux.unref();
444
+ logForDebugging(`Mux proxy (HTTP+SOCKS) listening on localhost:${muxPort}`);
445
+ return muxPort;
446
+ }
447
+ // ============================================================================
448
+ // Public Module Functions (will be exported via namespace)
449
+ // ============================================================================
450
+ async function initialize(runtimeConfig, sandboxAskCallback, enableLogMonitor = false) {
451
+ // Return if already initializing
452
+ if (initializationPromise) {
453
+ await initializationPromise;
454
+ return;
455
+ }
456
+ // Store config for use by other functions
457
+ config = runtimeConfig;
458
+ configInstalls++;
459
+ // Resolve parent/upstream proxy from config or HTTP_PROXY env before we
460
+ // start our own listeners (which will later shadow those vars in the child).
461
+ parentProxy = resolveParentProxy(runtimeConfig.network.parentProxy);
462
+ if (parentProxy) {
463
+ logForDebugging(`Parent proxy configured: http=${redactUrl(parentProxy.httpUrl)} ` +
464
+ `https=${redactUrl(parentProxy.httpsUrl)}`);
465
+ }
466
+ resolvedAddressGuard = createResolvedAddressGuard(runtimeConfig.network);
467
+ // Load TLS-termination CA if configured. Throws on unreadable/non-PEM —
468
+ // tlsTerminate is explicit opt-in, so a bad config is a hard error.
469
+ if (runtimeConfig.network.tlsTerminate && runtimeConfig.network.mitmProxy) {
470
+ throw new Error('network.tlsTerminate and network.mitmProxy are mutually exclusive');
471
+ }
472
+ // On Windows with tlsTerminate and no explicit caCertPath/caKeyPath,
473
+ // defer CA creation until the Windows block below has resolved
474
+ // srt-win and fetched user status — the persistent CA is
475
+ // generated-if-absent under windowsStateDir()/ca and
476
+ // trusted in the sandbox user's Root store, then loaded here.
477
+ // Explicit paths (or non-Windows) go straight to createMitmCA.
478
+ const tlsTerminate = runtimeConfig.network.tlsTerminate;
479
+ const useWindowsPersistentCa = getPlatform() === 'windows' &&
480
+ tlsTerminate !== undefined &&
481
+ !tlsTerminate.caCertPath &&
482
+ !tlsTerminate.caKeyPath;
483
+ mitmCA =
484
+ tlsTerminate && !useWindowsPersistentCa
485
+ ? createMitmCA(tlsTerminate)
486
+ : undefined;
487
+ // Check dependencies
488
+ const deps = await checkDependenciesAsync();
489
+ if (deps.errors.length > 0) {
490
+ throw new Error(`Sandbox dependencies not available: ${deps.errors.join(', ')}`);
491
+ }
492
+ // Start log monitor for macOS if enabled
493
+ if (enableLogMonitor && getPlatform() === 'macos') {
494
+ logMonitorShutdown = startMacOSSandboxLogMonitor(sandboxViolationStore.addViolation.bind(sandboxViolationStore), config.ignoreViolations, resolveCommandText);
495
+ logForDebugging('Started macOS sandbox log monitor');
496
+ }
497
+ if (enableLogMonitor && getPlatform() === 'linux') {
498
+ // The monitor compares paths the kernel reported, so its lists are
499
+ // expanded the way the wrapper expands them (getFsWriteConfig folds in
500
+ // the default write paths and drops the patterns, so only names are left;
501
+ // normalizePathForSandbox resolves `~`, relative spellings and symlinks),
502
+ // plus the built-in write denies the wrapper always applies.
503
+ // It does not reproduce the wrapper's existence and boundary-symlink
504
+ // filters, nor the ripgrep scan for nested dangerous paths; and it still
505
+ // reports writes bwrap permits through `--dev`, `--proc` and the tmpfs
506
+ // over each read-denied directory. Started once, so both lists are fixed
507
+ // at the cwd and configuration of this call, and at the disk as it is
508
+ // now: an entry with glob characters that becomes the name of a path
509
+ // later is applied by the next wrap and stays unknown here.
510
+ const monitoredWrites = getFsWriteConfig();
511
+ linuxMonitor = startLinuxSandboxViolationMonitor(sandboxViolationStore.addViolation.bind(sandboxViolationStore), {
512
+ // apply-seccomp's observer reports every write-intent syscall
513
+ // (allowed or not). Only paths bwrap would actually refuse — outside
514
+ // allowWrite or inside a denyWrite carve-out — go to the store. With
515
+ // the policy on, the default write paths are listed in full rather
516
+ // than as getFsWriteConfig() narrowed them: a home directory it leaves
517
+ // out because it is read-denied sits under that deny's writable
518
+ // tmpfs, so a write there is permitted and is not a violation.
519
+ allowWritePaths: [
520
+ ...writeRootsOf(monitoredWrites),
521
+ ...(config.filesystem.disabled ? [] : getDefaultWritePaths()),
522
+ ].map(p => normalizePathForSandbox(p, { literal: true })),
523
+ denyWritePaths: [
524
+ ...monitoredWrites.denyWithinAllow.map(p => normalizePathForSandbox(p, { literal: true })),
525
+ ...(monitoredWrites.literalDenyWithinAllow ?? []).map(p => normalizePathForSandbox(p, { literal: true })),
526
+ // filesystem.disabled reaches the wrapper as `writeConfig ===
527
+ // undefined`, which skips every bind and the built-in denies with
528
+ // them, so the monitor must not judge by them either.
529
+ ...(config.filesystem.disabled
530
+ ? []
531
+ : linuxGetCwdMandatoryDenyPaths(getAllowGitConfig())),
532
+ ],
533
+ ignoreViolations: config.ignoreViolations,
534
+ resolveCommandText,
535
+ });
536
+ // Don't block initialization on listen() — wrap-time checks
537
+ // fs.existsSync(observeSocketPath) and degrades gracefully.
538
+ void linuxMonitor.ready;
539
+ logForDebugging('Started Linux seccomp violation monitor');
540
+ }
541
+ // Register cleanup handlers first time
542
+ registerCleanup();
543
+ // Windows: validate provisioning + filesystem config BEFORE any
544
+ // sandboxed child can be spawned. Doing this at initialize() (not
545
+ // wrap-time) means the host gets a single actionable error before
546
+ // any per-exec work happens, instead of exit-15 on every command.
547
+ if (getPlatform() === 'windows') {
548
+ // Resolve once (stats disk); captured module-level for wrap/reset.
549
+ srtWinSpawn = resolveSrtWin(runtimeConfig.windows?.srtWin);
550
+ const srtWin = srtWinSpawn;
551
+ const u = await getWindowsSandboxUserStatusAsync({ srtWin });
552
+ if (!u.provisioned || !u.credPresent) {
553
+ config = undefined;
554
+ throw new WindowsSandboxError('not_provisioned', `Windows sandbox user is not provisioned (user=` +
555
+ `${u.provisioned}, cred=${u.credPresent}). Run \`npx ` +
556
+ `sandbox-runtime windows-install\` (one UAC prompt) to ` +
557
+ `provision it.`);
558
+ }
559
+ // Behavioral proof the WFP egress fence is active for the
560
+ // sandbox user — BFE enumeration (`wfp status`) is admin-gated,
561
+ // so this is the non-elevated readiness check. Fails closed: a
562
+ // stale install (user provisioned but filters since removed)
563
+ // throws here instead of running every exec with full egress.
564
+ // After the user-status check so the not-provisioned message is
565
+ // the actionable one. Once per process — the fence is install-
566
+ // scoped, not session-scoped.
567
+ if (!windowsWfpVerified) {
568
+ try {
569
+ await verifyWindowsWfpEgress({
570
+ proxyPortRange: runtimeConfig.windows?.proxyPortRange,
571
+ srtWin,
572
+ });
573
+ }
574
+ catch (e) {
575
+ config = undefined;
576
+ throw e;
577
+ }
578
+ windowsWfpVerified = true;
579
+ }
580
+ // Persistent-CA branch (see the deferral comment above).
581
+ // `ensurePersistentWindowsCa` reconciles the registry thumb
582
+ // itself (so initialize() after uninstall→reinstall repairs
583
+ // trust) and may make `u.caCertThumb` stale — hence the
584
+ // explicit-path thumb check below skips this branch.
585
+ if (useWindowsPersistentCa && tlsTerminate) {
586
+ try {
587
+ const p = await ensurePersistentWindowsCa({ status: u, srtWin });
588
+ mitmCA = createMitmCA({
589
+ caCertPem: p.certPem,
590
+ caKeyPem: p.keyPem,
591
+ caCertPath: p.certPath,
592
+ caKeyPath: p.keyPath,
593
+ extraCaCertPaths: tlsTerminate.extraCaCertPaths,
594
+ });
595
+ }
596
+ catch (e) {
597
+ config = undefined;
598
+ throw e;
599
+ }
600
+ }
601
+ // Explicit-path branch: schannel clients (System32 curl, IWR,
602
+ // .NET, default-backend git) only trust what's in the sandbox
603
+ // user's `CurrentUser\Root` — which `srt-win exec` does not (and
604
+ // must not) write. Compare thumbprints so a stale install-time
605
+ // CA doesn't pass the gate while schannel rejects the session's
606
+ // proxy-minted leaves.
607
+ if (tlsTerminate && mitmCA && !useWindowsPersistentCa) {
608
+ const installed = getWindowsSandboxCaCert(u);
609
+ const sessionThumb = certThumbprint(mitmCA.certPem);
610
+ if (!installed) {
611
+ config = undefined;
612
+ throw new WindowsSandboxError('trust_ca_not_installed', `tlsTerminate on Windows requires the sandbox to be ` +
613
+ `installed with this CA (thumb=${sessionThumb}): run ` +
614
+ `\`srt-win user trust-ca ${mitmCA.certPath}\`. Per-exec ` +
615
+ `installs into the sandbox user's Root store are not ` +
616
+ `supported.`);
617
+ }
618
+ if (installed.thumb !== sessionThumb) {
619
+ config = undefined;
620
+ throw new WindowsSandboxError('trust_ca_thumbprint_mismatch', `tlsTerminate on Windows: the sandbox's installed CA ` +
621
+ `(thumb=${installed.thumb}) doesn't match this ` +
622
+ `session's CA (thumb=${sessionThumb}). Run \`srt-win ` +
623
+ `user trust-ca ${mitmCA.certPath}\` to update it.`);
624
+ }
625
+ }
626
+ // Filesystem grants/denies — additive sandbox-user ACEs.
627
+ try {
628
+ const acc = computeWindowsFsAccessSet(runtimeConfig);
629
+ // The trust bundle the CA-trust env vars point at
630
+ // (NODE_EXTRA_CA_CERTS etc.) must be readable by the
631
+ // srt-sandbox child. It's written into the broker's %TEMP%,
632
+ // which the sandbox user has no inherent rights on, so it
633
+ // rides the same session-level `acl grant` read-set as the
634
+ // working tree. Granted on the mkdtemp DIR (not the file)
635
+ // so the (OI)(CI) ACE covers both the file open AND the
636
+ // parent-directory list that cmd's `type`/`FindFirstFile`
637
+ // does before opening. Mirrors the mac/linux
638
+ // `expandedAllowRead` push in wrapWithSandbox.
639
+ if (mitmCA) {
640
+ acc.grantRead.push(dirname(mitmCA.trustBundlePath));
641
+ }
642
+ // `u` was fetched once above for the provisioning gate; the
643
+ // same status carries the SID — don't re-spawn `srt-win user
644
+ // status` here.
645
+ if (!u.sid) {
646
+ throw new Error('sandbox user SID missing from `srt-win user status` ' +
647
+ '(provisioned but in an inconsistent state)');
648
+ }
649
+ const sb = u.sid;
650
+ // Record module-level state BEFORE the first acl call so the
651
+ // catch's best-effort revoke/restore can address whatever
652
+ // partially landed.
653
+ windowsFsSbUserSid = sb;
654
+ // Grant FIRST so the sandbox user has working-tree access by
655
+ // the time the deny stamp runs. The two are independent
656
+ // refcounted state-DB sets keyed on the same holder PID.
657
+ if (acc.grantRead.length > 0 || acc.grantWrite.length > 0) {
658
+ grantWindowsAcl({
659
+ sandboxUserSid: sb,
660
+ read: acc.grantRead,
661
+ write: acc.grantWrite,
662
+ srtWin,
663
+ });
664
+ }
665
+ if (acc.denyRead.length > 0 || acc.denyWrite.length > 0) {
666
+ stampWindowsAcl({
667
+ sandboxUserSid: sb,
668
+ denyRead: acc.denyRead,
669
+ denyWrite: acc.denyWrite,
670
+ srtWin,
671
+ });
672
+ }
673
+ // Only record when something was actually applied — gates
674
+ // running revoke/restore at reset(). Recorded AFTER success —
675
+ // the catch below clears `config`, and a non-undefined
676
+ // stampedSet would leave reset()/updateConfig() seeing state
677
+ // that never landed.
678
+ const anyApplied = acc.grantRead.length > 0 ||
679
+ acc.grantWrite.length > 0 ||
680
+ acc.denyRead.length > 0 ||
681
+ acc.denyWrite.length > 0;
682
+ if (anyApplied) {
683
+ windowsFsStampedSet = acc;
684
+ logForDebugging(`[Sandbox Windows] fs applied: ` +
685
+ `${acc.grantWrite.length} grantWrite, ` +
686
+ `${acc.grantRead.length} grantRead, ` +
687
+ `${acc.denyRead.length} denyRead, ` +
688
+ `${acc.denyWrite.length} denyWrite`);
689
+ }
690
+ windowsFsRawInputs = rawWindowsFsInputs(runtimeConfig);
691
+ }
692
+ catch (e) {
693
+ // Best-effort release of whatever WAS applied before the
694
+ // failure (exit-2 partial stamps/grants the resolvable
695
+ // inputs; harmless if nothing was — no holds for this PID).
696
+ if (windowsFsSbUserSid) {
697
+ revokeWindowsAcl({ sandboxUserSid: windowsFsSbUserSid, srtWin });
698
+ restoreWindowsAcl({ sandboxUserSid: windowsFsSbUserSid, srtWin });
699
+ }
700
+ windowsFsSbUserSid = undefined;
701
+ config = undefined;
702
+ throw e;
703
+ }
704
+ }
705
+ // Initialize network infrastructure
706
+ initializationPromise = (async () => {
707
+ try {
708
+ // On Windows the WFP loopback permit covers a fixed port
709
+ // range, so the proxies must bind inside it. Other platforms
710
+ // bake the actual ephemeral port into the sandbox profile, so
711
+ // they keep using port 0.
712
+ const portRange = getPlatform() === 'windows'
713
+ ? (config.windows?.proxyPortRange ?? DEFAULT_WINDOWS_PROXY_PORT_RANGE)
714
+ : undefined;
715
+ // The auth token is only set when this process owns the proxy; an
716
+ // external proxy (config.network.httpProxyPort) handles its own auth,
717
+ // and embedding our token in its URL would be wrong.
718
+ proxyAuthToken =
719
+ config.network.httpProxyPort !== undefined
720
+ ? undefined
721
+ : randomBytes(16).toString('hex');
722
+ // The mux front-end serves both protocols on one port. Each side's
723
+ // reported port is the external override if configured, else the mux
724
+ // port — so the public config.network.{http,socks}ProxyPort contract
725
+ // is unchanged. The mux is skipped only when BOTH are external.
726
+ const needLocalProxy = config.network.httpProxyPort === undefined ||
727
+ config.network.socksProxyPort === undefined;
728
+ const muxPort = needLocalProxy
729
+ ? await startMuxProxyServer(sandboxAskCallback, portRange)
730
+ : undefined;
731
+ const httpProxyPort = config.network.httpProxyPort ?? muxPort;
732
+ const socksProxyPort = config.network.socksProxyPort ?? muxPort;
733
+ // JVMs read neither HTTPS_PROXY nor its credential; the agent bridges
734
+ // both. Resolved once here, advertised via JAVA_TOOL_OPTIONS per command.
735
+ // Async: the global-npm fallback spawns `npm root -g`.
736
+ javaAgentJarPath =
737
+ (await getJavaProxyAgentJarPathAsync(config.javaAgentJarPath)) ??
738
+ undefined;
739
+ // Leaves are minted lazily per-CONNECT (after this point), so setting
740
+ // the CDP URL now means every leaf carries it. See MitmCA.crlUrl.
741
+ // Windows-only: on Linux the child runs under bwrap --unshare-net and
742
+ // reaches the proxy via a socat bridge on a fixed netns port, so a
743
+ // host-namespace mux port would be unreachable — worse than no CDP,
744
+ // since a Schannel-analog client (Java, OpenSSL with CRL_CHECK) then
745
+ // hard-fails "CRL fetch error" instead of soft-passing "no CDP". macOS
746
+ // has no in-tree Schannel-analog client. Also gated on `muxPort`: an
747
+ // external `network.httpProxyPort` doesn't answer /srt.crl.
748
+ if (mitmCA && muxPort !== undefined && getPlatform() === 'windows') {
749
+ mitmCA.crlUrl = `http://127.0.0.1:${muxPort}${CRL_PATH}`;
750
+ }
751
+ if (config.network.httpProxyPort !== undefined) {
752
+ logForDebugging(`Using external HTTP proxy on port ${httpProxyPort}`);
753
+ }
754
+ if (config.network.socksProxyPort !== undefined) {
755
+ logForDebugging(`Using external SOCKS proxy on port ${socksProxyPort}`);
756
+ }
757
+ // Initialize platform-specific infrastructure
758
+ let linuxBridge;
759
+ if (getPlatform() === 'linux') {
760
+ linuxBridge = await initializeLinuxNetworkBridge(httpProxyPort, socksProxyPort, config.socatPath);
761
+ }
762
+ const context = {
763
+ httpProxyPort,
764
+ socksProxyPort,
765
+ linuxBridge,
766
+ };
767
+ managerContext = context;
768
+ logForDebugging('Network infrastructure initialized');
769
+ return context;
770
+ }
771
+ catch (error) {
772
+ // Clear state on error so initialization can be retried
773
+ initializationPromise = undefined;
774
+ managerContext = undefined;
775
+ reset().catch(e => {
776
+ logForDebugging(`Cleanup failed in initializationPromise ${e}`, {
777
+ level: 'error',
778
+ });
779
+ });
780
+ throw error;
781
+ }
782
+ })();
783
+ await initializationPromise;
784
+ }
785
+ function isSupportedPlatform() {
786
+ const platform = getPlatform();
787
+ if (platform === 'linux') {
788
+ // WSL1 doesn't support bubblewrap
789
+ return getWslVersion() !== '1';
790
+ }
791
+ return platform === 'macos' || platform === 'windows';
792
+ }
793
+ function isSandboxingEnabled() {
794
+ // Sandboxing is enabled if config has been set (via initialize())
795
+ return config !== undefined;
796
+ }
797
+ /**
798
+ * Platform-independent part of the dependency check. Returns either
799
+ * a finished result (POSIX, unsupported platform, or a Windows
800
+ * srt-win resolution failure) or the inputs for the Windows probe —
801
+ * the only platform where the sync and async variants differ.
802
+ */
803
+ function checkDependenciesCommon(ripgrepConfig) {
804
+ if (!isSupportedPlatform()) {
805
+ return { done: { errors: ['Unsupported platform'], warnings: [] } };
806
+ }
807
+ const errors = [];
808
+ const warnings = [];
809
+ const platform = getPlatform();
810
+ if (platform === 'linux') {
811
+ // ripgrep is Linux-only: it's used by linuxGetMandatoryDenyPaths() to
812
+ // expand glob deny-patterns to concrete paths for bwrap. macOS seatbelt
813
+ // profiles take regex patterns directly, so rg is never invoked there.
814
+ const rgToCheck = ripgrepConfig ?? config?.ripgrep ?? { command: 'rg' };
815
+ if (whichSync(rgToCheck.command) === null) {
816
+ errors.push(`ripgrep (${rgToCheck.command}) not found`);
817
+ }
818
+ const linuxDeps = checkLinuxDependencies({
819
+ seccompConfig: config?.seccomp,
820
+ bwrapPath: config?.bwrapPath,
821
+ socatPath: config?.socatPath,
822
+ });
823
+ errors.push(...linuxDeps.errors);
824
+ warnings.push(...linuxDeps.warnings);
825
+ }
826
+ else if (platform === 'windows') {
827
+ let srtWin;
828
+ try {
829
+ srtWin = resolveSrtWin(config?.windows?.srtWin);
830
+ }
831
+ catch (e) {
832
+ errors.push(e.message);
833
+ return { done: { errors, warnings } };
834
+ }
835
+ return {
836
+ windows: {
837
+ sublayerGuid: config?.windows?.sublayerGuid ?? config?.windows?.wfpSublayerGuid,
838
+ srtWin,
839
+ },
840
+ };
841
+ }
842
+ return { done: { errors, warnings } };
843
+ }
844
+ /**
845
+ * Check sandbox dependencies for the current platform
846
+ * @param ripgrepConfig - Ripgrep command to check. If not provided, uses config from initialization or defaults to 'rg'
847
+ * @returns { warnings, errors } - errors mean sandbox cannot run, warnings mean degraded functionality
848
+ */
849
+ function checkDependencies(ripgrepConfig) {
850
+ const common = checkDependenciesCommon(ripgrepConfig);
851
+ if ('done' in common)
852
+ return common.done;
853
+ return checkWindowsDependencies(common.windows);
854
+ }
855
+ /**
856
+ * Async variant of {@link checkDependencies} — same result for the
857
+ * same underlying state. On Windows the srt-win probes run via
858
+ * `spawn` (never blocking the event loop) and concurrently; on other
859
+ * platforms the checks are native and this simply wraps the sync
860
+ * result. Windows callers should prefer this variant.
861
+ */
862
+ async function checkDependenciesAsync(ripgrepConfig) {
863
+ // Linux: resolve apply-seccomp first so its global-npm fallback
864
+ // (`npm root -g`) runs off the event loop; the sync check below then
865
+ // hits the shared path cache.
866
+ if (getPlatform() === 'linux' && !config?.seccomp?.argv0) {
867
+ await getApplySeccompBinaryPathAsync(config?.seccomp?.applyPath);
868
+ }
869
+ const common = checkDependenciesCommon(ripgrepConfig);
870
+ if ('done' in common)
871
+ return common.done;
872
+ return checkWindowsDependenciesAsync(common.windows);
873
+ }
874
+ /**
875
+ * Build the read-deny / env-unset / env-set maps implied by the
876
+ * `credentials` config.
877
+ *
878
+ * Only explicitly declared sources are restricted: `mode: 'deny'` file
879
+ * entries join the read-deny set, `mode: 'deny'` env vars are unset, and
880
+ * `mode: 'mask'` env vars are set to a fake value (whole-value sentinel,
881
+ * the real value with extract-captured spans swapped for sentinels, or a
882
+ * JWT-shaped fake for `decode: 'jwt'` / `maskClaims` entries) registered
883
+ * in {@link sentinelRegistry} — see {@link buildMaskedEnvVars}.
884
+ */
885
+ function getCredentialRestrictions(credentials, allowedDomains) {
886
+ if (!credentials) {
887
+ return {
888
+ denyReadPaths: [],
889
+ unsetEnvVars: [],
890
+ setEnvVars: {},
891
+ maskedFileBinds: [],
892
+ maskedFileStoreDir: undefined,
893
+ degradeToDenyPaths: [],
894
+ };
895
+ }
896
+ const denyReadPaths = getCredentialDenyReadPaths(credentials);
897
+ // Default injectHosts (= allowedDomains) is host-scoped: drop any
898
+ // `:port` suffixes, otherwise the sentinel would carry an entry no bare
899
+ // destination host can ever match and the credential would never inject.
900
+ const defaultInjectHosts = [
901
+ ...new Set((allowedDomains ?? []).map(stripDomainPatternPort)),
902
+ ];
903
+ const unsetEnvVars = [];
904
+ for (const v of credentials.envVars ?? []) {
905
+ if (v.mode === 'deny')
906
+ unsetEnvVars.push(v.name);
907
+ }
908
+ // Masked env vars: read the real value from the host environment,
909
+ // register sentinel(s), and set the variable to the fake value inside
910
+ // the sandbox. degradeToUnsetNames carries variables whose extract
911
+ // pattern matched nothing with onExtractNoMatch: "deny" — merged into
912
+ // unsetEnvVars below so the value is withheld rather than exposed.
913
+ const { setEnvVars, degradeToUnsetNames } = buildMaskedEnvVars(credentials.envVars ?? [], defaultInjectHosts, sentinelRegistry);
914
+ unsetEnvVars.push(...degradeToUnsetNames);
915
+ // Link masked AWS credentials into pairs so the proxy can re-sign
916
+ // SigV4 requests (the signature is derived from the secret; header
917
+ // substitution alone cannot fix it).
918
+ registerAwsPairs(credentials.envVars ?? [], credentials.awsPairs, defaultInjectHosts, setEnvVars, awsPairRegistry);
919
+ // Masked files: read the real bytes on the host, register a sentinel,
920
+ // write it to a fake file in the manager-owned temp dir. Missing/unreadable
921
+ // entries are skipped (same posture as an unset masked env var).
922
+ // degradeToDenyPaths carries paths whose extract pattern matched
923
+ // nothing with onExtractNoMatch: "deny" — merged into denyReadPaths
924
+ // below so both the read-deny config and the platform builders see
925
+ // them, and carried separately so they stay literal on the way there.
926
+ const files = credentials.files ?? [];
927
+ const { binds: maskedFileBinds, degradeToDenyPaths } = buildMaskedFileBinds(files, defaultInjectHosts, sentinelRegistry, maskedFileStore);
928
+ return {
929
+ denyReadPaths: [...new Set([...denyReadPaths, ...degradeToDenyPaths])],
930
+ unsetEnvVars: [...new Set(unsetEnvVars)],
931
+ setEnvVars,
932
+ maskedFileBinds,
933
+ maskedFileStoreDir: maskedFileStore.dirPath,
934
+ degradeToDenyPaths,
935
+ };
936
+ }
937
+ /**
938
+ * Pure (side-effect-free) chokepoint for credential file-deny
939
+ * paths — `credentials.files` entries with `mode: 'deny'`. Any
940
+ * code that needs the credential→denyRead contribution routes
941
+ * through here so a comparison predicate can read it without
942
+ * touching {@link sentinelRegistry}.
943
+ */
944
+ function getCredentialDenyReadPaths(credentials) {
945
+ const files = credentials?.files ?? [];
946
+ return [...new Set(files.filter(f => f.mode === 'deny').map(f => f.path))];
947
+ }
948
+ /**
949
+ * The default write paths under a filesystem policy's read rules, for
950
+ * getFsWriteConfig() and wrapWithSandbox() alike. Fed the entries as
951
+ * configured, through the pure {@link getCredentialDenyReadPaths}: no glob
952
+ * expansion and no credential masking, because getFsWriteConfig() is a
953
+ * getter callers reach from permission checks and render paths. A mask entry
954
+ * that degrades to a deny is a file and cannot cover a directory, so
955
+ * leaving those out changes nothing. An entry with glob characters that is
956
+ * also the name of a path counts as that name too.
957
+ */
958
+ function defaultWritePathsUnder({ denyRead, allowRead, credentials, }) {
959
+ return getDefaultWritePaths(readRulesOf(denyRead, allowRead, getCredentialDenyReadPaths(credentials)));
960
+ }
961
+ /**
962
+ * Union the explicit `filesystem.denyRead` with credential-derived
963
+ * deny paths. The single source of "what files does this config
964
+ * want read-denied" — all platforms route through here so a new
965
+ * credential kind that contributes deny paths reaches every
966
+ * backend.
967
+ */
968
+ function unionDenyReadPaths(denyRead, credentialRestrictions) {
969
+ return [...new Set([...denyRead, ...credentialRestrictions.denyReadPaths])];
970
+ }
971
+ /**
972
+ * Strip a trailing `/**` from each read-path entry and, on Linux, replace
973
+ * any remaining glob with what `expandGlob` returns for it (bubblewrap takes
974
+ * concrete paths only). Other platforms match globs natively.
975
+ * On Linux the entry's other readings are added (see `withOtherReadings`);
976
+ * elsewhere the backend decides them. Entries the caller marked literal are
977
+ * not in the result: they travel in the `literal…` lists.
978
+ *
979
+ * `literalPaths` are the ones the library resolved itself (a masked
980
+ * credential file that degraded to deny) — each names one file on disk, so
981
+ * it is passed through whatever characters it contains. Expanded as a
982
+ * pattern, a name holding `[` matches nothing and the deny is lost.
983
+ *
984
+ * Each path once, where it first came up: every `**` pattern over one base
985
+ * returns the directories it could not list, and the Linux wrapper looks at
986
+ * every entry it is given.
987
+ */
988
+ function* resolveReadPathEntries(kind, paths, expandGlob, literalPaths = []) {
989
+ const literal = new Set(literalPaths);
990
+ const resolved = new Set();
991
+ for (const p of spelledOf(paths)) {
992
+ const stripped = removeTrailingGlobSuffix(p);
993
+ if (getPlatform() === 'linux' &&
994
+ !literal.has(p) &&
995
+ containsGlobChars(stripped)) {
996
+ for (const found of yield* withOtherReadings(p, stripped, kind, expandGlob)) {
997
+ resolved.add(found);
998
+ }
999
+ }
1000
+ else {
1001
+ resolved.add(stripped);
1002
+ }
1003
+ }
1004
+ return [...resolved];
1005
+ }
1006
+ /**
1007
+ * Strip a trailing `/**` and drop what is still a glob on Linux: bwrap needs
1008
+ * real paths. macOS subpath matching is recursive, so the strip is harmless
1009
+ * there and the filter never fires.
1010
+ * A glob that is also the name of a path that exists is kept, as that name.
1011
+ * Marked entries are not in the result, as in {@link resolveReadPathEntries}.
1012
+ */
1013
+ function stripWriteGlobs(kind, paths) {
1014
+ return spelledOf(paths)
1015
+ .map(p => removeTrailingGlobSuffix(p))
1016
+ .filter(p => {
1017
+ if (getPlatform() === 'linux' &&
1018
+ containsGlobChars(p) &&
1019
+ !hasNameReading(p, kind)) {
1020
+ logForDebugging(`[Sandbox] Skipping glob write pattern on Linux: ${p}`);
1021
+ return false;
1022
+ }
1023
+ return true;
1024
+ });
1025
+ }
1026
+ function* expandAllowReadGlob(pattern, anchor) {
1027
+ const expanded = (yield* walkGlobPatternSteps(pattern, { anchor })).matches;
1028
+ logForDebugging(`[Sandbox] Expanded allowRead glob pattern "${pattern}" to ${expanded.length} paths on Linux`);
1029
+ return expanded;
1030
+ }
1031
+ /**
1032
+ * The read policy of the initialized config, for inspection and display.
1033
+ * On Linux, denyRead globs are collapsed to covering directory mounts against
1034
+ * this config's allowRead and {@link getFsWriteConfig}'s write roots, so
1035
+ * `denyOnly` is only sound alongside that write config and must not be handed
1036
+ * to wrapCommandWithSandboxLinux with a different one. Marked entries are
1037
+ * in the `literal…` lists, as spelled: pass the object on whole.
1038
+ */
1039
+ function getFsReadConfig() {
1040
+ if (!config || config.filesystem.disabled) {
1041
+ return { denyOnly: [], allowWithinDeny: [] };
1042
+ }
1043
+ // Credential deny paths are unioned with the caller's denyRead — never
1044
+ // replacing it — so explicit filesystem restrictions always survive.
1045
+ const credentialRestrictions = getCredentialRestrictions(config.credentials, config.network.allowedDomains);
1046
+ // allowRead (re-allow within denied regions) is resolved first: the
1047
+ // denyRead glob expansion collapses against it.
1048
+ const allowPaths = finish(resolveReadPathEntries('allow', config.filesystem.allowRead ?? [], expandAllowReadGlob));
1049
+ const reExposedPaths = reExposedBy(allowPaths, config.filesystem.allowRead, getFsWriteConfig());
1050
+ const unlistableDenyDirs = new Set();
1051
+ const listings = new Map();
1052
+ const denyPaths = finish(resolveReadPathEntries('deny', unionDenyReadPaths(spelledOf(config.filesystem.denyRead), credentialRestrictions), (pattern, anchor) => expandReadDenyGlobLinuxSteps(pattern, reExposedPaths, unlistableDenyDirs, { anchor, listings }), credentialRestrictions.degradeToDenyPaths));
1053
+ return {
1054
+ denyOnly: denyPaths,
1055
+ allowWithinDeny: allowPaths,
1056
+ unlistableDenyDirs: [...unlistableDenyDirs],
1057
+ ...literalReadLists(config.filesystem.denyRead, config.filesystem.allowRead),
1058
+ };
1059
+ }
1060
+ function getFsWriteConfig() {
1061
+ if (!config) {
1062
+ return { allowOnly: getDefaultWritePaths(), denyWithinAllow: [] };
1063
+ }
1064
+ if (config.filesystem.disabled) {
1065
+ return { allowOnly: ['/'], denyWithinAllow: [] };
1066
+ }
1067
+ const allowPaths = stripWriteGlobs('allow', config.filesystem.allowWrite);
1068
+ const denyPaths = stripWriteGlobs('deny', config.filesystem.denyWrite);
1069
+ const allowOnly = [
1070
+ ...defaultWritePathsUnder({
1071
+ denyRead: config.filesystem.denyRead,
1072
+ allowRead: config.filesystem.allowRead,
1073
+ credentials: config.credentials,
1074
+ }),
1075
+ ...allowPaths,
1076
+ ];
1077
+ return {
1078
+ allowOnly,
1079
+ denyWithinAllow: denyPaths,
1080
+ ...literalWriteLists(config.filesystem.allowWrite, config.filesystem.denyWrite),
1081
+ };
1082
+ }
1083
+ /**
1084
+ * Build the Windows file-access set (deny stamps + sandbox-user
1085
+ * grants) from `runtimeConfig`. Globs are expanded to concrete
1086
+ * paths (point-in-time — a path appearing after this returns is NOT
1087
+ * covered). Directory targets are accepted (the `(OI)(CI)` ACEs
1088
+ * cover the subtree).
1089
+ *
1090
+ * The sandbox user has no inherent rights on real-user-owned files,
1091
+ * so `allowWrite` (the working-tree roots) becomes a per-session
1092
+ * `MODIFY_NO_FDC` ALLOW ACE for `<sb-SID>`, `allowRead` a
1093
+ * `READ|EXECUTE` ALLOW ACE, and `denyRead`/`denyWrite` become an
1094
+ * explicit DENY ACE for `<sb-SID>` on the target plus a
1095
+ * `(OI)(CI) FILE_DELETE_CHILD` DENY on its parent.
1096
+ */
1097
+ function computeWindowsFsAccessSet(c) {
1098
+ const fs = c.filesystem;
1099
+ // filesystem.disabled bypasses ALL filesystem rule generation —
1100
+ // same as the macOS/Linux wrapWithSandbox path (readConfig /
1101
+ // writeConfig left undefined). On Windows this means no ACL
1102
+ // stamp/grant; credential FILE denies are dropped along with the
1103
+ // rest (credential ENV: mode:'deny' is structural under the
1104
+ // fresh srt-sandbox env; mode:'mask' sentinels are passed via
1105
+ // the --env overlay).
1106
+ if (fs?.disabled) {
1107
+ return { grantRead: [], grantWrite: [], denyRead: [], denyWrite: [] };
1108
+ }
1109
+ const expand = expandWindowsFsPaths;
1110
+ // `mode: 'deny'` — non-existent literals reach srt-win, which
1111
+ // creates a placeholder chain and stamps it (deny lands on the
1112
+ // exact target path). `mode: 'grant'` drops them (a grant on
1113
+ // nothing is meaningless).
1114
+ const denyRead = expand([
1115
+ ...new Set([
1116
+ ...(fs?.denyRead ?? []),
1117
+ ...getCredentialDenyReadPaths(c.credentials),
1118
+ ]),
1119
+ ], { mode: 'deny' });
1120
+ const denyWrite = expand(fs?.denyWrite ?? [], { mode: 'deny' });
1121
+ return {
1122
+ // `allowRead` also serves as `allowWithinDeny`: a file under a
1123
+ // denied dir gets an explicit ALLOW ACE for the sandbox user,
1124
+ // and explicit DENY on the parent doesn't override it because
1125
+ // the recompose chokepoint orders deny-before-allow per-path.
1126
+ grantRead: expand(fs?.allowRead ?? [], { mode: 'grant' }),
1127
+ grantWrite: expand(fs?.allowWrite ?? [], { mode: 'grant' }),
1128
+ denyRead,
1129
+ denyWrite,
1130
+ };
1131
+ }
1132
+ /**
1133
+ * Snapshot the raw config fields that feed
1134
+ * {@link computeWindowsFsAccessSet}. Used by updateConfig() to
1135
+ * short-circuit the resolved-set diff (which re-runs glob
1136
+ * expansion) when nothing relevant changed.
1137
+ */
1138
+ function rawWindowsFsInputs(c) {
1139
+ // Keyed exactly on what {@link computeWindowsFsAccessSet} reads.
1140
+ // `network.allowedDomains` does NOT feed file-deny (only mask
1141
+ // injectHosts), so a network-only updateConfig hits the cache.
1142
+ return {
1143
+ disabled: c.filesystem.disabled ?? false,
1144
+ denyRead: [...c.filesystem.denyRead],
1145
+ denyWrite: [...c.filesystem.denyWrite],
1146
+ allowRead: [...(c.filesystem.allowRead ?? [])],
1147
+ allowWrite: [...c.filesystem.allowWrite],
1148
+ credFiles: getCredentialDenyReadPaths(c.credentials),
1149
+ };
1150
+ }
1151
+ function sameRawWindowsFsInputs(a, b) {
1152
+ return (a.disabled === b.disabled &&
1153
+ samePathEntries(a.denyRead, b.denyRead) &&
1154
+ samePathEntries(a.denyWrite, b.denyWrite) &&
1155
+ samePathEntries(a.allowRead, b.allowRead) &&
1156
+ samePathEntries(a.allowWrite, b.allowWrite) &&
1157
+ samePathEntries(a.credFiles, b.credFiles));
1158
+ }
1159
+ /**
1160
+ * True when `newConfig`'s file-deny inputs match what was
1161
+ * stamped at initialize(). Compares raw inputs only (cheap,
1162
+ * order-insensitive); never re-expands globs — updateConfig is
1163
+ * warn-only on Windows and the resolved set wouldn't be used.
1164
+ */
1165
+ function sameWindowsStampSet(newConfig) {
1166
+ return (windowsFsRawInputs !== undefined &&
1167
+ sameRawWindowsFsInputs(windowsFsRawInputs, rawWindowsFsInputs(newConfig)));
1168
+ }
1169
+ function getNetworkRestrictionConfig() {
1170
+ if (!config) {
1171
+ return {};
1172
+ }
1173
+ // Preserve an explicitly-empty allowlist: consumers need to distinguish
1174
+ // "no network restriction configured" (absent) from "allowlist configured
1175
+ // with zero entries" (block-all / ask-only). Stripping the empty array
1176
+ // made a host app's restriction-status UI report an airgapped config as
1177
+ // unrestricted. deniedHosts keeps the strip — an empty denylist and an
1178
+ // absent one are semantically identical.
1179
+ const allowedHosts = config.network.allowedDomains;
1180
+ const deniedHosts = config.network.deniedDomains;
1181
+ return {
1182
+ allowedHosts,
1183
+ ...(deniedHosts.length > 0 && { deniedHosts }),
1184
+ };
1185
+ }
1186
+ function getAllowUnixSockets() {
1187
+ return config?.network?.allowUnixSockets;
1188
+ }
1189
+ function getAllowAllUnixSockets() {
1190
+ return config?.network?.allowAllUnixSockets;
1191
+ }
1192
+ function getAllowLocalBinding() {
1193
+ return config?.network?.allowLocalBinding;
1194
+ }
1195
+ function getAllowMachLookup() {
1196
+ return config?.network?.allowMachLookup;
1197
+ }
1198
+ function getIgnoreViolations() {
1199
+ return config?.ignoreViolations;
1200
+ }
1201
+ function getEnableWeakerNestedSandbox() {
1202
+ return config?.enableWeakerNestedSandbox;
1203
+ }
1204
+ function getEnableWeakerNetworkIsolation() {
1205
+ return config?.enableWeakerNetworkIsolation;
1206
+ }
1207
+ function getAllowAppleEvents() {
1208
+ return config?.allowAppleEvents;
1209
+ }
1210
+ function getRipgrepConfig() {
1211
+ return config?.ripgrep ?? { command: 'rg' };
1212
+ }
1213
+ function getMandatoryDenySearchDepth() {
1214
+ return config?.mandatoryDenySearchDepth ?? 3;
1215
+ }
1216
+ function getAllowGitConfig() {
1217
+ return config?.filesystem?.allowGitConfig ?? false;
1218
+ }
1219
+ /**
1220
+ * Union of session-level and per-call `git.safeDirectories`. Marks
1221
+ * paths as `safe.directory` (dubious-ownership bypass) WITHOUT
1222
+ * touching the write grant — the repo top-level for a subdirectory
1223
+ * launch must NOT go in `filesystem.allowWrite`.
1224
+ */
1225
+ function getGitSafeDirectories(customConfig) {
1226
+ return [
1227
+ ...(config?.git?.safeDirectories ?? []),
1228
+ ...(customConfig?.git?.safeDirectories ?? []),
1229
+ ];
1230
+ }
1231
+ function getSeccompConfig() {
1232
+ return config?.seccomp;
1233
+ }
1234
+ function getProxyAuthToken() {
1235
+ return proxyAuthToken;
1236
+ }
1237
+ function getProxyPort() {
1238
+ return managerContext?.httpProxyPort;
1239
+ }
1240
+ function getSocksProxyPort() {
1241
+ return managerContext?.socksProxyPort;
1242
+ }
1243
+ function getLinuxHttpSocketPath() {
1244
+ return managerContext?.linuxBridge?.httpSocketPath;
1245
+ }
1246
+ function getLinuxSocksSocketPath() {
1247
+ return managerContext?.linuxBridge?.socksSocketPath;
1248
+ }
1249
+ /**
1250
+ * Wait for network initialization to complete if already in progress
1251
+ * Returns true if initialized successfully, false otherwise
1252
+ */
1253
+ async function waitForNetworkInitialization() {
1254
+ if (!config) {
1255
+ return false;
1256
+ }
1257
+ if (initializationPromise) {
1258
+ try {
1259
+ await initializationPromise;
1260
+ return true;
1261
+ }
1262
+ catch {
1263
+ return false;
1264
+ }
1265
+ }
1266
+ return managerContext !== undefined;
1267
+ }
1268
+ /** A wrap that has started over this many times walks without giving the
1269
+ * thread back. */
1270
+ const RESTARTS_IN_TURNS = 2;
1271
+ /** In place of what a walk finds: the configuration was replaced under it. */
1272
+ const REPLACED = Symbol('replaced');
1273
+ async function wrapWithSandbox(command, binShell, customConfig, abortSignal, options) {
1274
+ return wrapWithSandboxAgain(0, command, binShell, customConfig, abortSignal, options);
1275
+ }
1276
+ /** {@link wrapWithSandbox}, having started over `restarts` times. */
1277
+ async function wrapWithSandboxAgain(restarts, command, binShell, customConfig, abortSignal, options) {
1278
+ const platform = getPlatform();
1279
+ const commandId = options?.commandId;
1280
+ registerCommandText(command, options);
1281
+ const startedWith = config;
1282
+ const startedAt = configInstalls;
1283
+ const startedIn = workingDirectory();
1284
+ const movedOn = () => config !== startedWith ||
1285
+ configInstalls !== startedAt ||
1286
+ workingDirectory() !== startedIn;
1287
+ const startOver = () => wrapWithSandboxAgain(restarts + 1, command, binShell, customConfig, abortSignal, options);
1288
+ /** `steps`, left as soon as the host is seen to have moved on: what they
1289
+ * would go on to find is for a wrap that starts over anyway. */
1290
+ function* whileCurrent(steps) {
1291
+ for (;;) {
1292
+ if (movedOn())
1293
+ return REPLACED;
1294
+ const step = steps.next();
1295
+ if (step.done)
1296
+ return step.value;
1297
+ yield;
1298
+ }
1299
+ }
1300
+ const walked = (steps) => {
1301
+ if (restarts < RESTARTS_IN_TURNS) {
1302
+ return finishInTurns(whileCurrent(steps), abortSignal);
1303
+ }
1304
+ abortSignal?.throwIfAborted();
1305
+ return finish(steps);
1306
+ };
1307
+ // filesystem.disabled bypasses ALL filesystem rule generation. Both
1308
+ // platform wrappers treat readConfig/writeConfig === undefined as "no
1309
+ // filesystem restrictions" (seatbelt emits `(allow file-write*)`; bwrap
1310
+ // skips the `--ro-bind / /` root and all path binds).
1311
+ //
1312
+ // Precedence: when a caller passes a per-call filesystem override at all,
1313
+ // its `disabled` (defaulting to false) wins outright. A global
1314
+ // disabled=true must not silently discard a per-call tightening that
1315
+ // omits the new key.
1316
+ const fsDisabled = customConfig?.filesystem !== undefined
1317
+ ? (customConfig.filesystem.disabled ?? false)
1318
+ : (config?.filesystem.disabled ?? false);
1319
+ // Credential env handling is independent of filesystem policy: unsetEnvVars /
1320
+ // setEnvVars must be applied even when fsDisabled (the credential file
1321
+ // deny-reads are dropped, but env scrubbing still happens).
1322
+ const credentialRestrictions = getCredentialRestrictions(customConfig?.credentials ?? config?.credentials, customConfig?.network?.allowedDomains ?? config?.network?.allowedDomains);
1323
+ // Get configs - use custom if provided, otherwise fall back to main config
1324
+ // If neither exists, defaults to empty arrays (most restrictive)
1325
+ // Always include default system write paths (like /dev/null, /tmp/claude)
1326
+ let writeConfig;
1327
+ let readConfig;
1328
+ if (!fsDisabled) {
1329
+ const userAllowWrite = stripWriteGlobs('allow', customConfig?.filesystem?.allowWrite ??
1330
+ config?.filesystem.allowWrite ??
1331
+ []);
1332
+ writeConfig = {
1333
+ allowOnly: [
1334
+ ...defaultWritePathsUnder({
1335
+ denyRead: customConfig?.filesystem?.denyRead ??
1336
+ config?.filesystem.denyRead ??
1337
+ [],
1338
+ allowRead: customConfig?.filesystem?.allowRead ?? config?.filesystem.allowRead,
1339
+ credentials: customConfig?.credentials ?? config?.credentials,
1340
+ }),
1341
+ ...userAllowWrite,
1342
+ ],
1343
+ denyWithinAllow: stripWriteGlobs('deny', customConfig?.filesystem?.denyWrite ??
1344
+ config?.filesystem.denyWrite ??
1345
+ []),
1346
+ ...literalWriteLists(customConfig?.filesystem?.allowWrite ?? config?.filesystem.allowWrite, customConfig?.filesystem?.denyWrite ?? config?.filesystem.denyWrite),
1347
+ };
1348
+ // Credential deny paths are unioned with the caller's denyRead — never
1349
+ // replacing it — so explicit filesystem restrictions always survive.
1350
+ // allowRead is resolved first: on Linux a denyRead glob's expansion is
1351
+ // collapsed against the paths that re-expose contents under a denied
1352
+ // directory (allowRead + allowWrite), so both must be final here.
1353
+ const expandedAllowRead = await walked(resolveReadPathEntries('allow', customConfig?.filesystem?.allowRead ??
1354
+ config?.filesystem.allowRead ??
1355
+ [], expandAllowReadGlob));
1356
+ if (expandedAllowRead === REPLACED)
1357
+ return startOver();
1358
+ // The TLS-termination CA cert and the trust bundle the env vars point at
1359
+ // (NODE_EXTRA_CA_CERTS etc.) must be readable by the child, even if their
1360
+ // paths fall under a user-configured denyRead.
1361
+ if (mitmCA) {
1362
+ expandedAllowRead.push(mitmCA.certPath, mitmCA.trustBundlePath);
1363
+ }
1364
+ // Likewise the JVM proxy agent jar JAVA_TOOL_OPTIONS points at.
1365
+ if (javaAgentJarPath) {
1366
+ expandedAllowRead.push(javaAgentJarPath);
1367
+ }
1368
+ const reExposedPaths = reExposedBy(expandedAllowRead, customConfig?.filesystem?.allowRead ?? config?.filesystem.allowRead, writeConfig);
1369
+ const unlistableDenyDirs = new Set();
1370
+ const listings = new Map();
1371
+ const expandedDenyRead = await walked(resolveReadPathEntries('deny', unionDenyReadPaths(spelledOf(customConfig?.filesystem?.denyRead ?? config?.filesystem.denyRead), credentialRestrictions), (pattern, anchor) => expandReadDenyGlobLinuxSteps(pattern, reExposedPaths, unlistableDenyDirs, { anchor, listings }), credentialRestrictions.degradeToDenyPaths));
1372
+ if (expandedDenyRead === REPLACED)
1373
+ return startOver();
1374
+ readConfig = {
1375
+ denyOnly: expandedDenyRead,
1376
+ allowWithinDeny: expandedAllowRead,
1377
+ unlistableDenyDirs: [...unlistableDenyDirs],
1378
+ ...literalReadLists(customConfig?.filesystem?.denyRead ?? config?.filesystem.denyRead, customConfig?.filesystem?.allowRead ?? config?.filesystem.allowRead),
1379
+ };
1380
+ }
1381
+ // Check if network config is specified - this determines if we need network restrictions
1382
+ // Network restriction is needed when:
1383
+ // 1. customConfig has network.allowedDomains defined (even if empty array)
1384
+ // 2. OR config has network.allowedDomains defined (even if empty array)
1385
+ // An empty allowedDomains array still requests network restrictions.
1386
+ // Custom lists do not replace the live proxy's session allow/deny lists.
1387
+ // A custom empty list does not revoke session allowances.
1388
+ const hasNetworkConfig = customConfig?.network?.allowedDomains !== undefined ||
1389
+ config?.network?.allowedDomains !== undefined;
1390
+ // Network RESTRICTION is needed whenever network config is specified
1391
+ // This includes empty allowedDomains arrays.
1392
+ const needsNetworkRestriction = hasNetworkConfig;
1393
+ // Network PROXY is needed whenever network config is specified
1394
+ // Even with empty allowedDomains, we route through proxy so that:
1395
+ // 1. updateConfig() can enable network access for already-running processes
1396
+ // 2. The proxy enforces session policy and can ask for approval.
1397
+ const needsNetworkProxy = hasNetworkConfig;
1398
+ // Wait for network initialization only if proxy is actually needed
1399
+ if (needsNetworkProxy) {
1400
+ await waitForNetworkInitialization();
1401
+ }
1402
+ // INVARIANT: one wrap, one configuration. updateConfig() can run in any of
1403
+ // the turns above, and what was read before it must not be put together
1404
+ // with what is read after it: the write list of one configuration with the
1405
+ // allowGitConfig of another is a policy nobody chose. So the wrap starts
1406
+ // over. Nothing from here to the platform's wrapper awaits.
1407
+ //
1408
+ // And one working directory, which a relative entry is resolved against
1409
+ // wherever it is read: a `.` bound back from where the host has gone to,
1410
+ // over denies walked from where it was, uncovers what they matched.
1411
+ //
1412
+ // INVARIANT: what a wrap hands out was read from the disk after its
1413
+ // configuration was installed. A host that writes a file and then installs
1414
+ // a rule that denies it finds it denied by every wrap that goes by that
1415
+ // rule. So a wrap that starts over keeps nothing of what it has listed or
1416
+ // walked, the same rules included. A configuration installed after this
1417
+ // check is the next wrap's.
1418
+ //
1419
+ // An embedder can replace the configuration many times during one walk.
1420
+ // After RESTARTS_IN_TURNS the wrap walks without a turn of the event loop,
1421
+ // so no timer or I/O callback replaces it meanwhile. That holds the thread
1422
+ // for one walk, as every wrap did before the walk took turns. It is not a
1423
+ // proof that the wrap ends: a promise continuation, or anything at all
1424
+ // while the network is still being initialized, can replace it between the
1425
+ // walk and this check, and the wrap then starts over once more.
1426
+ if (movedOn())
1427
+ return startOver();
1428
+ // Check custom config to allow pseudo-terminal (can be applied dynamically)
1429
+ const allowPty = customConfig?.allowPty ?? config?.allowPty;
1430
+ const allowUnixSockets = customConfig?.network?.allowUnixSockets ?? getAllowUnixSockets();
1431
+ const allowAllUnixSockets = customConfig?.network?.allowAllUnixSockets ?? getAllowAllUnixSockets();
1432
+ const allowLocalBinding = customConfig?.network?.allowLocalBinding ?? getAllowLocalBinding();
1433
+ const allowMachLookup = customConfig?.network?.allowMachLookup ?? getAllowMachLookup();
1434
+ const allowGitConfig = customConfig?.filesystem?.allowGitConfig ?? getAllowGitConfig();
1435
+ const enableWeakerNestedSandbox = customConfig?.enableWeakerNestedSandbox ?? getEnableWeakerNestedSandbox();
1436
+ const enableWeakerNetworkIsolation = customConfig?.enableWeakerNetworkIsolation ?? getEnableWeakerNetworkIsolation();
1437
+ const allowAppleEvents = customConfig?.allowAppleEvents ?? getAllowAppleEvents();
1438
+ const mandatoryDenySearchDepth = customConfig?.mandatoryDenySearchDepth ?? getMandatoryDenySearchDepth();
1439
+ const gitSafeDirectories = getGitSafeDirectories(customConfig);
1440
+ switch (platform) {
1441
+ case 'macos':
1442
+ // macOS sandbox profile supports glob patterns directly, no ripgrep needed
1443
+ return wrapCommandWithSandboxMacOS({
1444
+ command,
1445
+ commandId,
1446
+ needsNetworkRestriction,
1447
+ // Only pass proxy ports if proxy is running (when there are domains to filter)
1448
+ httpProxyPort: needsNetworkProxy ? getProxyPort() : undefined,
1449
+ socksProxyPort: needsNetworkProxy ? getSocksProxyPort() : undefined,
1450
+ proxyAuthToken: needsNetworkProxy ? proxyAuthToken : undefined,
1451
+ caCertPath: mitmCA?.trustBundlePath,
1452
+ javaAgentJarPath: needsNetworkProxy ? javaAgentJarPath : undefined,
1453
+ readConfig,
1454
+ writeConfig,
1455
+ unsetEnvVars: credentialRestrictions.unsetEnvVars,
1456
+ setEnvVars: credentialRestrictions.setEnvVars,
1457
+ maskedFileBinds: credentialRestrictions.maskedFileBinds,
1458
+ degradeToDenyPaths: credentialRestrictions.degradeToDenyPaths,
1459
+ allowUnixSockets,
1460
+ allowAllUnixSockets,
1461
+ allowLocalBinding,
1462
+ allowMachLookup,
1463
+ ignoreViolations: getIgnoreViolations(),
1464
+ allowPty,
1465
+ allowGitConfig,
1466
+ gitSafeDirectories,
1467
+ enableWeakerNetworkIsolation,
1468
+ allowAppleEvents,
1469
+ binShell,
1470
+ });
1471
+ case 'linux':
1472
+ return wrapCommandWithSandboxLinux({
1473
+ command,
1474
+ commandId,
1475
+ needsNetworkRestriction,
1476
+ // Only pass socket paths if proxy is running (when there are domains to filter)
1477
+ httpSocketPath: needsNetworkProxy
1478
+ ? getLinuxHttpSocketPath()
1479
+ : undefined,
1480
+ socksSocketPath: needsNetworkProxy
1481
+ ? getLinuxSocksSocketPath()
1482
+ : undefined,
1483
+ httpProxyPort: needsNetworkProxy
1484
+ ? managerContext?.httpProxyPort
1485
+ : undefined,
1486
+ socksProxyPort: needsNetworkProxy
1487
+ ? managerContext?.socksProxyPort
1488
+ : undefined,
1489
+ proxyAuthToken: needsNetworkProxy ? proxyAuthToken : undefined,
1490
+ caCertPath: mitmCA?.trustBundlePath,
1491
+ javaAgentJarPath: needsNetworkProxy ? javaAgentJarPath : undefined,
1492
+ readConfig,
1493
+ writeConfig,
1494
+ unsetEnvVars: credentialRestrictions.unsetEnvVars,
1495
+ setEnvVars: credentialRestrictions.setEnvVars,
1496
+ maskedFileBinds: credentialRestrictions.maskedFileBinds,
1497
+ maskedFileStoreDir: credentialRestrictions.maskedFileStoreDir,
1498
+ enableWeakerNestedSandbox,
1499
+ allowAllUnixSockets,
1500
+ binShell,
1501
+ ripgrepConfig: getRipgrepConfig(),
1502
+ mandatoryDenySearchDepth,
1503
+ allowGitConfig,
1504
+ gitSafeDirectories,
1505
+ seccompConfig: getSeccompConfig(),
1506
+ bwrapPath: config?.bwrapPath,
1507
+ socatPath: config?.socatPath,
1508
+ observeSocketPath: linuxMonitor?.observeSocketPath,
1509
+ abortSignal,
1510
+ }).catch((err) => {
1511
+ // It awaits once more, for its scan: see the invariant above.
1512
+ if (err instanceof WorkingDirectoryChanged)
1513
+ return startOver();
1514
+ throw err;
1515
+ });
1516
+ case 'windows':
1517
+ // Windows wraps to an argv array, not a shell string. Forcing
1518
+ // callers through wrapWithSandboxArgv() means they spawn with
1519
+ // {shell:false}, which is the security boundary that keeps the
1520
+ // user's command bytes off the HOST shell.
1521
+ throw new Error('wrapWithSandbox() returns a shell string and is not supported ' +
1522
+ 'on Windows. Use SandboxManager.wrapWithSandboxArgv() and ' +
1523
+ 'spawn the result with {shell: false}.');
1524
+ default:
1525
+ // Unsupported platform - this should not happen since isSandboxingEnabled() checks platform support
1526
+ throw new Error(`Sandbox configuration is not supported on platform: ${platform}`);
1527
+ }
1528
+ }
1529
+ /**
1530
+ * Wrap `command` for the sandbox and return a spawn descriptor:
1531
+ * `{ argv, env }`, suitable for
1532
+ * `spawn(argv[0], argv.slice(1), {shell: false, env})`.
1533
+ *
1534
+ * On Windows this is the ONLY supported wrap method (see
1535
+ * {@link wrapWithSandbox}); `env` is the broker process's spawn env
1536
+ * — the sandboxed child gets a fresh `srt-sandbox` profile env with
1537
+ * only the `--env` overlay baked into `argv` (see
1538
+ * {@link wrapCommandWithSandboxWindows}). On
1539
+ * macOS/Linux `argv` is `[binShell, '-c', <wrapWithSandbox result>]`
1540
+ * (proxy env is baked into that command) and `env` is the unchanged
1541
+ * `process.env`, so callers can spawn uniformly across platforms.
1542
+ *
1543
+ * @param cwd the working directory the caller will spawn the result
1544
+ * with. On Windows the child's cwd is whatever the caller passes
1545
+ * as the spawn `{cwd:}` option (there is no `--cwd` flag), and
1546
+ * the `safe.directory` git-config injection derives from this — so
1547
+ * pass the same value here as to `spawn({cwd})`. Defaults to
1548
+ * `process.cwd()`. Currently unused on macOS/Linux.
1549
+ */
1550
+ async function wrapWithSandboxArgv(command, binShell, customConfig, abortSignal, cwd, options) {
1551
+ const platform = getPlatform();
1552
+ if (platform === 'windows') {
1553
+ const hasNetworkConfig = customConfig?.network?.allowedDomains !== undefined ||
1554
+ config?.network?.allowedDomains !== undefined;
1555
+ if (hasNetworkConfig) {
1556
+ await waitForNetworkInitialization();
1557
+ }
1558
+ const credentialRestrictions = getCredentialRestrictions(customConfig?.credentials ?? config?.credentials, customConfig?.network?.allowedDomains ?? config?.network?.allowedDomains);
1559
+ // Per-exec FILE denies (customConfig only — the session-level
1560
+ // config's denies were already stamped at initialize()).
1561
+ // Paths go through `expandWindowsFsPaths` — the SAME
1562
+ // chokepoint the session-level set uses (point-in-time glob
1563
+ // expand, normalize, missing→drop) — so a per-exec entry
1564
+ // resolves identically to its session-level equivalent.
1565
+ // macOS/Linux per-exec already reuses session-level expansion;
1566
+ // Windows now matches.
1567
+ //
1568
+ // The dedup against `windowsFsStampedSet` is an OPTIMIZATION,
1569
+ // not a correctness gate: re-stamping a session-held path
1570
+ // under the exec's distinct holder is refcount-safe but wastes
1571
+ // a SetSecurityInfo round-trip.
1572
+ //
1573
+ // filesystem.disabled bypasses ALL filesystem rule generation
1574
+ // — including credential-derived file denies — same ordering
1575
+ // as session-level `computeWindowsFsAccessSet` (credential
1576
+ // ENV: mode:'deny' is structural under the fresh srt-sandbox
1577
+ // env; mode:'mask' sentinels are passed via the --env
1578
+ // overlay).
1579
+ // Per-exec allowRead/allowWrite throw — `srt-win exec` only
1580
+ // exposes `--deny-*`; per-exec grants are not implemented.
1581
+ const fsCfg = customConfig?.filesystem;
1582
+ let perExecDenyRead = [];
1583
+ let perExecDenyWrite = [];
1584
+ if (!fsCfg?.disabled) {
1585
+ if (fsCfg?.allowRead?.length || fsCfg?.allowWrite?.length) {
1586
+ throw new Error(`Per-exec filesystem.allowRead/allowWrite is not supported ` +
1587
+ `on Windows — \`srt-win exec\` only exposes per-exec ` +
1588
+ `denies. Set them at the session level (initialize()).`);
1589
+ }
1590
+ const rawRead = [
1591
+ ...(fsCfg?.denyRead ?? []),
1592
+ ...getCredentialDenyReadPaths(customConfig?.credentials),
1593
+ ];
1594
+ const rawWrite = fsCfg?.denyWrite ?? [];
1595
+ // Skip on the dominant path (no per-exec fs or
1596
+ // credential-file deny).
1597
+ if (rawRead.length > 0 || rawWrite.length > 0) {
1598
+ const sessRead = new Set(windowsFsStampedSet?.denyRead ?? []);
1599
+ const sessWrite = new Set(windowsFsStampedSet?.denyWrite ?? []);
1600
+ const expand = expandWindowsFsPaths;
1601
+ perExecDenyRead = expand(rawRead, { mode: 'deny' }).filter(p => !sessRead.has(p));
1602
+ perExecDenyWrite = expand(rawWrite, { mode: 'deny' }).filter(p => !sessRead.has(p) && !sessWrite.has(p));
1603
+ }
1604
+ }
1605
+ // Per-exec deny rides on argv (`acl stamp` reads stdin, but
1606
+ // exec's stdin belongs to the child). The CreateProcessW
1607
+ // length check lives in `wrapCommandWithSandboxWindows`
1608
+ // where the full argv (incl. shell + user command) is known.
1609
+ //
1610
+ // The `denyReadPaths` half of the SESSION-level credentials
1611
+ // is already unioned into the stamp set at initialize() time
1612
+ // via `computeWindowsFsAccessSet`.
1613
+ registerCommandText(command, options);
1614
+ return wrapCommandWithSandboxWindows({
1615
+ command,
1616
+ commandId: options?.commandId,
1617
+ httpProxyPort: hasNetworkConfig ? getProxyPort() : undefined,
1618
+ socksProxyPort: hasNetworkConfig ? getSocksProxyPort() : undefined,
1619
+ proxyAuthToken: hasNetworkConfig ? proxyAuthToken : undefined,
1620
+ // mode:'deny' env vars are structurally absent (fresh
1621
+ // srt-sandbox profile env). mode:'mask' sentinels are
1622
+ // passed via the --env overlay so the sandboxed child sees
1623
+ // the sentinel value, same as macOS/Linux.
1624
+ setEnvVars: credentialRestrictions.setEnvVars,
1625
+ denyRead: perExecDenyRead,
1626
+ denyWrite: perExecDenyWrite,
1627
+ // safe.directory: cwd + the resolved session-level write
1628
+ // grants + explicit git.safeDirectories — the working-tree
1629
+ // roots the sandbox user has MODIFY on plus any repo top-level
1630
+ // the caller marks as safe without granting write.
1631
+ cwd,
1632
+ allowWrite: windowsFsStampedSet?.grantWrite,
1633
+ gitSafeDirectories: getGitSafeDirectories(customConfig),
1634
+ caCertPath: mitmCA?.trustBundlePath,
1635
+ binShell: parseWindowsBinShell(binShell),
1636
+ srtWin: customConfig?.windows?.srtWin
1637
+ ? resolveSrtWin(customConfig.windows.srtWin)
1638
+ : (srtWinSpawn ?? resolveSrtWin(config?.windows?.srtWin)),
1639
+ });
1640
+ }
1641
+ // macOS/Linux: delegate to the existing string wrapper, then put
1642
+ // the result behind `<shell> -c` so the caller's argv-spawn works.
1643
+ if (typeof binShell === 'object') {
1644
+ throw new Error('binShell object form is Windows-only; pass a shell path string ' +
1645
+ 'on macOS/Linux');
1646
+ }
1647
+ const wrapped = await wrapWithSandbox(command, binShell, customConfig, abortSignal, options);
1648
+ const shell = binShell ?? '/bin/bash';
1649
+ return { argv: [shell, '-c', wrapped], env: process.env };
1650
+ }
1651
+ /**
1652
+ * Get the current sandbox configuration
1653
+ * @returns The current configuration, or undefined if not initialized
1654
+ */
1655
+ function getConfig() {
1656
+ return config;
1657
+ }
1658
+ /**
1659
+ * Update the sandbox configuration in place.
1660
+ *
1661
+ * **Network/allowlist changes are a live swap**: the running
1662
+ * mux proxy reads `config.network.allowedDomains` /
1663
+ * `deniedDomains` per-request (via `filterNetworkRequest`), so
1664
+ * reassigning `config` here takes effect on the next connection
1665
+ * with no proxy rebind and no port change — on every platform,
1666
+ * including Windows. This is what lets a host enable/deny domains
1667
+ * for already-running sandboxed children.
1668
+ *
1669
+ * Filesystem changes (denyRead/denyWrite) are NOT applied live:
1670
+ * macOS bakes them into the seatbelt profile at wrap time, and
1671
+ * Linux/Windows bake them into the bwrap argv / DENY-ACE set at
1672
+ * wrap time. Call reset() + initialize() to apply a new
1673
+ * filesystem config.
1674
+ *
1675
+ * @param newConfig - The new configuration to use
1676
+ */
1677
+ function updateConfig(newConfig) {
1678
+ if (getPlatform() === 'windows' &&
1679
+ config &&
1680
+ !sameWindowsStampSet(newConfig)) {
1681
+ logForDebugging(`[Sandbox Windows] updateConfig: the resolved file-access set ` +
1682
+ `(filesystem.* ∪ credentials.files) changed but the ACL ` +
1683
+ `stamp/grant is session-wide — call reset() then initialize() ` +
1684
+ `to apply. The previously-applied set stays in effect.`, { level: 'warn' });
1685
+ }
1686
+ // Built before anything is swapped, so a malformed range leaves the
1687
+ // previous config fully in effect.
1688
+ const nextGuard = createResolvedAddressGuard(newConfig.network);
1689
+ // Deep clone the config to avoid mutations. structuredClone cannot clone
1690
+ // functions, so pull filterRequest out, clone the rest, and put it back —
1691
+ // a function reference is immutable in the sense that matters here.
1692
+ const { filterRequest, ...rest } = newConfig.network;
1693
+ config = structuredClone({ ...newConfig, network: rest });
1694
+ config.network.filterRequest = filterRequest;
1695
+ configInstalls++;
1696
+ resolvedAddressGuard = nextGuard;
1697
+ // Re-resolve parent proxy so hot-reload picks up changes. Note: the proxy
1698
+ // servers capture `parentProxy` by value at creation, so changes here take
1699
+ // effect only on re-initialize. This keeps the state consistent for the
1700
+ // next initialize() call.
1701
+ parentProxy = resolveParentProxy(newConfig.network.parentProxy);
1702
+ logForDebugging('Sandbox configuration updated');
1703
+ }
1704
+ /**
1705
+ * Lightweight cleanup to call after each sandboxed command completes.
1706
+ *
1707
+ * On Linux, bwrap creates empty files on the host filesystem as mount points
1708
+ * when protecting non-existent deny paths (e.g. ~/.bashrc, ~/.gitconfig).
1709
+ * These persist after bwrap exits. This function removes them.
1710
+ *
1711
+ * Safe to call on any platform — it's a no-op on macOS.
1712
+ * Also called automatically by reset() and on process exit as safety nets.
1713
+ */
1714
+ function cleanupAfterCommand() {
1715
+ cleanupBwrapMountPoints();
1716
+ }
1717
+ /**
1718
+ * How long to wait for a bridge process to exit after SIGTERM before
1719
+ * escalating to SIGKILL.
1720
+ *
1721
+ * socat exits within ~10ms of SIGTERM; this is purely a safety margin.
1722
+ * Keep it well below bun's default 5s test/hook timeout: when a bridge's
1723
+ * `'exit'` event is missed entirely (a Linux-only Bun pidfd notification
1724
+ * bug, oven-sh/bun#30301), this timer is the only thing that lets `reset()`
1725
+ * make progress, and a 5000ms value here loses the race against the hook
1726
+ * timer by a couple of milliseconds — that race was the dominant CI flake.
1727
+ */
1728
+ const BRIDGE_EXIT_TIMEOUT_MS = 1500;
1729
+ /**
1730
+ * SIGTERM a bridge process and resolve once it has exited.
1731
+ *
1732
+ * Returns immediately if the process has already exited (`.exitCode` /
1733
+ * `.signalCode` set) — registering `.once('exit')` after the event has
1734
+ * already been emitted produces a listener that never fires.
1735
+ *
1736
+ * Falls back to SIGKILL after {@link BRIDGE_EXIT_TIMEOUT_MS}.
1737
+ */
1738
+ function killBridgeProcess(proc, label) {
1739
+ // Already exited → 'exit' already emitted → a fresh once('exit') would
1740
+ // never fire. Don't wait on it.
1741
+ if (!proc.pid || proc.exitCode !== null || proc.signalCode !== null) {
1742
+ return Promise.resolve();
1743
+ }
1744
+ try {
1745
+ process.kill(proc.pid, 'SIGTERM');
1746
+ logForDebugging(`Sent SIGTERM to ${label} bridge process`);
1747
+ }
1748
+ catch (err) {
1749
+ if (err.code !== 'ESRCH') {
1750
+ logForDebugging(`Error killing ${label} bridge: ${err}`, {
1751
+ level: 'error',
1752
+ });
1753
+ }
1754
+ // ESRCH = process already gone; nothing to wait for either way.
1755
+ return Promise.resolve();
1756
+ }
1757
+ return new Promise(resolve => {
1758
+ let settled = false;
1759
+ const done = () => {
1760
+ if (settled)
1761
+ return;
1762
+ settled = true;
1763
+ clearTimeout(timer);
1764
+ resolve();
1765
+ };
1766
+ proc.once('exit', () => {
1767
+ logForDebugging(`${label} bridge process exited`);
1768
+ done();
1769
+ });
1770
+ const timer = setTimeout(() => {
1771
+ // Re-check liveness — the 'exit' may have raced us.
1772
+ if (proc.exitCode === null && proc.signalCode === null) {
1773
+ logForDebugging(`${label} bridge did not exit, forcing SIGKILL`, {
1774
+ level: 'warn',
1775
+ });
1776
+ try {
1777
+ if (proc.pid)
1778
+ process.kill(proc.pid, 'SIGKILL');
1779
+ }
1780
+ catch {
1781
+ // Process may have already exited
1782
+ }
1783
+ }
1784
+ done();
1785
+ }, BRIDGE_EXIT_TIMEOUT_MS);
1786
+ // The bridge process is being torn down; this timer must not be the
1787
+ // only thing keeping the event loop alive.
1788
+ timer.unref?.();
1789
+ });
1790
+ }
1791
+ /**
1792
+ * Forcibly close an http.Server, including any in-flight requests.
1793
+ *
1794
+ * Plain `server.close()` waits for every active request to finish.
1795
+ * The proxy may be mid-upstream-request when reset() runs (e.g. a test's
1796
+ * curl was killed by --max-time while the proxy was still dialing the
1797
+ * real example.com / api.github.com), and `dialDirect()` allows up to
1798
+ * 30s before giving up. Combined with a socat fork that hasn't yet seen
1799
+ * its unix-socket EOF, that leaves a fully-open inbound connection and
1800
+ * `server.close()` never calls back. `closeAllConnections()` (Node 18.2+,
1801
+ * also implemented in Bun) tears down those sockets so `close()` resolves
1802
+ * immediately.
1803
+ */
1804
+ function forceCloseHttpServer(server) {
1805
+ return new Promise(resolve => {
1806
+ // Must run *before* close(): in Bun, close() also detaches the
1807
+ // underlying handle, so a closeAllConnections() called afterwards
1808
+ // becomes a no-op and the close callback waits for the in-flight
1809
+ // request to drain — defeating the purpose. With closeAllConnections()
1810
+ // first, the connections are gone by the time close() runs and its
1811
+ // callback fires immediately (Bun reports "Server is not running.",
1812
+ // Node reports no error). Verified against both orderings.
1813
+ if (typeof server.closeAllConnections === 'function') {
1814
+ server.closeAllConnections();
1815
+ }
1816
+ server.close(error => {
1817
+ if (error && error.message !== 'Server is not running.') {
1818
+ logForDebugging(`Error closing HTTP proxy server: ${error.message}`, {
1819
+ level: 'error',
1820
+ });
1821
+ }
1822
+ resolve();
1823
+ });
1824
+ });
1825
+ }
1826
+ async function reset() {
1827
+ // Windows: release this session's sandbox-user ACEs. Best-effort
1828
+ // — log anomalies rather than throw, so teardown always
1829
+ // completes. Leftover ACEs are recoverable later via
1830
+ // `srt-win acl recover` (which sweeps by trustee SID).
1831
+ if (windowsFsStampedSet && windowsFsSbUserSid) {
1832
+ const sb = windowsFsSbUserSid;
1833
+ // Captured at initialize() — the SAME binary the grants/stamps
1834
+ // were applied with, immune to `config` mutation between.
1835
+ const srtWin = srtWinSpawn;
1836
+ // 'restored'/'alreadyOriginal' are the pre- same-user-removal
1837
+ // srt-win's success vocabulary; 'revoked'/'stillHeld' are the
1838
+ // post-. Either is non-anomalous.
1839
+ const ok = new Set(['revoked', 'stillHeld', 'restored', 'alreadyOriginal']);
1840
+ const log = (kind, e) => {
1841
+ if (!ok.has(e.status)) {
1842
+ logForDebugging(`[Sandbox Windows] ${kind}: '${e.path}' ${e.status} — ` +
1843
+ `ACE may be left in place; resolve and run ` +
1844
+ `\`srt-win acl recover\` to clear`, { level: 'warn' });
1845
+ }
1846
+ };
1847
+ for (const e of revokeWindowsAcl({ sandboxUserSid: sb, srtWin }) ?? []) {
1848
+ log('grant revoke', e);
1849
+ }
1850
+ for (const e of restoreWindowsAcl({ sandboxUserSid: sb, srtWin }) ?? []) {
1851
+ log('deny restore', e);
1852
+ }
1853
+ }
1854
+ windowsFsStampedSet = undefined;
1855
+ windowsFsSbUserSid = undefined;
1856
+ windowsFsRawInputs = undefined;
1857
+ srtWinSpawn = undefined;
1858
+ // windowsWfpVerified is NOT cleared — per-process, not per-session.
1859
+ // Clean up any leftover bwrap mount points. Force past the
1860
+ // active-sandbox counter — reset() means the session is over.
1861
+ cleanupBwrapMountPoints({ force: true });
1862
+ // Stop log monitor
1863
+ if (logMonitorShutdown) {
1864
+ logMonitorShutdown();
1865
+ logMonitorShutdown = undefined;
1866
+ }
1867
+ if (linuxMonitor) {
1868
+ linuxMonitor.stop();
1869
+ linuxMonitor = undefined;
1870
+ }
1871
+ if (managerContext?.linuxBridge) {
1872
+ const { httpSocketPath, socksSocketPath, httpBridgeProcess, socksBridgeProcess, } = managerContext.linuxBridge;
1873
+ // Kill both bridges and wait for them to exit
1874
+ await Promise.all([
1875
+ killBridgeProcess(httpBridgeProcess, 'HTTP'),
1876
+ killBridgeProcess(socksBridgeProcess, 'SOCKS'),
1877
+ ]);
1878
+ // Clean up sockets
1879
+ if (httpSocketPath) {
1880
+ try {
1881
+ fs.rmSync(httpSocketPath, { force: true });
1882
+ logForDebugging('Cleaned up HTTP socket');
1883
+ }
1884
+ catch (err) {
1885
+ logForDebugging(`HTTP socket cleanup error: ${err}`, {
1886
+ level: 'error',
1887
+ });
1888
+ }
1889
+ }
1890
+ if (socksSocketPath) {
1891
+ try {
1892
+ fs.rmSync(socksSocketPath, { force: true });
1893
+ logForDebugging('Cleaned up SOCKS socket');
1894
+ }
1895
+ catch (err) {
1896
+ logForDebugging(`SOCKS socket cleanup error: ${err}`, {
1897
+ level: 'error',
1898
+ });
1899
+ }
1900
+ }
1901
+ }
1902
+ // Close servers in parallel (only if they exist, i.e., were started by us)
1903
+ const closePromises = [];
1904
+ if (mitmCA) {
1905
+ closePromises.push(disposeMitmCA(mitmCA));
1906
+ }
1907
+ if (muxProxyServer) {
1908
+ closePromises.push(muxProxyServer.close().catch((error) => {
1909
+ logForDebugging(`Error closing mux proxy server: ${error.message}`, {
1910
+ level: 'error',
1911
+ });
1912
+ }));
1913
+ }
1914
+ if (httpProxyServer) {
1915
+ closePromises.push(forceCloseHttpServer(httpProxyServer));
1916
+ }
1917
+ if (socksProxyServer) {
1918
+ const socksClose = socksProxyServer.close().catch((error) => {
1919
+ logForDebugging(`Error closing SOCKS proxy server: ${error.message}`, {
1920
+ level: 'error',
1921
+ });
1922
+ });
1923
+ closePromises.push(socksClose);
1924
+ }
1925
+ // Wait for all servers to close
1926
+ await Promise.all(closePromises);
1927
+ // Clear references
1928
+ muxProxyServer = undefined;
1929
+ httpProxyServer = undefined;
1930
+ proxyAuthToken = undefined;
1931
+ socksProxyServer = undefined;
1932
+ managerContext = undefined;
1933
+ initializationPromise = undefined;
1934
+ parentProxy = undefined;
1935
+ resolvedAddressGuard = createResolvedAddressGuard();
1936
+ mitmCA = undefined;
1937
+ javaAgentJarPath = undefined;
1938
+ sentinelRegistry.clear();
1939
+ awsPairRegistry.clear();
1940
+ commandTextsByKey.clear();
1941
+ maskedFileStore.dispose();
1942
+ }
1943
+ function getSandboxViolationStore() {
1944
+ return sandboxViolationStore;
1945
+ }
1946
+ function annotateStderrWithSandboxFailures(command, stderr) {
1947
+ if (!config) {
1948
+ return stderr;
1949
+ }
1950
+ const violations = sandboxViolationStore.getViolationsForCommand(command);
1951
+ if (violations.length === 0) {
1952
+ return stderr;
1953
+ }
1954
+ let annotated = stderr;
1955
+ annotated += EOL + '<sandbox_violations>' + EOL;
1956
+ for (const violation of violations) {
1957
+ annotated += violation.line + EOL;
1958
+ }
1959
+ annotated += '</sandbox_violations>';
1960
+ return annotated;
1961
+ }
1962
+ /**
1963
+ * Returns glob patterns from Edit/Read permission rules that are not
1964
+ * fully supported on Linux. Returns empty array on macOS or when
1965
+ * sandboxing is disabled.
1966
+ *
1967
+ * Patterns ending with /** are excluded since they work as subpaths.
1968
+ * So are entries marked literal. An entry that is also the name of a path
1969
+ * that exists is still returned: what is returned must not depend on what
1970
+ * is on the disk, which a sandboxed command can change.
1971
+ */
1972
+ function getLinuxGlobPatternWarnings() {
1973
+ // Only warn on Linux/WSL (bubblewrap doesn't support globs)
1974
+ // macOS supports glob patterns via regex conversion
1975
+ if (getPlatform() !== 'linux' || !config || config.filesystem.disabled) {
1976
+ return [];
1977
+ }
1978
+ const globPatterns = [];
1979
+ // Write paths take no globs at all on Linux: bubblewrap binds concrete
1980
+ // paths, and nothing expands them.
1981
+ const allPaths = [
1982
+ ...config.filesystem.allowWrite,
1983
+ ...config.filesystem.denyWrite,
1984
+ ];
1985
+ for (const path of allPaths) {
1986
+ if (typeof path !== 'string')
1987
+ continue;
1988
+ // Strip trailing /** since that's just a subpath (directory and everything under it)
1989
+ const pathWithoutTrailingStar = removeTrailingGlobSuffix(path);
1990
+ // Only warn if there are still glob characters after removing trailing /**
1991
+ if (containsGlobChars(pathWithoutTrailingStar)) {
1992
+ globPatterns.push(path);
1993
+ }
1994
+ }
1995
+ // Read paths are expanded, so a glob there is supported — unless the
1996
+ // pattern has no literal directory for the walk to start from (a wildcard
1997
+ // in its first path component, `/**/*.pem`), which expands to nothing and
1998
+ // leaves the entry unenforced.
1999
+ for (const path of [
2000
+ ...config.filesystem.denyRead,
2001
+ ...(config.filesystem.allowRead ?? []),
2002
+ ]) {
2003
+ if (typeof path !== 'string')
2004
+ continue;
2005
+ const baseDir = globPatternBaseDir(normalizePathForSandbox(path));
2006
+ if (containsGlobChars(removeTrailingGlobSuffix(path)) &&
2007
+ (baseDir === '' || baseDir === '/')) {
2008
+ globPatterns.push(path);
2009
+ }
2010
+ }
2011
+ return globPatterns;
2012
+ }
2013
+ // ============================================================================
2014
+ // Export as Namespace with Interface
2015
+ // ============================================================================
2016
+ /**
2017
+ * Global sandbox manager that handles both network and filesystem restrictions
2018
+ * for this session. This runs outside of the sandbox, on the host machine.
2019
+ */
2020
+ export const SandboxManager = {
2021
+ initialize,
2022
+ isSupportedPlatform,
2023
+ isSandboxingEnabled,
2024
+ checkDependencies,
2025
+ checkDependenciesAsync,
2026
+ getFsReadConfig,
2027
+ getFsWriteConfig,
2028
+ getNetworkRestrictionConfig,
2029
+ getAllowUnixSockets,
2030
+ getAllowLocalBinding,
2031
+ getAllowMachLookup,
2032
+ getIgnoreViolations,
2033
+ getEnableWeakerNestedSandbox,
2034
+ getProxyPort,
2035
+ getProxyAuthToken,
2036
+ getSocksProxyPort,
2037
+ getLinuxHttpSocketPath,
2038
+ getLinuxSocksSocketPath,
2039
+ waitForNetworkInitialization,
2040
+ wrapWithSandbox,
2041
+ wrapWithSandboxArgv,
2042
+ cleanupAfterCommand,
2043
+ reset,
2044
+ getMitmCA: () => mitmCA,
2045
+ getSentinelRegistry: () => sentinelRegistry,
2046
+ getAwsPairRegistry: () => awsPairRegistry,
2047
+ getMaskedFileStore: () => maskedFileStore,
2048
+ getSandboxViolationStore,
2049
+ annotateStderrWithSandboxFailures,
2050
+ getLinuxGlobPatternWarnings,
2051
+ getConfig,
2052
+ updateConfig,
2053
+ };
2054
+ //# sourceMappingURL=sandbox-manager.js.map