@madarco/agentbox 0.28.1 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (452) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/dist/_cloud-attach-HKRHYCY7.js +30 -0
  3. package/dist/{chunk-JNC7MCWJ.js → chunk-3INUZQTR.js} +10 -10
  4. package/dist/chunk-3INUZQTR.js.map +1 -0
  5. package/dist/{chunk-4PR3KJ5X.js → chunk-6PIGTR4D.js} +20 -20
  6. package/dist/{chunk-NHVGKFVY.js → chunk-7LNXTPEE.js} +340 -22
  7. package/dist/chunk-7LNXTPEE.js.map +1 -0
  8. package/dist/{chunk-WB6S4W7O.js → chunk-7Q6BG5AN.js} +2413 -1012
  9. package/dist/chunk-7Q6BG5AN.js.map +1 -0
  10. package/dist/{chunk-BUMKBUXS.js → chunk-7QU6XENE.js} +3 -3
  11. package/dist/chunk-BWE2I5QG.js +17 -0
  12. package/dist/chunk-BWE2I5QG.js.map +1 -0
  13. package/dist/{chunk-7ABO7OIF.js → chunk-CO2I3CQI.js} +4 -4
  14. package/dist/{chunk-OUF3YTQO.js → chunk-DBXCFLAR.js} +14 -17
  15. package/dist/chunk-DBXCFLAR.js.map +1 -0
  16. package/dist/{chunk-74VIUGY6.js → chunk-DYETLPUT.js} +6 -9
  17. package/dist/chunk-DYETLPUT.js.map +1 -0
  18. package/dist/{chunk-HYXCH4GA.js → chunk-EFVTQ7YB.js} +7 -7
  19. package/dist/{chunk-46NNZMZT.js → chunk-EPFXLXCW.js} +372 -72
  20. package/dist/chunk-EPFXLXCW.js.map +1 -0
  21. package/dist/chunk-GWKGSXDC.js +71 -0
  22. package/dist/chunk-GWKGSXDC.js.map +1 -0
  23. package/dist/{chunk-CKD3PRON.js → chunk-GWYD7YBK.js} +12 -9
  24. package/dist/{chunk-CKD3PRON.js.map → chunk-GWYD7YBK.js.map} +1 -1
  25. package/dist/{chunk-NHTRTST5.js → chunk-HNWZO2XU.js} +38 -15
  26. package/dist/chunk-HNWZO2XU.js.map +1 -0
  27. package/dist/{chunk-EVT2SNF2.js → chunk-HO2ACZES.js} +3 -3
  28. package/dist/{chunk-V5NWSLWD.js → chunk-HP4L45LW.js} +14 -14
  29. package/dist/{chunk-B4DAH2F2.js → chunk-LHOKRCNF.js} +3 -3
  30. package/dist/{chunk-G3H2L3O2.js → chunk-MNDKP4VS.js} +23 -3
  31. package/dist/chunk-MNDKP4VS.js.map +1 -0
  32. package/dist/{chunk-JDSYMTMS.js → chunk-NAT2H7J4.js} +110 -66
  33. package/dist/chunk-NAT2H7J4.js.map +1 -0
  34. package/dist/{chunk-KFLGXE3R.js → chunk-NGERWFSA.js} +133 -22
  35. package/dist/chunk-NGERWFSA.js.map +1 -0
  36. package/dist/{chunk-GFOWBXV7.js → chunk-OKLEPEWZ.js} +460 -253
  37. package/dist/chunk-OKLEPEWZ.js.map +1 -0
  38. package/dist/{chunk-YI4GHC2E.js → chunk-QU5BI2HC.js} +12 -15
  39. package/dist/chunk-QU5BI2HC.js.map +1 -0
  40. package/dist/{chunk-BWM56FKY.js → chunk-RQURMAPA.js} +11 -11
  41. package/dist/{chunk-FPMRFMVK.js → chunk-RZCLRWNY.js} +9 -9
  42. package/dist/{chunk-JQLOGVZK.js → chunk-THUST2QK.js} +85 -21
  43. package/dist/chunk-THUST2QK.js.map +1 -0
  44. package/dist/{chunk-OXKW4GWD.js → chunk-UPVP6YGJ.js} +4 -70
  45. package/dist/chunk-UPVP6YGJ.js.map +1 -0
  46. package/dist/{chunk-7RSE7ESY.js → chunk-VVNXQ4XS.js} +27 -18
  47. package/dist/chunk-VVNXQ4XS.js.map +1 -0
  48. package/dist/{chunk-FGQFVUMH.js → chunk-VY54AX4T.js} +3 -3
  49. package/dist/{chunk-OUWVN2F2.js → chunk-WGNI24H2.js} +16 -13
  50. package/dist/chunk-WGNI24H2.js.map +1 -0
  51. package/dist/{chunk-PSA6GADQ.js → chunk-WHFCJBMO.js} +14 -1
  52. package/dist/chunk-WHFCJBMO.js.map +1 -0
  53. package/dist/{chunk-KJ5TCYNI.js → chunk-WHJYOO5H.js} +7 -6
  54. package/dist/chunk-WHJYOO5H.js.map +1 -0
  55. package/dist/cloud-backends.js +5 -5
  56. package/dist/{cloud-poller-SUNA6ZQC-7M5LJHHE.js → cloud-poller-QJRZXB4W-LJ2BRB3L.js} +2 -2
  57. package/dist/{control-plane-5R7PYRQ6.js → control-plane-UKKYXHIQ.js} +19 -18
  58. package/dist/cp-hub-upload-BM2OLTOS.js +81 -0
  59. package/dist/cp-hub-upload-BM2OLTOS.js.map +1 -0
  60. package/dist/{custody-client-PNCC2HBJ.js → custody-client-NPXJ46TB.js} +5 -4
  61. package/dist/{deploy-hetzner-SSGSXAKA.js → deploy-hetzner-Y3ILCDRF.js} +10 -10
  62. package/dist/{dist-RN6JOAG4.js → dist-5OGQ3CJQ.js} +81 -45
  63. package/dist/{dist-5OR4QTQW.js → dist-7B3VCLZI.js} +9 -9
  64. package/dist/{dist-EPFS5PRI.js → dist-A5ZEIVAW.js} +10 -10
  65. package/dist/{dist-6PYXFREL.js → dist-DOEGENNW.js} +61 -16
  66. package/dist/dist-DOEGENNW.js.map +1 -0
  67. package/dist/{dist-XQLKK7H3.js → dist-EOGD7KD6.js} +54 -28
  68. package/dist/dist-EOGD7KD6.js.map +1 -0
  69. package/dist/{dist-XATN4ZIR.js → dist-FBM2WS5S.js} +22 -4
  70. package/dist/{dist-POILUDVJ.js → dist-MUTFY7FA.js} +9 -9
  71. package/dist/{dist-ZNQZHTUN.js → dist-SMDXLPZO.js} +35 -6
  72. package/dist/{dist-M4O5MU5K.js → dist-VTLQKZ2E.js} +8 -8
  73. package/dist/{dist-SN2TCRZ5.js → dist-ZJIJHCZB.js} +9 -9
  74. package/dist/{dist-K5M4HKG7.js → dist-ZNYS7CVF.js} +21 -9
  75. package/dist/host-reach-drainer-ZJU2STQQ.js +9 -0
  76. package/dist/hub-Q4VOF4WN.js +37 -0
  77. package/dist/{hub-adopt-I44VGSBL.js → hub-adopt-OA336ZXZ.js} +8 -8
  78. package/dist/{hub-api-client-WJPBXZAZ.js → hub-api-client-5U6WOTZ3.js} +2 -2
  79. package/dist/{hub-docker-target-REEEWUG2.js → hub-docker-target-JKFCABK4.js} +16 -16
  80. package/dist/index.js +1321 -882
  81. package/dist/index.js.map +1 -1
  82. package/dist/prepare-GFWWKWGF.js +41 -0
  83. package/dist/prepared-custody-KU4PDVBT.js +36 -0
  84. package/dist/{prepared-state-PV3GUBHO-MF56HWMZ.js → prepared-state-LNQ7DYSU-AR5RMXAO.js} +4 -3
  85. package/dist/{publish-credentials-BPHUO5VL.js → publish-credentials-3SQXX45P.js} +11 -11
  86. package/dist/registry-AFKV3EO2.js +18 -0
  87. package/dist/relay-QH6OEY2V.js +20 -0
  88. package/dist/relay-QH6OEY2V.js.map +1 -0
  89. package/dist/{remote-docker-share-RX5ARK45.js → remote-docker-share-RMS6IB5X.js} +11 -11
  90. package/dist/remote-docker-share-RMS6IB5X.js.map +1 -0
  91. package/dist/tool-grant-push-T6DRBY3W.js +90 -0
  92. package/dist/tool-grant-push-T6DRBY3W.js.map +1 -0
  93. package/package.json +1 -2
  94. package/runtime/_shared/agentbox-tool-shim +21 -0
  95. package/runtime/_shared/ctl.cjs +6757 -5299
  96. package/runtime/_shared/gh-shim +103 -228
  97. package/runtime/digitalocean/agentbox-tool-shim +21 -0
  98. package/runtime/digitalocean/ctl.cjs +6757 -5299
  99. package/runtime/digitalocean/gh-shim +103 -228
  100. package/runtime/digitalocean/scripts/install-box.sh +9 -15
  101. package/runtime/docker/Dockerfile.box +8 -18
  102. package/runtime/docker/packages/ctl/dist/bin.cjs +6757 -5299
  103. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-tool-shim +21 -0
  104. package/runtime/docker/packages/sandbox-docker/scripts/gh-shim +103 -228
  105. package/runtime/e2b/agentbox-tool-shim +21 -0
  106. package/runtime/e2b/ctl.cjs +6757 -5299
  107. package/runtime/e2b/gh-shim +103 -228
  108. package/runtime/e2b/scripts/build-template.sh +5 -9
  109. package/runtime/hetzner/agentbox-tool-shim +21 -0
  110. package/runtime/hetzner/ctl.cjs +6757 -5299
  111. package/runtime/hetzner/gh-shim +103 -228
  112. package/runtime/hetzner/scripts/install-box.sh +9 -15
  113. package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
  114. package/runtime/hub/apps/hub/.next/app-path-routes-manifest.json +2 -0
  115. package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
  116. package/runtime/hub/apps/hub/.next/routes-manifest.json +16 -0
  117. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js +5 -5
  118. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js.nft.json +1 -1
  119. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route.js +2 -2
  120. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route.js.nft.json +1 -1
  121. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route.js +2 -2
  122. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route.js.nft.json +1 -1
  123. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route.js +2 -2
  124. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route.js.nft.json +1 -1
  125. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/agent/route.js +2 -2
  126. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/agent/route.js.nft.json +1 -1
  127. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route.js +2 -2
  128. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route.js.nft.json +1 -1
  129. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/checkpoint/route.js +2 -2
  130. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/checkpoint/route.js.nft.json +1 -1
  131. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.js +2 -2
  132. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.js.nft.json +1 -1
  133. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route.js +2 -2
  134. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route.js.nft.json +1 -1
  135. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/logs/route.js +1 -1
  136. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/logs/route.js.nft.json +1 -1
  137. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js +2 -2
  138. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js.nft.json +1 -1
  139. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js +2 -2
  140. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js.nft.json +1 -1
  141. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route.js +2 -2
  142. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route.js.nft.json +1 -1
  143. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route.js +2 -2
  144. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route.js.nft.json +1 -1
  145. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route.js +2 -2
  146. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route.js.nft.json +1 -1
  147. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route/app-paths-manifest.json +3 -0
  148. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route/build-manifest.json +9 -0
  149. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route/server-reference-manifest.json +4 -0
  150. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route.js +8 -0
  151. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route.js.map +5 -0
  152. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route.js.nft.json +1 -0
  153. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route_client-reference-manifest.js +3 -0
  154. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route.js +2 -2
  155. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route.js.nft.json +1 -1
  156. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/checkpoints/route.js +2 -2
  157. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/checkpoints/route.js.nft.json +1 -1
  158. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/[...path]/route.js +1 -1
  159. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/[...path]/route.js.nft.json +1 -1
  160. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/blob/[...path]/route.js +2 -2
  161. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/blob/[...path]/route.js.nft.json +1 -1
  162. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/health/route.js +2 -2
  163. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/health/route.js.nft.json +1 -1
  164. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route.js +2 -2
  165. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route.js.nft.json +1 -1
  166. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route.js +2 -2
  167. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route.js.nft.json +1 -1
  168. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route.js +2 -2
  169. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route.js.nft.json +1 -1
  170. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route.js +2 -2
  171. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route.js.nft.json +1 -1
  172. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route.js +2 -2
  173. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route.js.nft.json +1 -1
  174. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route.js +2 -2
  175. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route.js.nft.json +1 -1
  176. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/route.js +2 -2
  177. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/route.js.nft.json +1 -1
  178. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js +2 -2
  179. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js.nft.json +1 -1
  180. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route.js +2 -2
  181. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route.js.nft.json +1 -1
  182. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route.js +2 -2
  183. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route.js.nft.json +1 -1
  184. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/seed/route.js +2 -2
  185. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/seed/route.js.nft.json +1 -1
  186. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route.js +2 -2
  187. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route.js.nft.json +1 -1
  188. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route.js +2 -2
  189. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route.js.nft.json +1 -1
  190. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route.js +2 -2
  191. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route.js.nft.json +1 -1
  192. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route.js +2 -2
  193. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route.js.nft.json +1 -1
  194. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/prune/route.js +2 -2
  195. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/prune/route.js.nft.json +1 -1
  196. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/system/route.js +2 -2
  197. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/system/route.js.nft.json +1 -1
  198. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page.js +1 -1
  199. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -1
  200. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page.js +1 -1
  201. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page.js.nft.json +1 -1
  202. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page_client-reference-manifest.js +1 -1
  203. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route/app-paths-manifest.json +3 -0
  204. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route/build-manifest.json +9 -0
  205. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route/server-reference-manifest.json +4 -0
  206. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route.js +8 -0
  207. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route.js.map +5 -0
  208. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route.js.nft.json +1 -0
  209. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route_client-reference-manifest.js +3 -0
  210. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/custody/page.js +1 -1
  211. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/custody/page.js.nft.json +1 -1
  212. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page.js +1 -1
  213. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  214. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page.js +1 -1
  215. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page.js.nft.json +1 -1
  216. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page.js +1 -1
  217. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  218. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  219. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/system/page.js +1 -1
  220. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/system/page.js.nft.json +1 -1
  221. package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js +4 -4
  222. package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js.nft.json +1 -1
  223. package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
  224. package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
  225. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  226. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  227. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  228. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  229. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  230. package/runtime/hub/apps/hub/.next/server/app-paths-manifest.json +2 -0
  231. package/runtime/hub/apps/hub/.next/server/chunks/044u_hub__next-internal_server_app_(dashboard)_boxes_[id]_vnc_route_actions_1cy1392.js +3 -0
  232. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_boxes_[id]_vnc_route_actions_10y_e83.js +3 -0
  233. package/runtime/hub/apps/hub/.next/server/chunks/{[externals]__1nj4awx._.js → [externals]__02a249v._.js} +2 -2
  234. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__00f9v4p._.js +1 -1
  235. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__01nppdu._.js +1 -1
  236. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__02f8rwr._.js +1 -1
  237. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__068_052._.js +1 -1
  238. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__06ma5m4._.js +3 -0
  239. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__07kp2fu._.js +1 -1
  240. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1yi-2wa._.js → [root-of-the-server]__08u01ud._.js} +3 -3
  241. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__098bkh3._.js +3 -0
  242. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1hxo1tv._.js → [root-of-the-server]__09hbkgm._.js} +2 -2
  243. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09tmbom._.js +3 -0
  244. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0_3m9sf._.js +1 -1
  245. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0aotdzg._.js +3 -0
  246. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0bn6-pu._.js +1 -1
  247. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cpt9f9._.js +1 -1
  248. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1lmiq._.js +15 -15
  249. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dom248._.js +1 -1
  250. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0f0bb7o._.js +1 -1
  251. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0gb04bp._.js +1 -1
  252. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0glplq7._.js +1 -1
  253. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0xrdbh9._.js → [root-of-the-server]__0gxfyol._.js} +2 -2
  254. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0hsb2ak._.js +1 -1
  255. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0joqm8t._.js +1 -1
  256. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jp-895._.js +1 -1
  257. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1leda2s._.js → [root-of-the-server]__0jpqg_t._.js} +2 -2
  258. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__17bhgkz._.js → [root-of-the-server]__0lgnu00._.js} +2 -2
  259. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0lsv9-6._.js +1 -1
  260. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0pzgufc._.js +1 -1
  261. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qfv7z6._.js +1 -1
  262. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qlr61y._.js +1 -1
  263. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0s8srqi._.js +1 -1
  264. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0urn9j5._.js +1 -1
  265. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0vb8mk2._.js +4 -0
  266. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__17w5eaa._.js → [root-of-the-server]__0x27ifo._.js} +2 -2
  267. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0y7rvy1._.js +1 -1
  268. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0zsgjre._.js +1 -1
  269. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-bqa8a._.js +1 -1
  270. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__11uspjg._.js +1 -1
  271. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0zvr6ul._.js → [root-of-the-server]__15tgdh6._.js} +2 -2
  272. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1ek7nxv._.js → [root-of-the-server]__16bz_kz._.js} +2 -2
  273. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1w7jw4q._.js → [root-of-the-server]__18tehjj._.js} +2 -2
  274. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1ds8g0e._.js → [root-of-the-server]__1_hzv4s._.js} +2 -2
  275. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0cgpsh8._.js → [root-of-the-server]__1b5f5h4._.js} +2 -2
  276. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__10-aihp._.js → [root-of-the-server]__1dv80yf._.js} +2 -2
  277. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1eanlxn._.js +1 -1
  278. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__16lcb2d._.js → [root-of-the-server]__1fc-nvn._.js} +2 -2
  279. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1h4iahl._.js +1 -1
  280. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0f-c-eh._.js → [root-of-the-server]__1j0vnh3._.js} +2 -2
  281. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lgrtx6._.js +1 -1
  282. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1unqgd7._.js → [root-of-the-server]__1lz7931._.js} +2 -2
  283. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1oclxlx._.js → [root-of-the-server]__1n3u6-5._.js} +2 -2
  284. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qky5cd._.js +1 -1
  285. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1r2quye._.js +3 -0
  286. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rb_nc5._.js +1 -1
  287. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0cv16py._.js → [root-of-the-server]__1spr8ss._.js} +2 -2
  288. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1t_juqb._.js +1 -1
  289. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0t8kwy3._.js → [root-of-the-server]__1tct9rj._.js} +3 -3
  290. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0gfa1jg._.js → [root-of-the-server]__1tjtt06._.js} +2 -2
  291. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__09cigc7._.js → [root-of-the-server]__1whjno0._.js} +2 -2
  292. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1wn4-iv._.js +3 -0
  293. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1x6zxrf._.js +1 -1
  294. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0tyixgg._.js → [root-of-the-server]__1xfxc6i._.js} +2 -2
  295. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1m1_gm_._.js → [root-of-the-server]__1xqcvi4._.js} +2 -2
  296. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__207d30i._.js +1 -1
  297. package/runtime/hub/apps/hub/.next/server/chunks/_07icdxf._.js +1 -1
  298. package/runtime/hub/apps/hub/.next/server/chunks/_0907rw0._.js +1 -1
  299. package/runtime/hub/apps/hub/.next/server/chunks/_0adm87k._.js +1 -1
  300. package/runtime/hub/apps/hub/.next/server/chunks/_0g01mkg._.js +1 -1
  301. package/runtime/hub/apps/hub/.next/server/chunks/_0l_klgd._.js +1 -1
  302. package/runtime/hub/apps/hub/.next/server/chunks/_0lfm81x._.js +1 -1
  303. package/runtime/hub/apps/hub/.next/server/chunks/_0tbg83f._.js +1 -1
  304. package/runtime/hub/apps/hub/.next/server/chunks/_0tms_au._.js +1 -1
  305. package/runtime/hub/apps/hub/.next/server/chunks/_0zhli27._.js +1 -1
  306. package/runtime/hub/apps/hub/.next/server/chunks/_10yfoq5._.js +1 -1
  307. package/runtime/hub/apps/hub/.next/server/chunks/_12uhpbp._.js +1 -1
  308. package/runtime/hub/apps/hub/.next/server/chunks/_17a9v8y._.js +2 -2
  309. package/runtime/hub/apps/hub/.next/server/chunks/_1c7x9ee._.js +1 -1
  310. package/runtime/hub/apps/hub/.next/server/chunks/_1n-c443._.js +1 -1
  311. package/runtime/hub/apps/hub/.next/server/chunks/_1y80vfg._.js +1 -1
  312. package/runtime/hub/apps/hub/.next/server/chunks/_214_q-1._.js +1 -1
  313. package/runtime/hub/apps/hub/.next/server/chunks/apps_hub_app_(dashboard)_api_v1_lib_openapi_ts_1yokmzt._.js +1 -1
  314. package/runtime/hub/apps/hub/.next/server/chunks/{packages_relay_dist_0eg7ay1._.js → packages_relay_dist_0p8dnf4._.js} +4 -4
  315. package/runtime/hub/apps/hub/.next/server/chunks/ssr/{[root-of-the-server]__1plrs94._.js → [root-of-the-server]__0-c5j6l._.js} +2 -2
  316. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0r2xlss._.js +1 -1
  317. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_19vy9ni._.js +2 -2
  318. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_[id]_page_tsx_1-j_972._.js +1 -1
  319. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_settings_page_tsx_0hv6n82._.js +1 -1
  320. package/runtime/hub/apps/hub/.next/server/chunks/ssr/{packages_relay_dist_1z9j3g0._.js → packages_relay_dist_0sap-2l._.js} +4 -4
  321. package/runtime/hub/apps/hub/.next/server/functions-config-manifest.json +3 -1
  322. package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
  323. package/runtime/hub/apps/hub/.next/server/middleware.js +1 -1
  324. package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
  325. package/runtime/hub/apps/hub/.next/static/chunks/{328ny-3zs_h7m.js → 0jefm3re1-2jv.js} +1 -1
  326. package/runtime/hub/apps/hub/.next/static/chunks/{30h8mz040b5-l.js → 3u4odx1_-dy6b.js} +1 -1
  327. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/boxes/[id]/vnc/route.ts +45 -0
  328. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/openapi.ts +45 -1
  329. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/validate.ts +14 -3
  330. package/runtime/hub/apps/hub/app/(dashboard)/boxes/[id]/vnc/route.ts +58 -0
  331. package/runtime/hub/apps/hub/app/(dashboard)/boxes/components/access.tsx +26 -9
  332. package/runtime/hub/apps/hub/app/(dashboard)/settings/components/provider-actions.tsx +34 -26
  333. package/runtime/hub/apps/hub/{auth-JMVHQKWY.js → auth-V7KPRWPS.js} +2 -2
  334. package/runtime/hub/apps/hub/{auth-config-5IFRWOK4.js → auth-config-B3Y3BT2I.js} +2 -2
  335. package/runtime/hub/apps/hub/{chunk-VKOCY6SX.js → chunk-3AD3MYNV.js} +49 -14
  336. package/runtime/hub/apps/hub/{chunk-KTVETF3F.js → chunk-3ZDBZYOY.js} +11 -8
  337. package/runtime/hub/apps/hub/{chunk-LPYK2354.js → chunk-5ABFGGPT.js} +339 -21
  338. package/runtime/hub/apps/hub/{chunk-UMPTTQBE.js → chunk-GBYD2ODL.js} +458 -251
  339. package/runtime/hub/apps/hub/{chunk-5TM7XXLT.js → chunk-H5SUXDZA.js} +2833 -1277
  340. package/runtime/hub/apps/hub/{chunk-QU3FFGJY.js → chunk-UQ5XNPOF.js} +11 -14
  341. package/runtime/hub/apps/hub/{chunk-3LAHFDJF.js → chunk-VWQNSZGI.js} +22 -2
  342. package/runtime/hub/apps/hub/{chunk-EZUK53CC.js → chunk-WHGY7HOC.js} +85 -21
  343. package/runtime/hub/apps/hub/{chunk-D33EV4YZ.js → chunk-ZP4RYI4U.js} +1 -1
  344. package/runtime/hub/apps/hub/{cloud-poller-SUNA6ZQC-VSKVMYHL.js → cloud-poller-QJRZXB4W-G7ECKNKQ.js} +1 -1
  345. package/runtime/hub/apps/hub/{dist-ELZHBQEM.js → dist-37EKQ6RZ.js} +11 -11
  346. package/runtime/hub/apps/hub/{dist-D265LCAN.js → dist-CGH7PEMZ.js} +21 -3
  347. package/runtime/hub/apps/hub/{dist-SYWTB6RD.js → dist-CMVSARW5.js} +15 -18
  348. package/runtime/hub/apps/hub/{dist-5HTJSOHS.js → dist-EGXZRZH2.js} +19 -7
  349. package/runtime/hub/apps/hub/{dist-YK5FFPXZ.js → dist-EOGGFZZS.js} +62 -20
  350. package/runtime/hub/apps/hub/{dist-E2FTSTCY.js → dist-LJBHOO3K.js} +34 -5
  351. package/runtime/hub/apps/hub/{dist-N3E5YAYY.js → dist-R77W6WJ5.js} +53 -26
  352. package/runtime/hub/apps/hub/{dist-JVEDVVVG.js → dist-TH2JZYZY.js} +7 -7
  353. package/runtime/hub/apps/hub/{dist-2YP57GMB.js → dist-XPRGHQH2.js} +13 -13
  354. package/runtime/hub/apps/hub/{dist-NKCXH5DW.js → dist-Z2Y5F7AF.js} +6 -6
  355. package/runtime/hub/apps/hub/docker-compose.yml +1 -0
  356. package/runtime/hub/apps/hub/{hub-token-MDOBY7MZ.js → hub-token-DDJ5Z6RS.js} +2 -2
  357. package/runtime/hub/apps/hub/{hub-worker-UFFLF37F.js → hub-worker-DXVMUQWF.js} +16 -16
  358. package/runtime/hub/apps/hub/lib/boxes/backend-types.ts +11 -0
  359. package/runtime/hub/apps/hub/lib/boxes/types.ts +43 -0
  360. package/runtime/hub/apps/hub/lib/boxes/vnc-link.ts +51 -0
  361. package/runtime/hub/apps/hub/lib/hub-backend.ts +127 -54
  362. package/runtime/hub/apps/hub/lib/hub-worker.ts +4 -4
  363. package/runtime/hub/apps/hub/lib/provider-importers.ts +66 -1
  364. package/runtime/hub/apps/hub/{prepared-state-PV3GUBHO-PPRQDYFR.js → prepared-state-LNQ7DYSU-ABC2EQVI.js} +3 -2
  365. package/runtime/hub/apps/hub/server.js +130 -72
  366. package/runtime/hub/apps/hub/server.ts +18 -0
  367. package/runtime/hub/apps/hub/test/vnc-link.test.ts +61 -0
  368. package/runtime/hub/apps/hub/tsconfig.tsbuildinfo +1 -1
  369. package/runtime/hub-deploy/docker-compose.yml +1 -0
  370. package/runtime/relay/bin.cjs +16623 -14688
  371. package/runtime/vercel/agentbox-tool-shim +21 -0
  372. package/runtime/vercel/ctl.cjs +6757 -5299
  373. package/runtime/vercel/gh-shim +103 -228
  374. package/runtime/vercel/scripts/provision.sh +5 -9
  375. package/share/host-skills/agentbox-info/SKILL.md +24 -14
  376. package/dist/_cloud-attach-Y5HIQ373.js +0 -28
  377. package/dist/chunk-46NNZMZT.js.map +0 -1
  378. package/dist/chunk-74VIUGY6.js.map +0 -1
  379. package/dist/chunk-7RSE7ESY.js.map +0 -1
  380. package/dist/chunk-G3H2L3O2.js.map +0 -1
  381. package/dist/chunk-GFOWBXV7.js.map +0 -1
  382. package/dist/chunk-JDSYMTMS.js.map +0 -1
  383. package/dist/chunk-JNC7MCWJ.js.map +0 -1
  384. package/dist/chunk-JQLOGVZK.js.map +0 -1
  385. package/dist/chunk-KFLGXE3R.js.map +0 -1
  386. package/dist/chunk-KJ5TCYNI.js.map +0 -1
  387. package/dist/chunk-NHTRTST5.js.map +0 -1
  388. package/dist/chunk-NHVGKFVY.js.map +0 -1
  389. package/dist/chunk-OUF3YTQO.js.map +0 -1
  390. package/dist/chunk-OUWVN2F2.js.map +0 -1
  391. package/dist/chunk-OXKW4GWD.js.map +0 -1
  392. package/dist/chunk-PSA6GADQ.js.map +0 -1
  393. package/dist/chunk-WB6S4W7O.js.map +0 -1
  394. package/dist/chunk-YI4GHC2E.js.map +0 -1
  395. package/dist/dist-6PYXFREL.js.map +0 -1
  396. package/dist/dist-XQLKK7H3.js.map +0 -1
  397. package/dist/hub-MJ7O4WXW.js +0 -36
  398. package/dist/prepare-V4U5HVJU.js +0 -40
  399. package/dist/prepared-custody-QIXW7MJM.js +0 -35
  400. package/dist/relay-DRDELF6B.js +0 -20
  401. package/runtime/_shared/linear-shim +0 -181
  402. package/runtime/_shared/ntn-shim +0 -95
  403. package/runtime/digitalocean/linear-shim +0 -181
  404. package/runtime/digitalocean/ntn-shim +0 -95
  405. package/runtime/docker/packages/sandbox-docker/scripts/linear-shim +0 -181
  406. package/runtime/docker/packages/sandbox-docker/scripts/ntn-shim +0 -95
  407. package/runtime/e2b/linear-shim +0 -181
  408. package/runtime/e2b/ntn-shim +0 -95
  409. package/runtime/hetzner/linear-shim +0 -181
  410. package/runtime/hetzner/ntn-shim +0 -95
  411. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__039tc0m._.js +0 -3
  412. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0c_3x8u._.js +0 -3
  413. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ty7ew1._.js +0 -3
  414. package/runtime/vercel/linear-shim +0 -181
  415. package/runtime/vercel/ntn-shim +0 -95
  416. /package/dist/{_cloud-attach-Y5HIQ373.js.map → _cloud-attach-HKRHYCY7.js.map} +0 -0
  417. /package/dist/{chunk-4PR3KJ5X.js.map → chunk-6PIGTR4D.js.map} +0 -0
  418. /package/dist/{chunk-BUMKBUXS.js.map → chunk-7QU6XENE.js.map} +0 -0
  419. /package/dist/{chunk-7ABO7OIF.js.map → chunk-CO2I3CQI.js.map} +0 -0
  420. /package/dist/{chunk-HYXCH4GA.js.map → chunk-EFVTQ7YB.js.map} +0 -0
  421. /package/dist/{chunk-EVT2SNF2.js.map → chunk-HO2ACZES.js.map} +0 -0
  422. /package/dist/{chunk-V5NWSLWD.js.map → chunk-HP4L45LW.js.map} +0 -0
  423. /package/dist/{chunk-B4DAH2F2.js.map → chunk-LHOKRCNF.js.map} +0 -0
  424. /package/dist/{chunk-BWM56FKY.js.map → chunk-RQURMAPA.js.map} +0 -0
  425. /package/dist/{chunk-FPMRFMVK.js.map → chunk-RZCLRWNY.js.map} +0 -0
  426. /package/dist/{chunk-FGQFVUMH.js.map → chunk-VY54AX4T.js.map} +0 -0
  427. /package/dist/{cloud-poller-SUNA6ZQC-7M5LJHHE.js.map → cloud-poller-QJRZXB4W-LJ2BRB3L.js.map} +0 -0
  428. /package/dist/{control-plane-5R7PYRQ6.js.map → control-plane-UKKYXHIQ.js.map} +0 -0
  429. /package/dist/{custody-client-PNCC2HBJ.js.map → custody-client-NPXJ46TB.js.map} +0 -0
  430. /package/dist/{deploy-hetzner-SSGSXAKA.js.map → deploy-hetzner-Y3ILCDRF.js.map} +0 -0
  431. /package/dist/{dist-5OR4QTQW.js.map → dist-5OGQ3CJQ.js.map} +0 -0
  432. /package/dist/{dist-EPFS5PRI.js.map → dist-7B3VCLZI.js.map} +0 -0
  433. /package/dist/{dist-K5M4HKG7.js.map → dist-A5ZEIVAW.js.map} +0 -0
  434. /package/dist/{dist-M4O5MU5K.js.map → dist-FBM2WS5S.js.map} +0 -0
  435. /package/dist/{dist-POILUDVJ.js.map → dist-MUTFY7FA.js.map} +0 -0
  436. /package/dist/{dist-RN6JOAG4.js.map → dist-SMDXLPZO.js.map} +0 -0
  437. /package/dist/{dist-SN2TCRZ5.js.map → dist-VTLQKZ2E.js.map} +0 -0
  438. /package/dist/{dist-XATN4ZIR.js.map → dist-ZJIJHCZB.js.map} +0 -0
  439. /package/dist/{dist-ZNQZHTUN.js.map → dist-ZNYS7CVF.js.map} +0 -0
  440. /package/dist/{hub-MJ7O4WXW.js.map → host-reach-drainer-ZJU2STQQ.js.map} +0 -0
  441. /package/dist/{hub-adopt-I44VGSBL.js.map → hub-Q4VOF4WN.js.map} +0 -0
  442. /package/dist/{hub-api-client-WJPBXZAZ.js.map → hub-adopt-OA336ZXZ.js.map} +0 -0
  443. /package/dist/{prepare-V4U5HVJU.js.map → hub-api-client-5U6WOTZ3.js.map} +0 -0
  444. /package/dist/{hub-docker-target-REEEWUG2.js.map → hub-docker-target-JKFCABK4.js.map} +0 -0
  445. /package/dist/{prepared-custody-QIXW7MJM.js.map → prepare-GFWWKWGF.js.map} +0 -0
  446. /package/dist/{prepared-state-PV3GUBHO-MF56HWMZ.js.map → prepared-custody-KU4PDVBT.js.map} +0 -0
  447. /package/dist/{relay-DRDELF6B.js.map → prepared-state-LNQ7DYSU-AR5RMXAO.js.map} +0 -0
  448. /package/dist/{publish-credentials-BPHUO5VL.js.map → publish-credentials-3SQXX45P.js.map} +0 -0
  449. /package/dist/{remote-docker-share-RX5ARK45.js.map → registry-AFKV3EO2.js.map} +0 -0
  450. /package/runtime/hub/apps/hub/.next/static/{z7_2bKU93xE7GwllL1Duv → XIx10ozuCZRzwSsiCF_5t}/_buildManifest.js +0 -0
  451. /package/runtime/hub/apps/hub/.next/static/{z7_2bKU93xE7GwllL1Duv → XIx10ozuCZRzwSsiCF_5t}/_clientMiddlewareManifest.js +0 -0
  452. /package/runtime/hub/apps/hub/.next/static/{z7_2bKU93xE7GwllL1Duv → XIx10ozuCZRzwSsiCF_5t}/_ssgManifest.js +0 -0
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // ../../packages/relay/dist/chunk-YVJLTAM3.js
3
+ // ../../packages/relay/dist/chunk-Q5KIPAZI.js
4
4
  import { request as httpRequest } from "http";
