@agentuity/server 1.0.32 → 1.0.34

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 (562) hide show
  1. package/dist/api/api.d.ts +1 -227
  2. package/dist/api/api.d.ts.map +1 -1
  3. package/dist/api/api.js +1 -637
  4. package/dist/api/api.js.map +1 -1
  5. package/dist/api/index.d.ts +1 -17
  6. package/dist/api/index.d.ts.map +1 -1
  7. package/dist/api/index.js +1 -17
  8. package/dist/api/index.js.map +1 -1
  9. package/dist/api/org/env-delete.d.ts +1 -22
  10. package/dist/api/org/env-delete.d.ts.map +1 -1
  11. package/dist/api/org/env-delete.js +1 -24
  12. package/dist/api/org/env-delete.js.map +1 -1
  13. package/dist/api/org/env-get.d.ts +1 -32
  14. package/dist/api/org/env-get.d.ts.map +1 -1
  15. package/dist/api/org/env-get.js +1 -25
  16. package/dist/api/org/env-get.js.map +1 -1
  17. package/dist/api/org/env-update.d.ts +1 -23
  18. package/dist/api/org/env-update.d.ts.map +1 -1
  19. package/dist/api/org/env-update.js +1 -25
  20. package/dist/api/org/env-update.js.map +1 -1
  21. package/dist/api/project/get.d.ts +1 -42
  22. package/dist/api/project/get.d.ts.map +1 -1
  23. package/dist/api/project/get.js +1 -35
  24. package/dist/api/project/get.js.map +1 -1
  25. package/dist/api/project/list.d.ts +1 -47
  26. package/dist/api/project/list.d.ts.map +1 -1
  27. package/dist/api/project/list.js +1 -37
  28. package/dist/api/project/list.js.map +1 -1
  29. package/dist/api/project/malware.d.ts +1 -70
  30. package/dist/api/project/malware.d.ts.map +1 -1
  31. package/dist/api/project/malware.js +1 -41
  32. package/dist/api/project/malware.js.map +1 -1
  33. package/dist/api/region/create.d.ts +1 -80
  34. package/dist/api/region/create.d.ts.map +1 -1
  35. package/dist/api/region/create.js +1 -176
  36. package/dist/api/region/create.js.map +1 -1
  37. package/dist/api/sandbox/client.d.ts +1 -190
  38. package/dist/api/sandbox/client.d.ts.map +1 -1
  39. package/dist/api/sandbox/client.js +1 -260
  40. package/dist/api/sandbox/client.js.map +1 -1
  41. package/dist/api/sandbox/pause.d.ts +1 -21
  42. package/dist/api/sandbox/pause.d.ts.map +1 -1
  43. package/dist/api/sandbox/pause.js +1 -24
  44. package/dist/api/sandbox/pause.js.map +1 -1
  45. package/dist/api/sandbox/resume.d.ts +1 -21
  46. package/dist/api/sandbox/resume.d.ts.map +1 -1
  47. package/dist/api/sandbox/resume.js +1 -24
  48. package/dist/api/sandbox/resume.js.map +1 -1
  49. package/dist/api/sandbox/util.d.ts +1 -284
  50. package/dist/api/sandbox/util.d.ts.map +1 -1
  51. package/dist/api/sandbox/util.js +1 -210
  52. package/dist/api/sandbox/util.js.map +1 -1
  53. package/dist/api/user/whoami.d.ts +1 -38
  54. package/dist/api/user/whoami.d.ts.map +1 -1
  55. package/dist/api/user/whoami.js +1 -26
  56. package/dist/api/user/whoami.js.map +1 -1
  57. package/dist/index.d.ts +1 -4
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +3 -12
  60. package/dist/index.js.map +1 -1
  61. package/package.json +4 -4
  62. package/src/api/api.ts +1 -936
  63. package/src/api/index.ts +1 -17
  64. package/src/api/org/env-delete.ts +1 -37
  65. package/src/api/org/env-get.ts +1 -43
  66. package/src/api/org/env-update.ts +1 -38
  67. package/src/api/project/get.ts +1 -49
  68. package/src/api/project/list.ts +1 -54
  69. package/src/api/project/malware.ts +1 -68
  70. package/src/api/region/create.ts +1 -207
  71. package/src/api/sandbox/client.ts +1 -460
  72. package/src/api/sandbox/pause.ts +1 -39
  73. package/src/api/sandbox/resume.ts +1 -39
  74. package/src/api/sandbox/util.ts +1 -276
  75. package/src/api/user/whoami.ts +1 -32
  76. package/src/index.ts +3 -30
  77. package/dist/api/apikey/create.d.ts +0 -33
  78. package/dist/api/apikey/create.d.ts.map +0 -1
  79. package/dist/api/apikey/create.js +0 -23
  80. package/dist/api/apikey/create.js.map +0 -1
  81. package/dist/api/apikey/delete.d.ts +0 -19
  82. package/dist/api/apikey/delete.d.ts.map +0 -1
  83. package/dist/api/apikey/delete.js +0 -19
  84. package/dist/api/apikey/delete.js.map +0 -1
  85. package/dist/api/apikey/get.d.ts +0 -45
  86. package/dist/api/apikey/get.d.ts.map +0 -1
  87. package/dist/api/apikey/get.js +0 -36
  88. package/dist/api/apikey/get.js.map +0 -1
  89. package/dist/api/apikey/index.d.ts +0 -6
  90. package/dist/api/apikey/index.d.ts.map +0 -1
  91. package/dist/api/apikey/index.js +0 -6
  92. package/dist/api/apikey/index.js.map +0 -1
  93. package/dist/api/apikey/list.d.ts +0 -64
  94. package/dist/api/apikey/list.d.ts.map +0 -1
  95. package/dist/api/apikey/list.js +0 -46
  96. package/dist/api/apikey/list.js.map +0 -1
  97. package/dist/api/apikey/util.d.ts +0 -23
  98. package/dist/api/apikey/util.d.ts.map +0 -1
  99. package/dist/api/apikey/util.js +0 -3
  100. package/dist/api/apikey/util.js.map +0 -1
  101. package/dist/api/db/index.d.ts +0 -5
  102. package/dist/api/db/index.d.ts.map +0 -1
  103. package/dist/api/db/index.js +0 -5
  104. package/dist/api/db/index.js.map +0 -1
  105. package/dist/api/db/logs.d.ts +0 -70
  106. package/dist/api/db/logs.d.ts.map +0 -1
  107. package/dist/api/db/logs.js +0 -59
  108. package/dist/api/db/logs.js.map +0 -1
  109. package/dist/api/db/query.d.ts +0 -39
  110. package/dist/api/db/query.d.ts.map +0 -1
  111. package/dist/api/db/query.js +0 -49
  112. package/dist/api/db/query.js.map +0 -1
  113. package/dist/api/db/tables.d.ts +0 -49
  114. package/dist/api/db/tables.d.ts.map +0 -1
  115. package/dist/api/db/tables.js +0 -59
  116. package/dist/api/db/tables.js.map +0 -1
  117. package/dist/api/db/util.d.ts +0 -31
  118. package/dist/api/db/util.d.ts.map +0 -1
  119. package/dist/api/db/util.js +0 -4
  120. package/dist/api/db/util.js.map +0 -1
  121. package/dist/api/eval/get.d.ts +0 -36
  122. package/dist/api/eval/get.d.ts.map +0 -1
  123. package/dist/api/eval/get.js +0 -23
  124. package/dist/api/eval/get.js.map +0 -1
  125. package/dist/api/eval/index.d.ts +0 -5
  126. package/dist/api/eval/index.d.ts.map +0 -1
  127. package/dist/api/eval/index.js +0 -5
  128. package/dist/api/eval/index.js.map +0 -1
  129. package/dist/api/eval/list.d.ts +0 -50
  130. package/dist/api/eval/list.d.ts.map +0 -1
  131. package/dist/api/eval/list.js +0 -32
  132. package/dist/api/eval/list.js.map +0 -1
  133. package/dist/api/eval/run-get.d.ts +0 -48
  134. package/dist/api/eval/run-get.d.ts.map +0 -1
  135. package/dist/api/eval/run-get.js +0 -29
  136. package/dist/api/eval/run-get.js.map +0 -1
  137. package/dist/api/eval/run-list.d.ts +0 -70
  138. package/dist/api/eval/run-list.d.ts.map +0 -1
  139. package/dist/api/eval/run-list.js +0 -42
  140. package/dist/api/eval/run-list.js.map +0 -1
  141. package/dist/api/machine/index.d.ts +0 -3
  142. package/dist/api/machine/index.d.ts.map +0 -1
  143. package/dist/api/machine/index.js +0 -3
  144. package/dist/api/machine/index.js.map +0 -1
  145. package/dist/api/machine/machine.d.ts +0 -192
  146. package/dist/api/machine/machine.d.ts.map +0 -1
  147. package/dist/api/machine/machine.js +0 -109
  148. package/dist/api/machine/machine.js.map +0 -1
  149. package/dist/api/machine/util.d.ts +0 -14
  150. package/dist/api/machine/util.d.ts.map +0 -1
  151. package/dist/api/machine/util.js +0 -3
  152. package/dist/api/machine/util.js.map +0 -1
  153. package/dist/api/org/index.d.ts +0 -7
  154. package/dist/api/org/index.d.ts.map +0 -1
  155. package/dist/api/org/index.js +0 -7
  156. package/dist/api/org/index.js.map +0 -1
  157. package/dist/api/org/list.d.ts +0 -27
  158. package/dist/api/org/list.d.ts.map +0 -1
  159. package/dist/api/org/list.js +0 -22
  160. package/dist/api/org/list.js.map +0 -1
  161. package/dist/api/org/resources.d.ts +0 -141
  162. package/dist/api/org/resources.d.ts.map +0 -1
  163. package/dist/api/org/resources.js +0 -97
  164. package/dist/api/org/resources.js.map +0 -1
  165. package/dist/api/org/util.d.ts +0 -45
  166. package/dist/api/org/util.d.ts.map +0 -1
  167. package/dist/api/org/util.js +0 -4
  168. package/dist/api/org/util.js.map +0 -1
  169. package/dist/api/project/agent.d.ts +0 -89
  170. package/dist/api/project/agent.d.ts.map +0 -1
  171. package/dist/api/project/agent.js +0 -60
  172. package/dist/api/project/agent.js.map +0 -1
  173. package/dist/api/project/create.d.ts +0 -37
  174. package/dist/api/project/create.d.ts.map +0 -1
  175. package/dist/api/project/create.js +0 -31
  176. package/dist/api/project/create.js.map +0 -1
  177. package/dist/api/project/delete.d.ts +0 -15
  178. package/dist/api/project/delete.d.ts.map +0 -1
  179. package/dist/api/project/delete.js +0 -13
  180. package/dist/api/project/delete.js.map +0 -1
  181. package/dist/api/project/deploy.d.ts +0 -490
  182. package/dist/api/project/deploy.d.ts.map +0 -1
  183. package/dist/api/project/deploy.js +0 -313
  184. package/dist/api/project/deploy.js.map +0 -1
  185. package/dist/api/project/deployment.d.ts +0 -237
  186. package/dist/api/project/deployment.d.ts.map +0 -1
  187. package/dist/api/project/deployment.js +0 -127
  188. package/dist/api/project/deployment.js.map +0 -1
  189. package/dist/api/project/env-delete.d.ts +0 -22
  190. package/dist/api/project/env-delete.d.ts.map +0 -1
  191. package/dist/api/project/env-delete.js +0 -29
  192. package/dist/api/project/env-delete.js.map +0 -1
  193. package/dist/api/project/env-update.d.ts +0 -31
  194. package/dist/api/project/env-update.d.ts.map +0 -1
  195. package/dist/api/project/env-update.js +0 -36
  196. package/dist/api/project/env-update.js.map +0 -1
  197. package/dist/api/project/exists.d.ts +0 -25
  198. package/dist/api/project/exists.d.ts.map +0 -1
  199. package/dist/api/project/exists.js +0 -45
  200. package/dist/api/project/exists.js.map +0 -1
  201. package/dist/api/project/hostname.d.ts +0 -25
  202. package/dist/api/project/hostname.d.ts.map +0 -1
  203. package/dist/api/project/hostname.js +0 -37
  204. package/dist/api/project/hostname.js.map +0 -1
  205. package/dist/api/project/index.d.ts +0 -14
  206. package/dist/api/project/index.d.ts.map +0 -1
  207. package/dist/api/project/index.js +0 -14
  208. package/dist/api/project/index.js.map +0 -1
  209. package/dist/api/project/update-region.d.ts +0 -27
  210. package/dist/api/project/update-region.d.ts.map +0 -1
  211. package/dist/api/project/update-region.js +0 -25
  212. package/dist/api/project/update-region.js.map +0 -1
  213. package/dist/api/project/util.d.ts +0 -62
  214. package/dist/api/project/util.d.ts.map +0 -1
  215. package/dist/api/project/util.js +0 -6
  216. package/dist/api/project/util.js.map +0 -1
  217. package/dist/api/queue/analytics.d.ts +0 -250
  218. package/dist/api/queue/analytics.d.ts.map +0 -1
  219. package/dist/api/queue/analytics.js +0 -233
  220. package/dist/api/queue/analytics.js.map +0 -1
  221. package/dist/api/queue/destinations.d.ts +0 -202
  222. package/dist/api/queue/destinations.d.ts.map +0 -1
  223. package/dist/api/queue/destinations.js +0 -168
  224. package/dist/api/queue/destinations.js.map +0 -1
  225. package/dist/api/queue/dlq.d.ts +0 -168
  226. package/dist/api/queue/dlq.d.ts.map +0 -1
  227. package/dist/api/queue/dlq.js +0 -166
  228. package/dist/api/queue/dlq.js.map +0 -1
  229. package/dist/api/queue/index.d.ts +0 -56
  230. package/dist/api/queue/index.d.ts.map +0 -1
  231. package/dist/api/queue/index.js +0 -90
  232. package/dist/api/queue/index.js.map +0 -1
  233. package/dist/api/queue/messages.d.ts +0 -503
  234. package/dist/api/queue/messages.d.ts.map +0 -1
  235. package/dist/api/queue/messages.js +0 -549
  236. package/dist/api/queue/messages.js.map +0 -1
  237. package/dist/api/queue/queues.d.ts +0 -226
  238. package/dist/api/queue/queues.d.ts.map +0 -1
  239. package/dist/api/queue/queues.js +0 -321
  240. package/dist/api/queue/queues.js.map +0 -1
  241. package/dist/api/queue/sources.d.ts +0 -202
  242. package/dist/api/queue/sources.d.ts.map +0 -1
  243. package/dist/api/queue/sources.js +0 -202
  244. package/dist/api/queue/sources.js.map +0 -1
  245. package/dist/api/queue/types.d.ts +0 -1218
  246. package/dist/api/queue/types.d.ts.map +0 -1
  247. package/dist/api/queue/types.js +0 -1002
  248. package/dist/api/queue/types.js.map +0 -1
  249. package/dist/api/queue/util.d.ts +0 -278
  250. package/dist/api/queue/util.d.ts.map +0 -1
  251. package/dist/api/queue/util.js +0 -235
  252. package/dist/api/queue/util.js.map +0 -1
  253. package/dist/api/queue/validation.d.ts +0 -247
  254. package/dist/api/queue/validation.d.ts.map +0 -1
  255. package/dist/api/queue/validation.js +0 -513
  256. package/dist/api/queue/validation.js.map +0 -1
  257. package/dist/api/queue/websocket.d.ts +0 -168
  258. package/dist/api/queue/websocket.d.ts.map +0 -1
  259. package/dist/api/queue/websocket.js +0 -394
  260. package/dist/api/queue/websocket.js.map +0 -1
  261. package/dist/api/region/delete.d.ts +0 -62
  262. package/dist/api/region/delete.d.ts.map +0 -1
  263. package/dist/api/region/delete.js +0 -37
  264. package/dist/api/region/delete.js.map +0 -1
  265. package/dist/api/region/index.d.ts +0 -5
  266. package/dist/api/region/index.d.ts.map +0 -1
  267. package/dist/api/region/index.js +0 -5
  268. package/dist/api/region/index.js.map +0 -1
  269. package/dist/api/region/list.d.ts +0 -27
  270. package/dist/api/region/list.d.ts.map +0 -1
  271. package/dist/api/region/list.js +0 -22
  272. package/dist/api/region/list.js.map +0 -1
  273. package/dist/api/region/resources.d.ts +0 -71
  274. package/dist/api/region/resources.d.ts.map +0 -1
  275. package/dist/api/region/resources.js +0 -53
  276. package/dist/api/region/resources.js.map +0 -1
  277. package/dist/api/region/util.d.ts +0 -23
  278. package/dist/api/region/util.d.ts.map +0 -1
  279. package/dist/api/region/util.js +0 -3
  280. package/dist/api/region/util.js.map +0 -1
  281. package/dist/api/sandbox/cli-list.d.ts +0 -114
  282. package/dist/api/sandbox/cli-list.d.ts.map +0 -1
  283. package/dist/api/sandbox/cli-list.js +0 -71
  284. package/dist/api/sandbox/cli-list.js.map +0 -1
  285. package/dist/api/sandbox/create.d.ts +0 -118
  286. package/dist/api/sandbox/create.d.ts.map +0 -1
  287. package/dist/api/sandbox/create.js +0 -211
  288. package/dist/api/sandbox/create.js.map +0 -1
  289. package/dist/api/sandbox/destroy.d.ts +0 -22
  290. package/dist/api/sandbox/destroy.d.ts.map +0 -1
  291. package/dist/api/sandbox/destroy.js +0 -25
  292. package/dist/api/sandbox/destroy.js.map +0 -1
  293. package/dist/api/sandbox/disk-checkpoint.d.ts +0 -104
  294. package/dist/api/sandbox/disk-checkpoint.d.ts.map +0 -1
  295. package/dist/api/sandbox/disk-checkpoint.js +0 -104
  296. package/dist/api/sandbox/disk-checkpoint.js.map +0 -1
  297. package/dist/api/sandbox/execute.d.ts +0 -69
  298. package/dist/api/sandbox/execute.d.ts.map +0 -1
  299. package/dist/api/sandbox/execute.js +0 -103
  300. package/dist/api/sandbox/execute.js.map +0 -1
  301. package/dist/api/sandbox/execution.d.ts +0 -169
  302. package/dist/api/sandbox/execution.d.ts.map +0 -1
  303. package/dist/api/sandbox/execution.js +0 -118
  304. package/dist/api/sandbox/execution.js.map +0 -1
  305. package/dist/api/sandbox/files.d.ts +0 -261
  306. package/dist/api/sandbox/files.d.ts.map +0 -1
  307. package/dist/api/sandbox/files.js +0 -386
  308. package/dist/api/sandbox/files.js.map +0 -1
  309. package/dist/api/sandbox/get.d.ts +0 -283
  310. package/dist/api/sandbox/get.d.ts.map +0 -1
  311. package/dist/api/sandbox/get.js +0 -215
  312. package/dist/api/sandbox/get.js.map +0 -1
  313. package/dist/api/sandbox/getStatus.d.ts +0 -16
  314. package/dist/api/sandbox/getStatus.d.ts.map +0 -1
  315. package/dist/api/sandbox/getStatus.js +0 -32
  316. package/dist/api/sandbox/getStatus.js.map +0 -1
  317. package/dist/api/sandbox/index.d.ts +0 -39
  318. package/dist/api/sandbox/index.d.ts.map +0 -1
  319. package/dist/api/sandbox/index.js +0 -20
  320. package/dist/api/sandbox/index.js.map +0 -1
  321. package/dist/api/sandbox/list.d.ts +0 -293
  322. package/dist/api/sandbox/list.d.ts.map +0 -1
  323. package/dist/api/sandbox/list.js +0 -191
  324. package/dist/api/sandbox/list.js.map +0 -1
  325. package/dist/api/sandbox/resolve.d.ts +0 -82
  326. package/dist/api/sandbox/resolve.d.ts.map +0 -1
  327. package/dist/api/sandbox/resolve.js +0 -71
  328. package/dist/api/sandbox/resolve.js.map +0 -1
  329. package/dist/api/sandbox/run.d.ts +0 -28
  330. package/dist/api/sandbox/run.d.ts.map +0 -1
  331. package/dist/api/sandbox/run.js +0 -342
  332. package/dist/api/sandbox/run.js.map +0 -1
  333. package/dist/api/sandbox/runtime.d.ts +0 -83
  334. package/dist/api/sandbox/runtime.d.ts.map +0 -1
  335. package/dist/api/sandbox/runtime.js +0 -78
  336. package/dist/api/sandbox/runtime.js.map +0 -1
  337. package/dist/api/sandbox/snapshot-build.d.ts +0 -48
  338. package/dist/api/sandbox/snapshot-build.d.ts.map +0 -1
  339. package/dist/api/sandbox/snapshot-build.js +0 -74
  340. package/dist/api/sandbox/snapshot-build.js.map +0 -1
  341. package/dist/api/sandbox/snapshot.d.ts +0 -595
  342. package/dist/api/sandbox/snapshot.d.ts.map +0 -1
  343. package/dist/api/sandbox/snapshot.js +0 -598
  344. package/dist/api/sandbox/snapshot.js.map +0 -1
  345. package/dist/api/services/index.d.ts +0 -2
  346. package/dist/api/services/index.d.ts.map +0 -1
  347. package/dist/api/services/index.js +0 -2
  348. package/dist/api/services/index.js.map +0 -1
  349. package/dist/api/services/stats.d.ts +0 -263
  350. package/dist/api/services/stats.d.ts.map +0 -1
  351. package/dist/api/services/stats.js +0 -144
  352. package/dist/api/services/stats.js.map +0 -1
  353. package/dist/api/session/get.d.ts +0 -169
  354. package/dist/api/session/get.d.ts.map +0 -1
  355. package/dist/api/session/get.js +0 -56
  356. package/dist/api/session/get.js.map +0 -1
  357. package/dist/api/session/index.d.ts +0 -4
  358. package/dist/api/session/index.d.ts.map +0 -1
  359. package/dist/api/session/index.js +0 -4
  360. package/dist/api/session/index.js.map +0 -1
  361. package/dist/api/session/list.d.ts +0 -143
  362. package/dist/api/session/list.d.ts.map +0 -1
  363. package/dist/api/session/list.js +0 -91
  364. package/dist/api/session/list.js.map +0 -1
  365. package/dist/api/session/logs.d.ts +0 -40
  366. package/dist/api/session/logs.d.ts.map +0 -1
  367. package/dist/api/session/logs.js +0 -28
  368. package/dist/api/session/logs.js.map +0 -1
  369. package/dist/api/session/util.d.ts +0 -23
  370. package/dist/api/session/util.d.ts.map +0 -1
  371. package/dist/api/session/util.js +0 -3
  372. package/dist/api/session/util.js.map +0 -1
  373. package/dist/api/storage/config.d.ts +0 -99
  374. package/dist/api/storage/config.d.ts.map +0 -1
  375. package/dist/api/storage/config.js +0 -61
  376. package/dist/api/storage/config.js.map +0 -1
  377. package/dist/api/storage/index.d.ts +0 -5
  378. package/dist/api/storage/index.d.ts.map +0 -1
  379. package/dist/api/storage/index.js +0 -5
  380. package/dist/api/storage/index.js.map +0 -1
  381. package/dist/api/storage/objects.d.ts +0 -155
  382. package/dist/api/storage/objects.d.ts.map +0 -1
  383. package/dist/api/storage/objects.js +0 -148
  384. package/dist/api/storage/objects.js.map +0 -1
  385. package/dist/api/storage/types.d.ts +0 -161
  386. package/dist/api/storage/types.d.ts.map +0 -1
  387. package/dist/api/storage/types.js +0 -141
  388. package/dist/api/storage/types.js.map +0 -1
  389. package/dist/api/storage/util.d.ts +0 -48
  390. package/dist/api/storage/util.d.ts.map +0 -1
  391. package/dist/api/storage/util.js +0 -8
  392. package/dist/api/storage/util.js.map +0 -1
  393. package/dist/api/stream/get.d.ts +0 -58
  394. package/dist/api/stream/get.d.ts.map +0 -1
  395. package/dist/api/stream/get.js +0 -40
  396. package/dist/api/stream/get.js.map +0 -1
  397. package/dist/api/stream/index.d.ts +0 -4
  398. package/dist/api/stream/index.d.ts.map +0 -1
  399. package/dist/api/stream/index.js +0 -4
  400. package/dist/api/stream/index.js.map +0 -1
  401. package/dist/api/stream/list.d.ts +0 -120
  402. package/dist/api/stream/list.d.ts.map +0 -1
  403. package/dist/api/stream/list.js +0 -77
  404. package/dist/api/stream/list.js.map +0 -1
  405. package/dist/api/stream/util.d.ts +0 -23
  406. package/dist/api/stream/util.d.ts.map +0 -1
  407. package/dist/api/stream/util.js +0 -3
  408. package/dist/api/stream/util.js.map +0 -1
  409. package/dist/api/thread/delete.d.ts +0 -23
  410. package/dist/api/thread/delete.d.ts.map +0 -1
  411. package/dist/api/thread/delete.js +0 -21
  412. package/dist/api/thread/delete.js.map +0 -1
  413. package/dist/api/thread/get.d.ts +0 -36
  414. package/dist/api/thread/get.d.ts.map +0 -1
  415. package/dist/api/thread/get.js +0 -23
  416. package/dist/api/thread/get.js.map +0 -1
  417. package/dist/api/thread/index.d.ts +0 -5
  418. package/dist/api/thread/index.d.ts.map +0 -1
  419. package/dist/api/thread/index.js +0 -5
  420. package/dist/api/thread/index.js.map +0 -1
  421. package/dist/api/thread/list.d.ts +0 -69
  422. package/dist/api/thread/list.d.ts.map +0 -1
  423. package/dist/api/thread/list.js +0 -51
  424. package/dist/api/thread/list.js.map +0 -1
  425. package/dist/api/thread/util.d.ts +0 -23
  426. package/dist/api/thread/util.d.ts.map +0 -1
  427. package/dist/api/thread/util.js +0 -3
  428. package/dist/api/thread/util.js.map +0 -1
  429. package/dist/api/user/index.d.ts +0 -2
  430. package/dist/api/user/index.d.ts.map +0 -1
  431. package/dist/api/user/index.js +0 -2
  432. package/dist/api/user/index.js.map +0 -1
  433. package/dist/api/user/util.d.ts +0 -23
  434. package/dist/api/user/util.d.ts.map +0 -1
  435. package/dist/api/user/util.js +0 -3
  436. package/dist/api/user/util.js.map +0 -1
  437. package/dist/api/webhook/deliveries.d.ts +0 -94
  438. package/dist/api/webhook/deliveries.d.ts.map +0 -1
  439. package/dist/api/webhook/deliveries.js +0 -79
  440. package/dist/api/webhook/deliveries.js.map +0 -1
  441. package/dist/api/webhook/destinations.d.ts +0 -136
  442. package/dist/api/webhook/destinations.d.ts.map +0 -1
  443. package/dist/api/webhook/destinations.js +0 -137
  444. package/dist/api/webhook/destinations.js.map +0 -1
  445. package/dist/api/webhook/index.d.ts +0 -41
  446. package/dist/api/webhook/index.d.ts.map +0 -1
  447. package/dist/api/webhook/index.js +0 -59
  448. package/dist/api/webhook/index.js.map +0 -1
  449. package/dist/api/webhook/receipts.d.ts +0 -77
  450. package/dist/api/webhook/receipts.d.ts.map +0 -1
  451. package/dist/api/webhook/receipts.js +0 -78
  452. package/dist/api/webhook/receipts.js.map +0 -1
  453. package/dist/api/webhook/types.d.ts +0 -249
  454. package/dist/api/webhook/types.d.ts.map +0 -1
  455. package/dist/api/webhook/types.js +0 -221
  456. package/dist/api/webhook/types.js.map +0 -1
  457. package/dist/api/webhook/util.d.ts +0 -202
  458. package/dist/api/webhook/util.d.ts.map +0 -1
  459. package/dist/api/webhook/util.js +0 -201
  460. package/dist/api/webhook/util.js.map +0 -1
  461. package/dist/api/webhook/webhooks.d.ts +0 -146
  462. package/dist/api/webhook/webhooks.d.ts.map +0 -1
  463. package/dist/api/webhook/webhooks.js +0 -165
  464. package/dist/api/webhook/webhooks.js.map +0 -1
  465. package/src/api/api-example.md +0 -164
  466. package/src/api/apikey/create.ts +0 -41
  467. package/src/api/apikey/delete.ts +0 -30
  468. package/src/api/apikey/get.ts +0 -48
  469. package/src/api/apikey/index.ts +0 -5
  470. package/src/api/apikey/list.ts +0 -64
  471. package/src/api/apikey/util.ts +0 -3
  472. package/src/api/db/index.ts +0 -27
  473. package/src/api/db/logs.ts +0 -75
  474. package/src/api/db/query.ts +0 -67
  475. package/src/api/db/tables.ts +0 -92
  476. package/src/api/db/util.ts +0 -9
  477. package/src/api/eval/get.ts +0 -33
  478. package/src/api/eval/index.ts +0 -28
  479. package/src/api/eval/list.ts +0 -49
  480. package/src/api/eval/run-get.ts +0 -39
  481. package/src/api/eval/run-list.ts +0 -59
  482. package/src/api/machine/index.ts +0 -2
  483. package/src/api/machine/machine.ts +0 -160
  484. package/src/api/machine/util.ts +0 -5
  485. package/src/api/org/index.ts +0 -6
  486. package/src/api/org/list.ts +0 -28
  487. package/src/api/org/resources.ts +0 -140
  488. package/src/api/org/util.ts +0 -4
  489. package/src/api/project/agent.ts +0 -86
  490. package/src/api/project/create.ts +0 -47
  491. package/src/api/project/delete.ts +0 -25
  492. package/src/api/project/deploy.ts +0 -458
  493. package/src/api/project/deployment.ts +0 -195
  494. package/src/api/project/env-delete.ts +0 -45
  495. package/src/api/project/env-update.ts +0 -55
  496. package/src/api/project/exists.ts +0 -58
  497. package/src/api/project/hostname.ts +0 -73
  498. package/src/api/project/index.ts +0 -13
  499. package/src/api/project/update-region.ts +0 -44
  500. package/src/api/project/util.ts +0 -8
  501. package/src/api/queue/analytics.ts +0 -311
  502. package/src/api/queue/destinations.ts +0 -259
  503. package/src/api/queue/dlq.ts +0 -243
  504. package/src/api/queue/index.ts +0 -308
  505. package/src/api/queue/messages.ts +0 -784
  506. package/src/api/queue/queues.ts +0 -460
  507. package/src/api/queue/sources.ts +0 -294
  508. package/src/api/queue/types.ts +0 -1325
  509. package/src/api/queue/util.ts +0 -278
  510. package/src/api/queue/validation.ts +0 -560
  511. package/src/api/queue/websocket.ts +0 -514
  512. package/src/api/region/delete.ts +0 -57
  513. package/src/api/region/index.ts +0 -4
  514. package/src/api/region/list.ts +0 -32
  515. package/src/api/region/resources.ts +0 -69
  516. package/src/api/region/util.ts +0 -3
  517. package/src/api/sandbox/cli-list.ts +0 -127
  518. package/src/api/sandbox/create.ts +0 -256
  519. package/src/api/sandbox/destroy.ts +0 -41
  520. package/src/api/sandbox/disk-checkpoint.ts +0 -179
  521. package/src/api/sandbox/execute.ts +0 -132
  522. package/src/api/sandbox/execution.ts +0 -183
  523. package/src/api/sandbox/files.ts +0 -596
  524. package/src/api/sandbox/get.ts +0 -249
  525. package/src/api/sandbox/getStatus.ts +0 -54
  526. package/src/api/sandbox/index.ts +0 -211
  527. package/src/api/sandbox/list.ts +0 -224
  528. package/src/api/sandbox/resolve.ts +0 -98
  529. package/src/api/sandbox/run.ts +0 -439
  530. package/src/api/sandbox/runtime.ts +0 -100
  531. package/src/api/sandbox/snapshot-build.ts +0 -98
  532. package/src/api/sandbox/snapshot.ts +0 -781
  533. package/src/api/services/index.ts +0 -1
  534. package/src/api/services/stats.ts +0 -213
  535. package/src/api/session/get.ts +0 -106
  536. package/src/api/session/index.ts +0 -3
  537. package/src/api/session/list.ts +0 -136
  538. package/src/api/session/logs.ts +0 -47
  539. package/src/api/session/util.ts +0 -3
  540. package/src/api/storage/config.ts +0 -111
  541. package/src/api/storage/index.ts +0 -4
  542. package/src/api/storage/objects.ts +0 -250
  543. package/src/api/storage/types.ts +0 -174
  544. package/src/api/storage/util.ts +0 -10
  545. package/src/api/stream/get.ts +0 -51
  546. package/src/api/stream/index.ts +0 -3
  547. package/src/api/stream/list.ts +0 -127
  548. package/src/api/stream/util.ts +0 -3
  549. package/src/api/thread/delete.ts +0 -31
  550. package/src/api/thread/get.ts +0 -34
  551. package/src/api/thread/index.ts +0 -4
  552. package/src/api/thread/list.ts +0 -76
  553. package/src/api/thread/util.ts +0 -3
  554. package/src/api/user/index.ts +0 -1
  555. package/src/api/user/util.ts +0 -3
  556. package/src/api/webhook/deliveries.ts +0 -129
  557. package/src/api/webhook/destinations.ts +0 -224
  558. package/src/api/webhook/index.ts +0 -133
  559. package/src/api/webhook/receipts.ts +0 -124
  560. package/src/api/webhook/types.ts +0 -309
  561. package/src/api/webhook/util.ts +0 -237
  562. package/src/api/webhook/webhooks.ts +0 -260
