@madarco/agentbox 0.27.0 → 0.27.2

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 (233) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/{_cloud-attach-WDGM6FL5.js → _cloud-attach-FVD5YJCE.js} +6 -4
  3. package/dist/{chunk-NEF6MDJO.js → chunk-2PCU4OF5.js} +4 -4
  4. package/dist/{chunk-JE6UI5YR.js → chunk-47BVC7FN.js} +7 -59
  5. package/dist/chunk-47BVC7FN.js.map +1 -0
  6. package/dist/chunk-5ZK5MQA2.js +64 -0
  7. package/dist/chunk-5ZK5MQA2.js.map +1 -0
  8. package/dist/{chunk-26IKZRTT.js → chunk-A4OVGMVL.js} +23 -16
  9. package/dist/chunk-A4OVGMVL.js.map +1 -0
  10. package/dist/{chunk-KWOEUFVA.js → chunk-EZWPCTUO.js} +2 -2
  11. package/dist/{chunk-IDH5A4RR.js → chunk-F6NQZ4DC.js} +2 -2
  12. package/dist/chunk-G3H2L3O2.js +0 -0
  13. package/dist/chunk-IMN62QY5.js +285 -0
  14. package/dist/chunk-IMN62QY5.js.map +1 -0
  15. package/dist/chunk-JGZSA5ZI.js +0 -0
  16. package/dist/{chunk-V5XXJH63.js → chunk-JNFUWQ4N.js} +2 -2
  17. package/dist/{chunk-UJEH2NJT.js → chunk-JRXNVEV3.js} +2 -271
  18. package/dist/chunk-JRXNVEV3.js.map +1 -0
  19. package/dist/{chunk-LL7NCMUU.js → chunk-QAJQXZ3N.js} +3 -3
  20. package/dist/{chunk-SJ75AIA2.js → chunk-QJT2XOKH.js} +8 -6
  21. package/dist/{chunk-SJ75AIA2.js.map → chunk-QJT2XOKH.js.map} +1 -1
  22. package/dist/{chunk-HR7NHH5J.js → chunk-RK2CEABS.js} +205 -5
  23. package/dist/{chunk-HR7NHH5J.js.map → chunk-RK2CEABS.js.map} +1 -1
  24. package/dist/chunk-WJFZJZIM.js +0 -0
  25. package/dist/cloud-backends.js +28 -0
  26. package/dist/cloud-backends.js.map +1 -0
  27. package/dist/cloud-poller-SUNA6ZQC-7M5LJHHE.js +0 -0
  28. package/dist/{dist-O3LKOIE7.js → dist-2SXD3ITR.js} +6 -5
  29. package/dist/{dist-O3LKOIE7.js.map → dist-2SXD3ITR.js.map} +1 -1
  30. package/dist/{dist-FTKS2GI4.js → dist-4KTWNGU6.js} +6 -5
  31. package/dist/{dist-WVYAURMF.js → dist-6ZOCQZIP.js} +6 -5
  32. package/dist/{dist-OO52HARR.js → dist-7VCYREHM.js} +22 -20
  33. package/dist/{dist-KQTMCVME.js → dist-TL4YW7KZ.js} +6 -5
  34. package/dist/{dist-KQTMCVME.js.map → dist-TL4YW7KZ.js.map} +1 -1
  35. package/dist/dist-U2SVLJUQ.js +0 -0
  36. package/dist/{dist-TSFVB7AI.js → dist-UUOX4DBX.js} +6 -5
  37. package/dist/{dist-TSFVB7AI.js.map → dist-UUOX4DBX.js.map} +1 -1
  38. package/dist/dist-XSEK7LX3.js +156 -0
  39. package/dist/{dist-Z6L5MM5D.js → dist-YGXQMN2K.js} +6 -5
  40. package/dist/index.js +59 -55
  41. package/dist/index.js.map +1 -1
  42. package/dist/{prepared-state-75DIZ55S-TNJXWMXV.js → prepared-state-75DIZ55S-B33TDOJZ.js} +3 -2
  43. package/dist/prepared-state-75DIZ55S-B33TDOJZ.js.map +1 -0
  44. package/package.json +31 -29
  45. package/runtime/_shared/agentbox-checkpoint-cleanup +0 -0
  46. package/runtime/_shared/agentbox-dockerd-start +0 -0
  47. package/runtime/_shared/agentbox-open +0 -0
  48. package/runtime/_shared/agentbox-portless-trust +0 -0
  49. package/runtime/_shared/agentbox-vnc-start +0 -0
  50. package/runtime/_shared/ctl.cjs +186 -172
  51. package/runtime/_shared/gh-shim +0 -0
  52. package/runtime/_shared/git-shim +0 -0
  53. package/runtime/_shared/linear-shim +0 -0
  54. package/runtime/_shared/ntn-shim +0 -0
  55. package/runtime/digitalocean/agentbox-checkpoint-cleanup +0 -0
  56. package/runtime/digitalocean/agentbox-dockerd-start +0 -0
  57. package/runtime/digitalocean/agentbox-open +0 -0
  58. package/runtime/digitalocean/agentbox-portless-trust +0 -0
  59. package/runtime/digitalocean/agentbox-vnc-start +0 -0
  60. package/runtime/digitalocean/ctl.cjs +186 -172
  61. package/runtime/digitalocean/gh-shim +0 -0
  62. package/runtime/digitalocean/git-shim +0 -0
  63. package/runtime/digitalocean/linear-shim +0 -0
  64. package/runtime/digitalocean/ntn-shim +0 -0
  65. package/runtime/digitalocean/scripts/install-box.sh +0 -0
  66. package/runtime/docker/packages/ctl/dist/bin.cjs +186 -172
  67. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-checkpoint-cleanup +0 -0
  68. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-dockerd-start +0 -0
  69. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-open +0 -0
  70. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-portless-trust +0 -0
  71. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-sshd-start +0 -0
  72. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-vnc-start +0 -0
  73. package/runtime/docker/packages/sandbox-docker/scripts/chromium-resolver +0 -0
  74. package/runtime/docker/packages/sandbox-docker/scripts/gh-shim +0 -0
  75. package/runtime/docker/packages/sandbox-docker/scripts/git-shim +0 -0
  76. package/runtime/docker/packages/sandbox-docker/scripts/linear-shim +0 -0
  77. package/runtime/docker/packages/sandbox-docker/scripts/ntn-shim +0 -0
  78. package/runtime/e2b/agentbox-checkpoint-cleanup +0 -0
  79. package/runtime/e2b/agentbox-dockerd-start +0 -0
  80. package/runtime/e2b/agentbox-open +0 -0
  81. package/runtime/e2b/agentbox-vnc-start +0 -0
  82. package/runtime/e2b/ctl.cjs +186 -172
  83. package/runtime/e2b/gh-shim +0 -0
  84. package/runtime/e2b/git-shim +0 -0
  85. package/runtime/e2b/linear-shim +0 -0
  86. package/runtime/e2b/ntn-shim +0 -0
  87. package/runtime/e2b/scripts/build-template.sh +0 -0
  88. package/runtime/hetzner/agentbox-checkpoint-cleanup +0 -0
  89. package/runtime/hetzner/agentbox-dockerd-start +0 -0
  90. package/runtime/hetzner/agentbox-open +0 -0
  91. package/runtime/hetzner/agentbox-portless-trust +0 -0
  92. package/runtime/hetzner/agentbox-vnc-start +0 -0
  93. package/runtime/hetzner/ctl.cjs +186 -172
  94. package/runtime/hetzner/gh-shim +0 -0
  95. package/runtime/hetzner/git-shim +0 -0
  96. package/runtime/hetzner/linear-shim +0 -0
  97. package/runtime/hetzner/ntn-shim +0 -0
  98. package/runtime/hetzner/scripts/install-box.sh +0 -0
  99. package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
  100. package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
  101. package/runtime/hub/apps/hub/.next/prerender-manifest.json +3 -3
  102. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js +1 -1
  103. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js.nft.json +1 -1
  104. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page/server-reference-manifest.json +1 -1
  105. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
  106. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page/server-reference-manifest.json +12 -12
  107. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page_client-reference-manifest.js +1 -1
  108. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page/server-reference-manifest.json +11 -11
  109. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  110. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page/server-reference-manifest.json +8 -8
  111. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page_client-reference-manifest.js +1 -1
  112. package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js +1 -1
  113. package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js.nft.json +1 -1
  114. package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
  115. package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
  116. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  117. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  118. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  119. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  120. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  121. package/runtime/hub/apps/hub/.next/server/chunks/0zhp_better-auth_dist_adapters_kysely-adapter_index_mjs_1rl4qnh._.js +3 -0
  122. package/runtime/hub/apps/hub/.next/server/chunks/151__@better-auth_core_dist_0ecdp_3._.js +1 -1
  123. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__04h15ml._.js +1 -1
  124. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__04jgk9x._.js +1 -1
  125. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__07ednlo._.js +1 -1
  126. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0a7djvw._.js +1 -1
  127. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1lmiq._.js +5 -5
  128. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ig1bot._.js +1 -1
  129. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0szd4sh._.js +1 -1
  130. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0t7o5ed._.js +1 -1
  131. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-0flwc._.js +1 -1
  132. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-9g0ae._.js +2 -2
  133. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1e4z_-v._.js → [root-of-the-server]__11izd5j._.js} +2 -2
  134. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13ioh5z._.js +1 -1
  135. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13jwk_k._.js +1 -1
  136. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__16_uteg._.js +1 -1
  137. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__16p2m-g._.js +1 -1
  138. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1k8g143._.js → [root-of-the-server]__19pc87s._.js} +2 -2
  139. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_gu2yk._.js +1 -1
  140. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ai-945._.js +1 -1
  141. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1bu2zio._.js +1 -1
  142. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ctczev._.js +1 -1
  143. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1f2sueq._.js +1 -1
  144. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1f9zctr._.js +1 -1
  145. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1md9kdw._.js +1 -1
  146. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mttufy._.js +1 -1
  147. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1pp5oib._.js +1 -1
  148. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qwhzmi._.js +1 -1
  149. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1thipug._.js +1 -1
  150. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1xeczo7._.js +1 -1
  151. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20503l7._.js +1 -1
  152. package/runtime/hub/apps/hub/.next/server/chunks/_0760z6y._.js +3 -3
  153. package/runtime/hub/apps/hub/.next/server/chunks/packages_relay_dist_control-plane_03a-9aj.js +3 -3
  154. package/runtime/hub/apps/hub/.next/server/chunks/ssr/044u_hub__next-internal_server_app_(dashboard)_projects_[id]_page_actions_15f56np.js +1 -1
  155. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_0xy-j7z._.js +1 -1
  156. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_010858m.js +1 -1
  157. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_04zwxnx.js +1 -1
  158. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_06exuc7.js +1 -1
  159. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_0f2ldrt.js +1 -1
  160. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_0f2tzep.js +1 -1
  161. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_116nh32.js +1 -1
  162. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_11dyjcb.js +1 -1
  163. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_1_4knli.js +1 -1
  164. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__08-1wwu._.js +1 -1
  165. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0c9mbcn._.js +1 -1
  166. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0gdfxj4._.js +1 -1
  167. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0kc-hwp._.js +1 -1
  168. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0lu73p6._.js +1 -1
  169. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__10bfmwi._.js +1 -1
  170. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__18qvdzb._.js +1 -1
  171. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__1l2urlw._.js +1 -1
  172. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_03s-ah2._.js +1 -1
  173. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0kpdmm-._.js +1 -1
  174. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ozyjt1._.js +1 -1
  175. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0r4px38._.js +1 -1
  176. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_18w2zeh._.js +1 -1
  177. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_approvals_page_actions_1mi0bpn.js +1 -1
  178. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_boxes_[id]_page_actions_0k7kgn2.js +1 -1
  179. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_page_actions_1t3u0xy.js +1 -1
  180. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_[id]_page_tsx_1-j_972._.js +1 -1
  181. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_components_box-table_tsx_0a9pyn_._.js +1 -1
  182. package/runtime/hub/apps/hub/.next/server/chunks/ssr/packages_relay_dist_control-plane_0ve-wz4.js +1 -1
  183. package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
  184. package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
  185. package/runtime/hub/apps/hub/.next/server/server-reference-manifest.js +1 -1
  186. package/runtime/hub/apps/hub/.next/server/server-reference-manifest.json +18 -18
  187. package/runtime/hub/apps/hub/.next/static/chunks/{44j61g8lm9nvw.js → 1-maeq_pl3z29.js} +1 -1
  188. package/runtime/hub/apps/hub/.next/static/chunks/{3-zanu4ioia5i.js → 1f-pwhlfklk8h.js} +1 -1
  189. package/runtime/hub/apps/hub/.next/static/chunks/{0xdtiy_m2ygv8.js → 1g922r_mc5ciw.js} +1 -1
  190. package/runtime/hub/apps/hub/.next/static/chunks/{26rwu1f2gzemi.js → 2k1tvmngrtdgs.js} +1 -1
  191. package/runtime/hub/apps/hub/.next/static/chunks/{3v6kx35_lwjs8.js → 2omimeqtc8qnp.js} +1 -1
  192. package/runtime/hub/apps/hub/.next/static/chunks/{000a1sa7te1h8.js → 3urpddxa8b_je.js} +1 -1
  193. package/runtime/hub/apps/hub/{chunk-YJ5MJOXK.js → chunk-5ARPIPV4.js} +194 -171
  194. package/runtime/hub/apps/hub/{chunk-EHBJKZCL.js → chunk-AEIOQFZ4.js} +245 -2
  195. package/runtime/hub/apps/hub/dist-2EOAT3PC.js +155 -0
  196. package/runtime/hub/apps/hub/{dist-LYDHYTP2.js → dist-DQIL673Y.js} +2 -2
  197. package/runtime/hub/apps/hub/{dist-GTVVXCBP.js → dist-EURE7AUA.js} +2 -2
  198. package/runtime/hub/apps/hub/{dist-JG45OFT2.js → dist-EYHD64SR.js} +16 -16
  199. package/runtime/hub/apps/hub/{dist-G6TXUSPZ.js → dist-GFXXCXLS.js} +2 -2
  200. package/runtime/hub/apps/hub/{dist-DX6IYMAH.js → dist-IVA2PC7N.js} +2 -2
  201. package/runtime/hub/apps/hub/{dist-6FPPUSWZ.js → dist-MMTT7VYJ.js} +1 -1
  202. package/runtime/hub/apps/hub/{dist-3I7KUI6W.js → dist-TAWVTJGU.js} +2 -2
  203. package/runtime/hub/apps/hub/server.js +28 -15
  204. package/runtime/relay/bin.cjs +37 -3
  205. package/runtime/vercel/agentbox-checkpoint-cleanup +0 -0
  206. package/runtime/vercel/agentbox-dockerd-start +0 -0
  207. package/runtime/vercel/agentbox-open +0 -0
  208. package/runtime/vercel/agentbox-vnc-start +0 -0
  209. package/runtime/vercel/ctl.cjs +186 -172
  210. package/runtime/vercel/gh-shim +0 -0
  211. package/runtime/vercel/git-shim +0 -0
  212. package/runtime/vercel/linear-shim +0 -0
  213. package/runtime/vercel/ntn-shim +0 -0
  214. package/runtime/vercel/scripts/provision.sh +0 -0
  215. package/LICENSE +0 -21
  216. package/dist/chunk-26IKZRTT.js.map +0 -1
  217. package/dist/chunk-JE6UI5YR.js.map +0 -1
  218. package/dist/chunk-UJEH2NJT.js.map +0 -1
  219. package/runtime/hub/apps/hub/.next/server/chunks/0-fj_better-auth_dist_adapters_kysely-adapter_index_mjs_0btft52._.js +0 -3
  220. /package/dist/{_cloud-attach-WDGM6FL5.js.map → _cloud-attach-FVD5YJCE.js.map} +0 -0
  221. /package/dist/{chunk-NEF6MDJO.js.map → chunk-2PCU4OF5.js.map} +0 -0
  222. /package/dist/{chunk-KWOEUFVA.js.map → chunk-EZWPCTUO.js.map} +0 -0
  223. /package/dist/{chunk-IDH5A4RR.js.map → chunk-F6NQZ4DC.js.map} +0 -0
  224. /package/dist/{chunk-V5XXJH63.js.map → chunk-JNFUWQ4N.js.map} +0 -0
  225. /package/dist/{chunk-LL7NCMUU.js.map → chunk-QAJQXZ3N.js.map} +0 -0
  226. /package/dist/{dist-FTKS2GI4.js.map → dist-4KTWNGU6.js.map} +0 -0
  227. /package/dist/{dist-OO52HARR.js.map → dist-6ZOCQZIP.js.map} +0 -0
  228. /package/dist/{dist-WVYAURMF.js.map → dist-7VCYREHM.js.map} +0 -0
  229. /package/dist/{dist-Z6L5MM5D.js.map → dist-XSEK7LX3.js.map} +0 -0
  230. /package/dist/{prepared-state-75DIZ55S-TNJXWMXV.js.map → dist-YGXQMN2K.js.map} +0 -0
  231. /package/runtime/hub/apps/hub/.next/static/{S-yw9-SVffiEHRGm85NzP → Wddru2A-5szSWhZWYoMwi}/_buildManifest.js +0 -0
  232. /package/runtime/hub/apps/hub/.next/static/{S-yw9-SVffiEHRGm85NzP → Wddru2A-5szSWhZWYoMwi}/_clientMiddlewareManifest.js +0 -0
  233. /package/runtime/hub/apps/hub/.next/static/{S-yw9-SVffiEHRGm85NzP → Wddru2A-5szSWhZWYoMwi}/_ssgManifest.js +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  baseFreshnessFromFingerprints,
