@madarco/agentbox 0.28.1 → 0.29.1

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 +146 -0
  2. package/dist/_cloud-attach-EUO2OL7W.js +30 -0
  3. package/dist/chunk-2JHPGPLE.js +71 -0
  4. package/dist/chunk-2JHPGPLE.js.map +1 -0
  5. package/dist/{chunk-JQLOGVZK.js → chunk-4KYP775X.js} +85 -21
  6. package/dist/chunk-4KYP775X.js.map +1 -0
  7. package/dist/{chunk-V5NWSLWD.js → chunk-4NUETVTR.js} +14 -14
  8. package/dist/{chunk-OXKW4GWD.js → chunk-53OTEDBS.js} +4 -70
  9. package/dist/chunk-53OTEDBS.js.map +1 -0
  10. package/dist/{chunk-FGQFVUMH.js → chunk-6YSYQZRH.js} +3 -3
  11. package/dist/{chunk-KFLGXE3R.js → chunk-73D2HKA3.js} +138 -24
  12. package/dist/chunk-73D2HKA3.js.map +1 -0
  13. package/dist/{chunk-HYXCH4GA.js → chunk-7LC5IG5K.js} +7 -7
  14. package/dist/{chunk-NHVGKFVY.js → chunk-7LNXTPEE.js} +340 -22
  15. package/dist/chunk-7LNXTPEE.js.map +1 -0
  16. package/dist/{chunk-74VIUGY6.js → chunk-A2TATHHJ.js} +6 -9
  17. package/dist/chunk-A2TATHHJ.js.map +1 -0
  18. package/dist/{chunk-YI4GHC2E.js → chunk-AC3HU25W.js} +12 -15
  19. package/dist/chunk-AC3HU25W.js.map +1 -0
  20. package/dist/{chunk-7ABO7OIF.js → chunk-AUHYXXCA.js} +4 -4
  21. package/dist/{chunk-FPMRFMVK.js → chunk-B4YFG5TB.js} +9 -9
  22. package/dist/{chunk-OUF3YTQO.js → chunk-BIKWXLX7.js} +14 -17
  23. package/dist/chunk-BIKWXLX7.js.map +1 -0
  24. package/dist/{chunk-CKD3PRON.js → chunk-CZPVVFCF.js} +12 -9
  25. package/dist/{chunk-CKD3PRON.js.map → chunk-CZPVVFCF.js.map} +1 -1
  26. package/dist/chunk-F4PPZ4SI.js +17 -0
  27. package/dist/chunk-F4PPZ4SI.js.map +1 -0
  28. package/dist/{chunk-BWM56FKY.js → chunk-FEFLAITR.js} +11 -11
  29. package/dist/{chunk-EVT2SNF2.js → chunk-FELVUIIM.js} +3 -3
  30. package/dist/{chunk-46NNZMZT.js → chunk-I2DEYQLZ.js} +372 -72
  31. package/dist/chunk-I2DEYQLZ.js.map +1 -0
  32. package/dist/{chunk-OUWVN2F2.js → chunk-I7BSBUPC.js} +16 -13
  33. package/dist/chunk-I7BSBUPC.js.map +1 -0
  34. package/dist/{chunk-G3H2L3O2.js → chunk-MNDKP4VS.js} +23 -3
  35. package/dist/chunk-MNDKP4VS.js.map +1 -0
  36. package/dist/{chunk-BUMKBUXS.js → chunk-PAWAGULH.js} +3 -3
  37. package/dist/{chunk-4PR3KJ5X.js → chunk-PFEBKXFD.js} +20 -20
  38. package/dist/{chunk-JDSYMTMS.js → chunk-QDU7YDME.js} +130 -66
  39. package/dist/chunk-QDU7YDME.js.map +1 -0
  40. package/dist/{chunk-JNC7MCWJ.js → chunk-S32GHLVU.js} +10 -10
  41. package/dist/chunk-S32GHLVU.js.map +1 -0
  42. package/dist/{chunk-WB6S4W7O.js → chunk-THKVKVRF.js} +2413 -1012
  43. package/dist/chunk-THKVKVRF.js.map +1 -0
  44. package/dist/{chunk-7RSE7ESY.js → chunk-UEEW5TW7.js} +27 -18
  45. package/dist/chunk-UEEW5TW7.js.map +1 -0
  46. package/dist/{chunk-B4DAH2F2.js → chunk-UTOC2NHC.js} +3 -3
  47. package/dist/{chunk-NHTRTST5.js → chunk-WDBDFLH3.js} +38 -15
  48. package/dist/chunk-WDBDFLH3.js.map +1 -0
  49. package/dist/{chunk-PSA6GADQ.js → chunk-WHFCJBMO.js} +14 -1
  50. package/dist/chunk-WHFCJBMO.js.map +1 -0
  51. package/dist/{chunk-KJ5TCYNI.js → chunk-WJUKN4L4.js} +7 -6
  52. package/dist/chunk-WJUKN4L4.js.map +1 -0
  53. package/dist/{chunk-GFOWBXV7.js → chunk-XENTK32L.js} +463 -253
  54. package/dist/chunk-XENTK32L.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-YQFX2ILX.js} +19 -18
  58. package/dist/cp-hub-upload-RMJ3XJ65.js +81 -0
  59. package/dist/cp-hub-upload-RMJ3XJ65.js.map +1 -0
  60. package/dist/{custody-client-PNCC2HBJ.js → custody-client-L4FEFW4C.js} +5 -4
  61. package/dist/{deploy-hetzner-SSGSXAKA.js → deploy-hetzner-EECQ4JCM.js} +10 -10
  62. package/dist/{dist-RN6JOAG4.js → dist-3BKIPZR3.js} +81 -45
  63. package/dist/{dist-K5M4HKG7.js → dist-C5B6NGBO.js} +21 -9
  64. package/dist/{dist-6PYXFREL.js → dist-E5EXDZG4.js} +61 -16
  65. package/dist/dist-E5EXDZG4.js.map +1 -0
  66. package/dist/{dist-XATN4ZIR.js → dist-FBM2WS5S.js} +22 -4
  67. package/dist/{dist-XQLKK7H3.js → dist-NFF2KEMB.js} +54 -28
  68. package/dist/dist-NFF2KEMB.js.map +1 -0
  69. package/dist/{dist-5OR4QTQW.js → dist-NTUHJOK3.js} +9 -9
  70. package/dist/{dist-ZNQZHTUN.js → dist-PTYASENV.js} +35 -6
  71. package/dist/{dist-POILUDVJ.js → dist-Q4UDCSZQ.js} +9 -9
  72. package/dist/{dist-M4O5MU5K.js → dist-TXFTYNNE.js} +8 -8
  73. package/dist/{dist-EPFS5PRI.js → dist-XUOHE22G.js} +10 -10
  74. package/dist/{dist-SN2TCRZ5.js → dist-Z2TPC3EN.js} +9 -9
  75. package/dist/host-reach-drainer-N4JSFUBY.js +9 -0
  76. package/dist/hub-3HPYOV5O.js +37 -0
  77. package/dist/{hub-adopt-I44VGSBL.js → hub-adopt-NCCCMMXL.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-ZKAWXVPH.js} +16 -16
  80. package/dist/index.js +1321 -882
  81. package/dist/index.js.map +1 -1
  82. package/dist/prepare-KIVDQRMN.js +41 -0
  83. package/dist/prepared-custody-EFSOOAIQ.js +36 -0
  84. package/dist/{prepared-state-PV3GUBHO-MF56HWMZ.js → prepared-state-LNQ7DYSU-2YFSDOCV.js} +4 -3
  85. package/dist/{publish-credentials-BPHUO5VL.js → publish-credentials-F2A5OVCO.js} +11 -11
  86. package/dist/registry-O3X2CDDU.js +18 -0
  87. package/dist/relay-3T57T4RI.js +20 -0
  88. package/dist/relay-3T57T4RI.js.map +1 -0
  89. package/dist/{remote-docker-share-RX5ARK45.js → remote-docker-share-QDCBM5UM.js} +11 -11
  90. package/dist/remote-docker-share-QDCBM5UM.js.map +1 -0
  91. package/dist/tool-grant-push-6ISDIJKH.js +90 -0
  92. package/dist/tool-grant-push-6ISDIJKH.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 +6760 -5299
  96. package/runtime/_shared/gh-shim +103 -228
  97. package/runtime/digitalocean/agentbox-tool-shim +21 -0
  98. package/runtime/digitalocean/ctl.cjs +6760 -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 +6760 -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 +6760 -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 +6760 -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-QU3FFGJY.js → chunk-2WB3A5IN.js} +11 -14
  336. package/runtime/hub/apps/hub/{chunk-LPYK2354.js → chunk-5ABFGGPT.js} +339 -21
  337. package/runtime/hub/apps/hub/{chunk-VKOCY6SX.js → chunk-BI4MPGQT.js} +49 -14
  338. package/runtime/hub/apps/hub/{chunk-UMPTTQBE.js → chunk-G6FJR7TN.js} +461 -251
  339. package/runtime/hub/apps/hub/{chunk-KTVETF3F.js → chunk-QGAP34GN.js} +11 -8
  340. package/runtime/hub/apps/hub/{chunk-5TM7XXLT.js → chunk-QWSP6WJ2.js} +2833 -1277
  341. package/runtime/hub/apps/hub/{chunk-EZUK53CC.js → chunk-RPPOFMPA.js} +85 -21
  342. package/runtime/hub/apps/hub/{chunk-3LAHFDJF.js → chunk-VWQNSZGI.js} +22 -2
  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-JVEDVVVG.js → dist-4F6XEJHK.js} +7 -7
  346. package/runtime/hub/apps/hub/{dist-2YP57GMB.js → dist-A3JOKKYG.js} +13 -13
  347. package/runtime/hub/apps/hub/{dist-D265LCAN.js → dist-CGH7PEMZ.js} +21 -3
  348. package/runtime/hub/apps/hub/{dist-SYWTB6RD.js → dist-F547YSBE.js} +15 -18
  349. package/runtime/hub/apps/hub/{dist-YK5FFPXZ.js → dist-FEHV4PC7.js} +62 -20
  350. package/runtime/hub/apps/hub/{dist-NKCXH5DW.js → dist-P7NT6VLK.js} +6 -6
  351. package/runtime/hub/apps/hub/{dist-E2FTSTCY.js → dist-W2YXTEQN.js} +34 -5
  352. package/runtime/hub/apps/hub/{dist-ELZHBQEM.js → dist-W5SGEJLA.js} +11 -11
  353. package/runtime/hub/apps/hub/{dist-N3E5YAYY.js → dist-YB3Y2XDK.js} +53 -26
  354. package/runtime/hub/apps/hub/{dist-5HTJSOHS.js → dist-ZTJMZLED.js} +19 -7
  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-I5QBLSRU.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-4I7FNNNS.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 +16626 -14688
  371. package/runtime/vercel/agentbox-tool-shim +21 -0
  372. package/runtime/vercel/ctl.cjs +6760 -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-EUO2OL7W.js.map} +0 -0
  417. /package/dist/{chunk-V5NWSLWD.js.map → chunk-4NUETVTR.js.map} +0 -0
  418. /package/dist/{chunk-FGQFVUMH.js.map → chunk-6YSYQZRH.js.map} +0 -0
  419. /package/dist/{chunk-HYXCH4GA.js.map → chunk-7LC5IG5K.js.map} +0 -0
  420. /package/dist/{chunk-7ABO7OIF.js.map → chunk-AUHYXXCA.js.map} +0 -0
  421. /package/dist/{chunk-FPMRFMVK.js.map → chunk-B4YFG5TB.js.map} +0 -0
  422. /package/dist/{chunk-BWM56FKY.js.map → chunk-FEFLAITR.js.map} +0 -0
  423. /package/dist/{chunk-EVT2SNF2.js.map → chunk-FELVUIIM.js.map} +0 -0
  424. /package/dist/{chunk-BUMKBUXS.js.map → chunk-PAWAGULH.js.map} +0 -0
  425. /package/dist/{chunk-4PR3KJ5X.js.map → chunk-PFEBKXFD.js.map} +0 -0
  426. /package/dist/{chunk-B4DAH2F2.js.map → chunk-UTOC2NHC.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-YQFX2ILX.js.map} +0 -0
  429. /package/dist/{custody-client-PNCC2HBJ.js.map → custody-client-L4FEFW4C.js.map} +0 -0
  430. /package/dist/{deploy-hetzner-SSGSXAKA.js.map → deploy-hetzner-EECQ4JCM.js.map} +0 -0
  431. /package/dist/{dist-5OR4QTQW.js.map → dist-3BKIPZR3.js.map} +0 -0
  432. /package/dist/{dist-EPFS5PRI.js.map → dist-C5B6NGBO.js.map} +0 -0
  433. /package/dist/{dist-K5M4HKG7.js.map → dist-FBM2WS5S.js.map} +0 -0
  434. /package/dist/{dist-M4O5MU5K.js.map → dist-NTUHJOK3.js.map} +0 -0
  435. /package/dist/{dist-POILUDVJ.js.map → dist-PTYASENV.js.map} +0 -0
  436. /package/dist/{dist-RN6JOAG4.js.map → dist-Q4UDCSZQ.js.map} +0 -0
  437. /package/dist/{dist-SN2TCRZ5.js.map → dist-TXFTYNNE.js.map} +0 -0
  438. /package/dist/{dist-XATN4ZIR.js.map → dist-XUOHE22G.js.map} +0 -0
  439. /package/dist/{dist-ZNQZHTUN.js.map → dist-Z2TPC3EN.js.map} +0 -0
  440. /package/dist/{hub-MJ7O4WXW.js.map → host-reach-drainer-N4JSFUBY.js.map} +0 -0
  441. /package/dist/{hub-adopt-I44VGSBL.js.map → hub-3HPYOV5O.js.map} +0 -0
  442. /package/dist/{hub-api-client-WJPBXZAZ.js.map → hub-adopt-NCCCMMXL.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-ZKAWXVPH.js.map} +0 -0
  445. /package/dist/{prepared-custody-QIXW7MJM.js.map → prepare-KIVDQRMN.js.map} +0 -0
  446. /package/dist/{prepared-state-PV3GUBHO-MF56HWMZ.js.map → prepared-custody-EFSOOAIQ.js.map} +0 -0
  447. /package/dist/{relay-DRDELF6B.js.map → prepared-state-LNQ7DYSU-2YFSDOCV.js.map} +0 -0
  448. /package/dist/{publish-credentials-BPHUO5VL.js.map → publish-credentials-F2A5OVCO.js.map} +0 -0
  449. /package/dist/{remote-docker-share-RX5ARK45.js.map → registry-O3X2CDDU.js.map} +0 -0
  450. /package/runtime/hub/apps/hub/.next/static/{z7_2bKU93xE7GwllL1Duv → nDHi_1342DzyGDC14ocQo}/_buildManifest.js +0 -0
  451. /package/runtime/hub/apps/hub/.next/static/{z7_2bKU93xE7GwllL1Duv → nDHi_1342DzyGDC14ocQo}/_clientMiddlewareManifest.js +0 -0
  452. /package/runtime/hub/apps/hub/.next/static/{z7_2bKU93xE7GwllL1Duv → nDHi_1342DzyGDC14ocQo}/_ssgManifest.js +0 -0
