@agentuity/server 1.0.16 → 1.0.18

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 (419) hide show
  1. package/dist/api/apikey/create.d.ts +1 -1
  2. package/dist/api/apikey/create.d.ts.map +1 -1
  3. package/dist/api/apikey/create.js +2 -2
  4. package/dist/api/apikey/create.js.map +1 -1
  5. package/dist/api/apikey/delete.d.ts +1 -1
  6. package/dist/api/apikey/delete.d.ts.map +1 -1
  7. package/dist/api/apikey/delete.js +2 -2
  8. package/dist/api/apikey/delete.js.map +1 -1
  9. package/dist/api/apikey/get.d.ts +1 -1
  10. package/dist/api/apikey/get.d.ts.map +1 -1
  11. package/dist/api/apikey/get.js +2 -2
  12. package/dist/api/apikey/get.js.map +1 -1
  13. package/dist/api/apikey/index.d.ts +5 -5
  14. package/dist/api/apikey/index.d.ts.map +1 -1
  15. package/dist/api/apikey/index.js +5 -5
  16. package/dist/api/apikey/index.js.map +1 -1
  17. package/dist/api/apikey/list.d.ts +1 -1
  18. package/dist/api/apikey/list.d.ts.map +1 -1
  19. package/dist/api/apikey/list.js +2 -2
  20. package/dist/api/apikey/list.js.map +1 -1
  21. package/dist/api/db/index.d.ts +4 -4
  22. package/dist/api/db/index.d.ts.map +1 -1
  23. package/dist/api/db/index.js +4 -4
  24. package/dist/api/db/index.js.map +1 -1
  25. package/dist/api/db/logs.d.ts +1 -1
  26. package/dist/api/db/logs.d.ts.map +1 -1
  27. package/dist/api/db/logs.js +2 -2
  28. package/dist/api/db/logs.js.map +1 -1
  29. package/dist/api/db/query.d.ts +1 -1
  30. package/dist/api/db/query.d.ts.map +1 -1
  31. package/dist/api/db/query.js +2 -2
  32. package/dist/api/db/query.js.map +1 -1
  33. package/dist/api/db/tables.d.ts +1 -1
  34. package/dist/api/db/tables.d.ts.map +1 -1
  35. package/dist/api/db/tables.js +2 -2
  36. package/dist/api/db/tables.js.map +1 -1
  37. package/dist/api/eval/get.d.ts +1 -1
  38. package/dist/api/eval/get.d.ts.map +1 -1
  39. package/dist/api/eval/get.js +1 -1
  40. package/dist/api/eval/get.js.map +1 -1
  41. package/dist/api/eval/index.d.ts +4 -4
  42. package/dist/api/eval/index.d.ts.map +1 -1
  43. package/dist/api/eval/index.js +4 -4
  44. package/dist/api/eval/index.js.map +1 -1
  45. package/dist/api/eval/list.d.ts +1 -1
  46. package/dist/api/eval/list.d.ts.map +1 -1
  47. package/dist/api/eval/list.js +1 -1
  48. package/dist/api/eval/list.js.map +1 -1
  49. package/dist/api/eval/run-get.d.ts +1 -1
  50. package/dist/api/eval/run-get.d.ts.map +1 -1
  51. package/dist/api/eval/run-get.js +1 -1
  52. package/dist/api/eval/run-get.js.map +1 -1
  53. package/dist/api/eval/run-list.d.ts +1 -1
  54. package/dist/api/eval/run-list.d.ts.map +1 -1
  55. package/dist/api/eval/run-list.js +1 -1
  56. package/dist/api/eval/run-list.js.map +1 -1
  57. package/dist/api/index.d.ts +14 -14
  58. package/dist/api/index.d.ts.map +1 -1
  59. package/dist/api/index.js +14 -14
  60. package/dist/api/index.js.map +1 -1
  61. package/dist/api/machine/index.d.ts +2 -2
  62. package/dist/api/machine/index.d.ts.map +1 -1
  63. package/dist/api/machine/index.js +2 -2
  64. package/dist/api/machine/index.js.map +1 -1
  65. package/dist/api/machine/machine.d.ts +1 -1
  66. package/dist/api/machine/machine.d.ts.map +1 -1
  67. package/dist/api/machine/machine.js +2 -2
  68. package/dist/api/machine/machine.js.map +1 -1
  69. package/dist/api/org/env-delete.d.ts +1 -1
  70. package/dist/api/org/env-delete.d.ts.map +1 -1
  71. package/dist/api/org/env-delete.js +2 -2
  72. package/dist/api/org/env-delete.js.map +1 -1
  73. package/dist/api/org/env-get.d.ts +1 -1
  74. package/dist/api/org/env-get.d.ts.map +1 -1
  75. package/dist/api/org/env-get.js +2 -2
  76. package/dist/api/org/env-get.js.map +1 -1
  77. package/dist/api/org/env-update.d.ts +1 -1
  78. package/dist/api/org/env-update.d.ts.map +1 -1
  79. package/dist/api/org/env-update.js +2 -2
  80. package/dist/api/org/env-update.js.map +1 -1
  81. package/dist/api/org/index.d.ts +6 -6
  82. package/dist/api/org/index.d.ts.map +1 -1
  83. package/dist/api/org/index.js +6 -6
  84. package/dist/api/org/index.js.map +1 -1
  85. package/dist/api/org/list.d.ts +1 -1
  86. package/dist/api/org/list.d.ts.map +1 -1
  87. package/dist/api/org/list.js +2 -2
  88. package/dist/api/org/list.js.map +1 -1
  89. package/dist/api/org/resources.d.ts +1 -1
  90. package/dist/api/org/resources.d.ts.map +1 -1
  91. package/dist/api/org/resources.js +2 -2
  92. package/dist/api/org/resources.js.map +1 -1
  93. package/dist/api/project/agent.d.ts +1 -1
  94. package/dist/api/project/agent.d.ts.map +1 -1
  95. package/dist/api/project/agent.js +2 -2
  96. package/dist/api/project/agent.js.map +1 -1
  97. package/dist/api/project/create.d.ts +1 -1
  98. package/dist/api/project/create.d.ts.map +1 -1
  99. package/dist/api/project/create.js +2 -2
  100. package/dist/api/project/create.js.map +1 -1
  101. package/dist/api/project/delete.d.ts +1 -1
  102. package/dist/api/project/delete.d.ts.map +1 -1
  103. package/dist/api/project/delete.js +2 -2
  104. package/dist/api/project/delete.js.map +1 -1
  105. package/dist/api/project/deploy.d.ts +1 -1
  106. package/dist/api/project/deploy.d.ts.map +1 -1
  107. package/dist/api/project/deploy.js +2 -2
  108. package/dist/api/project/deploy.js.map +1 -1
  109. package/dist/api/project/deployment.d.ts +1 -1
  110. package/dist/api/project/deployment.d.ts.map +1 -1
  111. package/dist/api/project/deployment.js +2 -2
  112. package/dist/api/project/deployment.js.map +1 -1
  113. package/dist/api/project/env-delete.d.ts +1 -1
  114. package/dist/api/project/env-delete.d.ts.map +1 -1
  115. package/dist/api/project/env-delete.js +2 -2
  116. package/dist/api/project/env-delete.js.map +1 -1
  117. package/dist/api/project/env-update.d.ts +2 -2
  118. package/dist/api/project/env-update.d.ts.map +1 -1
  119. package/dist/api/project/env-update.js +3 -3
  120. package/dist/api/project/env-update.js.map +1 -1
  121. package/dist/api/project/exists.d.ts +1 -1
  122. package/dist/api/project/exists.d.ts.map +1 -1
  123. package/dist/api/project/exists.js +2 -2
  124. package/dist/api/project/exists.js.map +1 -1
  125. package/dist/api/project/get.d.ts +1 -1
  126. package/dist/api/project/get.d.ts.map +1 -1
  127. package/dist/api/project/get.js +2 -2
  128. package/dist/api/project/get.js.map +1 -1
  129. package/dist/api/project/hostname.d.ts +1 -1
  130. package/dist/api/project/hostname.d.ts.map +1 -1
  131. package/dist/api/project/hostname.js +2 -2
  132. package/dist/api/project/hostname.js.map +1 -1
  133. package/dist/api/project/index.d.ts +13 -13
  134. package/dist/api/project/index.d.ts.map +1 -1
  135. package/dist/api/project/index.js +13 -13
  136. package/dist/api/project/index.js.map +1 -1
  137. package/dist/api/project/list.d.ts +1 -1
  138. package/dist/api/project/list.d.ts.map +1 -1
  139. package/dist/api/project/list.js +2 -2
  140. package/dist/api/project/list.js.map +1 -1
  141. package/dist/api/project/malware.d.ts +1 -1
  142. package/dist/api/project/malware.d.ts.map +1 -1
  143. package/dist/api/project/malware.js +6 -2
  144. package/dist/api/project/malware.js.map +1 -1
  145. package/dist/api/project/update-region.d.ts +1 -1
  146. package/dist/api/project/update-region.d.ts.map +1 -1
  147. package/dist/api/project/update-region.js +2 -2
  148. package/dist/api/project/update-region.js.map +1 -1
  149. package/dist/api/project/util.d.ts +13 -0
  150. package/dist/api/project/util.d.ts.map +1 -1
  151. package/dist/api/project/util.js +1 -0
  152. package/dist/api/project/util.js.map +1 -1
  153. package/dist/api/queue/analytics.d.ts +2 -2
  154. package/dist/api/queue/analytics.d.ts.map +1 -1
  155. package/dist/api/queue/analytics.js +6 -18
  156. package/dist/api/queue/analytics.js.map +1 -1
  157. package/dist/api/queue/destinations.d.ts +2 -2
  158. package/dist/api/queue/destinations.d.ts.map +1 -1
  159. package/dist/api/queue/destinations.js +14 -84
  160. package/dist/api/queue/destinations.js.map +1 -1
  161. package/dist/api/queue/dlq.d.ts +2 -2
  162. package/dist/api/queue/dlq.d.ts.map +1 -1
  163. package/dist/api/queue/dlq.js +8 -46
  164. package/dist/api/queue/dlq.js.map +1 -1
  165. package/dist/api/queue/index.d.ts +10 -10
  166. package/dist/api/queue/index.d.ts.map +1 -1
  167. package/dist/api/queue/index.js +10 -10
  168. package/dist/api/queue/index.js.map +1 -1
  169. package/dist/api/queue/messages.d.ts +2 -2
  170. package/dist/api/queue/messages.d.ts.map +1 -1
  171. package/dist/api/queue/messages.js +17 -107
  172. package/dist/api/queue/messages.js.map +1 -1
  173. package/dist/api/queue/queues.d.ts +2 -2
  174. package/dist/api/queue/queues.d.ts.map +1 -1
  175. package/dist/api/queue/queues.js +9 -39
  176. package/dist/api/queue/queues.js.map +1 -1
  177. package/dist/api/queue/sources.d.ts +2 -2
  178. package/dist/api/queue/sources.d.ts.map +1 -1
  179. package/dist/api/queue/sources.js +15 -98
  180. package/dist/api/queue/sources.js.map +1 -1
  181. package/dist/api/queue/util.d.ts +16 -0
  182. package/dist/api/queue/util.d.ts.map +1 -1
  183. package/dist/api/queue/util.js +64 -0
  184. package/dist/api/queue/util.js.map +1 -1
  185. package/dist/api/queue/websocket.d.ts +1 -1
  186. package/dist/api/queue/websocket.d.ts.map +1 -1
  187. package/dist/api/queue/websocket.js +3 -3
  188. package/dist/api/queue/websocket.js.map +1 -1
  189. package/dist/api/region/create.d.ts +1 -1
  190. package/dist/api/region/create.d.ts.map +1 -1
  191. package/dist/api/region/create.js +2 -2
  192. package/dist/api/region/create.js.map +1 -1
  193. package/dist/api/region/delete.d.ts +1 -1
  194. package/dist/api/region/delete.d.ts.map +1 -1
  195. package/dist/api/region/delete.js +2 -2
  196. package/dist/api/region/delete.js.map +1 -1
  197. package/dist/api/region/index.d.ts +4 -4
  198. package/dist/api/region/index.d.ts.map +1 -1
  199. package/dist/api/region/index.js +4 -4
  200. package/dist/api/region/index.js.map +1 -1
  201. package/dist/api/region/list.d.ts +1 -1
  202. package/dist/api/region/list.d.ts.map +1 -1
  203. package/dist/api/region/list.js +2 -2
  204. package/dist/api/region/list.js.map +1 -1
  205. package/dist/api/region/resources.d.ts +1 -1
  206. package/dist/api/region/resources.d.ts.map +1 -1
  207. package/dist/api/region/resources.js +2 -2
  208. package/dist/api/region/resources.js.map +1 -1
  209. package/dist/api/sandbox/cli-list.d.ts +2 -2
  210. package/dist/api/sandbox/cli-list.d.ts.map +1 -1
  211. package/dist/api/sandbox/cli-list.js +2 -2
  212. package/dist/api/sandbox/cli-list.js.map +1 -1
  213. package/dist/api/sandbox/client.d.ts +1 -1
  214. package/dist/api/sandbox/client.d.ts.map +1 -1
  215. package/dist/api/sandbox/client.js +11 -11
  216. package/dist/api/sandbox/client.js.map +1 -1
  217. package/dist/api/sandbox/create.d.ts +7 -1
  218. package/dist/api/sandbox/create.d.ts.map +1 -1
  219. package/dist/api/sandbox/create.js +4 -4
  220. package/dist/api/sandbox/create.js.map +1 -1
  221. package/dist/api/sandbox/destroy.d.ts +1 -1
  222. package/dist/api/sandbox/destroy.d.ts.map +1 -1
  223. package/dist/api/sandbox/destroy.js +2 -2
  224. package/dist/api/sandbox/destroy.js.map +1 -1
  225. package/dist/api/sandbox/execute.d.ts +1 -1
  226. package/dist/api/sandbox/execute.d.ts.map +1 -1
  227. package/dist/api/sandbox/execute.js +2 -2
  228. package/dist/api/sandbox/execute.js.map +1 -1
  229. package/dist/api/sandbox/execution.d.ts +1 -1
  230. package/dist/api/sandbox/execution.d.ts.map +1 -1
  231. package/dist/api/sandbox/execution.js +2 -2
  232. package/dist/api/sandbox/execution.js.map +1 -1
  233. package/dist/api/sandbox/files.d.ts +1 -1
  234. package/dist/api/sandbox/files.d.ts.map +1 -1
  235. package/dist/api/sandbox/files.js +1 -1
  236. package/dist/api/sandbox/files.js.map +1 -1
  237. package/dist/api/sandbox/get.d.ts +7 -1
  238. package/dist/api/sandbox/get.d.ts.map +1 -1
  239. package/dist/api/sandbox/get.js +3 -3
  240. package/dist/api/sandbox/get.js.map +1 -1
  241. package/dist/api/sandbox/index.d.ts +34 -30
  242. package/dist/api/sandbox/index.d.ts.map +1 -1
  243. package/dist/api/sandbox/index.js +17 -15
  244. package/dist/api/sandbox/index.js.map +1 -1
  245. package/dist/api/sandbox/list.d.ts +10 -1
  246. package/dist/api/sandbox/list.d.ts.map +1 -1
  247. package/dist/api/sandbox/list.js +3 -3
  248. package/dist/api/sandbox/list.js.map +1 -1
  249. package/dist/api/sandbox/pause.d.ts +22 -0
  250. package/dist/api/sandbox/pause.d.ts.map +1 -0
  251. package/dist/api/sandbox/pause.js +25 -0
  252. package/dist/api/sandbox/pause.js.map +1 -0
  253. package/dist/api/sandbox/resolve.d.ts +1 -1
  254. package/dist/api/sandbox/resolve.d.ts.map +1 -1
  255. package/dist/api/sandbox/resolve.js +1 -1
  256. package/dist/api/sandbox/resolve.js.map +1 -1
  257. package/dist/api/sandbox/resume.d.ts +22 -0
  258. package/dist/api/sandbox/resume.d.ts.map +1 -0
  259. package/dist/api/sandbox/resume.js +25 -0
  260. package/dist/api/sandbox/resume.js.map +1 -0
  261. package/dist/api/sandbox/run.d.ts +1 -1
  262. package/dist/api/sandbox/run.d.ts.map +1 -1
  263. package/dist/api/sandbox/run.js +6 -6
  264. package/dist/api/sandbox/run.js.map +1 -1
  265. package/dist/api/sandbox/runtime.d.ts +1 -1
  266. package/dist/api/sandbox/runtime.d.ts.map +1 -1
  267. package/dist/api/sandbox/runtime.js +2 -2
  268. package/dist/api/sandbox/runtime.js.map +1 -1
  269. package/dist/api/sandbox/snapshot.d.ts +1 -1
  270. package/dist/api/sandbox/snapshot.d.ts.map +1 -1
  271. package/dist/api/sandbox/snapshot.js +3 -3
  272. package/dist/api/sandbox/snapshot.js.map +1 -1
  273. package/dist/api/sandbox/util.d.ts +6 -0
  274. package/dist/api/sandbox/util.d.ts.map +1 -1
  275. package/dist/api/sandbox/util.js +6 -0
  276. package/dist/api/sandbox/util.js.map +1 -1
  277. package/dist/api/session/get.d.ts +2 -2
  278. package/dist/api/session/get.d.ts.map +1 -1
  279. package/dist/api/session/get.js +3 -3
  280. package/dist/api/session/get.js.map +1 -1
  281. package/dist/api/session/index.d.ts +3 -3
  282. package/dist/api/session/index.d.ts.map +1 -1
  283. package/dist/api/session/index.js +3 -3
  284. package/dist/api/session/index.js.map +1 -1
  285. package/dist/api/session/list.d.ts +1 -1
  286. package/dist/api/session/list.d.ts.map +1 -1
  287. package/dist/api/session/list.js +2 -2
  288. package/dist/api/session/list.js.map +1 -1
  289. package/dist/api/session/logs.d.ts +1 -1
  290. package/dist/api/session/logs.d.ts.map +1 -1
  291. package/dist/api/session/logs.js +2 -2
  292. package/dist/api/session/logs.js.map +1 -1
  293. package/dist/api/stream/get.d.ts +1 -1
  294. package/dist/api/stream/get.d.ts.map +1 -1
  295. package/dist/api/stream/get.js +2 -2
  296. package/dist/api/stream/get.js.map +1 -1
  297. package/dist/api/stream/index.d.ts +3 -3
  298. package/dist/api/stream/index.d.ts.map +1 -1
  299. package/dist/api/stream/index.js +3 -3
  300. package/dist/api/stream/index.js.map +1 -1
  301. package/dist/api/stream/list.d.ts +1 -1
  302. package/dist/api/stream/list.d.ts.map +1 -1
  303. package/dist/api/stream/list.js +2 -2
  304. package/dist/api/stream/list.js.map +1 -1
  305. package/dist/api/thread/delete.d.ts +1 -1
  306. package/dist/api/thread/delete.d.ts.map +1 -1
  307. package/dist/api/thread/delete.js +2 -2
  308. package/dist/api/thread/delete.js.map +1 -1
  309. package/dist/api/thread/get.d.ts +2 -2
  310. package/dist/api/thread/get.d.ts.map +1 -1
  311. package/dist/api/thread/get.js +3 -3
  312. package/dist/api/thread/get.js.map +1 -1
  313. package/dist/api/thread/index.d.ts +4 -4
  314. package/dist/api/thread/index.d.ts.map +1 -1
  315. package/dist/api/thread/index.js +4 -4
  316. package/dist/api/thread/index.js.map +1 -1
  317. package/dist/api/thread/list.d.ts +1 -1
  318. package/dist/api/thread/list.d.ts.map +1 -1
  319. package/dist/api/thread/list.js +2 -2
  320. package/dist/api/thread/list.js.map +1 -1
  321. package/dist/api/user/index.d.ts +1 -1
  322. package/dist/api/user/index.d.ts.map +1 -1
  323. package/dist/api/user/index.js +1 -1
  324. package/dist/api/user/index.js.map +1 -1
  325. package/dist/api/user/whoami.d.ts +1 -1
  326. package/dist/api/user/whoami.d.ts.map +1 -1
  327. package/dist/api/user/whoami.js +2 -2
  328. package/dist/api/user/whoami.js.map +1 -1
  329. package/dist/index.d.ts +8 -8
  330. package/dist/index.d.ts.map +1 -1
  331. package/dist/index.js +8 -8
  332. package/dist/index.js.map +1 -1
  333. package/dist/runtime-bootstrap.js +1 -1
  334. package/dist/runtime-bootstrap.js.map +1 -1
  335. package/package.json +4 -4
  336. package/src/api/apikey/create.ts +2 -2
  337. package/src/api/apikey/delete.ts +2 -2
  338. package/src/api/apikey/get.ts +2 -2
  339. package/src/api/apikey/index.ts +5 -5
  340. package/src/api/apikey/list.ts +2 -2
  341. package/src/api/db/index.ts +4 -4
  342. package/src/api/db/logs.ts +2 -2
  343. package/src/api/db/query.ts +2 -2
  344. package/src/api/db/tables.ts +2 -2
  345. package/src/api/eval/get.ts +1 -1
  346. package/src/api/eval/index.ts +4 -4
  347. package/src/api/eval/list.ts +1 -1
  348. package/src/api/eval/run-get.ts +1 -1
  349. package/src/api/eval/run-list.ts +1 -1
  350. package/src/api/index.ts +14 -14
  351. package/src/api/machine/index.ts +2 -2
  352. package/src/api/machine/machine.ts +2 -2
  353. package/src/api/org/env-delete.ts +2 -2
  354. package/src/api/org/env-get.ts +2 -2
  355. package/src/api/org/env-update.ts +2 -2
  356. package/src/api/org/index.ts +6 -6
  357. package/src/api/org/list.ts +2 -2
  358. package/src/api/org/resources.ts +2 -2
  359. package/src/api/project/agent.ts +3 -3
  360. package/src/api/project/create.ts +2 -2
  361. package/src/api/project/delete.ts +2 -2
  362. package/src/api/project/deploy.ts +2 -2
  363. package/src/api/project/deployment.ts +2 -2
  364. package/src/api/project/env-delete.ts +2 -2
  365. package/src/api/project/env-update.ts +4 -4
  366. package/src/api/project/exists.ts +2 -2
  367. package/src/api/project/get.ts +2 -2
  368. package/src/api/project/hostname.ts +2 -2
  369. package/src/api/project/index.ts +13 -13
  370. package/src/api/project/list.ts +2 -2
  371. package/src/api/project/malware.ts +6 -2
  372. package/src/api/project/update-region.ts +2 -2
  373. package/src/api/project/util.ts +3 -0
  374. package/src/api/queue/analytics.ts +28 -28
  375. package/src/api/queue/destinations.ts +53 -116
  376. package/src/api/queue/dlq.ts +32 -72
  377. package/src/api/queue/index.ts +10 -10
  378. package/src/api/queue/messages.ts +92 -185
  379. package/src/api/queue/queues.ts +45 -71
  380. package/src/api/queue/sources.ts +51 -136
  381. package/src/api/queue/util.ts +74 -0
  382. package/src/api/queue/websocket.ts +4 -4
  383. package/src/api/region/create.ts +2 -2
  384. package/src/api/region/delete.ts +2 -2
  385. package/src/api/region/index.ts +4 -4
  386. package/src/api/region/list.ts +2 -2
  387. package/src/api/region/resources.ts +2 -2
  388. package/src/api/sandbox/cli-list.ts +3 -3
  389. package/src/api/sandbox/client.ts +11 -11
  390. package/src/api/sandbox/create.ts +4 -4
  391. package/src/api/sandbox/destroy.ts +2 -2
  392. package/src/api/sandbox/execute.ts +2 -2
  393. package/src/api/sandbox/execution.ts +2 -2
  394. package/src/api/sandbox/files.ts +2 -2
  395. package/src/api/sandbox/get.ts +3 -3
  396. package/src/api/sandbox/index.ts +34 -30
  397. package/src/api/sandbox/list.ts +3 -3
  398. package/src/api/sandbox/pause.ts +42 -0
  399. package/src/api/sandbox/resolve.ts +1 -1
  400. package/src/api/sandbox/resume.ts +42 -0
  401. package/src/api/sandbox/run.ts +6 -6
  402. package/src/api/sandbox/runtime.ts +2 -2
  403. package/src/api/sandbox/snapshot.ts +3 -3
  404. package/src/api/sandbox/util.ts +6 -0
  405. package/src/api/session/get.ts +3 -3
  406. package/src/api/session/index.ts +3 -3
  407. package/src/api/session/list.ts +2 -2
  408. package/src/api/session/logs.ts +2 -2
  409. package/src/api/stream/get.ts +2 -2
  410. package/src/api/stream/index.ts +3 -3
  411. package/src/api/stream/list.ts +2 -2
  412. package/src/api/thread/delete.ts +2 -2
  413. package/src/api/thread/get.ts +3 -3
  414. package/src/api/thread/index.ts +4 -4
  415. package/src/api/thread/list.ts +2 -2
  416. package/src/api/user/index.ts +1 -1
  417. package/src/api/user/whoami.ts +2 -2
  418. package/src/index.ts +8 -8
  419. package/src/runtime-bootstrap.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { type APIClient, APIError, APIResponseSchema, APIResponseSchemaNoData } from '../api';
