@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,17 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- DEFAULT_RELAY_PORT,
3
+ DEFAULT_BOX_RELAY_PORT,
4
4
  RELAY_CONTAINER_NAME,
5
5
  RELAY_IMAGE_REF,
6
6
  RELAY_NETWORK_NAME
7
- } from "./chunk-WB6S4W7O.js";
8
- import {
9
- hashProjectPath,
10
- loadEffectiveConfig,
11
- projectDirSegment,
12
- sanitizeMnemonic,
13
- setConfigValue
14
- } from "./chunk-NHVGKFVY.js";
7
+ } from "./chunk-7Q6BG5AN.js";
15
8
  import {
16
9
  DEFAULT_BOX_IMAGE,
17
10
  computeDockerContextFingerprint,
@@ -22,7 +15,7 @@ import {
22
15
  preparedMatches,
23
16
  pullOrBuild,
24
17
  readPreparedDockerState
25
- } from "./chunk-CKD3PRON.js";
18
+ } from "./chunk-GWYD7YBK.js";
26
19
  import {
27
20
  AmbiguousBoxError,
28
21
  BOX_HOME,
@@ -38,19 +31,22 @@ import {
38
31
  STATE_DIR,
39
32
  SYNC_DRYRUN_ENV,
40
33
  addProjectAlias,
34
+ buildNoVncUrl,
41
35
  claudeInstallFingerprint,
42
36
  claudeInventoryScript,
37
+ claudeTuiEnv,
43
38
  computeClaudePullPlan,
44
39
  detectGitRepos,
45
40
  dryRunProviderSync,
46
41
  encodeClaudeProjectsKey,
42
+ ensureHub,
47
43
  errSummary,
48
44
  fetchHealthz,
49
45
  filterHostHooks,
50
46
  findBox,
51
47
  findUnsyncableSymlinks,
52
48
  generateBoxId,
53
- hostClaudeBackupExpired,
49
+ hostClaudeAccessTokenExpired,
54
50
  hostOpenCommand,
55
51
  killPid,
56
52
  makeHostGitPorts,
@@ -63,12 +59,14 @@ import {
63
59
  pickFreshBranch,
64
60
  pingHealthz,
65
61
  planCarryEntry,
62
+ portIsOccupied,
66
63
  processAlive,
67
64
  pushEnvFiles,
68
65
  readCliStamp,
69
66
  readState,
70
67
  recordBox,
71
68
  referencedPluginVersionKeys,
69
+ relayPort,
72
70
  removeBoxRecord,
73
71
  renderCarryEntries,
74
72
  reserveProjectIndex,
@@ -81,7 +79,14 @@ import {
81
79
  syncAgentboxSshConfig,
82
80
  trustWorkspace,
83
81
  writeClaudeMergedRegistries
84
- } from "./chunk-GFOWBXV7.js";
82
+ } from "./chunk-OKLEPEWZ.js";
83
+ import {
84
+ hashProjectPath,
85
+ loadEffectiveConfig,
86
+ projectDirSegment,
87
+ sanitizeMnemonic,
88
+ setConfigValue
89
+ } from "./chunk-7LNXTPEE.js";
85
90
 
86
91
  // ../../packages/sandbox-docker/dist/index.js
87
92
  import { spawnSync } from "child_process";
@@ -131,6 +136,7 @@ import { parse as parseYaml2 } from "yaml";
131
136
  import { parse as parseYaml } from "yaml";
132
137
  import { readFile as readFile3 } from "fs/promises";
133
138
  import { parse as parseYaml3 } from "yaml";
139
+ import { parse as parseYaml4 } from "yaml";
134
140
  function renderStatusTable(rows) {
135
141
  if (rows.length === 0) return "(no services configured)";
136
142
  const headers = ["NAME", "STATE", "PID", "RESTARTS", "LAST EXIT", "BLOCKED ON", "COMMAND"];
@@ -358,9 +364,7 @@ function parseReadyWhen(raw, where) {
358
364
  if (raw.log_match !== void 0) kinds.push("log_match");
359
365
  if (raw.http !== void 0) kinds.push("http");
360
366
  if (kinds.length === 0) {
361
- throw new ConfigError(
362
- `${where}.ready_when must declare exactly one of: port, log_match, http`
363
- );
367
+ throw new ConfigError(`${where}.ready_when must declare exactly one of: port, log_match, http`);
364
368
  }
365
369
  if (kinds.length > 1) {
366
370
  throw new ConfigError(
@@ -476,7 +480,8 @@ function parseArgs(raw, where) {
476
480
  if (Array.isArray(raw)) {
477
481
  const parts = [];
478
482
  for (const [i, v] of raw.entries()) {
479
- if (typeof v !== "string") throw new ConfigError(`${where}.args[${String(i)}] must be a string`);
483
+ if (typeof v !== "string")
484
+ throw new ConfigError(`${where}.args[${String(i)}] must be a string`);
480
485
  parts.push(v);
481
486
  }
482
487
  const joined = parts.join(" ").trim();
@@ -648,18 +653,30 @@ function assertBool(raw, where) {
648
653
  if (typeof raw !== "boolean") throw new ConfigError(`${where} must be a boolean`);
649
654
  return raw;
650
655
  }
651
- var TOP_LEVEL_KEYS = /* @__PURE__ */ new Set(["services", "tasks", "ide", "defaults", "carry", "replacements"]);
656
+ var TOP_LEVEL_KEYS = /* @__PURE__ */ new Set([
657
+ "services",
658
+ "tasks",
659
+ "ide",
660
+ "defaults",
661
+ "carry",
662
+ "replacements",
663
+ "tools"
664
+ ]);
652
665
  function validateUnitGraph(tasks, services) {
653
666
  const names = /* @__PURE__ */ new Set();
654
667
  for (const t of tasks) {
655
668
  if (names.has(t.name)) {
656
- throw new ConfigError(`unit name "${t.name}" declared more than once (task vs service collision)`);
669
+ throw new ConfigError(
670
+ `unit name "${t.name}" declared more than once (task vs service collision)`
671
+ );
657
672
  }
658
673
  names.add(t.name);
659
674
  }
660
675
  for (const s of services) {
661
676
  if (names.has(s.name)) {
662
- throw new ConfigError(`unit name "${s.name}" declared more than once (task vs service collision)`);
677
+ throw new ConfigError(
678
+ `unit name "${s.name}" declared more than once (task vs service collision)`
679
+ );
663
680
  }
664
681
  names.add(s.name);
665
682
  }
@@ -1013,6 +1030,124 @@ async function loadCarrySection(path) {
1013
1030
  }
1014
1031
  return parseCarrySection(text);
1015
1032
  }
1033
+ var POLL_MAX_MS = 10 * 60 * 1e3;
1034
+ var ToolsConfigError = class extends Error {
1035
+ constructor(message) {
1036
+ super(message);
1037
+ this.name = "ToolsConfigError";
1038
+ }
1039
+ };
1040
+ var ITEM_KEYS2 = /* @__PURE__ */ new Set(["bin", "allow", "deny", "timeoutMs"]);
1041
+ var TOOL_NAME_RE = /^[a-zA-Z0-9][a-zA-Z0-9._+-]{0,63}$/;
1042
+ function parseToolsRaw(raw) {
1043
+ if (raw === void 0 || raw === null) return [];
1044
+ if (Array.isArray(raw)) {
1045
+ return raw.map((item, i) => {
1046
+ if (typeof item !== "string") {
1047
+ throw new ToolsConfigError(
1048
+ `tools[${String(i)}] must be a tool name string (use the mapping form for options)`
1049
+ );
1050
+ }
1051
+ return { name: assertName(item.trim(), `tools[${String(i)}]`) };
1052
+ });
1053
+ }
1054
+ if (!isPlainObject4(raw)) {
1055
+ throw new ToolsConfigError("tools must be a list of names or a mapping of name -> options");
1056
+ }
1057
+ const out = [];
1058
+ for (const [name, value] of Object.entries(raw)) {
1059
+ const where = `tools.${name}`;
1060
+ assertName(name, where);
1061
+ if (value === null || value === void 0) {
1062
+ out.push({ name });
1063
+ continue;
1064
+ }
1065
+ if (!isPlainObject4(value)) {
1066
+ throw new ToolsConfigError(`${where} must be a mapping of options (or empty)`);
1067
+ }
1068
+ for (const key of Object.keys(value)) {
1069
+ if (!ITEM_KEYS2.has(key)) {
1070
+ throw new ToolsConfigError(
1071
+ `${where}.${key} is not a known option (allowed: ${[...ITEM_KEYS2].join(", ")})`
1072
+ );
1073
+ }
1074
+ }
1075
+ const req = { name };
1076
+ if (value["bin"] !== void 0) {
1077
+ if (typeof value["bin"] !== "string" || value["bin"].trim().length === 0) {
1078
+ throw new ToolsConfigError(`${where}.bin must be a non-empty string`);
1079
+ }
1080
+ const bin = value["bin"].trim();
1081
+ if (!TOOL_NAME_RE.test(bin)) {
1082
+ throw new ToolsConfigError(
1083
+ `${where}.bin "${bin}" must be a bare command name resolved on PATH, not a path`
1084
+ );
1085
+ }
1086
+ req.bin = bin;
1087
+ }
1088
+ const allow = parsePatternList(value["allow"], `${where}.allow`);
1089
+ if (allow) req.allow = allow;
1090
+ const deny = parsePatternList(value["deny"], `${where}.deny`);
1091
+ if (deny) req.deny = deny;
1092
+ if (value["timeoutMs"] !== void 0) {
1093
+ const n = value["timeoutMs"];
1094
+ if (typeof n !== "number" || !Number.isInteger(n) || n <= 0) {
1095
+ throw new ToolsConfigError(`${where}.timeoutMs must be a positive integer (milliseconds)`);
1096
+ }
1097
+ req.timeoutMs = n;
1098
+ }
1099
+ out.push(req);
1100
+ }
1101
+ return out;
1102
+ }
1103
+ function parseToolsSection(text) {
1104
+ let doc;
1105
+ try {
1106
+ doc = parseYaml4(text);
1107
+ } catch (err) {
1108
+ throw new ToolsConfigError(
1109
+ `yaml parse error: ${err instanceof Error ? err.message : String(err)}`
1110
+ );
1111
+ }
1112
+ if (doc === null || doc === void 0) return [];
1113
+ if (!isPlainObject4(doc)) {
1114
+ throw new ToolsConfigError("top-level config must be a mapping");
1115
+ }
1116
+ return parseToolsRaw(doc["tools"]);
1117
+ }
1118
+ function parsePatternList(raw, where) {
1119
+ if (raw === void 0 || raw === null) return void 0;
1120
+ if (!Array.isArray(raw)) {
1121
+ throw new ToolsConfigError(`${where} must be a list of regex patterns`);
1122
+ }
1123
+ const out = [];
1124
+ for (const [i, v] of raw.entries()) {
1125
+ if (typeof v !== "string" || v.trim().length === 0) {
1126
+ throw new ToolsConfigError(`${where}[${String(i)}] must be a non-empty string`);
1127
+ }
1128
+ const pattern = v.trim();
1129
+ try {
1130
+ new RegExp(pattern);
1131
+ } catch (err) {
1132
+ throw new ToolsConfigError(
1133
+ `${where}[${String(i)}] is not a valid regex: ${err instanceof Error ? err.message : String(err)}`
1134
+ );
1135
+ }
1136
+ out.push(pattern);
1137
+ }
1138
+ return out.length > 0 ? out : void 0;
1139
+ }
1140
+ function assertName(name, where) {
1141
+ if (!TOOL_NAME_RE.test(name)) {
1142
+ throw new ToolsConfigError(
1143
+ `${where}: "${name}" is not a valid tool name (plain command name, no path separators)`
1144
+ );
1145
+ }
1146
+ return name;
1147
+ }
1148
+ function isPlainObject4(v) {
1149
+ return typeof v === "object" && v !== null && !Array.isArray(v);
1150
+ }
1016
1151
 
1017
1152
  // ../../packages/sandbox-docker/dist/index.js
1018
1153
  import { randomBytes } from "crypto";
@@ -2648,6 +2783,26 @@ var ClaudeSessionError = class extends Error {
2648
2783
  this.name = "ClaudeSessionError";
2649
2784
  }
2650
2785
  };
2786
+ async function resolveClaudeTui(explicit, workspacePath) {
2787
+ if (explicit) return explicit;
2788
+ try {
2789
+ return (await loadEffectiveConfig(workspacePath ?? process.cwd())).effective.box.claudeTui;
2790
+ } catch {
2791
+ return "default";
2792
+ }
2793
+ }
2794
+ function claudeSessionEnvFlags(tui, env) {
2795
+ const flags = ["-e", `TERM=${env["TERM"] ?? "xterm-256color"}`];
2796
+ for (const k of FORWARDED_ENV_KEYS) {
2797
+ const v = env[k];
2798
+ if (typeof v === "string" && v.length > 0) flags.push("-e", `${k}=${v}`);
2799
+ }
2800
+ const wanted = claudeTuiEnv(tui);
2801
+ for (const k of ["CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN", "CLAUDE_CODE_NO_FLICKER"]) {
2802
+ flags.push("-e", `${k}=${wanted[k] ?? ""}`);
2803
+ }
2804
+ return flags;
2805
+ }
2651
2806
  function shQuote2(arg) {
2652
2807
  if (arg.length === 0) return `''`;
2653
2808
  if (/^[A-Za-z0-9_\-./=:@%+,]+$/.test(arg)) return arg;
@@ -2656,12 +2811,10 @@ function shQuote2(arg) {
2656
2811
  async function startClaudeSession(opts) {
2657
2812
  const sessionName = opts.sessionName ?? DEFAULT_CLAUDE_SESSION;
2658
2813
  const cmd = ["claude", ...opts.claudeArgs].map(shQuote2).join(" ");
2659
- const term = process.env["TERM"] ?? "xterm-256color";
2660
- const envFlags = ["-e", `TERM=${term}`];
2661
- for (const k of FORWARDED_ENV_KEYS) {
2662
- const v = process.env[k];
2663
- if (typeof v === "string" && v.length > 0) envFlags.push("-e", `${k}=${v}`);
2664
- }
2814
+ const envFlags = claudeSessionEnvFlags(
2815
+ await resolveClaudeTui(opts.claudeTui, opts.workspacePath),
2816
+ process.env
2817
+ );
2665
2818
  const result = await execa5(
2666
2819
  "docker",
2667
2820
  [
@@ -2742,7 +2895,17 @@ async function waitForTmuxPaneContent(container, sessionName, timeoutMs = 2e4) {
2742
2895
  while (Date.now() < deadline) {
2743
2896
  const res = await execa5(
2744
2897
  "docker",
2745
- ["exec", "--user", CONTAINER_USER, container, "tmux", "capture-pane", "-p", "-t", sessionName],
2898
+ [
2899
+ "exec",
2900
+ "--user",
2901
+ CONTAINER_USER,
2902
+ container,
2903
+ "tmux",
2904
+ "capture-pane",
2905
+ "-p",
2906
+ "-t",
2907
+ sessionName
2908
+ ],
2746
2909
  { reject: false }
2747
2910
  );
2748
2911
  if (res.exitCode === 0 && (res.stdout ?? "").trim().length > 0) return;
@@ -2804,7 +2967,7 @@ function runInteractiveClaudeLogin(dockerArgv) {
2804
2967
  return { exitCode: child.status ?? 1 };
2805
2968
  }
2806
2969
  async function warmUpClaudeCredentials(volume, image, opts = {}) {
2807
- const MAX_ATTEMPTS = 6;
2970
+ const MAX_ATTEMPTS = Math.max(1, opts.attempts ?? 6);
2808
2971
  const SLEEP_MS = 5e3;
2809
2972
  for (let attempt = 1; attempt <= MAX_ATTEMPTS; attempt++) {
2810
2973
  opts.onProgress?.(`checking credentials... ${attempt}/${MAX_ATTEMPTS}`);
@@ -2885,7 +3048,18 @@ async function pullClaudeExtras(spec, opts) {
2885
3048
  const hostClaude = join3(homedir2(), ".claude");
2886
3049
  const inv = await execa5(
2887
3050
  "docker",
2888
- ["run", "--rm", "--user", "0", "-v", `${spec.volume}:/src:ro`, opts.image, "sh", "-c", claudeInventoryScript("/src")],
3051
+ [
3052
+ "run",
3053
+ "--rm",
3054
+ "--user",
3055
+ "0",
3056
+ "-v",
3057
+ `${spec.volume}:/src:ro`,
3058
+ opts.image,
3059
+ "sh",
3060
+ "-c",
3061
+ claudeInventoryScript("/src")
3062
+ ],
2889
3063
  { reject: false }
2890
3064
  );
2891
3065
  if (inv.exitCode !== 0) {
@@ -3021,11 +3195,14 @@ EXTRACTED=no
3021
3195
  SEEDED=no
3022
3196
  VOL=/dst/.credentials.json
3023
3197
  HOST=/host-state/claude-credentials.json
3198
+ num() { case "$1" in ''|*[!0-9]*) echo 0;; *) echo "$1";; esac; }
3024
3199
  if [ -f "$VOL" ] && jq -e '(.claudeAiOauth.refreshToken // "") | length > 0' "$VOL" >/dev/null 2>&1; then VOL_REAL=yes; else VOL_REAL=no; fi
3025
3200
  if [ -f "$HOST" ] && jq -e '(.claudeAiOauth.refreshToken // "") | length > 0' "$HOST" >/dev/null 2>&1; then HOST_REAL=yes; else HOST_REAL=no; fi
3026
- if [ "$VOL_REAL" = yes ] && [ "$ISOLATE" != yes ]; then
3201
+ VOL_EXP=$(num "$(jq -r '(.claudeAiOauth.expiresAt // 0) | floor' "$VOL" 2>/dev/null)")
3202
+ HOST_EXP=$(num "$(jq -r '(.claudeAiOauth.expiresAt // 0) | floor' "$HOST" 2>/dev/null)")
3203
+ if [ "$VOL_REAL" = yes ] && [ "$ISOLATE" != yes ] && { [ "$HOST_REAL" = no ] || [ "$VOL_EXP" -gt "$HOST_EXP" ]; }; then
3027
3204
  cp -a "$VOL" "$HOST" && chmod 600 "$HOST" && EXTRACTED=yes
3028
- elif [ "$VOL_REAL" = no ] && [ "$HOST_REAL" = yes ]; then
3205
+ elif [ "$HOST_REAL" = yes ] && { [ "$VOL_REAL" = no ] || [ "$HOST_EXP" -gt "$VOL_EXP" ]; }; then
3029
3206
  cp -a "$HOST" "$VOL" && chown 1000:1000 "$VOL" && chmod 600 "$VOL" && SEEDED=yes && VOL_REAL=yes
3030
3207
  fi
3031
3208
  echo "EXTRACTED=$EXTRACTED SEEDED=$SEEDED VOLREAL=$VOL_REAL"
@@ -4447,20 +4624,48 @@ var VNC_CONTAINER_PORT = 6080;
4447
4624
  function buildVncUrls(record, engine) {
4448
4625
  if (!record.vncEnabled || !record.vncPassword) return {};
4449
4626
  const containerPort = record.vncContainerPort ?? VNC_CONTAINER_PORT;
4450
- const qs = `autoconnect=1&password=${encodeURIComponent(record.vncPassword)}`;
4627
+ const pw = record.vncPassword;
4451
4628
  const urls = {};
4452
4629
  if (engine === "orbstack" && record.container) {
4453
- urls.orbUrl = `http://${record.container}.orb.local:${String(containerPort)}/vnc.html?${qs}`;
4630
+ urls.orbUrl = buildNoVncUrl(
4631
+ `http://${record.container}.orb.local:${String(containerPort)}`,
4632
+ pw
4633
+ );
4454
4634
  }
4455
4635
  if (record.vncHostPort) {
4456
- urls.loopbackUrl = `http://127.0.0.1:${String(record.vncHostPort)}/vnc.html?${qs}`;
4636
+ urls.loopbackUrl = buildNoVncUrl(`http://127.0.0.1:${String(record.vncHostPort)}`, pw);
4457
4637
  }
4458
4638
  if (record.portlessVncAlias) {
4459
- const base = record.portlessVncUrl ?? `https://${record.portlessVncAlias}.localhost`;
4460
- urls.portlessUrl = `${base}/vnc.html?${qs}`;
4639
+ urls.portlessUrl = buildNoVncUrl(
4640
+ record.portlessVncUrl ?? `https://${record.portlessVncAlias}.localhost`,
4641
+ pw
4642
+ );
4461
4643
  }
4462
4644
  return urls;
4463
4645
  }
4646
+ async function resolveVncViewerUrl(box, provider, opts = {}) {
4647
+ if (!box.vncEnabled) {
4648
+ throw new Error(`VNC is disabled for box ${box.name} \u2014 recreate without \`--no-vnc\``);
4649
+ }
4650
+ if (!box.vncPassword) {
4651
+ throw new Error(
4652
+ `box ${box.name} has no VNC password recorded \u2014 recreate it to enable the desktop`
4653
+ );
4654
+ }
4655
+ if ((box.provider ?? "docker") === "docker") {
4656
+ const urls = buildVncUrls(box, await detectEngine());
4657
+ const resolved = opts.loopback ? urls.loopbackUrl : urls.portlessUrl ?? urls.orbUrl ?? urls.loopbackUrl;
4658
+ if (!resolved) {
4659
+ throw new Error(`VNC URL unavailable for box ${box.name} \u2014 the daemon may not be up`);
4660
+ }
4661
+ return resolved;
4662
+ }
4663
+ const base = await provider.resolveUrl(box, {
4664
+ kind: "vnc",
4665
+ ...opts.ttl ? { ttl: opts.ttl } : {}
4666
+ });
4667
+ return buildNoVncUrl(base, box.vncPassword);
4668
+ }
4464
4669
  var SSH_CONTAINER_PORT = 22;
4465
4670
  async function launchSshdDaemon(container, timeoutMs = 5e3) {
4466
4671
  const result = await execInBox(container, ["/usr/local/bin/agentbox-sshd-start"], {
@@ -5016,6 +5221,9 @@ var RUNTIME_ENV_BLOCKLIST = /* @__PURE__ */ new Set([
5016
5221
  "AGENTBOX_PROJECT_INDEX",
5017
5222
  "AGENTBOX_RELAY_URL",
5018
5223
  "AGENTBOX_RELAY_TOKEN",
5224
+ // Carries this machine's `relay.port`. Baking it would point every box
5225
+ // restored from the checkpoint at the creating host's port.
5226
+ "AGENTBOX_HOST_RELAY_URL",
5019
5227
  "AGENTBOX_VNC_PASSWORD",
5020
5228
  "CLAUDE_EFFORT",
5021
5229
  "CLAUDE_CODE_OAUTH_TOKEN",
@@ -5246,18 +5454,21 @@ async function ensureHomeOwnedByVscode(container) {
5246
5454
  }
5247
5455
  var STATE_DIR2 = join11(homedir9(), ".agentbox");
5248
5456
  var PID_FILE = join11(STATE_DIR2, "relay.pid");
5457
+ var HUB_PID_FILE = join11(STATE_DIR2, "hub.pid");
5249
5458
  var LOG_FILE = join11(STATE_DIR2, "relay.log");
5250
5459
  var RELAY_HOME_DIR = join11(STATE_DIR2, "relay");
5251
- var PORT = DEFAULT_RELAY_PORT;
5252
- var ENDPOINT = {
5253
- // host.docker.internal is the Docker Desktop / OrbStack-supplied alias for
5254
- // the host's loopback as seen from inside a container. The corresponding
5255
- // `--add-host=host.docker.internal:host-gateway` flag in runBox makes the
5256
- // resolution work on Linux native Docker too.
5257
- url: `http://host.docker.internal:${String(PORT)}`,
5258
- hostUrl: `http://127.0.0.1:${String(PORT)}`,
5259
- port: PORT
5260
- };
5460
+ function relayEndpoint() {
5461
+ const port = relayPort();
5462
+ return {
5463
+ // host.docker.internal is the Docker Desktop / OrbStack-supplied alias for
5464
+ // the host's loopback as seen from inside a container. The corresponding
5465
+ // `--add-host=host.docker.internal:host-gateway` flag in runBox makes the
5466
+ // resolution work on Linux native Docker too.
5467
+ url: `http://host.docker.internal:${String(port)}`,
5468
+ hostUrl: `http://127.0.0.1:${String(port)}`,
5469
+ port
5470
+ };
5471
+ }
5261
5472
  async function ensureRelay(opts = {}) {
5262
5473
  const log = opts.onLog ?? (() => {
5263
5474
  });
@@ -5270,7 +5481,14 @@ async function ensureRelay(opts = {}) {
5270
5481
  const health = await fetchHealthz(500);
5271
5482
  if (health !== null) {
5272
5483
  if (!shouldReclaimForVersion(health, currentVersion)) {
5273
- return ENDPOINT;
5484
+ return relayEndpoint();
5485
+ }
5486
+ if (health.ui === true) {
5487
+ log(
5488
+ `a hub from agentbox ${health.version ?? "?"} holds :${String(relayPort())} but this CLI is ${currentVersion ?? "?"} \u2014 restarting the hub rather than replacing it with a relay`
5489
+ );
5490
+ await ensureHub({ onLog: log });
5491
+ return relayEndpoint();
5274
5492
  }
5275
5493
  if (health.cliEntry === false) {
5276
5494
  log(
@@ -5286,11 +5504,11 @@ async function ensureRelay(opts = {}) {
5286
5504
  const existingPid = await readPidFile();
5287
5505
  if (existingPid !== null && await processAlive(existingPid)) {
5288
5506
  for (let i = 0; i < 10; i++) {
5289
- if (await pingHealthz(300)) return ENDPOINT;
5507
+ if (await pingHealthz(300)) return relayEndpoint();
5290
5508
  await delay2(200);
5291
5509
  }
5292
5510
  log(`relay pid ${String(existingPid)} alive but /healthz unresponsive \u2014 proceeding anyway`);
5293
- return ENDPOINT;
5511
+ return relayEndpoint();
5294
5512
  }
5295
5513
  if (existingPid !== null) {
5296
5514
  await unlink(PID_FILE).catch(() => {
@@ -5319,9 +5537,11 @@ async function reclaimRelay(reportedPid, log) {
5319
5537
  }
5320
5538
  await unlink(PID_FILE).catch(() => {
5321
5539
  });
5540
+ await unlink(HUB_PID_FILE).catch(() => {
5541
+ });
5322
5542
  if (await pingHealthz(300)) {
5323
5543
  throw new Error(
5324
- `a relay is still listening on :${String(PORT)} and could not be stopped (reported pid ${String(reportedPid ?? "unknown")}); kill it manually and retry`
5544
+ `a relay is still listening on :${String(relayPort())} and could not be stopped (reported pid ${String(reportedPid ?? "unknown")}); kill it manually and retry`
5325
5545
  );
5326
5546
  }
5327
5547
  }
@@ -5330,7 +5550,7 @@ async function spawnRelay(relayBin, cliEntry, log) {
5330
5550
  const cloudBackends = process.env.AGENTBOX_CLOUD_BACKENDS ?? join11(dirname3(cliEntry), "cloud-backends.js");
5331
5551
  const child = spawn(
5332
5552
  process.execPath,
5333
- [relayBin, "serve", "--port", String(PORT), "--host", "0.0.0.0"],
5553
+ [relayBin, "serve", "--port", String(relayPort()), "--host", "0.0.0.0"],
5334
5554
  {
5335
5555
  detached: true,
5336
5556
  stdio: ["ignore", logFd, logFd],
@@ -5342,21 +5562,63 @@ async function spawnRelay(relayBin, cliEntry, log) {
5342
5562
  }
5343
5563
  );
5344
5564
  child.unref();
5565
+ let exit = null;
5566
+ child.on("exit", (code, signal) => {
5567
+ exit = { code, signal };
5568
+ });
5345
5569
  if (typeof child.pid === "number") {
5346
5570
  await writeFile3(PID_FILE, String(child.pid), "utf8");
5347
- log(`spawned relay host process (pid ${String(child.pid)}, port ${String(PORT)})`);
5571
+ log(`spawned relay host process (pid ${String(child.pid)}, port ${String(relayPort())})`);
5348
5572
  }
5573
+ const ep = relayEndpoint();
5349
5574
  for (let i = 0; i < 25; i++) {
5350
- if (await pingHealthz(300)) {
5351
- log(`relay reachable on ${ENDPOINT.hostUrl}`);
5352
- return ENDPOINT;
5575
+ if (await fetchHealthz(300) !== null) {
5576
+ log(`relay reachable on ${ep.hostUrl}`);
5577
+ return ep;
5578
+ }
5579
+ if (exit !== null) {
5580
+ await unlink(PID_FILE).catch(() => {
5581
+ });
5582
+ await delay2(150);
5583
+ throw new Error(
5584
+ await relayStartupError(`relay process exited (${describeExit(exit)}) during startup`)
5585
+ );
5353
5586
  }
5354
5587
  await delay2(200);
5355
5588
  }
5589
+ await unlink(PID_FILE).catch(() => {
5590
+ });
5356
5591
  throw new Error(
5357
- `relay did not become reachable on ${ENDPOINT.hostUrl} within 5s; see ${LOG_FILE}`
5592
+ await relayStartupError(`relay did not become reachable on ${ep.hostUrl} within 5s`)
5358
5593
  );
5359
5594
  }
5595
+ function describeExit(exit) {
5596
+ if (exit.signal !== null) return `killed by ${exit.signal}`;
5597
+ return `exit code ${String(exit.code ?? "unknown")}`;
5598
+ }
5599
+ async function relayStartupError(headline) {
5600
+ const parts = [headline];
5601
+ if (await portIsOccupied(300)) {
5602
+ parts.push(
5603
+ `
5604
+ port ${String(relayPort())} is held by a process that is not an agentbox relay. Free it, or move the relay with \`agentbox config set relay.port <port> --global\` (then \`agentbox relay restart\`).`
5605
+ );
5606
+ }
5607
+ const tail = await tailFile(LOG_FILE, 20);
5608
+ parts.push(tail ? `
5609
+ --- last lines of ${LOG_FILE} ---
5610
+ ${tail}` : `
5611
+ see ${LOG_FILE}`);
5612
+ return parts.join("");
5613
+ }
5614
+ async function tailFile(file, maxLines) {
5615
+ try {
5616
+ const lines = (await readFile6(file, "utf8")).split("\n").filter((l) => l.trim().length > 0);
5617
+ return lines.slice(-maxLines).join("\n");
5618
+ } catch {
5619
+ return "";
5620
+ }
5621
+ }
5360
5622
  function resolveRelayBin() {
5361
5623
  const override = process.env.AGENTBOX_RELAY_BIN;
5362
5624
  if (override && existsSync3(override)) return override;
@@ -5478,20 +5740,22 @@ async function stopRelay() {
5478
5740
  return { stopped: true, pid };
5479
5741
  }
5480
5742
  async function getRelayStatus() {
5481
- const pid = await readPidFile();
5482
- const pidAlive2 = pid !== null && await processAlive(pid);
5743
+ const fromFile = await readPidFile();
5483
5744
  const health = await fetchHealthz(300);
5745
+ const pid = fromFile ?? health?.pid ?? null;
5746
+ const pidAlive2 = pid !== null && await processAlive(pid);
5484
5747
  return {
5485
5748
  running: health !== null,
5486
5749
  pid,
5487
5750
  pidAlive: pidAlive2,
5488
- port: PORT,
5489
- endpoint: ENDPOINT,
5751
+ port: relayPort(),
5752
+ endpoint: relayEndpoint(),
5490
5753
  health: health === null ? null : {
5491
5754
  boxes: health.boxes,
5492
5755
  events: health.events,
5493
5756
  version: health.version,
5494
- commit: health.commit
5757
+ commit: health.commit,
5758
+ ui: health.ui
5495
5759
  },
5496
5760
  pidFile: PID_FILE,
5497
5761
  logFile: LOG_FILE
@@ -5540,6 +5804,12 @@ async function forgetBoxFromRelay(boxId) {
5540
5804
  } catch {
5541
5805
  }
5542
5806
  }
5807
+ async function stopBoxPollerOnRelay(boxId) {
5808
+ try {
5809
+ await adminPost("/admin/stop-poller", { boxId });
5810
+ } catch {
5811
+ }
5812
+ }
5543
5813
  async function setRelayNotice(boxId, kind, message, ttlMs) {
5544
5814
  try {
5545
5815
  const body = await adminPostForJson("/admin/notices/set", {
@@ -5580,7 +5850,7 @@ async function adminPost(path, body) {
5580
5850
  const req = httpRequest(
5581
5851
  {
5582
5852
  host: "127.0.0.1",
5583
- port: PORT,
5853
+ port: relayPort(),
5584
5854
  method: "POST",
5585
5855
  path,
5586
5856
  headers: {
@@ -5618,7 +5888,7 @@ async function adminPostForJson(path, body) {
5618
5888
  const req = httpRequest(
5619
5889
  {
5620
5890
  host: "127.0.0.1",
5621
- port: PORT,
5891
+ port: relayPort(),
5622
5892
  method: "POST",
5623
5893
  path,
5624
5894
  headers: {
@@ -6164,14 +6434,14 @@ async function createBox(opts) {
6164
6434
  }
6165
6435
  const relayEnv = relayUp ? {
6166
6436
  // The in-box ctl client always talks to its own in-box relay/forwarder
6167
- // on AGENTBOX_BOX_RELAY_PORT (default 8788). For docker boxes the
6168
- // forwarder transparently proxies to the host relay at
6169
- // host.docker.internal:8787 (the matching `--add-host` is set in
6170
- // runBox). This keeps :8787 inside the box free for a nested
6171
- // agentbox to claim its own host relay.
6172
- AGENTBOX_RELAY_URL: `http://127.0.0.1:8788`,
6437
+ // on AGENTBOX_BOX_RELAY_PORT (DEFAULT_BOX_RELAY_PORT, 8788). For docker
6438
+ // boxes the forwarder transparently proxies to the host relay at
6439
+ // host.docker.internal:<relay.port> (the matching `--add-host` is set in
6440
+ // runBox). The two ports stay distinct so :8787 inside the box remains
6441
+ // free for a nested agentbox to claim its own host relay.
6442
+ AGENTBOX_RELAY_URL: `http://127.0.0.1:${String(DEFAULT_BOX_RELAY_PORT)}`,
6173
6443
  AGENTBOX_RELAY_TOKEN: relayToken,
6174
- AGENTBOX_HOST_RELAY_URL: `http://host.docker.internal:8787`
6444
+ AGENTBOX_HOST_RELAY_URL: `http://host.docker.internal:${String(relayPort())}`
6175
6445
  } : {};
6176
6446
  const vncEnabled = opts.vnc?.enabled !== false;
6177
6447
  const vncPassword = vncEnabled ? generateVncPassword() : void 0;
@@ -6705,7 +6975,7 @@ async function listBoxes() {
6705
6975
  const cachedWebUrl = webPort > 0 ? b.cloud?.previewUrls?.[webPort] : void 0;
6706
6976
  const webUrl = portlessWebUrl ?? cachedWebUrl;
6707
6977
  const portlessVncBase = b.portlessVncAlias !== void 0 ? b.portlessVncUrl ?? `https://${b.portlessVncAlias}.localhost` : void 0;
6708
- const vncUrl = portlessVncBase && b.vncPassword ? `${portlessVncBase}/vnc.html?autoconnect=1&password=${encodeURIComponent(b.vncPassword)}` : void 0;
6978
+ const vncUrl = portlessVncBase && b.vncPassword ? buildNoVncUrl(portlessVncBase, b.vncPassword) : void 0;
6709
6979
  const cloudEndpoints = [];
6710
6980
  if (webUrl) {
6711
6981
  cloudEndpoints.push({
@@ -7884,7 +8154,7 @@ var dockerHubPortlessHooks = {
7884
8154
  var dockerCredentialRefresh = async (opts) => {
7885
8155
  const log = opts.onLog ?? (() => {
7886
8156
  });
7887
- if (!await hostClaudeBackupExpired()) {
8157
+ if (!await hostClaudeAccessTokenExpired()) {
7888
8158
  return;
7889
8159
  }
7890
8160
  log("claude: host credentials backup expired \u2014 refreshing from docker shared volume");
@@ -7910,6 +8180,31 @@ var dockerCredentialRefresh = async (opts) => {
7910
8180
  } catch {
7911
8181
  }
7912
8182
  };
8183
+ async function renewClaudeCredential(opts) {
8184
+ const log = opts.onLog ?? (() => {
8185
+ });
8186
+ const image = opts.image ?? DEFAULT_BOX_IMAGE;
8187
+ try {
8188
+ await syncClaudeCredentials({ volume: SHARED_CLAUDE_VOLUME }, { image, isolate: false });
8189
+ const warm = await warmUpClaudeCredentials(SHARED_CLAUDE_VOLUME, image, {
8190
+ attempts: opts.attempts ?? 2,
8191
+ onProgress: (line) => {
8192
+ log(line);
8193
+ }
8194
+ });
8195
+ if (!warm.warmed) {
8196
+ log("claude: saved login did not renew \u2014 it may have been rotated away by another box");
8197
+ return "failed";
8198
+ }
8199
+ const synced = await syncClaudeCredentials(
8200
+ { volume: SHARED_CLAUDE_VOLUME },
8201
+ { image, isolate: false }
8202
+ );
8203
+ return synced.direction === "extracted" ? "renewed" : "unchanged";
8204
+ } catch {
8205
+ return "failed";
8206
+ }
8207
+ }
7913
8208
  function browserSessionActive(stdout, exitCode) {
7914
8209
  return exitCode === 0 && !/no active sessions/i.test(stdout);
7915
8210
  }
@@ -7946,6 +8241,7 @@ export {
7946
8241
  parseReplacementsSection,
7947
8242
  parseCarrySection,
7948
8243
  loadCarrySection,
8244
+ parseToolsSection,
7949
8245
  execInBox,
7950
8246
  removeImage,
7951
8247
  volumeExists,
@@ -8062,6 +8358,7 @@ export {
8062
8358
  generateVncPassword,
8063
8359
  VNC_CONTAINER_PORT,
8064
8360
  buildVncUrls,
8361
+ resolveVncViewerUrl,
8065
8362
  SSH_CONTAINER_PORT,
8066
8363
  launchSshdDaemon,
8067
8364
  installAuthorizedKey,
@@ -8100,6 +8397,7 @@ export {
8100
8397
  computeNextCheckpointName,
8101
8398
  createCheckpoint,
8102
8399
  CheckpointError,
8400
+ relayEndpoint,
8103
8401
  ensureRelay,
8104
8402
  resolveRelayBin,
8105
8403
  stopRelay,
@@ -8107,6 +8405,7 @@ export {
8107
8405
  generateRelayToken,
8108
8406
  registerBoxWithRelay,
8109
8407
  forgetBoxFromRelay,
8408
+ stopBoxPollerOnRelay,
8110
8409
  setRelayNotice,
8111
8410
  clearRelayNotice,
8112
8411
  mintHostInitiatedToken,
@@ -8167,8 +8466,9 @@ export {
8167
8466
  volumeSettingsTarget,
8168
8467
  dockerHubPortlessHooks,
8169
8468
  dockerCredentialRefresh,
8469
+ renewClaudeCredential,
8170
8470
  browserSessionActive,
8171
8471
  ensureBoxBrowser,
8172
8472
  ensureBoxBrowserShowingApp
8173
8473
  };
8174
- //# sourceMappingURL=chunk-46NNZMZT.js.map
8474
+ //# sourceMappingURL=chunk-EPFXLXCW.js.map