@@ -7,21 +7,21 @@ import {
7
7
  hostKeyDir,
8
8
  listHostAliases,
9
9
  parseRemoteTarget
10
- } from "./chunk-BWM56FKY.js";
10
+ } from "./chunk-FEFLAITR.js";
11
11
  import {
12
12
  HubApiError
13
- } from "./chunk-PSA6GADQ.js";
13
+ } from "./chunk-WHFCJBMO.js";
14
14
  import {
15
15
  quoteShellArg
16
- } from "./chunk-JQLOGVZK.js";
17
- import {
18
- loadEffectiveConfig
19
- } from "./chunk-NHVGKFVY.js";
16
+ } from "./chunk-4KYP775X.js";
20
17
  import {
21
18
  mintSshKey,
22
19
  resolveSshConfigTarget,
23
20
  sshExec
24
- } from "./chunk-GFOWBXV7.js";
21
+ } from "./chunk-XENTK32L.js";
22
+ import {
23
+ loadEffectiveConfig
24
+ } from "./chunk-7LNXTPEE.js";
25
25
 
26
26
  // src/control-plane/remote-docker-share.ts
27
27
  import { readFile, rm } from "fs/promises";
@@ -164,7 +164,7 @@ async function locallySharedAliases() {
164
164
  return out;
165
165
  }
