@agentuity/core 1.0.33 → 1.0.35

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 (1127) hide show
  1. package/dist/index.d.ts +2 -17
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -15
  4. package/dist/index.js.map +1 -1
  5. package/dist/services/adapter.d.ts +57 -22
  6. package/dist/services/adapter.d.ts.map +1 -1
  7. package/dist/services/adapter.js +52 -1
  8. package/dist/services/adapter.js.map +1 -1
  9. package/dist/services/api.d.ts +222 -0
  10. package/dist/services/api.d.ts.map +1 -0
  11. package/dist/services/api.js +662 -0
  12. package/dist/services/api.js.map +1 -0
  13. package/dist/services/apikey/create.d.ts +34 -0
  14. package/dist/services/apikey/create.d.ts.map +1 -0
  15. package/dist/services/apikey/create.js +29 -0
  16. package/dist/services/apikey/create.js.map +1 -0
  17. package/dist/services/apikey/delete.d.ts.map +1 -0
  18. package/dist/services/apikey/delete.js.map +1 -0
  19. package/dist/services/apikey/get.d.ts.map +1 -0
  20. package/dist/services/apikey/get.js.map +1 -0
  21. package/dist/services/apikey/index.d.ts.map +1 -0
  22. package/dist/services/apikey/index.js.map +1 -0
  23. package/dist/services/apikey/list.d.ts +65 -0
  24. package/dist/services/apikey/list.d.ts.map +1 -0
  25. package/dist/services/apikey/list.js +50 -0
  26. package/dist/services/apikey/list.js.map +1 -0
  27. package/dist/services/apikey/util.d.ts.map +1 -0
  28. package/dist/services/apikey/util.js.map +1 -0
  29. package/dist/services/config.d.ts +22 -0
  30. package/dist/services/config.d.ts.map +1 -0
  31. package/dist/services/config.js +55 -0
  32. package/dist/services/config.js.map +1 -0
  33. package/dist/services/db/index.d.ts +6 -0
  34. package/dist/services/db/index.d.ts.map +1 -0
  35. package/dist/services/db/index.js +6 -0
  36. package/dist/services/db/index.js.map +1 -0
  37. package/dist/services/db/logs.d.ts.map +1 -0
  38. package/dist/services/db/logs.js.map +1 -0
  39. package/dist/services/db/query.d.ts +40 -0
  40. package/dist/services/db/query.d.ts.map +1 -0
  41. package/dist/services/db/query.js +55 -0
  42. package/dist/services/db/query.js.map +1 -0
  43. package/dist/services/db/stats.d.ts +146 -0
  44. package/dist/services/db/stats.d.ts.map +1 -0
  45. package/dist/services/db/stats.js +94 -0
  46. package/dist/services/db/stats.js.map +1 -0
  47. package/dist/services/db/tables.d.ts +50 -0
  48. package/dist/services/db/tables.d.ts.map +1 -0
  49. package/dist/services/db/tables.js +64 -0
  50. package/dist/services/db/tables.js.map +1 -0
  51. package/dist/services/db/util.d.ts.map +1 -0
  52. package/dist/services/db/util.js.map +1 -0
  53. package/dist/services/email/index.d.ts +2 -0
  54. package/dist/services/email/index.d.ts.map +1 -0
  55. package/dist/services/email/index.js +2 -0
  56. package/dist/services/email/index.js.map +1 -0
  57. package/dist/services/email/service.d.ts +742 -0
  58. package/dist/services/email/service.d.ts.map +1 -0
  59. package/dist/services/email/service.js +1107 -0
  60. package/dist/services/email/service.js.map +1 -0
  61. package/dist/services/env.d.ts.map +1 -0
  62. package/dist/services/env.js.map +1 -0
  63. package/dist/services/eval/events.d.ts +93 -0
  64. package/dist/services/eval/events.d.ts.map +1 -0
  65. package/dist/services/eval/events.js +24 -0
  66. package/dist/services/eval/events.js.map +1 -0
  67. package/dist/services/eval/get.d.ts.map +1 -0
  68. package/dist/services/eval/get.js.map +1 -0
  69. package/dist/services/eval/index.d.ts +6 -0
  70. package/dist/services/eval/index.d.ts.map +1 -0
  71. package/dist/services/eval/index.js +6 -0
  72. package/dist/services/eval/index.js.map +1 -0
  73. package/dist/services/eval/list.d.ts.map +1 -0
  74. package/dist/services/eval/list.js.map +1 -0
  75. package/dist/services/eval/run-get.d.ts.map +1 -0
  76. package/dist/services/eval/run-get.js.map +1 -0
  77. package/dist/services/eval/run-list.d.ts.map +1 -0
  78. package/dist/services/eval/run-list.js.map +1 -0
  79. package/dist/services/exception.d.ts +28 -9
  80. package/dist/services/exception.d.ts.map +1 -1
  81. package/dist/services/exception.js +14 -0
  82. package/dist/services/exception.js.map +1 -1
  83. package/dist/services/index.d.ts +26 -12
  84. package/dist/services/index.d.ts.map +1 -1
  85. package/dist/services/index.js +26 -11
  86. package/dist/services/index.js.map +1 -1
  87. package/dist/services/keyvalue/index.d.ts +2 -0
  88. package/dist/services/keyvalue/index.d.ts.map +1 -0
  89. package/dist/services/keyvalue/index.js +2 -0
  90. package/dist/services/keyvalue/index.js.map +1 -0
  91. package/dist/services/keyvalue/service.d.ts +261 -0
  92. package/dist/services/keyvalue/service.d.ts.map +1 -0
  93. package/dist/services/keyvalue/service.js +475 -0
  94. package/dist/services/keyvalue/service.js.map +1 -0
  95. package/dist/services/logger.d.ts.map +1 -0
  96. package/dist/services/logger.js.map +1 -0
  97. package/dist/services/machine/index.d.ts.map +1 -0
  98. package/dist/services/machine/index.js.map +1 -0
  99. package/dist/services/machine/machine.d.ts.map +1 -0
  100. package/dist/services/machine/machine.js +177 -0
  101. package/dist/services/machine/machine.js.map +1 -0
  102. package/dist/services/machine/util.d.ts.map +1 -0
  103. package/dist/services/machine/util.js.map +1 -0
  104. package/dist/services/org/env-delete.d.ts.map +1 -0
  105. package/dist/services/org/env-delete.js.map +1 -0
  106. package/dist/services/org/env-get.d.ts +33 -0
  107. package/dist/services/org/env-get.d.ts.map +1 -0
  108. package/dist/services/org/env-get.js +33 -0
  109. package/dist/services/org/env-get.js.map +1 -0
  110. package/dist/services/org/env-update.d.ts.map +1 -0
  111. package/dist/services/org/env-update.js.map +1 -0
  112. package/dist/services/org/index.d.ts.map +1 -0
  113. package/dist/services/org/index.js.map +1 -0
  114. package/dist/services/org/list.d.ts.map +1 -0
  115. package/dist/services/org/list.js.map +1 -0
  116. package/dist/services/org/resources.d.ts +150 -0
  117. package/dist/services/org/resources.d.ts.map +1 -0
  118. package/dist/services/org/resources.js +111 -0
  119. package/dist/services/org/resources.js.map +1 -0
  120. package/dist/services/org/util.d.ts.map +1 -0
  121. package/dist/services/org/util.js.map +1 -0
  122. package/dist/services/pagination.d.ts +38 -11
  123. package/dist/services/pagination.d.ts.map +1 -1
  124. package/dist/services/pagination.js +30 -1
  125. package/dist/services/pagination.js.map +1 -1
  126. package/dist/services/project/agent.d.ts.map +1 -0
  127. package/dist/services/project/agent.js.map +1 -0
  128. package/dist/services/project/create.d.ts.map +1 -0
  129. package/dist/services/project/create.js.map +1 -0
  130. package/dist/services/project/delete.d.ts.map +1 -0
  131. package/dist/services/project/delete.js +15 -0
  132. package/dist/services/project/delete.js.map +1 -0
  133. package/dist/services/project/deploy.d.ts +468 -0
  134. package/dist/services/project/deploy.d.ts.map +1 -0
  135. package/dist/services/project/deploy.js.map +1 -0
  136. package/dist/services/project/deployment.d.ts.map +1 -0
  137. package/dist/services/project/deployment.js +180 -0
  138. package/dist/services/project/deployment.js.map +1 -0
  139. package/dist/services/project/env-delete.d.ts.map +1 -0
  140. package/dist/services/project/env-delete.js.map +1 -0
  141. package/dist/services/project/env-update.d.ts.map +1 -0
  142. package/dist/services/project/env-update.js.map +1 -0
  143. package/dist/services/project/exists.d.ts.map +1 -0
  144. package/dist/services/project/exists.js.map +1 -0
  145. package/dist/services/project/get.d.ts.map +1 -0
  146. package/dist/services/project/get.js.map +1 -0
  147. package/dist/services/project/hostname.d.ts.map +1 -0
  148. package/dist/services/project/hostname.js +43 -0
  149. package/dist/services/project/hostname.js.map +1 -0
  150. package/dist/services/project/index.d.ts.map +1 -0
  151. package/dist/services/project/index.js.map +1 -0
  152. package/dist/services/project/list.d.ts.map +1 -0
  153. package/dist/services/project/list.js.map +1 -0
  154. package/dist/services/project/malware.d.ts.map +1 -0
  155. package/dist/services/project/malware.js +57 -0
  156. package/dist/services/project/malware.js.map +1 -0
  157. package/dist/services/project/update-region.d.ts.map +1 -0
  158. package/dist/services/project/update-region.js.map +1 -0
  159. package/dist/services/project/util.d.ts.map +1 -0
  160. package/dist/services/project/util.js.map +1 -0
  161. package/dist/services/queue/analytics.d.ts +261 -0
  162. package/dist/services/queue/analytics.d.ts.map +1 -0
  163. package/dist/services/queue/analytics.js +254 -0
  164. package/dist/services/queue/analytics.js.map +1 -0
  165. package/dist/services/queue/consumers.d.ts +48 -0
  166. package/dist/services/queue/consumers.d.ts.map +1 -0
  167. package/dist/services/queue/consumers.js +43 -0
  168. package/dist/services/queue/consumers.js.map +1 -0
  169. package/dist/services/queue/destinations.d.ts +269 -0
  170. package/dist/services/queue/destinations.d.ts.map +1 -0
  171. package/dist/services/queue/destinations.js +215 -0
  172. package/dist/services/queue/destinations.js.map +1 -0
  173. package/dist/services/queue/dlq.d.ts +170 -0
  174. package/dist/services/queue/dlq.d.ts.map +1 -0
  175. package/dist/services/queue/dlq.js.map +1 -0
  176. package/dist/services/queue/index.d.ts +58 -0
  177. package/dist/services/queue/index.d.ts.map +1 -0
  178. package/dist/services/queue/index.js +98 -0
  179. package/dist/services/queue/index.js.map +1 -0
  180. package/dist/services/queue/messages.d.ts +511 -0
  181. package/dist/services/queue/messages.d.ts.map +1 -0
  182. package/dist/services/queue/messages.js.map +1 -0
  183. package/dist/services/queue/queues.d.ts +228 -0
  184. package/dist/services/queue/queues.d.ts.map +1 -0
  185. package/dist/services/queue/queues.js.map +1 -0
  186. package/dist/services/queue/service.d.ts +309 -0
  187. package/dist/services/queue/service.d.ts.map +1 -0
  188. package/dist/services/queue/service.js +456 -0
  189. package/dist/services/queue/service.js.map +1 -0
  190. package/dist/services/queue/sources.d.ts +252 -0
  191. package/dist/services/queue/sources.d.ts.map +1 -0
  192. package/dist/services/queue/sources.js +249 -0
  193. package/dist/services/queue/sources.js.map +1 -0
  194. package/dist/services/queue/types.d.ts +1335 -0
  195. package/dist/services/queue/types.d.ts.map +1 -0
  196. package/dist/services/queue/types.js +1382 -0
  197. package/dist/services/queue/types.js.map +1 -0
  198. package/dist/services/queue/util.d.ts +278 -0
  199. package/dist/services/queue/util.d.ts.map +1 -0
  200. package/dist/services/queue/util.js +233 -0
  201. package/dist/services/queue/util.js.map +1 -0
  202. package/dist/services/queue/validation.d.ts +218 -0
  203. package/dist/services/queue/validation.d.ts.map +1 -0
  204. package/dist/services/queue/validation.js +498 -0
  205. package/dist/services/queue/validation.js.map +1 -0
  206. package/dist/services/queue/websocket.d.ts +154 -0
  207. package/dist/services/queue/websocket.d.ts.map +1 -0
  208. package/dist/services/queue/websocket.js +491 -0
  209. package/dist/services/queue/websocket.js.map +1 -0
  210. package/dist/services/region/create.d.ts.map +1 -0
  211. package/dist/services/region/create.js.map +1 -0
  212. package/dist/services/region/delete.d.ts.map +1 -0
  213. package/dist/services/region/delete.js.map +1 -0
  214. package/dist/services/region/index.d.ts.map +1 -0
  215. package/dist/services/region/index.js.map +1 -0
  216. package/dist/services/region/list.d.ts.map +1 -0
  217. package/dist/services/region/list.js.map +1 -0
  218. package/dist/services/region/resources.d.ts.map +1 -0
  219. package/dist/services/region/resources.js.map +1 -0
  220. package/dist/services/region/util.d.ts.map +1 -0
  221. package/dist/services/region/util.js.map +1 -0
  222. package/dist/services/sandbox/cli-list.d.ts +103 -0
  223. package/dist/services/sandbox/cli-list.d.ts.map +1 -0
  224. package/dist/services/sandbox/cli-list.js +106 -0
  225. package/dist/services/sandbox/cli-list.js.map +1 -0
  226. package/dist/services/sandbox/client.d.ts +173 -0
  227. package/dist/services/sandbox/client.d.ts.map +1 -0
  228. package/dist/services/sandbox/client.js +302 -0
  229. package/dist/services/sandbox/client.js.map +1 -0
  230. package/dist/services/sandbox/create.d.ts +193 -0
  231. package/dist/services/sandbox/create.d.ts.map +1 -0
  232. package/dist/services/sandbox/create.js +215 -0
  233. package/dist/services/sandbox/create.js.map +1 -0
  234. package/dist/services/sandbox/destroy.d.ts +23 -0
  235. package/dist/services/sandbox/destroy.d.ts.map +1 -0
  236. package/dist/services/sandbox/destroy.js +30 -0
  237. package/dist/services/sandbox/destroy.js.map +1 -0
  238. package/dist/services/sandbox/disk-checkpoint.d.ts +108 -0
  239. package/dist/services/sandbox/disk-checkpoint.d.ts.map +1 -0
  240. package/dist/services/sandbox/disk-checkpoint.js +124 -0
  241. package/dist/services/sandbox/disk-checkpoint.js.map +1 -0
  242. package/dist/services/sandbox/execute.d.ts +96 -0
  243. package/dist/services/sandbox/execute.d.ts.map +1 -0
  244. package/dist/services/sandbox/execute.js +109 -0
  245. package/dist/services/sandbox/execute.js.map +1 -0
  246. package/dist/services/sandbox/execution.d.ts +145 -0
  247. package/dist/services/sandbox/execution.d.ts.map +1 -0
  248. package/dist/services/sandbox/execution.js +113 -0
  249. package/dist/services/sandbox/execution.js.map +1 -0
  250. package/dist/services/sandbox/files.d.ts +269 -0
  251. package/dist/services/sandbox/files.d.ts.map +1 -0
  252. package/dist/services/sandbox/files.js +454 -0
  253. package/dist/services/sandbox/files.js.map +1 -0
  254. package/dist/services/sandbox/get.d.ts +284 -0
  255. package/dist/services/sandbox/get.d.ts.map +1 -0
  256. package/dist/services/sandbox/get.js +231 -0
  257. package/dist/services/sandbox/get.js.map +1 -0
  258. package/dist/services/sandbox/getStatus.d.ts +20 -0
  259. package/dist/services/sandbox/getStatus.d.ts.map +1 -0
  260. package/dist/services/sandbox/getStatus.js +36 -0
  261. package/dist/services/sandbox/getStatus.js.map +1 -0
  262. package/dist/services/sandbox/index.d.ts +40 -0
  263. package/dist/services/sandbox/index.d.ts.map +1 -0
  264. package/dist/services/sandbox/index.js +21 -0
  265. package/dist/services/sandbox/index.js.map +1 -0
  266. package/dist/services/sandbox/list.d.ts +327 -0
  267. package/dist/services/sandbox/list.d.ts.map +1 -0
  268. package/dist/services/sandbox/list.js +204 -0
  269. package/dist/services/sandbox/list.js.map +1 -0
  270. package/dist/services/sandbox/pause.d.ts +23 -0
  271. package/dist/services/sandbox/pause.d.ts.map +1 -0
  272. package/dist/services/sandbox/pause.js +30 -0
  273. package/dist/services/sandbox/pause.js.map +1 -0
  274. package/dist/services/sandbox/resolve.d.ts +75 -0
  275. package/dist/services/sandbox/resolve.d.ts.map +1 -0
  276. package/dist/services/sandbox/resolve.js +76 -0
  277. package/dist/services/sandbox/resolve.js.map +1 -0
  278. package/dist/services/sandbox/resume.d.ts +23 -0
  279. package/dist/services/sandbox/resume.d.ts.map +1 -0
  280. package/dist/services/sandbox/resume.js +30 -0
  281. package/dist/services/sandbox/resume.js.map +1 -0
  282. package/dist/services/sandbox/run.d.ts +71 -0
  283. package/dist/services/sandbox/run.d.ts.map +1 -0
  284. package/dist/services/sandbox/run.js +355 -0
  285. package/dist/services/sandbox/run.js.map +1 -0
  286. package/dist/services/sandbox/runtime.d.ts +94 -0
  287. package/dist/services/sandbox/runtime.d.ts.map +1 -0
  288. package/dist/services/sandbox/runtime.js +82 -0
  289. package/dist/services/sandbox/runtime.js.map +1 -0
  290. package/dist/services/sandbox/snapshot-build.d.ts.map +1 -0
  291. package/dist/services/sandbox/snapshot-build.js.map +1 -0
  292. package/dist/services/sandbox/snapshot.d.ts +596 -0
  293. package/dist/services/sandbox/snapshot.d.ts.map +1 -0
  294. package/dist/services/sandbox/snapshot.js +612 -0
  295. package/dist/services/sandbox/snapshot.js.map +1 -0
  296. package/dist/services/sandbox/types.d.ts +851 -0
  297. package/dist/services/sandbox/types.d.ts.map +1 -0
  298. package/dist/services/sandbox/types.js +674 -0
  299. package/dist/services/sandbox/types.js.map +1 -0
  300. package/dist/services/sandbox/util.d.ts +295 -0
  301. package/dist/services/sandbox/util.d.ts.map +1 -0
  302. package/dist/services/sandbox/util.js +233 -0
  303. package/dist/services/sandbox/util.js.map +1 -0
  304. package/dist/services/schedule/index.d.ts +2 -0
  305. package/dist/services/schedule/index.d.ts.map +1 -0
  306. package/dist/services/schedule/index.js +2 -0
  307. package/dist/services/schedule/index.js.map +1 -0
  308. package/dist/services/schedule/service.d.ts +439 -0
  309. package/dist/services/schedule/service.d.ts.map +1 -0
  310. package/dist/services/schedule/service.js +701 -0
  311. package/dist/services/schedule/service.js.map +1 -0
  312. package/dist/services/session/events.d.ts +127 -0
  313. package/dist/services/session/events.d.ts.map +1 -0
  314. package/dist/services/session/events.js +42 -0
  315. package/dist/services/session/events.js.map +1 -0
  316. package/dist/services/session/get.d.ts +170 -0
  317. package/dist/services/session/get.d.ts.map +1 -0
  318. package/dist/services/session/get.js.map +1 -0
  319. package/dist/services/session/index.d.ts +5 -0
  320. package/dist/services/session/index.d.ts.map +1 -0
  321. package/dist/services/session/index.js +5 -0
  322. package/dist/services/session/index.js.map +1 -0
  323. package/dist/services/session/list.d.ts +150 -0
  324. package/dist/services/session/list.d.ts.map +1 -0
  325. package/dist/services/session/list.js +117 -0
  326. package/dist/services/session/list.js.map +1 -0
  327. package/dist/services/session/logs.d.ts.map +1 -0
  328. package/dist/services/session/logs.js.map +1 -0
  329. package/dist/services/session/util.d.ts.map +1 -0
  330. package/dist/services/session/util.js.map +1 -0
  331. package/dist/services/stats.d.ts +261 -0
  332. package/dist/services/stats.d.ts.map +1 -0
  333. package/dist/services/stats.js +181 -0
  334. package/dist/services/stats.js.map +1 -0
  335. package/dist/services/storage/config.d.ts.map +1 -0
  336. package/dist/services/storage/config.js.map +1 -0
  337. package/dist/services/storage/index.d.ts.map +1 -0
  338. package/dist/services/storage/index.js.map +1 -0
  339. package/dist/services/storage/objects.d.ts +158 -0
  340. package/dist/services/storage/objects.d.ts.map +1 -0
  341. package/dist/services/storage/objects.js +161 -0
  342. package/dist/services/storage/objects.js.map +1 -0
  343. package/dist/services/storage/types.d.ts.map +1 -0
  344. package/dist/services/storage/types.js.map +1 -0
  345. package/dist/services/storage/util.d.ts.map +1 -0
  346. package/dist/services/storage/util.js.map +1 -0
  347. package/dist/services/stream/get.d.ts.map +1 -0
  348. package/dist/services/stream/get.js.map +1 -0
  349. package/dist/services/stream/index.d.ts +5 -0
  350. package/dist/services/stream/index.d.ts.map +1 -0
  351. package/dist/services/stream/index.js +5 -0
  352. package/dist/services/stream/index.js.map +1 -0
  353. package/dist/services/stream/list.d.ts +96 -0
  354. package/dist/services/stream/list.d.ts.map +1 -0
  355. package/dist/services/stream/list.js +92 -0
  356. package/dist/services/stream/list.js.map +1 -0
  357. package/dist/services/stream/service.d.ts +264 -0
  358. package/dist/services/stream/service.d.ts.map +1 -0
  359. package/dist/services/stream/service.js +631 -0
  360. package/dist/services/stream/service.js.map +1 -0
  361. package/dist/services/stream/util.d.ts.map +1 -0
  362. package/dist/services/stream/util.js.map +1 -0
  363. package/dist/services/task/index.d.ts +2 -0
  364. package/dist/services/task/index.d.ts.map +1 -0
  365. package/dist/services/task/index.js +2 -0
  366. package/dist/services/task/index.js.map +1 -0
  367. package/dist/services/task/service.d.ts +1491 -0
  368. package/dist/services/task/service.d.ts.map +1 -0
  369. package/dist/services/task/service.js +1887 -0
  370. package/dist/services/task/service.js.map +1 -0
  371. package/dist/services/thread/delete.d.ts.map +1 -0
  372. package/dist/services/thread/delete.js.map +1 -0
  373. package/dist/services/thread/get.d.ts.map +1 -0
  374. package/dist/services/thread/get.js.map +1 -0
  375. package/dist/services/thread/index.d.ts.map +1 -0
  376. package/dist/services/thread/index.js.map +1 -0
  377. package/dist/services/thread/list.d.ts +75 -0
  378. package/dist/services/thread/list.d.ts.map +1 -0
  379. package/dist/services/thread/list.js +65 -0
  380. package/dist/services/thread/list.js.map +1 -0
  381. package/dist/services/thread/util.d.ts.map +1 -0
  382. package/dist/services/thread/util.js.map +1 -0
  383. package/dist/services/user/index.d.ts.map +1 -0
  384. package/dist/services/user/index.js.map +1 -0
  385. package/dist/services/user/util.d.ts.map +1 -0
  386. package/dist/services/user/util.js.map +1 -0
  387. package/dist/services/user/whoami.d.ts.map +1 -0
  388. package/dist/services/user/whoami.js.map +1 -0
  389. package/dist/services/vector/index.d.ts +2 -0
  390. package/dist/services/vector/index.d.ts.map +1 -0
  391. package/dist/services/vector/index.js +2 -0
  392. package/dist/services/vector/index.js.map +1 -0
  393. package/dist/services/vector/service.d.ts +459 -0
  394. package/dist/services/vector/service.d.ts.map +1 -0
  395. package/dist/services/vector/service.js +707 -0
  396. package/dist/services/vector/service.js.map +1 -0
  397. package/dist/services/webhook/analytics.d.ts +77 -0
  398. package/dist/services/webhook/analytics.d.ts.map +1 -0
  399. package/dist/services/webhook/analytics.js +56 -0
  400. package/dist/services/webhook/analytics.js.map +1 -0
  401. package/dist/services/webhook/deliveries.d.ts +94 -0
  402. package/dist/services/webhook/deliveries.d.ts.map +1 -0
  403. package/dist/services/webhook/deliveries.js.map +1 -0
  404. package/dist/services/webhook/destinations.d.ts +140 -0
  405. package/dist/services/webhook/destinations.d.ts.map +1 -0
  406. package/dist/services/webhook/destinations.js.map +1 -0
  407. package/dist/services/webhook/index.d.ts +43 -0
  408. package/dist/services/webhook/index.d.ts.map +1 -0
  409. package/dist/services/webhook/index.js +64 -0
  410. package/dist/services/webhook/index.js.map +1 -0
  411. package/dist/services/webhook/receipts.d.ts.map +1 -0
  412. package/dist/services/webhook/receipts.js.map +1 -0
  413. package/dist/services/webhook/service.d.ts +374 -0
  414. package/dist/services/webhook/service.d.ts.map +1 -0
  415. package/dist/services/webhook/service.js +663 -0
  416. package/dist/services/webhook/service.js.map +1 -0
  417. package/dist/services/webhook/types.d.ts +182 -0
  418. package/dist/services/webhook/types.d.ts.map +1 -0
  419. package/dist/services/webhook/types.js +188 -0
  420. package/dist/services/webhook/types.js.map +1 -0
  421. package/dist/services/webhook/util.d.ts.map +1 -0
  422. package/dist/services/webhook/util.js.map +1 -0
  423. package/dist/services/webhook/webhooks.d.ts +150 -0
  424. package/dist/services/webhook/webhooks.d.ts.map +1 -0
  425. package/dist/services/webhook/webhooks.js.map +1 -0
  426. package/package.json +59 -7
  427. package/src/index.ts +6 -247
  428. package/src/services/adapter.ts +69 -24
  429. package/src/services/api.ts +951 -0
  430. package/src/services/apikey/create.ts +48 -0
  431. package/src/services/apikey/list.ts +66 -0
  432. package/src/services/config.ts +65 -0
  433. package/src/services/db/index.ts +42 -0
  434. package/src/services/db/query.ts +69 -0
  435. package/src/services/db/stats.ts +121 -0
  436. package/src/services/db/tables.ts +94 -0
  437. package/src/services/email/index.ts +1 -0
  438. package/src/services/email/service.ts +1476 -0
  439. package/src/services/eval/index.ts +29 -0
  440. package/src/services/exception.ts +16 -7
  441. package/src/services/index.ts +29 -28
  442. package/src/services/keyvalue/index.ts +1 -0
  443. package/src/services/keyvalue/service.ts +677 -0
  444. package/src/services/machine/machine.ts +228 -0
  445. package/src/services/org/env-get.ts +48 -0
  446. package/src/services/org/resources.ts +140 -0
  447. package/src/services/pagination.ts +40 -11
  448. package/src/services/project/delete.ts +27 -0
  449. package/src/services/project/deploy.ts +433 -0
  450. package/src/services/project/deployment.ts +250 -0
  451. package/src/services/project/hostname.ts +79 -0
  452. package/src/services/project/malware.ts +85 -0
  453. package/src/services/queue/analytics.ts +343 -0
  454. package/src/services/queue/consumers.ts +56 -0
  455. package/src/services/queue/destinations.ts +329 -0
  456. package/src/services/queue/index.ts +339 -0
  457. package/src/services/queue/service.ts +634 -0
  458. package/src/services/queue/sources.ts +364 -0
  459. package/src/services/queue/types.ts +1666 -0
  460. package/src/services/queue/util.ts +275 -0
  461. package/src/services/queue/validation.ts +541 -0
  462. package/src/services/queue/websocket.ts +578 -0
  463. package/src/services/sandbox/cli-list.ts +117 -0
  464. package/src/services/sandbox/client.ts +435 -0
  465. package/src/services/sandbox/create.ts +249 -0
  466. package/src/services/sandbox/destroy.ts +43 -0
  467. package/src/services/sandbox/disk-checkpoint.ts +184 -0
  468. package/src/services/sandbox/execute.ts +134 -0
  469. package/src/services/sandbox/execution.ts +144 -0
  470. package/src/services/sandbox/files.ts +608 -0
  471. package/src/services/sandbox/get.ts +262 -0
  472. package/src/services/sandbox/getStatus.ts +51 -0
  473. package/src/services/sandbox/index.ts +230 -0
  474. package/src/services/sandbox/list.ts +234 -0
  475. package/src/services/sandbox/pause.ts +41 -0
  476. package/src/services/sandbox/resolve.ts +96 -0
  477. package/src/services/sandbox/resume.ts +41 -0
  478. package/src/services/sandbox/run.ts +441 -0
  479. package/src/services/sandbox/runtime.ts +106 -0
  480. package/src/services/sandbox/snapshot.ts +791 -0
  481. package/src/services/sandbox/types.ts +798 -0
  482. package/src/services/sandbox/util.ts +279 -0
  483. package/src/services/schedule/index.ts +1 -0
  484. package/src/services/schedule/service.ts +814 -0
  485. package/src/services/session/get.ts +108 -0
  486. package/src/services/session/index.ts +4 -0
  487. package/src/services/session/list.ts +143 -0
  488. package/src/services/stats.ts +232 -0
  489. package/src/services/storage/objects.ts +256 -0
  490. package/src/services/stream/index.ts +14 -0
  491. package/src/services/stream/list.ts +105 -0
  492. package/src/services/stream/service.ts +929 -0
  493. package/src/services/task/index.ts +1 -0
  494. package/src/services/task/service.ts +2573 -0
  495. package/src/services/thread/list.ts +81 -0
  496. package/src/services/vector/index.ts +1 -0
  497. package/src/services/vector/service.ts +1242 -0
  498. package/src/services/webhook/analytics.ts +80 -0
  499. package/src/services/webhook/index.ts +160 -0
  500. package/src/services/webhook/service.ts +900 -0
  501. package/src/services/webhook/types.ts +277 -0
  502. package/dist/api/api.d.ts +0 -226
  503. package/dist/api/api.d.ts.map +0 -1
  504. package/dist/api/api.js +0 -635
  505. package/dist/api/api.js.map +0 -1
  506. package/dist/api/apikey/create.d.ts +0 -33
  507. package/dist/api/apikey/create.d.ts.map +0 -1
  508. package/dist/api/apikey/create.js +0 -23
  509. package/dist/api/apikey/create.js.map +0 -1
  510. package/dist/api/apikey/delete.d.ts.map +0 -1
  511. package/dist/api/apikey/delete.js.map +0 -1
  512. package/dist/api/apikey/get.d.ts.map +0 -1
  513. package/dist/api/apikey/get.js.map +0 -1
  514. package/dist/api/apikey/index.d.ts.map +0 -1
  515. package/dist/api/apikey/index.js.map +0 -1
  516. package/dist/api/apikey/list.d.ts +0 -64
  517. package/dist/api/apikey/list.d.ts.map +0 -1
  518. package/dist/api/apikey/list.js +0 -46
  519. package/dist/api/apikey/list.js.map +0 -1
  520. package/dist/api/apikey/util.d.ts.map +0 -1
  521. package/dist/api/apikey/util.js.map +0 -1
  522. package/dist/api/config.d.ts +0 -20
  523. package/dist/api/config.d.ts.map +0 -1
  524. package/dist/api/config.js +0 -43
  525. package/dist/api/config.js.map +0 -1
  526. package/dist/api/db/index.d.ts +0 -5
  527. package/dist/api/db/index.d.ts.map +0 -1
  528. package/dist/api/db/index.js +0 -5
  529. package/dist/api/db/index.js.map +0 -1
  530. package/dist/api/db/logs.d.ts.map +0 -1
  531. package/dist/api/db/logs.js.map +0 -1
  532. package/dist/api/db/query.d.ts +0 -39
  533. package/dist/api/db/query.d.ts.map +0 -1
  534. package/dist/api/db/query.js +0 -49
  535. package/dist/api/db/query.js.map +0 -1
  536. package/dist/api/db/tables.d.ts +0 -49
  537. package/dist/api/db/tables.d.ts.map +0 -1
  538. package/dist/api/db/tables.js +0 -59
  539. package/dist/api/db/tables.js.map +0 -1
  540. package/dist/api/db/util.d.ts.map +0 -1
  541. package/dist/api/db/util.js.map +0 -1
  542. package/dist/api/env.d.ts.map +0 -1
  543. package/dist/api/env.js.map +0 -1
  544. package/dist/api/eval/get.d.ts.map +0 -1
  545. package/dist/api/eval/get.js.map +0 -1
  546. package/dist/api/eval/index.d.ts +0 -5
  547. package/dist/api/eval/index.d.ts.map +0 -1
  548. package/dist/api/eval/index.js +0 -5
  549. package/dist/api/eval/index.js.map +0 -1
  550. package/dist/api/eval/list.d.ts.map +0 -1
  551. package/dist/api/eval/list.js.map +0 -1
  552. package/dist/api/eval/run-get.d.ts.map +0 -1
  553. package/dist/api/eval/run-get.js.map +0 -1
  554. package/dist/api/eval/run-list.d.ts.map +0 -1
  555. package/dist/api/eval/run-list.js.map +0 -1
  556. package/dist/api/index.d.ts +0 -21
  557. package/dist/api/index.d.ts.map +0 -1
  558. package/dist/api/index.js +0 -21
  559. package/dist/api/index.js.map +0 -1
  560. package/dist/api/logger.d.ts.map +0 -1
  561. package/dist/api/logger.js.map +0 -1
  562. package/dist/api/machine/index.d.ts.map +0 -1
  563. package/dist/api/machine/index.js.map +0 -1
  564. package/dist/api/machine/machine.d.ts.map +0 -1
  565. package/dist/api/machine/machine.js +0 -109
  566. package/dist/api/machine/machine.js.map +0 -1
  567. package/dist/api/machine/util.d.ts.map +0 -1
  568. package/dist/api/machine/util.js.map +0 -1
  569. package/dist/api/org/env-delete.d.ts.map +0 -1
  570. package/dist/api/org/env-delete.js.map +0 -1
  571. package/dist/api/org/env-get.d.ts +0 -33
  572. package/dist/api/org/env-get.d.ts.map +0 -1
  573. package/dist/api/org/env-get.js +0 -26
  574. package/dist/api/org/env-get.js.map +0 -1
  575. package/dist/api/org/env-update.d.ts.map +0 -1
  576. package/dist/api/org/env-update.js.map +0 -1
  577. package/dist/api/org/index.d.ts.map +0 -1
  578. package/dist/api/org/index.js.map +0 -1
  579. package/dist/api/org/list.d.ts.map +0 -1
  580. package/dist/api/org/list.js.map +0 -1
  581. package/dist/api/org/resources.d.ts +0 -141
  582. package/dist/api/org/resources.d.ts.map +0 -1
  583. package/dist/api/org/resources.js +0 -97
  584. package/dist/api/org/resources.js.map +0 -1
  585. package/dist/api/org/util.d.ts.map +0 -1
  586. package/dist/api/org/util.js.map +0 -1
  587. package/dist/api/project/agent.d.ts.map +0 -1
  588. package/dist/api/project/agent.js.map +0 -1
  589. package/dist/api/project/create.d.ts.map +0 -1
  590. package/dist/api/project/create.js.map +0 -1
  591. package/dist/api/project/delete.d.ts.map +0 -1
  592. package/dist/api/project/delete.js +0 -13
  593. package/dist/api/project/delete.js.map +0 -1
  594. package/dist/api/project/deploy.d.ts +0 -490
  595. package/dist/api/project/deploy.d.ts.map +0 -1
  596. package/dist/api/project/deploy.js.map +0 -1
  597. package/dist/api/project/deployment.d.ts.map +0 -1
  598. package/dist/api/project/deployment.js +0 -127
  599. package/dist/api/project/deployment.js.map +0 -1
  600. package/dist/api/project/env-delete.d.ts.map +0 -1
  601. package/dist/api/project/env-delete.js.map +0 -1
  602. package/dist/api/project/env-update.d.ts.map +0 -1
  603. package/dist/api/project/env-update.js.map +0 -1
  604. package/dist/api/project/exists.d.ts.map +0 -1
  605. package/dist/api/project/exists.js.map +0 -1
  606. package/dist/api/project/get.d.ts.map +0 -1
  607. package/dist/api/project/get.js.map +0 -1
  608. package/dist/api/project/hostname.d.ts.map +0 -1
  609. package/dist/api/project/hostname.js +0 -37
  610. package/dist/api/project/hostname.js.map +0 -1
  611. package/dist/api/project/index.d.ts.map +0 -1
  612. package/dist/api/project/index.js.map +0 -1
  613. package/dist/api/project/list.d.ts.map +0 -1
  614. package/dist/api/project/list.js.map +0 -1
  615. package/dist/api/project/malware.d.ts.map +0 -1
  616. package/dist/api/project/malware.js +0 -42
  617. package/dist/api/project/malware.js.map +0 -1
  618. package/dist/api/project/update-region.d.ts.map +0 -1
  619. package/dist/api/project/update-region.js.map +0 -1
  620. package/dist/api/project/util.d.ts.map +0 -1
  621. package/dist/api/project/util.js.map +0 -1
  622. package/dist/api/queue/analytics.d.ts +0 -250
  623. package/dist/api/queue/analytics.d.ts.map +0 -1
  624. package/dist/api/queue/analytics.js +0 -233
  625. package/dist/api/queue/analytics.js.map +0 -1
  626. package/dist/api/queue/destinations.d.ts +0 -202
  627. package/dist/api/queue/destinations.d.ts.map +0 -1
  628. package/dist/api/queue/destinations.js +0 -168
  629. package/dist/api/queue/destinations.js.map +0 -1
  630. package/dist/api/queue/dlq.d.ts +0 -168
  631. package/dist/api/queue/dlq.d.ts.map +0 -1
  632. package/dist/api/queue/dlq.js.map +0 -1
  633. package/dist/api/queue/index.d.ts +0 -56
  634. package/dist/api/queue/index.d.ts.map +0 -1
  635. package/dist/api/queue/index.js +0 -90
  636. package/dist/api/queue/index.js.map +0 -1
  637. package/dist/api/queue/messages.d.ts +0 -503
  638. package/dist/api/queue/messages.d.ts.map +0 -1
  639. package/dist/api/queue/messages.js.map +0 -1
  640. package/dist/api/queue/queues.d.ts +0 -226
  641. package/dist/api/queue/queues.d.ts.map +0 -1
  642. package/dist/api/queue/queues.js.map +0 -1
  643. package/dist/api/queue/sources.d.ts +0 -202
  644. package/dist/api/queue/sources.d.ts.map +0 -1
  645. package/dist/api/queue/sources.js +0 -202
  646. package/dist/api/queue/sources.js.map +0 -1
  647. package/dist/api/queue/types.d.ts +0 -1218
  648. package/dist/api/queue/types.d.ts.map +0 -1
  649. package/dist/api/queue/types.js +0 -1002
  650. package/dist/api/queue/types.js.map +0 -1
  651. package/dist/api/queue/util.d.ts +0 -278
  652. package/dist/api/queue/util.d.ts.map +0 -1
  653. package/dist/api/queue/util.js +0 -233
  654. package/dist/api/queue/util.js.map +0 -1
  655. package/dist/api/queue/validation.d.ts +0 -247
  656. package/dist/api/queue/validation.d.ts.map +0 -1
  657. package/dist/api/queue/validation.js +0 -513
  658. package/dist/api/queue/validation.js.map +0 -1
  659. package/dist/api/queue/websocket.d.ts +0 -172
  660. package/dist/api/queue/websocket.d.ts.map +0 -1
  661. package/dist/api/queue/websocket.js +0 -396
  662. package/dist/api/queue/websocket.js.map +0 -1
  663. package/dist/api/region/create.d.ts.map +0 -1
  664. package/dist/api/region/create.js.map +0 -1
  665. package/dist/api/region/delete.d.ts.map +0 -1
  666. package/dist/api/region/delete.js.map +0 -1
  667. package/dist/api/region/index.d.ts.map +0 -1
  668. package/dist/api/region/index.js.map +0 -1
  669. package/dist/api/region/list.d.ts.map +0 -1
  670. package/dist/api/region/list.js.map +0 -1
  671. package/dist/api/region/resources.d.ts.map +0 -1
  672. package/dist/api/region/resources.js.map +0 -1
  673. package/dist/api/region/util.d.ts.map +0 -1
  674. package/dist/api/region/util.js.map +0 -1
  675. package/dist/api/sandbox/cli-list.d.ts +0 -114
  676. package/dist/api/sandbox/cli-list.d.ts.map +0 -1
  677. package/dist/api/sandbox/cli-list.js +0 -71
  678. package/dist/api/sandbox/cli-list.js.map +0 -1
  679. package/dist/api/sandbox/client.d.ts +0 -192
  680. package/dist/api/sandbox/client.d.ts.map +0 -1
  681. package/dist/api/sandbox/client.js +0 -262
  682. package/dist/api/sandbox/client.js.map +0 -1
  683. package/dist/api/sandbox/create.d.ts +0 -118
  684. package/dist/api/sandbox/create.d.ts.map +0 -1
  685. package/dist/api/sandbox/create.js +0 -211
  686. package/dist/api/sandbox/create.js.map +0 -1
  687. package/dist/api/sandbox/destroy.d.ts +0 -22
  688. package/dist/api/sandbox/destroy.d.ts.map +0 -1
  689. package/dist/api/sandbox/destroy.js +0 -25
  690. package/dist/api/sandbox/destroy.js.map +0 -1
  691. package/dist/api/sandbox/disk-checkpoint.d.ts +0 -104
  692. package/dist/api/sandbox/disk-checkpoint.d.ts.map +0 -1
  693. package/dist/api/sandbox/disk-checkpoint.js +0 -104
  694. package/dist/api/sandbox/disk-checkpoint.js.map +0 -1
  695. package/dist/api/sandbox/execute.d.ts +0 -69
  696. package/dist/api/sandbox/execute.d.ts.map +0 -1
  697. package/dist/api/sandbox/execute.js +0 -103
  698. package/dist/api/sandbox/execute.js.map +0 -1
  699. package/dist/api/sandbox/execution.d.ts +0 -169
  700. package/dist/api/sandbox/execution.d.ts.map +0 -1
  701. package/dist/api/sandbox/execution.js +0 -118
  702. package/dist/api/sandbox/execution.js.map +0 -1
  703. package/dist/api/sandbox/files.d.ts +0 -261
  704. package/dist/api/sandbox/files.d.ts.map +0 -1
  705. package/dist/api/sandbox/files.js +0 -386
  706. package/dist/api/sandbox/files.js.map +0 -1
  707. package/dist/api/sandbox/get.d.ts +0 -283
  708. package/dist/api/sandbox/get.d.ts.map +0 -1
  709. package/dist/api/sandbox/get.js +0 -215
  710. package/dist/api/sandbox/get.js.map +0 -1
  711. package/dist/api/sandbox/getStatus.d.ts +0 -16
  712. package/dist/api/sandbox/getStatus.d.ts.map +0 -1
  713. package/dist/api/sandbox/getStatus.js +0 -32
  714. package/dist/api/sandbox/getStatus.js.map +0 -1
  715. package/dist/api/sandbox/index.d.ts +0 -39
  716. package/dist/api/sandbox/index.d.ts.map +0 -1
  717. package/dist/api/sandbox/index.js +0 -20
  718. package/dist/api/sandbox/index.js.map +0 -1
  719. package/dist/api/sandbox/list.d.ts +0 -293
  720. package/dist/api/sandbox/list.d.ts.map +0 -1
  721. package/dist/api/sandbox/list.js +0 -191
  722. package/dist/api/sandbox/list.js.map +0 -1
  723. package/dist/api/sandbox/pause.d.ts +0 -22
  724. package/dist/api/sandbox/pause.d.ts.map +0 -1
  725. package/dist/api/sandbox/pause.js +0 -25
  726. package/dist/api/sandbox/pause.js.map +0 -1
  727. package/dist/api/sandbox/resolve.d.ts +0 -82
  728. package/dist/api/sandbox/resolve.d.ts.map +0 -1
  729. package/dist/api/sandbox/resolve.js +0 -71
  730. package/dist/api/sandbox/resolve.js.map +0 -1
  731. package/dist/api/sandbox/resume.d.ts +0 -22
  732. package/dist/api/sandbox/resume.d.ts.map +0 -1
  733. package/dist/api/sandbox/resume.js +0 -25
  734. package/dist/api/sandbox/resume.js.map +0 -1
  735. package/dist/api/sandbox/run.d.ts +0 -28
  736. package/dist/api/sandbox/run.d.ts.map +0 -1
  737. package/dist/api/sandbox/run.js +0 -342
  738. package/dist/api/sandbox/run.js.map +0 -1
  739. package/dist/api/sandbox/runtime.d.ts +0 -83
  740. package/dist/api/sandbox/runtime.d.ts.map +0 -1
  741. package/dist/api/sandbox/runtime.js +0 -78
  742. package/dist/api/sandbox/runtime.js.map +0 -1
  743. package/dist/api/sandbox/snapshot-build.d.ts.map +0 -1
  744. package/dist/api/sandbox/snapshot-build.js.map +0 -1
  745. package/dist/api/sandbox/snapshot.d.ts +0 -595
  746. package/dist/api/sandbox/snapshot.d.ts.map +0 -1
  747. package/dist/api/sandbox/snapshot.js +0 -598
  748. package/dist/api/sandbox/snapshot.js.map +0 -1
  749. package/dist/api/sandbox/util.d.ts +0 -284
  750. package/dist/api/sandbox/util.d.ts.map +0 -1
  751. package/dist/api/sandbox/util.js +0 -210
  752. package/dist/api/sandbox/util.js.map +0 -1
  753. package/dist/api/services/index.d.ts +0 -2
  754. package/dist/api/services/index.d.ts.map +0 -1
  755. package/dist/api/services/index.js +0 -2
  756. package/dist/api/services/index.js.map +0 -1
  757. package/dist/api/services/stats.d.ts +0 -263
  758. package/dist/api/services/stats.d.ts.map +0 -1
  759. package/dist/api/services/stats.js +0 -144
  760. package/dist/api/services/stats.js.map +0 -1
  761. package/dist/api/session/get.d.ts +0 -169
  762. package/dist/api/session/get.d.ts.map +0 -1
  763. package/dist/api/session/get.js.map +0 -1
  764. package/dist/api/session/index.d.ts +0 -4
  765. package/dist/api/session/index.d.ts.map +0 -1
  766. package/dist/api/session/index.js +0 -4
  767. package/dist/api/session/index.js.map +0 -1
  768. package/dist/api/session/list.d.ts +0 -143
  769. package/dist/api/session/list.d.ts.map +0 -1
  770. package/dist/api/session/list.js +0 -91
  771. package/dist/api/session/list.js.map +0 -1
  772. package/dist/api/session/logs.d.ts.map +0 -1
  773. package/dist/api/session/logs.js.map +0 -1
  774. package/dist/api/session/util.d.ts.map +0 -1
  775. package/dist/api/session/util.js.map +0 -1
  776. package/dist/api/storage/config.d.ts.map +0 -1
  777. package/dist/api/storage/config.js.map +0 -1
  778. package/dist/api/storage/index.d.ts.map +0 -1
  779. package/dist/api/storage/index.js.map +0 -1
  780. package/dist/api/storage/objects.d.ts +0 -155
  781. package/dist/api/storage/objects.d.ts.map +0 -1
  782. package/dist/api/storage/objects.js +0 -148
  783. package/dist/api/storage/objects.js.map +0 -1
  784. package/dist/api/storage/types.d.ts.map +0 -1
  785. package/dist/api/storage/types.js.map +0 -1
  786. package/dist/api/storage/util.d.ts.map +0 -1
  787. package/dist/api/storage/util.js.map +0 -1
  788. package/dist/api/stream/get.d.ts.map +0 -1
  789. package/dist/api/stream/get.js.map +0 -1
  790. package/dist/api/stream/index.d.ts +0 -4
  791. package/dist/api/stream/index.d.ts.map +0 -1
  792. package/dist/api/stream/index.js +0 -4
  793. package/dist/api/stream/index.js.map +0 -1
  794. package/dist/api/stream/list.d.ts +0 -120
  795. package/dist/api/stream/list.d.ts.map +0 -1
  796. package/dist/api/stream/list.js +0 -77
  797. package/dist/api/stream/list.js.map +0 -1
  798. package/dist/api/stream/util.d.ts.map +0 -1
  799. package/dist/api/stream/util.js.map +0 -1
  800. package/dist/api/thread/delete.d.ts.map +0 -1
  801. package/dist/api/thread/delete.js.map +0 -1
  802. package/dist/api/thread/get.d.ts.map +0 -1
  803. package/dist/api/thread/get.js.map +0 -1
  804. package/dist/api/thread/index.d.ts.map +0 -1
  805. package/dist/api/thread/index.js.map +0 -1
  806. package/dist/api/thread/list.d.ts +0 -69
  807. package/dist/api/thread/list.d.ts.map +0 -1
  808. package/dist/api/thread/list.js +0 -51
  809. package/dist/api/thread/list.js.map +0 -1
  810. package/dist/api/thread/util.d.ts.map +0 -1
  811. package/dist/api/thread/util.js.map +0 -1
  812. package/dist/api/user/index.d.ts.map +0 -1
  813. package/dist/api/user/index.js.map +0 -1
  814. package/dist/api/user/util.d.ts.map +0 -1
  815. package/dist/api/user/util.js.map +0 -1
  816. package/dist/api/user/whoami.d.ts.map +0 -1
  817. package/dist/api/user/whoami.js.map +0 -1
  818. package/dist/api/webhook/deliveries.d.ts +0 -94
  819. package/dist/api/webhook/deliveries.d.ts.map +0 -1
  820. package/dist/api/webhook/deliveries.js.map +0 -1
  821. package/dist/api/webhook/destinations.d.ts +0 -136
  822. package/dist/api/webhook/destinations.d.ts.map +0 -1
  823. package/dist/api/webhook/destinations.js.map +0 -1
  824. package/dist/api/webhook/index.d.ts +0 -41
  825. package/dist/api/webhook/index.d.ts.map +0 -1
  826. package/dist/api/webhook/index.js +0 -59
  827. package/dist/api/webhook/index.js.map +0 -1
  828. package/dist/api/webhook/receipts.d.ts.map +0 -1
  829. package/dist/api/webhook/receipts.js.map +0 -1
  830. package/dist/api/webhook/types.d.ts +0 -249
  831. package/dist/api/webhook/types.d.ts.map +0 -1
  832. package/dist/api/webhook/types.js +0 -221
  833. package/dist/api/webhook/types.js.map +0 -1
  834. package/dist/api/webhook/util.d.ts.map +0 -1
  835. package/dist/api/webhook/util.js.map +0 -1
  836. package/dist/api/webhook/webhooks.d.ts +0 -146
  837. package/dist/api/webhook/webhooks.d.ts.map +0 -1
  838. package/dist/api/webhook/webhooks.js.map +0 -1
  839. package/dist/services/email.d.ts +0 -901
  840. package/dist/services/email.d.ts.map +0 -1
  841. package/dist/services/email.js +0 -722
  842. package/dist/services/email.js.map +0 -1
  843. package/dist/services/evalrun.d.ts +0 -93
  844. package/dist/services/evalrun.d.ts.map +0 -1
  845. package/dist/services/evalrun.js +0 -24
  846. package/dist/services/evalrun.js.map +0 -1
  847. package/dist/services/keyvalue.d.ts +0 -283
  848. package/dist/services/keyvalue.d.ts.map +0 -1
  849. package/dist/services/keyvalue.js +0 -305
  850. package/dist/services/keyvalue.js.map +0 -1
  851. package/dist/services/queue.d.ts +0 -361
  852. package/dist/services/queue.d.ts.map +0 -1
  853. package/dist/services/queue.js +0 -308
  854. package/dist/services/queue.js.map +0 -1
  855. package/dist/services/sandbox.d.ts +0 -1241
  856. package/dist/services/sandbox.d.ts.map +0 -1
  857. package/dist/services/sandbox.js +0 -6
  858. package/dist/services/sandbox.js.map +0 -1
  859. package/dist/services/schedule.d.ts +0 -501
  860. package/dist/services/schedule.d.ts.map +0 -1
  861. package/dist/services/schedule.js +0 -425
  862. package/dist/services/schedule.js.map +0 -1
  863. package/dist/services/session.d.ts +0 -127
  864. package/dist/services/session.d.ts.map +0 -1
  865. package/dist/services/session.js +0 -42
  866. package/dist/services/session.js.map +0 -1
  867. package/dist/services/stream.d.ts +0 -293
  868. package/dist/services/stream.d.ts.map +0 -1
  869. package/dist/services/stream.js +0 -500
  870. package/dist/services/stream.js.map +0 -1
  871. package/dist/services/task.d.ts +0 -1337
  872. package/dist/services/task.d.ts.map +0 -1
  873. package/dist/services/task.js +0 -1397
  874. package/dist/services/task.js.map +0 -1
  875. package/dist/services/vector.d.ts +0 -498
  876. package/dist/services/vector.d.ts.map +0 -1
  877. package/dist/services/vector.js +0 -381
  878. package/dist/services/vector.js.map +0 -1
  879. package/dist/services/webhook.d.ts +0 -454
  880. package/dist/services/webhook.d.ts.map +0 -1
  881. package/dist/services/webhook.js +0 -589
  882. package/dist/services/webhook.js.map +0 -1
  883. package/src/api/api.ts +0 -931
  884. package/src/api/apikey/create.ts +0 -41
  885. package/src/api/apikey/list.ts +0 -64
  886. package/src/api/config.ts +0 -60
  887. package/src/api/db/index.ts +0 -27
  888. package/src/api/db/query.ts +0 -67
  889. package/src/api/db/tables.ts +0 -92
  890. package/src/api/eval/index.ts +0 -28
  891. package/src/api/index.ts +0 -20
  892. package/src/api/machine/machine.ts +0 -160
  893. package/src/api/org/env-get.ts +0 -43
  894. package/src/api/org/resources.ts +0 -140
  895. package/src/api/project/delete.ts +0 -25
  896. package/src/api/project/deploy.ts +0 -458
  897. package/src/api/project/deployment.ts +0 -195
  898. package/src/api/project/hostname.ts +0 -73
  899. package/src/api/project/malware.ts +0 -68
  900. package/src/api/queue/analytics.ts +0 -311
  901. package/src/api/queue/destinations.ts +0 -259
  902. package/src/api/queue/index.ts +0 -308
  903. package/src/api/queue/sources.ts +0 -294
  904. package/src/api/queue/types.ts +0 -1325
  905. package/src/api/queue/util.ts +0 -275
  906. package/src/api/queue/validation.ts +0 -560
  907. package/src/api/queue/websocket.ts +0 -521
  908. package/src/api/sandbox/cli-list.ts +0 -127
  909. package/src/api/sandbox/client.ts +0 -460
  910. package/src/api/sandbox/create.ts +0 -256
  911. package/src/api/sandbox/destroy.ts +0 -41
  912. package/src/api/sandbox/disk-checkpoint.ts +0 -179
  913. package/src/api/sandbox/execute.ts +0 -132
  914. package/src/api/sandbox/execution.ts +0 -183
  915. package/src/api/sandbox/files.ts +0 -596
  916. package/src/api/sandbox/get.ts +0 -249
  917. package/src/api/sandbox/getStatus.ts +0 -54
  918. package/src/api/sandbox/index.ts +0 -211
  919. package/src/api/sandbox/list.ts +0 -224
  920. package/src/api/sandbox/pause.ts +0 -39
  921. package/src/api/sandbox/resolve.ts +0 -98
  922. package/src/api/sandbox/resume.ts +0 -39
  923. package/src/api/sandbox/run.ts +0 -439
  924. package/src/api/sandbox/runtime.ts +0 -104
  925. package/src/api/sandbox/snapshot.ts +0 -781
  926. package/src/api/sandbox/util.ts +0 -275
  927. package/src/api/services/index.ts +0 -1
  928. package/src/api/services/stats.ts +0 -213
  929. package/src/api/session/get.ts +0 -106
  930. package/src/api/session/index.ts +0 -3
  931. package/src/api/session/list.ts +0 -136
  932. package/src/api/storage/objects.ts +0 -250
  933. package/src/api/stream/index.ts +0 -3
  934. package/src/api/stream/list.ts +0 -127
  935. package/src/api/thread/list.ts +0 -76
  936. package/src/api/webhook/index.ts +0 -133
  937. package/src/api/webhook/types.ts +0 -309
  938. package/src/services/email.ts +0 -1410
  939. package/src/services/keyvalue.ts +0 -620
  940. package/src/services/queue.ts +0 -603
  941. package/src/services/sandbox.ts +0 -1466
  942. package/src/services/schedule.ts +0 -763
  943. package/src/services/stream.ts +0 -886
  944. package/src/services/task.ts +0 -2611
  945. package/src/services/vector.ts +0 -1119
  946. package/src/services/webhook.ts +0 -921
  947. /package/dist/{api → services}/apikey/delete.d.ts +0 -0
  948. /package/dist/{api → services}/apikey/delete.js +0 -0
  949. /package/dist/{api → services}/apikey/get.d.ts +0 -0
  950. /package/dist/{api → services}/apikey/get.js +0 -0
  951. /package/dist/{api → services}/apikey/index.d.ts +0 -0
  952. /package/dist/{api → services}/apikey/index.js +0 -0
  953. /package/dist/{api → services}/apikey/util.d.ts +0 -0
  954. /package/dist/{api → services}/apikey/util.js +0 -0
  955. /package/dist/{api → services}/db/logs.d.ts +0 -0
  956. /package/dist/{api → services}/db/logs.js +0 -0
  957. /package/dist/{api → services}/db/util.d.ts +0 -0
  958. /package/dist/{api → services}/db/util.js +0 -0
  959. /package/dist/{api → services}/env.d.ts +0 -0
  960. /package/dist/{api → services}/env.js +0 -0
  961. /package/dist/{api → services}/eval/get.d.ts +0 -0
  962. /package/dist/{api → services}/eval/get.js +0 -0
  963. /package/dist/{api → services}/eval/list.d.ts +0 -0
  964. /package/dist/{api → services}/eval/list.js +0 -0
  965. /package/dist/{api → services}/eval/run-get.d.ts +0 -0
  966. /package/dist/{api → services}/eval/run-get.js +0 -0
  967. /package/dist/{api → services}/eval/run-list.d.ts +0 -0
  968. /package/dist/{api → services}/eval/run-list.js +0 -0
  969. /package/dist/{api → services}/logger.d.ts +0 -0
  970. /package/dist/{api → services}/logger.js +0 -0
  971. /package/dist/{api → services}/machine/index.d.ts +0 -0
  972. /package/dist/{api → services}/machine/index.js +0 -0
  973. /package/dist/{api → services}/machine/machine.d.ts +0 -0
  974. /package/dist/{api → services}/machine/util.d.ts +0 -0
  975. /package/dist/{api → services}/machine/util.js +0 -0
  976. /package/dist/{api → services}/org/env-delete.d.ts +0 -0
  977. /package/dist/{api → services}/org/env-delete.js +0 -0
  978. /package/dist/{api → services}/org/env-update.d.ts +0 -0
  979. /package/dist/{api → services}/org/env-update.js +0 -0
  980. /package/dist/{api → services}/org/index.d.ts +0 -0
  981. /package/dist/{api → services}/org/index.js +0 -0
  982. /package/dist/{api → services}/org/list.d.ts +0 -0
  983. /package/dist/{api → services}/org/list.js +0 -0
  984. /package/dist/{api → services}/org/util.d.ts +0 -0
  985. /package/dist/{api → services}/org/util.js +0 -0
  986. /package/dist/{api → services}/project/agent.d.ts +0 -0
  987. /package/dist/{api → services}/project/agent.js +0 -0
  988. /package/dist/{api → services}/project/create.d.ts +0 -0
  989. /package/dist/{api → services}/project/create.js +0 -0
  990. /package/dist/{api → services}/project/delete.d.ts +0 -0
  991. /package/dist/{api → services}/project/deploy.js +0 -0
  992. /package/dist/{api → services}/project/deployment.d.ts +0 -0
  993. /package/dist/{api → services}/project/env-delete.d.ts +0 -0
  994. /package/dist/{api → services}/project/env-delete.js +0 -0
  995. /package/dist/{api → services}/project/env-update.d.ts +0 -0
  996. /package/dist/{api → services}/project/env-update.js +0 -0
  997. /package/dist/{api → services}/project/exists.d.ts +0 -0
  998. /package/dist/{api → services}/project/exists.js +0 -0
  999. /package/dist/{api → services}/project/get.d.ts +0 -0
  1000. /package/dist/{api → services}/project/get.js +0 -0
  1001. /package/dist/{api → services}/project/hostname.d.ts +0 -0
  1002. /package/dist/{api → services}/project/index.d.ts +0 -0
  1003. /package/dist/{api → services}/project/index.js +0 -0
  1004. /package/dist/{api → services}/project/list.d.ts +0 -0
  1005. /package/dist/{api → services}/project/list.js +0 -0
  1006. /package/dist/{api → services}/project/malware.d.ts +0 -0
  1007. /package/dist/{api → services}/project/update-region.d.ts +0 -0
  1008. /package/dist/{api → services}/project/update-region.js +0 -0
  1009. /package/dist/{api → services}/project/util.d.ts +0 -0
  1010. /package/dist/{api → services}/project/util.js +0 -0
  1011. /package/dist/{api → services}/queue/dlq.js +0 -0
  1012. /package/dist/{api → services}/queue/messages.js +0 -0
  1013. /package/dist/{api → services}/queue/queues.js +0 -0
  1014. /package/dist/{api → services}/region/create.d.ts +0 -0
  1015. /package/dist/{api → services}/region/create.js +0 -0
  1016. /package/dist/{api → services}/region/delete.d.ts +0 -0
  1017. /package/dist/{api → services}/region/delete.js +0 -0
  1018. /package/dist/{api → services}/region/index.d.ts +0 -0
  1019. /package/dist/{api → services}/region/index.js +0 -0
  1020. /package/dist/{api → services}/region/list.d.ts +0 -0
  1021. /package/dist/{api → services}/region/list.js +0 -0
  1022. /package/dist/{api → services}/region/resources.d.ts +0 -0
  1023. /package/dist/{api → services}/region/resources.js +0 -0
  1024. /package/dist/{api → services}/region/util.d.ts +0 -0
  1025. /package/dist/{api → services}/region/util.js +0 -0
  1026. /package/dist/{api → services}/sandbox/snapshot-build.d.ts +0 -0
  1027. /package/dist/{api → services}/sandbox/snapshot-build.js +0 -0
  1028. /package/dist/{api → services}/session/get.js +0 -0
  1029. /package/dist/{api → services}/session/logs.d.ts +0 -0
  1030. /package/dist/{api → services}/session/logs.js +0 -0
  1031. /package/dist/{api → services}/session/util.d.ts +0 -0
  1032. /package/dist/{api → services}/session/util.js +0 -0
  1033. /package/dist/{api → services}/storage/config.d.ts +0 -0
  1034. /package/dist/{api → services}/storage/config.js +0 -0
  1035. /package/dist/{api → services}/storage/index.d.ts +0 -0
  1036. /package/dist/{api → services}/storage/index.js +0 -0
  1037. /package/dist/{api → services}/storage/types.d.ts +0 -0
  1038. /package/dist/{api → services}/storage/types.js +0 -0
  1039. /package/dist/{api → services}/storage/util.d.ts +0 -0
  1040. /package/dist/{api → services}/storage/util.js +0 -0
  1041. /package/dist/{api → services}/stream/get.d.ts +0 -0
  1042. /package/dist/{api → services}/stream/get.js +0 -0
  1043. /package/dist/{api → services}/stream/util.d.ts +0 -0
  1044. /package/dist/{api → services}/stream/util.js +0 -0
  1045. /package/dist/{api → services}/thread/delete.d.ts +0 -0
  1046. /package/dist/{api → services}/thread/delete.js +0 -0
  1047. /package/dist/{api → services}/thread/get.d.ts +0 -0
  1048. /package/dist/{api → services}/thread/get.js +0 -0
  1049. /package/dist/{api → services}/thread/index.d.ts +0 -0
  1050. /package/dist/{api → services}/thread/index.js +0 -0
  1051. /package/dist/{api → services}/thread/util.d.ts +0 -0
  1052. /package/dist/{api → services}/thread/util.js +0 -0
  1053. /package/dist/{api → services}/user/index.d.ts +0 -0
  1054. /package/dist/{api → services}/user/index.js +0 -0
  1055. /package/dist/{api → services}/user/util.d.ts +0 -0
  1056. /package/dist/{api → services}/user/util.js +0 -0
  1057. /package/dist/{api → services}/user/whoami.d.ts +0 -0
  1058. /package/dist/{api → services}/user/whoami.js +0 -0
  1059. /package/dist/{api → services}/webhook/deliveries.js +0 -0
  1060. /package/dist/{api → services}/webhook/destinations.js +0 -0
  1061. /package/dist/{api → services}/webhook/receipts.d.ts +0 -0
  1062. /package/dist/{api → services}/webhook/receipts.js +0 -0
  1063. /package/dist/{api → services}/webhook/util.d.ts +0 -0
  1064. /package/dist/{api → services}/webhook/util.js +0 -0
  1065. /package/dist/{api → services}/webhook/webhooks.js +0 -0
  1066. /package/src/{api → services}/api-example.md +0 -0
  1067. /package/src/{api → services}/apikey/delete.ts +0 -0
  1068. /package/src/{api → services}/apikey/get.ts +0 -0
  1069. /package/src/{api → services}/apikey/index.ts +0 -0
  1070. /package/src/{api → services}/apikey/util.ts +0 -0
  1071. /package/src/{api → services}/db/logs.ts +0 -0
  1072. /package/src/{api → services}/db/util.ts +0 -0
  1073. /package/src/{api → services}/env.ts +0 -0
  1074. /package/src/services/{evalrun.ts → eval/events.ts} +0 -0
  1075. /package/src/{api → services}/eval/get.ts +0 -0
  1076. /package/src/{api → services}/eval/list.ts +0 -0
  1077. /package/src/{api → services}/eval/run-get.ts +0 -0
  1078. /package/src/{api → services}/eval/run-list.ts +0 -0
  1079. /package/src/{api → services}/logger.ts +0 -0
  1080. /package/src/{api → services}/machine/index.ts +0 -0
  1081. /package/src/{api → services}/machine/util.ts +0 -0
  1082. /package/src/{api → services}/org/env-delete.ts +0 -0
  1083. /package/src/{api → services}/org/env-update.ts +0 -0
  1084. /package/src/{api → services}/org/index.ts +0 -0
  1085. /package/src/{api → services}/org/list.ts +0 -0
  1086. /package/src/{api → services}/org/util.ts +0 -0
  1087. /package/src/{api → services}/project/agent.ts +0 -0
  1088. /package/src/{api → services}/project/create.ts +0 -0
  1089. /package/src/{api → services}/project/env-delete.ts +0 -0
  1090. /package/src/{api → services}/project/env-update.ts +0 -0
  1091. /package/src/{api → services}/project/exists.ts +0 -0
  1092. /package/src/{api → services}/project/get.ts +0 -0
  1093. /package/src/{api → services}/project/index.ts +0 -0
  1094. /package/src/{api → services}/project/list.ts +0 -0
  1095. /package/src/{api → services}/project/update-region.ts +0 -0
  1096. /package/src/{api → services}/project/util.ts +0 -0
  1097. /package/src/{api → services}/queue/dlq.ts +0 -0
  1098. /package/src/{api → services}/queue/messages.ts +0 -0
  1099. /package/src/{api → services}/queue/queues.ts +0 -0
  1100. /package/src/{api → services}/region/create.ts +0 -0
  1101. /package/src/{api → services}/region/delete.ts +0 -0
  1102. /package/src/{api → services}/region/index.ts +0 -0
  1103. /package/src/{api → services}/region/list.ts +0 -0
  1104. /package/src/{api → services}/region/resources.ts +0 -0
  1105. /package/src/{api → services}/region/util.ts +0 -0
  1106. /package/src/{api → services}/sandbox/snapshot-build.ts +0 -0
  1107. /package/src/services/{session.ts → session/events.ts} +0 -0
  1108. /package/src/{api → services}/session/logs.ts +0 -0
  1109. /package/src/{api → services}/session/util.ts +0 -0
  1110. /package/src/{api → services}/storage/config.ts +0 -0
  1111. /package/src/{api → services}/storage/index.ts +0 -0
  1112. /package/src/{api → services}/storage/types.ts +0 -0
  1113. /package/src/{api → services}/storage/util.ts +0 -0
  1114. /package/src/{api → services}/stream/get.ts +0 -0
  1115. /package/src/{api → services}/stream/util.ts +0 -0
  1116. /package/src/{api → services}/thread/delete.ts +0 -0
  1117. /package/src/{api → services}/thread/get.ts +0 -0
  1118. /package/src/{api → services}/thread/index.ts +0 -0
  1119. /package/src/{api → services}/thread/util.ts +0 -0
  1120. /package/src/{api → services}/user/index.ts +0 -0
  1121. /package/src/{api → services}/user/util.ts +0 -0
  1122. /package/src/{api → services}/user/whoami.ts +0 -0
  1123. /package/src/{api → services}/webhook/deliveries.ts +0 -0
  1124. /package/src/{api → services}/webhook/destinations.ts +0 -0
  1125. /package/src/{api → services}/webhook/receipts.ts +0 -0
  1126. /package/src/{api → services}/webhook/util.ts +0 -0
  1127. /package/src/{api → services}/webhook/webhooks.ts +0 -0