@@ -1,103 +0,0 @@
1
- import { z } from 'zod';
2
- import { APIResponseSchema } from "../api.js";
3
- import { API_VERSION, SandboxBusyError, throwSandboxError } from "./util.js";
4
- export const ExecuteRequestSchema = z
5
- .object({
6
- command: z.array(z.string()).describe('Command and arguments to execute'),
7
- files: z
8
- .array(z.object({
9
- path: z.string().describe('File path relative to workspace'),
10
- content: z.string().describe('Base64-encoded file content'),
11
- }))
12
- .optional()
13
- .describe('Files to write before execution'),
14
- timeout: z.string().optional().describe('Execution timeout (e.g., "30s", "5m")'),
15
- stream: z
16
- .object({
17
- stdout: z.string().optional().describe('Stream ID for stdout output'),
18
- stderr: z.string().optional().describe('Stream ID for stderr output'),
19
- timestamps: z.boolean().optional().describe('Whether to include timestamps in output'),
20
- })
21
- .optional()
22
- .describe('Stream configuration for output redirection'),
23
- })
24
- .describe('Request body for executing a command in a sandbox');
25
- export const ExecuteDataSchema = z
26
- .object({
27
- executionId: z.string().describe('Unique identifier for the execution'),
28
- status: z
29
- .enum(['queued', 'running', 'completed', 'failed', 'timeout', 'cancelled'])
30
- .describe('Current status of the execution'),
31
- exitCode: z.number().optional().describe('Exit code of the executed command'),
32
- durationMs: z.number().optional().describe('Execution duration in milliseconds'),
33
- stdoutStreamUrl: z.string().optional().describe('URL for streaming stdout output'),
34
- stderrStreamUrl: z.string().optional().describe('URL for streaming stderr output'),
35
- })
36
- .describe('Response data from command execution');
37
- export const ExecuteResponseSchema = APIResponseSchema(ExecuteDataSchema);
38
- /**
39
- * Executes a command in an existing sandbox.
40
- *
41
- * @param client - The API client to use for the request
42
- * @param params - Parameters including sandbox ID and execution options
43
- * @returns The execution result including status and stream URLs
44
- * @throws {SandboxResponseError} If the execution request fails
45
- */
46
- export async function sandboxExecute(client, params) {
47
- const { sandboxId, options, orgId, signal } = params;
48
- const body = {
49
- command: options.command,
50
- };
51
- if (options.files && options.files.length > 0) {
52
- body.files = options.files.map((f) => ({
53
- path: f.path,
54
- content: f.content.toString('base64'),
55
- }));
56
- }
57
- if (options.timeout) {
58
- body.timeout = options.timeout;
59
- }
60
- if (options.stream) {
61
- body.stream = options.stream;
62
- }
63
- const queryParams = new URLSearchParams();
64
- if (orgId) {
65
- queryParams.set('orgId', orgId);
66
- }
67
- const queryString = queryParams.toString();
68
- const url = `/sandbox/${API_VERSION}/${sandboxId}/execute${queryString ? `?${queryString}` : ''}`;
69
- let resp;
70
- try {
71
- resp = await client.post(url, body, ExecuteResponseSchema, ExecuteRequestSchema, signal ?? options.signal);
72
- }
73
- catch (error) {
74
- // Detect 409 Conflict (sandbox busy) and throw a specific error.
75
- // The sandbox API client is configured with maxRetries: 0 to fail fast
76
- // when sandbox is busy (retrying wouldn't help - sandbox is still busy).
77
- // Convert APIErrorResponse with status 409 to SandboxBusyError for clarity.
78
- if (error &&
79
- typeof error === 'object' &&
80
- '_tag' in error &&
81
- error._tag === 'APIErrorResponse' &&
82
- 'status' in error &&
83
- error.status === 409) {
84
- throw new SandboxBusyError({
85
- message: 'Sandbox is currently busy executing another command. Please wait for the current execution to complete before submitting a new one.',
86
- sandboxId,
87
- });
88
- }
89
- throw error;
90
- }
91
- if (resp.success) {
92
- return {
93
- executionId: resp.data.executionId,
94
- status: resp.data.status,
95
- exitCode: resp.data.exitCode,
96
- durationMs: resp.data.durationMs,
97
- stdoutStreamUrl: resp.data.stdoutStreamUrl,
98
- stderrStreamUrl: resp.data.stderrStreamUrl,
99
- };
100
- }
101
- throwSandboxError(resp, { sandboxId });
102
- }
103
- //# sourceMappingURL=execute.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../src/api/sandbox/execute.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE7E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KACnC,MAAM,CAAC;IACP,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IACzE,KAAK,EAAE,CAAC;SACN,KAAK,CACL,CAAC,CAAC,MAAM,CAAC;QACR,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;QAC5D,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CA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WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAElG,IAAI,IAA2C,CAAC;IAChD,IAAI,CAAC;QACJ,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CACvB,GAAG,EACH,IAAI,EACJ,qBAAqB,EACrB,oBAAoB,EACpB,MAAM,IAAI,OAAO,CAAC,MAAM,CACxB,CAAC;IACH,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACzB,iEAAiE;QACjE,uEAAuE;QACvE,yEAAyE;QACzE,4EAA4E;QAC5E,IACC,KAAK;YACL,OAAO,KAAK,KAAK,QAAQ;YACzB,MAAM,IAAI,KAAK;YACd,KAA0B,CAAC,IAAI,KAAK,kBAAkB;YACvD,QAAQ,IAAI,KAAK;YAChB,KAA4B,CAAC,MAAM,KAAK,GAAG,EAC3C,CAAC;YACF,MAAM,IAAI,gBAAgB,CAAC;gBAC1B,OAAO,EACN,qIAAqI;gBACtI,SAAS;aACT,CAAC,CAAC;QACJ,CAAC;QACD,MAAM,KAAK,CAAC;IACb,CAAC;IAED,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QAClB,OAAO;YACN,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW;YAClC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAyB;YAC3C,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ;YAC5B,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU;YAChC,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe;YAC1C,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe;SAC1C,CAAC;IACH,CAAC;IAED,iBAAiB,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;AACxC,CAAC"}
@@ -1,169 +0,0 @@
1
- import type { ExecutionStatus } from '@agentuity/core';
2
- import { z } from 'zod';
3
- import { type APIClient } from '../api.ts';
4
- export declare const ExecutionInfoSchema: z.ZodObject<{
5
- executionId: z.ZodString;
6
- sandboxId: z.ZodString;
7
- type: z.ZodOptional<z.ZodString>;
8
- status: z.ZodEnum<{
9
- timeout: "timeout";
10
- failed: "failed";
11
- completed: "completed";
12
- running: "running";
13
- queued: "queued";
14
- cancelled: "cancelled";
15
- }>;
16
- command: z.ZodOptional<z.ZodArray<z.ZodString>>;
17
- exitCode: z.ZodOptional<z.ZodNumber>;
18
- durationMs: z.ZodOptional<z.ZodNumber>;
19
- startedAt: z.ZodOptional<z.ZodString>;
20
- completedAt: z.ZodOptional<z.ZodString>;
21
- error: z.ZodOptional<z.ZodString>;
22
- stdoutStreamUrl: z.ZodOptional<z.ZodString>;
23
- stderrStreamUrl: z.ZodOptional<z.ZodString>;
24
- }, z.core.$strip>;
25
- export declare const ExecutionGetResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
26
- success: z.ZodLiteral<false>;
27
- message: z.ZodString;
28
- code: z.ZodOptional<z.ZodString>;
29
- }, z.core.$strip>, z.ZodObject<{
30
- success: z.ZodLiteral<true>;
31
- data: z.ZodObject<{
32
- executionId: z.ZodString;
33
- sandboxId: z.ZodString;
34
- type: z.ZodOptional<z.ZodString>;
35
- status: z.ZodEnum<{
36
- timeout: "timeout";
37
- failed: "failed";
38
- completed: "completed";
39
- running: "running";
40
- queued: "queued";
41
- cancelled: "cancelled";
42
- }>;
43
- command: z.ZodOptional<z.ZodArray<z.ZodString>>;
44
- exitCode: z.ZodOptional<z.ZodNumber>;
45
- durationMs: z.ZodOptional<z.ZodNumber>;
46
- startedAt: z.ZodOptional<z.ZodString>;
47
- completedAt: z.ZodOptional<z.ZodString>;
48
- error: z.ZodOptional<z.ZodString>;
49
- stdoutStreamUrl: z.ZodOptional<z.ZodString>;
50
- stderrStreamUrl: z.ZodOptional<z.ZodString>;
51
- }, z.core.$strip>;
52
- }, z.core.$strip>], "success">;
53
- export declare const ExecutionListDataSchema: z.ZodObject<{
54
- executions: z.ZodArray<z.ZodObject<{
55
- executionId: z.ZodString;
56
- sandboxId: z.ZodString;
57
- type: z.ZodOptional<z.ZodString>;
58
- status: z.ZodEnum<{
59
- timeout: "timeout";
60
- failed: "failed";
61
- completed: "completed";
62
- running: "running";
63
- queued: "queued";
64
- cancelled: "cancelled";
65
- }>;
66
- command: z.ZodOptional<z.ZodArray<z.ZodString>>;
67
- exitCode: z.ZodOptional<z.ZodNumber>;
68
- durationMs: z.ZodOptional<z.ZodNumber>;
69
- startedAt: z.ZodOptional<z.ZodString>;
70
- completedAt: z.ZodOptional<z.ZodString>;
71
- error: z.ZodOptional<z.ZodString>;
72
- stdoutStreamUrl: z.ZodOptional<z.ZodString>;
73
- stderrStreamUrl: z.ZodOptional<z.ZodString>;
74
- }, z.core.$strip>>;
75
- }, z.core.$strip>;
76
- export declare const ExecutionListResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
77
- success: z.ZodLiteral<false>;
78
- message: z.ZodString;
79
- code: z.ZodOptional<z.ZodString>;
80
- }, z.core.$strip>, z.ZodObject<{
81
- success: z.ZodLiteral<true>;
82
- data: z.ZodObject<{
83
- executions: z.ZodArray<z.ZodObject<{
84
- executionId: z.ZodString;
85
- sandboxId: z.ZodString;
86
- type: z.ZodOptional<z.ZodString>;
87
- status: z.ZodEnum<{
88
- timeout: "timeout";
89
- failed: "failed";
90
- completed: "completed";
91
- running: "running";
92
- queued: "queued";
93
- cancelled: "cancelled";
94
- }>;
95
- command: z.ZodOptional<z.ZodArray<z.ZodString>>;
96
- exitCode: z.ZodOptional<z.ZodNumber>;
97
- durationMs: z.ZodOptional<z.ZodNumber>;
98
- startedAt: z.ZodOptional<z.ZodString>;
99
- completedAt: z.ZodOptional<z.ZodString>;
100
- error: z.ZodOptional<z.ZodString>;
101
- stdoutStreamUrl: z.ZodOptional<z.ZodString>;
102
- stderrStreamUrl: z.ZodOptional<z.ZodString>;
103
- }, z.core.$strip>>;
104
- }, z.core.$strip>;
105
- }, z.core.$strip>], "success">;
106
- export interface ExecutionInfo {
107
- executionId: string;
108
- sandboxId: string;
109
- type?: string;
110
- status: ExecutionStatus;
111
- command?: string[];
112
- exitCode?: number;
113
- durationMs?: number;
114
- startedAt?: string;
115
- completedAt?: string;
116
- error?: string;
117
- stdoutStreamUrl?: string;
118
- stderrStreamUrl?: string;
119
- }
120
- export interface ExecutionGetParams {
121
- executionId: string;
122
- orgId?: string;
123
- /**
124
- * Optional wait duration for long-polling. If specified, the server will hold
125
- * the connection open until the execution reaches a terminal state (completed,
126
- * failed, timeout, cancelled) or the wait duration expires.
127
- *
128
- * Format: duration string like "30s", "1m", "5m"
129
- * Maximum: 5 minutes (server will cap at this value)
130
- *
131
- * If not specified, returns immediately with current status.
132
- */
133
- wait?: string;
134
- }
135
- /**
136
- * Retrieves detailed information about a specific execution.
137
- *
138
- * @param client - The API client to use for the request
139
- * @param params - Parameters including the execution ID and optional wait duration
140
- * @returns Detailed execution information including status, timing, and errors
141
- * @throws {SandboxResponseError} If the execution is not found or request fails
142
- *
143
- * @example
144
- * // Immediate return (current behavior)
145
- * const info = await executionGet(client, { executionId: 'exec_123' });
146
- *
147
- * @example
148
- * // Long-poll: wait up to 60 seconds for completion
149
- * const info = await executionGet(client, { executionId: 'exec_123', wait: '60s' });
150
- */
151
- export declare function executionGet(client: APIClient, params: ExecutionGetParams): Promise<ExecutionInfo>;
152
- export interface ExecutionListParams {
153
- sandboxId: string;
154
- orgId?: string;
155
- limit?: number;
156
- }
157
- export interface ExecutionListResponse {
158
- executions: ExecutionInfo[];
159
- }
160
- /**
161
- * Lists all executions for a specific sandbox.
162
- *
163
- * @param client - The API client to use for the request
164
- * @param params - Parameters including the sandbox ID and optional limit
165
- * @returns List of execution information for the sandbox
166
- * @throws {SandboxResponseError} If the sandbox is not found or request fails
167
- */
168
- export declare function executionList(client: APIClient, params: ExecutionListParams): Promise<ExecutionListResponse>;
169
- //# sourceMappingURL=execution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution.d.ts","sour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ED,MAAM,WAAW,mBAAmB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACrC,UAAU,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAClC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,mBAAmB,GACzB,OAAO,CAAC,qBAAqB,CAAC,CAqChC"}
@@ -1,118 +0,0 @@
1
- import { z } from 'zod';
2
- import { APIResponseSchema } from "../api.js";
3
- import { API_VERSION, throwSandboxError } from "./util.js";
4
- export const ExecutionInfoSchema = z
5
- .object({
6
- executionId: z.string().describe('Unique identifier for the execution'),
7
- sandboxId: z.string().describe('ID of the sandbox where the execution ran'),
8
- type: z
9
- .string()
10
- .optional()
11
- .describe('Type of execution (e.g., exec, write_files, read_file)'),
12
- status: z
13
- .enum(['queued', 'running', 'completed', 'failed', 'timeout', 'cancelled'])
14
- .describe('Current status of the execution'),
15
- command: z.array(z.string()).optional().describe('Command that was executed'),
16
- exitCode: z.number().optional().describe('Exit code of the executed command'),
17
- durationMs: z.number().optional().describe('Execution duration in milliseconds'),
18
- startedAt: z.string().optional().describe('ISO timestamp when execution started'),
19
- completedAt: z.string().optional().describe('ISO timestamp when execution completed'),
20
- error: z.string().optional().describe('Error message if execution failed'),
21
- stdoutStreamUrl: z.string().optional().describe('URL to stream stdout output'),
22
- stderrStreamUrl: z.string().optional().describe('URL to stream stderr output'),
23
- })
24
- .describe('Detailed information about a command execution');
25
- export const ExecutionGetResponseSchema = APIResponseSchema(ExecutionInfoSchema);
26
- export const ExecutionListDataSchema = z
27
- .object({
28
- executions: z.array(ExecutionInfoSchema).describe('List of executions'),
29
- })
30
- .describe('List of executions for a sandbox');
31
- export const ExecutionListResponseSchema = APIResponseSchema(ExecutionListDataSchema);
32
- /**
33
- * Retrieves detailed information about a specific execution.
34
- *
35
- * @param client - The API client to use for the request
36
- * @param params - Parameters including the execution ID and optional wait duration
37
- * @returns Detailed execution information including status, timing, and errors
38
- * @throws {SandboxResponseError} If the execution is not found or request fails
39
- *
40
- * @example
41
- * // Immediate return (current behavior)
42
- * const info = await executionGet(client, { executionId: 'exec_123' });
43
- *
44
- * @example
45
- * // Long-poll: wait up to 60 seconds for completion
46
- * const info = await executionGet(client, { executionId: 'exec_123', wait: '60s' });
47
- */
48
- export async function executionGet(client, params) {
49
- const { executionId, orgId, wait } = params;
50
- const queryParams = new URLSearchParams();
51
- if (orgId) {
52
- queryParams.set('orgId', orgId);
53
- }
54
- if (wait) {
55
- queryParams.set('wait', wait);
56
- }
57
- const queryString = queryParams.toString();
58
- const url = `/sandbox/${API_VERSION}/execution/${executionId}${queryString ? `?${queryString}` : ''}`;
59
- const resp = await client.get(url, ExecutionGetResponseSchema);
60
- if (resp.success) {
61
- return {
62
- executionId: resp.data.executionId,
63
- sandboxId: resp.data.sandboxId,
64
- type: resp.data.type,
65
- status: resp.data.status,
66
- command: resp.data.command,
67
- exitCode: resp.data.exitCode,
68
- durationMs: resp.data.durationMs,
69
- startedAt: resp.data.startedAt,
70
- completedAt: resp.data.completedAt,
71
- error: resp.data.error,
72
- stdoutStreamUrl: resp.data.stdoutStreamUrl,
73
- stderrStreamUrl: resp.data.stderrStreamUrl,
74
- };
75
- }
76
- throwSandboxError(resp, { executionId });
77
- }
78
- /**
79
- * Lists all executions for a specific sandbox.
80
- *
81
- * @param client - The API client to use for the request
82
- * @param params - Parameters including the sandbox ID and optional limit
83
- * @returns List of execution information for the sandbox
84
- * @throws {SandboxResponseError} If the sandbox is not found or request fails
85
- */
86
- export async function executionList(client, params) {
87
- const { sandboxId, orgId, limit } = params;
88
- const queryParams = new URLSearchParams();
89
- if (orgId) {
90
- queryParams.set('orgId', orgId);
91
- }
92
- if (limit !== undefined) {
93
- queryParams.set('limit', String(limit));
94
- }
95
- const queryString = queryParams.toString();
96
- const url = `/sandbox/${API_VERSION}/sandboxes/${sandboxId}/executions${queryString ? `?${queryString}` : ''}`;
97
- const resp = await client.get(url, ExecutionListResponseSchema);
98
- if (resp.success) {
99
- return {
100
- executions: resp.data.executions.map((exec) => ({
101
- executionId: exec.executionId,
102
- sandboxId: exec.sandboxId,
103
- type: exec.type,
104
- status: exec.status,
105
- command: exec.command,
106
- exitCode: exec.exitCode,
107
- durationMs: exec.durationMs,
108
- startedAt: exec.startedAt,
109
- completedAt: exec.completedAt,
110
- error: exec.error,
111
- stdoutStreamUrl: exec.stdoutStreamUrl,
112
- stderrStreamUrl: exec.stderrStreamUrl,
113
- })),
114
- };
115
- }
116
- throwSandboxError(resp, { sandboxId });
117
- }
118
- //# sourceMappingURL=execution.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution.js","sourceRoot":"","sources":["../../../src/api/sandbox/execution.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE3D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KAClC,MAAM,CAAC;IACP,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IACvE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;IAC3E,IAAI,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,wDAAwD,CAAC;IACpE,MAAM,EAAE,CAAC;SACP,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;SAC1E,QAAQ,CAAC,iCAAiC,CAAC;IAC7C,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CA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EAAE,IAAI,CAAC,UAAU;gBAC3B,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,eAAe,EAAE,IAAI,CAAC,eAAe;gBACrC,eAAe,EAAE,IAAI,CAAC,eAAe;aACrC,CAAC,CAAC;SACH,CAAC;IACH,CAAC;IAED,iBAAiB,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;AACxC,CAAC"}
@@ -1,261 +0,0 @@
1
- import { z } from 'zod';
2
- import { APIClient } from '../api.ts';
3
- import type { FileToWrite } from '@agentuity/core';
4
- export declare const FileToWriteSchema: z.ZodObject<{
5
- path: z.ZodString;
6
- content: z.ZodString;
7
- }, z.core.$strip>;
8
- export declare const WriteFilesRequestSchema: z.ZodObject<{
9
- files: z.ZodArray<z.ZodObject<{
10
- path: z.ZodString;
11
- content: z.ZodString;
12
- }, z.core.$strip>>;
13
- }, z.core.$strip>;
14
- export declare const WriteFilesDataSchema: z.ZodObject<{
15
- filesWritten: z.ZodNumber;
16
- }, z.core.$strip>;
17
- export declare const WriteFilesResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
18
- success: z.ZodLiteral<false>;
19
- message: z.ZodString;
20
- }, z.core.$strip>, z.ZodObject<{
21
- success: z.ZodLiteral<true>;
22
- data: z.ZodOptional<z.ZodObject<{
23
- filesWritten: z.ZodNumber;
24
- }, z.core.$strip>>;
25
- filesWritten: z.ZodOptional<z.ZodNumber>;
26
- }, z.core.$strip>], "success">;
27
- export interface WriteFilesParams {
28
- sandboxId: string;
29
- files: FileToWrite[];
30
- orgId?: string;
31
- signal?: AbortSignal;
32
- }
33
- export interface WriteFilesResult {
34
- filesWritten: number;
35
- }
36
- /**
37
- * Writes files to a sandbox workspace.
38
- *
39
- * @param client - The API client to use for the request
40
- * @param params - Parameters including sandbox ID and files to write
41
- * @returns The result including number of files written
42
- * @throws {SandboxResponseError} If the write request fails
43
- */
44
- export declare function sandboxWriteFiles(client: APIClient, params: WriteFilesParams): Promise<WriteFilesResult>;
45
- export interface ReadFileParams {
46
- sandboxId: string;
47
- path: string;
48
- orgId?: string;
49
- signal?: AbortSignal;
50
- }
51
- /**
52
- * Reads a file from a sandbox workspace.
53
- *
54
- * @param client - The API client to use for the request
55
- * @param params - Parameters including sandbox ID and file path
56
- * @returns A ReadableStream of the file contents
57
- * @throws {SandboxResponseError} If the read request fails
58
- */
59
- export declare function sandboxReadFile(client: APIClient, params: ReadFileParams): Promise<ReadableStream<Uint8Array>>;
60
- export declare const MkDirRequestSchema: z.ZodObject<{
61
- path: z.ZodString;
62
- recursive: z.ZodOptional<z.ZodBoolean>;
63
- }, z.core.$strip>;
64
- export declare const MkDirResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
65
- success: z.ZodLiteral<false>;
66
- message: z.ZodString;
67
- }, z.core.$strip>, z.ZodObject<{
68
- success: z.ZodLiteral<true>;
69
- }, z.core.$strip>], "success">;
70
- export interface MkDirParams {
71
- sandboxId: string;
72
- path: string;
73
- recursive?: boolean;
74
- orgId?: string;
75
- signal?: AbortSignal;
76
- }
77
- /**
78
- * Creates a directory in a sandbox workspace.
79
- *
80
- * @param client - The API client to use for the request
81
- * @param params - Parameters including sandbox ID, path, and recursive flag
82
- * @throws {SandboxResponseError} If the mkdir request fails
83
- */
84
- export declare function sandboxMkDir(client: APIClient, params: MkDirParams): Promise<void>;
85
- export declare const RmDirRequestSchema: z.ZodObject<{
86
- path: z.ZodString;
87
- recursive: z.ZodOptional<z.ZodBoolean>;
88
- }, z.core.$strip>;
89
- export declare const RmDirResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
90
- success: z.ZodLiteral<false>;
91
- message: z.ZodString;
92
- }, z.core.$strip>, z.ZodObject<{
93
- success: z.ZodLiteral<true>;
94
- }, z.core.$strip>], "success">;
95
- export interface RmDirParams {
96
- sandboxId: string;
97
- path: string;
98
- recursive?: boolean;
99
- orgId?: string;
100
- signal?: AbortSignal;
101
- }
102
- /**
103
- * Removes a directory from a sandbox workspace.
104
- *
105
- * @param client - The API client to use for the request
106
- * @param params - Parameters including sandbox ID, path, and recursive flag
107
- * @throws {SandboxResponseError} If the rmdir request fails
108
- */
109
- export declare function sandboxRmDir(client: APIClient, params: RmDirParams): Promise<void>;
110
- export declare const RmFileRequestSchema: z.ZodObject<{
111
- path: z.ZodString;
112
- }, z.core.$strip>;
113
- export declare const RmFileResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
114
- success: z.ZodLiteral<false>;
115
- message: z.ZodString;
116
- }, z.core.$strip>, z.ZodObject<{
117
- success: z.ZodLiteral<true>;
118
- }, z.core.$strip>], "success">;
119
- export interface RmFileParams {
120
- sandboxId: string;
121
- path: string;
122
- orgId?: string;
123
- signal?: AbortSignal;
124
- }
125
- /**
126
- * Removes a file from a sandbox workspace.
127
- *
128
- * @param client - The API client to use for the request
129
- * @param params - Parameters including sandbox ID and path
130
- * @throws {SandboxResponseError} If the rm request fails
131
- */
132
- export declare function sandboxRmFile(client: APIClient, params: RmFileParams): Promise<void>;
133
- export declare const FileInfoSchema: z.ZodObject<{
134
- path: z.ZodString;
135
- size: z.ZodNumber;
136
- isDir: z.ZodBoolean;
137
- mode: z.ZodString;
138
- modTime: z.ZodString;
139
- }, z.core.$strip>;
140
- export declare const ListFilesDataSchema: z.ZodObject<{
141
- files: z.ZodArray<z.ZodObject<{
142
- path: z.ZodString;
143
- size: z.ZodNumber;
144
- isDir: z.ZodBoolean;
145
- mode: z.ZodString;
146
- modTime: z.ZodString;
147
- }, z.core.$strip>>;
148
- }, z.core.$strip>;
149
- export declare const ListFilesResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
150
- success: z.ZodLiteral<false>;
151
- message: z.ZodString;
152
- }, z.core.$strip>, z.ZodObject<{
153
- success: z.ZodLiteral<true>;
154
- data: z.ZodObject<{
155
- files: z.ZodArray<z.ZodObject<{
156
- path: z.ZodString;
157
- size: z.ZodNumber;
158
- isDir: z.ZodBoolean;
159
- mode: z.ZodString;
160
- modTime: z.ZodString;
161
- }, z.core.$strip>>;
162
- }, z.core.$strip>;
163
- }, z.core.$strip>], "success">;
164
- export interface FileInfo {
165
- path: string;
166
- size: number;
167
- isDir: boolean;
168
- mode: string;
169
- modTime: string;
170
- }
171
- export interface ListFilesParams {
172
- sandboxId: string;
173
- path?: string;
174
- orgId?: string;
175
- signal?: AbortSignal;
176
- }
177
- export interface ListFilesResult {
178
- files: FileInfo[];
179
- }
180
- /**
181
- * Lists files in a sandbox workspace directory.
182
- *
183
- * @param client - The API client to use for the request
184
- * @param params - Parameters including sandbox ID and optional path
185
- * @returns The list of files and directories
186
- * @throws {SandboxResponseError} If the list request fails
187
- */
188
- export declare function sandboxListFiles(client: APIClient, params: ListFilesParams): Promise<ListFilesResult>;
189
- export type ArchiveFormat = 'zip' | 'tar.gz';
190
- export interface DownloadArchiveParams {
191
- sandboxId: string;
192
- path?: string;
193
- format?: ArchiveFormat;
194
- orgId?: string;
195
- signal?: AbortSignal;
196
- }
197
- /**
198
- * Downloads files from a sandbox as a compressed archive.
199
- *
200
- * @param client - The API client to use for the request
201
- * @param params - Parameters including sandbox ID, path, and format
202
- * @returns A ReadableStream of the archive contents
203
- * @throws {SandboxResponseError} If the download request fails
204
- */
205
- export declare function sandboxDownloadArchive(client: APIClient, params: DownloadArchiveParams): Promise<ReadableStream<Uint8Array>>;
206
- export interface UploadArchiveParams {
207
- sandboxId: string;
208
- archive: Uint8Array | ArrayBuffer | ReadableStream<Uint8Array>;
209
- path?: string;
210
- format?: ArchiveFormat | '';
211
- orgId?: string;
212
- signal?: AbortSignal;
213
- }
214
- export declare const UploadArchiveResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
215
- success: z.ZodLiteral<false>;
216
- message: z.ZodString;
217
- }, z.core.$strip>, z.ZodObject<{
218
- success: z.ZodLiteral<true>;
219
- }, z.core.$strip>], "success">;
220
- /**
221
- * Uploads a compressed archive to a sandbox and extracts it.
222
- *
223
- * @param client - The API client to use for the request
224
- * @param params - Parameters including sandbox ID, archive data, path, and optional format
225
- * @throws {SandboxResponseError} If the upload request fails
226
- */
227
- export declare function sandboxUploadArchive(client: APIClient, params: UploadArchiveParams): Promise<void>;
228
- export declare const SetEnvRequestSchema: z.ZodObject<{
229
- env: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
230
- }, z.core.$strip>;
231
- export declare const SetEnvDataSchema: z.ZodObject<{
232
- env: z.ZodRecord<z.ZodString, z.ZodString>;
233
- }, z.core.$strip>;
234
- export declare const SetEnvResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
235
- success: z.ZodLiteral<false>;
236
- message: z.ZodString;
237
- }, z.core.$strip>, z.ZodObject<{
238
- success: z.ZodLiteral<true>;
239
- data: z.ZodObject<{
240
- env: z.ZodRecord<z.ZodString, z.ZodString>;
241
- }, z.core.$strip>;
242
- }, z.core.$strip>], "success">;
243
- export interface SetEnvParams {
244
- sandboxId: string;
245
- env: Record<string, string | null>;
246
- orgId?: string;
247
- signal?: AbortSignal;
248
- }
249
- export interface SetEnvResult {
250
- env: Record<string, string>;
251
- }
252
- /**
253
- * Sets environment variables on a sandbox. Pass null to delete a variable.
254
- *
255
- * @param client - The API client to use for the request
256
- * @param params - Parameters including sandbox ID and env key/value pairs
257
- * @returns The current environment variables after the update
258
- * @throws {SandboxResponseError} If the request fails
259
- */
260
- export declare function sandboxSetEnv(client: APIClient, params: SetEnvParams): Promise<SetEnvResult>;
261
- //# sourceMappingURL=files.d.ts.map