166
166
  async function shareAfterAdd(alias) {
167
- const { localExposedLoopbackUrl, resolveHubApiClient } = await import("./control-plane-5R7PYRQ6.js");
167
+ const { localExposedLoopbackUrl, resolveHubApiClient } = await import("./control-plane-YQFX2ILX.js");
168
168
  const cfg = await loadEffectiveConfig(process.cwd()).catch(() => null);
169
169
  const url = cfg?.effective.relay.controlPlaneUrl;
170
170
  if (!url) return;
@@ -192,7 +192,7 @@ The host is registered here, so \`agentbox docker:${alias} \u2026\` still works
192
192
  async function syncSharedHosts(urlFlag, onLog) {
193
193
  const aliases = await locallySharedAliases();
194
194
  if (aliases.length === 0) return;
195
- const { localExposedLoopbackUrl, resolveHubApiClient } = await import("./control-plane-5R7PYRQ6.js");
195
+ const { localExposedLoopbackUrl, resolveHubApiClient } = await import("./control-plane-YQFX2ILX.js");
196
196
  if (await localExposedLoopbackUrl().catch(() => null) !== null) return;
197
197
  const client = await resolveHubApiClient(urlFlag, { quiet: true });
198
198
  if (!client) {
@@ -210,9 +210,9 @@ var CONTROL_BOX_STATUS_MS = 5e3;
210
210
  async function controlBoxKnowsHost(alias, effective) {
211
211
  if (!alias || !effective.relay?.controlPlaneUrl) return false;
212
212
  const [{ resolveHubApiTarget }, { HubApiClient }, { deadlineFetch, hostReachable }] = await Promise.all([
213
- import("./control-plane-5R7PYRQ6.js"),
214
- import("./hub-api-client-WJPBXZAZ.js"),
215
- import("./dist-M4O5MU5K.js")
213
+ import("./control-plane-YQFX2ILX.js"),
214
+ import("./hub-api-client-5U6WOTZ3.js"),
215
+ import("./dist-TXFTYNNE.js")
216
216
  ]);
217
217
  const target = await resolveHubApiTarget(void 0, { quiet: true }).catch(() => null);
218
218
  if (!target) return false;
@@ -225,7 +225,7 @@ async function controlBoxKnowsHost(alias, effective) {
225
225
  return !!hosts?.some((h) => h.alias === alias);
226
226
  }
227
227
  async function hubCanRunEngine(providerName, remoteHost, effective) {
228
- const { isHubRoutableProvider } = await import("./dist-XATN4ZIR.js");
228
+ const { isHubRoutableProvider } = await import("./dist-FBM2WS5S.js");
229
229
  if (isHubRoutableProvider(providerName)) return true;
230
230
  if (providerName !== "remote-docker" || !remoteHost) return false;
231
231
  if ((await locallySharedAliases()).includes(remoteHost)) return true;
@@ -246,4 +246,4 @@ export {
246
246
  hubCanRunEngine,
247
247
  unsharedHostReason
248
248
  };
249
- //# sourceMappingURL=chunk-V5NWSLWD.js.map
249
+ //# sourceMappingURL=chunk-4NUETVTR.js.map
@@ -3,66 +3,7 @@ import {
3
3
  HubApiClient,
4
4
  HubApiError,
5
5
  SUPPORTED_HUB_API_VERSIONS
6
- } from "./chunk-PSA6GADQ.js";
7
- import {
8
- getRuntimeProviderNames,
9
- isRuntimeProvider,
10
- loadProviderModule
11
- } from "./chunk-OUWVN2F2.js";
12
- import {
13
- REMOTE_DOCKER,
14
- parseProviderSpec
15
- } from "./chunk-NHVGKFVY.js";
16
-
17
- // src/provider/spec.ts
18
- function resolveCreateProviderSpec(providerName, remoteHost) {
19
- const raw = providerName && providerName.trim() || "docker";
20
- if (remoteHost && parseProviderSpec(raw).name === "docker") return `docker:${remoteHost}`;
21
- return raw;
22
- }
23
- function resolveProviderChoice(cfg, opts = {}) {
24
- const { name: providerName, remoteHost: specHost } = parseProviderSpec(
25
- opts.provider?.trim() || cfg.box.provider || "docker"
26
- );
27
- const host = opts.remoteHost?.trim() || specHost || (cfg.box.remoteDockerHost || "").trim() || void 0;
28
- const remoteHost = providerName === REMOTE_DOCKER ? host : void 0;
29
- return { providerName, remoteHost, spec: providerSpecFor(providerName, remoteHost) };
30
- }
31
- function providerSpecFor(providerName, remoteHost) {
32
- return providerName === REMOTE_DOCKER && remoteHost ? `docker:${remoteHost}` : providerName;
33
- }
34
-
35
- // src/provider/registry.ts
36
- function isKnownProvider(name) {
37
- try {
38
- return isRuntimeProvider(parseProviderSpec(name).name);
39
- } catch {
40
- return false;
41
- }
42
- }
43
- async function getProvider(name) {
44
- const mod = await loadProviderModule(parseProviderSpec(name).name);
45
- if (mod.ensureCredentials) await mod.ensureCredentials();
46
- return mod.provider;
47
- }
48
- async function providerForBox(box) {
49
- return getProvider(box.provider ?? "docker");
50
- }
51
- async function loadControlPlaneEnvLazily() {
52
- const { loadControlPlaneEnv } = await import("./env-file-XT7SDXSX.js");
53
- loadControlPlaneEnv();
54
- }
55
- async function providerForCreate(choice) {
56
- const flag = choice.flag?.trim();
57
- const spec = flag && flag.length > 0 ? flag : choice.config.box.provider;
58
- if (typeof spec !== "string" || spec.length === 0 || !isKnownProvider(spec)) {
59
- throw new Error(
60
- `unknown sandbox provider "${String(spec)}" (known: ${getRuntimeProviderNames().join(", ")})`
61
- );
62
- }
63
- if (choice.config.relay?.controlPlaneUrl) await loadControlPlaneEnvLazily();
64
- return getProvider(spec);
65
- }
6
+ } from "./chunk-WHFCJBMO.js";
66
7
 
67
8
  // src/control-plane/with-hub.ts
68
9
  import { log } from "@clack/prompts";
@@ -110,7 +51,7 @@ function reportHubError(err, url) {
110
51
  process.exitCode = 1;
111
52
  }
112
53
  async function withHubClient(opts, fn) {
113
- const { resolveHubApiTarget } = await import("./control-plane-5R7PYRQ6.js");
54
+ const { resolveHubApiTarget } = await import("./control-plane-YQFX2ILX.js");
114
55
  const target = await resolveHubApiTarget(opts.url, { preferLocal: opts.preferLocal });
115
56
  if (!target) {
116
57
  process.exitCode = 1;
@@ -173,7 +114,7 @@ async function runOpOnOtherHub(box, op, preferLocalOther) {
173
114
  let owner;
174
115
  let other;
175
116
  try {
176
- const { resolveHubApiTarget } = await import("./control-plane-5R7PYRQ6.js");
117
+ const { resolveHubApiTarget } = await import("./control-plane-YQFX2ILX.js");
177
118
  [owner, other] = await Promise.all([
178
119
  resolveHubApiTarget(void 0, { quiet: true, preferLocal: !preferLocalOther }),
179
120
  // Non-quiet so a stopped LOCAL retry hub is auto-started (it's a candidate owner).
@@ -203,17 +144,10 @@ function reportBoxNotOnAnyHub(box) {
203
144
  }
204
145
 
205
146
  export {
206
- resolveCreateProviderSpec,
207
- resolveProviderChoice,
208
- providerSpecFor,
209
- isKnownProvider,
210
- getProvider,
211
- providerForBox,
212
- providerForCreate,
213
147
  hubApiTargetFrom,
214
148
  withHubClient,
215
149
  boxOwningHubIsLocal,
216
150
  withOwningHub,
217
151
  reportBoxNotOnAnyHub
218
152
  };
219
- //# sourceMappingURL=chunk-OXKW4GWD.js.map
153
+ //# sourceMappingURL=chunk-53OTEDBS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/control-plane/with-hub.ts"],"sourcesContent":["/**\n * `withHubClient` — the one entry point CLI commands use to run an operation\n * against the hub's `/api/v1`, in BOTH modes (a local hub or a remote control\n * box; the only difference is the base URL + token, resolved by\n * `resolveHubApiTarget`). It:\n *\n * 1. resolves the client (auto-starting a local hub when needed),\n * 2. gates the hub's `/api/v1` version once up front — a hub outside\n * {@link SUPPORTED_HUB_API_VERSIONS} is refused with an upgrade hint rather\n * than failing on a changed field mid-operation,\n * 3. runs the caller's op, and\n * 4. maps a {@link HubApiError} (or an unreachable hub) to a stable CLI exit\n * code + an actionable message.\n *\n * Later steps of the `/api/v1` consolidation are then a mechanical conversion:\n * wrap the op body in `withHubClient` and delete the inline provider code. A\n * command that needs to special-case a code (e.g. treat `not_found` as info)\n * catches it inside its own callback before it reaches the mapper here.\n */\nimport { log } from '@clack/prompts';\nimport type { HubTarget } from '../commands/hub.js';\nimport { HubApiClient, HubApiError, SUPPORTED_HUB_API_VERSIONS } from './hub-api-client.js';\n\nexport interface WithHubOptions {\n /** Override the hub URL (default: the configured control box, else the local hub). */\n url?: string;\n /**\n * Prefer the hub on THIS machine even when a remote control box is configured\n * (the which-hub principle, Step 1). A docker box is always local-owned, so a\n * docker op sets this to avoid hitting a remote hub that never owned it (it\n * would answer `not_found`). Reuses Step 0's exposed-loopback-first ladder.\n */\n preferLocal?: boolean;\n}\n\n/** True when the hub's reported `apiVersion` is one this CLI speaks. */\nexport function isSupportedApiVersion(version: string | undefined): boolean {\n return (\n version !== undefined && (SUPPORTED_HUB_API_VERSIONS as readonly string[]).includes(version)\n );\n}\n\n// Distinct exit codes per API error class, so scripts can branch on the failure\n// kind. `not_found` reuses 2 to match the lifecycle-error convention\n// (`handleLifecycleError`). Anything unmapped (including `internal`) is a plain 1.\nconst EXIT_BY_CODE: Record<string, number> = {\n not_found: 2,\n unauthorized: 3,\n invalid_request: 4,\n conflict: 5,\n backend_unavailable: 6,\n};\n\n/** The CLI exit code for a hub `/api/v1` error code. */\nexport function exitCodeForApiError(code: string): number {\n return EXIT_BY_CODE[code] ?? 1;\n}\n\n/**\n * The exit code to report for a hub error. A carried `details.exitCode` (a box\n * command's own exit — e.g. 64 for `git push --host-only` with no host checkout)\n * wins, so the CLI surfaces the box's faithful exit rather than the coarse\n * code→exit mapping. Falls back to the per-code table otherwise.\n */\nfunction exitCodeForHubError(err: HubApiError): number {\n const carried = (err.details as { exitCode?: unknown } | undefined)?.exitCode;\n if (typeof carried === 'number' && Number.isInteger(carried) && carried > 0) return carried;\n return exitCodeForApiError(err.code);\n}\n\n/** An extra actionable line for the error classes where the raw message isn't enough. */\nfunction hintForApiError(err: HubApiError): string | null {\n switch (err.code) {\n case 'unauthorized':\n return 'The hub rejected the API token. Restart a local hub with `agentbox hub restart`, or check AGENTBOX_HUB_API_KEY for a remote control box.';\n case 'backend_unavailable':\n return \"The hub reached its backend but it was unavailable — the provider or host it needs may not be configured on the hub's machine.\";\n default:\n return null;\n }\n}\n\n/**\n * Map a resolved {@link HubTarget} to the `/api/v1` client target, or the reason\n * it can't be used. Pure — the local⇄remote logic lives in `resolveHubTarget`;\n * this only converts `token`→`apiKey` and decides whether a token is present.\n * The token IS the Bearer for both modes (a local hub's token, or a control\n * box's `AGENTBOX_HUB_API_KEY`).\n */\nexport function hubApiTargetFrom(\n target: HubTarget,\n):\n | { ok: true; url: string; apiKey: string }\n | { ok: false; reason: 'no-token'; mode: 'local' | 'remote' } {\n if (!target.token) return { ok: false, reason: 'no-token', mode: target.mode };\n return { ok: true, url: target.url, apiKey: target.token };\n}\n\n/** Print a hub failure and set the matching exit code. Never throws. */\nfunction reportHubError(err: unknown, url: string): void {\n if (err instanceof HubApiError) {\n log.error(err.message);\n const hint = hintForApiError(err);\n if (hint) log.info(hint);\n process.exitCode = exitCodeForHubError(err);\n return;\n }\n // A fetch/network failure (hub down, wrong URL) surfaces as a plain Error.\n log.error(`Can't reach the hub at ${url}: ${err instanceof Error ? err.message : String(err)}`);\n process.exitCode = 1;\n}\n\nexport async function withHubClient<T>(\n opts: WithHubOptions,\n fn: (client: HubApiClient) => Promise<T>,\n): Promise<T | undefined> {\n // Lazy import breaks the hub.ts <-> control-plane.ts module cycle that both of\n // those already sit in (hub.ts consumes control-plane.ts's command list at\n // load time). Cheap after the first call — the module is cached.\n const { resolveHubApiTarget } = await import('../commands/control-plane.js');\n const target = await resolveHubApiTarget(opts.url, { preferLocal: opts.preferLocal });\n if (!target) {\n // resolveHubApiTarget already printed an actionable error (missing config /\n // key, or a local-hub autostart failure).\n process.exitCode = 1;\n return undefined;\n }\n const client = new HubApiClient(target);\n\n // Version gate — also the first authed-adjacent round-trip, so an unreachable\n // hub is reported here rather than surfacing later as a confusing op failure.\n try {\n const health = await client.health();\n if (!isSupportedApiVersion(health.apiVersion)) {\n log.error(\n `The hub at ${target.url} serves API ${health.apiVersion ? `\"${health.apiVersion}\"` : '(none reported)'}, ` +\n `which this CLI doesn't support (needs ${SUPPORTED_HUB_API_VERSIONS.join(', ')}).`,\n );\n log.info(\n 'Upgrade it (`agentbox hub update` for a remote control box, or `agentbox hub restart` for a local hub) or update this CLI to match.',\n );\n process.exitCode = 1;\n return undefined;\n }\n } catch (err) {\n if (err instanceof HubApiError) {\n // A hub too old to expose /api/v1 answers the probe with an error envelope.\n log.error(\n `The hub at ${target.url} didn't answer the /api/v1 health probe (${err.code}). It may be too old — upgrade it.`,\n );\n process.exitCode = 1;\n } else {\n reportHubError(err, target.url);\n }\n return undefined;\n }\n\n try {\n return await fn(client);\n } catch (err) {\n reportHubError(err, target.url);\n return undefined;\n }\n}\n\n/**\n * Whether the hub that OWNS this box runs on THIS machine — the `preferLocal`\n * answer for any box op. **The one ownership predicate**: a lifecycle/destroy op\n * can only be served by the hub that owns the box, and getting this wrong sends\n * the op to a hub that never registered the box (→ `not_found`). True for the\n * provider families the LOCAL hub drives directly:\n * - `docker` — a container on this machine.\n * - `remote-docker` — a container on another machine's engine, but the box\n * registers with the LOCAL relay (the local hub drives the remote engine over\n * SSH), so its owner is still local.\n * Cloud providers (e2b/vercel/hetzner/daytona/digitalocean) are owned by whichever\n * hub is configured, so they are NOT local-owned. Every caller MUST use this rather\n * than an inline `provider === 'docker'` check — five copies drift; a new provider\n * is classified here once.\n */\nexport function boxOwningHubIsLocal(box: { provider?: string }): boolean {\n const p = box.provider ?? 'docker';\n return p === 'docker' || p === 'remote-docker';\n}\n\n/** The outcome of a box op routed to its owning hub (see {@link withOwningHub}). */\nexport type OwningHubOutcome = 'ok' | 'not-found' | undefined;\n\n/**\n * Run a box op against the hub that OWNS the box (local for docker/remote-docker,\n * the configured hub for cloud — see {@link boxOwningHubIsLocal}), retrying the\n * OTHER distinct hub on `not_found`. A box can legitimately be unknown to the\n * first hub — e.g. a docker box whose op reached a configured remote hub that\n * never owned it — so a single `not_found` is not proof it belongs to no hub.\n * Returns:\n * - `'ok'` — some hub performed the op.\n * - `'not-found'` — no hub AgentBox knows owns the box.\n * - `undefined` — a hub error other than not_found (the owner-first attempt\n * went through {@link withHubClient}, which already reported it\n * + set the exit code).\n */\nexport async function withOwningHub(\n box: { id: string; provider?: string },\n op: (client: HubApiClient) => Promise<void>,\n): Promise<OwningHubOutcome> {\n const ownerLocal = boxOwningHubIsLocal(box);\n const primary = await withHubClient({ preferLocal: ownerLocal }, async (client) => {\n try {\n await op(client);\n return 'ok' as const;\n } catch (err) {\n if (err instanceof HubApiError && err.code === 'not_found') return 'not-found' as const;\n throw err;\n }\n });\n if (primary === undefined) return undefined; // withHubClient reported + set the exit code\n if (primary === 'ok') return 'ok';\n // The owner-first hub does not know this box. Retry the OTHER distinct hub.\n const other = await runOpOnOtherHub(box, op, !ownerLocal);\n if (other === 'ok') return 'ok';\n if (other === 'error') return undefined; // a real error on the retry hub — already reported\n return 'not-found';\n}\n\n/**\n * Run the op against the OTHER hub (the one `preferLocalOther` selects), skipped\n * when it resolves to the same URL as the owner-first attempt (a pure-local setup\n * has only one hub). Distinguishes three outcomes so a REAL error on the retry hub\n * isn't misreported as \"no hub owns the box\":\n * - `'ok'` — the retry hub performed the op.\n * - `'error'` — a genuine failure (conflict / auth / provider error); it is\n * REPORTED here (message + exit code) and the caller aborts.\n * - `'not-found'` — the retry hub doesn't own the box (`not_found`), OR it was\n * unreachable / unresolvable — neither is proof of ownership,\n * so the caller treats the box as owned by no known hub.\n */\nasync function runOpOnOtherHub(\n box: { id: string; provider?: string },\n op: (client: HubApiClient) => Promise<void>,\n preferLocalOther: boolean,\n): Promise<'ok' | 'error' | 'not-found'> {\n let owner: { url: string; apiKey: string } | null;\n let other: { url: string; apiKey: string } | null;\n try {\n const { resolveHubApiTarget } = await import('../commands/control-plane.js');\n [owner, other] = await Promise.all([\n resolveHubApiTarget(undefined, { quiet: true, preferLocal: !preferLocalOther }),\n // Non-quiet so a stopped LOCAL retry hub is auto-started (it's a candidate owner).\n resolveHubApiTarget(undefined, { preferLocal: preferLocalOther }),\n ]);\n } catch {\n return 'not-found'; // couldn't even resolve the other hub — not proof of ownership\n }\n if (!other) return 'not-found';\n if (owner && owner.url === other.url) return 'not-found'; // no distinct second hub\n try {\n await op(new HubApiClient(other));\n return 'ok';\n } catch (err) {\n if (err instanceof HubApiError) {\n // `not_found` = legitimately not owned here; any other code (conflict, auth,\n // backend, internal) is a REAL failure to surface, NOT \"no hub owns the box\".\n if (err.code === 'not_found') return 'not-found';\n reportHubError(err, other.url);\n return 'error';\n }\n // A network/transport failure to the second hub — unreachable is not proof of\n // ownership, so preserve the box (the caller keeps its record / refuses).\n return 'not-found';\n }\n}\n\n/**\n * Report a box that no hub AgentBox knows about owns, for the lifecycle commands\n * (start/stop/pause/unpause). Sets the `not_found` exit code (2). `destroy` does\n * NOT use this — it keeps the local record and names `--force` instead, because\n * dropping the record of a possibly-still-running resource is the dangerous case.\n */\nexport function reportBoxNotOnAnyHub(box: { name: string }): void {\n log.error(`Box ${box.name} was not found on any hub AgentBox knows.`);\n log.info('Run `agentbox ls` to see boxes AgentBox can drive.');\n process.exitCode = 2;\n}\n"],"mappings":";;;;;;;;AAmBA,SAAS,WAAW;AAiBb,SAAS,sBAAsB,SAAsC;AAC1E,SACE,YAAY,UAAc,2BAAiD,SAAS,OAAO;AAE/F;AAKA,IAAM,eAAuC;AAAA,EAC3C,WAAW;AAAA,EACX,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,UAAU;AAAA,EACV,qBAAqB;AACvB;AAGO,SAAS,oBAAoB,MAAsB;AACxD,SAAO,aAAa,IAAI,KAAK;AAC/B;AAQA,SAAS,oBAAoB,KAA0B;AACrD,QAAM,UAAW,IAAI,SAAgD;AACrE,MAAI,OAAO,YAAY,YAAY,OAAO,UAAU,OAAO,KAAK,UAAU,EAAG,QAAO;AACpF,SAAO,oBAAoB,IAAI,IAAI;AACrC;AAGA,SAAS,gBAAgB,KAAiC;AACxD,UAAQ,IAAI,MAAM;AAAA,IAChB,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AASO,SAAS,iBACd,QAG8D;AAC9D,MAAI,CAAC,OAAO,MAAO,QAAO,EAAE,IAAI,OAAO,QAAQ,YAAY,MAAM,OAAO,KAAK;AAC7E,SAAO,EAAE,IAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,OAAO,MAAM;AAC3D;AAGA,SAAS,eAAe,KAAc,KAAmB;AACvD,MAAI,eAAe,aAAa;AAC9B,QAAI,MAAM,IAAI,OAAO;AACrB,UAAM,OAAO,gBAAgB,GAAG;AAChC,QAAI,KAAM,KAAI,KAAK,IAAI;AACvB,YAAQ,WAAW,oBAAoB,GAAG;AAC1C;AAAA,EACF;AAEA,MAAI,MAAM,0BAA0B,GAAG,KAAK,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,CAAC,EAAE;AAC9F,UAAQ,WAAW;AACrB;AAEA,eAAsB,cACpB,MACA,IACwB;AAIxB,QAAM,EAAE,oBAAoB,IAAI,MAAM,OAAO,6BAA8B;AAC3E,QAAM,SAAS,MAAM,oBAAoB,KAAK,KAAK,EAAE,aAAa,KAAK,YAAY,CAAC;AACpF,MAAI,CAAC,QAAQ;AAGX,YAAQ,WAAW;AACnB,WAAO;AAAA,EACT;AACA,QAAM,SAAS,IAAI,aAAa,MAAM;AAItC,MAAI;AACF,UAAM,SAAS,MAAM,OAAO,OAAO;AACnC,QAAI,CAAC,sBAAsB,OAAO,UAAU,GAAG;AAC7C,UAAI;AAAA,QACF,cAAc,OAAO,GAAG,eAAe,OAAO,aAAa,IAAI,OAAO,UAAU,MAAM,iBAAiB,2CAC5D,2BAA2B,KAAK,IAAI,CAAC;AAAA,MAClF;AACA,UAAI;AAAA,QACF;AAAA,MACF;AACA,cAAQ,WAAW;AACnB,aAAO;AAAA,IACT;AAAA,EACF,SAAS,KAAK;AACZ,QAAI,eAAe,aAAa;AAE9B,UAAI;AAAA,QACF,cAAc,OAAO,GAAG,4CAA4C,IAAI,IAAI;AAAA,MAC9E;AACA,cAAQ,WAAW;AAAA,IACrB,OAAO;AACL,qBAAe,KAAK,OAAO,GAAG;AAAA,IAChC;AACA,WAAO;AAAA,EACT;AAEA,MAAI;AACF,WAAO,MAAM,GAAG,MAAM;AAAA,EACxB,SAAS,KAAK;AACZ,mBAAe,KAAK,OAAO,GAAG;AAC9B,WAAO;AAAA,EACT;AACF;AAiBO,SAAS,oBAAoB,KAAqC;AACvE,QAAM,IAAI,IAAI,YAAY;AAC1B,SAAO,MAAM,YAAY,MAAM;AACjC;AAkBA,eAAsB,cACpB,KACA,IAC2B;AAC3B,QAAM,aAAa,oBAAoB,GAAG;AAC1C,QAAM,UAAU,MAAM,cAAc,EAAE,aAAa,WAAW,GAAG,OAAO,WAAW;AACjF,QAAI;AACF,YAAM,GAAG,MAAM;AACf,aAAO;AAAA,IACT,SAAS,KAAK;AACZ,UAAI,eAAe,eAAe,IAAI,SAAS,YAAa,QAAO;AACnE,YAAM;AAAA,IACR;AAAA,EACF,CAAC;AACD,MAAI,YAAY,OAAW,QAAO;AAClC,MAAI,YAAY,KAAM,QAAO;AAE7B,QAAM,QAAQ,MAAM,gBAAgB,KAAK,IAAI,CAAC,UAAU;AACxD,MAAI,UAAU,KAAM,QAAO;AAC3B,MAAI,UAAU,QAAS,QAAO;AAC9B,SAAO;AACT;AAcA,eAAe,gBACb,KACA,IACA,kBACuC;AACvC,MAAI;AACJ,MAAI;AACJ,MAAI;AACF,UAAM,EAAE,oBAAoB,IAAI,MAAM,OAAO,6BAA8B;AAC3E,KAAC,OAAO,KAAK,IAAI,MAAM,QAAQ,IAAI;AAAA,MACjC,oBAAoB,QAAW,EAAE,OAAO,MAAM,aAAa,CAAC,iBAAiB,CAAC;AAAA;AAAA,MAE9E,oBAAoB,QAAW,EAAE,aAAa,iBAAiB,CAAC;AAAA,IAClE,CAAC;AAAA,EACH,QAAQ;AACN,WAAO;AAAA,EACT;AACA,MAAI,CAAC,MAAO,QAAO;AACnB,MAAI,SAAS,MAAM,QAAQ,MAAM,IAAK,QAAO;AAC7C,MAAI;AACF,UAAM,GAAG,IAAI,aAAa,KAAK,CAAC;AAChC,WAAO;AAAA,EACT,SAAS,KAAK;AACZ,QAAI,eAAe,aAAa;AAG9B,UAAI,IAAI,SAAS,YAAa,QAAO;AACrC,qBAAe,KAAK,MAAM,GAAG;AAC7B,aAAO;AAAA,IACT;AAGA,WAAO;AAAA,EACT;AACF;AAQO,SAAS,qBAAqB,KAA6B;AAChE,MAAI,MAAM,OAAO,IAAI,IAAI,2CAA2C;AACpE,MAAI,KAAK,oDAAoD;AAC7D,UAAQ,WAAW;AACrB;","names":[]}
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ClaudeSessionError
4
- } from "./chunk-46NNZMZT.js";
4
+ } from "./chunk-I2DEYQLZ.js";
5
5
  import {
6
6
  AmbiguousBoxError,
7
7
  BoxNotFoundError
8
- } from "./chunk-GFOWBXV7.js";
8
+ } from "./chunk-XENTK32L.js";
9
9
 
