@openai/agents-core 0.8.4 → 0.9.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 (462) hide show
  1. package/dist/agentToolRunConfig.js +3 -0
  2. package/dist/agentToolRunConfig.js.map +1 -1
  3. package/dist/agentToolRunConfig.mjs +3 -0
  4. package/dist/agentToolRunConfig.mjs.map +1 -1
  5. package/dist/errors.d.ts +10 -0
  6. package/dist/errors.js +15 -1
  7. package/dist/errors.js.map +1 -1
  8. package/dist/errors.mjs +13 -0
  9. package/dist/errors.mjs.map +1 -1
  10. package/dist/handoff.js +1 -1
  11. package/dist/handoff.js.map +1 -1
  12. package/dist/handoff.mjs +1 -1
  13. package/dist/handoff.mjs.map +1 -1
  14. package/dist/index.d.ts +5 -4
  15. package/dist/index.js +6 -2
  16. package/dist/index.js.map +1 -1
  17. package/dist/index.mjs +3 -2
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/items.d.ts +13 -0
  20. package/dist/items.js +15 -0
  21. package/dist/items.js.map +1 -1
  22. package/dist/items.mjs +15 -0
  23. package/dist/items.mjs.map +1 -1
  24. package/dist/memory/historyMutations.d.ts +6 -0
  25. package/dist/memory/historyMutations.js +32 -0
  26. package/dist/memory/historyMutations.js.map +1 -0
  27. package/dist/memory/historyMutations.mjs +29 -0
  28. package/dist/memory/historyMutations.mjs.map +1 -0
  29. package/dist/memory/memorySession.d.ts +3 -2
  30. package/dist/memory/memorySession.js +7 -0
  31. package/dist/memory/memorySession.js.map +1 -1
  32. package/dist/memory/memorySession.mjs +7 -0
  33. package/dist/memory/memorySession.mjs.map +1 -1
  34. package/dist/memory/session.d.ts +15 -0
  35. package/dist/memory/session.js +6 -0
  36. package/dist/memory/session.js.map +1 -1
  37. package/dist/memory/session.mjs +5 -0
  38. package/dist/memory/session.mjs.map +1 -1
  39. package/dist/metadata.js +2 -2
  40. package/dist/metadata.mjs +2 -2
  41. package/dist/model.d.ts +21 -0
  42. package/dist/run.d.ts +7 -1
  43. package/dist/run.js +116 -57
  44. package/dist/run.js.map +1 -1
  45. package/dist/run.mjs +117 -58
  46. package/dist/run.mjs.map +1 -1
  47. package/dist/runState.d.ts +83 -1
  48. package/dist/runState.js +96 -11
  49. package/dist/runState.js.map +1 -1
  50. package/dist/runState.mjs +95 -11
  51. package/dist/runState.mjs.map +1 -1
  52. package/dist/runner/errorHandlers.d.ts +13 -4
  53. package/dist/runner/errorHandlers.js +22 -4
  54. package/dist/runner/errorHandlers.js.map +1 -1
  55. package/dist/runner/errorHandlers.mjs +21 -4
  56. package/dist/runner/errorHandlers.mjs.map +1 -1
  57. package/dist/runner/items.js +11 -1
  58. package/dist/runner/items.js.map +1 -1
  59. package/dist/runner/items.mjs +11 -1
  60. package/dist/runner/items.mjs.map +1 -1
  61. package/dist/runner/modelPreparation.d.ts +1 -1
  62. package/dist/runner/modelPreparation.js +7 -7
  63. package/dist/runner/modelPreparation.js.map +1 -1
  64. package/dist/runner/modelPreparation.mjs +7 -7
  65. package/dist/runner/modelPreparation.mjs.map +1 -1
  66. package/dist/runner/runLoop.d.ts +2 -1
  67. package/dist/runner/runLoop.js +2 -2
  68. package/dist/runner/runLoop.js.map +1 -1
  69. package/dist/runner/runLoop.mjs +2 -2
  70. package/dist/runner/runLoop.mjs.map +1 -1
  71. package/dist/runner/sandbox.d.ts +33 -0
  72. package/dist/runner/sandbox.js +92 -0
  73. package/dist/runner/sandbox.js.map +1 -0
  74. package/dist/runner/sandbox.mjs +83 -0
  75. package/dist/runner/sandbox.mjs.map +1 -0
  76. package/dist/runner/toolExecution.js +25 -13
  77. package/dist/runner/toolExecution.js.map +1 -1
  78. package/dist/runner/toolExecution.mjs +25 -13
  79. package/dist/runner/toolExecution.mjs.map +1 -1
  80. package/dist/runner/tracing.js +1 -0
  81. package/dist/runner/tracing.js.map +1 -1
  82. package/dist/runner/tracing.mjs +1 -0
  83. package/dist/runner/tracing.mjs.map +1 -1
  84. package/dist/runner/turnPreparation.d.ts +2 -4
  85. package/dist/runner/turnPreparation.js +7 -3
  86. package/dist/runner/turnPreparation.js.map +1 -1
  87. package/dist/runner/turnPreparation.mjs +7 -3
  88. package/dist/runner/turnPreparation.mjs.map +1 -1
  89. package/dist/runner/turnResolution.js +158 -31
  90. package/dist/runner/turnResolution.js.map +1 -1
  91. package/dist/runner/turnResolution.mjs +160 -33
  92. package/dist/runner/turnResolution.mjs.map +1 -1
  93. package/dist/runner/types.d.ts +8 -8
  94. package/dist/sandbox/agent.d.ts +24 -0
  95. package/dist/sandbox/agent.js +68 -0
  96. package/dist/sandbox/agent.js.map +1 -0
  97. package/dist/sandbox/agent.mjs +64 -0
  98. package/dist/sandbox/agent.mjs.map +1 -0
  99. package/dist/sandbox/brand.d.ts +1 -0
  100. package/dist/sandbox/brand.js +5 -0
  101. package/dist/sandbox/brand.js.map +1 -0
  102. package/dist/sandbox/brand.mjs +2 -0
  103. package/dist/sandbox/brand.mjs.map +1 -0
  104. package/dist/sandbox/capabilities/base.d.ts +25 -0
  105. package/dist/sandbox/capabilities/base.js +89 -0
  106. package/dist/sandbox/capabilities/base.js.map +1 -0
  107. package/dist/sandbox/capabilities/base.mjs +84 -0
  108. package/dist/sandbox/capabilities/base.mjs.map +1 -0
  109. package/dist/sandbox/capabilities/compaction.d.ts +33 -0
  110. package/dist/sandbox/capabilities/compaction.js +172 -0
  111. package/dist/sandbox/capabilities/compaction.js.map +1 -0
  112. package/dist/sandbox/capabilities/compaction.mjs +164 -0
  113. package/dist/sandbox/capabilities/compaction.mjs.map +1 -0
  114. package/dist/sandbox/capabilities/filesystem.d.ts +14 -0
  115. package/dist/sandbox/capabilities/filesystem.js +447 -0
  116. package/dist/sandbox/capabilities/filesystem.js.map +1 -0
  117. package/dist/sandbox/capabilities/filesystem.mjs +444 -0
  118. package/dist/sandbox/capabilities/filesystem.mjs.map +1 -0
  119. package/dist/sandbox/capabilities/index.d.ts +19 -0
  120. package/dist/sandbox/capabilities/index.js +31 -0
  121. package/dist/sandbox/capabilities/index.js.map +1 -0
  122. package/dist/sandbox/capabilities/index.mjs +17 -0
  123. package/dist/sandbox/capabilities/index.mjs.map +1 -0
  124. package/dist/sandbox/capabilities/memory.d.ts +52 -0
  125. package/dist/sandbox/capabilities/memory.js +290 -0
  126. package/dist/sandbox/capabilities/memory.js.map +1 -0
  127. package/dist/sandbox/capabilities/memory.mjs +286 -0
  128. package/dist/sandbox/capabilities/memory.mjs.map +1 -0
  129. package/dist/sandbox/capabilities/shell.d.ts +15 -0
  130. package/dist/sandbox/capabilities/shell.js +130 -0
  131. package/dist/sandbox/capabilities/shell.js.map +1 -0
  132. package/dist/sandbox/capabilities/shell.mjs +127 -0
  133. package/dist/sandbox/capabilities/shell.mjs.map +1 -0
  134. package/dist/sandbox/capabilities/skills.d.ts +47 -0
  135. package/dist/sandbox/capabilities/skills.js +453 -0
  136. package/dist/sandbox/capabilities/skills.js.map +1 -0
  137. package/dist/sandbox/capabilities/skills.mjs +449 -0
  138. package/dist/sandbox/capabilities/skills.mjs.map +1 -0
  139. package/dist/sandbox/capabilities/transport.d.ts +3 -0
  140. package/dist/sandbox/capabilities/transport.js +33 -0
  141. package/dist/sandbox/capabilities/transport.js.map +1 -0
  142. package/dist/sandbox/capabilities/transport.mjs +28 -0
  143. package/dist/sandbox/capabilities/transport.mjs.map +1 -0
  144. package/dist/sandbox/client.d.ts +53 -0
  145. package/dist/sandbox/client.js +34 -0
  146. package/dist/sandbox/client.js.map +1 -0
  147. package/dist/sandbox/client.mjs +31 -0
  148. package/dist/sandbox/client.mjs.map +1 -0
  149. package/dist/sandbox/entries/factories.d.ts +17 -0
  150. package/dist/sandbox/entries/factories.js +112 -0
  151. package/dist/sandbox/entries/factories.js.map +1 -0
  152. package/dist/sandbox/entries/factories.mjs +94 -0
  153. package/dist/sandbox/entries/factories.mjs.map +1 -0
  154. package/dist/sandbox/entries/guards.d.ts +5 -0
  155. package/dist/sandbox/entries/guards.js +19 -0
  156. package/dist/sandbox/entries/guards.js.map +1 -0
  157. package/dist/sandbox/entries/guards.mjs +13 -0
  158. package/dist/sandbox/entries/guards.mjs.map +1 -0
  159. package/dist/sandbox/entries/index.d.ts +3 -0
  160. package/dist/sandbox/entries/index.js +26 -0
  161. package/dist/sandbox/entries/index.js.map +1 -0
  162. package/dist/sandbox/entries/index.mjs +3 -0
  163. package/dist/sandbox/entries/index.mjs.map +1 -0
  164. package/dist/sandbox/entries/types.d.ts +177 -0
  165. package/dist/sandbox/entries/types.js +3 -0
  166. package/dist/sandbox/entries/types.js.map +1 -0
  167. package/dist/sandbox/entries/types.mjs +2 -0
  168. package/dist/sandbox/entries/types.mjs.map +1 -0
  169. package/dist/sandbox/errors.d.ts +151 -0
  170. package/dist/sandbox/errors.js +303 -0
  171. package/dist/sandbox/errors.js.map +1 -0
  172. package/dist/sandbox/errors.mjs +251 -0
  173. package/dist/sandbox/errors.mjs.map +1 -0
  174. package/dist/sandbox/events.d.ts +51 -0
  175. package/dist/sandbox/events.js +104 -0
  176. package/dist/sandbox/events.js.map +1 -0
  177. package/dist/sandbox/events.mjs +95 -0
  178. package/dist/sandbox/events.mjs.map +1 -0
  179. package/dist/sandbox/index.d.ts +14 -0
  180. package/dist/sandbox/index.js +31 -0
  181. package/dist/sandbox/index.js.map +1 -0
  182. package/dist/sandbox/index.mjs +15 -0
  183. package/dist/sandbox/index.mjs.map +1 -0
  184. package/dist/sandbox/internal.d.ts +7 -0
  185. package/dist/sandbox/internal.js +46 -0
  186. package/dist/sandbox/internal.js.map +1 -0
  187. package/dist/sandbox/internal.mjs +8 -0
  188. package/dist/sandbox/internal.mjs.map +1 -0
  189. package/dist/sandbox/local.d.ts +3 -0
  190. package/dist/sandbox/local.js +20 -0
  191. package/dist/sandbox/local.js.map +1 -0
  192. package/dist/sandbox/local.mjs +4 -0
  193. package/dist/sandbox/local.mjs.map +1 -0
  194. package/dist/sandbox/localSkills.d.ts +13 -0
  195. package/dist/sandbox/localSkills.js +62 -0
  196. package/dist/sandbox/localSkills.js.map +1 -0
  197. package/dist/sandbox/localSkills.mjs +59 -0
  198. package/dist/sandbox/localSkills.mjs.map +1 -0
  199. package/dist/sandbox/manifest.d.ts +86 -0
  200. package/dist/sandbox/manifest.js +553 -0
  201. package/dist/sandbox/manifest.js.map +1 -0
  202. package/dist/sandbox/manifest.mjs +545 -0
  203. package/dist/sandbox/manifest.mjs.map +1 -0
  204. package/dist/sandbox/memory/generation.d.ts +56 -0
  205. package/dist/sandbox/memory/generation.js +426 -0
  206. package/dist/sandbox/memory/generation.js.map +1 -0
  207. package/dist/sandbox/memory/generation.mjs +385 -0
  208. package/dist/sandbox/memory/generation.mjs.map +1 -0
  209. package/dist/sandbox/memory/prompts.d.ts +16 -0
  210. package/dist/sandbox/memory/prompts.js +1685 -0
  211. package/dist/sandbox/memory/prompts.js.map +1 -0
  212. package/dist/sandbox/memory/prompts.mjs +1679 -0
  213. package/dist/sandbox/memory/prompts.mjs.map +1 -0
  214. package/dist/sandbox/memory/rollouts.d.ts +33 -0
  215. package/dist/sandbox/memory/rollouts.js +228 -0
  216. package/dist/sandbox/memory/rollouts.js.map +1 -0
  217. package/dist/sandbox/memory/rollouts.mjs +221 -0
  218. package/dist/sandbox/memory/rollouts.mjs.map +1 -0
  219. package/dist/sandbox/memory/storage.d.ts +70 -0
  220. package/dist/sandbox/memory/storage.js +543 -0
  221. package/dist/sandbox/memory/storage.js.map +1 -0
  222. package/dist/sandbox/memory/storage.mjs +537 -0
  223. package/dist/sandbox/memory/storage.mjs.map +1 -0
  224. package/dist/sandbox/pathGrants.d.ts +11 -0
  225. package/dist/sandbox/pathGrants.js +28 -0
  226. package/dist/sandbox/pathGrants.js.map +1 -0
  227. package/dist/sandbox/pathGrants.mjs +25 -0
  228. package/dist/sandbox/pathGrants.mjs.map +1 -0
  229. package/dist/sandbox/permissions.d.ts +29 -0
  230. package/dist/sandbox/permissions.js +140 -0
  231. package/dist/sandbox/permissions.js.map +1 -0
  232. package/dist/sandbox/permissions.mjs +134 -0
  233. package/dist/sandbox/permissions.mjs.map +1 -0
  234. package/dist/sandbox/runtime/agentKeys.d.ts +7 -0
  235. package/dist/sandbox/runtime/agentKeys.js +76 -0
  236. package/dist/sandbox/runtime/agentKeys.js.map +1 -0
  237. package/dist/sandbox/runtime/agentKeys.mjs +69 -0
  238. package/dist/sandbox/runtime/agentKeys.mjs.map +1 -0
  239. package/dist/sandbox/runtime/agentPreparation.d.ts +20 -0
  240. package/dist/sandbox/runtime/agentPreparation.js +178 -0
  241. package/dist/sandbox/runtime/agentPreparation.js.map +1 -0
  242. package/dist/sandbox/runtime/agentPreparation.mjs +172 -0
  243. package/dist/sandbox/runtime/agentPreparation.mjs.map +1 -0
  244. package/dist/sandbox/runtime/index.d.ts +5 -0
  245. package/dist/sandbox/runtime/index.js +22 -0
  246. package/dist/sandbox/runtime/index.js.map +1 -0
  247. package/dist/sandbox/runtime/index.mjs +6 -0
  248. package/dist/sandbox/runtime/index.mjs.map +1 -0
  249. package/dist/sandbox/runtime/livePreservedSessions.d.ts +25 -0
  250. package/dist/sandbox/runtime/livePreservedSessions.js +58 -0
  251. package/dist/sandbox/runtime/livePreservedSessions.js.map +1 -0
  252. package/dist/sandbox/runtime/livePreservedSessions.mjs +51 -0
  253. package/dist/sandbox/runtime/livePreservedSessions.mjs.map +1 -0
  254. package/dist/sandbox/runtime/manager.d.ts +68 -0
  255. package/dist/sandbox/runtime/manager.js +704 -0
  256. package/dist/sandbox/runtime/manager.js.map +1 -0
  257. package/dist/sandbox/runtime/manager.mjs +697 -0
  258. package/dist/sandbox/runtime/manager.mjs.map +1 -0
  259. package/dist/sandbox/runtime/prompts.d.ts +6 -0
  260. package/dist/sandbox/runtime/prompts.js +108 -0
  261. package/dist/sandbox/runtime/prompts.js.map +1 -0
  262. package/dist/sandbox/runtime/prompts.mjs +101 -0
  263. package/dist/sandbox/runtime/prompts.mjs.map +1 -0
  264. package/dist/sandbox/runtime/providedSessionManifest.d.ts +3 -0
  265. package/dist/sandbox/runtime/providedSessionManifest.js +175 -0
  266. package/dist/sandbox/runtime/providedSessionManifest.js.map +1 -0
  267. package/dist/sandbox/runtime/providedSessionManifest.mjs +172 -0
  268. package/dist/sandbox/runtime/providedSessionManifest.mjs.map +1 -0
  269. package/dist/sandbox/runtime/runAsManifest.d.ts +4 -0
  270. package/dist/sandbox/runtime/runAsManifest.js +40 -0
  271. package/dist/sandbox/runtime/runAsManifest.js.map +1 -0
  272. package/dist/sandbox/runtime/runAsManifest.mjs +36 -0
  273. package/dist/sandbox/runtime/runAsManifest.mjs.map +1 -0
  274. package/dist/sandbox/runtime/sessionLifecycle.d.ts +6 -0
  275. package/dist/sandbox/runtime/sessionLifecycle.js +222 -0
  276. package/dist/sandbox/runtime/sessionLifecycle.js.map +1 -0
  277. package/dist/sandbox/runtime/sessionLifecycle.mjs +215 -0
  278. package/dist/sandbox/runtime/sessionLifecycle.mjs.map +1 -0
  279. package/dist/sandbox/runtime/sessionSerialization.d.ts +12 -0
  280. package/dist/sandbox/runtime/sessionSerialization.js +74 -0
  281. package/dist/sandbox/runtime/sessionSerialization.js.map +1 -0
  282. package/dist/sandbox/runtime/sessionSerialization.mjs +71 -0
  283. package/dist/sandbox/runtime/sessionSerialization.mjs.map +1 -0
  284. package/dist/sandbox/runtime/sessionState.d.ts +26 -0
  285. package/dist/sandbox/runtime/sessionState.js +113 -0
  286. package/dist/sandbox/runtime/sessionState.js.map +1 -0
  287. package/dist/sandbox/runtime/sessionState.mjs +104 -0
  288. package/dist/sandbox/runtime/sessionState.mjs.map +1 -0
  289. package/dist/sandbox/runtime/spans.d.ts +1 -0
  290. package/dist/sandbox/runtime/spans.js +51 -0
  291. package/dist/sandbox/runtime/spans.js.map +1 -0
  292. package/dist/sandbox/runtime/spans.mjs +48 -0
  293. package/dist/sandbox/runtime/spans.mjs.map +1 -0
  294. package/dist/sandbox/runtime/toolRehydration.d.ts +34 -0
  295. package/dist/sandbox/runtime/toolRehydration.js +207 -0
  296. package/dist/sandbox/runtime/toolRehydration.js.map +1 -0
  297. package/dist/sandbox/runtime/toolRehydration.mjs +200 -0
  298. package/dist/sandbox/runtime/toolRehydration.mjs.map +1 -0
  299. package/dist/sandbox/sandboxes/docker.d.ts +75 -0
  300. package/dist/sandbox/sandboxes/docker.js +2015 -0
  301. package/dist/sandbox/sandboxes/docker.js.map +1 -0
  302. package/dist/sandbox/sandboxes/docker.mjs +2010 -0
  303. package/dist/sandbox/sandboxes/docker.mjs.map +1 -0
  304. package/dist/sandbox/sandboxes/index.d.ts +3 -0
  305. package/dist/sandbox/sandboxes/index.js +20 -0
  306. package/dist/sandbox/sandboxes/index.js.map +1 -0
  307. package/dist/sandbox/sandboxes/index.mjs +4 -0
  308. package/dist/sandbox/sandboxes/index.mjs.map +1 -0
  309. package/dist/sandbox/sandboxes/shared/localSnapshotPaths.d.ts +1 -0
  310. package/dist/sandbox/sandboxes/shared/localSnapshotPaths.js +22 -0
  311. package/dist/sandbox/sandboxes/shared/localSnapshotPaths.js.map +1 -0
  312. package/dist/sandbox/sandboxes/shared/localSnapshotPaths.mjs +19 -0
  313. package/dist/sandbox/sandboxes/shared/localSnapshotPaths.mjs.map +1 -0
  314. package/dist/sandbox/sandboxes/shared/localSnapshots.d.ts +34 -0
  315. package/dist/sandbox/sandboxes/shared/localSnapshots.js +525 -0
  316. package/dist/sandbox/sandboxes/shared/localSnapshots.js.map +1 -0
  317. package/dist/sandbox/sandboxes/shared/localSnapshots.mjs +508 -0
  318. package/dist/sandbox/sandboxes/shared/localSnapshots.mjs.map +1 -0
  319. package/dist/sandbox/sandboxes/shared/localWorkspace.d.ts +27 -0
  320. package/dist/sandbox/sandboxes/shared/localWorkspace.js +693 -0
  321. package/dist/sandbox/sandboxes/shared/localWorkspace.js.map +1 -0
  322. package/dist/sandbox/sandboxes/shared/localWorkspace.mjs +684 -0
  323. package/dist/sandbox/sandboxes/shared/localWorkspace.mjs.map +1 -0
  324. package/dist/sandbox/sandboxes/shared/manifestPersistence.d.ts +15 -0
  325. package/dist/sandbox/sandboxes/shared/manifestPersistence.js +191 -0
  326. package/dist/sandbox/sandboxes/shared/manifestPersistence.js.map +1 -0
  327. package/dist/sandbox/sandboxes/shared/manifestPersistence.mjs +182 -0
  328. package/dist/sandbox/sandboxes/shared/manifestPersistence.mjs.map +1 -0
  329. package/dist/sandbox/sandboxes/shared/pty.d.ts +9 -0
  330. package/dist/sandbox/sandboxes/shared/pty.js +151 -0
  331. package/dist/sandbox/sandboxes/shared/pty.js.map +1 -0
  332. package/dist/sandbox/sandboxes/shared/pty.mjs +148 -0
  333. package/dist/sandbox/sandboxes/shared/pty.mjs.map +1 -0
  334. package/dist/sandbox/sandboxes/shared/runProcess.d.ts +16 -0
  335. package/dist/sandbox/sandboxes/shared/runProcess.js +90 -0
  336. package/dist/sandbox/sandboxes/shared/runProcess.js.map +1 -0
  337. package/dist/sandbox/sandboxes/shared/runProcess.mjs +86 -0
  338. package/dist/sandbox/sandboxes/shared/runProcess.mjs.map +1 -0
  339. package/dist/sandbox/sandboxes/shared/sessionStateValues.d.ts +18 -0
  340. package/dist/sandbox/sandboxes/shared/sessionStateValues.js +40 -0
  341. package/dist/sandbox/sandboxes/shared/sessionStateValues.js.map +1 -0
  342. package/dist/sandbox/sandboxes/shared/sessionStateValues.mjs +35 -0
  343. package/dist/sandbox/sandboxes/shared/sessionStateValues.mjs.map +1 -0
  344. package/dist/sandbox/sandboxes/shared/shellCommand.d.ts +17 -0
  345. package/dist/sandbox/sandboxes/shared/shellCommand.js +38 -0
  346. package/dist/sandbox/sandboxes/shared/shellCommand.js.map +1 -0
  347. package/dist/sandbox/sandboxes/shared/shellCommand.mjs +34 -0
  348. package/dist/sandbox/sandboxes/shared/shellCommand.mjs.map +1 -0
  349. package/dist/sandbox/sandboxes/types.d.ts +11 -0
  350. package/dist/sandbox/sandboxes/types.js +3 -0
  351. package/dist/sandbox/sandboxes/types.js.map +1 -0
  352. package/dist/sandbox/sandboxes/types.mjs +2 -0
  353. package/dist/sandbox/sandboxes/types.mjs.map +1 -0
  354. package/dist/sandbox/sandboxes/unixLocal.d.ts +95 -0
  355. package/dist/sandbox/sandboxes/unixLocal.js +863 -0
  356. package/dist/sandbox/sandboxes/unixLocal.js.map +1 -0
  357. package/dist/sandbox/sandboxes/unixLocal.mjs +858 -0
  358. package/dist/sandbox/sandboxes/unixLocal.mjs.map +1 -0
  359. package/dist/sandbox/session.d.ts +123 -0
  360. package/dist/sandbox/session.js +58 -0
  361. package/dist/sandbox/session.js.map +1 -0
  362. package/dist/sandbox/session.mjs +50 -0
  363. package/dist/sandbox/session.mjs.map +1 -0
  364. package/dist/sandbox/shared/compare.d.ts +2 -0
  365. package/dist/sandbox/shared/compare.js +13 -0
  366. package/dist/sandbox/shared/compare.js.map +1 -0
  367. package/dist/sandbox/shared/compare.mjs +9 -0
  368. package/dist/sandbox/shared/compare.mjs.map +1 -0
  369. package/dist/sandbox/shared/environment.d.ts +14 -0
  370. package/dist/sandbox/shared/environment.js +69 -0
  371. package/dist/sandbox/shared/environment.js.map +1 -0
  372. package/dist/sandbox/shared/environment.mjs +59 -0
  373. package/dist/sandbox/shared/environment.mjs.map +1 -0
  374. package/dist/sandbox/shared/hostPath.d.ts +4 -0
  375. package/dist/sandbox/shared/hostPath.js +22 -0
  376. package/dist/sandbox/shared/hostPath.js.map +1 -0
  377. package/dist/sandbox/shared/hostPath.mjs +16 -0
  378. package/dist/sandbox/shared/hostPath.mjs.map +1 -0
  379. package/dist/sandbox/shared/manifestCollections.d.ts +12 -0
  380. package/dist/sandbox/shared/manifestCollections.js +40 -0
  381. package/dist/sandbox/shared/manifestCollections.js.map +1 -0
  382. package/dist/sandbox/shared/manifestCollections.mjs +34 -0
  383. package/dist/sandbox/shared/manifestCollections.mjs.map +1 -0
  384. package/dist/sandbox/shared/media.d.ts +6 -0
  385. package/dist/sandbox/shared/media.js +126 -0
  386. package/dist/sandbox/shared/media.js.map +1 -0
  387. package/dist/sandbox/shared/media.mjs +119 -0
  388. package/dist/sandbox/shared/media.mjs.map +1 -0
  389. package/dist/sandbox/shared/output.d.ts +12 -0
  390. package/dist/sandbox/shared/output.js +108 -0
  391. package/dist/sandbox/shared/output.js.map +1 -0
  392. package/dist/sandbox/shared/output.mjs +103 -0
  393. package/dist/sandbox/shared/output.mjs.map +1 -0
  394. package/dist/sandbox/shared/posixPath.d.ts +7 -0
  395. package/dist/sandbox/shared/posixPath.js +90 -0
  396. package/dist/sandbox/shared/posixPath.js.map +1 -0
  397. package/dist/sandbox/shared/posixPath.mjs +81 -0
  398. package/dist/sandbox/shared/posixPath.mjs.map +1 -0
  399. package/dist/sandbox/shared/remoteMountCommandAllowlist.d.ts +3 -0
  400. package/dist/sandbox/shared/remoteMountCommandAllowlist.js +33 -0
  401. package/dist/sandbox/shared/remoteMountCommandAllowlist.js.map +1 -0
  402. package/dist/sandbox/shared/remoteMountCommandAllowlist.mjs +28 -0
  403. package/dist/sandbox/shared/remoteMountCommandAllowlist.mjs.map +1 -0
  404. package/dist/sandbox/shared/shell.d.ts +1 -0
  405. package/dist/sandbox/shared/shell.js +7 -0
  406. package/dist/sandbox/shared/shell.js.map +1 -0
  407. package/dist/sandbox/shared/shell.mjs +4 -0
  408. package/dist/sandbox/shared/shell.mjs.map +1 -0
  409. package/dist/sandbox/shared/stableJson.d.ts +12 -0
  410. package/dist/sandbox/shared/stableJson.js +40 -0
  411. package/dist/sandbox/shared/stableJson.js.map +1 -0
  412. package/dist/sandbox/shared/stableJson.mjs +35 -0
  413. package/dist/sandbox/shared/stableJson.mjs.map +1 -0
  414. package/dist/sandbox/shared/typeGuards.d.ts +6 -0
  415. package/dist/sandbox/shared/typeGuards.js +34 -0
  416. package/dist/sandbox/shared/typeGuards.js.map +1 -0
  417. package/dist/sandbox/shared/typeGuards.mjs +26 -0
  418. package/dist/sandbox/shared/typeGuards.mjs.map +1 -0
  419. package/dist/sandbox/snapshot.d.ts +60 -0
  420. package/dist/sandbox/snapshot.js +45 -0
  421. package/dist/sandbox/snapshot.js.map +1 -0
  422. package/dist/sandbox/snapshot.mjs +39 -0
  423. package/dist/sandbox/snapshot.mjs.map +1 -0
  424. package/dist/sandbox/users.d.ts +11 -0
  425. package/dist/sandbox/users.js +31 -0
  426. package/dist/sandbox/users.js.map +1 -0
  427. package/dist/sandbox/users.mjs +26 -0
  428. package/dist/sandbox/users.mjs.map +1 -0
  429. package/dist/sandbox/workspacePaths.d.ts +20 -0
  430. package/dist/sandbox/workspacePaths.js +73 -0
  431. package/dist/sandbox/workspacePaths.js.map +1 -0
  432. package/dist/sandbox/workspacePaths.mjs +69 -0
  433. package/dist/sandbox/workspacePaths.mjs.map +1 -0
  434. package/dist/tool.js +1 -1
  435. package/dist/tool.js.map +1 -1
  436. package/dist/tool.mjs +1 -1
  437. package/dist/tool.mjs.map +1 -1
  438. package/dist/types/protocol.d.ts +8 -0
  439. package/dist/types/protocol.js +1 -0
  440. package/dist/types/protocol.js.map +1 -1
  441. package/dist/types/protocol.mjs +1 -0
  442. package/dist/types/protocol.mjs.map +1 -1
  443. package/dist/utils/messages.d.ts +6 -0
  444. package/dist/utils/messages.js +21 -0
  445. package/dist/utils/messages.js.map +1 -1
  446. package/dist/utils/messages.mjs +20 -0
  447. package/dist/utils/messages.mjs.map +1 -1
  448. package/dist/utils/strictToolSchema.d.ts +4 -0
  449. package/dist/utils/strictToolSchema.js +358 -0
  450. package/dist/utils/strictToolSchema.js.map +1 -0
  451. package/dist/utils/strictToolSchema.mjs +353 -0
  452. package/dist/utils/strictToolSchema.mjs.map +1 -0
  453. package/dist/utils/tools.d.ts +3 -1
  454. package/dist/utils/tools.js +18 -7
  455. package/dist/utils/tools.js.map +1 -1
  456. package/dist/utils/tools.mjs +18 -7
  457. package/dist/utils/tools.mjs.map +1 -1
  458. package/dist/utils/zodJsonSchemaCompat.js +18 -16
  459. package/dist/utils/zodJsonSchemaCompat.js.map +1 -1
  460. package/dist/utils/zodJsonSchemaCompat.mjs +18 -16
  461. package/dist/utils/zodJsonSchemaCompat.mjs.map +1 -1
  462. package/package.json +25 -1