2
+ import { type APIClient, APIResponseSchema, APIResponseSchemaNoData } from '../api.ts';
3
3
  import {
4
4
  type CreateSourceRequest,
5
5
  CreateSourceRequestSchema,
@@ -8,16 +8,14 @@ import {
8
8
  SourceSchema,
9
9
  type UpdateSourceRequest,
10
10
  UpdateSourceRequestSchema,
11
- } from './types';
11
+ } from './types.ts';
12
12
  import {
13
13
  buildQueueHeaders,
14
14
  QueueError,
15
- QueueNotFoundError,
16
15
  queueApiPath,
17
- SourceAlreadyExistsError,
18
- SourceNotFoundError,
19
- } from './util';
20
- import { validateQueueName, validateSourceId, validateSourceName } from './validation';
16
+ withQueueErrorHandling,
17
+ } from './util.ts';
18
+ import { validateQueueName, validateSourceId, validateSourceName } from './validation.ts';
21
19
 
22
20
  export const SourceResponseSchema = APIResponseSchema(z.object({ source: SourceSchema }));
23
21
  export const SourcesListResponseSchema = APIResponseSchema(
@@ -64,63 +62,27 @@ export async function createSource(
64
62
  validateSourceName(params.name);
65
63
 
66
64
  const url = queueApiPath('sources/create', queueName);
65
+ const resp = await withQueueErrorHandling(
66
+ () =>
67
+ client.post(
68
+ url,
69
+ params,
70
+ SourceResponseSchema,
71
+ CreateSourceRequestSchema,
72
+ undefined,
73
+ buildQueueHeaders(options?.orgId)
74
+ ),
75
+ { queueName, sourceName: params.name }
76
+ );
67
77
 
68
- try {
69
- const resp = await client.post(
70
- url,
71
- params,
72
- SourceResponseSchema,
73
- CreateSourceRequestSchema,
74
- undefined,
75
- buildQueueHeaders(options?.orgId)
76
- );
77
-
78
- if (resp.success) {
79
- return resp.data.source;
80
- }
81
-
82
- if (resp.message?.includes('queue') && resp.message?.includes('not found')) {
83
- throw new QueueNotFoundError({
84
- queueName,
85
- message: resp.message,
86
- });
87
- }
88
-
89
- if (resp.message?.includes('already exists')) {
90
- throw new SourceAlreadyExistsError({
91
- queueName,
92
- name: params.name,
93
- message: `A source with name "${params.name}" already exists for queue "${queueName}"`,
94
- });
95
- }
96
-
97
- throw new QueueError({
98
- queueName,
99
- message: resp.message || 'Failed to create source',
100
- });
101
- } catch (error) {
102
- if (error instanceof APIError) {
103
- const message = error.message || '';
104
- if (message.includes('already exists')) {
105
- throw new SourceAlreadyExistsError({
106
- queueName,
107
- name: params.name,
108
- message: `A source with name "${params.name}" already exists for queue "${queueName}"`,
109
- });
110
- }
111
- if (message.includes('queue') && message.includes('not found')) {
112
- throw new QueueNotFoundError({
113
- queueName,
114
- message,
115
- });
116
- }
117
- throw new QueueError({
118
- queueName,
119
- message: message || 'Failed to create source',
120
- });
121
- }
122
- throw error;
78
+ if (resp.success) {
79
+ return resp.data.source;
123
80
  }
81
+
82
+ throw new QueueError({
83
+ queueName,
84
+ message: resp.message || 'Failed to create source',
85
+ });
124
86
  }
125
87
 
126
88
  /**
@@ -153,24 +115,16 @@ export async function listSources(
153
115
  ): Promise<Source[]> {
154
116
  validateQueueName(queueName);
155
117
  const url = queueApiPath('sources/list', queueName);
156
- const resp = await client.get(
157
- url,
158
- SourcesListResponseSchema,
159
- undefined,
160
- buildQueueHeaders(options?.orgId)
118
+ const resp = await withQueueErrorHandling(
119
+ () =>
120
+ client.get(url, SourcesListResponseSchema, undefined, buildQueueHeaders(options?.orgId)),
121
+ { queueName }
161
122
  );
162
123
 
163
124
  if (resp.success) {
164
125
  return resp.data.sources;
165
126
  }
166
127
 
167
- if (resp.message?.includes('not found')) {
168
- throw new QueueNotFoundError({
169
- queueName,
170
- message: resp.message,
171
- });
172
- }
173
-
174
128
  throw new QueueError({
175
129
  queueName,
176
130
  message: resp.message || 'Failed to list sources',
@@ -210,32 +164,15 @@ export async function getSource(
210
164
  validateSourceId(sourceId);
211
165
 
212
166
  const url = queueApiPath('sources/get', queueName, sourceId);
213
- const resp = await client.get(
214
- url,
215
- SourceResponseSchema,
216
- undefined,
217
- buildQueueHeaders(options?.orgId)
167
+ const resp = await withQueueErrorHandling(
168
+ () => client.get(url, SourceResponseSchema, undefined, buildQueueHeaders(options?.orgId)),
169
+ { queueName, sourceId }
218
170
  );
219
171
 
220
172
  if (resp.success) {
221
173
  return resp.data.source;
222
174
  }
223
175
 
224
- if (resp.message?.includes('source') && resp.message?.includes('not found')) {
225
- throw new SourceNotFoundError({
226
- queueName,
227
- sourceId,
228
- message: resp.message,
229
- });
230
- }
231
-
232
- if (resp.message?.includes('queue') && resp.message?.includes('not found')) {
233
- throw new QueueNotFoundError({
234
- queueName,
235
- message: resp.message,
236
- });
237
- }
238
-
239
176
  throw new QueueError({
240
177
  queueName,
241
178
  message: resp.message || 'Failed to get source',
@@ -286,34 +223,23 @@ export async function updateSource(
286
223
  }
287
224
 
288
225
  const url = queueApiPath('sources/update', queueName, sourceId);
289
- const resp = await client.patch(
290
- url,
291
- params,
292
- SourceResponseSchema,
293
- UpdateSourceRequestSchema,
294
- undefined,
295
- buildQueueHeaders(options?.orgId)
226
+ const resp = await withQueueErrorHandling(
227
+ () =>
228
+ client.patch(
229
+ url,
230
+ params,
231
+ SourceResponseSchema,
232
+ UpdateSourceRequestSchema,
233
+ undefined,
234
+ buildQueueHeaders(options?.orgId)
235
+ ),
236
+ { queueName, sourceId }
296
237
  );
297
238
 
298
239
  if (resp.success) {
299
240
  return resp.data.source;
300
241
  }
301
242
 
302
- if (resp.message?.includes('source') && resp.message?.includes('not found')) {
303
- throw new SourceNotFoundError({
304
- queueName,
305
- sourceId,
306
- message: resp.message,
307
- });
308
- }
309
-
310
- if (resp.message?.includes('queue') && resp.message?.includes('not found')) {
311
- throw new QueueNotFoundError({
312
- queueName,
313
- message: resp.message,
314
- });
315
- }
316
-
317
243
  throw new QueueError({
318
244
  queueName,
319
245
  message: resp.message || 'Failed to update source',
@@ -351,32 +277,21 @@ export async function deleteSource(
351
277
  validateSourceId(sourceId);
352
278
 
353
279
  const url = queueApiPath('sources/delete', queueName, sourceId);
354
- const resp = await client.delete(
355
- url,
356
- DeleteSourceResponseSchema,
357
- undefined,
358
- buildQueueHeaders(options?.orgId)
280
+ const resp = await withQueueErrorHandling(
281
+ () =>
282
+ client.delete(
283
+ url,
284
+ DeleteSourceResponseSchema,
285
+ undefined,
286
+ buildQueueHeaders(options?.orgId)
287
+ ),
288
+ { queueName, sourceId }
359
289
  );
360
290
 
361
291
  if (resp.success) {
362
292
  return;
363
293
  }
364
294
 
365
- if (resp.message?.includes('source') && resp.message?.includes('not found')) {
366
- throw new SourceNotFoundError({
367
- queueName,
368
- sourceId,
369
- message: resp.message,
370
- });
371
- }
372
-
373
- if (resp.message?.includes('queue') && resp.message?.includes('not found')) {
374
- throw new QueueNotFoundError({
375
- queueName,
376
- message: resp.message,
377
- });
378
- }
379
-
380
295
  throw new QueueError({
381
296
  queueName,
382
297
  message: resp.message || 'Failed to delete source',
@@ -1,4 +1,5 @@
1
1
  import { StructuredError } from '@agentuity/core';
2
+ import { APIError } from '../api.ts';
2
3
 
3
4
  /**
4
5
  * General queue operation error.
@@ -202,3 +203,76 @@ export function buildQueueHeaders(orgId?: string): Record<string, string> | unde
202
203
  }
203
204
  return undefined;
204
205
  }
206
+
207
+ /**
208
+ * Wraps an API call and translates APIError with HTTP status codes to domain-specific queue errors.
209
+ *
210
+ * - 404 → QueueNotFoundError / MessageNotFoundError / DestinationNotFoundError / SourceNotFoundError
211
+ * - 409 with "already exists" → DestinationAlreadyExistsError / SourceAlreadyExistsError
212
+ *
213
+ * @internal
214
+ */
215
+ export async function withQueueErrorHandling<T>(
216
+ apiCall: () => Promise<T>,
217
+ context: {
218
+ queueName?: string;
219
+ messageId?: string;
220
+ destinationId?: string;
221
+ sourceId?: string;
222
+ sourceName?: string;
223
+ destinationUrl?: string;
224
+ }
225
+ ): Promise<T> {
226
+ try {
227
+ return await apiCall();
228
+ } catch (error) {
229
+ if (error instanceof APIError) {
230
+ if (error.status === 404) {
231
+ if (context.messageId && context.queueName) {
232
+ throw new MessageNotFoundError({
233
+ queueName: context.queueName,
234
+ messageId: context.messageId,
235
+ message: error.message,
236
+ });
237
+ }
238
+ if (context.destinationId && context.queueName) {
239
+ throw new DestinationNotFoundError({
240
+ queueName: context.queueName,
241
+ destinationId: context.destinationId,
242
+ message: error.message,
243
+ });
244
+ }
245
+ if (context.sourceId && context.queueName) {
246
+ throw new SourceNotFoundError({
247
+ queueName: context.queueName,
248
+ sourceId: context.sourceId,
249
+ message: error.message,
250
+ });
251
+ }
252
+ if (context.queueName) {
253
+ throw new QueueNotFoundError({
254
+ queueName: context.queueName,
255
+ message: error.message,
256
+ });
257
+ }
258
+ }
259
+ if (error.status === 409) {
260
+ if (context.destinationUrl && context.queueName) {
261
+ throw new DestinationAlreadyExistsError({
262
+ queueName: context.queueName,
263
+ url: context.destinationUrl,
264
+ message: error.message,
265
+ });
266
+ }
267
+ if (context.sourceName && context.queueName) {
268
+ throw new SourceAlreadyExistsError({
269
+ queueName: context.queueName,
270
+ name: context.sourceName,
271
+ message: error.message,
272
+ });
273
+ }
274
+ }
275
+ }
276
+ throw error;
277
+ }
278
+ }
@@ -41,10 +41,10 @@
41
41
  * ```
42
42
  */
43
43
 
44
- import type { Message } from './types';
45
- import { WebSocketAuthResponseSchema, WebSocketMessageSchema } from './types';
46
- import { QueueError } from './util';
47
- import { validateQueueName } from './validation';
44
+ import type { Message } from './types.ts';
45
+ import { WebSocketAuthResponseSchema, WebSocketMessageSchema } from './types.ts';
46
+ import { QueueError } from './util.ts';
47
+ import { validateQueueName } from './validation.ts';
48
48
 
49
49
  // ============================================================================
50
50
  // Types
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { APIResponseSchema, APIClient } from '../api';
3
- import { RegionResponseError } from './util';
2
+ import { APIResponseSchema, APIClient } from '../api.ts';
3
+ import { RegionResponseError } from './util.ts';
4
4
 
5
5
  /**
6
6
  * Database name validation regex - must match catalyst server validation:
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { APIResponseSchema, APIClient } from '../api';
3
- import { RegionResponseError } from './util';
2
+ import { APIResponseSchema, APIClient } from '../api.ts';
3
+ import { RegionResponseError } from './util.ts';
4
4
 
5
5
  export const DeleteResourceSpec = z.object({
6
6
  type: z.enum(['db', 's3']).describe('the resource type'),
@@ -1,4 +1,4 @@
1
- export * from './list';
2
- export * from './resources';
3
- export * from './create';
4
- export * from './delete';
1
+ export * from './list.ts';
2
+ export * from './resources.ts';
3
+ export * from './create.ts';
4
+ export * from './delete.ts';
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { APIResponseSchema, APIClient } from '../api';
3
- import { RegionResponseError } from './util';
2
+ import { APIResponseSchema, APIClient } from '../api.ts';
3
+ import { RegionResponseError } from './util.ts';
4
4
 
5
5
  export const ListRegionsResponse = z.array(
6
6
  z.object({
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { APIResponseSchema, APIClient } from '../api';
3
- import { RegionResponseError } from './util';
2
+ import { APIResponseSchema, APIClient } from '../api.ts';
3
+ import { RegionResponseError } from './util.ts';
4
4
 
5
5
  export const ResourceListResponse = z.object({
6
6
  s3: z.array(
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { type APIClient, APIResponseSchema } from '../api';
3
- import { SandboxResponseError } from './util';
2
+ import { type APIClient, APIResponseSchema } from '../api.ts';
3
+ import { SandboxResponseError } from './util.ts';
4
4
 
5
5
  export const SandboxInfoSchema = z.object({
6
6
  id: z.string().describe('the sandbox id'),
@@ -45,7 +45,7 @@ export interface CLISandboxListOptions {
45
45
  /**
46
46
  * Filter by sandbox status
47
47
  */
48
- status?: 'creating' | 'idle' | 'running' | 'terminated' | 'failed';
48
+ status?: 'creating' | 'idle' | 'running' | 'paused' | 'stopping' | 'suspended' | 'terminated' | 'failed';
49
49
  /**
50
50
  * Maximum number of sandboxes to return (default: 50, max: 100)
51
51
  */
@@ -9,17 +9,17 @@ import type {
9
9
  SandboxRunResult,
10
10
  } from '@agentuity/core';
11
11
  import type { Readable, Writable } from 'node:stream';
12
- import { APIClient } from '../api';
13
- import { sandboxCreate, type SandboxCreateResponse } from './create';
14
- import { sandboxDestroy } from './destroy';
15
- import { sandboxGet } from './get';
16
- import { sandboxExecute } from './execute';
17
- import { sandboxWriteFiles, sandboxReadFile } from './files';
18
- import { sandboxRun } from './run';
19
- import { executionGet, type ExecutionInfo } from './execution';
20
- import { ConsoleLogger } from '../../logger';
21
- import { getServiceUrls } from '../../config';
22
- import { writeAndDrain } from './util';
12
+ import { APIClient } from '../api.ts';
13
+ import { sandboxCreate, type SandboxCreateResponse } from './create.ts';
14
+ import { sandboxDestroy } from './destroy.ts';
15
+ import { sandboxGet } from './get.ts';
16
+ import { sandboxExecute } from './execute.ts';
17
+ import { sandboxWriteFiles, sandboxReadFile } from './files.ts';
18
+ import { sandboxRun } from './run.ts';
19
+ import { executionGet, type ExecutionInfo } from './execution.ts';
20
+ import { ConsoleLogger } from '../../logger.ts';
21
+ import { getServiceUrls } from '../../config.ts';
22
+ import { writeAndDrain } from './util.ts';
23
23
 
24
24
  // Server-side long-poll wait duration (max 5 minutes supported by server)
25
25
  const EXECUTION_WAIT_DURATION = '5m';
@@ -1,8 +1,8 @@
1
1
  import type { SandboxCreateOptions, SandboxStatus } from '@agentuity/core';
2
2
  import { z } from 'zod';
3
- import { type APIClient, APIResponseSchema } from '../api';
4
- import { NPM_PACKAGE_NAME_PATTERN } from './snapshot-build';
5
- import { API_VERSION, throwSandboxError } from './util';
3
+ import { type APIClient, APIResponseSchema } from '../api.ts';
4
+ import { NPM_PACKAGE_NAME_PATTERN } from './snapshot-build.ts';
5
+ import { API_VERSION, throwSandboxError } from './util.ts';
6
6
 
7
7
  export const SandboxCreateRequestSchema = z
8
8
  .object({
@@ -122,7 +122,7 @@ export const SandboxCreateDataSchema = z
122
122
  .object({
123
123
  sandboxId: z.string().describe('Unique identifier for the created sandbox'),
124
124
  status: z
125
- .enum(['creating', 'idle', 'running', 'terminated', 'failed'])
125
+ .enum(['creating', 'idle', 'running', 'paused', 'stopping', 'suspended', 'terminated', 'failed'])
126
126
  .describe('Current status of the sandbox'),
127
127
  stdoutStreamId: z.string().optional().describe('Stream ID for reading stdout'),
128
128
  stdoutStreamUrl: z.string().optional().describe('URL for streaming stdout output'),
@@ -1,6 +1,6 @@
1
1
  import type { z } from 'zod';
2
- import { type APIClient, APIResponseSchemaNoData } from '../api';
3
- import { API_VERSION, throwSandboxError } from './util';
2
+ import { type APIClient, APIResponseSchemaNoData } from '../api.ts';
3
+ import { API_VERSION, throwSandboxError } from './util.ts';
4
4
 
5
5
  export const DestroyResponseSchema = APIResponseSchemaNoData();
6
6
 
@@ -1,7 +1,7 @@
1
1
  import type { ExecuteOptions, Execution, ExecutionStatus } from '@agentuity/core';
2
2
  import { z } from 'zod';
3
- import { type APIClient, APIResponseSchema } from '../api';
4
- import { API_VERSION, SandboxBusyError, throwSandboxError } from './util';
3
+ import { type APIClient, APIResponseSchema } from '../api.ts';
4
+ import { API_VERSION, SandboxBusyError, throwSandboxError } from './util.ts';
5
5
 
6
6
  export const ExecuteRequestSchema = z
7
7
  .object({
@@ -1,7 +1,7 @@
1
1
  import type { ExecutionStatus } from '@agentuity/core';
2
2
  import { z } from 'zod';
3
- import { type APIClient, APIResponseSchema } from '../api';
4
- import { API_VERSION, throwSandboxError } from './util';
3
+ import { type APIClient, APIResponseSchema } from '../api.ts';
4
+ import { API_VERSION, throwSandboxError } from './util.ts';
5
5
 
6
6
  export const ExecutionInfoSchema = z
7
7
  .object({
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { APIClient } from '../api';
3
- import { SandboxResponseError, throwSandboxError, API_VERSION } from './util';
2
+ import { APIClient } from '../api.ts';
3
+ import { SandboxResponseError, throwSandboxError, API_VERSION } from './util.ts';
4
4
  import type { FileToWrite } from '@agentuity/core';
5
5
 
6
6
  export const FileToWriteSchema = z.object({
@@ -5,8 +5,8 @@ import type {
5
5
  SandboxStatus,
6
6
  } from '@agentuity/core';
7
7
  import { z } from 'zod';
8
- import { type APIClient, APIResponseSchema } from '../api';
9
- import { API_VERSION, throwSandboxError } from './util';
8
+ import { type APIClient, APIResponseSchema } from '../api.ts';
9
+ import { API_VERSION, throwSandboxError } from './util.ts';
10
10
 
11
11
  export const SandboxResourcesSchema = z
12
12
  .object({
@@ -105,7 +105,7 @@ export const SandboxInfoDataSchema = z
105
105
  name: z.string().optional().describe('Sandbox name'),
106
106
  description: z.string().optional().describe('Sandbox description'),
107
107
  status: z
108
- .enum(['creating', 'idle', 'running', 'terminated', 'failed', 'deleted'])
108
+ .enum(['creating', 'idle', 'running', 'paused', 'stopping', 'suspended', 'terminated', 'failed', 'deleted'])
109
109
  .describe('Current status of the sandbox'),
110
110
  mode: z.string().optional().describe('Sandbox mode (interactive or oneshot)'),
111
111
  createdAt: z.string().describe('ISO timestamp when the sandbox was created'),