5
5
  import { request as httpsRequest } from "https";
6
6
  import { setTimeout as delay } from "timers/promises";
@@ -49,6 +49,15 @@ var CloudBoxPoller = class {
49
49
  currentPreviewUrl;
50
50
  /** Guards against recovery storms — at most one recovery attempt in flight. */
51
51
  recovering = null;
52
+ /**
53
+ * The in-flight `/bridge/poll` request, so {@link stop} can abort it instead
54
+ * of waiting it out. Without this, `stop()` blocks for the remainder of the
55
+ * current long-poll — measured at **26s** against a bridge that never answers
56
+ * — and on an auto-resuming backend (e2b) that late request revives the very
57
+ * box the caller just paused. A healthy bridge answers in milliseconds, so
58
+ * this matters exactly when the box is slow or wedged.
59
+ */
60
+ inFlight = null;
52
61
  start() {
53
62
  if (this.loopPromise) return;
54
63
  this.loopPromise = this.run().catch((err) => {
@@ -57,6 +66,8 @@ var CloudBoxPoller = class {
57
66
  }
58
67
  async stop() {
59
68
  this.stopped = true;
69
+ this.inFlight?.destroy();
70
+ this.inFlight = null;
60
71
  if (this.loopPromise) await this.loopPromise;
61
72
  }
62
73
  /**
@@ -150,6 +161,7 @@ var CloudBoxPoller = class {
150
161
  this.cursor = body.cursor;
151
162
  }
152
163
  } catch (err) {
164
+ if (this.stopped) return;
153
165
  const msg = err instanceof Error ? err.message : String(err);
154
166
  if (msg.includes("\u2192 504") || msg.includes("504:")) {
155
167
  this.fastModePolls = FAST_MODE_DECAY_POLLS;
@@ -244,7 +256,15 @@ var CloudBoxPoller = class {
244
256
  res.on("error", reject);
245
257
  }
246
258
  );
247
- req.on("error", reject);
259
+ this.inFlight = req;
260
+ const done = () => {
261
+ if (this.inFlight === req) this.inFlight = null;
262
+ };
263
+ req.on("close", done);
264
+ req.on("error", (err) => {
265
+ done();
266
+ reject(err);
267
+ });
248
268
  req.on("timeout", () => {
249
269
  req.destroy();
250
270
  reject(new Error("bridge/poll timeout"));
@@ -285,4 +305,4 @@ export {
285
305
  CloudBoxPoller,
286
306
  CloudBoxPollers
287
307
  };
288
- //# sourceMappingURL=chunk-G3H2L3O2.js.map
308
+ //# sourceMappingURL=chunk-MNDKP4VS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/relay/src/cloud-poller.ts"],"sourcesContent":["/**\n * `CloudBoxPoller` — host-resident loop that drains a cloud box's in-sandbox\n * relay over its Daytona preview URL. One poller per cloud box, owned by the\n * host relay process (so status / autopause behave the same whether or not a\n * CLI is attached, matching the Docker model).\n *\n * v0 responsibility: pull `/bridge/poll`, forward events + status into the\n * host relay's stores. Executing drained `HostAction`s (real `git push` on\n * the host, with `askPrompt` gating) and posting results back is the next\n * layer, tracked alongside Phase 4's host-RPC execution.\n */\n\nimport { request as httpRequest, type ClientRequest } from 'node:http';\nimport { request as httpsRequest } from 'node:https';\nimport { setTimeout as delay } from 'node:timers/promises';\nimport type {\n BridgeActionResultBody,\n BridgePollResponse,\n HostAction,\n HostActionResult,\n RelayEvent,\n} from './types.js';\n\nexport interface CloudBoxPollerDeps {\n boxId: string;\n /** Preview URL of the in-sandbox relay's `/bridge/*` surface. */\n previewUrl: string;\n /** Bearer for `/bridge/*` auth (Daytona's `x-daytona-preview-token` is added separately when known). */\n bridgeToken: string;\n /** Optional Daytona preview token header for the proxy layer. */\n previewToken?: string;\n /** Fired for each batch of new events drained from the box. */\n onEvents?: (events: RelayEvent[]) => void;\n /** Fired when a new box-status snapshot is observed. */\n onStatus?: (status: unknown) => void;\n /**\n * Fired for each parked host action the box wants the host to execute.\n * The `respond` callback POSTs back to `/bridge/action-result` and\n * unblocks the in-box `/rpc` caller — the handler MUST call it (with a\n * non-zero exitCode and stderr message even when the host can't execute\n * the action) so the box never hangs.\n */\n onAction?: (\n action: HostAction,\n respond: (result: HostActionResult) => Promise<void>,\n ) => Promise<void> | void;\n /**\n * Optional: called when the poller observes a connection-level failure\n * (ECONNREFUSED, ENOTFOUND, etc.) on `previewUrl`. Should re-establish\n * whatever underlying transport powers the URL (e.g. reopen an SSH\n * ControlMaster + re-mint its `-L` forward) and return the (possibly new)\n * URL the poller should use from here on. Return `null`/`undefined` to\n * keep the current URL.\n *\n * Use case: Hetzner's preview URLs are SSH `-L` forwards. If the\n * ControlMaster dies (host sleep/wake, network blip), the local port\n * stops listening — without this callback the poller would back off\n * forever against a dead `127.0.0.1:<localPort>`. Daytona's preview is a\n * permanent CloudFront alias and doesn't need this.\n */\n recoverPreviewUrl?: () => Promise<string | null | undefined>;\n logger?: (line: string) => void;\n}\n\nconst BACKOFF_BASE_MS = 1500;\nconst BACKOFF_MAX_MS = 30_000;\n/**\n * Default request timeout. Daytona's CloudFront edge sits in front of the\n * in-sandbox relay and 504s once its idle window expires (~25-30s in\n * practice). Keep the default a hair below that so the poller's timer\n * fires before CloudFront's does, then short-cycle aggressively when we\n * actually see a 504 — see {@link FAST_REQUEST_TIMEOUT_MS}.\n */\nconst REQUEST_TIMEOUT_MS = 25_000;\n/**\n * Faster timeout used after a recent 504 response. Cuts the request short\n * enough that we round-trip multiple times in the same window where the\n * edge proxy would otherwise wedge — recovers throughput quickly when the\n * box is healthy but the edge is flaky.\n */\nconst FAST_REQUEST_TIMEOUT_MS = 8_000;\n/**\n * Number of consecutive non-504 polls before reverting from the fast\n * timeout back to the default. Decays naturally; no separate timer.\n */\nconst FAST_MODE_DECAY_POLLS = 5;\nconst STOPPED_TICK_MS = 250;\n\n/**\n * True for connection-level failures — the local transport behind\n * `previewUrl` is dead (refused, no route, no DNS, host unreachable),\n * not a remote 5xx or a logical error. These are the cases where calling\n * `recoverPreviewUrl` (e.g. Hetzner's SSH tunnel reopen) has a chance of\n * actually fixing anything.\n */\nfunction isConnectionLevelError(err: unknown): boolean {\n const code = (err as NodeJS.ErrnoException | undefined)?.code;\n if (code && CONNECTION_LEVEL_CODES.has(code)) return true;\n const msg = err instanceof Error ? err.message : String(err);\n // node:http surfaces the underlying error message rather than a code on\n // some failure paths — match the well-known signatures too.\n return /\\b(ECONNREFUSED|ENOTFOUND|EHOSTUNREACH|ECONNRESET|EPIPE)\\b/.test(msg);\n}\nconst CONNECTION_LEVEL_CODES = new Set([\n 'ECONNREFUSED',\n 'ENOTFOUND',\n 'EHOSTUNREACH',\n 'ECONNRESET',\n 'EPIPE',\n]);\n\nexport class CloudBoxPoller {\n private stopped = false;\n private cursor = 0;\n private currentBackoffMs = 0;\n private loopPromise: Promise<void> | null = null;\n /**\n * Counts down from {@link FAST_MODE_DECAY_POLLS} after each 504. While > 0\n * the next poll uses {@link FAST_REQUEST_TIMEOUT_MS}. Successful polls\n * decrement, so a flaky edge converges back to the default timeout\n * within ~5 successful round-trips.\n */\n private fastModePolls = 0;\n /**\n * Mutable copy of `deps.previewUrl`. We don't read `deps.previewUrl`\n * directly after construction because `recoverPreviewUrl` may hand us a\n * new URL (e.g. Hetzner reopens its SSH ControlMaster and the `-L`\n * forward gets a new ephemeral local port).\n */\n private currentPreviewUrl: string;\n /** Guards against recovery storms — at most one recovery attempt in flight. */\n private recovering: Promise<void> | null = null;\n /**\n * The in-flight `/bridge/poll` request, so {@link stop} can abort it instead\n * of waiting it out. Without this, `stop()` blocks for the remainder of the\n * current long-poll — measured at **26s** against a bridge that never answers\n * — and on an auto-resuming backend (e2b) that late request revives the very\n * box the caller just paused. A healthy bridge answers in milliseconds, so\n * this matters exactly when the box is slow or wedged.\n */\n private inFlight: ClientRequest | null = null;\n\n constructor(private readonly deps: CloudBoxPollerDeps) {\n this.currentPreviewUrl = deps.previewUrl;\n }\n\n start(): void {\n if (this.loopPromise) return;\n this.loopPromise = this.run().catch((err) => {\n this.log(`poller crashed: ${err instanceof Error ? err.message : String(err)}`);\n });\n }\n\n async stop(): Promise<void> {\n this.stopped = true;\n // Abort the in-flight poll rather than waiting it out. `run()` treats an\n // abort after `stopped` as a normal shutdown, not a poll error.\n this.inFlight?.destroy();\n this.inFlight = null;\n if (this.loopPromise) await this.loopPromise;\n }\n\n /**\n * Post a `HostActionResult` back to the in-sandbox relay's\n * `/bridge/action-result`. The matching parked `/rpc` Promise resolves\n * and the in-box agent finally sees the answer.\n */\n async respond(actionId: string, result: HostActionResult): Promise<void> {\n const base = this.currentPreviewUrl.replace(/\\/+$/, '');\n const url = new URL(`${base}/bridge/action-result`);\n const isHttps = url.protocol === 'https:';\n const transport = isHttps ? httpsRequest : httpRequest;\n const port = url.port.length > 0 ? Number.parseInt(url.port, 10) : isHttps ? 443 : 80;\n const body: BridgeActionResultBody = {\n id: actionId,\n exitCode: result.exitCode,\n stdout: result.stdout,\n stderr: result.stderr,\n };\n const payload = JSON.stringify(body);\n await new Promise<void>((resolve, reject) => {\n const headers: Record<string, string> = {\n 'Content-Type': 'application/json',\n 'Content-Length': Buffer.byteLength(payload).toString(),\n Authorization: `Bearer ${this.deps.bridgeToken}`,\n };\n if (this.deps.previewToken) {\n headers['x-daytona-preview-token'] = this.deps.previewToken;\n }\n const req = transport(\n {\n host: url.hostname,\n port,\n method: 'POST',\n path: url.pathname,\n headers,\n timeout: REQUEST_TIMEOUT_MS,\n },\n (res) => {\n res.resume();\n if ((res.statusCode ?? 0) >= 200 && (res.statusCode ?? 0) < 300) resolve();\n else reject(new Error(`bridge/action-result → ${String(res.statusCode)}`));\n },\n );\n req.on('error', reject);\n req.on('timeout', () => {\n req.destroy();\n reject(new Error('bridge/action-result timeout'));\n });\n req.write(payload);\n req.end();\n });\n }\n\n private log(line: string): void {\n this.deps.logger?.(`[cloud-poller ${this.deps.boxId}] ${line}`);\n }\n\n private async run(): Promise<void> {\n while (!this.stopped) {\n try {\n const body = await this.pollOnce();\n this.currentBackoffMs = 0;\n if (body.events.length > 0) this.deps.onEvents?.(body.events);\n if (body.status != null) this.deps.onStatus?.(body.status);\n for (const action of body.actions) {\n // Fire-and-forget — the action executor either runs inline (v0) or\n // hands the action to its own queue (Phase 4 executor). Failures\n // there are not the poller's concern (but they MUST still respond\n // so the in-box RPC unblocks, hence the fallback below).\n try {\n const respond = (r: HostActionResult): Promise<void> => this.respond(action.id, r);\n if (this.deps.onAction) {\n await this.deps.onAction(action, respond);\n } else {\n await respond({\n exitCode: 1,\n stdout: '',\n stderr: `host has no executor for action '${action.method}'\\n`,\n });\n }\n } catch (err) {\n this.log(`action handler error: ${err instanceof Error ? err.message : String(err)}`);\n // Best-effort: tell the box we failed so its /rpc unblocks.\n try {\n await this.respond(action.id, {\n exitCode: 1,\n stdout: '',\n stderr: `host action handler crashed: ${err instanceof Error ? err.message : String(err)}\\n`,\n });\n } catch {\n // ignore\n }\n }\n }\n if (typeof body.cursor === 'number' && body.cursor > this.cursor) {\n this.cursor = body.cursor;\n }\n } catch (err) {\n // `stop()` destroys the in-flight request; that surfaces here as a\n // socket error. It's a clean shutdown, not a poll failure — logging it\n // would cry wolf on every pause, and falling through to the backoff /\n // preview-URL recovery below would be actively wrong.\n if (this.stopped) return;\n const msg = err instanceof Error ? err.message : String(err);\n if (msg.includes('→ 504') || msg.includes('504:')) {\n // Edge proxy timeout — the box is likely fine; arm fast-mode so the\n // next polls clip the request short of the next 504 window.\n this.fastModePolls = FAST_MODE_DECAY_POLLS;\n }\n this.log(`poll error: ${msg}`);\n // A connection-level failure (`ECONNREFUSED`/`ENOTFOUND`/`EHOSTUNREACH`)\n // usually means the transport behind `currentPreviewUrl` is dead, not\n // that the box went away. Hetzner's SSH `-L` forward stops listening\n // when the ControlMaster dies (host sleep/wake, network blip); the\n // recovery hook reopens it and hands us a fresh URL.\n if (this.deps.recoverPreviewUrl && isConnectionLevelError(err)) {\n await this.tryRecoverPreviewUrl();\n }\n await this.backoff();\n }\n // Successful poll decays fast-mode toward the default timeout.\n if (this.currentBackoffMs === 0 && this.fastModePolls > 0) {\n this.fastModePolls -= 1;\n }\n // Tight loop only when we got something fresh — otherwise yield briefly\n // so we don't spin under a misbehaving preview proxy.\n if (this.currentBackoffMs === 0) await delay(STOPPED_TICK_MS);\n }\n }\n\n private async backoff(): Promise<void> {\n this.currentBackoffMs =\n this.currentBackoffMs === 0\n ? BACKOFF_BASE_MS\n : Math.min(this.currentBackoffMs * 2, BACKOFF_MAX_MS);\n await delay(this.currentBackoffMs);\n }\n\n private async tryRecoverPreviewUrl(): Promise<void> {\n if (!this.deps.recoverPreviewUrl) return;\n // De-dupe: a poll storm shouldn't spawn N parallel recoveries.\n if (this.recovering) {\n await this.recovering;\n return;\n }\n this.recovering = (async () => {\n try {\n const next = await this.deps.recoverPreviewUrl!();\n if (typeof next === 'string' && next.length > 0 && next !== this.currentPreviewUrl) {\n this.log(`preview URL recovered: ${this.currentPreviewUrl} → ${next}`);\n this.currentPreviewUrl = next;\n // Drop the backoff so the next loop iteration retries immediately\n // against the fresh URL.\n this.currentBackoffMs = 0;\n } else if (typeof next === 'string' && next === this.currentPreviewUrl) {\n this.log('preview URL recovered (unchanged)');\n this.currentBackoffMs = 0;\n }\n } catch (err) {\n this.log(`preview URL recover failed: ${err instanceof Error ? err.message : String(err)}`);\n } finally {\n this.recovering = null;\n }\n })();\n await this.recovering;\n }\n\n private async pollOnce(): Promise<BridgePollResponse> {\n const base = this.currentPreviewUrl.replace(/\\/+$/, '');\n const url = new URL(`${base}/bridge/poll?since=${String(this.cursor)}`);\n const isHttps = url.protocol === 'https:';\n const transport = isHttps ? httpsRequest : httpRequest;\n const port = url.port.length > 0 ? Number.parseInt(url.port, 10) : isHttps ? 443 : 80;\n const timeoutMs = this.fastModePolls > 0 ? FAST_REQUEST_TIMEOUT_MS : REQUEST_TIMEOUT_MS;\n\n return new Promise<BridgePollResponse>((resolve, reject) => {\n const headers: Record<string, string> = {\n Authorization: `Bearer ${this.deps.bridgeToken}`,\n Accept: 'application/json',\n };\n if (this.deps.previewToken) {\n headers['x-daytona-preview-token'] = this.deps.previewToken;\n }\n const req = transport(\n {\n host: url.hostname,\n port,\n method: 'GET',\n path: `${url.pathname}${url.search}`,\n headers,\n timeout: timeoutMs,\n },\n (res) => {\n const status = res.statusCode ?? 0;\n const chunks: Buffer[] = [];\n res.on('data', (c: Buffer) => chunks.push(c));\n res.on('end', () => {\n const text = Buffer.concat(chunks).toString('utf8');\n if (status < 200 || status >= 300) {\n reject(new Error(`bridge/poll → ${String(status)}: ${text.slice(0, 200)}`));\n return;\n }\n try {\n const parsed = JSON.parse(text) as Partial<BridgePollResponse>;\n resolve({\n actions: Array.isArray(parsed.actions) ? (parsed.actions as HostAction[]) : [],\n events: Array.isArray(parsed.events) ? (parsed.events as RelayEvent[]) : [],\n status: parsed.status ?? null,\n cursor: typeof parsed.cursor === 'number' ? parsed.cursor : this.cursor,\n });\n } catch (err) {\n reject(err instanceof Error ? err : new Error(String(err)));\n }\n });\n res.on('error', reject);\n },\n );\n this.inFlight = req;\n const done = (): void => {\n if (this.inFlight === req) this.inFlight = null;\n };\n req.on('close', done);\n req.on('error', (err) => {\n done();\n reject(err);\n });\n req.on('timeout', () => {\n req.destroy();\n reject(new Error('bridge/poll timeout'));\n });\n req.end();\n });\n }\n}\n\n/**\n * Lifecycle helper: keep one poller per cloud box, start on register, stop on\n * forget. The host relay's `BoxRegistry` knows nothing about pollers; this\n * type sits alongside it.\n */\nexport class CloudBoxPollers {\n private readonly map = new Map<string, CloudBoxPoller>();\n\n /** Idempotent: replacing an existing poller for a box stops the old one first. */\n start(boxId: string, deps: CloudBoxPollerDeps): void {\n const existing = this.map.get(boxId);\n if (existing) {\n void existing.stop();\n }\n const poller = new CloudBoxPoller(deps);\n this.map.set(boxId, poller);\n poller.start();\n }\n\n async stop(boxId: string): Promise<void> {\n const p = this.map.get(boxId);\n if (!p) return;\n this.map.delete(boxId);\n await p.stop();\n }\n\n async stopAll(): Promise<void> {\n const ps = [...this.map.values()];\n this.map.clear();\n await Promise.all(ps.map((p) => p.stop()));\n }\n\n size(): number {\n return this.map.size;\n }\n}\n"],"mappings":"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","names":[]}
@@ -1,20 +1,26 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ CustodyClient,
4
+ collectAgentCredentialUploads,
5
+ planPush
6
+ } from "./chunk-7QU6XENE.js";
2
7
  import {
3
8
  hubApiTargetFrom,
4
- providerForCreate,
5
9
  withHubClient
6
- } from "./chunk-OXKW4GWD.js";
10
+ } from "./chunk-UPVP6YGJ.js";
7
11
  import {
8
12
  deployControlPlaneToDigitalOcean,
9
13
  destroyControlPlaneOnDigitalOcean,
10
14
  readDigitalOceanCredStatus,
11
15
  updateControlPlaneOnDigitalOcean
12
- } from "./chunk-OUF3YTQO.js";
16
+ } from "./chunk-DBXCFLAR.js";
13
17
  import {
14
- loadControlPlaneEnv,
15
- readControlPlaneEnvMap,
16
- setControlPlaneEnvKey
17
- } from "./chunk-5F34YIRI.js";
18
+ providerForCreate
19
+ } from "./chunk-GWKGSXDC.js";
20
+ import {
21
+ HubApiClient,
22
+ HubApiError
23
+ } from "./chunk-WHFCJBMO.js";
18
24
  import {
19
25
  assertReachableRecord,
20
26
  persistDeployRecord,
@@ -24,22 +30,18 @@ import {
24
30
  runHetznerDeploy,
25
31
  runHetznerDestroy,
26
32
  runHetznerUpdate
27
- } from "./chunk-HYXCH4GA.js";
28
- import {
29
- CustodyClient,
30
- collectAgentCredentialUploads,
31
- planPush
32
- } from "./chunk-BUMKBUXS.js";
33
+ } from "./chunk-EFVTQ7YB.js";
33
34
  import {
34
- HubApiClient,
35
- HubApiError
36
- } from "./chunk-PSA6GADQ.js";
35
+ loadControlPlaneEnv,
36
+ readControlPlaneEnvMap,
37
+ setControlPlaneEnvKey
38
+ } from "./chunk-5F34YIRI.js";
37
39
  import {
38
40
  handleLifecycleError
39
- } from "./chunk-FGQFVUMH.js";
41
+ } from "./chunk-VY54AX4T.js";
40
42
  import {
41
43
  detectEgressIp
42
- } from "./chunk-YI4GHC2E.js";
44
+ } from "./chunk-QU5BI2HC.js";
43
45
  import {
44
46
  createGitDeployment,
45
47
  createGitProject,
@@ -51,7 +53,7 @@ import {
51
53
  projectHasEnv,
52
54
  resolveVercelApiAuth,
53
55
  upsertProjectEnv
54
- } from "./chunk-JNC7MCWJ.js";
56
+ } from "./chunk-3INUZQTR.js";
55
57
  import {
56
58
  applyProjectSeed,
57
59
  deadlineFetch,
@@ -59,29 +61,22 @@ import {
59
61
  pushPreparedToCustody,
60
62
  pushProjectSeedToCustody,
61
63
  readGitOriginUrl
62
- } from "./chunk-JQLOGVZK.js";
64
+ } from "./chunk-THUST2QK.js";
63
65
  import {
64
66
  GitHubAppLeaser,
65
67
  PostgresStore,
66
68
  cloneRepoWithLfs,
67
69
  drainCreateJobs,
70
+ ghHostFromRemote,
68
71
  loadGitHubAppConfig,
69
72
  makeControlPlaneCreateBox,
70
73
  parseGitRemote,
71
74
  toAuthedHttpsUrl
72
- } from "./chunk-WB6S4W7O.js";
75
+ } from "./chunk-7Q6BG5AN.js";
73
76
  import {
74
77
  getRuntimeProviderNames,
75
78
  loadProviderModule
76
- } from "./chunk-OUWVN2F2.js";
77
- import {
78
- GLOBAL_CONFIG_FILE,
79
- findProjectRoot,
80
- loadEffectiveConfig,
81
- parseUserConfig,
82
- setConfigValue,
83
- unsetConfigValue
84
- } from "./chunk-NHVGKFVY.js";
79
+ } from "./chunk-WGNI24H2.js";
85
80
  import {
86
81
  AGENTBOX_HUB_SSH_ALIAS,
87
82
  AGENT_SYNC_SPECS,
@@ -91,8 +86,18 @@ import {
91
86
  matchClaudeInstallFingerprint,
92
87
  projectSlugFromOriginUrl,
93
88
  readPreparedStateRaw,
89
+ relayPort,
90
+ resolveSshConfigTarget,
94
91
  stopHub
95
- } from "./chunk-GFOWBXV7.js";
92
+ } from "./chunk-OKLEPEWZ.js";
93
+ import {
94
+ GLOBAL_CONFIG_FILE,
95
+ findProjectRoot,
96
+ loadEffectiveConfig,
97
+ parseUserConfig,
98
+ setConfigValue,
99
+ unsetConfigValue
100
+ } from "./chunk-7LNXTPEE.js";
96
101
 