@@ -1,1466 +0,0 @@
1
- import { StructuredError } from '../error.ts';
2
- import type { SortDirection } from './pagination.ts';
3
-
4
- /**
5
- * Resource limits for a sandbox using Kubernetes-style units
6
- */
7
- export interface SandboxResources {
8
- /**
9
- * Memory limit (e.g., "500Mi", "1Gi")
10
- */
11
- memory?: string;
12
-
13
- /**
14
- * CPU limit in millicores (e.g., "500m", "1000m")
15
- */
16
- cpu?: string;
17
-
18
- /**
19
- * Disk limit (e.g., "500Mi", "1Gi")
20
- */
21
- disk?: string;
22
- }
23
-
24
- /**
25
- * Sandbox status
26
- */
27
- export type SandboxStatus =
28
- | 'creating'
29
- | 'idle'
30
- | 'running'
31
- | 'paused'
32
- | 'stopping'
33
- | 'suspended'
34
- | 'terminated'
35
- | 'failed'
36
- | 'deleted';
37
-
38
- export type SandboxSortField =
39
- | 'name'
40
- | 'created'
41
- | 'updated'
42
- | 'status'
43
- | 'mode'
44
- | 'execution_count';
45
- export type SnapshotSortField = 'name' | 'created' | 'size' | 'files';
46
- export type RuntimeSortField = 'name' | 'created';
47
-
48
- /**
49
- * Runtime information for a sandbox
50
- */
51
- export interface SandboxRuntimeRequirements {
52
- /**
53
- * Memory requirement (e.g., "1Gi")
54
- */
55
- memory?: string;
56
-
57
- /**
58
- * CPU requirement (e.g., "1")
59
- */
60
- cpu?: string;
61
-
62
- /**
63
- * Disk requirement (e.g., "500Mi")
64
- */
65
- disk?: string;
66
-
67
- /**
68
- * Whether network access is enabled
69
- */
70
- networkEnabled: boolean;
71
- }
72
-
73
- export interface SandboxRuntime {
74
- /**
75
- * Unique runtime identifier
76
- */
77
- id: string;
78
-
79
- /**
80
- * Runtime name (e.g., "bun:1", "python:3.14")
81
- */
82
- name: string;
83
-
84
- /**
85
- * Optional description
86
- */
87
- description?: string;
88
-
89
- /**
90
- * URL for runtime icon
91
- */
92
- iconUrl?: string;
93
-
94
- /**
95
- * Brand color for the runtime (hex color code)
96
- */
97
- brandColor?: string;
98
-
99
- /**
100
- * URL for runtime documentation or homepage
101
- */
102
- url?: string;
103
-
104
- /**
105
- * Optional tags for categorization
106
- */
107
- tags?: string[];
108
-
109
- /**
110
- * Runtime requirements (memory, cpu, disk, network)
111
- */
112
- requirements?: SandboxRuntimeRequirements;
113
-
114
- /**
115
- * Readme content in markdown format
116
- */
117
- readme?: string;
118
- }
119
-
120
- /**
121
- * Runtime information included in sandbox responses
122
- */
123
- export interface SandboxRuntimeInfo {
124
- /**
125
- * Unique runtime identifier
126
- */
127
- id: string;
128
-
129
- /**
130
- * Runtime name (e.g., "bun:1", "python:3.14")
131
- */
132
- name: string;
133
-
134
- /**
135
- * URL for runtime icon
136
- */
137
- iconUrl?: string;
138
-
139
- /**
140
- * Brand color for the runtime (hex color code)
141
- */
142
- brandColor?: string;
143
-
144
- /**
145
- * Optional tags for categorization
146
- */
147
- tags?: string[];
148
- }
149
-
150
- /**
151
- * Snapshot user information (for private snapshots)
152
- */
153
- export interface SandboxSnapshotUserInfo {
154
- /**
155
- * User ID
156
- */
157
- id: string;
158
-
159
- /**
160
- * User's first name
161
- */
162
- firstName?: string;
163
-
164
- /**
165
- * User's last name
166
- */
167
- lastName?: string;
168
- }
169
-
170
- /**
171
- * Snapshot org information (for public snapshots)
172
- */
173
- export interface SandboxSnapshotOrgInfo {
174
- /**
175
- * Organization ID
176
- */
177
- id: string;
178
-
179
- /**
180
- * Organization name
181
- */
182
- name: string;
183
-
184
- /**
185
- * Organization slug
186
- */
187
- slug?: string;
188
- }
189
-
190
- /**
191
- * Base snapshot information
192
- */
193
- interface SandboxSnapshotInfoBase {
194
- /**
195
- * Unique snapshot identifier
196
- */
197
- id: string;
198
-
199
- /**
200
- * Snapshot name
201
- */
202
- name?: string;
203
-
204
- /**
205
- * Snapshot tag
206
- */
207
- tag?: string;
208
-
209
- /**
210
- * Full name with org slug (@slug/name:tag)
211
- */
212
- fullName?: string;
213
- }
214
-
215
- /**
216
- * Public snapshot information - includes org info
217
- */
218
- export interface SandboxSnapshotInfoPublic extends SandboxSnapshotInfoBase {
219
- /**
220
- * Public snapshot
221
- */
222
- public: true;
223
-
224
- /**
225
- * Organization that owns the public snapshot
226
- */
227
- org: SandboxSnapshotOrgInfo;
228
- }
229
-
230
- /**
231
- * Private snapshot information - includes user info
232
- */
233
- export interface SandboxSnapshotInfoPrivate extends SandboxSnapshotInfoBase {
234
- /**
235
- * Private snapshot
236
- */
237
- public: false;
238
-
239
- /**
240
- * User who created the private snapshot
241
- */
242
- user: SandboxSnapshotUserInfo;
243
- }
244
-
245
- /**
246
- * Snapshot information included in sandbox responses (discriminated union)
247
- */
248
- export type SandboxSnapshotInfo = SandboxSnapshotInfoPublic | SandboxSnapshotInfoPrivate;
249
-
250
- /**
251
- * Execution status
252
- */
253
- export type ExecutionStatus =
254
- | 'queued'
255
- | 'running'
256
- | 'completed'
257
- | 'failed'
258
- | 'timeout'
259
- | 'cancelled';
260
-
261
- /**
262
- * Read-only stream interface for consuming streams without write access
263
- */
264
- export interface StreamReader {
265
- /**
266
- * Unique stream identifier
267
- */
268
- id: string;
269
-
270
- /**
271
- * Public URL to access the stream
272
- */
273
- url: string;
274
-
275
- /**
276
- * Indicates this is a read-only stream
277
- */
278
- readonly: true;
279
-
280
- /**
281
- * Get a ReadableStream that streams from the URL
282
- *
283
- * @returns a ReadableStream that can be consumed
284
- */
285
- getReader(): ReadableStream<Uint8Array>;
286
- }
287
-
288
- /**
289
- * Stream configuration for sandbox output
290
- */
291
- export interface SandboxStreamConfig {
292
- /**
293
- * Stream ID for stdout (or "ignore" to discard)
294
- */
295
- stdout?: string;
296
-
297
- /**
298
- * Stream ID for stderr (or "ignore" to discard)
299
- */
300
- stderr?: string;
301
-
302
- /**
303
- * Stream ID for stdin input
304
- */
305
- stdin?: string;
306
-
307
- /**
308
- * Include timestamps in output (default: true)
309
- */
310
- timestamps?: boolean;
311
- }
312
-
313
- /**
314
- * Command to execute in a sandbox
315
- */
316
- export interface SandboxCommand {
317
- /**
318
- * Command and arguments to execute
319
- */
320
- exec: string[];
321
-
322
- /**
323
- * Files to create before execution
324
- * @deprecated Use top-level `files` option on `SandboxCreateOptions` instead
325
- */
326
- files?: FileToWrite[];
327
-
328
- /**
329
- * Execution mode: "oneshot" auto-destroys sandbox on exit
330
- */
331
- mode?: 'oneshot' | 'interactive';
332
- }
333
-
334
- /**
335
- * Network configuration for sandbox
336
- */
337
- export interface SandboxNetworkConfig {
338
- /**
339
- * Whether to enable outbound network access (default: false)
340
- */
341
- enabled?: boolean;
342
-
343
- /**
344
- * Port to expose from the sandbox to the outside Internet (1024-65535)
345
- */
346
- port?: number;
347
- }
348
-
349
- /**
350
- * Timeout configuration for sandbox
351
- */
352
- export interface SandboxTimeoutConfig {
353
- /**
354
- * Idle timeout before sandbox is reaped (e.g., "10m", "1h")
355
- */
356
- idle?: string;
357
-
358
- /**
359
- * Maximum execution time per command (e.g., "5m", "1h")
360
- */
361
- execution?: string;
362
- }
363
-
364
- /**
365
- * Options for creating a sandbox.
366
- *
367
- * **Important:** `snapshot` and `runtime`/`runtimeId` are mutually exclusive.
368
- * - If you specify `snapshot`, do not specify `runtime` or `runtimeId` (the snapshot's runtime will be used)
369
- * - If you specify `runtime` or `runtimeId`, do not specify `snapshot`
370
- *
371
- * This constraint is enforced at runtime by the API. Specifying both will result in an error:
372
- * "cannot specify both snapshot and runtime; snapshot includes its own runtime"
373
- *
374
- * @example
375
- * ```typescript
376
- * // Create from runtime (default)
377
- * const sandbox1 = await ctx.sandbox.create({
378
- * runtime: 'bun:1'
379
- * });
380
- *
381
- * // Create from snapshot (runtime is inherited from snapshot)
382
- * const sandbox2 = await ctx.sandbox.create({
383
- * snapshot: 'my-snapshot:latest'
384
- * });
385
- * ```
386
- */
387
- export interface SandboxCreateOptions {
388
- /**
389
- * Project ID to associate the sandbox with.
390
- * If not provided, the sandbox will not be tied to a specific project.
391
- */
392
- projectId?: string;
393
-
394
- /**
395
- * Runtime name (e.g., "bun:1", "python:3.14").
396
- * If not specified, defaults to "bun:1".
397
- *
398
- * **Note:** Cannot be specified together with `snapshot`.
399
- */
400
- runtime?: string;
401
-
402
- /**
403
- * Runtime ID (e.g., "srt_xxx").
404
- * Alternative to specifying runtime by name.
405
- *
406
- * **Note:** Cannot be specified together with `snapshot`.
407
- */
408
- runtimeId?: string;
409
-
410
- /**
411
- * Optional sandbox name.
412
- * If not provided, a unique name will be auto-generated.
413
- */
414
- name?: string;
415
-
416
- /**
417
- * Optional description for the sandbox.
418
- */
419
- description?: string;
420
-
421
- /**
422
- * Resource limits
423
- */
424
- resources?: SandboxResources;
425
-
426
- /**
427
- * Environment variables
428
- */
429
- env?: Record<string, string>;
430
-
431
- /**
432
- * Network configuration
433
- */
434
- network?: SandboxNetworkConfig;
435
-
436
- /**
437
- * Stream configuration for output
438
- */
439
- stream?: SandboxStreamConfig;
440
-
441
- /**
442
- * Timeout configuration
443
- */
444
- timeout?: SandboxTimeoutConfig;
445
-
446
- /**
447
- * Command to execute (if provided, creates a sandbox with initial execution)
448
- */
449
- command?: SandboxCommand;
450
-
451
- /**
452
- * Files to write to the sandbox workspace on creation.
453
- * These files are written before any command is executed.
454
- */
455
- files?: FileToWrite[];
456
-
457
- /**
458
- * Snapshot ID or tag to restore from when creating the sandbox.
459
- * The sandbox will start with the filesystem state from the snapshot.
460
- *
461
- * **Note:** Cannot be specified together with `runtime` or `runtimeId`.
462
- * When using a snapshot, the snapshot's runtime will be used automatically.
463
- */
464
- snapshot?: string;
465
-
466
- /**
467
- * Apt packages to install when creating the sandbox.
468
- * These are installed via `apt install` before executing any commands.
469
- */
470
- dependencies?: string[];
471
-
472
- /**
473
- * npm/bun packages to install globally when creating the sandbox.
474
- * These are installed via `bun install -g` before executing any commands.
475
- */
476
- packages?: string[];
477
-
478
- /**
479
- * Optional user-defined metadata to associate with the sandbox.
480
- * This can be used to store arbitrary key-value data for tracking or identification.
481
- */
482
- metadata?: Record<string, unknown>;
483
- }
484
-
485
- /**
486
- * A sandbox instance with methods for interaction
487
- */
488
- export interface Sandbox {
489
- /**
490
- * Unique sandbox identifier
491
- */
492
- id: string;
493
-
494
- /**
495
- * Current status
496
- */
497
- status: SandboxStatus;
498
-
499
- /**
500
- * Runtime information for this sandbox
501
- */
502
- runtime?: SandboxRuntime;
503
-
504
- /**
505
- * Sandbox name
506
- */
507
- name?: string;
508
-
509
- /**
510
- * Sandbox description
511
- */
512
- description?: string;
513
-
514
- /**
515
- * Read-only stream for stdout.
516
- * When no separate streams are configured, stdout and stderr point to the same
517
- * combined stream with interleaved output.
518
- */
519
- stdout: StreamReader;
520
-
521
- /**
522
- * Read-only stream for stderr.
523
- * When no separate streams are configured, stdout and stderr point to the same
524
- * combined stream with interleaved output.
525
- */
526
- stderr: StreamReader;
527
-
528
- /**
529
- * True if stdout and stderr are using the same stream (interleaved output).
530
- * When true, reading from stdout or stderr will return the same interleaved data.
531
- */
532
- interleaved: boolean;
533
-
534
- /**
535
- * Stream ID for the audit event stream (eBPF/Tetragon security events).
536
- * Only present when audit streaming was successfully configured during sandbox creation.
537
- */
538
- auditStreamId?: string;
539
-
540
- /**
541
- * Execute a command in the sandbox
542
- */
543
- execute(options: ExecuteOptions): Promise<Execution>;
544
-
545
- /**
546
- * Write files to the sandbox workspace.
547
- *
548
- * @param files - Array of FileToWrite objects with path and Buffer content
549
- */
550
- writeFiles(files: FileToWrite[]): Promise<void>;
551
-
552
- /**
553
- * Read a file from the sandbox workspace.
554
- * Returns a ReadableStream for efficient streaming of large files.
555
- *
556
- * @param path - Path to the file relative to the sandbox workspace
557
- * @returns ReadableStream of the file contents
558
- */
559
- readFile(path: string): Promise<ReadableStream<Uint8Array>>;
560
-
561
- /**
562
- * Destroy the sandbox
563
- */
564
- destroy(): Promise<void>;
565
- }
566
-
567
- /**
568
- * Represents a file to write to the sandbox
569
- */
570
- export interface FileToWrite {
571
- /**
572
- * Path to the file relative to the sandbox workspace
573
- */
574
- path: string;
575
-
576
- /**
577
- * File content as a Buffer
578
- */
579
- content: Buffer;
580
- }
581
-
582
- /**
583
- * Information about a user who created the sandbox
584
- */
585
- export interface SandboxUserInfo {
586
- /**
587
- * User ID
588
- */
589
- id: string;
590
-
591
- /**
592
- * User's first name
593
- */
594
- firstName?: string;
595
-
596
- /**
597
- * User's last name
598
- */
599
- lastName?: string;
600
- }
601
-
602
- /**
603
- * Information about an agent associated with the sandbox
604
- */
605
- export interface SandboxAgentInfo {
606
- /**
607
- * Agent ID
608
- */
609
- id: string;
610
-
611
- /**
612
- * Agent name
613
- */
614
- name: string;
615
- }
616
-
617
- /**
618
- * Information about a project associated with the sandbox
619
- */
620
- export interface SandboxProjectInfo {
621
- /**
622
- * Project ID
623
- */
624
- id: string;
625
-
626
- /**
627
- * Project name
628
- */
629
- name: string;
630
- }
631
-
632
- /**
633
- * Information about an organization associated with the sandbox
634
- */
635
- export interface SandboxOrgInfo {
636
- /**
637
- * Organization ID
638
- */
639
- id: string;
640
-
641
- /**
642
- * Organization name
643
- */
644
- name: string;
645
- }
646
-
647
- /**
648
- * Information about a sandbox
649
- */
650
- export interface SandboxInfo {
651
- /**
652
- * Unique sandbox identifier
653
- */
654
- sandboxId: string;
655
-
656
- /**
657
- * Short identifier used for DNS hostname
658
- */
659
- identifier?: string;
660
-
661
- /**
662
- * Sandbox name
663
- */
664
- name?: string;
665
-
666
- /**
667
- * Sandbox description
668
- */
669
- description?: string;
670
-
671
- /**
672
- * Current status
673
- */
674
- status: SandboxStatus;
675
-
676
- /**
677
- * Sandbox mode (interactive or oneshot)
678
- */
679
- mode?: string;
680
-
681
- /**
682
- * Creation timestamp (ISO 8601)
683
- */
684
- createdAt: string;
685
-
686
- /**
687
- * Region where the sandbox is running
688
- */
689
- region?: string;
690
-
691
- /**
692
- * Runtime information
693
- */
694
- runtime?: SandboxRuntimeInfo;
695
-
696
- /**
697
- * Snapshot information
698
- */
699
- snapshot?: SandboxSnapshotInfo;
700
-
701
- /**
702
- * Number of executions run in this sandbox
703
- */
704
- executions: number;
705
-
706
- /**
707
- * Exit code from the last execution (only available for terminated/failed sandboxes)
708
- */
709
- exitCode?: number;
710
-
711
- /**
712
- * URL to the stdout output stream
713
- */
714
- stdoutStreamUrl?: string;
715
-
716
- /**
717
- * URL to the stderr output stream
718
- */
719
- stderrStreamUrl?: string;
720
-
721
- /**
722
- * ID of the audit event stream (eBPF/Tetragon security events)
723
- */
724
- auditStreamId?: string;
725
-
726
- /**
727
- * URL to the audit event stream (eBPF/Tetragon security events)
728
- */
729
- auditStreamUrl?: string;
730
-
731
- /**
732
- * Apt packages installed in the sandbox
733
- */
734
- dependencies?: string[];
735
-
736
- /**
737
- * npm/bun packages installed globally in the sandbox
738
- */
739
- packages?: string[];
740
-
741
- /**
742
- * User-defined metadata associated with the sandbox
743
- */
744
- metadata?: Record<string, unknown>;
745
-
746
- /**
747
- * Resource limits for this sandbox
748
- */
749
- resources?: SandboxResources;
750
-
751
- /**
752
- * Total CPU time consumed in milliseconds (available when terminated)
753
- */
754
- cpuTimeMs?: number;
755
-
756
- /**
757
- * Total memory usage in byte-seconds (available when terminated)
758
- */
759
- memoryByteSec?: number;
760
-
761
- /**
762
- * Total network egress in bytes (available when terminated)
763
- */
764
- networkEgressBytes?: number;
765
-
766
- /**
767
- * Whether network access is enabled for this sandbox
768
- */
769
- networkEnabled?: boolean;
770
-
771
- /**
772
- * Network port exposed from the sandbox (1024-65535)
773
- */
774
- networkPort?: number;
775
-
776
- /**
777
- * Public URL for the sandbox (only set if networkPort is configured)
778
- */
779
- url?: string;
780
-
781
- /**
782
- * User who created the sandbox (if available)
783
- */
784
- user?: SandboxUserInfo;
785
-
786
- /**
787
- * Agent associated with the sandbox (if available)
788
- */
789
- agent?: SandboxAgentInfo;
790
-
791
- /**
792
- * Project associated with the sandbox (if available)
793
- */
794
- project?: SandboxProjectInfo;
795
-
796
- /**
797
- * Organization associated with the sandbox
798
- */
799
- org: SandboxOrgInfo;
800
-
801
- /**
802
- * Timeout configuration for this sandbox
803
- */
804
- timeout?: {
805
- /** Idle timeout duration (e.g., "10m0s") */
806
- idle?: string;
807
- /** Execution timeout duration (e.g., "5m0s") */
808
- execution?: string;
809
- };
810
-
811
- /**
812
- * Startup command configured for this sandbox
813
- */
814
- command?: {
815
- /** Command and arguments */
816
- exec: string[];
817
- /** Execution mode */
818
- mode?: 'oneshot' | 'interactive';
819
- };
820
- }
821
-
822
- /**
823
- * Parameters for listing sandboxes
824
- */
825
- export interface ListSandboxesParams {
826
- /**
827
- * Filter by sandbox name
828
- */
829
- name?: string;
830
-
831
- /**
832
- * Filter by sandbox mode
833
- */
834
- mode?: 'oneshot' | 'interactive';
835
-
836
- /**
837
- * Filter by project ID
838
- */
839
- projectId?: string;
840
-
841
- /**
842
- * Filter by snapshot ID
843
- */
844
- snapshotId?: string;
845
-
846
- /**
847
- * Filter by status
848
- */
849
- status?: SandboxStatus;
850
-
851
- /**
852
- * Filter by live status.
853
- * When true, returns sandboxes with status: creating, running, idle, or failed.
854
- * When false or undefined, returns all sandboxes.
855
- */
856
- live?: boolean;
857
-
858
- /**
859
- * Maximum number of results (default: 50, max: 100)
860
- */
861
- limit?: number;
862
-
863
- /**
864
- * Pagination offset
865
- */
866
- offset?: number;
867
-
868
- /**
869
- * Field to sort by
870
- */
871
- sort?: SandboxSortField;
872
-
873
- /**
874
- * Sort direction (default: 'desc')
875
- */
876
- direction?: SortDirection;
877
- }
878
-
879
- /**
880
- * Response from listing sandboxes
881
- */
882
- export interface ListSandboxesResponse {
883
- /**
884
- * Array of sandbox information
885
- */
886
- sandboxes: SandboxInfo[];
887
-
888
- /**
889
- * Total count of sandboxes matching the filter
890
- */
891
- total: number;
892
- }
893
-
894
- /**
895
- * Parameters for listing sandbox runtimes
896
- */
897
- export interface ListRuntimesParams {
898
- /**
899
- * Maximum number of results (default: 50, max: 100)
900
- */
901
- limit?: number;
902
-
903
- /**
904
- * Pagination offset
905
- */
906
- offset?: number;
907
-
908
- /**
909
- * Field to sort by
910
- */
911
- sort?: RuntimeSortField;
912
-
913
- /**
914
- * Sort direction (default: 'desc')
915
- */
916
- direction?: SortDirection;
917
- }
918
-
919
- /**
920
- * Response from listing sandbox runtimes
921
- */
922
- export interface ListRuntimesResponse {
923
- /**
924
- * Array of runtime information
925
- */
926
- runtimes: SandboxRuntime[];
927
-
928
- /**
929
- * Total count of runtimes
930
- */
931
- total: number;
932
- }
933
-
934
- /**
935
- * Options for executing a command in a sandbox
936
- */
937
- export interface ExecuteOptions {
938
- /**
939
- * Command and arguments to execute
940
- */
941
- command: string[];
942
-
943
- /**
944
- * Files to create/update before execution.
945
- * @deprecated Use `sandbox.writeFiles()` before execute, or top-level `files` on `SandboxCreateOptions`
946
- */
947
- files?: FileToWrite[];
948
-
949
- /**
950
- * Execution timeout (e.g., "5m")
951
- */
952
- timeout?: string;
953
-
954
- /**
955
- * Stream configuration (can override sandbox defaults)
956
- */
957
- stream?: {
958
- stdout?: string;
959
- stderr?: string;
960
- timestamps?: boolean;
961
- };
962
-
963
- /**
964
- * AbortSignal to cancel the operation
965
- */
966
- signal?: AbortSignal;
967
- }
968
-
969
- /**
970
- * An execution instance
971
- */
972
- export interface Execution {
973
- /**
974
- * Unique execution identifier
975
- */
976
- executionId: string;
977
-
978
- /**
979
- * Current status
980
- */
981
- status: ExecutionStatus;
982
-
983
- /**
984
- * Exit code (set when completed or failed)
985
- */
986
- exitCode?: number;
987
-
988
- /**
989
- * Duration in milliseconds (set when completed)
990
- */
991
- durationMs?: number;
992
-
993
- /**
994
- * URL to stream stdout output for this execution
995
- */
996
- stdoutStreamUrl?: string;
997
-
998
- /**
999
- * URL to stream stderr output for this execution
1000
- */
1001
- stderrStreamUrl?: string;
1002
- }
1003
-
1004
- // ===== Snapshot Types =====
1005
-
1006
- /**
1007
- * Information about a file in a snapshot
1008
- */
1009
- export interface SnapshotFileInfo {
1010
- /**
1011
- * File path within the snapshot
1012
- */
1013
- path: string;
1014
-
1015
- /**
1016
- * File size in bytes
1017
- */
1018
- size: number;
1019
-
1020
- /**
1021
- * SHA256 hash of the file contents
1022
- */
1023
- sha256: string;
1024
-
1025
- /**
1026
- * MIME type of the file
1027
- */
1028
- contentType: string;
1029
-
1030
- /**
1031
- * Unix file mode/permissions (e.g., 0o644)
1032
- */
1033
- mode: number;
1034
- }
1035
-
1036
- /**
1037
- * Organization information for snapshots
1038
- */
1039
- export interface SnapshotOrgInfo {
1040
- /**
1041
- * Organization ID
1042
- */
1043
- id: string;
1044
-
1045
- /**
1046
- * Organization name
1047
- */
1048
- name: string;
1049
-
1050
- /**
1051
- * Organization slug for building full name
1052
- */
1053
- slug?: string | null;
1054
- }
1055
-
1056
- /**
1057
- * User information for snapshots
1058
- */
1059
- export interface SnapshotUserInfo {
1060
- /**
1061
- * User ID
1062
- */
1063
- id: string;
1064
-
1065
- /**
1066
- * User first name
1067
- */
1068
- firstName?: string | null;
1069
-
1070
- /**
1071
- * User last name
1072
- */
1073
- lastName?: string | null;
1074
- }
1075
-
1076
- /**
1077
- * Detailed information about a snapshot
1078
- */
1079
- export interface SnapshotInfo {
1080
- /**
1081
- * Unique identifier for the snapshot
1082
- */
1083
- snapshotId: string;
1084
-
1085
- /**
1086
- * Runtime ID associated with this snapshot
1087
- */
1088
- runtimeId?: string | null;
1089
-
1090
- /**
1091
- * Display name for the snapshot (URL-safe: letters, numbers, underscores, dashes)
1092
- */
1093
- name: string;
1094
-
1095
- /**
1096
- * Full name with org slug for public snapshots (@slug/name:tag)
1097
- */
1098
- fullName?: string;
1099
-
1100
- /**
1101
- * Description of the snapshot
1102
- */
1103
- description?: string | null;
1104
-
1105
- /**
1106
- * Build message for the snapshot
1107
- */
1108
- message?: string | null;
1109
-
1110
- /**
1111
- * Tag for the snapshot (defaults to "latest")
1112
- */
1113
- tag?: string | null;
1114
-
1115
- /**
1116
- * Total size of the snapshot in bytes
1117
- */
1118
- sizeBytes: number;
1119
-
1120
- /**
1121
- * Number of files in the snapshot
1122
- */
1123
- fileCount: number;
1124
-
1125
- /**
1126
- * ID of the parent snapshot (for incremental snapshots)
1127
- */
1128
- parentSnapshotId?: string | null;
1129
-
1130
- /**
1131
- * Whether the snapshot is publicly accessible
1132
- */
1133
- public?: boolean;
1134
-
1135
- /**
1136
- * Organization name (for public snapshots)
1137
- */
1138
- orgName?: string;
1139
-
1140
- /**
1141
- * Organization slug (for public snapshots)
1142
- */
1143
- orgSlug?: string;
1144
-
1145
- /**
1146
- * Organization details (for public snapshots)
1147
- */
1148
- org?: SnapshotOrgInfo | null;
1149
-
1150
- /**
1151
- * User who pushed the snapshot (for private snapshots)
1152
- */
1153
- user?: SnapshotUserInfo | null;
1154
-
1155
- /**
1156
- * ISO timestamp when the snapshot was created
1157
- */
1158
- createdAt: string;
1159
-
1160
- /**
1161
- * URL to download the snapshot archive
1162
- */
1163
- downloadUrl?: string;
1164
-
1165
- /**
1166
- * List of files in the snapshot
1167
- */
1168
- files?: SnapshotFileInfo[] | null;
1169
-
1170
- /**
1171
- * User-defined metadata key-value pairs
1172
- */
1173
- userMetadata?: Record<string, string> | null;
1174
- }
1175
-
1176
- /**
1177
- * Options for creating a snapshot
1178
- */
1179
- export interface SnapshotCreateOptions {
1180
- /**
1181
- * Display name for the snapshot (letters, numbers, underscores, dashes only)
1182
- */
1183
- name?: string;
1184
-
1185
- /**
1186
- * Description of the snapshot
1187
- */
1188
- description?: string;
1189
-
1190
- /**
1191
- * Tag for the snapshot (defaults to "latest")
1192
- */
1193
- tag?: string;
1194
-
1195
- /**
1196
- * Make the snapshot publicly accessible
1197
- */
1198
- public?: boolean;
1199
- }
1200
-
1201
- /**
1202
- * Parameters for listing snapshots
1203
- */
1204
- export interface SnapshotListParams {
1205
- /**
1206
- * Filter by sandbox ID
1207
- */
1208
- sandboxId?: string;
1209
-
1210
- /**
1211
- * Maximum number of snapshots to return
1212
- */
1213
- limit?: number;
1214
-
1215
- /**
1216
- * Number of snapshots to skip for pagination
1217
- */
1218
- offset?: number;
1219
-
1220
- /**
1221
- * Field to sort by
1222
- */
1223
- sort?: SnapshotSortField;
1224
-
1225
- /**
1226
- * Sort direction (default: 'desc')
1227
- */
1228
- direction?: SortDirection;
1229
- }
1230
-
1231
- /**
1232
- * Response from listing snapshots
1233
- */
1234
- export interface SnapshotListResponse {
1235
- /**
1236
- * List of snapshot entries
1237
- */
1238
- snapshots: SnapshotInfo[];
1239
-
1240
- /**
1241
- * Total number of snapshots matching the query
1242
- */
1243
- total: number;
1244
- }
1245
-
1246
- /**
1247
- * Service for managing sandbox snapshots
1248
- */
1249
- export interface SnapshotService {
1250
- /**
1251
- * Create a snapshot from a sandbox's current state
1252
- *
1253
- * @param sandboxId - ID of the sandbox to snapshot
1254
- * @param options - Optional snapshot configuration
1255
- * @returns The created snapshot information
1256
- *
1257
- * @example
1258
- * ```typescript
1259
- * const snapshot = await ctx.sandbox.snapshot.create(sandbox.id, {
1260
- * name: 'after-install',
1261
- * tag: 'v1.0',
1262
- * description: 'State after installing dependencies'
1263
- * });
1264
- * ```
1265
- */
1266
- create(sandboxId: string, options?: SnapshotCreateOptions): Promise<SnapshotInfo>;
1267
-
1268
- /**
1269
- * Get detailed information about a snapshot
1270
- *
1271
- * @param snapshotId - ID of the snapshot to retrieve
1272
- * @returns Snapshot information including files and download URL
1273
- *
1274
- * @example
1275
- * ```typescript
1276
- * const details = await ctx.sandbox.snapshot.get(snapshot.snapshotId);
1277
- * console.log(`Snapshot has ${details.fileCount} files`);
1278
- * ```
1279
- */
1280
- get(snapshotId: string): Promise<SnapshotInfo>;
1281
-
1282
- /**
1283
- * List snapshots with optional filtering
1284
- *
1285
- * @param params - Optional filter and pagination parameters
1286
- * @returns Paginated list of snapshots
1287
- *
1288
- * @example
1289
- * ```typescript
1290
- * const { snapshots, total } = await ctx.sandbox.snapshot.list({ limit: 10 });
1291
- * ```
1292
- */
1293
- list(params?: SnapshotListParams): Promise<SnapshotListResponse>;
1294
-
1295
- /**
1296
- * Delete a snapshot
1297
- *
1298
- * @param snapshotId - ID of the snapshot to delete
1299
- *
1300
- * @example
1301
- * ```typescript
1302
- * await ctx.sandbox.snapshot.delete(snapshot.snapshotId);
1303
- * ```
1304
- */
1305
- delete(snapshotId: string): Promise<void>;
1306
-
1307
- /**
1308
- * Add or update a tag on a snapshot
1309
- *
1310
- * @param snapshotId - ID of the snapshot to tag
1311
- * @param tag - New tag name, or null to remove the tag
1312
- * @returns Updated snapshot information
1313
- *
1314
- * @example
1315
- * ```typescript
1316
- * // Add a tag
1317
- * await ctx.sandbox.snapshot.tag(snapshot.snapshotId, 'production');
1318
- *
1319
- * // Remove a tag
1320
- * await ctx.sandbox.snapshot.tag(snapshot.snapshotId, null);
1321
- * ```
1322
- */
1323
- tag(snapshotId: string, tag: string | null): Promise<SnapshotInfo>;
1324
- }
1325
-
1326
- /**
1327
- * Options for one-shot sandbox execution
1328
- */
1329
- export interface SandboxRunOptions extends Omit<SandboxCreateOptions, 'command'> {
1330
- /**
1331
- * Command to execute (required for run)
1332
- */
1333
- command: {
1334
- exec: string[];
1335
- files?: FileToWrite[];
1336
- };
1337
- }
1338
-
1339
- /**
1340
- * Result from one-shot sandbox execution
1341
- */
1342
- export interface SandboxRunResult {
1343
- /**
1344
- * Sandbox ID
1345
- */
1346
- sandboxId: string;
1347
-
1348
- /**
1349
- * Exit code from the process
1350
- */
1351
- exitCode: number;
1352
-
1353
- /**
1354
- * Duration in milliseconds
1355
- */
1356
- durationMs: number;
1357
-
1358
- /**
1359
- * Stdout content (if captured)
1360
- */
1361
- stdout?: string;
1362
-
1363
- /**
1364
- * Stderr content (if captured)
1365
- */
1366
- stderr?: string;
1367
- }
1368
-
1369
- /**
1370
- * Sandbox service for creating and managing isolated execution environments
1371
- */
1372
- export interface SandboxService {
1373
- /**
1374
- * Run a one-shot command in a new sandbox (creates, executes, destroys)
1375
- *
1376
- * @param options - execution options
1377
- * @returns result with exit code and optional output
1378
- *
1379
- * @example
1380
- * ```typescript
1381
- * const result = await ctx.sandbox.run({
1382
- * command: {
1383
- * exec: ['bun', 'run', 'index.ts'],
1384
- * files: [{ path: 'index.ts', content: Buffer.from('console.log("hello")') }]
1385
- * }
1386
- * });
1387
- * console.log('Exit:', result.exitCode);
1388
- * ```
1389
- */
1390
- run(options: SandboxRunOptions): Promise<SandboxRunResult>;
1391
-
1392
- /**
1393
- * Create an interactive sandbox for multiple executions
1394
- *
1395
- * @param options - sandbox configuration
1396
- * @returns sandbox instance
1397
- *
1398
- * @example
1399
- * ```typescript
1400
- * const sandbox = await ctx.sandbox.create({
1401
- * resources: { memory: '1Gi', cpu: '1000m' }
1402
- * });
1403
- * await sandbox.execute({ command: ['bun', 'init'] });
1404
- * await sandbox.execute({ command: ['bun', 'add', 'zod'] });
1405
- * await sandbox.destroy();
1406
- * ```
1407
- */
1408
- create(options?: SandboxCreateOptions): Promise<Sandbox>;
1409
-
1410
- /**
1411
- * Get sandbox information by ID
1412
- *
1413
- * @param sandboxId - sandbox identifier
1414
- * @returns sandbox information
1415
- */
1416
- get(sandboxId: string): Promise<SandboxInfo>;
1417
-
1418
- /**
1419
- * List sandboxes with optional filtering
1420
- *
1421
- * @param params - filter and pagination parameters
1422
- * @returns list of sandboxes
1423
- */
1424
- list(params?: ListSandboxesParams): Promise<ListSandboxesResponse>;
1425
-
1426
- /**
1427
- * Destroy a sandbox by ID
1428
- *
1429
- * @param sandboxId - sandbox identifier
1430
- */
1431
- destroy(sandboxId: string): Promise<void>;
1432
-
1433
- /**
1434
- * Snapshot management operations for creating and managing sandbox snapshots
1435
- *
1436
- * @example
1437
- * ```typescript
1438
- * // Create a snapshot of a sandbox
1439
- * const snapshot = await ctx.sandbox.snapshot.create(sandbox.id, {
1440
- * name: 'after-install',
1441
- * tag: 'v1.0'
1442
- * });
1443
- *
1444
- * // List all snapshots
1445
- * const { snapshots } = await ctx.sandbox.snapshot.list();
1446
- *
1447
- * // Get snapshot details
1448
- * const details = await ctx.sandbox.snapshot.get(snapshot.snapshotId);
1449
- *
1450
- * // Tag a snapshot
1451
- * await ctx.sandbox.snapshot.tag(snapshot.snapshotId, 'production');
1452
- *
1453
- * // Delete a snapshot
1454
- * await ctx.sandbox.snapshot.delete(snapshot.snapshotId);
1455
- * ```
1456
- */
1457
- snapshot: SnapshotService;
1458
- }
1459
-
1460
- /**
1461
- * Structured error for sandbox operations
1462
- */
1463
- export const SandboxError = StructuredError('SandboxError')<{
1464
- sandboxId?: string;
1465
- executionId?: string;
1466
- }>();