@@ -0,0 +1,31 @@
1
+ import { Manifest } from "./manifest.mjs";
2
+ import { isRecord } from "./shared/typeGuards.mjs";
3
+ export function normalizeSandboxClientCreateArgs(args, manifestOptions) {
4
+ if (args instanceof Manifest) {
5
+ return {
6
+ manifest: args,
7
+ options: manifestOptions,
8
+ snapshot: readSnapshotOption(manifestOptions),
9
+ concurrencyLimits: readConcurrencyLimitsOption(manifestOptions),
10
+ };
11
+ }
12
+ return {
13
+ manifest: args?.manifest ?? new Manifest(),
14
+ options: args?.options,
15
+ snapshot: args?.snapshot,
16
+ concurrencyLimits: args?.concurrencyLimits,
17
+ };
18
+ }
19
+ function readSnapshotOption(options) {
20
+ if (!isRecord(options)) {
21
+ return undefined;
22
+ }
23
+ return options.snapshot;
24
+ }
25
+ function readConcurrencyLimitsOption(options) {
26
+ if (!isRecord(options)) {
27
+ return undefined;
28
+ }
29
+ return options.concurrencyLimits;
30
+ }
31
+ //# sourceMappingURL=client.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.mjs","sourceRoot":"","sources":["../../src/sandbox/client.ts"],"names":[],"mappings":"OAAO,EAAE,QAAQ,EAAE;OAEZ,EAAE,QAAQ,EAAE;AAuFnB,MAAM,UAAU,gCAAgC,CAG9C,IAAmD,EACnD,eAA0B;IAE1B,IAAI,IAAI,YAAY,QAAQ,EAAE,CAAC;QAC7B,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,eAAe;YACxB,QAAQ,EAAE,kBAAkB,CAAC,eAAe,CAAC;YAC7C,iBAAiB,EAAE,2BAA2B,CAAC,eAAe,CAAC;SAChE,CAAC;IACJ,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,IAAI,EAAE,QAAQ,IAAI,IAAI,QAAQ,EAAE;QAC1C,OAAO,EAAE,IAAI,EAAE,OAAO;QACtB,QAAQ,EAAE,IAAI,EAAE,QAAQ;QACxB,iBAAiB,EAAE,IAAI,EAAE,iBAAiB;KAC3C,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAgB;IAC1C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACvB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,QAAoC,CAAC;AACtD,CAAC;AAED,SAAS,2BAA2B,CAClC,OAAgB;IAEhB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACvB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,iBAAyD,CAAC;AAC3E,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { AzureBlobMount, BoxMount, Dir, DockerVolumeMountStrategy, File, GCSMount, GitRepo, InContainerMountStrategy, LocalBindMountStrategy, LocalDir, LocalFile, Mount, MountPattern, R2Mount, S3FilesMount, S3Mount } from './types';
2
+ export declare function dir(args?: Omit<Dir, 'type'>): Dir;
3
+ export declare function file(args: Omit<File, 'type'>): File;
4
+ export declare function localFile(args: Omit<LocalFile, 'type'>): LocalFile;
5
+ export declare function localDir(args: Omit<LocalDir, 'type'>): LocalDir;
6
+ export declare function gitRepo(args: Omit<GitRepo, 'type'>): GitRepo;
7
+ export declare function mount(args?: Omit<Mount, 'type'>): Mount;
8
+ export declare function s3Mount(args: Omit<S3Mount, 'type'>): S3Mount;
9
+ export declare function gcsMount(args: Omit<GCSMount, 'type'>): GCSMount;
10
+ export declare function r2Mount(args: Omit<R2Mount, 'type'>): R2Mount;
11
+ export declare function azureBlobMount(args: Omit<AzureBlobMount, 'type'>): AzureBlobMount;
12
+ export declare function boxMount(args?: Omit<BoxMount, 'type'>): BoxMount;
13
+ export declare function s3FilesMount(args: Omit<S3FilesMount, 'type'>): S3FilesMount;
14
+ export declare function inContainerMountStrategy(args?: Omit<InContainerMountStrategy, 'type'>): InContainerMountStrategy;
15
+ export declare function dockerVolumeMountStrategy(args?: Omit<DockerVolumeMountStrategy, 'type'>): DockerVolumeMountStrategy;
16
+ export declare function localBindMountStrategy(args?: Omit<LocalBindMountStrategy, 'type'>): LocalBindMountStrategy;
17
+ export declare function mountPattern<T extends MountPattern>(args: T): T;
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dir = dir;
4
+ exports.file = file;
5
+ exports.localFile = localFile;
6
+ exports.localDir = localDir;
7
+ exports.gitRepo = gitRepo;
8
+ exports.mount = mount;
9
+ exports.s3Mount = s3Mount;
10
+ exports.gcsMount = gcsMount;
11
+ exports.r2Mount = r2Mount;
12
+ exports.azureBlobMount = azureBlobMount;
13
+ exports.boxMount = boxMount;
14
+ exports.s3FilesMount = s3FilesMount;
15
+ exports.inContainerMountStrategy = inContainerMountStrategy;
16
+ exports.dockerVolumeMountStrategy = dockerVolumeMountStrategy;
17
+ exports.localBindMountStrategy = localBindMountStrategy;
18
+ exports.mountPattern = mountPattern;
19
+ function dir(args = {}) {
20
+ return {
21
+ type: 'dir',
22
+ ...args,
23
+ };
24
+ }
25
+ function file(args) {
26
+ return {
27
+ type: 'file',
28
+ ...args,
29
+ };
30
+ }
31
+ function localFile(args) {
32
+ return {
33
+ type: 'local_file',
34
+ ...args,
35
+ };
36
+ }
37
+ function localDir(args) {
38
+ return {
39
+ type: 'local_dir',
40
+ ...args,
41
+ };
42
+ }
43
+ function gitRepo(args) {
44
+ return {
45
+ type: 'git_repo',
46
+ ...args,
47
+ };
48
+ }
49
+ function mount(args = {}) {
50
+ return {
51
+ type: 'mount',
52
+ ...args,
53
+ };
54
+ }
55
+ function s3Mount(args) {
56
+ return {
57
+ type: 's3_mount',
58
+ ...args,
59
+ };
60
+ }
61
+ function gcsMount(args) {
62
+ return {
63
+ type: 'gcs_mount',
64
+ ...args,
65
+ };
66
+ }
67
+ function r2Mount(args) {
68
+ return {
69
+ type: 'r2_mount',
70
+ ...args,
71
+ };
72
+ }
73
+ function azureBlobMount(args) {
74
+ return {
75
+ type: 'azure_blob_mount',
76
+ ...args,
77
+ };
78
+ }
79
+ function boxMount(args = {}) {
80
+ return {
81
+ type: 'box_mount',
82
+ ...args,
83
+ };
84
+ }
85
+ function s3FilesMount(args) {
86
+ return {
87
+ type: 's3_files_mount',
88
+ ...args,
89
+ };
90
+ }
91
+ function inContainerMountStrategy(args = {}) {
92
+ return {
93
+ type: 'in_container',
94
+ ...args,
95
+ };
96
+ }
97
+ function dockerVolumeMountStrategy(args = {}) {
98
+ return {
99
+ type: 'docker_volume',
100
+ ...args,
101
+ };
102
+ }
103
+ function localBindMountStrategy(args = {}) {
104
+ return {
105
+ type: 'local_bind',
106
+ ...args,
107
+ };
108
+ }
109
+ function mountPattern(args) {
110
+ return args;
111
+ }
112
+ //# sourceMappingURL=factories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factories.js","sourceRoot":"","sources":["../../../src/sandbox/entries/factories.ts"],"names":[],"mappings":";;AAmBA,kBAKC;AAED,oBAKC;AAED,8BAKC;AAED,4BAKC;AAED,0BAKC;AAED,sBAKC;AAED,0BAKC;AAED,4BAKC;AAED,0BAKC;AAED,wCAOC;AAED,4BAKC;AAED,oCAKC;AAED,4DAOC;AAED,8DAOC;AAED,wDAOC;AAED,oCAEC;AAnHD,SAAgB,GAAG,CAAC,OAA0B,EAAE;IAC9C,OAAO;QACL,IAAI,EAAE,KAAK;QACX,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,IAAI,CAAC,IAAwB;IAC3C,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,SAAS,CAAC,IAA6B;IACrD,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,QAAQ,CAAC,IAA4B;IACnD,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,OAAO,CAAC,IAA2B;IACjD,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,KAAK,CAAC,OAA4B,EAAE;IAClD,OAAO;QACL,IAAI,EAAE,OAAO;QACb,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,OAAO,CAAC,IAA2B;IACjD,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,GAAG,IAAI;KACG,CAAC;AACf,CAAC;AAED,SAAgB,QAAQ,CAAC,IAA4B;IACnD,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,GAAG,IAAI;KACI,CAAC;AAChB,CAAC;AAED,SAAgB,OAAO,CAAC,IAA2B;IACjD,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,GAAG,IAAI;KACG,CAAC;AACf,CAAC;AAED,SAAgB,cAAc,CAC5B,IAAkC;IAElC,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,GAAG,IAAI;KACU,CAAC;AACtB,CAAC;AAED,SAAgB,QAAQ,CAAC,OAA+B,EAAE;IACxD,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,GAAG,IAAI;KACI,CAAC;AAChB,CAAC;AAED,SAAgB,YAAY,CAAC,IAAgC;IAC3D,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,GAAG,IAAI;KACQ,CAAC;AACpB,CAAC;AAED,SAAgB,wBAAwB,CACtC,OAA+C,EAAE;IAEjD,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,yBAAyB,CACvC,OAAgD,EAAE;IAElD,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,sBAAsB,CACpC,OAA6C,EAAE;IAE/C,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,YAAY,CAAyB,IAAO;IAC1D,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,94 @@
1
+ export function dir(args = {}) {
2
+ return {
3
+ type: 'dir',
4
+ ...args,
5
+ };
6
+ }
7
+ export function file(args) {
8
+ return {
9
+ type: 'file',
10
+ ...args,
11
+ };
12
+ }
13
+ export function localFile(args) {
14
+ return {
15
+ type: 'local_file',
16
+ ...args,
17
+ };
18
+ }
19
+ export function localDir(args) {
20
+ return {
21
+ type: 'local_dir',
22
+ ...args,
23
+ };
24
+ }
25
+ export function gitRepo(args) {
26
+ return {
27
+ type: 'git_repo',
28
+ ...args,
29
+ };
30
+ }
31
+ export function mount(args = {}) {
32
+ return {
33
+ type: 'mount',
34
+ ...args,
35
+ };
36
+ }
37
+ export function s3Mount(args) {
38
+ return {
39
+ type: 's3_mount',
40
+ ...args,
41
+ };
42
+ }
43
+ export function gcsMount(args) {
44
+ return {
45
+ type: 'gcs_mount',
46
+ ...args,
47
+ };
48
+ }
49
+ export function r2Mount(args) {
50
+ return {
51
+ type: 'r2_mount',
52
+ ...args,
53
+ };
54
+ }
55
+ export function azureBlobMount(args) {
56
+ return {
57
+ type: 'azure_blob_mount',
58
+ ...args,
59
+ };
60
+ }
61
+ export function boxMount(args = {}) {
62
+ return {
63
+ type: 'box_mount',
64
+ ...args,
65
+ };
66
+ }
67
+ export function s3FilesMount(args) {
68
+ return {
69
+ type: 's3_files_mount',
70
+ ...args,
71
+ };
72
+ }
73
+ export function inContainerMountStrategy(args = {}) {
74
+ return {
75
+ type: 'in_container',
76
+ ...args,
77
+ };
78
+ }
79
+ export function dockerVolumeMountStrategy(args = {}) {
80
+ return {
81
+ type: 'docker_volume',
82
+ ...args,
83
+ };
84
+ }
85
+ export function localBindMountStrategy(args = {}) {
86
+ return {
87
+ type: 'local_bind',
88
+ ...args,
89
+ };
90
+ }
91
+ export function mountPattern(args) {
92
+ return args;
93
+ }
94
+ //# sourceMappingURL=factories.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factories.mjs","sourceRoot":"","sources":["../../../src/sandbox/entries/factories.ts"],"names":[],"mappings":"AAmBA,MAAM,UAAU,GAAG,CAAC,OAA0B,EAAE;IAC9C,OAAO;QACL,IAAI,EAAE,KAAK;QACX,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,IAAwB;IAC3C,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAA6B;IACrD,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAA4B;IACnD,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAA2B;IACjD,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,OAA4B,EAAE;IAClD,OAAO;QACL,IAAI,EAAE,OAAO;QACb,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAA2B;IACjD,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,GAAG,IAAI;KACG,CAAC;AACf,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAA4B;IACnD,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,GAAG,IAAI;KACI,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAA2B;IACjD,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,GAAG,IAAI;KACG,CAAC;AACf,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,IAAkC;IAElC,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,GAAG,IAAI;KACU,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,OAA+B,EAAE;IACxD,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,GAAG,IAAI;KACI,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAgC;IAC3D,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,GAAG,IAAI;KACQ,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAA+C,EAAE;IAEjD,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,OAAgD,EAAE;IAElD,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,OAA6C,EAAE;IAE/C,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAAyB,IAAO;IAC1D,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Dir, Entry, GitRepo, Mount, TypedMount } from './types';
2
+ export declare function isDir(entry: Entry): entry is Dir;
3
+ export declare function isGitRepo(entry: Entry): entry is GitRepo;
4
+ export declare function isMount(entry: Entry): entry is Mount | TypedMount;
5
+ export declare function isDirectoryLikeEntry(entry: Entry): entry is Dir | GitRepo | Mount | TypedMount;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isDir = isDir;
4
+ exports.isGitRepo = isGitRepo;
5
+ exports.isMount = isMount;
6
+ exports.isDirectoryLikeEntry = isDirectoryLikeEntry;
7
+ function isDir(entry) {
8
+ return entry.type === 'dir';
9
+ }
10
+ function isGitRepo(entry) {
11
+ return entry.type === 'git_repo';
12
+ }
13
+ function isMount(entry) {
14
+ return entry.type === 'mount' || entry.type.endsWith('_mount');
15
+ }
16
+ function isDirectoryLikeEntry(entry) {
17
+ return entry.type === 'dir' || entry.type === 'git_repo' || isMount(entry);
18
+ }
19
+ //# sourceMappingURL=guards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guards.js","sourceRoot":"","sources":["../../../src/sandbox/entries/guards.ts"],"names":[],"mappings":";;AAEA,sBAEC;AAED,8BAEC;AAED,0BAEC;AAED,oDAIC;AAhBD,SAAgB,KAAK,CAAC,KAAY;IAChC,OAAO,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC;AAC9B,CAAC;AAED,SAAgB,SAAS,CAAC,KAAY;IACpC,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;AACnC,CAAC;AAED,SAAgB,OAAO,CAAC,KAAY;IAClC,OAAO,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACjE,CAAC;AAED,SAAgB,oBAAoB,CAClC,KAAY;IAEZ,OAAO,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,13 @@
1
+ export function isDir(entry) {
2
+ return entry.type === 'dir';
3
+ }
4
+ export function isGitRepo(entry) {
5
+ return entry.type === 'git_repo';
6
+ }
7
+ export function isMount(entry) {
8
+ return entry.type === 'mount' || entry.type.endsWith('_mount');
9
+ }
10
+ export function isDirectoryLikeEntry(entry) {
11
+ return entry.type === 'dir' || entry.type === 'git_repo' || isMount(entry);
12
+ }
13
+ //# sourceMappingURL=guards.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guards.mjs","sourceRoot":"","sources":["../../../src/sandbox/entries/guards.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,KAAK,CAAC,KAAY;IAChC,OAAO,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAY;IACpC,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,KAAY;IAClC,OAAO,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,KAAY;IAEZ,OAAO,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { BoxMount, Dir, DockerVolumeMountStrategy, Entry, EntryBase, File, FuseMountPattern, GCSMount, GitRepo, InContainerMountStrategy, LocalBindMountStrategy, LocalDir, LocalFile, Mount, MountPattern, MountProvider, MountpointMountPattern, R2Mount, RcloneMountPattern, S3FilesMount, S3FilesMountPattern, S3Mount, MountStrategy, TypedMount, AzureBlobMount, } from './types';
2
+ export { azureBlobMount, boxMount, dir, dockerVolumeMountStrategy, file, gcsMount, gitRepo, inContainerMountStrategy, localDir, localBindMountStrategy, localFile, mount, mountPattern, r2Mount, s3FilesMount, s3Mount, } from './factories';
3
+ export { isDir, isDirectoryLikeEntry, isGitRepo, isMount } from './guards';
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isMount = exports.isGitRepo = exports.isDirectoryLikeEntry = exports.isDir = exports.s3Mount = exports.s3FilesMount = exports.r2Mount = exports.mountPattern = exports.mount = exports.localFile = exports.localBindMountStrategy = exports.localDir = exports.inContainerMountStrategy = exports.gitRepo = exports.gcsMount = exports.file = exports.dockerVolumeMountStrategy = exports.dir = exports.boxMount = exports.azureBlobMount = void 0;
4
+ var factories_1 = require("./factories.js");
5
+ Object.defineProperty(exports, "azureBlobMount", { enumerable: true, get: function () { return factories_1.azureBlobMount; } });
6
+ Object.defineProperty(exports, "boxMount", { enumerable: true, get: function () { return factories_1.boxMount; } });
7
+ Object.defineProperty(exports, "dir", { enumerable: true, get: function () { return factories_1.dir; } });
8
+ Object.defineProperty(exports, "dockerVolumeMountStrategy", { enumerable: true, get: function () { return factories_1.dockerVolumeMountStrategy; } });
9
+ Object.defineProperty(exports, "file", { enumerable: true, get: function () { return factories_1.file; } });
10
+ Object.defineProperty(exports, "gcsMount", { enumerable: true, get: function () { return factories_1.gcsMount; } });
11
+ Object.defineProperty(exports, "gitRepo", { enumerable: true, get: function () { return factories_1.gitRepo; } });
12
+ Object.defineProperty(exports, "inContainerMountStrategy", { enumerable: true, get: function () { return factories_1.inContainerMountStrategy; } });
13
+ Object.defineProperty(exports, "localDir", { enumerable: true, get: function () { return factories_1.localDir; } });
14
+ Object.defineProperty(exports, "localBindMountStrategy", { enumerable: true, get: function () { return factories_1.localBindMountStrategy; } });
15
+ Object.defineProperty(exports, "localFile", { enumerable: true, get: function () { return factories_1.localFile; } });
16
+ Object.defineProperty(exports, "mount", { enumerable: true, get: function () { return factories_1.mount; } });
17
+ Object.defineProperty(exports, "mountPattern", { enumerable: true, get: function () { return factories_1.mountPattern; } });
18
+ Object.defineProperty(exports, "r2Mount", { enumerable: true, get: function () { return factories_1.r2Mount; } });
19
+ Object.defineProperty(exports, "s3FilesMount", { enumerable: true, get: function () { return factories_1.s3FilesMount; } });
20
+ Object.defineProperty(exports, "s3Mount", { enumerable: true, get: function () { return factories_1.s3Mount; } });
21
+ var guards_1 = require("./guards.js");
22
+ Object.defineProperty(exports, "isDir", { enumerable: true, get: function () { return guards_1.isDir; } });
23
+ Object.defineProperty(exports, "isDirectoryLikeEntry", { enumerable: true, get: function () { return guards_1.isDirectoryLikeEntry; } });
24
+ Object.defineProperty(exports, "isGitRepo", { enumerable: true, get: function () { return guards_1.isGitRepo; } });
25
+ Object.defineProperty(exports, "isMount", { enumerable: true, get: function () { return guards_1.isMount; } });
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sandbox/entries/index.ts"],"names":[],"mappings":";;;AA2BA,4CAiBqB;AAhBnB,2GAAA,cAAc,OAAA;AACd,qGAAA,QAAQ,OAAA;AACR,gGAAA,GAAG,OAAA;AACH,sHAAA,yBAAyB,OAAA;AACzB,iGAAA,IAAI,OAAA;AACJ,qGAAA,QAAQ,OAAA;AACR,oGAAA,OAAO,OAAA;AACP,qHAAA,wBAAwB,OAAA;AACxB,qGAAA,QAAQ,OAAA;AACR,mHAAA,sBAAsB,OAAA;AACtB,sGAAA,SAAS,OAAA;AACT,kGAAA,KAAK,OAAA;AACL,yGAAA,YAAY,OAAA;AACZ,oGAAA,OAAO,OAAA;AACP,yGAAA,YAAY,OAAA;AACZ,oGAAA,OAAO,OAAA;AAET,sCAA2E;AAAlE,+FAAA,KAAK,OAAA;AAAE,8GAAA,oBAAoB,OAAA;AAAE,mGAAA,SAAS,OAAA;AAAE,iGAAA,OAAO,OAAA"}
@@ -0,0 +1,3 @@
1
+ export { azureBlobMount, boxMount, dir, dockerVolumeMountStrategy, file, gcsMount, gitRepo, inContainerMountStrategy, localDir, localBindMountStrategy, localFile, mount, mountPattern, r2Mount, s3FilesMount, s3Mount, } from "./factories.mjs";
2
+ export { isDir, isDirectoryLikeEntry, isGitRepo, isMount } from "./guards.mjs";
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/sandbox/entries/index.ts"],"names":[],"mappings":"OA2BO,EACL,cAAc,EACd,QAAQ,EACR,GAAG,EACH,yBAAyB,EACzB,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,wBAAwB,EACxB,QAAQ,EACR,sBAAsB,EACtB,SAAS,EACT,KAAK,EACL,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,OAAO,GACR;OACM,EAAE,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,OAAO,EAAE"}
@@ -0,0 +1,177 @@
1
+ import type { PermissionsInit, PermissionsValue } from '../permissions';
2
+ import type { SandboxEntryGroup } from '../users';
3
+ export type EntryBase = {
4
+ description?: string;
5
+ ephemeral?: boolean;
6
+ group?: SandboxEntryGroup;
7
+ permissions?: PermissionsInit | PermissionsValue;
8
+ };
9
+ export type Dir = EntryBase & {
10
+ type: 'dir';
11
+ children?: Record<string, Entry>;
12
+ };
13
+ export type File = EntryBase & {
14
+ type: 'file';
15
+ content: string | Uint8Array;
16
+ };
17
+ export type LocalFile = EntryBase & {
18
+ type: 'local_file';
19
+ src: string;
20
+ };
21
+ export type LocalDir = EntryBase & {
22
+ type: 'local_dir';
23
+ src: string;
24
+ };
25
+ export type GitRepo = EntryBase & {
26
+ type: 'git_repo';
27
+ host?: string;
28
+ repo: string;
29
+ ref?: string;
30
+ subpath?: string;
31
+ };
32
+ export type MountPattern = {
33
+ type: string;
34
+ [key: string]: unknown;
35
+ };
36
+ export type RcloneMountPattern = MountPattern & {
37
+ type: 'rclone';
38
+ mode?: 'fuse' | 'nfs' | (string & {});
39
+ remoteName?: string;
40
+ extraArgs?: string[];
41
+ configFilePath?: string;
42
+ remote?: string;
43
+ args?: string[];
44
+ nfsAddr?: string;
45
+ nfsMountOptions?: string[];
46
+ };
47
+ export type FuseMountPattern = MountPattern & {
48
+ type: 'fuse';
49
+ command?: string | string[];
50
+ allowOther?: boolean;
51
+ logType?: string;
52
+ logLevel?: string;
53
+ cacheType?: 'block_cache' | 'file_cache' | (string & {});
54
+ cachePath?: string;
55
+ cacheSizeMb?: number;
56
+ blockCacheBlockSizeMb?: number;
57
+ blockCacheDiskTimeoutSec?: number;
58
+ fileCacheTimeoutSec?: number;
59
+ fileCacheMaxSizeMb?: number;
60
+ attrCacheTimeoutSec?: number;
61
+ entryCacheTimeoutSec?: number;
62
+ negativeEntryCacheTimeoutSec?: number;
63
+ };
64
+ export type MountpointMountPattern = MountPattern & {
65
+ type: 'mountpoint';
66
+ options?: {
67
+ prefix?: string;
68
+ region?: string;
69
+ endpointUrl?: string;
70
+ };
71
+ };
72
+ export type S3FilesMountPattern = MountPattern & {
73
+ type: 's3files';
74
+ options?: {
75
+ mountTargetIp?: string;
76
+ accessPoint?: string;
77
+ region?: string;
78
+ extraOptions?: Record<string, string | null>;
79
+ };
80
+ };
81
+ export type InContainerMountStrategy = {
82
+ type: 'in_container';
83
+ pattern?: MountPattern;
84
+ };
85
+ export type DockerVolumeMountStrategy = {
86
+ type: 'docker_volume';
87
+ driver?: string;
88
+ driverOptions?: Record<string, string>;
89
+ };
90
+ export type LocalBindMountStrategy = {
91
+ type: 'local_bind';
92
+ };
93
+ export type MountStrategy = InContainerMountStrategy | DockerVolumeMountStrategy | LocalBindMountStrategy | {
94
+ type: string;
95
+ [key: string]: unknown;
96
+ };
97
+ export type MountProvider = 's3' | 'gcs' | 'r2' | 'azure_blob' | 'box' | 's3_files' | (string & {});
98
+ export type MountBase = EntryBase & {
99
+ source?: string;
100
+ mountPath?: string;
101
+ readOnly?: boolean;
102
+ mountStrategy?: MountStrategy;
103
+ provider?: MountProvider;
104
+ config?: Record<string, unknown>;
105
+ [key: string]: unknown;
106
+ };
107
+ export type Mount = MountBase & {
108
+ type: 'mount';
109
+ };
110
+ export type S3Mount = MountBase & {
111
+ type: 's3_mount';
112
+ bucket: string;
113
+ prefix?: string;
114
+ region?: string;
115
+ endpointUrl?: string;
116
+ s3Provider?: string;
117
+ accessKeyId?: string;
118
+ secretAccessKey?: string;
119
+ sessionToken?: string;
120
+ };
121
+ export type GCSMount = MountBase & {
122
+ type: 'gcs_mount';
123
+ bucket: string;
124
+ prefix?: string;
125
+ region?: string;
126
+ endpointUrl?: string;
127
+ accessId?: string;
128
+ secretAccessKey?: string;
129
+ serviceAccountCredentials?: string;
130
+ serviceAccountFile?: string;
131
+ accessToken?: string;
132
+ };
133
+ export type R2Mount = MountBase & {
134
+ type: 'r2_mount';
135
+ bucket: string;
136
+ prefix?: string;
137
+ accountId: string;
138
+ customDomain?: string;
139
+ accessKeyId?: string;
140
+ secretAccessKey?: string;
141
+ };
142
+ export type AzureBlobMount = MountBase & {
143
+ type: 'azure_blob_mount';
144
+ container: string;
145
+ prefix?: string;
146
+ account?: string;
147
+ accountName?: string;
148
+ endpoint?: string;
149
+ endpointUrl?: string;
150
+ identityClientId?: string;
151
+ accountKey?: string;
152
+ };
153
+ export type BoxMount = MountBase & {
154
+ type: 'box_mount';
155
+ path?: string;
156
+ clientId?: string;
157
+ clientSecret?: string;
158
+ accessToken?: string;
159
+ token?: string;
160
+ boxConfigFile?: string;
161
+ configCredentials?: string;
162
+ boxSubType?: 'user' | 'enterprise';
163
+ rootFolderId?: string;
164
+ impersonate?: string;
165
+ ownedBy?: string;
166
+ };
167
+ export type S3FilesMount = MountBase & {
168
+ type: 's3_files_mount';
169
+ fileSystemId: string;
170
+ subpath?: string;
171
+ mountTargetIp?: string;
172
+ accessPoint?: string;
173
+ region?: string;
174
+ extraOptions?: Record<string, string | null>;
175
+ };
176
+ export type TypedMount = S3Mount | GCSMount | R2Mount | AzureBlobMount | BoxMount | S3FilesMount;
177
+ export type Entry = Dir | File | LocalFile | LocalDir | GitRepo | Mount | TypedMount;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/sandbox/entries/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../../../src/sandbox/entries/types.ts"],"names":[],"mappings":""}