97
102
  // src/commands/control-plane.ts
98
103
  import { confirm as confirm2, isCancel as isCancel3, log as log2, note as note2, select, spinner } from "@clack/prompts";
@@ -779,8 +784,8 @@ function detectExecutionMethod(input) {
779
784
  }
780
785
 
781
786
  // src/version.ts
782
- var AGENTBOX_VERSION = true ? "0.28.1" : "0.0.0-dev";
783
- var AGENTBOX_COMMIT = true ? "9c79b1b9" : "dev";
787
+ var AGENTBOX_VERSION = true ? "0.29.0" : "0.0.0-dev";
788
+ var AGENTBOX_COMMIT = true ? "a057d6a3" : "dev";
784
789
 
785
790
  // src/commands/install-app.ts
786
791
  import { intro, log, outro } from "@clack/prompts";
@@ -1533,7 +1538,6 @@ async function removeAutostart(home = homedir4()) {
1533
1538
  import { join as join8 } from "path";
1534
1539
  import { homedir as homedir5 } from "os";
1535
1540
  var CP_DIR3 = join8(homedir5(), ".agentbox", "control-plane");
1536
- var DEFAULT_HUB_PORT = 8787;
1537
1541
  function detectLanIp(ifaces = networkInterfaces()) {
1538
1542
  for (const addrs of Object.values(ifaces)) {
1539
1543
  for (const a of addrs ?? []) {
@@ -1569,7 +1573,7 @@ async function resolvePublicUrl(opts, port, log3, deps = { startTunnel }) {
1569
1573
  async function runExpose(opts) {
1570
1574
  const log3 = opts.onLog ?? (() => {
1571
1575
  });
1572
- const port = opts.port ?? DEFAULT_HUB_PORT;
1576
+ const port = opts.port ?? relayPort();
1573
1577
  const bind = opts.bind ?? "0.0.0.0";
1574
1578
  setControlPlaneEnvKey("AGENTBOX_TUNNEL_TOKEN", opts.tunnelToken ?? null);
1575
1579
  if (opts.tunnel) assertTunnelOptions(opts);
@@ -1626,7 +1630,7 @@ async function ensureTunnelForRecord(record, log3 = () => {
1626
1630
  });
1627
1631
  const handle = await startTunnel({
1628
1632
  kind,
1629
- port: record.port ?? DEFAULT_HUB_PORT,
1633
+ port: record.port ?? relayPort(),
1630
1634
  ...env.AGENTBOX_TUNNEL_TOKEN ? { token: env.AGENTBOX_TUNNEL_TOKEN } : {},
1631
1635
  onLog: log3
1632
1636
  });
@@ -1694,7 +1698,7 @@ async function restoreTunnelIfExposed(log3 = () => {
1694
1698
  async function readLocalRecord() {
1695
1699
  try {
1696
1700
  const { readFile: readFile6 } = await import("fs/promises");
1697
- const { controlPlaneDeployPath } = await import("./dist-ZNQZHTUN.js");
1701
+ const { controlPlaneDeployPath } = await import("./dist-SMDXLPZO.js");
1698
1702
  const rec = JSON.parse(
1699
1703
  await readFile6(controlPlaneDeployPath(), "utf8")
1700
1704
  );
@@ -1731,35 +1735,58 @@ function describeHubDeploySource(source) {
1731
1735
 
1732
1736
  // src/control-plane/host-git-token.ts
1733
1737
  import { execa as execa4 } from "execa";
1734
- async function fromGhCli() {
1738
+
1739
+ // src/lib/git-host.ts
1740
+ async function resolveOriginGitHost(origin) {
1741
+ const derived = ghHostFromRemote(origin);
1742
+ if (!derived) return "github.com";
1743
+ if (!derived.aliasable) return derived.host;
1744
+ const expanded = await resolveSshConfigTarget(derived.host).catch(() => null);
1745
+ const host = expanded?.host.trim().toLowerCase() ?? "";
1746
+ return host.length > 0 ? host : derived.host;
1747
+ }
1748
+
1749
+ // src/control-plane/host-git-token.ts
1750
+ async function fromGhCli(host) {
1735
1751
  try {
1736
- const r = await execa4("gh", ["auth", "token"], { reject: false, timeout: 15e3 });
1752
+ const r = await execa4("gh", ["auth", "token", "--hostname", host], {
1753
+ reject: false,
1754
+ timeout: 15e3
1755
+ });
1737
1756
  const token = (r.stdout ?? "").trim();
1738
1757
  if (r.exitCode !== 0 || token.length === 0) return null;
1739
- return { token, source: "gh" };
1758
+ return { token, source: "gh", host };
1740
1759
  } catch {
1741
1760
  return null;
1742
1761
  }
1743
1762
  }
1744
- async function fromGitCredentialHelper(cwd) {
1763
+ async function fromGitCredentialHelper(cwd, host) {
1745
1764
  try {
1746
1765
  const r = await execa4("git", ["credential", "fill"], {
1747
1766
  cwd,
1748
- input: "protocol=https\nhost=github.com\n\n",
1767
+ input: `protocol=https
1768
+ host=${host}
1769
+
1770
+ `,
1749
1771
  reject: false,
1750
1772
  timeout: 15e3
1751
1773
  });
1752
1774
  if (r.exitCode !== 0) return null;
1753
1775
  const password2 = /^password=(.*)$/m.exec(r.stdout ?? "")?.[1]?.trim() ?? "";
1754
1776
  if (password2.length === 0) return null;
1755
- return { token: password2, source: "git-credential" };
1777
+ return { token: password2, source: "git-credential", host };
1756
1778
  } catch {
1757
1779
  return null;
1758
1780
  }
1759
1781
  }
1760
- async function resolveTokenLogin(token) {
1782
+ function githubApiBase(host) {
1783
+ const h = host.toLowerCase();
1784
+ if (h === "github.com" || h.endsWith(".ghe.com")) return `https://api.${h}`;
1785
+ return `https://${h}/api/v3`;
1786
+ }
1787
+ async function resolveTokenLogin(token, host = "github.com") {
1761
1788
  try {
1762
- const res = await fetch("https://api.github.com/user", {
1789
+ const res = await fetch(`${githubApiBase(host)}/user`, {
1763
1790
  headers: {
1764
1791
  Authorization: `Bearer ${token}`,
1765
1792
  Accept: "application/vnd.github+json",
@@ -1774,12 +1801,25 @@ async function resolveTokenLogin(token) {
1774
1801
  return void 0;
1775
1802
  }
1776
1803
  }
1804
+ async function originGitHost(cwd) {
1805
+ try {
1806
+ const r = await execa4("git", ["-C", cwd, "remote", "get-url", "origin"], {
1807
+ reject: false,
1808
+ timeout: 15e3
1809
+ });
1810
+ if (r.exitCode !== 0) return "github.com";
1811
+ return await resolveOriginGitHost((r.stdout ?? "").trim());
1812
+ } catch {
1813
+ return "github.com";
1814
+ }
1815
+ }
1777
1816
  async function findHostGitToken(cwd = process.cwd()) {
1778
- return await fromGhCli() ?? await fromGitCredentialHelper(cwd);
1817
+ const host = await originGitHost(cwd);
1818
+ return await fromGhCli(host) ?? await fromGitCredentialHelper(cwd, host);
1779
1819
  }
1780
- async function resolveTokenScopes(token) {
1820
+ async function resolveTokenScopes(token, host = "github.com") {
1781
1821
  try {
1782
- const res = await fetch("https://api.github.com/user", {
1822
+ const res = await fetch(`${githubApiBase(host)}/user`, {
1783
1823
  headers: {
1784
1824
  Authorization: `Bearer ${token}`,
1785
1825
  Accept: "application/vnd.github+json",
@@ -2016,20 +2056,23 @@ async function resolveHubGitToken(logLine) {
2016
2056
  const found = await findHostGitToken();
2017
2057
  if (!found) {
2018
2058
  s.stop("no GitHub token found", 1);
2059
+ const host = await originGitHost(process.cwd());
2060
+ const loginCmd = host === "github.com" ? "gh auth login" : `gh auth login --hostname ${host}`;
2019
2061
  log2.error(
2020
- "No GitHub credential found on this machine.\nRun `gh auth login` (browser flow, no admin approval needed) and try again."
2062
+ `No GitHub credential found on this machine.
2063
+ Run \`${loginCmd}\` (browser flow, no admin approval needed) and try again.`
2021
2064
  );
2022
2065
  return null;
2023
2066
  }
2024
2067
  const [login, scopes] = await Promise.all([
2025
- resolveTokenLogin(found.token),
2026
- resolveTokenScopes(found.token)
2068
+ resolveTokenLogin(found.token, found.host),
2069
+ resolveTokenScopes(found.token, found.host)
2027
2070
  ]);
2028
2071
  s.stop(
2029
2072
  `found a GitHub token via ${found.source === "gh" ? "`gh auth token`" : "git's credential helper"}` + (login ? ` (@${login})` : "")
2030
2073
  );
2031
2074
  logLine(
2032
- `git token source=${found.source} login=${login ?? "?"} scopes=${scopes.join(",") || "(none reported)"}`
2075
+ `git token source=${found.source} host=${found.host} login=${login ?? "?"} scopes=${scopes.join(",") || "(none reported)"}`
2033
2076
  );
2034
2077
  const wide = overbroadScopes(scopes);
2035
2078
  const detail = [
@@ -2357,7 +2400,7 @@ var exposeSub = new Command2("expose").description("Turn this machine's local hu
2357
2400
  });
2358
2401
  async function localExposedLoopbackUrl() {
2359
2402
  const rec = await readDeployRecord();
2360
- if (rec?.provider === "local") return `http://127.0.0.1:${String(rec.port ?? 8787)}`;
2403
+ if (rec?.provider === "local") return `http://127.0.0.1:${String(rec.port ?? relayPort())}`;
2361
2404
  return null;
2362
2405
  }
2363
2406
  async function applyLocalShortcut(url, urlFlag) {
@@ -2369,7 +2412,7 @@ var setUrlSub = new Command2("set-url").description("Point boxes + the CLI at a
2369
2412
  try {
2370
2413
  const trimmed = await applyControlPlaneUrl(url);
2371
2414
  log2.success(`Set relay.controlPlaneUrl = ${trimmed}`);
2372
- const { ensureHubDockerTarget } = await import("./hub-docker-target-REEEWUG2.js");
2415
+ const { ensureHubDockerTarget } = await import("./hub-docker-target-JKFCABK4.js");
2373
2416
  await ensureHubDockerTarget((line) => {
2374
2417
  log2.info(line);
2375
2418
  });
@@ -2387,7 +2430,7 @@ var unsetUrlSub = new Command2("unset-url").description("Stop using a control pl
2387
2430
  if (!g.existed && !p.existed) {
2388
2431
  log2.info("No control plane was configured (relay.controlPlaneUrl not set).");
2389
2432
  } else {
2390
- const { removeHubDockerTarget } = await import("./hub-docker-target-REEEWUG2.js");
2433
+ const { removeHubDockerTarget } = await import("./hub-docker-target-JKFCABK4.js");
2391
2434
  await removeHubDockerTarget((line) => {
2392
2435
  log2.info(line);
2393
2436
  });
@@ -2597,7 +2640,7 @@ async function resolveCustodyTarget(urlFlag, opts = {}) {
2597
2640
  return { url, adminToken };
2598
2641
  }
2599
2642
  async function resolveCustodyApiTarget(urlFlag, opts = {}) {
2600
- const { resolveHubTarget } = await import("./hub-MJ7O4WXW.js");
2643
+ const { resolveHubTarget } = await import("./hub-Q4VOF4WN.js");
2601
2644
  const noCredentialError = "A control box is configured but no custody credential is available. Set AGENTBOX_HUB_API_KEY\n(or AGENTBOX_RELAY_ADMIN_TOKEN), or run this from the machine that ran `agentbox hub setup`\n(it writes both to ~/.agentbox/control-plane) \u2014 custody / SSH-key pull needs one of them.";
2602
2645
  const target = await resolveHubTarget(urlFlag);
2603
2646
  if (target.mode === "remote") {
@@ -2616,8 +2659,8 @@ async function resolveCustodyApiTarget(urlFlag, opts = {}) {
2616
2659
  return { url: api.url, apiKey: api.apiKey };
2617
2660
  }
2618
2661
  async function autostartLocalHub() {
2619
- const { ensureHub: ensureHub2 } = await import("./dist-ZNQZHTUN.js");
2620
- const { rehydrateFromState } = await import("./relay-DRDELF6B.js");
2662
+ const { ensureHub: ensureHub2 } = await import("./dist-SMDXLPZO.js");
2663
+ const { rehydrateFromState } = await import("./relay-QH6OEY2V.js");
2621
2664
  const s = spinner();
2622
2665
  s.start("starting local hub");
2623
2666
  try {
@@ -2632,10 +2675,10 @@ async function autostartLocalHub() {
2632
2675
  }
2633
2676
  }
2634
2677
  async function resolveHubApiTarget(urlFlag, opts = {}) {
2635
- const { resolveHubTarget } = await import("./hub-MJ7O4WXW.js");
2678
+ const { resolveHubTarget } = await import("./hub-Q4VOF4WN.js");
2636
2679
  let target = await resolveHubTarget(urlFlag, { preferLocal: opts.preferLocal });
2637
2680
  if (target.mode === "local" && !opts.quiet) {
2638
- const { getHubStatus: getHubStatus2 } = await import("./dist-ZNQZHTUN.js");
2681
+ const { getHubStatus: getHubStatus2 } = await import("./dist-SMDXLPZO.js");
2639
2682
  const st = await getHubStatus2();
2640
2683
  if (!(st.running && st.ui)) {
2641
2684
  if (!await autostartLocalHub()) return null;
@@ -3221,7 +3264,7 @@ async function runLocalUpdateFlow(opts, logWrite) {
3221
3264
  "This control box IS this machine's hub, so its build is this CLI. To change the build, run `agentbox self-update` (it reloads the hub too); `hub update` just restarts the exposed hub."
3222
3265
  );
3223
3266
  }
3224
- const loopback = await localExposedLoopbackUrl() ?? "http://127.0.0.1:8787";
3267
+ const loopback = await localExposedLoopbackUrl() ?? `http://127.0.0.1:${String(relayPort())}`;
3225
3268
  const before = await probeControlPlaneStatus(loopback);
3226
3269
  log2.info(`control box: this machine (${loopback}) \u2014 ${before.version ?? "running"}`);
3227
3270
  if (!opts.yes) {
@@ -3253,7 +3296,7 @@ async function runLocalUpdateFlow(opts, logWrite) {
3253
3296
  await syncBakesWithControlBox(loopback);
3254
3297
  }
3255
3298
  async function runLocalDestroyFlow(record, opts) {
3256
- const loopback = `http://127.0.0.1:${String(record.port ?? 8787)}`;
3299
+ const loopback = `http://127.0.0.1:${String(record.port ?? relayPort())}`;
3257
3300
  const boxes = await listHubBoxesForDestroy({ ...record, url: loopback });
3258
3301
  const gate = destroyGate(boxes, Boolean(opts.force));
3259
3302
  if (!gate.allowed) {
@@ -3512,7 +3555,7 @@ async function syncBakesWithControlBox(url) {
3512
3555
  const hubVersion = (await probeControlPlaneStatus(target.url)).version;
3513
3556
  const results = [];
3514
3557
  const providers = getRuntimeProviderNames().filter(isShareablePreparedProvider);
3515
- const { adoptPreparedBases } = await import("./prepared-custody-QIXW7MJM.js");
3558
+ const { adoptPreparedBases } = await import("./prepared-custody-KU4PDVBT.js");
3516
3559
  const pulled = await adoptPreparedBases().catch(() => ({
3517
3560
  adopted: [],
3518
3561
  pending: []
@@ -3618,12 +3661,12 @@ async function syncAgentCredentialsIfChanged(url) {
3618
3661
  async function finalizeControlBoxState(url) {
3619
3662
  await syncAgentCredentials(url, { announce: true });
3620
3663
  await syncBakesWithControlBox(url);
3621
- const { syncSharedHosts } = await import("./remote-docker-share-RX5ARK45.js");
3664
+ const { syncSharedHosts } = await import("./remote-docker-share-RMS6IB5X.js");
3622
3665
  await syncSharedHosts(url, (line) => {
3623
3666
  log2.info(line);
3624
3667
  });
3625
3668
  try {
3626
- const { ensureHubDockerTarget } = await import("./hub-docker-target-REEEWUG2.js");
3669
+ const { ensureHubDockerTarget } = await import("./hub-docker-target-JKFCABK4.js");
3627
3670
  await ensureHubDockerTarget((line) => {
3628
3671
  log2.info(line);
3629
3672
  });
@@ -3697,6 +3740,7 @@ export {
3697
3740
  nudgeMessage,
3698
3741
  stopTunnelIfExposed,
3699
3742
  restoreTunnelIfExposed,
3743
+ resolveOriginGitHost,
3700
3744
  logToActiveCommand,
3701
3745
  openCommandLog,
3702
3746
  ghPreflightError,
@@ -3712,4 +3756,4 @@ export {
3712
3756
  syncAgentCredentialsIfChanged,
3713
3757
  controlPlaneSubcommands
3714
3758
  };
3715
- //# sourceMappingURL=chunk-JDSYMTMS.js.map
3759
+ //# sourceMappingURL=chunk-NAT2H7J4.js.map