10
10
  // src/commands/_errors.ts
11
11
  import { log } from "@clack/prompts";
@@ -32,4 +32,4 @@ function handleLifecycleError(err) {
32
32
  export {
33
33
  handleLifecycleError
34
34
  };
35
- //# sourceMappingURL=chunk-FGQFVUMH.js.map
35
+ //# sourceMappingURL=chunk-6YSYQZRH.js.map
@@ -1,29 +1,36 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- boxOwningHubIsLocal,
3
+ ensureHostReachDrainer
4
+ } from "./chunk-F4PPZ4SI.js";
5
+ import {
6
+ boxOwningHubIsLocal
7
+ } from "./chunk-53OTEDBS.js";
8
+ import {
4
9
  providerForBox
5
- } from "./chunk-OXKW4GWD.js";
10
+ } from "./chunk-2JHPGPLE.js";
6
11
  import {
7
12
  HubApiClient
8
- } from "./chunk-PSA6GADQ.js";
13
+ } from "./chunk-WHFCJBMO.js";
9
14
  import {
10
15
  buildCloudAttachInnerCommand,
11
16
  startDetachedCloudAgent,
12
17
  startDetachedSession
13
- } from "./chunk-JQLOGVZK.js";
18
+ } from "./chunk-4KYP775X.js";
14
19
  import {
15
20
  readBoxStatus,
16
21
  startClaudeSession,
17
22
  startCodexSession,
18
23
  startOpencodeSession
19
- } from "./chunk-46NNZMZT.js";
24
+ } from "./chunk-I2DEYQLZ.js";
20
25
  import {
21
- DEFAULT_RELAY_PORT,
22
26
  isValidBoxStatus
23
- } from "./chunk-WB6S4W7O.js";
27
+ } from "./chunk-THKVKVRF.js";
28
+ import {
29
+ claudeTuiEnv
30
+ } from "./chunk-XENTK32L.js";
24
31
  import {
25
32
  loadEffectiveConfig
26
- } from "./chunk-NHVGKFVY.js";
33
+ } from "./chunk-7LNXTPEE.js";
27
34
 