4
4
  currentCloudBaseFingerprint,
5
5
  openWebAppOnVncScreen
6
- } from "./chunk-EHBJKZCL.js";
6
+ } from "./chunk-AEIOQFZ4.js";
7
7
  import {
8
8
  deleteJob,
9
9
  enqueuePrepareJob,
@@ -15,9 +15,10 @@ import {
15
15
  loadQueue,
16
16
  mintHostInitiatedToken,
17
17
  readJob,
18
+ registerCloudBackendLoader,
18
19
  startRelayDaemon,
19
20
  writeQueueLoginCode
20
- } from "./chunk-YJ5MJOXK.js";
21
+ } from "./chunk-5ARPIPV4.js";
21
22
  import "./chunk-3LAHFDJF.js";
22
23
  import {
23
24
  BOX_WORKSPACE,
@@ -72,13 +73,24 @@ import { promisify } from "node:util";
72
73
  var execFileAsync = promisify(execFile);
73
74
  var DISPLAY_NAME_MAX = 60;
74
75
  var IMPORTERS = {
75
- docker: () => import("./dist-6FPPUSWZ.js"),
76
- daytona: () => import("./dist-JG45OFT2.js"),
77
- hetzner: () => import("./dist-LYDHYTP2.js"),
78
- vercel: () => import("./dist-GTVVXCBP.js"),
79
- e2b: () => import("./dist-G6TXUSPZ.js"),
80
- digitalocean: () => import("./dist-3I7KUI6W.js"),
81
- "remote-docker": () => import("./dist-DX6IYMAH.js")
76
+ docker: () => import("./dist-MMTT7VYJ.js"),
77
+ daytona: () => import("./dist-EYHD64SR.js"),
78
+ hetzner: () => import("./dist-DQIL673Y.js"),
79
+ vercel: () => import("./dist-EURE7AUA.js"),
80
+ e2b: () => import("./dist-GFXXCXLS.js"),
81
+ digitalocean: () => import("./dist-TAWVTJGU.js"),
82
+ "remote-docker": () => import("./dist-IVA2PC7N.js")
83
+ };
84
+ var cloudBackendLoader = {
85
+ id: "agentbox:hub-builtin-cloud-backends",
86
+ // Built-ins only: docker has no cloud backend, and returning null for anything
87
+ // else leaves provider PLUGINS on the relay's own registry path, which is
88
+ // where the SDK-version gate lives.
89
+ resolveBackend: async (name) => {
90
+ if (!isProviderKind(name)) return null;
91
+ return (await IMPORTERS[name]()).providerModule.backend ?? null;
92
+ },
93
+ loadCloudCp: () => import("./dist-2EOAT3PC.js")
82
94
  };
83
95
  var prepareEnqueueChain = /* @__PURE__ */ new Map();
84
96
  async function providerForBox(box) {
@@ -359,7 +371,7 @@ var freshnessCache = /* @__PURE__ */ new Map();
359
371
  async function providerBaseFreshness(id, claudeInstall) {
360
372
  if (id === "docker") {
361
373
  try {
362
- const { evaluateDockerBaseFreshness } = await import("./dist-6FPPUSWZ.js");
374
+ const { evaluateDockerBaseFreshness } = await import("./dist-MMTT7VYJ.js");
363
375
  return await evaluateDockerBaseFreshness({ claudeInstall });
364
376
  } catch {
365
377
  return { state: "unknown" };
@@ -401,7 +413,7 @@ async function listProvidersWithFreshness(base) {
401
413
  );
402
414
  }
403
415
  async function loadRemoteDockerHostViews() {
404
- const rd = await import("./dist-DX6IYMAH.js");
416
+ const rd = await import("./dist-IVA2PC7N.js");
405
417
  const prepared = rd.readPreparedState();
406
418
  const cfg = await loadEffectiveConfig(os.homedir());
407
419
  const dflt = (cfg.effective.box.remoteDockerHost || "").trim();
@@ -782,7 +794,7 @@ function createHubBackend(handle) {
782
794
  const hostSpec = provider.match(/^(?:docker|remote-docker):(.+)$/);
783
795
  if (hostSpec) {
784
796
  const alias = hostSpec[1];
785
- const rd = await import("./dist-DX6IYMAH.js");
797
+ const rd = await import("./dist-IVA2PC7N.js");
786
798
  if (!rd.getHostAlias(alias)) {
787
799
  return { ok: false, error: `unknown remote-docker host '${alias}' \u2014 add it in Settings` };
788
800
  }
@@ -989,7 +1001,7 @@ function createHubBackend(handle) {
989
1001
  },
990
1002
  async addRemoteDockerHost(alias, ssh, opts) {
991
1003
  try {
992
- const rd = await import("./dist-DX6IYMAH.js");
1004
+ const rd = await import("./dist-IVA2PC7N.js");
993
1005
  const trimmedSsh = ssh.trim();
994
1006
  if (!rd.isValidAlias(alias)) {
995
1007
  return {
@@ -1014,7 +1026,7 @@ function createHubBackend(handle) {
1014
1026
  },
1015
1027
  async removeRemoteDockerHost(alias) {
1016
1028
  try {
1017
- const rd = await import("./dist-DX6IYMAH.js");
1029
+ const rd = await import("./dist-IVA2PC7N.js");
1018
1030
  rd.removeHostAlias(alias);
1019
1031
  rd.removePreparedHost(alias);
1020
1032
  const cfg = await loadEffectiveConfig(os.homedir());
@@ -1032,7 +1044,7 @@ function createHubBackend(handle) {
1032
1044
  },
1033
1045
  async bakeRemoteDockerHost(alias) {
1034
1046
  try {
1035
- const rd = await import("./dist-DX6IYMAH.js");
1047
+ const rd = await import("./dist-IVA2PC7N.js");
1036
1048
  if (!rd.getHostAlias(alias)) return { ok: false, error: `no such host alias ${alias}` };
1037
1049
  const spec = `docker:${alias}`;
1038
1050
  const existing = (await loadQueue()).find(
@@ -1073,6 +1085,7 @@ async function main() {
1073
1085
  const app = next({ dev, dir, hostname: host, port });
1074
1086
  await app.prepare();
1075
1087
  const handle = app.getRequestHandler();
1088
+ registerCloudBackendLoader(cloudBackendLoader);
1076
1089
  const daemon = await startRelayDaemon({
1077
1090
  port,
1078
1091
  host,
@@ -11172,6 +11172,7 @@ var {
11172
11172
 
11173
11173
  // src/bin.ts
11174
11174
  var import_node_http3 = require("http");
11175
+ var import_node_url4 = require("url");
11175
11176
 
11176
11177
  // src/types.ts
11177
11178
  var DEFAULT_RELAY_PORT = 8787;
@@ -20504,7 +20505,15 @@ function getConnector(service) {
20504
20505
  }
20505
20506
 
20506
20507
  // src/host-actions.ts
20508
+ var cloudBackendLoader;
20509
+ function registerCloudBackendLoader(loader) {
20510
+ cloudBackendLoader = loader;
20511
+ }
20507
20512
  async function resolveCloudBackend(name) {
20513
+ if (cloudBackendLoader) {
20514
+ const injected = await cloudBackendLoader.resolveBackend(name);
20515
+ if (injected) return injected;
20516
+ }
20508
20517
  if (name === "daytona") {
20509
20518
  const pkg = "@agentbox/sandbox-daytona";
20510
20519
  return loadCloudBackend(pkg, async () => (await import(pkg)).daytonaBackend);
@@ -20546,14 +20555,18 @@ async function resolveCloudBackend(name) {
20546
20555
  return pm.backend;
20547
20556
  });
20548
20557
  }
20549
- throw new Error(`no host executor for cloud backend '${name}'`);
20558
+ const via = cloudBackendLoader ? ` (loader '${cloudBackendLoader.id}' does not provide it)` : "";
20559
+ throw new Error(`no host executor for cloud backend '${name}'${via}`);
20560
+ }
20561
+ function isModuleNotFound(msg) {
20562
+ return /cannot find module|cannot find package|MODULE_NOT_FOUND|ERR_MODULE_NOT_FOUND/i.test(msg);
20550
20563
  }
20551
20564
  async function loadCloudBackend(pkg, load2) {
20552
20565
  try {
20553
20566
  return await load2();
20554
20567
  } catch (err) {
20555
20568
  const msg = err instanceof Error ? err.message : String(err);
20556
- if (/cannot find module|MODULE_NOT_FOUND/i.test(msg)) {
20569
+ if (isModuleNotFound(msg)) {
20557
20570
  throw new Error(
20558
20571
  `relay: cannot load '${pkg}' at runtime \u2014 install it alongside @agentbox/relay (the @madarco/agentbox CLI normally provides this dependency). Original: ${msg}`
20559
20572
  );
@@ -20950,6 +20963,11 @@ async function boxCarriedHostPaths(boxId) {
20950
20963
  var cloudCpModule;
20951
20964
  async function loadCloudCp() {
20952
20965
  if (cloudCpModule) return cloudCpModule;
20966
+ if (cloudBackendLoader) {
20967
+ const mod = await cloudBackendLoader.loadCloudCp();
20968
+ cloudCpModule = mod;
20969
+ return mod;
20970
+ }
20953
20971
  const pkg = "@agentbox/sandbox-cloud";
20954
20972
  try {
20955
20973
  const mod = await import(pkg);
@@ -20957,7 +20975,7 @@ async function loadCloudCp() {
20957
20975
  return mod;
20958
20976
  } catch (err) {
20959
20977
  const msg = err instanceof Error ? err.message : String(err);
20960
- if (/cannot find module|MODULE_NOT_FOUND/i.test(msg)) {
20978
+ if (isModuleNotFound(msg)) {
20961
20979
  throw new Error(
20962
20980
  `relay: cannot load '${pkg}' at runtime \u2014 install it alongside @agentbox/relay (the @madarco/agentbox CLI normally provides this dependency). Original: ${msg}`
20963
20981
  );
@@ -24439,6 +24457,7 @@ program2.command("serve").description("Run the HTTP relay in the foreground").op
24439
24457
  `);
24440
24458
  process.exit(2);
24441
24459
  }
24460
+ await loadInjectedCloudBackends();
24442
24461
  const daemon = await startRelayDaemon({
24443
24462
  port,
24444
24463
  host: opts.host,
@@ -24468,6 +24487,21 @@ program2.command("tail").description("Print recent events (in-container shim; GE
24468
24487
  const reply = await adminGet(`/admin/events?${params.toString()}`, opts.port);
24469
24488
  process.stdout.write(reply + "\n");
24470
24489
  });
24490
+ async function loadInjectedCloudBackends() {
24491
+ const entry = process.env["AGENTBOX_CLOUD_BACKENDS"];
24492
+ if (!entry) return;
24493
+ try {
24494
+ const mod = await import((0, import_node_url4.pathToFileURL)(entry).href);
24495
+ const loader = mod.cloudBackendLoader ?? mod.default;
24496
+ if (!loader) throw new Error("module exports no cloudBackendLoader");
24497
+ registerCloudBackendLoader(loader);
24498
+ } catch (err) {
24499
+ process.stderr.write(
24500
+ `agentbox-relay: could not load cloud backends from ${entry} (${err instanceof Error ? err.message : String(err)}); cloud host actions may fail
24501
+ `
24502
+ );
24503
+ }
24504
+ }
24471
24505
  async function adminPost(path6, body, portStr) {
24472
24506
  const port = Number.parseInt(portStr, 10);
24473
24507
  const json = JSON.stringify(body);
File without changes
File without changes
File without changes
File without changes
@@ -12000,15 +12000,178 @@ var opencodeStateCommand = new Command("opencode-state").description("Report Ope
12000
12000
  process.exit(0);
12001
12001
  });
12002
12002
 
12003
- // ../relay/dist/chunk-KNZCE7J6.js
12003
+ // ../relay/dist/chunk-WDEY7V3V.js
12004
+ var import_crypto = require("crypto");
12004
12005
  var import_promises2 = require("fs/promises");
12005
12006
  var import_os = require("os");
12006
12007
  var import_path = require("path");
12007
- var import_crypto = require("crypto");
12008
12008
  var import_crypto2 = require("crypto");
12009
12009
  var import_crypto3 = require("crypto");
12010
12010
  var DEFAULT_BOX_RELAY_PORT = 8788;
12011
12011
  var RELAY_EVENT_RING_SIZE = 1e3;
12012
+ var PendingPrompts = class {
12013
+ entries = /* @__PURE__ */ new Map();
12014
+ autoApprove = null;
12015
+ onChange = null;
12016
+ /** Install the per-box auto-approve policy (relay server, once at startup). */
12017
+ setAutoApprovePolicy(policy) {
12018
+ this.autoApprove = policy;
12019
+ }
12020
+ /**
12021
+ * Install a change hook fired whenever the pending set is mutated (add /
12022
+ * resolve). Wired by the relay server to the hub notifier so the embedded UI
12023
+ * pushes an update to connected browsers.
12024
+ */
12025
+ setOnChange(fn) {
12026
+ this.onChange = fn;
12027
+ }
12028
+ /**
12029
+ * True when this box opted into `box.autoApproveHostActions`. Records the
12030
+ * bypass to the audit sink as a side effect so the caller short-circuits
12031
+ * with a trail. Returns false when no policy is installed.
12032
+ */
12033
+ consumeAutoApprove(boxId, params) {
12034
+ if (!this.autoApprove || !this.autoApprove.shouldAutoApprove(boxId)) return false;
12035
+ this.autoApprove.audit(boxId, params);
12036
+ return true;
12037
+ }
12038
+ /**
12039
+ * Record a *safe-subset* auto-approval (opening a PR, a contained file copy,
12040
+ * a sanctioned-branch push, …) to the audit sink WITHOUT the blanket
12041
+ * `autoApproveHostActions` opt-in. The handler already decided the action is
12042
+ * safe under `box.autoApproveSafeHostActions`; this just leaves the same
12043
+ * `host-action-auto-approved` trail a full opt-in would, tagged with `reason`.
12044
+ * No-op when no policy is installed (e.g. the stateless poll plane).
12045
+ */
12046
+ noteAutoApprove(boxId, params, reason) {
12047
+ this.autoApprove?.audit(boxId, params, reason);
12048
+ }
12049
+ add(boxId, ev) {
12050
+ return new Promise((resolve4) => {
12051
+ this.entries.set(ev.id, {
12052
+ ev,
12053
+ boxId,
12054
+ resolve: resolve4,
12055
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
12056
+ });
12057
+ this.onChange?.();
12058
+ });
12059
+ }
12060
+ /**
12061
+ * Idempotent: returns true if a pending entry was found + resolved, false
12062
+ * otherwise. The /admin/prompts/answer handler uses the bool to decide
12063
+ * 204 vs 404 — the wrapper treats both as "we're done."
12064
+ */
12065
+ resolve(id, answer, cancelled) {
12066
+ const entry = this.entries.get(id);
12067
+ if (!entry) return false;
12068
+ this.entries.delete(id);
12069
+ entry.resolve({ answer, cancelled });
12070
+ this.onChange?.();
12071
+ return true;
12072
+ }
12073
+ /**
12074
+ * Snapshot of all pending prompts for a given box; used to flush the
12075
+ * backlog to a newly-attached SSE subscriber.
12076
+ */
12077
+ forBox(boxId) {
12078
+ const out = [];
12079
+ for (const entry of this.entries.values()) {
12080
+ if (entry.boxId === boxId) out.push(entry.ev);
12081
+ }
12082
+ return out;
12083
+ }
12084
+ /**
12085
+ * Snapshot of every pending prompt across all boxes, with its boxId and
12086
+ * enqueue time — the hub's Approvals view lists these.
12087
+ */
12088
+ all() {
12089
+ const out = [];
12090
+ for (const entry of this.entries.values()) {
12091
+ out.push({ id: entry.ev.id, boxId: entry.boxId, ev: entry.ev, createdAt: entry.createdAt });
12092
+ }
12093
+ return out;
12094
+ }
12095
+ /** boxId that owns a pending prompt id, or null when unknown. */
12096
+ boxFor(id) {
12097
+ const entry = this.entries.get(id);
12098
+ return entry ? entry.boxId : null;
12099
+ }
12100
+ size() {
12101
+ return this.entries.size;
12102
+ }
12103
+ };
12104
+ var PromptSubscribers = class {
12105
+ byBox = /* @__PURE__ */ new Map();
12106
+ add(boxId, res) {
12107
+ let set = this.byBox.get(boxId);
12108
+ if (!set) {
12109
+ set = /* @__PURE__ */ new Set();
12110
+ this.byBox.set(boxId, set);
12111
+ }
12112
+ set.add(res);
12113
+ }
12114
+ remove(boxId, res) {
12115
+ const set = this.byBox.get(boxId);
12116
+ if (!set) return;
12117
+ set.delete(res);
12118
+ if (set.size === 0) this.byBox.delete(boxId);
12119
+ }
12120
+ forBox(boxId) {
12121
+ const set = this.byBox.get(boxId);
12122
+ return set ? Array.from(set) : [];
12123
+ }
12124
+ /**
12125
+ * Fire-and-forget broadcast. SSE writes that fail (closed socket) are
12126
+ * swallowed — the `res.on('close')` handler in the server route already
12127
+ * deregisters the dead subscriber.
12128
+ */
12129
+ broadcast(boxId, event, data) {
12130
+ const set = this.byBox.get(boxId);
12131
+ if (!set) return;
12132
+ const payload = `event: ${event}
12133
+ data: ${JSON.stringify(data)}
12134
+
12135
+ `;
12136
+ for (const res of set) {
12137
+ try {
12138
+ res.write(payload);
12139
+ } catch {
12140
+ }
12141
+ }
12142
+ }
12143
+ };
12144
+ async function askPrompt(prompts, subscribers, boxId, params, opts) {
12145
+ if (process.env.AGENTBOX_PROMPT === "off") {
12146
+ return { answer: "y" };
12147
+ }
12148
+ if (prompts.consumeAutoApprove(boxId, params)) {
12149
+ return { answer: "y" };
12150
+ }
12151
+ const ev = { id: (0, import_crypto.randomUUID)(), ...params };
12152
+ const promise = prompts.add(boxId, ev);
12153
+ subscribers.broadcast(boxId, "prompt-ask", ev);
12154
+ if (opts?.ttlMs !== void 0 && opts.ttlMs > 0) {
12155
+ const timer = setTimeout(() => {
12156
+ if (prompts.resolve(ev.id, params.defaultAnswer ?? "n", true)) {
12157
+ subscribers.broadcast(boxId, "prompt-resolved", { id: ev.id });
12158
+ }
12159
+ }, opts.ttlMs);
12160
+ if (typeof timer.unref === "function") timer.unref();
12161
+ void promise.then(() => {
12162
+ clearTimeout(timer);
12163
+ });
12164
+ }
12165
+ return promise;
12166
+ }
12167
+ function isPromptAnswerBody(v) {
12168
+ if (!v || typeof v !== "object") return false;
12169
+ const o2 = v;
12170
+ if (typeof o2.id !== "string" || o2.id.length === 0) return false;
12171
+ if (o2.answer !== "y" && o2.answer !== "n") return false;
12172
+ if (o2.cancelled !== void 0 && typeof o2.cancelled !== "boolean") return false;
12173
+ return true;
12174
+ }
12012
12175
  var BoxRegistry = class {
12013
12176
  map = /* @__PURE__ */ new Map();
12014
12177
  register(reg) {
@@ -12219,169 +12382,6 @@ var MemoryStore = class {
12219
12382
  return Promise.resolve();
12220
12383
  }
12221
12384
  };
12222
- var PendingPrompts = class {
12223
- entries = /* @__PURE__ */ new Map();
12224
- autoApprove = null;
12225
- onChange = null;
12226
- /** Install the per-box auto-approve policy (relay server, once at startup). */
12227
- setAutoApprovePolicy(policy) {
12228
- this.autoApprove = policy;
12229
- }
12230
- /**
12231
- * Install a change hook fired whenever the pending set is mutated (add /
12232
- * resolve). Wired by the relay server to the hub notifier so the embedded UI
12233
- * pushes an update to connected browsers.
12234
- */
12235
- setOnChange(fn) {
12236
- this.onChange = fn;
12237
- }
12238
- /**
12239
- * True when this box opted into `box.autoApproveHostActions`. Records the
12240
- * bypass to the audit sink as a side effect so the caller short-circuits
12241
- * with a trail. Returns false when no policy is installed.
12242
- */
12243
- consumeAutoApprove(boxId, params) {
12244
- if (!this.autoApprove || !this.autoApprove.shouldAutoApprove(boxId)) return false;
12245
- this.autoApprove.audit(boxId, params);
12246
- return true;
12247
- }
12248
- /**
12249
- * Record a *safe-subset* auto-approval (opening a PR, a contained file copy,
12250
- * a sanctioned-branch push, …) to the audit sink WITHOUT the blanket
12251
- * `autoApproveHostActions` opt-in. The handler already decided the action is
12252
- * safe under `box.autoApproveSafeHostActions`; this just leaves the same
12253
- * `host-action-auto-approved` trail a full opt-in would, tagged with `reason`.
12254
- * No-op when no policy is installed (e.g. the stateless poll plane).
12255
- */
12256
- noteAutoApprove(boxId, params, reason) {
12257
- this.autoApprove?.audit(boxId, params, reason);
12258
- }
12259
- add(boxId, ev) {
12260
- return new Promise((resolve4) => {
12261
- this.entries.set(ev.id, {
12262
- ev,
12263
- boxId,
12264
- resolve: resolve4,
12265
- createdAt: (/* @__PURE__ */ new Date()).toISOString()
12266
- });
12267
- this.onChange?.();
12268
- });
12269
- }
12270
- /**
12271
- * Idempotent: returns true if a pending entry was found + resolved, false
12272
- * otherwise. The /admin/prompts/answer handler uses the bool to decide
12273
- * 204 vs 404 — the wrapper treats both as "we're done."
12274
- */
12275
- resolve(id, answer, cancelled) {
12276
- const entry = this.entries.get(id);
12277
- if (!entry) return false;
12278
- this.entries.delete(id);
12279
- entry.resolve({ answer, cancelled });
12280
- this.onChange?.();
12281
- return true;
12282
- }
12283
- /**
12284
- * Snapshot of all pending prompts for a given box; used to flush the
12285
- * backlog to a newly-attached SSE subscriber.
12286
- */
12287
- forBox(boxId) {
12288
- const out = [];
12289
- for (const entry of this.entries.values()) {
12290
- if (entry.boxId === boxId) out.push(entry.ev);
12291
- }
12292
- return out;
12293
- }
12294
- /**
12295
- * Snapshot of every pending prompt across all boxes, with its boxId and
12296
- * enqueue time — the hub's Approvals view lists these.
12297
- */
12298
- all() {
12299
- const out = [];
12300
- for (const entry of this.entries.values()) {
12301
- out.push({ id: entry.ev.id, boxId: entry.boxId, ev: entry.ev, createdAt: entry.createdAt });
12302
- }
12303
- return out;
12304
- }
12305
- /** boxId that owns a pending prompt id, or null when unknown. */
12306
- boxFor(id) {
12307
- const entry = this.entries.get(id);
12308
- return entry ? entry.boxId : null;
12309
- }
12310
- size() {
12311
- return this.entries.size;
12312
- }
12313
- };
12314
- var PromptSubscribers = class {
12315
- byBox = /* @__PURE__ */ new Map();
12316
- add(boxId, res) {
12317
- let set = this.byBox.get(boxId);
12318
- if (!set) {
12319
- set = /* @__PURE__ */ new Set();
12320
- this.byBox.set(boxId, set);
12321
- }
12322
- set.add(res);
12323
- }
12324
- remove(boxId, res) {
12325
- const set = this.byBox.get(boxId);
12326
- if (!set) return;
12327
- set.delete(res);
12328
- if (set.size === 0) this.byBox.delete(boxId);
12329
- }
12330
- forBox(boxId) {
12331
- const set = this.byBox.get(boxId);
12332
- return set ? Array.from(set) : [];
12333
- }
12334
- /**
12335
- * Fire-and-forget broadcast. SSE writes that fail (closed socket) are
12336
- * swallowed — the `res.on('close')` handler in the server route already
12337
- * deregisters the dead subscriber.
12338
- */
12339
- broadcast(boxId, event, data) {
12340
- const set = this.byBox.get(boxId);
12341
- if (!set) return;
12342
- const payload = `event: ${event}
12343
- data: ${JSON.stringify(data)}
12344
-
12345
- `;
12346
- for (const res of set) {
12347
- try {
12348
- res.write(payload);
12349
- } catch {
12350
- }
12351
- }
12352
- }
12353
- };
12354
- async function askPrompt(prompts, subscribers, boxId, params, opts) {
12355
- if (process.env.AGENTBOX_PROMPT === "off") {
12356
- return { answer: "y" };
12357
- }
12358
- if (prompts.consumeAutoApprove(boxId, params)) {
12359
- return { answer: "y" };
12360
- }
12361
- const ev = { id: (0, import_crypto.randomUUID)(), ...params };
12362
- const promise = prompts.add(boxId, ev);
12363
- subscribers.broadcast(boxId, "prompt-ask", ev);
12364
- if (opts?.ttlMs !== void 0 && opts.ttlMs > 0) {
12365
- const timer = setTimeout(() => {
12366
- if (prompts.resolve(ev.id, params.defaultAnswer ?? "n", true)) {
12367
- subscribers.broadcast(boxId, "prompt-resolved", { id: ev.id });
12368
- }
12369
- }, opts.ttlMs);
12370
- if (typeof timer.unref === "function") timer.unref();
12371
- void promise.then(() => {
12372
- clearTimeout(timer);
12373
- });
12374
- }
12375
- return promise;
12376
- }
12377
- function isPromptAnswerBody(v) {
12378
- if (!v || typeof v !== "object") return false;
12379
- const o2 = v;
12380
- if (typeof o2.id !== "string" || o2.id.length === 0) return false;
12381
- if (o2.answer !== "y" && o2.answer !== "n") return false;
12382
- if (o2.cancelled !== void 0 && typeof o2.cancelled !== "boolean") return false;
12383
- return true;
12384
- }
12385
12385
  async function gateApproval(deps, boxId, method, params, promptParams) {
12386
12386
  if (deps.mode === "block") {
12387
12387
  if (!deps.prompts || !deps.subscribers) return { kind: "deny" };
@@ -12871,7 +12871,7 @@ function sanitizeGitArgs(args) {
12871
12871
  return Array.isArray(args) ? args.filter((a2) => typeof a2 === "string") : [];
12872
12872
  }
12873
12873
 
12874
- // ../relay/dist/chunk-GEIE6TWJ.js
12874
+ // ../relay/dist/chunk-FYIOSAVW.js
12875
12875
  var import_child_process = require("child_process");
12876
12876
  var import_http2 = require("http");
12877
12877
 
@@ -19650,7 +19650,7 @@ var {
19650
19650
  getCancelSignal: getCancelSignal2
19651
19651
  } = getIpcExport();
19652
19652
 
19653
- // ../relay/dist/chunk-GEIE6TWJ.js
19653
+ // ../relay/dist/chunk-FYIOSAVW.js
19654
19654
  var import_promises20 = require("fs/promises");
19655
19655
  var import_os6 = require("os");
19656
19656
  var import_path10 = require("path");
@@ -20036,7 +20036,7 @@ var CODEX_STATIC_EXCLUDES = resolveAgentSpec("codex").staticPaths[0]?.exclude ??
20036
20036
  var CODEX_STATIC_INCLUDES = resolveAgentSpec("codex").staticPaths[0]?.include ?? [];
20037
20037
  var OPENCODE_DATA_EXCLUDES = resolveAgentSpec("opencode").staticPaths[0]?.exclude ?? [];
20038
20038
 
20039
- // ../relay/dist/chunk-GEIE6TWJ.js
20039
+ // ../relay/dist/chunk-FYIOSAVW.js
20040
20040
  var import_child_process2 = require("child_process");
20041
20041
  var import_crypto5 = require("crypto");
20042
20042
  var import_child_process3 = require("child_process");
@@ -21306,7 +21306,7 @@ function getConnector(service) {
21306
21306
  return null;
21307
21307
  }
21308
21308
 
21309
- // ../relay/dist/chunk-GEIE6TWJ.js
21309
+ // ../relay/dist/chunk-FYIOSAVW.js
21310
21310
  var import_crypto6 = require("crypto");
21311
21311
  var import_crypto7 = require("crypto");
21312
21312
  var import_path11 = require("path");
@@ -21848,7 +21848,12 @@ async function canAutoApproveTransfer(input) {
21848
21848
  }
21849
21849
  return true;
21850
21850
  }
21851
+ var cloudBackendLoader;
21851
21852
  async function resolveCloudBackend(name) {
21853
+ if (cloudBackendLoader) {
21854
+ const injected = await cloudBackendLoader.resolveBackend(name);
21855
+ if (injected) return injected;
21856
+ }
21852
21857
  if (name === "daytona") {
21853
21858
  const pkg = "@agentbox/sandbox-daytona";
21854
21859
  return loadCloudBackend(pkg, async () => (await import(pkg)).daytonaBackend);
@@ -21890,14 +21895,18 @@ async function resolveCloudBackend(name) {
21890
21895
  return pm.backend;
21891
21896
  });
21892
21897
  }
21893
- throw new Error(`no host executor for cloud backend '${name}'`);
21898
+ const via = cloudBackendLoader ? ` (loader '${cloudBackendLoader.id}' does not provide it)` : "";
21899
+ throw new Error(`no host executor for cloud backend '${name}'${via}`);
21900
+ }
21901
+ function isModuleNotFound(msg) {
21902
+ return /cannot find module|cannot find package|MODULE_NOT_FOUND|ERR_MODULE_NOT_FOUND/i.test(msg);
21894
21903
  }
21895
21904
  async function loadCloudBackend(pkg, load2) {
21896
21905
  try {
21897
21906
  return await load2();
21898
21907
  } catch (err) {
21899
21908
  const msg = err instanceof Error ? err.message : String(err);
21900
- if (/cannot find module|MODULE_NOT_FOUND/i.test(msg)) {
21909
+ if (isModuleNotFound(msg)) {
21901
21910
  throw new Error(
21902
21911
  `relay: cannot load '${pkg}' at runtime \u2014 install it alongside @agentbox/relay (the @madarco/agentbox CLI normally provides this dependency). Original: ${msg}`
21903
21912
  );
@@ -22294,6 +22303,11 @@ async function boxCarriedHostPaths(boxId) {
22294
22303
  var cloudCpModule;
22295
22304
  async function loadCloudCp() {
22296
22305
  if (cloudCpModule) return cloudCpModule;
22306
+ if (cloudBackendLoader) {
22307
+ const mod = await cloudBackendLoader.loadCloudCp();
22308
+ cloudCpModule = mod;
22309
+ return mod;
22310
+ }
22297
22311
  const pkg = "@agentbox/sandbox-cloud";
22298
22312
  try {
22299
22313
  const mod = await import(pkg);
@@ -22301,7 +22315,7 @@ async function loadCloudCp() {
22301
22315
  return mod;
22302
22316
  } catch (err) {
22303
22317
  const msg = err instanceof Error ? err.message : String(err);
22304
- if (/cannot find module|MODULE_NOT_FOUND/i.test(msg)) {
22318
+ if (isModuleNotFound(msg)) {
22305
22319
  throw new Error(
22306
22320
  `relay: cannot load '${pkg}' at runtime \u2014 install it alongside @agentbox/relay (the @madarco/agentbox CLI normally provides this dependency). Original: ${msg}`
22307
22321
  );
File without changes
File without changes
File without changes
File without changes
File without changes
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Marco D'Alia
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.