28
35
  // src/commands/_cloud-attach.ts
29
36
  import { appendFileSync } from "fs";
@@ -94,7 +101,12 @@ async function startFreshSession(box, kind, sessionName, cfg, isDocker) {
94
101
  const args = kind === "claude" ? cfg ? applyClaudeSkipPermissions([], cfg.effective) : [] : kind === "codex" ? cfg ? applyCodexSkipPermissions([], cfg.effective) : [] : [];
95
102
  if (isDocker) {
96
103
  if (kind === "claude") {
97
- await startClaudeSession({ container: box.container, claudeArgs: args, sessionName });
104
+ await startClaudeSession({
105
+ container: box.container,
106
+ claudeArgs: args,
107
+ sessionName,
108
+ workspacePath: box.workspacePath
109
+ });
98
110
  } else if (kind === "codex") {
99
111
  await startCodexSession({ container: box.container, codexArgs: args, sessionName });
100
112
  } else {
@@ -115,7 +127,12 @@ async function restoreAgentSessions(box, provider, opts = {}) {
115
127
  try {
116
128
  if (isDocker) {
117
129
  if (kind === "claude") {
118
- await startClaudeSession({ container: box.container, claudeArgs: args, sessionName });
130
+ await startClaudeSession({
131
+ container: box.container,
132
+ claudeArgs: args,
133
+ sessionName,
134
+ workspacePath: box.workspacePath
135
+ });
119
136
  } else {
120
137
  await startCodexSession({ container: box.container, codexArgs: args, sessionName });
121
138
  }
@@ -1516,6 +1533,34 @@ function renderAlertBand(state, cols, rows = ALERT_BAND_ROWS) {
1516
1533
  return renderQuestionBand(state.question, cols, rows);
1517
1534
  }
1518
1535
 
1536
+ // src/wrapped-pty/escape-boundary.ts
1537
+ var ESCAPE_TAIL_BYTES = 64;
1538
+ function endsMidEscape(tail) {
1539
+ const esc = tail.lastIndexOf("\x1B");
1540
+ if (esc < 0) return false;
1541
+ const seq = tail.slice(esc);
1542
+ if (seq.length === 1) return true;
1543
+ const kind = seq[1];
1544
+ if (kind === "[") {
1545
+ for (let i = 2; i < seq.length; i++) {
1546
+ const b = seq.charCodeAt(i);
1547
+ if (b >= 64 && b <= 126) return false;
1548
+ }
1549
+ return true;
1550
+ }
1551
+ if (kind === "]" || kind === "P" || kind === "^" || kind === "_") {
1552
+ for (let i = 2; i < seq.length; i++) {
1553
+ if (seq.charCodeAt(i) === 7) return false;
1554
+ if (seq[i] === "\x1B" && seq[i + 1] === "\\") return false;
1555
+ }
1556
+ return true;
1557
+ }
1558
+ return false;
1559
+ }
1560
+ function appendTail(tail, chunk) {
1561
+ return (tail + chunk).slice(-ESCAPE_TAIL_BYTES);
1562
+ }
1563
+
1519
1564
  // src/wrapped-pty/prompt-client.ts
1520
1565
  import { request as httpRequest } from "http";
1521
1566
  import { request as httpsRequest } from "https";
@@ -1724,6 +1769,9 @@ var MIN_INNER_ROWS = 5;
1724
1769
  var STATUS_POLL_INTERVAL_MS = 3e3;
1725
1770
  var SPINNER_INTERVAL_MS = 120;
1726
1771
  var FLASH_DURATION_MS = 2e3;
1772
+ var CHROME_COALESCE_MS = 16;
1773
+ var CHROME_BOUNDARY_RETRY_MS = 2;
1774
+ var CHROME_DEFER_LIMIT_MS = 250;
1727
1775
  var RAPID_RECONNECT_MS = 8e3;
1728
1776
  var MAX_RAPID_RECONNECTS = 3;
1729
1777
  var CHECKPOINT_DROP_GRACE_MS = 4e3;
@@ -1743,6 +1791,7 @@ function buildAgentboxAttachArgv(mode, boxName) {
1743
1791
  if (mode !== "claude" && mode !== "codex" && mode !== "opencode") return null;
1744
1792
  return [mode, "attach", boxName, "--attach-in", "same"];
1745
1793
  }
1794
+ var PTY_UNAVAILABLE_NOTICE = "agentbox: footer + permission prompts disabled \u2014 the optional native backend\n '@homebridge/node-pty-prebuilt-multiarch' could not be loaded.\n Most often `agentbox` is installed under a different Node than the one on\n PATH. Compare `node -v` with the Node that owns `command -v agentbox`, then\n reinstall with that Node: npm i -g @madarco/agentbox\n";
1746
1795
  async function runWrappedAttach(opts) {
1747
1796
  const command = opts.command ?? "docker";
1748
1797
  const logErr = (msg) => {
@@ -1772,8 +1821,10 @@ async function runWrappedAttach(opts) {
1772
1821
  }
1773
1822
  const backend = await loadPtyBackend();
1774
1823
  if (!backend) {
1775
- process.stderr.write("agentbox: permission prompts disabled (node-pty backend unavailable)\n");
1776
- return runFallback(command, opts.dockerArgv, opts.env);
1824
+ process.stderr.write(PTY_UNAVAILABLE_NOTICE);
1825
+ const code = runFallback(command, opts.dockerArgv, opts.env);
1826
+ process.stderr.write(PTY_UNAVAILABLE_NOTICE);
1827
+ return code;
1777
1828
  }
1778
1829
  const cols = process.stdout.columns ?? 80;
1779
1830
  const rows = process.stdout.rows ?? 24;
@@ -1854,7 +1905,7 @@ async function runWrappedAttach(opts) {
1854
1905
  const rs = process.stdout.rows ?? rows;
1855
1906
  return rs - FOOTER_ROWS - ALERT_BAND_ROWS >= MIN_INNER_ROWS;
1856
1907
  };
1857
- const redrawChrome = () => {
1908
+ const chromePayload = () => {
1858
1909
  const cs = process.stdout.columns ?? cols;
1859
1910
  const rs = process.stdout.rows ?? rows;
1860
1911
  const footerLine = renderFooter(footerState, cs);
@@ -1867,7 +1918,59 @@ async function runWrappedAttach(opts) {
1867
1918
  }
1868
1919
  }
1869
1920
  payload += cursorMoveTo(rs, 1) + footerLine + CURSOR_RESTORE + SYNC_END;
1870
- process.stdout.write(payload);
1921
+ return payload;
1922
+ };
1923
+ let outTail = "";
1924
+ let pendingOps = [];
1925
+ let chromeDirty = false;
1926
+ let chromeTimer = null;
1927
+ let deferredSince = 0;
1928
+ const flushChrome = () => {
1929
+ if (chromeTimer) {
1930
+ clearTimeout(chromeTimer);
1931
+ chromeTimer = null;
1932
+ }
1933
+ if (!pendingOps.length && !chromeDirty) {
1934
+ deferredSince = 0;
1935
+ return;
1936
+ }
1937
+ if (endsMidEscape(outTail)) {
1938
+ const now = Date.now();
1939
+ if (deferredSince === 0) deferredSince = now;
1940
+ if (now - deferredSince < CHROME_DEFER_LIMIT_MS) {
1941
+ chromeTimer = setTimeout(flushChrome, CHROME_BOUNDARY_RETRY_MS);
1942
+ if (typeof chromeTimer.unref === "function") chromeTimer.unref();
1943
+ return;
1944
+ }
1945
+ }
1946
+ deferredSince = 0;
1947
+ let out = "";
1948
+ if (pendingOps.length > 0) {
1949
+ out += pendingOps.join("");
1950
+ pendingOps = [];
1951
+ }
1952
+ if (chromeDirty) {
1953
+ out += chromePayload();
1954
+ chromeDirty = false;
1955
+ }
1956
+ if (out.length > 0) process.stdout.write(out);
1957
+ };
1958
+ const scheduleChrome = () => {
1959
+ if (chromeTimer) return;
1960
+ chromeTimer = setTimeout(flushChrome, CHROME_COALESCE_MS);
1961
+ if (typeof chromeTimer.unref === "function") chromeTimer.unref();
1962
+ };
1963
+ const redrawChrome = () => {
1964
+ chromeDirty = true;
1965
+ scheduleChrome();
1966
+ };
1967
+ const emitChromeOp = (payload) => {
1968
+ pendingOps.push(payload);
1969
+ scheduleChrome();
1970
+ };
1971
+ const redrawChromeSoon = () => {
1972
+ chromeDirty = true;
1973
+ flushChrome();
1871
1974
  };
1872
1975
  const recomputeFooter = () => {
1873
1976
  const collapsed = bandState !== null && bandReservedRows === 0;
@@ -1901,11 +2004,10 @@ async function runWrappedAttach(opts) {
1901
2004
  const rs = process.stdout.rows ?? rows;
1902
2005
  const inner = Math.max(1, rs - reservedRows());
1903
2006
  resizePty(cs, inner);
1904
- process.stdout.write(`\x1B[1;${String(inner)}r`);
1905
2007
  let clear = SYNC_BEGIN + CURSOR_SAVE;
1906
2008
  for (let r = inner + 1; r <= rs; r++) clear += cursorMoveTo(r, 1) + "\x1B[2K";
1907
2009
  clear += CURSOR_RESTORE + SYNC_END;
1908
- process.stdout.write(clear);
2010
+ emitChromeOp(`\x1B[1;${String(inner)}r` + clear);
1909
2011
  };
1910
2012
  const applyBandChange = () => {
1911
2013
  recomputeBand();
@@ -1938,6 +2040,7 @@ async function runWrappedAttach(opts) {
1938
2040
  const wireOutput = () => {
1939
2041
  pty.onData((d) => {
1940
2042
  process.stdout.write(d);
2043
+ outTail = appendTail(outTail, d);
1941
2044
  redrawChrome();
1942
2045
  });
1943
2046
  };
@@ -2124,7 +2227,7 @@ async function runWrappedAttach(opts) {
2124
2227
  bandReservedRows = bandState && bandFits() ? ALERT_BAND_ROWS : 0;
2125
2228
  const inner = Math.max(1, rs - reservedRows());
2126
2229
  resizePty(cs, inner);
2127
- process.stdout.write(`\x1B[1;${String(inner)}r`);
2230
+ emitChromeOp(`\x1B[1;${String(inner)}r`);
2128
2231
  recomputeFooter();
2129
2232
  redrawChrome();
2130
2233
  };
@@ -2272,7 +2375,7 @@ async function runWrappedAttach(opts) {
2272
2375
  if (opts.mode === "shell" && !detachable) {
2273
2376
  process.stdout.write("\x1B[H\x1B[2J");
2274
2377
  }
2275
- redrawChrome();
2378
+ redrawChromeSoon();
2276
2379
  const reconnectFlow = async (code) => {
2277
2380
  const controller = new AbortController();
2278
2381
  reconnecting = true;
@@ -2346,12 +2449,19 @@ async function runWrappedAttach(opts) {
2346
2449
  lastSpawnAt = Date.now();
2347
2450
  checkpointNoticeAt = 0;
2348
2451
  checkpointNoticeClearedAt = 0;
2349
- process.stdout.write(`\x1B[1;${String(innerNow)}r`);
2452
+ outTail = "";
2453
+ emitChromeOp(`\x1B[1;${String(innerNow)}r`);
2350
2454
  redrawChrome();
2351
2455
  }
2352
2456
  process.stdin.off("data", onStdinData);
2353
2457
  process.stdout.off("resize", onResize);
2354
2458
  clearInterval(statusTimer);
2459
+ if (chromeTimer) {
2460
+ clearTimeout(chromeTimer);
2461
+ chromeTimer = null;
2462
+ }
2463
+ pendingOps = [];
2464
+ chromeDirty = false;
2355
2465
  if (cmuxOn) restoreCmuxWorkspace(cmuxOrig);
2356
2466
  if (herdrOn) clearHerdrAgentState(opts.mode, opts.boxName);
2357
2467
  stopSpinner();
@@ -2541,14 +2651,13 @@ async function pasteHostClipboardImage(provider, box) {
2541
2651
  }
2542
2652
 
2543
2653
  // src/control-plane/box-plane.ts
2544
- var LOCAL_RELAY_URL = `http://127.0.0.1:${String(DEFAULT_RELAY_PORT)}`;
2545
2654
  function boxAnswersOnLocalHub(box) {
2546
2655
  if (box.cloud?.controlPlaneUrl) return false;
2547
2656
  return boxOwningHubIsLocal(box);
2548
2657
  }
2549
2658
  async function resolveBoxHubTarget(box) {
2550
2659
  if (boxAnswersOnLocalHub(box)) return "none";
2551
- const { loadEffectiveConfig: loadEffectiveConfig2 } = await import("./dist-XATN4ZIR.js");
2660
+ const { loadEffectiveConfig: loadEffectiveConfig2 } = await import("./dist-FBM2WS5S.js");
2552
2661
  const { loadControlPlaneEnv } = await import("./env-file-XT7SDXSX.js");
2553
2662
  const configured = await loadEffectiveConfig2(process.cwd()).then((c) => c.effective.relay.controlPlaneUrl).catch(() => void 0);
2554
2663
  const url = (box.cloud?.controlPlaneUrl ?? configured ?? "").replace(/\/+$/, "");
@@ -2560,7 +2669,7 @@ async function resolveBoxHubTarget(box) {
2560
2669
  async function resolveBoxPromptSource(box, opts = {}) {
2561
2670
  const target = await resolveBoxHubTarget(box).catch(() => "none");
2562
2671
  if (target === "none" || target === "no-token") {
2563
- const { resolveHubApiTarget } = await import("./control-plane-5R7PYRQ6.js");
2672
+ const { resolveHubApiTarget } = await import("./control-plane-YQFX2ILX.js");
2564
2673
  const local = await resolveHubApiTarget(void 0, { preferLocal: true, quiet: opts.quiet });
2565
2674
  if (!local) return null;
2566
2675
  return {
@@ -2614,6 +2723,7 @@ function abortableSleep(ms, signal) {
2614
2723
  });
2615
2724
  }
2616
2725
  async function cloudAgentAttach(args) {
2726
+ void ensureHostReachDrainer(args.box);
2617
2727
  const provider = await providerForBox(args.box);
2618
2728
  if (!provider.buildAttach) {
2619
2729
  throw new Error(`provider '${provider.name}' does not support interactive attach`);
@@ -2643,7 +2753,11 @@ async function cloudAgentAttach(args) {
2643
2753
  const resume = await agentResumeArgs(provider, box, args.mode);
2644
2754
  if (resume) extraArgs = resume;
2645
2755
  }
2646
- const command = buildCloudAttachInnerCommand(args.binary, extraArgs);
2756
+ const command = buildCloudAttachInnerCommand(
2757
+ args.binary,
2758
+ extraArgs,
2759
+ args.binary === "claude" ? claudeTuiEnv((await loadEffectiveConfig(box.workspacePath)).effective.box.claudeTui) : void 0
2760
+ );
2647
2761
  const safeOpenIn = args.openIn;
2648
2762
  if (safeOpenIn && safeOpenIn !== "same" && extraArgs && extraArgs.length > 0) {
2649
2763
  await startDetachedSession(provider, box, args.sessionName, command);
@@ -2762,4 +2876,4 @@ export {
2762
2876
  agentResumeArgs,
2763
2877
  restoreAgentSessions
2764
2878
  };
2765
- //# sourceMappingURL=chunk-KFLGXE3R.js.map
2879
+ //# sourceMappingURL=chunk-73D2HKA3.js.map