@madarco/agentbox 0.33.0 → 0.33.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 (913) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/_cloud-attach-KEFEQ2YH.js +32 -0
  3. package/dist/{chunk-L55DASHB.js → chunk-2SKTXZGX.js} +8 -8
  4. package/dist/{chunk-YZZKWZO2.js → chunk-3PTSPFR6.js} +7 -1
  5. package/dist/chunk-3PTSPFR6.js.map +1 -0
  6. package/dist/{chunk-BKOKMZNK.js → chunk-3QTWB66F.js} +6 -6
  7. package/dist/{chunk-VSWIJHCH.js → chunk-5ZBNVZSU.js} +3 -3
  8. package/dist/{chunk-IX7S6NJR.js → chunk-72LKKHPI.js} +4 -4
  9. package/dist/{chunk-AXAMPAP3.js → chunk-7ELRQNNH.js} +3 -3
  10. package/dist/chunk-7ELRQNNH.js.map +1 -0
  11. package/dist/{chunk-WJ4MZESJ.js → chunk-7RDDR6BW.js} +27 -8
  12. package/dist/chunk-7RDDR6BW.js.map +1 -0
  13. package/dist/{chunk-7TPGIQOP.js → chunk-BORN6FJK.js} +10 -10
  14. package/dist/{chunk-OVLM2EZV.js → chunk-CUMSI7N3.js} +97 -83
  15. package/dist/chunk-CUMSI7N3.js.map +1 -0
  16. package/dist/{chunk-Z6LK4P54.js → chunk-EUE6F7HL.js} +40 -12
  17. package/dist/chunk-EUE6F7HL.js.map +1 -0
  18. package/dist/{chunk-7AMMBUEW.js → chunk-F2CNFPIA.js} +67 -33
  19. package/dist/chunk-F2CNFPIA.js.map +1 -0
  20. package/dist/{chunk-77IAHAQY.js → chunk-FBQC6TKM.js} +6 -6
  21. package/dist/{chunk-IJFP7N34.js → chunk-FPYYDMCR.js} +26 -9
  22. package/dist/chunk-FPYYDMCR.js.map +1 -0
  23. package/dist/{chunk-U7J7JT6R.js → chunk-G35FJ4KT.js} +108 -43
  24. package/dist/chunk-G35FJ4KT.js.map +1 -0
  25. package/dist/{chunk-JUTAYI2N.js → chunk-GCUJUUNE.js} +5 -5
  26. package/dist/{chunk-S77B5POZ.js → chunk-GKBAEX2P.js} +6 -6
  27. package/dist/{chunk-XKUF67M6.js → chunk-GT7VDGNV.js} +4 -4
  28. package/dist/{chunk-52OXHGKQ.js → chunk-HNPYVRX7.js} +35 -16
  29. package/dist/chunk-HNPYVRX7.js.map +1 -0
  30. package/dist/{chunk-AGHR7XOJ.js → chunk-HOJKUVH6.js} +3 -3
  31. package/dist/{chunk-PENAXZMR.js → chunk-INJIW6PP.js} +7 -7
  32. package/dist/{chunk-OYWP4SII.js → chunk-IZPNDZXI.js} +5 -5
  33. package/dist/{chunk-U3BCLGTH.js → chunk-JHS4ROJH.js} +11 -11
  34. package/dist/{chunk-CWN4DJYI.js → chunk-JVZZPJ2C.js} +3 -3
  35. package/dist/{chunk-KOGQNHV3.js → chunk-KA67IGEG.js} +4 -4
  36. package/dist/{chunk-OTAYAFYF.js → chunk-KRF2JODE.js} +3 -3
  37. package/dist/{chunk-SDWKZLGP.js → chunk-LFMJXQDL.js} +5 -5
  38. package/dist/{chunk-FM7PHYBD.js → chunk-NEU5B2VO.js} +162 -8
  39. package/dist/chunk-NEU5B2VO.js.map +1 -0
  40. package/dist/{chunk-2U4HKKM7.js → chunk-NSYCXUN5.js} +6 -6
  41. package/dist/{chunk-U4Z5OOOD.js → chunk-NZN3BME7.js} +32 -12
  42. package/dist/chunk-NZN3BME7.js.map +1 -0
  43. package/dist/{chunk-KWDFEQO6.js → chunk-PI4A3TGV.js} +24 -71
  44. package/dist/chunk-PI4A3TGV.js.map +1 -0
  45. package/dist/{chunk-HS6B3CE4.js → chunk-PJCIZLIX.js} +472 -138
  46. package/dist/chunk-PJCIZLIX.js.map +1 -0
  47. package/dist/{chunk-GERRSRQZ.js → chunk-PZK5KRFB.js} +12 -10
  48. package/dist/{chunk-GERRSRQZ.js.map → chunk-PZK5KRFB.js.map} +1 -1
  49. package/dist/{chunk-5JDGKHWH.js → chunk-QALBGVPR.js} +2 -2
  50. package/dist/{chunk-JCDC5S32.js → chunk-QDBDDJKT.js} +4 -4
  51. package/dist/{chunk-R7J7WFM5.js → chunk-QUBP3AZD.js} +220 -49
  52. package/dist/chunk-QUBP3AZD.js.map +1 -0
  53. package/dist/{chunk-YVIC7TNH.js → chunk-QZW3WXBW.js} +43 -23
  54. package/dist/{chunk-YVIC7TNH.js.map → chunk-QZW3WXBW.js.map} +1 -1
  55. package/dist/{chunk-ZPFTFIKP.js → chunk-S5WFZHC5.js} +5 -5
  56. package/dist/{chunk-UFOUBCPW.js → chunk-UDSNFS67.js} +34 -36
  57. package/dist/{chunk-UFOUBCPW.js.map → chunk-UDSNFS67.js.map} +1 -1
  58. package/dist/{chunk-PVZUQTLW.js → chunk-VUTEVIYG.js} +5 -5
  59. package/dist/{chunk-3HJQZQ76.js → chunk-WNFUSPZR.js} +25 -72
  60. package/dist/chunk-WNFUSPZR.js.map +1 -0
  61. package/dist/{chunk-OWCTDO67.js → chunk-WVBTRK6R.js} +13 -13
  62. package/dist/{chunk-4IQGL4KD.js → chunk-ZMKRUD6J.js} +6 -6
  63. package/dist/{chunk-J2AD7MLR.js → chunk-ZQWOZ5BL.js} +3 -3
  64. package/dist/{cli-6IPZVUXF.js → cli-B4VVKKYV.js} +10 -10
  65. package/dist/{cli-QIBPY2HQ.js → cli-ENMWXMKO.js} +10 -10
  66. package/dist/{cli-QSV6K33P.js → cli-F2UBHH7H.js} +11 -11
  67. package/dist/{cli-E2ZC5S4U.js → cli-JKSQBGRO.js} +11 -11
  68. package/dist/{cli-3WZP5JHA.js → cli-MIIWRJDK.js} +11 -11
  69. package/dist/cloud-backends.js +6 -6
  70. package/dist/{control-plane-I2QKMHPK.js → control-plane-R4ELXZHL.js} +22 -22
  71. package/dist/{cp-hub-upload-GW566DGZ.js → cp-hub-upload-IUQVJGOW.js} +10 -10
  72. package/dist/custody-client-PVDBOT7Y.js +18 -0
  73. package/dist/{deploy-hetzner-IIAXES7B.js → deploy-hetzner-KY6KWN4M.js} +11 -11
  74. package/dist/{dist-4K66F4UR.js → dist-2QGMP2UI.js} +10 -10
  75. package/dist/{dist-SZTW3RMB.js → dist-5MCQFGLX.js} +28 -8
  76. package/dist/{dist-XZXZSTTA.js → dist-7EKSUISW.js} +33 -18
  77. package/dist/dist-7EKSUISW.js.map +1 -0
  78. package/dist/{dist-5RMJLMYG.js → dist-EIVYC2MR.js} +3 -3
  79. package/dist/{dist-VKKHIHCZ.js → dist-JWXPKGPZ.js} +10 -10
  80. package/dist/{dist-HIQCE4H2.js → dist-ONAAPVBD.js} +21 -11
  81. package/dist/{dist-WR2HYACA.js → dist-OXLTCVA2.js} +10 -10
  82. package/dist/{dist-WTPYXNRH.js → dist-PBO4UHJK.js} +2 -2
  83. package/dist/{dist-YED5YJQN.js → dist-RCBMUPVR.js} +12 -4
  84. package/dist/{dist-IXPKVU3R.js → dist-TD74GXLP.js} +6 -6
  85. package/dist/{dist-44RSFOGQ.js → dist-VCZ3LZPJ.js} +22 -12
  86. package/dist/{dist-3EZQDIOD.js → dist-WGV7LRDC.js} +11 -9
  87. package/dist/{host-reach-drainer-A4ZO6UKT.js → host-reach-drainer-AZYC6UIB.js} +2 -2
  88. package/dist/{host-session-POJP4WO6.js → host-session-EGUDGE4R.js} +12 -12
  89. package/dist/hub-76RHPA7X.js +40 -0
  90. package/dist/{hub-adopt-YR7S5TNB.js → hub-adopt-5G7SKI2E.js} +9 -9
  91. package/dist/{hub-api-client-BUQDTSQ3.js → hub-api-client-WPZTG5AT.js} +5 -5
  92. package/dist/{hub-docker-target-XA5U2ZU5.js → hub-docker-target-CNJHYH4B.js} +16 -16
  93. package/dist/index.js +299 -224
  94. package/dist/index.js.map +1 -1
  95. package/dist/{manager-pty-XCGH6AUC-EZML75UO.js → manager-pty-XCGH6AUC-O3UNISN2.js} +5 -5
  96. package/dist/{plugin-update-BIPJZA24.js → plugin-update-UZYPWL4N.js} +6 -6
  97. package/dist/prepare-4GOTJXQL.js +48 -0
  98. package/dist/prepared-custody-4YJ4ZT7J.js +40 -0
  99. package/dist/{prepared-state-FO74QUCP-4WLAYPEO.js → prepared-state-FO74QUCP-GUIPQORN.js} +5 -5
  100. package/dist/pty-host.js +4 -4
  101. package/dist/{publish-credentials-N2JD2D3A.js → publish-credentials-RLRLNL33.js} +12 -12
  102. package/dist/registry-QMHCNR5X.js +18 -0
  103. package/dist/relay-VBWFCWKK.js +23 -0
  104. package/dist/{remote-docker-share-GIH6JNKY.js → remote-docker-share-TKG7SXHX.js} +13 -13
  105. package/dist/{tool-grant-push-7K765QKW.js → tool-grant-push-V7E3Y2W6.js} +3 -3
  106. package/package.json +2 -1
  107. package/runtime/_shared/ctl.cjs +138 -40
  108. package/runtime/digitalocean/ctl.cjs +138 -40
  109. package/runtime/docker/packages/ctl/dist/bin.cjs +138 -40
  110. package/runtime/e2b/ctl.cjs +138 -40
  111. package/runtime/hetzner/ctl.cjs +138 -40
  112. package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
  113. package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
  114. package/runtime/hub/apps/hub/.next/prerender-manifest.json +3 -3
  115. package/runtime/hub/apps/hub/.next/server/app/(auth)/signin/page/next-font-manifest.json +3 -3
  116. package/runtime/hub/apps/hub/.next/server/app/(auth)/signin/page_client-reference-manifest.js +1 -1
  117. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route.js.nft.json +1 -1
  118. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route.js.nft.json +1 -1
  119. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route.js.nft.json +1 -1
  120. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/agent/route.js.nft.json +1 -1
  121. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/backup/route.js.nft.json +1 -1
  122. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route.js.nft.json +1 -1
  123. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/checkpoint/route.js.nft.json +1 -1
  124. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/clone/route.js.nft.json +1 -1
  125. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.js.nft.json +1 -1
  126. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route.js.nft.json +1 -1
  127. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/logs/route.js.nft.json +1 -1
  128. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js.nft.json +1 -1
  129. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js.nft.json +1 -1
  130. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route.js.nft.json +1 -1
  131. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route.js.nft.json +1 -1
  132. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route.js.nft.json +1 -1
  133. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/upload/route.js.nft.json +1 -1
  134. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route.js.nft.json +1 -1
  135. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/web/route.js.nft.json +1 -1
  136. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route.js.nft.json +1 -1
  137. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/checkpoints/route.js.nft.json +1 -1
  138. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route.js.nft.json +1 -1
  139. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route.js.nft.json +1 -1
  140. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route.js.nft.json +1 -1
  141. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route.js.nft.json +1 -1
  142. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route.js.nft.json +1 -1
  143. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route.js.nft.json +1 -1
  144. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/route.js.nft.json +1 -1
  145. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route.js.nft.json +1 -1
  146. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach-box/route.js.nft.json +1 -1
  147. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/heartbeat/route.js.nft.json +1 -1
  148. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route.js.nft.json +1 -1
  149. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route.js.nft.json +1 -1
  150. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/pin/route.js.nft.json +1 -1
  151. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route.js.nft.json +1 -1
  152. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route.js.nft.json +1 -1
  153. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route.js.nft.json +1 -1
  154. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route.js.nft.json +1 -1
  155. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route.js.nft.json +1 -1
  156. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js.nft.json +1 -1
  157. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/bots/route.js.nft.json +1 -1
  158. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route.js.nft.json +1 -1
  159. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/create-preflight/route.js.nft.json +1 -1
  160. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/restore/route.js.nft.json +1 -1
  161. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route.js.nft.json +1 -1
  162. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/seed/route.js.nft.json +1 -1
  163. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route.js.nft.json +1 -1
  164. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route.js.nft.json +1 -1
  165. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route.js.nft.json +1 -1
  166. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/size-check/route.js.nft.json +1 -1
  167. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route.js.nft.json +1 -1
  168. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/prune/route.js.nft.json +1 -1
  169. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/system/route.js.nft.json +1 -1
  170. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route.js.nft.json +1 -1
  171. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/register/route.js.nft.json +1 -1
  172. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route.js.nft.json +1 -1
  173. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route.js.nft.json +1 -1
  174. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route.js.nft.json +1 -1
  175. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route.js.nft.json +1 -1
  176. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route.js.nft.json +1 -1
  177. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route.js.nft.json +1 -1
  178. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route.js.nft.json +1 -1
  179. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route.js.nft.json +1 -1
  180. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route.js.nft.json +1 -1
  181. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route.js.nft.json +1 -1
  182. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route.js.nft.json +1 -1
  183. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route.js.nft.json +1 -1
  184. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/events/route.js.nft.json +1 -1
  185. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route.js.nft.json +1 -1
  186. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route.js +2 -2
  187. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route.js.nft.json +1 -1
  188. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page/next-font-manifest.json +3 -3
  189. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page/server-reference-manifest.json +1 -1
  190. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -1
  191. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
  192. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page/next-font-manifest.json +3 -3
  193. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page/server-reference-manifest.json +12 -12
  194. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page.js.nft.json +1 -1
  195. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page_client-reference-manifest.js +1 -1
  196. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route.js.nft.json +1 -1
  197. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/web/route.js.nft.json +1 -1
  198. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/custody/page/next-font-manifest.json +3 -3
  199. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/custody/page.js.nft.json +1 -1
  200. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/custody/page_client-reference-manifest.js +1 -1
  201. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page/next-font-manifest.json +3 -3
  202. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page/server-reference-manifest.json +12 -12
  203. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  204. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  205. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page/next-font-manifest.json +3 -3
  206. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page/server-reference-manifest.json +8 -8
  207. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page.js.nft.json +1 -1
  208. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page_client-reference-manifest.js +1 -1
  209. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page/next-font-manifest.json +3 -3
  210. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  211. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  212. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/system/page/next-font-manifest.json +3 -3
  213. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/system/page.js.nft.json +1 -1
  214. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/system/page_client-reference-manifest.js +1 -1
  215. package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js +1 -1
  216. package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js.nft.json +1 -1
  217. package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
  218. package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
  219. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  220. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  221. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  222. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  223. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  224. package/runtime/hub/apps/hub/.next/server/app/_not-found/page/next-font-manifest.json +3 -3
  225. package/runtime/hub/apps/hub/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  226. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0-5e8ze._.js +3 -0
  227. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0-di9rg._.js +3 -0
  228. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__008zqfx._.js → [root-of-the-server]__0-ovzfw._.js} +2 -2
  229. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0-r5e8q._.js +3 -0
  230. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__007hogi._.js +3 -0
  231. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0-kl55b._.js → [root-of-the-server]__00bh9gb._.js} +2 -2
  232. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__00dc6yl._.js +3 -0
  233. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__00zpt4k._.js +3 -0
  234. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__017tfb_._.js +3 -0
  235. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__01dlun3._.js +3 -0
  236. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__01mhbng._.js +3 -0
  237. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__03jx5m5._.js +3 -0
  238. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__03l4evb._.js +3 -0
  239. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0126167._.js → [root-of-the-server]__03uelft._.js} +2 -2
  240. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__03wt33b._.js +3 -0
  241. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__03z-u4h._.js +3 -0
  242. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__02s5f9s._.js → [root-of-the-server]__048c4u3._.js} +2 -2
  243. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__04glef0._.js +3 -0
  244. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__04za-91._.js +3 -0
  245. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__05cnibm._.js +3 -0
  246. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__06e_no_._.js +3 -0
  247. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__06g2ncr._.js +3 -0
  248. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__06vmwu8._.js +3 -0
  249. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__06wzlsi._.js +3 -0
  250. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__07f11r9._.js +3 -0
  251. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__07mtcs1._.js +3 -0
  252. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__084o93l._.js +3 -0
  253. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__085_re5._.js +3 -0
  254. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__08kj50f._.js +3 -0
  255. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__08txtdi._.js +3 -0
  256. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__092u79y._.js +3 -0
  257. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09j-kzo._.js +3 -0
  258. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09umuy8._.js +3 -0
  259. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09wu-6r._.js +3 -0
  260. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0_60dmv._.js +3 -0
  261. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0_f5r-w._.js +3 -0
  262. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ahciyb._.js +3 -0
  263. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ajp0a3._.js +3 -0
  264. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ao_4th._.js +3 -0
  265. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0aqoqhn._.js +3 -0
  266. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0b3_azq._.js +3 -0
  267. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cjjwg7._.js +3 -0
  268. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1lmiq._.js +1 -1
  269. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1wl4f._.js +3 -0
  270. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d2ce-o._.js +3 -0
  271. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dfklvw._.js +3 -0
  272. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dgkz7l._.js +3 -0
  273. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dlg6e7._.js +3 -0
  274. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dq5edp._.js +3 -0
  275. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0drzmcj._.js +3 -0
  276. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dvyt4d._.js +3 -0
  277. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dyqk31._.js +3 -0
  278. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0eliqqa._.js +3 -0
  279. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0eluwey._.js +3 -0
  280. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0f5v0j5._.js +3 -0
  281. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0f7g_na._.js +3 -0
  282. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0fn2qow._.js +3 -0
  283. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0frnoss._.js +3 -0
  284. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0g0e1x-._.js +3 -0
  285. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0gdwl-b._.js +3 -0
  286. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0gfhbl7._.js +3 -0
  287. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0gsie0d._.js +3 -0
  288. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0hg36y7._.js +3 -0
  289. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0hz77cq._.js +3 -0
  290. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0i501ph._.js +3 -0
  291. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0j5jaq9._.js +3 -0
  292. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0j7_6c5._.js +3 -0
  293. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jm5dx1._.js +3 -0
  294. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0k-t2mr._.js +3 -0
  295. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ktkk27._.js +3 -0
  296. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0kxp4k8._.js +3 -0
  297. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0l-mqzk._.js +3 -0
  298. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0l7rw-n._.js +3 -0
  299. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0lb45m6._.js +3 -0
  300. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0lvczy2._.js +3 -0
  301. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0m9zj9m._.js +3 -0
  302. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0mg-juc._.js +3 -0
  303. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0mriv1n._.js +3 -0
  304. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0n4gqir._.js +3 -0
  305. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0new-8d._.js +3 -0
  306. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0nuc9du._.js +3 -0
  307. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0nxnhun._.js +3 -0
  308. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0o42jfc._.js +3 -0
  309. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0o7zz8d._.js +3 -0
  310. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0omb75h._.js +3 -0
  311. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0p4ta6t._.js +3 -0
  312. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0p5_ap9._.js +3 -0
  313. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0pan9yi._.js +3 -0
  314. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0pr6h1j._.js +3 -0
  315. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0pz23t_._.js +3 -0
  316. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qcvt0o._.js +3 -0
  317. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qn4mea._.js +3 -0
  318. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qp0txx._.js +3 -0
  319. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qsn9xm._.js +3 -0
  320. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qx8qwu._.js +3 -0
  321. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0r6p-ql._.js +3 -0
  322. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0r6tfw8._.js +3 -0
  323. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0sgdrnp._.js +3 -0
  324. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ssn3y9._.js +1 -1
  325. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0te8u6u._.js +3 -0
  326. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ukg6s1._.js +3 -0
  327. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0up7ls4._.js +3 -0
  328. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0uvnrnf._.js +3 -0
  329. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0v2xw5s._.js +3 -0
  330. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0v5qu_p._.js +3 -0
  331. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__12p0ia1._.js → [root-of-the-server]__0vku_ep._.js} +2 -2
  332. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0vuhl78._.js +3 -0
  333. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0w52bth._.js +3 -0
  334. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0wq5ukd._.js +3 -0
  335. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0wx561s._.js +3 -0
  336. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0wxo4bk._.js +3 -0
  337. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xfcui-._.js +3 -0
  338. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xm7z28._.js +3 -0
  339. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xqz1om._.js +3 -0
  340. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xur24w._.js +3 -0
  341. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xw3pee._.js +3 -0
  342. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xwht7v._.js +3 -0
  343. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0y20q9b._.js +3 -0
  344. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0zfq7yk._.js +3 -0
  345. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0zi_qda._.js +3 -0
  346. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0zpm7wg._.js +3 -0
  347. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0zxlzp1._.js +3 -0
  348. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-a4wnf._.js +3 -0
  349. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-fpw4q._.js +3 -0
  350. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-iro6m._.js +3 -0
  351. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-o35-u._.js +3 -0
  352. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1043gy8._.js +3 -0
  353. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__10kehs5._.js +3 -0
  354. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__10s1755._.js +3 -0
  355. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__11d3dgq._.js +3 -0
  356. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__126lrtu._.js +3 -0
  357. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__12n9728._.js +3 -0
  358. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13hluml._.js +3 -0
  359. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13hzwlv._.js +3 -0
  360. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__14c4h72._.js +3 -0
  361. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__14oho-o._.js +3 -0
  362. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__14zr9zt._.js +1 -1
  363. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__153axa9._.js +3 -0
  364. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1582-3i._.js +3 -0
  365. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__15v83nk._.js +3 -0
  366. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__16e-k-w._.js +3 -0
  367. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__16m0mie._.js +3 -0
  368. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__16ta_9y._.js +3 -0
  369. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__17a3r0z._.js +3 -0
  370. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__17kg43w._.js +3 -0
  371. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__18g18yc._.js +3 -0
  372. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__18m4f3-._.js +3 -0
  373. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__190vthx._.js +3 -0
  374. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__19vezsz._.js +3 -0
  375. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__19vgyci._.js +3 -0
  376. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_ulp2r._.js +3 -0
  377. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1a6hiz5._.js +3 -0
  378. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1apqdye._.js +3 -0
  379. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1avjial._.js +3 -0
  380. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1cicer7._.js +3 -0
  381. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1crkcf8._.js +3 -0
  382. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1dra_qf._.js +3 -0
  383. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1eearvr._.js +3 -0
  384. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1eewe3-._.js +3 -0
  385. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1fd1yxa._.js +3 -0
  386. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1fyknn9._.js +3 -0
  387. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1g24h4v._.js +3 -0
  388. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1goi44d._.js +3 -0
  389. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1hf8-7y._.js +3 -0
  390. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1hn7h11._.js +3 -0
  391. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1i9e2ly._.js +3 -0
  392. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1j6cxj7._.js +3 -0
  393. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1jwn6xy._.js +3 -0
  394. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1kw00ov._.js +3 -0
  395. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1l0xu4g._.js +3 -0
  396. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1laa5r-._.js +3 -0
  397. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lo6_vz._.js +3 -0
  398. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lzumk3._.js +3 -0
  399. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1m1qnsg._.js +3 -0
  400. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1m26y4h._.js +3 -0
  401. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1m5qi0d._.js +3 -0
  402. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1m7oktq._.js +3 -0
  403. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mq0v7p._.js +1 -1
  404. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1n29-mo._.js +3 -0
  405. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1n5aq-l._.js +3 -0
  406. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1nhwizo._.js +3 -0
  407. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1o2vpkc._.js +3 -0
  408. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1o9euia._.js +3 -0
  409. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1otvs-z._.js +3 -0
  410. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1p3nshl._.js +3 -0
  411. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1pbl8am._.js +3 -0
  412. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1q9a118._.js +3 -0
  413. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1q9klny._.js +3 -0
  414. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qf5sar._.js +3 -0
  415. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qjpnlw._.js +3 -0
  416. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qpcmfu._.js +1 -1
  417. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1r8kqe3._.js +3 -0
  418. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ra-lry._.js +3 -0
  419. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rousb3._.js +3 -0
  420. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rvwwj8._.js +3 -0
  421. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rwfadw._.js +3 -0
  422. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1sj1ox_._.js +3 -0
  423. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1sq9444._.js +3 -0
  424. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1sqteyf._.js +3 -0
  425. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1th4k80._.js +3 -0
  426. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1umt_5v._.js +3 -0
  427. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ux-zjb._.js +3 -0
  428. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1v5fjky._.js +3 -0
  429. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1vspjdn._.js +3 -0
  430. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1w02nxp._.js +3 -0
  431. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1winv-x._.js +3 -0
  432. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1wj9na5._.js +3 -0
  433. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1x-8rww._.js +3 -0
  434. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ybyads._.js +3 -0
  435. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1yzs5_p._.js +3 -0
  436. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1z3bc6x._.js +3 -0
  437. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1zh-p_4._.js +3 -0
  438. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1zj2l_d._.js +3 -0
  439. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1zqt33m._.js +3 -0
  440. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1zr57k3._.js +3 -0
  441. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1zxsjfn._.js +3 -0
  442. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20ga3fy._.js +3 -0
  443. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20gp3bg._.js +3 -0
  444. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20k17-b._.js +3 -0
  445. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20o508x._.js +3 -0
  446. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20zx91s._.js +3 -0
  447. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__219zam7._.js +3 -0
  448. package/runtime/hub/apps/hub/.next/server/chunks/_03slv7y._.js +1 -1
  449. package/runtime/hub/apps/hub/.next/server/chunks/_03u-l9s._.js +1 -1
  450. package/runtime/hub/apps/hub/.next/server/chunks/_048yy7t._.js +1 -1
  451. package/runtime/hub/apps/hub/.next/server/chunks/_05_hmgg._.js +1 -1
  452. package/runtime/hub/apps/hub/.next/server/chunks/_08cr70o._.js +1 -1
  453. package/runtime/hub/apps/hub/.next/server/chunks/_0907rw0._.js +1 -1
  454. package/runtime/hub/apps/hub/.next/server/chunks/_09bu8dh._.js +1 -1
  455. package/runtime/hub/apps/hub/.next/server/chunks/_0_2z437._.js +1 -1
  456. package/runtime/hub/apps/hub/.next/server/chunks/_0_s1tx9._.js +1 -1
  457. package/runtime/hub/apps/hub/.next/server/chunks/_0_ue2iy._.js +1 -1
  458. package/runtime/hub/apps/hub/.next/server/chunks/_0b6vmhh._.js +1 -1
  459. package/runtime/hub/apps/hub/.next/server/chunks/_0bxg62j._.js +1 -1
  460. package/runtime/hub/apps/hub/.next/server/chunks/_0cc3kcz._.js +1 -1
  461. package/runtime/hub/apps/hub/.next/server/chunks/_0ccgezr._.js +1 -1
  462. package/runtime/hub/apps/hub/.next/server/chunks/_0e50cwx._.js +1 -1
  463. package/runtime/hub/apps/hub/.next/server/chunks/_0ek1dkx._.js +1 -1
  464. package/runtime/hub/apps/hub/.next/server/chunks/_0g94rtj._.js +1 -1
  465. package/runtime/hub/apps/hub/.next/server/chunks/_0hwl0oy._.js +1 -1
  466. package/runtime/hub/apps/hub/.next/server/chunks/_0ihch2c._.js +1 -1
  467. package/runtime/hub/apps/hub/.next/server/chunks/_0jal0nm._.js +1 -1
  468. package/runtime/hub/apps/hub/.next/server/chunks/_0jvwv07._.js +1 -1
  469. package/runtime/hub/apps/hub/.next/server/chunks/_0mpj2yt._.js +1 -1
  470. package/runtime/hub/apps/hub/.next/server/chunks/_0n22m88._.js +1 -1
  471. package/runtime/hub/apps/hub/.next/server/chunks/_0ndtf84._.js +1 -1
  472. package/runtime/hub/apps/hub/.next/server/chunks/_0o1r-if._.js +1 -1
  473. package/runtime/hub/apps/hub/.next/server/chunks/_0opn03l._.js +1 -1
  474. package/runtime/hub/apps/hub/.next/server/chunks/_0p-2n50._.js +1 -1
  475. package/runtime/hub/apps/hub/.next/server/chunks/_0qf4357._.js +1 -1
  476. package/runtime/hub/apps/hub/.next/server/chunks/_0tbb47v._.js +1 -1
  477. package/runtime/hub/apps/hub/.next/server/chunks/_0ubchhn._.js +1 -1
  478. package/runtime/hub/apps/hub/.next/server/chunks/_0ul-64a._.js +1 -1
  479. package/runtime/hub/apps/hub/.next/server/chunks/_0v--tpg._.js +1 -1
  480. package/runtime/hub/apps/hub/.next/server/chunks/_0v3xwi-._.js +1 -1
  481. package/runtime/hub/apps/hub/.next/server/chunks/_0vg6gvw._.js +42 -40
  482. package/runtime/hub/apps/hub/.next/server/chunks/_0y497n2._.js +1 -1
  483. package/runtime/hub/apps/hub/.next/server/chunks/_0zvfiwd._.js +1 -1
  484. package/runtime/hub/apps/hub/.next/server/chunks/_100tsj5._.js +1 -1
  485. package/runtime/hub/apps/hub/.next/server/chunks/_11-rqgb._.js +1 -1
  486. package/runtime/hub/apps/hub/.next/server/chunks/_113fejt._.js +1 -1
  487. package/runtime/hub/apps/hub/.next/server/chunks/_12juepz._.js +1 -1
  488. package/runtime/hub/apps/hub/.next/server/chunks/_12w22u2._.js +1 -1
  489. package/runtime/hub/apps/hub/.next/server/chunks/_134-gub._.js +1 -1
  490. package/runtime/hub/apps/hub/.next/server/chunks/_14kba0u._.js +1 -1
  491. package/runtime/hub/apps/hub/.next/server/chunks/_16ec74_._.js +1 -1
  492. package/runtime/hub/apps/hub/.next/server/chunks/_17ntgn8._.js +1 -1
  493. package/runtime/hub/apps/hub/.next/server/chunks/_1c27mjg._.js +1 -1
  494. package/runtime/hub/apps/hub/.next/server/chunks/_1c4zrlu._.js +1 -1
  495. package/runtime/hub/apps/hub/.next/server/chunks/_1cmknl6._.js +1 -1
  496. package/runtime/hub/apps/hub/.next/server/chunks/_1g8ctu7._.js +1 -1
  497. package/runtime/hub/apps/hub/.next/server/chunks/_1grz1bu._.js +1 -1
  498. package/runtime/hub/apps/hub/.next/server/chunks/_1itx6m_._.js +1 -1
  499. package/runtime/hub/apps/hub/.next/server/chunks/_1jaoh3w._.js +1 -1
  500. package/runtime/hub/apps/hub/.next/server/chunks/_1ktt212._.js +1 -1
  501. package/runtime/hub/apps/hub/.next/server/chunks/_1ldaou_._.js +1 -1
  502. package/runtime/hub/apps/hub/.next/server/chunks/_1n3e-p-._.js +1 -1
  503. package/runtime/hub/apps/hub/.next/server/chunks/_1onbxt8._.js +1 -1
  504. package/runtime/hub/apps/hub/.next/server/chunks/_1pudgbl._.js +1 -1
  505. package/runtime/hub/apps/hub/.next/server/chunks/_1qmsz02._.js +1 -1
  506. package/runtime/hub/apps/hub/.next/server/chunks/_1r3ah1o._.js +1 -1
  507. package/runtime/hub/apps/hub/.next/server/chunks/_1t24c_5._.js +1 -1
  508. package/runtime/hub/apps/hub/.next/server/chunks/_1vv20kp._.js +1 -1
  509. package/runtime/hub/apps/hub/.next/server/chunks/_1whgbe7._.js +1 -1
  510. package/runtime/hub/apps/hub/.next/server/chunks/_1wj2dpr._.js +1 -1
  511. package/runtime/hub/apps/hub/.next/server/chunks/_1wsllw4._.js +1 -1
  512. package/runtime/hub/apps/hub/.next/server/chunks/_1yk56nw._.js +1 -1
  513. package/runtime/hub/apps/hub/.next/server/chunks/_1yumxg7._.js +1 -1
  514. package/runtime/hub/apps/hub/.next/server/chunks/_1zlfubf._.js +1 -1
  515. package/runtime/hub/apps/hub/.next/server/chunks/_204rqiz._.js +1 -1
  516. package/runtime/hub/apps/hub/.next/server/chunks/_2056rpg._.js +1 -1
  517. package/runtime/hub/apps/hub/.next/server/chunks/_2056tby._.js +1 -1
  518. package/runtime/hub/apps/hub/.next/server/chunks/packages_agent-registry_dist_index_1ze3mqq.js +13 -13
  519. package/runtime/hub/apps/hub/.next/server/chunks/ssr/044u_hub__next-internal_server_app_(dashboard)_projects_[id]_page_actions_15f56np.js +1 -1
  520. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0515n2f._.js +1 -1
  521. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0h3qrm-._.js +3 -0
  522. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0o-fklw._.js +3 -0
  523. package/runtime/hub/apps/hub/.next/server/chunks/ssr/{[root-of-the-server]__0m1akem._.js → [root-of-the-server]__1jkmxi2._.js} +2 -2
  524. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0kpdmm-._.js +1 -1
  525. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0kzd494._.js +1 -1
  526. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ozyjt1._.js +1 -1
  527. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0r2xlss._.js +1 -1
  528. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_14-qzbg._.js +33 -31
  529. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_1hrzkwr._.js +1 -1
  530. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_0j5-o0f._.js +1 -1
  531. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_17myqp5._.js +1 -1
  532. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_approvals_page_actions_1mi0bpn.js +1 -1
  533. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_boxes_[id]_page_actions_0k7kgn2.js +1 -1
  534. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_page_actions_1t3u0xy.js +1 -1
  535. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_[id]_page_tsx_1-j_972._.js +1 -1
  536. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_components_box-table_tsx_0a9pyn_._.js +1 -1
  537. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_page_tsx_0o2z21l._.js +1 -1
  538. package/runtime/hub/apps/hub/.next/server/chunks/ssr/packages_agent-registry_dist_index_0z476w4.js +1 -1
  539. package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
  540. package/runtime/hub/apps/hub/.next/server/next-font-manifest.js +1 -1
  541. package/runtime/hub/apps/hub/.next/server/next-font-manifest.json +27 -27
  542. package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
  543. package/runtime/hub/apps/hub/.next/server/server-reference-manifest.js +1 -1
  544. package/runtime/hub/apps/hub/.next/server/server-reference-manifest.json +19 -19
  545. package/runtime/hub/apps/hub/.next/static/chunks/{2hxatwkh8fha9.js → 02sqxeus8w0s0.js} +1 -1
  546. package/runtime/hub/apps/hub/.next/static/chunks/{0tmbn9jje8ulx.js → 03ceb0qh4s52a.js} +1 -1
  547. package/runtime/hub/apps/hub/.next/static/chunks/{03_fxfc3849ms.css → 0ofk3im5p6gn-.css} +2 -2
  548. package/runtime/hub/apps/hub/.next/static/chunks/{38dg0m6sbz8hx.js → 0qhuf1a_7byq-.js} +1 -1
  549. package/runtime/hub/apps/hub/.next/static/chunks/{05dzzanyo20wx.js → 0u50pq99k9z_4.js} +1 -1
  550. package/runtime/hub/apps/hub/.next/static/chunks/{27t0b0mja1zpt.js → 0x0l4io4rdmuq.js} +1 -1
  551. package/runtime/hub/apps/hub/.next/static/chunks/{1ct_kocalf1mw.js → 22rj-g4qe8jny.js} +1 -1
  552. package/runtime/hub/apps/hub/.next/static/chunks/{22fqc0ktzjo6x.js → 23kzsoacq647n.js} +1 -1
  553. package/runtime/hub/apps/hub/.next/static/media/02263ebadd758ea4-s.1iu7q7yw-zhgt.woff2 +0 -0
  554. package/runtime/hub/apps/hub/.next/static/media/1a69062cfe6f77f8-s.26axk51fv0nvx.woff2 +0 -0
  555. package/runtime/hub/apps/hub/.next/static/media/23b7a97ae3b5c134-s.p.17c61zbdzi3u-.woff2 +0 -0
  556. package/runtime/hub/apps/hub/.next/static/media/2e95a7d252b9825a-s.1at6z4kbofh3w.woff2 +0 -0
  557. package/runtime/hub/apps/hub/.next/static/media/2fe89d53234c61d4-s.1h7k3aqd68qji.woff2 +0 -0
  558. package/runtime/hub/apps/hub/.next/static/media/59b15b4bcd7b1eb5-s.0g4pmka8j2u20.woff2 +0 -0
  559. package/runtime/hub/apps/hub/.next/static/media/68757d6cddeff913-s.07-q_h5lq3omo.woff2 +0 -0
  560. package/runtime/hub/apps/hub/.next/static/media/77ce6907447ba740-s.1thpl3j71vtxe.woff2 +0 -0
  561. package/runtime/hub/apps/hub/.next/static/media/99e609270109b47d-s.p.30xqm3yldpj47.woff2 +0 -0
  562. package/runtime/hub/apps/hub/.next/static/media/9a4838fcda0d1bca-s.13qpbrx2rg1iz.woff2 +0 -0
  563. package/runtime/hub/apps/hub/.next/static/media/a7afbb44bec2bb18-s.42z9vm7u0i9n-.woff2 +0 -0
  564. package/runtime/hub/apps/hub/.next/static/media/bfc9b7e66b1caeca-s.3hdclex1x_th1.woff2 +0 -0
  565. package/runtime/hub/apps/hub/.next/static/media/e532fa1b9921e1cd-s.1v7x_qdpnbwoz.woff2 +0 -0
  566. package/runtime/hub/apps/hub/.next/static/media/effe91970fc4db64-s.p.27korwsf9c79u.woff2 +0 -0
  567. package/runtime/hub/apps/hub/.next/static/media/f7cb89c1bcef4d27-s.3ajilh452uwtx.woff2 +0 -0
  568. package/runtime/hub/apps/hub/{auth-3K7Z7LVZ.js → auth-475LXXJA.js} +2 -2
  569. package/runtime/hub/apps/hub/{auth-config-G23WLTGN.js → auth-config-SPDXLHDX.js} +2 -2
  570. package/runtime/hub/apps/hub/{chunk-GGYNXEOD.js → chunk-3WRZVFOY.js} +521 -189
  571. package/runtime/hub/apps/hub/{chunk-RNUUXV2X.js → chunk-67LASBXO.js} +107 -42
  572. package/runtime/hub/apps/hub/{chunk-VQUZQ5MH.js → chunk-6ND54VG2.js} +161 -7
  573. package/runtime/hub/apps/hub/{chunk-7B4VZTUH.js → chunk-7XCRB6GS.js} +96 -82
  574. package/runtime/hub/apps/hub/{chunk-BEK5SYX5.js → chunk-DAMV47HM.js} +6 -0
  575. package/runtime/hub/apps/hub/{chunk-RAIBV7TH.js → chunk-FPLCH64R.js} +1 -1
  576. package/runtime/hub/apps/hub/{chunk-64GCEGJK.js → chunk-KJHUOHQ5.js} +4 -4
  577. package/runtime/hub/apps/hub/{chunk-OWAJTG3G.js → chunk-XGNMYL3X.js} +11 -11
  578. package/runtime/hub/apps/hub/{chunk-FWMBOJTZ.js → chunk-YBYUNY5P.js} +7 -7
  579. package/runtime/hub/apps/hub/{chunk-L5XPW2AU.js → chunk-ZVLJG772.js} +24 -71
  580. package/runtime/hub/apps/hub/{dist-QXOLLT4Y.js → dist-2KUVFXS3.js} +19 -9
  581. package/runtime/hub/apps/hub/{dist-D4JO7PAL.js → dist-2PUSTW2W.js} +1 -1
  582. package/runtime/hub/apps/hub/{dist-I5V4YM32.js → dist-67P6KLUY.js} +2 -2
  583. package/runtime/hub/apps/hub/dist-7PN6FTJV.js +26176 -0
  584. package/runtime/hub/apps/hub/{dist-BX2OAELL.js → dist-O53WU2K6.js} +11 -3
  585. package/runtime/hub/apps/hub/{dist-4GYSUKN3.js → dist-ODKJZJI2.js} +7 -7
  586. package/runtime/hub/apps/hub/{dist-R7ZY7ZTV.js → dist-SUHXQDYN.js} +26 -6
  587. package/runtime/hub/apps/hub/{dist-IHHRC4JW.js → dist-UMA73Z3V.js} +7 -7
  588. package/runtime/hub/apps/hub/{dist-LZWGXCOQ.js → dist-VHXEBJX5.js} +9 -7
  589. package/runtime/hub/apps/hub/{dist-TWRKOELH.js → dist-XOMGXTMI.js} +26 -71
  590. package/runtime/hub/apps/hub/{dist-33UWJJFG.js → dist-ZSRBJAWL.js} +27 -10
  591. package/runtime/hub/apps/hub/{hub-token-EIS7FVL2.js → hub-token-VMKQH4IY.js} +2 -2
  592. package/runtime/hub/apps/hub/{hub-worker-2LVMIS5H.js → hub-worker-5WDNMFCP.js} +9 -9
  593. package/runtime/hub/apps/hub/{manager-pty-XCGH6AUC-VJSNM3A6.js → manager-pty-XCGH6AUC-ZYM2ENVR.js} +4 -4
  594. package/runtime/hub/apps/hub/package.json +2 -1
  595. package/runtime/hub/apps/hub/{prepared-state-FO74QUCP-LZNKUFC7.js → prepared-state-FO74QUCP-L5OKEU42.js} +4 -4
  596. package/runtime/hub/apps/hub/server.js +296 -123
  597. package/runtime/relay/bin.cjs +131 -33
  598. package/runtime/vercel/ctl.cjs +138 -40
  599. package/dist/_cloud-attach-F25HDXWB.js +0 -32
  600. package/dist/chunk-3HJQZQ76.js.map +0 -1
  601. package/dist/chunk-52OXHGKQ.js.map +0 -1
  602. package/dist/chunk-7AMMBUEW.js.map +0 -1
  603. package/dist/chunk-AXAMPAP3.js.map +0 -1
  604. package/dist/chunk-FM7PHYBD.js.map +0 -1
  605. package/dist/chunk-HS6B3CE4.js.map +0 -1
  606. package/dist/chunk-IJFP7N34.js.map +0 -1
  607. package/dist/chunk-KWDFEQO6.js.map +0 -1
  608. package/dist/chunk-OVLM2EZV.js.map +0 -1
  609. package/dist/chunk-R7J7WFM5.js.map +0 -1
  610. package/dist/chunk-U4Z5OOOD.js.map +0 -1
  611. package/dist/chunk-U7J7JT6R.js.map +0 -1
  612. package/dist/chunk-WJ4MZESJ.js.map +0 -1
  613. package/dist/chunk-YZZKWZO2.js.map +0 -1
  614. package/dist/chunk-Z6LK4P54.js.map +0 -1
  615. package/dist/custody-client-F3OAOAC7.js +0 -18
  616. package/dist/dist-XZXZSTTA.js.map +0 -1
  617. package/dist/hub-GHFEW3K2.js +0 -40
  618. package/dist/prepare-O4BUJIOQ.js +0 -48
  619. package/dist/prepared-custody-UTSSUTXF.js +0 -40
  620. package/dist/registry-IPDCZDNW.js +0 -18
  621. package/dist/relay-P5CXEGAZ.js +0 -23
  622. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0-0scfb._.js +0 -3
  623. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__00a4c3f._.js +0 -3
  624. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__00tx9tm._.js +0 -3
  625. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__02-rdq0._.js +0 -3
  626. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__02kc2og._.js +0 -3
  627. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__02sueng._.js +0 -3
  628. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__02ywgcg._.js +0 -3
  629. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__03_xi2c._.js +0 -3
  630. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__03fxkqp._.js +0 -3
  631. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__04-i6rm._.js +0 -3
  632. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__04b75a4._.js +0 -3
  633. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__04d3pe5._.js +0 -3
  634. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__05_wgfq._.js +0 -3
  635. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__071c-t4._.js +0 -3
  636. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__07fobp5._.js +0 -3
  637. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__081d104._.js +0 -3
  638. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__08h5jgt._.js +0 -3
  639. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09grt_m._.js +0 -3
  640. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09jbqbh._.js +0 -3
  641. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09y4pdw._.js +0 -3
  642. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0_t5f3m._.js +0 -3
  643. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0_xcmfv._.js +0 -3
  644. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0a6e0vs._.js +0 -3
  645. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0a8ere2._.js +0 -3
  646. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0azx8z8._.js +0 -3
  647. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0bok80z._.js +0 -3
  648. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0bv_k0d._.js +0 -3
  649. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0c1o4qr._.js +0 -3
  650. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0c5mzbr._.js +0 -3
  651. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cc5lpl._.js +0 -3
  652. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ce13qa._.js +0 -3
  653. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cyy9az._.js +0 -3
  654. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d34880._.js +0 -3
  655. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dfvo5-._.js +0 -3
  656. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dtq9pr._.js +0 -3
  657. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dw7c0k._.js +0 -3
  658. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0e6_t-d._.js +0 -3
  659. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0edd68z._.js +0 -3
  660. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0engd-e._.js +0 -3
  661. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0eua3wn._.js +0 -3
  662. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ewh0df._.js +0 -3
  663. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0f_4fiu._.js +0 -3
  664. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0fkjz20._.js +0 -3
  665. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0fknr6k._.js +0 -3
  666. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0fxx69a._.js +0 -3
  667. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0g7gynv._.js +0 -3
  668. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0gl-4ha._.js +0 -3
  669. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0gr6v_i._.js +0 -3
  670. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0h181r5._.js +0 -3
  671. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0h668tm._.js +0 -3
  672. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0i65ptk._.js +0 -3
  673. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0iyr5bm._.js +0 -3
  674. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0j0vl7q._.js +0 -3
  675. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jvk7x8._.js +0 -3
  676. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jz3x26._.js +0 -3
  677. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0k_7aj_._.js +0 -3
  678. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0lc-j_n._.js +0 -3
  679. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0mid58_._.js +0 -3
  680. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0mq5e3o._.js +0 -3
  681. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0n5hh_2._.js +0 -3
  682. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0neufba._.js +0 -3
  683. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0nqggrc._.js +0 -3
  684. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0nx6w0m._.js +0 -3
  685. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0o4rocd._.js +0 -3
  686. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0olhyt4._.js +0 -3
  687. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0pe9g30._.js +0 -3
  688. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0pik2ie._.js +0 -3
  689. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qkpqk7._.js +0 -3
  690. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qt_r6a._.js +0 -3
  691. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qudrhk._.js +0 -3
  692. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0r0v_c_._.js +0 -3
  693. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0r4qvs6._.js +0 -3
  694. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0rf4g7g._.js +0 -3
  695. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0s4vdow._.js +0 -3
  696. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0s5ck78._.js +0 -3
  697. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0scmgnp._.js +0 -3
  698. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0sn7av8._.js +0 -3
  699. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0soiiqi._.js +0 -3
  700. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0sz5p6g._.js +0 -3
  701. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0tl6p7k._.js +0 -3
  702. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0tv5sah._.js +0 -3
  703. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0usxinp._.js +0 -3
  704. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0v5krdd._.js +0 -3
  705. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0vgxotx._.js +0 -3
  706. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0vsn71u._.js +0 -3
  707. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0x5eodh._.js +0 -3
  708. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0x_rx1f._.js +0 -3
  709. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xo5ak-._.js +0 -3
  710. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xt0w30._.js +0 -3
  711. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0y-rry-._.js +0 -3
  712. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0y3snn7._.js +0 -3
  713. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ygnbei._.js +0 -3
  714. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0yio_n7._.js +0 -3
  715. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0yxeq50._.js +0 -3
  716. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0z2lkh_._.js +0 -3
  717. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0zd42wf._.js +0 -3
  718. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0zi14f-._.js +0 -3
  719. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0zxv1ul._.js +0 -3
  720. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0zyutsi._.js +0 -3
  721. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-90xgw._.js +0 -3
  722. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__106reiu._.js +0 -3
  723. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__112hqrh._.js +0 -3
  724. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__113ijth._.js +0 -3
  725. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__11qbpq8._.js +0 -3
  726. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__11xey3v._.js +0 -3
  727. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__121vdp5._.js +0 -3
  728. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__12b40mo._.js +0 -3
  729. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__12i61td._.js +0 -3
  730. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__12tjfss._.js +0 -3
  731. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__139ha9-._.js +0 -3
  732. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13dk6en._.js +0 -3
  733. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13j6tof._.js +0 -3
  734. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13nfpq5._.js +0 -3
  735. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__14opl53._.js +0 -3
  736. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__14pxg1e._.js +0 -3
  737. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__15gc6-s._.js +0 -3
  738. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__15k2wx5._.js +0 -3
  739. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__15umca-._.js +0 -3
  740. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__162e1zj._.js +0 -3
  741. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__166_uek._.js +0 -3
  742. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__16pmnr6._.js +0 -3
  743. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__174fgjv._.js +0 -3
  744. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__17df14g._.js +0 -3
  745. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__17jzikc._.js +0 -3
  746. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__17y9pmx._.js +0 -3
  747. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__18pwzaw._.js +0 -3
  748. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__192ppv6._.js +0 -3
  749. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__198-esg._.js +0 -3
  750. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__19al998._.js +0 -3
  751. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__19m88da._.js +0 -3
  752. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__19nlcuf._.js +0 -3
  753. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_4v0mh._.js +0 -3
  754. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_dmv53._.js +0 -3
  755. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_xgm2e._.js +0 -3
  756. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_zs8b5._.js +0 -3
  757. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1abclgc._.js +0 -3
  758. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1aboxh4._.js +0 -3
  759. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1bh1dxz._.js +0 -3
  760. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1cb0_wq._.js +0 -3
  761. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1cbn_et._.js +0 -3
  762. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1cggpv7._.js +0 -3
  763. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1cnhbta._.js +0 -3
  764. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1cpqqag._.js +0 -3
  765. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1cs6d52._.js +0 -3
  766. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1d-v8kt._.js +0 -3
  767. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1d-yop_._.js +0 -3
  768. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1d60scp._.js +0 -3
  769. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1dhzd1_._.js +0 -3
  770. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1diw0ei._.js +0 -3
  771. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1dogvkr._.js +0 -3
  772. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ectuq4._.js +0 -3
  773. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ehcanu._.js +0 -3
  774. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1em476i._.js +0 -3
  775. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1f9l4qz._.js +0 -3
  776. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1h4akof._.js +0 -3
  777. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1i9bs12._.js +0 -3
  778. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1jbtokr._.js +0 -3
  779. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1jelopi._.js +0 -3
  780. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1jnfrsy._.js +0 -3
  781. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1k934r7._.js +0 -3
  782. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1kt9_sy._.js +0 -3
  783. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1kv_jgw._.js +0 -3
  784. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1l_uof1._.js +0 -3
  785. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lareew._.js +0 -3
  786. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lgn5_b._.js +0 -3
  787. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lnherq._.js +0 -3
  788. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lyqerb._.js +0 -3
  789. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1me3irq._.js +0 -3
  790. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mh1-lh._.js +0 -3
  791. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mk_lpu._.js +0 -3
  792. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1muxcy9._.js +0 -3
  793. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mx0_-f._.js +0 -3
  794. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1no5aw3._.js +0 -3
  795. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1noanyg._.js +0 -3
  796. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ntihlm._.js +0 -3
  797. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ob9yn9._.js +0 -3
  798. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1odu62n._.js +0 -3
  799. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1oy_ypa._.js +0 -3
  800. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1p6khix._.js +0 -3
  801. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1pg2kzv._.js +0 -3
  802. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1pk410t._.js +0 -3
  803. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1pta31u._.js +0 -3
  804. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1pz2967._.js +0 -3
  805. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1q9ds80._.js +0 -3
  806. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qt1i63._.js +0 -3
  807. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rr4obb._.js +0 -3
  808. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rzg628._.js +0 -3
  809. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1sdw2ls._.js +0 -3
  810. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1szemyb._.js +0 -3
  811. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1t88a94._.js +0 -3
  812. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1tfkm3m._.js +0 -3
  813. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1txvsbk._.js +0 -3
  814. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1uhiv-4._.js +0 -3
  815. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1utvnlp._.js +0 -3
  816. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1vc_bp9._.js +0 -3
  817. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1w25h0t._.js +0 -3
  818. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1wc9zwl._.js +0 -3
  819. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ws4ucz._.js +0 -3
  820. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1wx5ltv._.js +0 -3
  821. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1xi8hyy._.js +0 -3
  822. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1xl-uhz._.js +0 -3
  823. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1xlddup._.js +0 -3
  824. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1y3gko6._.js +0 -3
  825. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1y9wbb2._.js +0 -3
  826. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ypmy86._.js +0 -3
  827. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ysubik._.js +0 -3
  828. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1yzmh_p._.js +0 -3
  829. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1z7mgd6._.js +0 -3
  830. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ztoaz1._.js +0 -3
  831. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__2019yzl._.js +0 -3
  832. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20opvks._.js +0 -3
  833. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20ygien._.js +0 -3
  834. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0bv8m80._.js +0 -3
  835. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__1ay9-4x._.js +0 -3
  836. package/runtime/hub/apps/hub/.next/static/media/02263ebadd758ea4-s.29yke99gs9qpn.woff2 +0 -0
  837. package/runtime/hub/apps/hub/.next/static/media/1a69062cfe6f77f8-s.0o-3_g79811ob.woff2 +0 -0
  838. package/runtime/hub/apps/hub/.next/static/media/23b7a97ae3b5c134-s.p.226pwps5o-gq_.woff2 +0 -0
  839. package/runtime/hub/apps/hub/.next/static/media/2e95a7d252b9825a-s.15orukf5wyxb5.woff2 +0 -0
  840. package/runtime/hub/apps/hub/.next/static/media/2fe89d53234c61d4-s.1u30mmyq6lnsd.woff2 +0 -0
  841. package/runtime/hub/apps/hub/.next/static/media/59b15b4bcd7b1eb5-s.2vemzm0itqzfy.woff2 +0 -0
  842. package/runtime/hub/apps/hub/.next/static/media/68757d6cddeff913-s.1i-sca43-qwng.woff2 +0 -0
  843. package/runtime/hub/apps/hub/.next/static/media/99e609270109b47d-s.p.40sczeszzbjw1.woff2 +0 -0
  844. package/runtime/hub/apps/hub/.next/static/media/9a4838fcda0d1bca-s.0ngr-xkgqz1kf.woff2 +0 -0
  845. package/runtime/hub/apps/hub/.next/static/media/a7afbb44bec2bb18-s.1qc6dx89jd2qv.woff2 +0 -0
  846. package/runtime/hub/apps/hub/.next/static/media/e532fa1b9921e1cd-s.3cb5lpr2l6xud.woff2 +0 -0
  847. package/runtime/hub/apps/hub/.next/static/media/effe91970fc4db64-s.p.0oace-s_gkfks.woff2 +0 -0
  848. package/runtime/hub/apps/hub/dist-25JLZKGB.js +0 -1278
  849. /package/dist/{_cloud-attach-F25HDXWB.js.map → _cloud-attach-KEFEQ2YH.js.map} +0 -0
  850. /package/dist/{chunk-L55DASHB.js.map → chunk-2SKTXZGX.js.map} +0 -0
  851. /package/dist/{chunk-BKOKMZNK.js.map → chunk-3QTWB66F.js.map} +0 -0
  852. /package/dist/{chunk-VSWIJHCH.js.map → chunk-5ZBNVZSU.js.map} +0 -0
  853. /package/dist/{chunk-IX7S6NJR.js.map → chunk-72LKKHPI.js.map} +0 -0
  854. /package/dist/{chunk-7TPGIQOP.js.map → chunk-BORN6FJK.js.map} +0 -0
  855. /package/dist/{chunk-77IAHAQY.js.map → chunk-FBQC6TKM.js.map} +0 -0
  856. /package/dist/{chunk-JUTAYI2N.js.map → chunk-GCUJUUNE.js.map} +0 -0
  857. /package/dist/{chunk-S77B5POZ.js.map → chunk-GKBAEX2P.js.map} +0 -0
  858. /package/dist/{chunk-XKUF67M6.js.map → chunk-GT7VDGNV.js.map} +0 -0
  859. /package/dist/{chunk-AGHR7XOJ.js.map → chunk-HOJKUVH6.js.map} +0 -0
  860. /package/dist/{chunk-PENAXZMR.js.map → chunk-INJIW6PP.js.map} +0 -0
  861. /package/dist/{chunk-OYWP4SII.js.map → chunk-IZPNDZXI.js.map} +0 -0
  862. /package/dist/{chunk-U3BCLGTH.js.map → chunk-JHS4ROJH.js.map} +0 -0
  863. /package/dist/{chunk-CWN4DJYI.js.map → chunk-JVZZPJ2C.js.map} +0 -0
  864. /package/dist/{chunk-KOGQNHV3.js.map → chunk-KA67IGEG.js.map} +0 -0
  865. /package/dist/{chunk-OTAYAFYF.js.map → chunk-KRF2JODE.js.map} +0 -0
  866. /package/dist/{chunk-SDWKZLGP.js.map → chunk-LFMJXQDL.js.map} +0 -0
  867. /package/dist/{chunk-2U4HKKM7.js.map → chunk-NSYCXUN5.js.map} +0 -0
  868. /package/dist/{chunk-5JDGKHWH.js.map → chunk-QALBGVPR.js.map} +0 -0
  869. /package/dist/{chunk-JCDC5S32.js.map → chunk-QDBDDJKT.js.map} +0 -0
  870. /package/dist/{chunk-ZPFTFIKP.js.map → chunk-S5WFZHC5.js.map} +0 -0
  871. /package/dist/{chunk-PVZUQTLW.js.map → chunk-VUTEVIYG.js.map} +0 -0
  872. /package/dist/{chunk-OWCTDO67.js.map → chunk-WVBTRK6R.js.map} +0 -0
  873. /package/dist/{chunk-4IQGL4KD.js.map → chunk-ZMKRUD6J.js.map} +0 -0
  874. /package/dist/{chunk-J2AD7MLR.js.map → chunk-ZQWOZ5BL.js.map} +0 -0
  875. /package/dist/{cli-3WZP5JHA.js.map → cli-B4VVKKYV.js.map} +0 -0
  876. /package/dist/{cli-6IPZVUXF.js.map → cli-ENMWXMKO.js.map} +0 -0
  877. /package/dist/{cli-E2ZC5S4U.js.map → cli-F2UBHH7H.js.map} +0 -0
  878. /package/dist/{cli-QIBPY2HQ.js.map → cli-JKSQBGRO.js.map} +0 -0
  879. /package/dist/{cli-QSV6K33P.js.map → cli-MIIWRJDK.js.map} +0 -0
  880. /package/dist/{control-plane-I2QKMHPK.js.map → control-plane-R4ELXZHL.js.map} +0 -0
  881. /package/dist/{cp-hub-upload-GW566DGZ.js.map → cp-hub-upload-IUQVJGOW.js.map} +0 -0
  882. /package/dist/{custody-client-F3OAOAC7.js.map → custody-client-PVDBOT7Y.js.map} +0 -0
  883. /package/dist/{deploy-hetzner-IIAXES7B.js.map → deploy-hetzner-KY6KWN4M.js.map} +0 -0
  884. /package/dist/{dist-3EZQDIOD.js.map → dist-2QGMP2UI.js.map} +0 -0
  885. /package/dist/{dist-44RSFOGQ.js.map → dist-5MCQFGLX.js.map} +0 -0
  886. /package/dist/{dist-4K66F4UR.js.map → dist-EIVYC2MR.js.map} +0 -0
  887. /package/dist/{dist-VKKHIHCZ.js.map → dist-JWXPKGPZ.js.map} +0 -0
  888. /package/dist/{dist-5RMJLMYG.js.map → dist-ONAAPVBD.js.map} +0 -0
  889. /package/dist/{dist-HIQCE4H2.js.map → dist-OXLTCVA2.js.map} +0 -0
  890. /package/dist/{dist-IXPKVU3R.js.map → dist-PBO4UHJK.js.map} +0 -0
  891. /package/dist/{dist-SZTW3RMB.js.map → dist-RCBMUPVR.js.map} +0 -0
  892. /package/dist/{dist-WR2HYACA.js.map → dist-TD74GXLP.js.map} +0 -0
  893. /package/dist/{dist-WTPYXNRH.js.map → dist-VCZ3LZPJ.js.map} +0 -0
  894. /package/dist/{dist-YED5YJQN.js.map → dist-WGV7LRDC.js.map} +0 -0
  895. /package/dist/{host-reach-drainer-A4ZO6UKT.js.map → host-reach-drainer-AZYC6UIB.js.map} +0 -0
  896. /package/dist/{host-session-POJP4WO6.js.map → host-session-EGUDGE4R.js.map} +0 -0
  897. /package/dist/{hub-GHFEW3K2.js.map → hub-76RHPA7X.js.map} +0 -0
  898. /package/dist/{hub-adopt-YR7S5TNB.js.map → hub-adopt-5G7SKI2E.js.map} +0 -0
  899. /package/dist/{hub-api-client-BUQDTSQ3.js.map → hub-api-client-WPZTG5AT.js.map} +0 -0
  900. /package/dist/{hub-docker-target-XA5U2ZU5.js.map → hub-docker-target-CNJHYH4B.js.map} +0 -0
  901. /package/dist/{manager-pty-XCGH6AUC-EZML75UO.js.map → manager-pty-XCGH6AUC-O3UNISN2.js.map} +0 -0
  902. /package/dist/{plugin-update-BIPJZA24.js.map → plugin-update-UZYPWL4N.js.map} +0 -0
  903. /package/dist/{prepare-O4BUJIOQ.js.map → prepare-4GOTJXQL.js.map} +0 -0
  904. /package/dist/{prepared-custody-UTSSUTXF.js.map → prepared-custody-4YJ4ZT7J.js.map} +0 -0
  905. /package/dist/{prepared-state-FO74QUCP-4WLAYPEO.js.map → prepared-state-FO74QUCP-GUIPQORN.js.map} +0 -0
  906. /package/dist/{publish-credentials-N2JD2D3A.js.map → publish-credentials-RLRLNL33.js.map} +0 -0
  907. /package/dist/{registry-IPDCZDNW.js.map → registry-QMHCNR5X.js.map} +0 -0
  908. /package/dist/{relay-P5CXEGAZ.js.map → relay-VBWFCWKK.js.map} +0 -0
  909. /package/dist/{remote-docker-share-GIH6JNKY.js.map → remote-docker-share-TKG7SXHX.js.map} +0 -0
  910. /package/dist/{tool-grant-push-7K765QKW.js.map → tool-grant-push-V7E3Y2W6.js.map} +0 -0
  911. /package/runtime/hub/apps/hub/.next/static/{TMo35nbBXDtyGUs4P3Q_H → 2QUBvK0xJqbyGzVe1RBzl}/_buildManifest.js +0 -0
  912. /package/runtime/hub/apps/hub/.next/static/{TMo35nbBXDtyGUs4P3Q_H → 2QUBvK0xJqbyGzVe1RBzl}/_clientMiddlewareManifest.js +0 -0
  913. /package/runtime/hub/apps/hub/.next/static/{TMo35nbBXDtyGUs4P3Q_H → 2QUBvK0xJqbyGzVe1RBzl}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/sandbox-remote-docker/src/target.ts","../../../packages/sandbox-remote-docker/src/hosts-registry.ts","../../../packages/sandbox-remote-docker/src/remote-docker.ts","../../../packages/sandbox-remote-docker/src/image.ts","../../../packages/sandbox-remote-docker/src/prepared-state.ts","../../../packages/sandbox-remote-docker/src/prepare.ts","../../../packages/sandbox-remote-docker/src/share-hook.ts","../../../packages/sandbox-remote-docker/src/index.ts","../../../packages/sandbox-remote-docker/src/backend.ts","../../../packages/sandbox-remote-docker/src/build-attach.ts","../../../packages/sandbox-remote-docker/src/box-ssh.ts","../../../packages/sandbox-remote-docker/src/provider-module.ts","../../../packages/sandbox-remote-docker/src/host-setup.ts"],"sourcesContent":["/**\n * The remote-docker addressing model.\n *\n * A box lives on *some* remote engine, and the code that has to reach it is not\n * always the code that created it: the host relay resolves a backend from a\n * bare `CloudHandle` (`{ sandboxId }`) with no access to the box record or the\n * user's config. So the SSH destination is encoded INTO the sandbox id:\n *\n * sandboxId = \"<ssh-destination>/<container-name>\"\n * e.g. \"buildbox/agentbox-brave-otter\"\n * \"dev@10.0.0.9:2222/agentbox-brave-otter\"\n *\n * That makes the handle self-describing and multi-host support fall out for\n * free — no per-box registry to keep in sync.\n *\n * What the id bakes is a host **alias**, not a raw connection string: aliases are\n * registered in `hosts-registry.ts` (`~/.agentbox/remote-docker-hosts.json`), and\n * the alias→connection lookup happens at connection time (`ensureTunnel`). That\n * indirection is deliberate — `remote-docker update <alias>` remints the\n * connection and every existing box created against that alias follows it. The\n * functions here stay PURE (no registry I/O): they only split/validate the\n * destination string; resolution is a separate step at the connection chokepoints.\n *\n * A parsed destination is anything OpenSSH accepts once resolved: an\n * `~/.ssh/config` alias (`buildbox`), or `[user@]host[:port]`. We deliberately do\n * NOT parse it into our own notion of identity/port beyond the `:port` suffix —\n * the user's `~/.ssh/config` is the source of truth for keys, ports and usernames.\n */\n\nimport type { SshTargetArgs } from '@agentbox/sandbox-core';\n\n/** A parsed SSH destination. `user` / `port` are absent unless spelled out. */\nexport interface RemoteTarget {\n /** Host, IP, or `~/.ssh/config` alias. */\n host: string;\n user?: string;\n port?: number;\n /** The destination as the user wrote it — the canonical id-carrying form. */\n spec: string;\n}\n\n/** Container names are `agentbox-<box-name>`, matching the docker provider. */\nexport function containerNameFor(boxName: string): string {\n return `agentbox-${boxName}`;\n}\n\n/**\n * Parse `[user@]host[:port]` (or a bare ssh alias). Throws on an empty or\n * malformed destination — a bad host is worth failing loudly on, since every\n * later error would be an opaque ssh failure.\n */\nexport function parseRemoteTarget(spec: string): RemoteTarget {\n const raw = spec.trim();\n if (raw.length === 0) {\n throw new Error('remote-docker: empty SSH destination');\n }\n if (raw.includes('/')) {\n throw new Error(\n `remote-docker: invalid SSH destination \"${raw}\" — \"/\" separates the destination from the container in a sandbox id`,\n );\n }\n const at = raw.lastIndexOf('@');\n const user = at >= 0 ? raw.slice(0, at) : undefined;\n const hostPort = at >= 0 ? raw.slice(at + 1) : raw;\n if (hostPort.length === 0 || (user !== undefined && user.length === 0)) {\n throw new Error(`remote-docker: invalid SSH destination \"${raw}\"`);\n }\n\n // A bracketed IPv6 literal is the only form that can carry a port:\n // `[fe80::1]:2222`. Bare `fe80::1` is all host — its final `:1` is an address\n // group, not a port, and reading it as one would silently connect to :1.\n const bracketed = /^\\[(.+)\\](?::(\\d+))?$/.exec(hostPort);\n if (bracketed?.[1]) {\n const host = bracketed[1];\n if (bracketed[2] === undefined) return { host, user, spec: raw };\n return { host, user, port: checkedPort(bracketed[2], raw), spec: raw };\n }\n if (hostPort.includes(':')) {\n const colon = hostPort.lastIndexOf(':');\n const head = hostPort.slice(0, colon);\n const tail = hostPort.slice(colon + 1);\n // More than one colon ⇒ an unbracketed IPv6 literal ⇒ no port.\n if (!head.includes(':') && /^\\d+$/.test(tail)) {\n return { host: head, user, port: checkedPort(tail, raw), spec: raw };\n }\n }\n return { host: hostPort, user, spec: raw };\n}\n\nfunction checkedPort(digits: string, raw: string): number {\n const port = Number.parseInt(digits, 10);\n if (port <= 0 || port > 65535) {\n throw new Error(`remote-docker: invalid SSH port in \"${raw}\"`);\n }\n return port;\n}\n\n/** `<ssh-destination>/<container>` — the persisted sandbox id. */\nexport function makeSandboxId(targetSpec: string, container: string): string {\n // Validate the destination now so a malformed one can't be persisted.\n parseRemoteTarget(targetSpec);\n return `${targetSpec}/${container}`;\n}\n\nexport interface ParsedSandboxId {\n target: RemoteTarget;\n container: string;\n}\n\n/** Split a sandbox id back into its SSH destination and container name. */\nexport function parseSandboxId(sandboxId: string): ParsedSandboxId {\n const slash = sandboxId.lastIndexOf('/');\n if (slash <= 0 || slash === sandboxId.length - 1) {\n throw new Error(\n `remote-docker: malformed sandbox id \"${sandboxId}\" — expected \"<ssh-destination>/<container>\"`,\n );\n }\n return {\n target: parseRemoteTarget(sandboxId.slice(0, slash)),\n container: sandboxId.slice(slash + 1),\n };\n}\n\n/**\n * The `SshTargetArgs` for a destination. No `identity` and no `knownHosts`:\n * both come from the user's `~/.ssh/config` / agent / `~/.ssh/known_hosts`,\n * which is the whole point of pointing at a machine you already reach.\n */\nexport function sshTargetFor(target: RemoteTarget, controlPath?: string): SshTargetArgs {\n return {\n host: target.host,\n ...(target.user !== undefined ? { user: target.user } : {}),\n ...(target.port !== undefined ? { port: target.port } : {}),\n ...(controlPath !== undefined ? { controlPath } : {}),\n };\n}\n","/**\n * `~/.agentbox/remote-docker-hosts.json` — the alias registry.\n *\n * A remote engine is addressed by a short **alias** (`macmini`), not by its raw\n * SSH connection string. The alias is what gets baked into a box's sandbox id\n * (`<alias>/<container>`); the connection string is resolved from this registry\n * at connection time. That indirection is the whole point: `remote-docker update\n * <alias> <new-ssh>` remints the connection and every existing box created against\n * that alias follows it — no stale IP baked into an id.\n *\n * Two resolution modes:\n * - `resolveConnection(ref)` — LENIENT, for connection time. A registered alias\n * resolves to its ssh string; anything else passes through unchanged, so a box\n * whose id predates this registry (or names a raw/ssh-config destination) stays\n * reachable.\n * - `requireHostAlias(ref)` — STRICT, for entry points (create / prepare /\n * doctor). An unregistered reference throws — you must `add` it first. This is\n * what enforces the alias-only model for NEW boxes without stranding old ones.\n *\n * Shape mirrors `prepared-state.ts` (a provider-owned `Record<string,T>` JSON doc),\n * but with its own filename and inline atomic read/write. `homedir()` is resolved\n * at call time so tests can redirect `$HOME`.\n *\n * `SCHEMA` stays at 1 even as fields are added: every addition so far is optional\n * and ignorable, and `readHostsRegistry` hard-rejects a document whose schema it\n * does not equal — so bumping it would make an older CLI (or an older control\n * box) report every registered host as missing, which is strictly worse than it\n * ignoring a field it does not understand.\n */\n\nimport { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs';\nimport { homedir } from 'node:os';\nimport { dirname, resolve as pathResolve } from 'node:path';\n\nconst SCHEMA = 1;\n\n/**\n * A self-describing way to reach the engine, resolved once (via `ssh -G`) at\n * registration time.\n *\n * `ssh` alone is enough on the machine that registered it — an `~/.ssh/config`\n * alias like `buildbox` means whatever that user's config says. It means nothing\n * anywhere else, which is exactly the problem when the host has to be SHARED\n * with a control box: the hub container has no `~/.ssh` and no agent. So a\n * shared host also carries the expansion, plus the key to authenticate with.\n */\nexport interface RemoteHostConnection {\n /** Hostname or IP — never a local `~/.ssh/config` alias. */\n host: string;\n user?: string;\n port?: number;\n /** Absolute path to the private key. Omit to use the agent / ssh_config. */\n identityFile?: string;\n /** Absolute path to a dedicated known_hosts file. */\n knownHosts?: string;\n}\n\nexport interface RemoteHostEntry {\n /** The SSH connection string: `[user@]host[:port]` or an `~/.ssh/config` alias. */\n ssh: string;\n /**\n * Present when the entry was registered with an explicit, portable connection\n * (`remote-docker share`, or a host the hub itself was given). When set it\n * WINS over `ssh` at dial time — it is the more specific answer, and on a\n * control box it is the only one that can work.\n */\n connection?: RemoteHostConnection;\n createdAt: string;\n updatedAt?: string;\n}\n\nexport interface RemoteHostsRegistry {\n schema: number;\n /** Keyed by alias — the user-facing name, also what a box's sandbox id bakes. */\n hosts: Record<string, RemoteHostEntry>;\n}\n\n/** Aliases must be a plain name: no `@`/`:` (would look like a connection string),\n * no `/` (sandbox-id separator), no whitespace. Keeps them unambiguous + id-safe. */\nconst ALIAS_RE = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;\n\nexport function isValidAlias(alias: string): boolean {\n return ALIAS_RE.test(alias);\n}\n\nexport function assertValidAlias(alias: string): void {\n if (!isValidAlias(alias)) {\n throw new Error(\n `invalid host alias ${JSON.stringify(alias)} — use a plain name (letters, digits, \\`.\\`, \\`_\\`, \\`-\\`; no \\`@\\`, \\`:\\`, \\`/\\` or spaces)`,\n );\n }\n}\n\nfunction registryPath(): string {\n return pathResolve(homedir(), '.agentbox', 'remote-docker-hosts.json');\n}\n\nexport function readHostsRegistry(): RemoteHostsRegistry | null {\n const path = registryPath();\n if (!existsSync(path)) return null;\n let raw: unknown;\n try {\n raw = JSON.parse(readFileSync(path, 'utf8'));\n } catch {\n return null;\n }\n if (raw === null || typeof raw !== 'object') return null;\n const parsed = raw as Partial<RemoteHostsRegistry>;\n if (parsed.schema !== SCHEMA || typeof parsed.hosts !== 'object' || parsed.hosts === null) {\n return null;\n }\n return { schema: SCHEMA, hosts: parsed.hosts };\n}\n\n/** Atomic write (tmp + rename), 0600 — same hygiene as `writePreparedStateRaw`. */\nexport function writeHostsRegistry(reg: RemoteHostsRegistry): void {\n const path = registryPath();\n mkdirSync(dirname(path), { recursive: true });\n const body = JSON.stringify({ schema: SCHEMA, hosts: reg.hosts }, null, 2) + '\\n';\n const tmp = `${path}.tmp`;\n writeFileSync(tmp, body, { mode: 0o600 });\n renameSync(tmp, path);\n}\n\n/**\n * Where a shared host's material lives: the key minted for a control box to dial\n * with, and the `known_hosts` its ssh writes. Per alias (0700), beside the\n * registry that names it — the same shape the VPS providers use for per-box keys.\n */\nexport function hostKeyDir(alias: string): string {\n return pathResolve(homedir(), '.agentbox', 'remote-docker', 'hosts', alias);\n}\n\nexport function getHostAlias(alias: string): RemoteHostEntry | undefined {\n return readHostsRegistry()?.hosts[alias];\n}\n\n/** All registered aliases, sorted by name for stable `list` output. */\nexport function listHostAliases(): Array<{ alias: string; entry: RemoteHostEntry }> {\n const reg = readHostsRegistry();\n if (!reg) return [];\n return Object.entries(reg.hosts)\n .sort(([a], [b]) => a.localeCompare(b))\n .map(([alias, entry]) => ({ alias, entry }));\n}\n\n/**\n * Register or re-point an alias. Preserves `createdAt` on an update and stamps\n * `updatedAt`. Caller validates the alias name + probes the connection first.\n */\nexport function upsertHostAlias(\n alias: string,\n ssh: string,\n connection?: RemoteHostConnection,\n): void {\n const reg = readHostsRegistry() ?? { schema: SCHEMA, hosts: {} };\n const existing = reg.hosts[alias];\n const now = new Date().toISOString();\n // An explicit `undefined` connection CLEARS a stale one rather than leaving a\n // key path that no longer describes how we reach the host — re-pointing an\n // alias at a new machine must not inherit the old machine's identity.\n const next: RemoteHostEntry = existing\n ? { ...existing, ssh, updatedAt: now }\n : { ssh, createdAt: now };\n if (connection) next.connection = connection;\n else delete next.connection;\n reg.hosts[alias] = next;\n writeHostsRegistry(reg);\n}\n\n/** Drop an alias. Returns whether it was present. */\nexport function removeHostAlias(alias: string): boolean {\n const reg = readHostsRegistry();\n if (!reg || !(alias in reg.hosts)) return false;\n const hosts = { ...reg.hosts };\n delete hosts[alias];\n writeHostsRegistry({ schema: SCHEMA, hosts });\n return true;\n}\n\n/**\n * Connection-time resolution (LENIENT): a registered alias → its ssh string;\n * anything else → unchanged, so pre-registry / raw-baked box ids stay reachable.\n */\nexport function resolveConnection(ref: string): string {\n return getHostAlias(ref)?.ssh ?? ref;\n}\n\n/**\n * The portable connection registered for `ref`, if any. Separate from\n * {@link resolveConnection} because the two answer different questions: that one\n * returns \"what do I hand ssh as a destination\", this one \"do I also know the\n * host, port and key explicitly\". Callers that dial need both.\n */\nexport function getHostConnection(ref: string): RemoteHostConnection | undefined {\n return getHostAlias(ref)?.connection;\n}\n\n/**\n * Entry-point resolution (STRICT): a registered alias → its entry; otherwise\n * throw. This is what makes the model alias-only for anything that CREATES a\n * reference (create / prepare / doctor) without stranding existing boxes.\n */\nexport function requireHostAlias(ref: string): RemoteHostEntry {\n const entry = getHostAlias(ref);\n if (!entry) {\n throw new Error(\n `no such remote-docker host alias ${JSON.stringify(ref)} — register it with \\`agentbox remote-docker add <name> <[user@]host[:port]>\\``,\n );\n }\n return entry;\n}\n","/**\n * The single chokepoint through which every `docker` command reaches the remote\n * engine: one persistent SSH ControlMaster per box, `docker …` run inside a\n * remote LOGIN shell.\n *\n * Why not `DOCKER_HOST=ssh://user@host`? Two reasons, both fatal in practice:\n *\n * 1. Docker's ssh transport runs `docker system dial-stdio` on the remote,\n * which needs `docker` on the NON-login-shell PATH. That is exactly where\n * OrbStack (`~/.orbstack/bin`) and Colima break, so a Mac remote — a case\n * we explicitly support — would fail with an opaque \"command not found\".\n * A login shell (`bash -lc`) sources the profile and finds them.\n * 2. It opens a fresh SSH connection per `docker` invocation. Create issues\n * dozens; the ControlMaster amortizes the handshake to ~nothing.\n *\n * The trade is that we compose docker's argv into a shell string ourselves, so\n * every argument must be quoted — `quoteShellArgv` from @agentbox/sandbox-cloud\n * does that, and nothing in this package may build a remote command by\n * concatenation.\n */\n\nimport { mkdirSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { execa } from 'execa';\nimport type { Readable, Writable } from 'node:stream';\nimport { quoteShellArg, quoteShellArgv } from '@agentbox/sandbox-cloud';\nimport {\n SshTunnelManager,\n sshDestination,\n sshExec,\n sshOptArgs,\n type SshTargetArgs,\n} from '@agentbox/sandbox-core';\nimport { parseRemoteTarget, sshTargetFor, type RemoteTarget } from './target.js';\nimport { getHostConnection, hostKeyDir, resolveConnection } from './hosts-registry.js';\n\n/**\n * A box's sandbox id bakes an ALIAS, not a raw connection string. Turn the\n * baked target into one that dials the alias's current connection — so\n * `remote-docker update` retargets existing boxes. Lenient: a non-alias spec\n * (raw destination, or a pre-registry id) passes through unchanged.\n */\nexport interface DialPlan {\n /** Where to connect, after alias resolution. */\n target: RemoteTarget;\n /** Private key to authenticate with, when the entry carries one. */\n identity?: string;\n /** known_hosts to TOFU into. Only meaningful alongside `identity`. */\n knownHosts?: string;\n}\n\n/**\n * Resolve an alias to something dialable.\n *\n * A registered `connection` WINS over the `ssh` string: it is the portable\n * expansion (host/user/port + a key), and it is the only form that works on a\n * machine without the registering user's `~/.ssh/config` — a control box, most\n * of all. Everything else keeps the original behavior: the ssh string, read\n * through the user's own config, agent and known_hosts.\n */\nexport function dialTarget(target: RemoteTarget): DialPlan {\n const conn = getHostConnection(target.spec);\n if (conn) {\n const dial: RemoteTarget = {\n host: conn.host,\n spec: describeConnection(conn),\n ...(conn.user !== undefined ? { user: conn.user } : {}),\n ...(conn.port !== undefined ? { port: conn.port } : {}),\n };\n if (!conn.identityFile) return { target: dial };\n // With an explicit key we must also say where to pin the host key: the hub\n // container has no `~/.ssh` at all, so ssh's default would fail closed under\n // BatchMode. Default to a per-alias file next to the key itself.\n const knownHosts = conn.knownHosts ?? join(hostKeyDir(target.spec), 'known_hosts');\n mkdirSync(dirname(knownHosts), { recursive: true, mode: 0o700 });\n return { target: dial, identity: conn.identityFile, knownHosts };\n }\n const resolved = resolveConnection(target.spec);\n return { target: resolved === target.spec ? target : parseRemoteTarget(resolved) };\n}\n\n/** Fold a dial plan's key material onto an ssh target. */\nfunction withIdentity(base: SshTargetArgs, plan: DialPlan): SshTargetArgs {\n return {\n ...base,\n ...(plan.identity !== undefined ? { identity: plan.identity } : {}),\n ...(plan.knownHosts !== undefined ? { knownHosts: plan.knownHosts } : {}),\n };\n}\n\n/** `[user@]host[:port]`, for logs and error messages. IPv6 gets its brackets back. */\nfunction describeConnection(conn: { host: string; user?: string; port?: number }): string {\n const host = conn.host.includes(':') ? `[${conn.host}]` : conn.host;\n return `${conn.user ? `${conn.user}@` : ''}${host}${conn.port !== undefined ? `:${String(conn.port)}` : ''}`;\n}\n\n/** One ControlMaster per box, namespaced so ids can't collide with a VPS provider's. */\nexport const tunnels = new SshTunnelManager('remote-docker');\n\nexport interface RemoteExecResult {\n exitCode: number;\n stdout: string;\n stderr: string;\n}\n\n/**\n * Open (or reuse) the ControlMaster for a box and return an ssh target bound to\n * it. Every exec/upload/download/forward for that box rides this one connection.\n */\nexport async function ensureTunnel(\n sandboxId: string,\n target: RemoteTarget,\n): Promise<SshTargetArgs> {\n // Dial the alias's current connection; keep the tunnel keyed by sandboxId.\n const plan = dialTarget(target);\n const dial = plan.target;\n if (!tunnels.has(sandboxId)) {\n try {\n await tunnels.open({\n boxId: sandboxId,\n vpsHost: dial.host,\n ...(dial.user !== undefined ? { vpsUser: dial.user } : {}),\n ...(dial.port !== undefined ? { port: dial.port } : {}),\n ...(plan.identity !== undefined ? { identity: plan.identity } : {}),\n });\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n const where =\n dial.spec === target.spec ? `\"${target.spec}\"` : `\"${target.spec}\" (${dial.spec})`;\n const how = plan.identity\n ? `(dialed with the key registered for this host, ${plan.identity})`\n : '(the provider uses your own ~/.ssh/config, agent and known_hosts)';\n throw new Error(\n `remote-docker: cannot SSH to ${where}. Check that \\`ssh ${dial.spec} true\\` works from this machine ` +\n `${how}.\\n${msg}`,\n );\n }\n }\n const controlPath = tunnels.controlPath(sandboxId);\n return withIdentity(sshTargetFor(dial, controlPath), plan);\n}\n\n/** Re-open a dead master (host sleep/wake, network blip) and drop stale forwards. */\nexport async function refreshTunnel(sandboxId: string, target: RemoteTarget): Promise<void> {\n const plan = dialTarget(target);\n const dial = plan.target;\n await tunnels.refresh({\n boxId: sandboxId,\n vpsHost: dial.host,\n ...(dial.user !== undefined ? { vpsUser: dial.user } : {}),\n ...(dial.port !== undefined ? { port: dial.port } : {}),\n ...(plan.identity !== undefined ? { identity: plan.identity } : {}),\n });\n}\n\n/**\n * Run `docker <argv…>` on the remote engine. `argv` is quoted, so callers pass\n * a plain array and never think about the shell.\n */\nexport async function dockerOnRemote(\n target: SshTargetArgs,\n argv: string[],\n opts: { timeoutMs?: number; onLine?: (line: string) => void } = {},\n): Promise<RemoteExecResult> {\n return sshExec(target, loginShell(`docker ${quoteShellArgv(argv)}`), {\n ...(opts.timeoutMs !== undefined ? { timeoutMs: opts.timeoutMs } : {}),\n ...(opts.onLine !== undefined ? { onLine: opts.onLine } : {}),\n });\n}\n\n/** Same, but throws with the remote's stderr on a non-zero exit. */\nexport async function dockerOnRemoteOrThrow(\n target: SshTargetArgs,\n argv: string[],\n opts: { timeoutMs?: number; onLine?: (line: string) => void } = {},\n): Promise<string> {\n const res = await dockerOnRemote(target, argv, opts);\n if (res.exitCode !== 0) {\n throw new Error(\n `remote-docker: \\`docker ${argv.join(' ')}\\` failed (exit ${String(res.exitCode)}): ${\n res.stderr.trim() || res.stdout.trim() || '(no output)'\n }`,\n );\n }\n return res.stdout;\n}\n\n/**\n * Run a command INSIDE the box's container: `docker exec … bash -lc '<cmd>'`.\n * This is what `CloudBackend.exec` is built on, so it carries the same\n * semantics the cloud scaffold expects (login shell, so `/etc/profile.d`\n * exports are visible).\n */\nexport function dockerExecArgv(\n container: string,\n command: string,\n opts: { user?: string; cwd?: string; env?: Record<string, string>; interactive?: boolean } = {},\n): string[] {\n const argv = ['exec'];\n if (opts.interactive) argv.push('-i');\n if (opts.user) argv.push('-u', opts.user);\n if (opts.cwd) argv.push('-w', opts.cwd);\n for (const [k, v] of Object.entries(opts.env ?? {})) {\n argv.push('-e', `${k}=${v}`);\n }\n argv.push(container, 'bash', '-lc', command);\n return argv;\n}\n\n/**\n * The user every exec and every file transfer runs as. It must be ONE user:\n * a file written as root that `exec` (as vscode) later has to delete leaves the\n * box wedged — and on a nested engine, where the container init is forced to\n * uid 0, `docker exec` with no `-u` would default to root and do exactly that.\n * So both sides name the user explicitly rather than inheriting the container's.\n */\nexport const CONTAINER_USER = 'vscode';\n\n/**\n * Stream a local file into a file inside the container, over the ControlMaster.\n *\n * Not `docker cp`: that would need the bytes staged on the remote host first\n * (an extra hop and a temp file to clean up). Piping into `cat` inside the\n * container is one hop, binary-safe, and leaves nothing behind. `execa` is\n * driven directly here because the transfer needs a stdin stream, which the\n * text-in/text-out `sshExec` deliberately doesn't model.\n */\nexport async function pipeFileIntoContainer(\n target: SshTargetArgs,\n container: string,\n input: Readable,\n remotePath: string,\n): Promise<void> {\n const remote = loginShell(\n `docker ${quoteShellArgv(['exec', '-i', '-u', CONTAINER_USER, container, 'sh', '-c', `cat > ${quoteShellArg(remotePath)}`])}`,\n );\n const res = await execa('ssh', [...sshOptArgs(target), sshDestination(target), remote], {\n reject: false,\n input,\n });\n if (res.exitCode !== 0) {\n throw new Error(\n `remote-docker: upload to ${container}:${remotePath} failed (exit ${String(res.exitCode)}): ${\n typeof res.stderr === 'string' ? res.stderr : ''\n }`,\n );\n }\n}\n\n/** Stream a file out of the container into a local writable stream. */\nexport async function pipeFileFromContainer(\n target: SshTargetArgs,\n container: string,\n remotePath: string,\n output: Writable,\n): Promise<void> {\n const remote = loginShell(\n `docker ${quoteShellArgv(['exec', '-u', CONTAINER_USER, container, 'cat', remotePath])}`,\n );\n const child = execa('ssh', [...sshOptArgs(target), sshDestination(target), remote], {\n reject: false,\n stdout: 'pipe',\n stderr: 'pipe',\n });\n child.stdout?.pipe(output);\n const res = await child;\n if (res.exitCode !== 0) {\n throw new Error(\n `remote-docker: download of ${container}:${remotePath} failed (exit ${String(res.exitCode)}): ${\n typeof res.stderr === 'string' ? res.stderr : ''\n }`,\n );\n }\n}\n\n/**\n * `bash -lc '<cmd>'` — a LOGIN shell, so the remote user's profile is sourced\n * and `docker` is found wherever their engine put it (Docker Desktop in\n * /usr/local/bin, OrbStack in ~/.orbstack/bin, Linux packages in /usr/bin).\n * This is the single reason a macOS remote works without a PATH config key.\n */\nexport function loginShell(command: string): string {\n return `bash -lc ${quoteShellArg(command)}`;\n}\n\n/** One preflight check, so `remote-docker doctor` can render a row per step. */\nexport interface RemoteEngineStep {\n label: 'ssh' | 'docker';\n ok: boolean;\n /** Success line or failure reason, shown after the status badge. */\n detail: string;\n hint?: string;\n}\n\nexport interface RemoteEngineProbe {\n /** True iff every attempted step passed. */\n ok: boolean;\n /** The steps that ran, in order (ssh, then docker). A failed step is last. */\n steps: RemoteEngineStep[];\n /** From the docker step when `ok`. */\n version?: string;\n arch?: string;\n os?: string;\n /** First failing step's detail — convenience for single-line callers. */\n error?: string;\n}\n\n/**\n * Preflight a destination: SSH reachable, `docker` on the login-shell PATH, and\n * the daemon actually answering. Returns a per-step result so `remote-docker\n * doctor` can render one `[ ok ]`/`[FAIL]` row per check (like `agentbox\n * doctor`); `add` and the provider's doctorChecks read the rolled-up fields.\n */\nexport async function probeRemoteEngine(\n spec: string,\n /**\n * Dial with this key instead of whatever `~/.ssh/config` would pick. Used\n * before a host is registered — sharing a host mints a key and must prove it\n * works from the machine that will use it, not that the user's own key does.\n */\n auth?: { identity?: string; knownHosts?: string },\n): Promise<RemoteEngineProbe> {\n let target: SshTargetArgs;\n try {\n const plan = dialTarget(parseRemoteTarget(spec));\n target = withIdentity(sshTargetFor(plan.target), {\n ...plan,\n ...(auth?.identity !== undefined ? { identity: auth.identity } : {}),\n ...(auth?.knownHosts !== undefined ? { knownHosts: auth.knownHosts } : {}),\n });\n } catch (err) {\n const detail = err instanceof Error ? err.message : String(err);\n return { ok: false, steps: [{ label: 'ssh', ok: false, detail }], error: detail };\n }\n const reach = await sshExec({ ...target, options: { ConnectTimeout: '10' } }, 'true', {\n timeoutMs: 20_000,\n });\n if (reach.exitCode !== 0) {\n const detail = `cannot SSH to ${spec}: ${reach.stderr.trim() || `exit ${String(reach.exitCode)}`}`;\n return {\n ok: false,\n steps: [\n { label: 'ssh', ok: false, detail, hint: `\\`ssh ${spec} true\\` must work from here` },\n ],\n error: detail,\n };\n }\n const sshStep: RemoteEngineStep = { label: 'ssh', ok: true, detail: `reachable (${spec})` };\n const res = await dockerOnRemote(\n target,\n ['version', '--format', '{{.Server.Version}}|{{.Server.Arch}}|{{.Server.Os}}'],\n {\n timeoutMs: 30_000,\n },\n );\n if (res.exitCode !== 0) {\n const err = res.stderr.trim() || res.stdout.trim();\n const notFound = /command not found|not found/i.test(err);\n const detail = notFound\n ? `\\`docker\\` is not on ${spec}'s login-shell PATH (${err}). Install Docker there, or add it to the remote user's profile.`\n : `docker on ${spec} is not answering: ${err}`;\n return {\n ok: false,\n steps: [sshStep, { label: 'docker', ok: false, detail }],\n error: detail,\n };\n }\n const [version = '', arch = '', os = ''] = res.stdout.trim().split('|');\n const dockerStep: RemoteEngineStep = {\n label: 'docker',\n ok: true,\n detail: `${version} (${os}/${arch})`,\n };\n return { ok: true, steps: [sshStep, dockerStep], version, arch, os };\n}\n","/**\n * Getting the box image onto the remote engine.\n *\n * The image ref IS the build-context fingerprint: `agentbox/box:<sha16>`, the\n * same sha the local docker provider computes. That one decision removes a\n * whole class of state:\n *\n * - \"is this host prepared?\" == `docker image inspect agentbox/box:<sha>` on it.\n * No prepared-state file is consulted to decide, so it can't go stale or\n * disagree with reality, and it is naturally PER HOST (which a single\n * `~/.agentbox/remote-docker-prepared.json` could never be).\n * - a CLI upgrade that changes any baked file changes the sha, so the next\n * create ensures a new ref rather than silently running an old image.\n *\n * Ensure order: already present → pull the fingerprint-tagged image from GHCR\n * (published multi-arch, so an amd64 remote gets amd64 even though the laptop\n * is arm64) → stream the local build context to a temp dir on the remote and\n * build it there.\n */\n\nimport { createReadStream } from 'node:fs';\nimport { rm } from 'node:fs/promises';\nimport { tmpdir } from 'node:os';\nimport { join } from 'node:path';\nimport { execa } from 'execa';\nimport { quoteShellArg } from '@agentbox/sandbox-cloud';\nimport {\n BOX_IMAGE_REGISTRY,\n BUILD_CONTEXT_DIR,\n computeDockerContextFingerprint,\n registryRefForSha,\n} from '@agentbox/sandbox-docker';\nimport {\n variantFingerprint,\n sshDestination,\n sshOptArgs,\n type AgentSettingsMap,\n type SshTargetArgs,\n} from '@agentbox/sandbox-core';\nimport { dockerOnRemote, loginShell } from './remote-docker.js';\n\nexport interface EnsureRemoteImageOptions {\n /** Pin an explicit image ref on the remote (`box.imageRemoteDocker`); skips the ensure. */\n imageRef?: string;\n /** Every agent's declared settings; the bake-affecting ones fold into the ref. */\n agentSettings?: AgentSettingsMap;\n /** Registry to pull from. Empty string disables the pull and forces a build. */\n registry?: string;\n /** Force the build path even on a registry hit (`--build`). */\n allowPull?: boolean;\n /** Rebuild even when the ref is already present on the remote. */\n force?: boolean;\n onLog?: (line: string) => void;\n}\n\nexport interface EnsureRemoteImageResult {\n ref: string;\n source: 'pinned' | 'present' | 'pulled' | 'built';\n /** The build-context fingerprint the ref encodes, when we derived it. */\n contextSha256?: string;\n}\n\n/** The image ref a given build-context fingerprint maps to on the remote. */\nexport function remoteImageRef(contextSha256: string): string {\n return `agentbox/box:${contextSha256.slice(0, 16)}`;\n}\n\n/**\n * Resolve the fingerprint of the build context this CLI would bake, folding in\n * the bake-affecting agent settings exactly as the docker provider does (so an\n * image baked with a non-default setting and one baked without are different\n * refs, not the same ref with different contents). Null when the context can't\n * be resolved — a dev tree without `pnpm -w build`.\n */\nexport async function currentContextSha(agentSettings?: AgentSettingsMap): Promise<string | null> {\n const fp = await computeDockerContextFingerprint({});\n if (!fp) return null;\n return variantFingerprint(fp.contextSha256, { agentSettings });\n}\n\n/**\n * Make the box image present on the remote engine. Idempotent and cheap on the\n * hot path: a single `docker image inspect` when it's already there.\n */\nexport async function ensureRemoteImage(\n target: SshTargetArgs,\n opts: EnsureRemoteImageOptions = {},\n): Promise<EnsureRemoteImageResult> {\n const log = opts.onLog ?? ((): void => {});\n\n // An explicitly pinned ref is the user's problem to keep present — we neither\n // pull nor build it, because we have no idea what it contains.\n if (opts.imageRef && opts.imageRef.trim().length > 0) {\n const ref = opts.imageRef.trim();\n const probe = await dockerOnRemote(target, ['image', 'inspect', ref]);\n if (probe.exitCode !== 0) {\n throw new Error(\n `remote-docker: box.imageRemoteDocker pins \"${ref}\", which is not present on the remote engine. ` +\n `Build/pull it there, or unset the key to let AgentBox manage the image.`,\n );\n }\n return { ref, source: 'pinned' };\n }\n\n const sha = await currentContextSha(opts.agentSettings);\n if (!sha) {\n throw new Error(\n 'remote-docker: cannot resolve the box build context (a dev tree needs `pnpm -w build` first)',\n );\n }\n const ref = remoteImageRef(sha);\n\n if (!opts.force) {\n const probe = await dockerOnRemote(target, ['image', 'inspect', ref]);\n if (probe.exitCode === 0) {\n log(`[image] ${ref} already present on the remote`);\n return { ref, source: 'present', contextSha256: sha };\n }\n }\n\n const registry = opts.registry ?? BOX_IMAGE_REGISTRY;\n if (opts.allowPull !== false && registry) {\n const remote = registryRefForSha(sha, registry);\n log(`[image] pulling ${remote} on the remote engine`);\n const pull = await dockerOnRemote(target, ['pull', remote], {\n timeoutMs: 900_000,\n onLine: (l) => log(`[image] ${l}`),\n });\n if (pull.exitCode === 0) {\n await dockerOnRemote(target, ['tag', remote, ref]);\n log(`[image] pulled ${remote} -> ${ref}`);\n return { ref, source: 'pulled', contextSha256: sha };\n }\n log('[image] registry miss — building on the remote from the local context');\n }\n\n await buildOnRemote(target, ref, opts);\n return { ref, source: 'built', contextSha256: sha };\n}\n\n/**\n * The remote shell command that receives the streamed tar. Split out (with its\n * two siblings below) so the docker-29 contract — a directory context, never a\n * `-` stdin context alongside `-f` — is pinned by a pure unit test.\n */\nexport function stageContextCommand(remoteDir: string): string {\n const dir = quoteShellArg(remoteDir);\n return `mkdir -p ${dir} && tar -xf - -C ${dir}`;\n}\n\n/**\n * `docker build` argv for a context already staged at `remoteDir`.\n *\n * `-f` is ABSOLUTE on purpose: buildx resolves `--file` against the client's\n * working directory, not against the context (the classic builder resolved it\n * against the context, which is why a bare `Dockerfile.box` used to work). With\n * a login shell that cwd is the remote user's home, so a relative name fails\n * with `failed to read dockerfile: open Dockerfile.box: no such file`.\n */\nexport function remoteBuildArgv(ref: string, remoteDir: string): string[] {\n return ['build', '-t', ref, '-f', `${remoteDir}/Dockerfile.box`, remoteDir];\n}\n\n/** Remove a staged context, whatever the build did. */\nexport function cleanupContextCommand(remoteDir: string): string {\n return `rm -rf ${quoteShellArg(remoteDir)}`;\n}\n\n/**\n * Distinguishes two builds started inside the same millisecond — `Date.now()`\n * alone is not enough resolution for a fan-out that kicks several off at once.\n */\nlet contextSeq = 0;\nfunction nextContextSeq(): number {\n contextSeq += 1;\n return contextSeq;\n}\n\n/**\n * Stream the local build context to the remote engine and build it there.\n *\n * The tar is unpacked into a remote temp dir and built as a **directory**\n * context. The older `docker build -` (tar on stdin) form is unusable from\n * docker 29 on: the classic builder is gone, and buildx refuses a stdin context\n * combined with `-f` — `ambiguous Dockerfile source: both stdin and flag\n * correspond to Dockerfiles`. Our context always names its Dockerfile\n * `Dockerfile.box`, so `-f` is not optional; the temp dir is. Nothing is left\n * behind: it is removed even when the build fails.\n */\nasync function buildOnRemote(\n target: SshTargetArgs,\n ref: string,\n opts: EnsureRemoteImageOptions,\n): Promise<void> {\n const log = opts.onLog ?? ((): void => {});\n // One token for both ends, unique per invocation: two concurrent builds (two\n // laptops against one engine, or a bake racing a registry-miss create inside\n // the hub worker) must neither unpack into each other's remote context nor\n // share the local tar — the first to finish deletes it in its `finally` while\n // the other is still streaming from it.\n const token = `${String(process.pid)}-${String(Date.now())}-${String(nextContextSeq())}`;\n const tarPath = join(tmpdir(), `agentbox-box-ctx-${token}.tar`);\n const remoteDir = `/tmp/agentbox-box-ctx-${token}`;\n try {\n // COPYFILE_DISABLE stops macOS tar from emitting ._* AppleDouble entries,\n // which would land in the image as junk files.\n await execa('tar', ['-C', BUILD_CONTEXT_DIR, '-cf', tarPath, '.'], {\n env: { ...process.env, COPYFILE_DISABLE: '1' },\n });\n\n log(`[image] streaming the build context to ${remoteDir}`);\n const staged = await execa(\n 'ssh',\n [...sshOptArgs(target), sshDestination(target), loginShell(stageContextCommand(remoteDir))],\n { reject: false, input: createReadStream(tarPath), stdout: 'pipe', stderr: 'pipe' },\n );\n if (staged.exitCode !== 0) {\n const err = typeof staged.stderr === 'string' ? staged.stderr.trim() : '';\n throw new Error(\n `remote-docker: could not stage the build context in ${remoteDir} (exit ${String(staged.exitCode)})${err ? `: ${err}` : ''}`,\n );\n }\n\n const buildArgs = remoteBuildArgv(ref, remoteDir);\n\n log(`[image] building ${ref} on the remote`);\n const res = await dockerOnRemote(target, buildArgs, {\n timeoutMs: 1_800_000,\n onLine: (line) => {\n if (line.trim().length > 0) log(`[image] ${line}`);\n },\n });\n if (res.exitCode !== 0) {\n throw new Error(\n `remote-docker: remote \\`docker build\\` failed (exit ${String(res.exitCode)}). See the build output above.`,\n );\n }\n log(`[image] built ${ref}`);\n } finally {\n await rm(tarPath, { force: true });\n // Best-effort: a leftover context dir is junk on someone else's disk, not a\n // reason to fail a build that otherwise succeeded.\n await execa(\n 'ssh',\n [...sshOptArgs(target), sshDestination(target), loginShell(cleanupContextCommand(remoteDir))],\n { reject: false },\n ).catch(() => undefined);\n }\n}\n","/**\n * `~/.agentbox/remote-docker-prepared.json`.\n *\n * Unlike every other cloud provider, this file is NOT load-bearing. The image\n * ref on a remote engine is its build-context fingerprint (`agentbox/box:<sha>`),\n * so \"is this host prepared?\" is answered by asking the engine, not by trusting\n * a local file — and it is answered per host, which a single file could never\n * do. What this records is the *history*: which hosts we have baked, with what,\n * and when, for `agentbox prepare --status` and `doctor` to report.\n */\n\nimport { readPreparedStateRaw, writePreparedStateRaw, readCliStamp } from '@agentbox/sandbox-core';\n\nconst SCHEMA = 1;\nconst PROVIDER = 'remote-docker';\n\nexport interface PreparedRemoteHost {\n imageRef: string;\n contextSha256: string;\n cliVersion?: string;\n cliCommit?: string;\n createdAt: string;\n}\n\nexport interface PreparedRemoteDockerState {\n schema: number;\n /** Keyed by SSH destination, exactly as the user spelled it. */\n hosts: Record<string, PreparedRemoteHost>;\n}\n\nexport function readPreparedState(): PreparedRemoteDockerState | null {\n const raw = readPreparedStateRaw(PROVIDER);\n if (raw === null || typeof raw !== 'object') return null;\n const parsed = raw as Partial<PreparedRemoteDockerState>;\n if (parsed.schema !== SCHEMA || typeof parsed.hosts !== 'object' || parsed.hosts === null) {\n return null;\n }\n return { schema: SCHEMA, hosts: parsed.hosts };\n}\n\n/** Drop one host from the prepared-image history. Returns whether it was present. */\nexport function removePreparedHost(host: string): boolean {\n const existing = readPreparedState();\n if (!existing || !(host in existing.hosts)) return false;\n const hosts = { ...existing.hosts };\n delete hosts[host];\n writePreparedStateRaw(PROVIDER, { schema: SCHEMA, hosts });\n return true;\n}\n\nexport function recordPreparedHost(\n host: string,\n fields: { imageRef: string; contextSha256: string },\n): void {\n const stamp = readCliStamp();\n const existing = readPreparedState();\n const next: PreparedRemoteDockerState = {\n schema: SCHEMA,\n hosts: {\n ...(existing?.hosts ?? {}),\n [host]: {\n imageRef: fields.imageRef,\n contextSha256: fields.contextSha256,\n ...(stamp.cliVersion ? { cliVersion: stamp.cliVersion } : {}),\n ...(stamp.cliCommit ? { cliCommit: stamp.cliCommit } : {}),\n createdAt: new Date().toISOString(),\n },\n },\n };\n writePreparedStateRaw(PROVIDER, next);\n}\n","/**\n * `agentbox prepare --provider docker:<host>` — bake the box image on a remote\n * engine.\n *\n * Unlike the VPS providers, this is not a mandatory gate: a remote engine can\n * build from a Dockerfile, so `create` ensures the image itself and prepare is\n * simply the eager form (\"do the slow part now, not when I'm waiting for a\n * box\"). It is also the only place that writes `remote-docker-prepared.json`,\n * which exists purely so `prepare --status` / `doctor` can report what has been\n * baked where.\n */\n\nimport type { PrepareOptions, PrepareResult } from '@agentbox/core';\nimport { ensureRemoteImage } from './image.js';\nimport { ensureTunnel } from './remote-docker.js';\nimport { recordPreparedHost } from './prepared-state.js';\nimport { requireHostAlias } from './hosts-registry.js';\nimport { parseRemoteTarget } from './target.js';\n\nexport async function prepareRemoteDocker(\n opts: PrepareOptions & { host?: string },\n): Promise<PrepareResult> {\n const log = opts.onLog ?? ((): void => {});\n const spec = (opts.host ?? '').trim();\n if (!spec) {\n throw new Error(\n 'remote-docker: prepare needs a host alias — `agentbox prepare --provider docker:<alias>`, ' +\n 'or set `box.remoteDockerHost`.',\n );\n }\n requireHostAlias(spec);\n const remote = parseRemoteTarget(spec);\n const target = await ensureTunnel(`engine:${remote.spec}`, remote);\n\n log(`[prepare] ensuring the box image on ${remote.spec}`);\n const res = await ensureRemoteImage(target, {\n ...(opts.agentSettings ? { agentSettings: opts.agentSettings } : {}),\n ...(opts.registry !== undefined ? { registry: opts.registry } : {}),\n ...(opts.allowPull !== undefined ? { allowPull: opts.allowPull } : {}),\n ...(opts.force ? { force: true } : {}),\n onLog: log,\n });\n\n if (res.contextSha256) {\n recordPreparedHost(remote.spec, { imageRef: res.ref, contextSha256: res.contextSha256 });\n }\n log(`[prepare] ${remote.spec} ready — ${res.ref} (${res.source})`);\n\n // Deliberately no `snapshotName`: returning one makes the CLI pin\n // `box.imageRemoteDocker` to it, which would freeze every future create on\n // today's fingerprint and defeat the self-updating ref.\n return {};\n}\n","/**\n * Two one-slot hooks the CLI fills for a just-registered host: share it with the\n * configured control box, and bake its box image wherever that bake belongs.\n *\n * Same shape and reason as `@agentbox/sandbox-core`'s credential publisher: the\n * registration flows (`remote-docker add`, the install wizard's\n * `interactiveRegisterHost`) live in this package, which must not depend on the\n * CLI's hub client or target resolution. So the CLI installs the handlers at\n * startup and registration calls {@link shareRegisteredHost} / {@link\n * bakeRegisteredHost} once the local registry write has already succeeded.\n */\n\n/** Shares `alias` with the control box. Owns its own user messaging. */\nexport type RemoteHostSharer = (alias: string) => Promise<void>;\n\nlet activeSharer: RemoteHostSharer | undefined;\n\n/** Install (or clear, with `undefined`) the handler. The CLI calls this once. */\nexport function setRemoteHostSharer(fn: RemoteHostSharer | undefined): void {\n activeSharer = fn;\n}\n\n/**\n * Fire the handler, if one is installed. Best-effort: the host IS registered\n * locally by the time this runs, and a control box that is unreachable — or\n * absent entirely — must never turn a successful `add` into a failure.\n */\nexport async function shareRegisteredHost(alias: string): Promise<void> {\n const fn = activeSharer;\n if (!fn) return;\n try {\n await fn(alias);\n } catch {\n /* best-effort — the handler owns any message worth showing */\n }\n}\n\n/**\n * Bakes `alias`'s box image, wherever that bake belongs — the control box when\n * it has been given the host, this machine's hub otherwise. Owns its own user\n * messaging (including its spinner); throws on failure.\n */\nexport type RemoteHostBaker = (alias: string) => Promise<void>;\n\nlet activeBaker: RemoteHostBaker | undefined;\n\n/** Install (or clear, with `undefined`) the handler. The CLI calls this once. */\nexport function setRemoteHostBaker(fn: RemoteHostBaker | undefined): void {\n activeBaker = fn;\n}\n\n/**\n * Fire the bake handler, if one is installed; `false` means there was none and\n * the caller should bake inline itself.\n *\n * Unlike {@link shareRegisteredHost} this does NOT swallow errors: the caller\n * decides what a failed bake means (for `remote-docker add` it is a warning, not\n * a failed registration) and needs the reason to say it.\n */\nexport async function bakeRegisteredHost(alias: string): Promise<boolean> {\n const fn = activeBaker;\n if (!fn) return false;\n await fn(alias);\n return true;\n}\n","/**\n * The remote-docker provider: `createCloudProvider(remoteDockerBackend)` plus\n * the four things the scaffold can't supply.\n *\n * - `buildAttach` — the scaffold's SSH attach lands on the machine, not in\n * the container; ours wraps the inner command in a `docker exec`.\n * - `checkpoint` — `docker commit` on the engine that runs the box, with the\n * host carried in the snapshot name (see `parseSnapshotName`).\n * - `prepare` — bake the box image on a remote engine.\n * - `baseFingerprint` — the docker build-context sha, so the CLI's\n * \"your base is stale\" nag works the same way it does locally.\n */\n\nimport type { BoxRecord, Provider, ProviderCheckpoint } from '@agentbox/core';\nimport {\n createCloudProvider,\n currentCloudBaseFingerprint,\n listCloudCheckpoints,\n removeCloudCheckpointDir,\n resolveCloudCheckpoint,\n writeCloudCheckpointManifest,\n} from '@agentbox/sandbox-cloud';\nimport { hashProjectPath, sanitizeMnemonic } from '@agentbox/config';\nimport { readCliStamp, type ProviderModule } from '@agentbox/sandbox-core';\nimport { basename } from 'node:path';\nimport { BACKEND_NAME, makeSnapshotName, remoteDockerBackend } from './backend.js';\nimport { buildRemoteDockerAttach } from './build-attach.js';\nimport { resolveBoxSshTarget } from './box-ssh.js';\nimport { currentContextSha } from './image.js';\nimport { prepareRemoteDocker } from './prepare.js';\nimport { parseSandboxId } from './target.js';\nimport { doctorChecks } from './provider-module.js';\n\nconst cloudProvider = createCloudProvider(remoteDockerBackend, {\n // Empty on purpose. The cloud default (2 cpu / 4 GB) would silently cap a box\n // on a 32-core workstation; a remote engine is the user's own machine, so a\n // box is unlimited unless `--size` says otherwise — the same deal the local\n // docker provider offers.\n defaultResources: {},\n launchDockerd: true,\n});\n\n/** The docker image a checkpoint commits to on the remote engine. */\nfunction checkpointImageRef(projectRoot: string, name: string): string {\n const mnemonic = sanitizeMnemonic(basename(projectRoot));\n return `agentbox-ckpt-${hashProjectPath(projectRoot)}_${mnemonic}:${name}`;\n}\n\nconst remoteDockerCheckpoint: ProviderCheckpoint = {\n async create(box: BoxRecord, name: string) {\n if (!box.projectRoot) {\n throw new Error(\n 'checkpoint requires the box to have a project root (run `agentbox checkpoint` from inside the project)',\n );\n }\n const sandboxId = box.cloud?.sandboxId;\n if (!sandboxId) {\n throw new Error(`remote-docker box ${box.name} has no sandboxId — record is malformed`);\n }\n const { target } = parseSandboxId(sandboxId);\n const snapshotName = makeSnapshotName(target.spec, checkpointImageRef(box.projectRoot, name));\n await remoteDockerBackend.createSnapshot?.({ sandboxId }, snapshotName);\n\n const info = await writeCloudCheckpointManifest(box.projectRoot, BACKEND_NAME, name, {\n snapshotName,\n sourceBoxId: box.id,\n sourceBoxName: box.name,\n baseProvider: BACKEND_NAME,\n baseFingerprint: currentCloudBaseFingerprint(BACKEND_NAME),\n cliVersion: readCliStamp().cliVersion,\n });\n return { ref: info.name };\n },\n\n async list(projectRoot: string) {\n const entries = await listCloudCheckpoints(projectRoot, BACKEND_NAME);\n return entries.map((e) => ({ ref: e.name, createdAt: e.manifest.createdAt }));\n },\n\n async remove(projectRoot: string, ref: string) {\n const entry = await resolveCloudCheckpoint(projectRoot, BACKEND_NAME, ref);\n if (!entry) return;\n await remoteDockerBackend.deleteSnapshot?.(entry.manifest.snapshotName);\n await removeCloudCheckpointDir(projectRoot, BACKEND_NAME, ref);\n },\n};\n\nexport const remoteDockerProvider: Provider = {\n ...cloudProvider,\n buildAttach: buildRemoteDockerAttach,\n // The box's own sshd, reached by jumping through the engine — see box-ssh.ts.\n // Supplying this is what lets `open` / `code` / `connect` treat a remote-docker\n // box like any other SSH-capable box, without the scaffold having to guess a\n // target out of an attach argv that points at the engine rather than the box.\n sshTarget: resolveBoxSshTarget,\n checkpoint: remoteDockerCheckpoint,\n prepare: prepareRemoteDocker,\n baseFingerprint: async () => (await currentContextSha()) ?? undefined,\n};\n\n/** Uniform surface the CLI provider loader resolves this package through. */\nexport const providerModule: ProviderModule = {\n provider: remoteDockerProvider,\n backend: remoteDockerBackend,\n currentBaseFingerprintLive: async () => (await currentContextSha()) ?? undefined,\n doctorChecks,\n};\n\nexport { remoteDockerBackend, BACKEND_NAME, listOnHost } from './backend.js';\nexport { probeRemoteEngine } from './remote-docker.js';\nexport { parseRemoteTarget, parseSandboxId } from './target.js';\nexport { interactiveRegisterHost } from './host-setup.js';\nexport {\n isValidAlias,\n readHostsRegistry,\n getHostAlias,\n getHostConnection,\n hostKeyDir,\n listHostAliases,\n upsertHostAlias,\n removeHostAlias,\n type RemoteHostConnection,\n type RemoteHostEntry,\n} from './hosts-registry.js';\nexport { readPreparedState, removePreparedHost } from './prepared-state.js';\nexport {\n setRemoteHostSharer,\n setRemoteHostBaker,\n type RemoteHostSharer,\n type RemoteHostBaker,\n} from './share-hook.js';\n","/**\n * `remoteDockerBackend` — a `CloudBackend` whose \"sandbox\" is a container on a\n * remote machine's Docker engine, reached over one SSH ControlMaster per box.\n *\n * It is a cloud backend, not a second docker provider, and that is the whole\n * design. The docker provider's core mechanism — bind-mounting the host's\n * `.git/` into the container so in-box commits land in the host repo with zero\n * sync — cannot cross a network. Everything that follows from that (the ctl\n * unix socket on a host path, `-p 127.0.0.1:…` on the *local* loopback,\n * `host.docker.internal` reaching the laptop's relay) is equally local-only.\n *\n * The cloud scaffold already solved all of it: `seedCloudWorkspace` syncs the\n * workspace as a shallow clone + carried-over stash/untracked, the in-box relay\n * on :8788 is long-polled by the host `CloudBoxPoller`, and `git push` travels\n * back as a bundle. So we implement the ~14 `CloudBackend` primitives in terms\n * of `docker` over SSH and inherit the rest.\n *\n * What stays docker-shaped: the image (a real Dockerfile build), checkpoints\n * (`docker commit`), nested containers (DinD, same caps as the local provider),\n * and pause (`docker pause`, a true freeze rather than a snapshot).\n */\n\nimport { createReadStream, createWriteStream } from 'node:fs';\nimport { mkdir } from 'node:fs/promises';\nimport { dirname } from 'node:path';\nimport type {\n CloudBackend,\n CloudExecOptions,\n CloudExecResult,\n CloudFileEntry,\n CloudHandle,\n CloudPreviewUrl,\n CloudProvisionRequest,\n CloudSandboxSummary,\n CloudState,\n} from '@agentbox/core';\nimport { loadEffectiveConfig } from '@agentbox/config';\nimport { CLOUD_VNC_PORT, CLOUD_WEB_PROXY_PORT, bashScript } from '@agentbox/sandbox-cloud';\nimport { readState, sshExec, type SshTargetArgs } from '@agentbox/sandbox-core';\nimport { isMissingDockerInit, MISSING_DOCKER_INIT_WARNING } from '@agentbox/sandbox-docker';\nimport { ensureRemoteImage } from './image.js';\nimport {\n CONTAINER_USER,\n dockerExecArgv,\n dockerOnRemote,\n dockerOnRemoteOrThrow,\n ensureTunnel,\n pipeFileFromContainer,\n pipeFileIntoContainer,\n refreshTunnel,\n tunnels,\n} from './remote-docker.js';\nimport {\n containerNameFor,\n makeSandboxId,\n parseRemoteTarget,\n parseSandboxId,\n type RemoteTarget,\n} from './target.js';\nimport { requireHostAlias } from './hosts-registry.js';\n\nexport const BACKEND_NAME = 'remote-docker';\n\n/**\n * A checkpoint is a `docker commit` on ONE engine — the image never leaves it —\n * so the snapshot name has to carry the host as well as the image ref:\n *\n * \"<ssh-destination>#<docker-image-ref>\"\n * e.g. \"dev@10.0.0.9:2222#agentbox-ckpt-9f2a_myrepo:setup\"\n *\n * `deleteSnapshot` and `snapshotExists` are handed nothing but this string (no\n * `CloudHandle`), so without the host they could not find the image at all. It\n * cannot go in the docker ref itself: a ref admits neither `@` nor `:` outside\n * the tag, and an ssh destination is full of both. `#` never appears in either\n * half, so it is an unambiguous separator.\n *\n * Nothing outside this package interprets the string — the `CloudBackend`\n * contract treats it as opaque, round-tripping it from `createSnapshot` through\n * the manifest to `provision({ snapshot })`.\n */\nconst SNAPSHOT_SEP = '#';\n\nexport interface ParsedSnapshot {\n host: string;\n imageRef: string;\n}\n\nexport function makeSnapshotName(host: string, imageRef: string): string {\n return `${host}${SNAPSHOT_SEP}${imageRef}`;\n}\n\nexport function parseSnapshotName(snapshotName: string): ParsedSnapshot {\n const sep = snapshotName.indexOf(SNAPSHOT_SEP);\n if (sep <= 0 || sep === snapshotName.length - 1) {\n throw new Error(\n `remote-docker: malformed snapshot name \"${snapshotName}\" — expected \"<ssh-destination>#<image-ref>\"`,\n );\n }\n return {\n host: snapshotName.slice(0, sep),\n imageRef: snapshotName.slice(sep + 1),\n };\n}\n\n/**\n * Tunnel id for a host-scoped (rather than box-scoped) connection — the image\n * ops, which act on an engine rather than a container.\n */\nfunction snapshotTunnelId(host: string): string {\n return `engine:${host}`;\n}\n\n/** In-box relay port the host CloudBoxPoller long-polls (`/bridge/*`). */\nconst BRIDGE_PORT = 8788;\n/** The box image's always-on sshd — published so `agentbox open` / `code` work. */\nconst SSH_PORT = 22;\n\n/**\n * Ports published at `docker run`. Docker port mappings are immutable for the\n * life of a container (the same constraint Vercel has), so everything the host\n * may ever need to reach must be listed at create: the WebProxy, noVNC, the\n * bridge, sshd, plus whatever `agentbox.yaml` exposes.\n */\nfunction portsToPublish(exposePorts: number[] | undefined): number[] {\n const base = [CLOUD_WEB_PROXY_PORT, CLOUD_VNC_PORT, BRIDGE_PORT, SSH_PORT];\n return [...new Set([...base, ...(exposePorts ?? [])])];\n}\n\ninterface Ctx {\n target: SshTargetArgs;\n remote: RemoteTarget;\n container: string;\n}\n\n/**\n * Is the remote engine itself running inside an AgentBox sandbox? Only true in\n * the agentbox-in-agentbox dev loop this repo is developed with (CLAUDE.md ->\n * \"Use Agentbox inside Agentbox\"), where the nested dockerd lacks the\n * capabilities a normal engine has. `/etc/agentbox/box.env` is written into\n * every box by the create path, so its presence is the box's own identity file.\n */\nasync function remoteIsNested(target: SshTargetArgs): Promise<boolean> {\n const res = await sshExec(target, 'test -f /etc/agentbox/box.env');\n return res.exitCode === 0;\n}\n\n/** Resolve a handle into a live SSH connection + the container it names. */\nasync function ctxFor(h: CloudHandle): Promise<Ctx> {\n const { target: remote, container } = parseSandboxId(h.sandboxId);\n const target = await ensureTunnel(h.sandboxId, remote);\n return { target, remote, container };\n}\n\n/** `docker inspect` state string -> the provider-neutral CloudState. */\nexport function mapDockerState(status: string): CloudState {\n switch (status.trim()) {\n case 'running':\n return 'running';\n case 'paused':\n return 'paused';\n case 'created':\n case 'exited':\n case 'dead':\n case 'restarting':\n case 'removing':\n return 'stopped';\n default:\n return 'missing';\n }\n}\n\n/**\n * `docker port <c> <p>` -> the ephemeral port docker bound on the remote's\n * loopback. Its output is `127.0.0.1:49153` (possibly several lines, one per\n * binding); we take the first with a port.\n */\nexport function parseDockerPort(stdout: string): number | null {\n for (const line of stdout.split(/\\r?\\n/)) {\n const m = /:(\\d+)\\s*$/.exec(line.trim());\n if (m?.[1]) {\n const port = Number.parseInt(m[1], 10);\n if (Number.isFinite(port) && port > 0) return port;\n }\n }\n return null;\n}\n\n/** Parse `--size` as `cpu-memory` GB (e2b's spec shape). */\nexport function parseSize(size: string | undefined): { cpu?: number; memory?: number } {\n if (!size) return {};\n const m = /^(\\d+)(?:-(\\d+))?$/.exec(size.trim());\n if (!m?.[1]) return {};\n const cpu = Number.parseInt(m[1], 10);\n const memory = m[2] ? Number.parseInt(m[2], 10) : undefined;\n return { cpu, ...(memory !== undefined ? { memory } : {}) };\n}\n\n/**\n * The `docker run` argv for a box. Mirrors the local provider's `runBox` flags\n * — the cap/security/cgroup set is what makes the in-box dockerd work, and the\n * two must not drift.\n */\nexport function buildRunArgv(opts: {\n container: string;\n image: string;\n env: Record<string, string>;\n ports: number[];\n dockerVolume: string;\n cpu?: number;\n memory?: number;\n /** The remote engine is itself inside an AgentBox sandbox — see `remoteIsNested`. */\n nestedEngine?: boolean;\n /** `false` only as the fallback for an engine with no `docker-init`. */\n init?: boolean;\n}): string[] {\n const argv = [\n 'run',\n '-d',\n '--name',\n opts.container,\n '--hostname',\n opts.container,\n // The in-box dockerd needs these: SYS_ADMIN to `mount -t overlay` for\n // overlay2, NET_ADMIN for its bridge + iptables NAT, /dev/fuse +\n // apparmor:unconfined for the fuse-overlayfs fallback, seccomp:unconfined\n // because the default profile blocks syscalls nested containers need, and a\n // private cgroup namespace so runc can create its own slice. Same set as\n // the local docker provider; we still avoid --privileged.\n '--cap-add=SYS_ADMIN',\n '--cap-add=NET_ADMIN',\n // Inner dockerd bind-mounts /proc/<pid>/ns/net of a non-root container init, which needs PTRACE_MODE_READ.\n '--cap-add=SYS_PTRACE',\n '--device=/dev/fuse',\n '--security-opt=apparmor:unconfined',\n '--security-opt=seccomp=unconfined',\n '--cgroupns=private',\n ];\n // tini as PID 1 reaps orphaned processes; `sleep infinity` alone never does.\n if (opts.init !== false) argv.push('--init');\n if (opts.nestedEngine) {\n // The engine is itself inside an AgentBox sandbox, which may have no\n // CAP_SYS_PTRACE (boxes created before #396 lack it, as can a third-party\n // sandbox). Its dockerd then cannot bind-mount /proc/<pid>/ns/net\n // for a container whose init runs as a different uid than the daemon —\n // and the box image's default USER is vscode (1000), so `docker run` dies\n // with \"bind-mount /proc/N/ns/net: permission denied\". Forcing init to uid 0\n // makes its /proc readable by the daemon and netns setup succeeds.\n //\n // The local docker provider does the same thing (see `runBox`), but keys it\n // off ITS OWN `AGENTBOX=1`. Here that would be the wrong signal: the CLI can\n // run inside a box while the engine sits on a real machine that has no such\n // limitation. What matters is whether the ENGINE is nested, so we ask it.\n argv.push('--user', '0');\n }\n if (opts.cpu) argv.push('--cpus', String(opts.cpu));\n if (opts.memory) argv.push('--memory', `${String(opts.memory)}g`);\n // /var/lib/docker on a volume, not the container layer: without it, every\n // image the agent pulls inside the box would be captured by `docker commit`\n // and bloat each checkpoint.\n argv.push('-v', `${opts.dockerVolume}:/var/lib/docker`);\n for (const port of opts.ports) {\n // Bind the REMOTE's loopback only: the box is reached through the SSH\n // tunnel, so there is no reason to expose it on the remote's LAN.\n argv.push('-p', `127.0.0.1:0:${String(port)}`);\n }\n for (const [k, v] of Object.entries(opts.env)) {\n argv.push('-e', `${k}=${v}`);\n }\n argv.push(opts.image, 'sleep', 'infinity');\n return argv;\n}\n\nexport const remoteDockerBackend: CloudBackend = {\n name: BACKEND_NAME,\n // `prepare` here builds only the shared agentless image on the remote engine,\n // never the host's agent config, so every create seeds it.\n seedsAgentStaticAtCreate: true,\n\n async provision(req: CloudProvisionRequest): Promise<CloudHandle> {\n const log = req.onLog ?? ((): void => {});\n // The SSH destination is resolved by the CLI (`docker:<host>` /\n // --remote-host / box.remoteDockerHost) and threaded through providerOptions.\n const spec = (req.host ?? '').trim();\n if (!spec) {\n throw new Error(\n 'remote-docker: no host. Register one with `agentbox remote-docker add <alias> <[user@]host[:port]>`, then use `agentbox docker:<alias> …` / `--remote-host <alias>` / `box.remoteDockerHost`.',\n );\n }\n // Alias-only: the box is created against a registered alias, and its sandbox\n // id bakes that alias. `requireHostAlias` fails fast (before any remote work)\n // if the reference isn't registered.\n requireHostAlias(spec);\n const remote = parseRemoteTarget(spec);\n const container = containerNameFor(req.name);\n const sandboxId = makeSandboxId(remote.spec, container);\n const target = await ensureTunnel(sandboxId, remote);\n\n // A checkpoint is a `docker commit`ed image on THIS engine; otherwise ensure\n // the fingerprint-tagged base image is present (pull, else build).\n let image: string;\n if (req.snapshot) {\n const snap = parseSnapshotName(req.snapshot);\n // A checkpoint cannot follow you to another machine: the image lives on\n // the engine that committed it. Read as \"gone\" rather than erroring, so\n // the scaffold prunes the dangling manifest and builds a fresh box.\n if (snap.host !== remote.spec) {\n throw new Error(\n `snapshot expired or deleted: it was captured on ${snap.host}, not ${remote.spec} (a remote-docker checkpoint is local to its engine)`,\n );\n }\n image = snap.imageRef;\n const probe = await dockerOnRemote(target, ['image', 'inspect', image]);\n if (probe.exitCode !== 0) {\n // Same contract as the other clouds: a vanished snapshot must read as\n // \"gone\" so the scaffold prunes the manifest and re-provisions from base.\n throw new Error(`snapshot expired or deleted: ${image} is not on ${remote.spec}`);\n }\n } else {\n const ensured = await ensureRemoteImage(target, {\n imageRef: req.image && req.image !== 'agentbox/box:dev' ? req.image : undefined,\n onLog: log,\n });\n image = ensured.ref;\n }\n\n const { cpu, memory } = parseSize(req.size);\n const dockerVolume = `agentbox-docker-${container}`;\n await dockerOnRemoteOrThrow(target, ['volume', 'create', dockerVolume]);\n\n const nestedEngine = await remoteIsNested(target);\n if (nestedEngine) {\n log('[provision] remote engine is itself an AgentBox box — running the box init as root');\n }\n\n const runOpts = {\n container,\n image,\n env: req.env ?? {},\n ports: portsToPublish(req.exposePorts),\n dockerVolume,\n nestedEngine,\n ...(cpu !== undefined ? { cpu } : {}),\n ...(memory !== undefined ? { memory } : {}),\n };\n log(`[provision] docker run ${container} on ${remote.spec}`);\n try {\n await dockerOnRemoteOrThrow(target, buildRunArgv(runOpts), { timeoutMs: 300_000 });\n } catch (err) {\n if (!isMissingDockerInit(String(err))) throw err;\n // The failed run leaves the named container behind in `Created` state.\n await dockerOnRemote(target, ['rm', '-f', container]);\n log(`[provision] ${MISSING_DOCKER_INIT_WARNING}`);\n await dockerOnRemoteOrThrow(target, buildRunArgv({ ...runOpts, init: false }), {\n timeoutMs: 300_000,\n });\n }\n\n return {\n sandboxId,\n resources: {\n ...(cpu !== undefined ? { cpu } : {}),\n ...(memory !== undefined ? { memory } : {}),\n },\n };\n },\n\n async get(sandboxId: string): Promise<CloudHandle | null> {\n let ctx: Ctx;\n try {\n ctx = await ctxFor({ sandboxId });\n } catch {\n return null;\n }\n const res = await dockerOnRemote(ctx.target, [\n 'inspect',\n '-f',\n '{{.State.Status}}',\n ctx.container,\n ]);\n return res.exitCode === 0 ? { sandboxId } : null;\n },\n\n /**\n * Every other cloud can ask its API \"what sandboxes exist?\". Here there is no\n * API and no registry of engines — a machine only becomes ours by being named\n * in a box record or in `box.remoteDockerHost`. So enumeration means: work out\n * which engines we have ever used, and ask each of them. An engine that has\n * gone away is skipped rather than fatal, since prune must still report on the\n * ones that answer.\n */\n async list(): Promise<CloudSandboxSummary[]> {\n const hosts = await knownHosts();\n const out: CloudSandboxSummary[] = [];\n for (const host of hosts) {\n try {\n out.push(...(await listOnHost(host)));\n } catch {\n // unreachable engine — nothing to report from it\n }\n }\n return out;\n },\n\n async start(h): Promise<void> {\n const ctx = await ctxFor(h);\n await dockerOnRemoteOrThrow(ctx.target, ['start', ctx.container], { timeoutMs: 120_000 });\n },\n\n async stop(h): Promise<void> {\n const ctx = await ctxFor(h);\n await dockerOnRemoteOrThrow(ctx.target, ['stop', ctx.container], { timeoutMs: 120_000 });\n },\n\n /**\n * A true freeze (SIGSTOP-equivalent via the freezer cgroup), not cold storage:\n * the container keeps its memory and its published ports, so resume is instant\n * and the forwarded ports stay valid.\n */\n async pause(h): Promise<void> {\n const ctx = await ctxFor(h);\n const state = await currentState(ctx);\n if (state !== 'running') return;\n await dockerOnRemoteOrThrow(ctx.target, ['pause', ctx.container]);\n },\n\n async resume(h): Promise<void> {\n const ctx = await ctxFor(h);\n const state = await currentState(ctx);\n if (state === 'paused') {\n await dockerOnRemoteOrThrow(ctx.target, ['unpause', ctx.container]);\n return;\n }\n if (state !== 'running') {\n await dockerOnRemoteOrThrow(ctx.target, ['start', ctx.container], { timeoutMs: 120_000 });\n }\n },\n\n async destroy(h): Promise<void> {\n const ctx = await ctxFor(h);\n // Idempotent: `rm -f` on a missing container is a no-op we tolerate, since\n // destroy must converge even after a partially-failed create.\n await dockerOnRemote(ctx.target, ['rm', '-f', ctx.container], { timeoutMs: 120_000 });\n await dockerOnRemote(ctx.target, ['volume', 'rm', '-f', `agentbox-docker-${ctx.container}`]);\n await tunnels.close(h.sandboxId);\n },\n\n async state(h): Promise<CloudState> {\n let ctx: Ctx;\n try {\n ctx = await ctxFor(h);\n } catch {\n // Unreachable host — the box may well be fine, but we cannot see it.\n return 'missing';\n }\n return currentState(ctx);\n },\n\n async exec(h, cmd: string, opts: CloudExecOptions = {}): Promise<CloudExecResult> {\n const ctx = await ctxFor(h);\n const argv = dockerExecArgv(ctx.container, cmd, {\n user: opts.user ?? CONTAINER_USER,\n ...(opts.cwd ? { cwd: opts.cwd } : {}),\n ...(opts.env ? { env: opts.env } : {}),\n });\n const res = await dockerOnRemote(ctx.target, argv, {\n timeoutMs: opts.attemptTimeoutMs ?? 300_000,\n });\n return { exitCode: res.exitCode, stdout: res.stdout, stderr: res.stderr };\n },\n\n async uploadFile(h, localPath: string, remotePath: string): Promise<void> {\n const ctx = await ctxFor(h);\n // The seed tars land in /tmp before an in-box extract; make sure the parent\n // exists, since `cat >` won't create it.\n await dockerOnRemote(\n ctx.target,\n dockerExecArgv(ctx.container, bashScript(`mkdir -p ${shellDir(remotePath)}`), {\n user: 'root',\n }),\n );\n await pipeFileIntoContainer(ctx.target, ctx.container, createReadStream(localPath), remotePath);\n },\n\n async downloadFile(h, remotePath: string, localPath: string): Promise<void> {\n const ctx = await ctxFor(h);\n await mkdir(dirname(localPath), { recursive: true });\n await pipeFileFromContainer(\n ctx.target,\n ctx.container,\n remotePath,\n createWriteStream(localPath),\n );\n },\n\n async listFiles(h, remoteDir: string): Promise<CloudFileEntry[]> {\n const ctx = await ctxFor(h);\n const res = await dockerOnRemote(\n ctx.target,\n dockerExecArgv(\n ctx.container,\n `find ${quote(remoteDir)} -mindepth 1 -maxdepth 1 -printf '%f\\\\t%y\\\\n'`,\n ),\n );\n if (res.exitCode !== 0) return [];\n const out: CloudFileEntry[] = [];\n for (const line of res.stdout.split(/\\r?\\n/)) {\n const [name, kind] = line.split('\\t');\n if (name) out.push({ name, isDir: kind === 'd' });\n }\n return out;\n },\n\n /**\n * The container's port is published on the REMOTE's loopback; we forward that\n * to a free local port over the box's ControlMaster. So the URL is always\n * `http://127.0.0.1:<local>` — reachable from the host browser and from the\n * host relay's poller alike.\n */\n async previewUrl(h, port: number): Promise<CloudPreviewUrl> {\n const ctx = await ctxFor(h);\n const remotePort = await publishedPort(ctx, port);\n const localPort = await tunnels.forward(h.sandboxId, remotePort);\n return { url: `http://127.0.0.1:${String(localPort)}` };\n },\n\n /** SSH is already the auth gate, so a \"signed\" URL is just the tunneled one. */\n async signedPreviewUrl(h, port: number): Promise<CloudPreviewUrl> {\n return remoteDockerBackend.previewUrl(h, port);\n },\n\n /**\n * The poller calls this when the local port stops answering — typically a\n * ControlMaster that died across a host sleep/wake. Re-open the master AND\n * re-read `docker port`: a container restart reassigns the remote's ephemeral\n * port, so a forward to the old one would connect to nothing.\n */\n async refreshPreviewUrl(h, port: number): Promise<CloudPreviewUrl> {\n const { target: remote } = parseSandboxId(h.sandboxId);\n await refreshTunnel(h.sandboxId, remote);\n return remoteDockerBackend.previewUrl(h, port);\n },\n\n async createSnapshot(h, snapshotName: string): Promise<void> {\n const ctx = await ctxFor(h);\n const snap = parseSnapshotName(snapshotName);\n await dockerOnRemoteOrThrow(ctx.target, ['commit', ctx.container, snap.imageRef], {\n timeoutMs: 600_000,\n });\n },\n\n async deleteSnapshot(snapshotName: string): Promise<void> {\n const snap = parseSnapshotName(snapshotName);\n try {\n const target = await ensureTunnel(snapshotTunnelId(snap.host), parseRemoteTarget(snap.host));\n await dockerOnRemote(target, ['image', 'rm', '-f', snap.imageRef]);\n } catch {\n // Unreachable host or already gone — best-effort, matching the other\n // clouds: the caller drops the local manifest either way.\n }\n },\n\n async snapshotExists(snapshotName: string): Promise<boolean> {\n let snap: ParsedSnapshot;\n try {\n snap = parseSnapshotName(snapshotName);\n } catch {\n return false;\n }\n try {\n const target = await ensureTunnel(snapshotTunnelId(snap.host), parseRemoteTarget(snap.host));\n const res = await dockerOnRemote(target, ['image', 'inspect', snap.imageRef]);\n return res.exitCode === 0;\n } catch {\n // Contract: must never throw. An unreachable engine reads as \"not\n // bootable\", which is the truth from here.\n return false;\n }\n },\n};\n\n/**\n * Engines this machine has used: every host named by a remote-docker box record,\n * plus the configured default. Deduped, order-stable.\n */\nasync function knownHosts(): Promise<string[]> {\n const hosts = new Set<string>();\n try {\n const state = await readState();\n for (const box of state.boxes) {\n if (box.provider !== BACKEND_NAME || !box.cloud?.sandboxId) continue;\n try {\n hosts.add(parseSandboxId(box.cloud.sandboxId).target.spec);\n } catch {\n // a malformed id names no engine we could ask\n }\n }\n } catch {\n // no state yet\n }\n try {\n const cfg = await loadEffectiveConfig(process.cwd());\n const dflt = (cfg.effective.box.remoteDockerHost || '').trim();\n if (dflt) hosts.add(dflt);\n } catch {\n // no config — the box records are all we have\n }\n return [...hosts];\n}\n\n/** List agentbox containers on one remote engine — the host-scoped `list()`. */\nexport async function listOnHost(spec: string): Promise<CloudSandboxSummary[]> {\n const remote = parseRemoteTarget(spec);\n const target = await ensureTunnel(`list:${remote.spec}`, remote);\n const res = await dockerOnRemote(target, [\n 'ps',\n '-a',\n '--filter',\n 'name=agentbox-',\n '--format',\n '{{.Names}}\\t{{.State}}\\t{{.CreatedAt}}',\n ]);\n if (res.exitCode !== 0) return [];\n const out: CloudSandboxSummary[] = [];\n for (const line of res.stdout.split(/\\r?\\n/)) {\n const [name, state, createdAt] = line.split('\\t');\n if (!name) continue;\n out.push({\n sandboxId: makeSandboxId(remote.spec, name),\n name,\n ...(createdAt ? { createdAt } : {}),\n state: mapDockerState(state ?? ''),\n });\n }\n return out;\n}\n\nasync function currentState(ctx: Ctx): Promise<CloudState> {\n const res = await dockerOnRemote(ctx.target, [\n 'inspect',\n '-f',\n '{{.State.Status}}',\n ctx.container,\n ]);\n if (res.exitCode !== 0) return 'missing';\n return mapDockerState(res.stdout);\n}\n\nasync function publishedPort(ctx: Ctx, containerPort: number): Promise<number> {\n const res = await dockerOnRemote(ctx.target, ['port', ctx.container, String(containerPort)]);\n const port = res.exitCode === 0 ? parseDockerPort(res.stdout) : null;\n if (port === null) {\n throw new Error(\n `remote-docker: container port ${String(containerPort)} is not published on ${ctx.container}. ` +\n 'Docker port mappings are fixed at create — a service exposed after the box was made is only ' +\n 'reachable through the :80 WebProxy until the box is recreated.',\n );\n }\n return port;\n}\n\nfunction shellDir(path: string): string {\n const slash = path.lastIndexOf('/');\n return quote(slash > 0 ? path.slice(0, slash) : '/');\n}\n\nfunction quote(s: string): string {\n return `'${s.replace(/'/g, \"'\\\\''\")}'`;\n}\n","/**\n * `buildRemoteDockerAttach` — this provider's override of `Provider.buildAttach`.\n *\n * The cloud scaffold's default appends the inner command to the backend's\n * `attachArgv`, which for an SSH backend lands it on the *host* it connects to.\n * For hetzner that host IS the box. Here it is the machine running the engine —\n * the box is a container on it — so the inner command has to be wrapped in a\n * `docker exec` before it crosses the wire. Hence a full override (the same\n * pattern vercel and e2b use for their non-SSH attaches).\n *\n * The result is a plain `ssh … -t 'docker exec -it … bash -lc <tmux>'`, so the\n * CLI's PTY wrapper drives it exactly like any other provider's attach.\n */\n\nimport type { AttachKind, AttachSpec, BoxRecord, BuildAttachOptions } from '@agentbox/core';\nimport {\n hostTermForCloud,\n quoteShellArg,\n quoteShellArgv,\n renderInnerCommand,\n} from '@agentbox/sandbox-cloud';\nimport { sshDestination, sshOptArgs } from '@agentbox/sandbox-core';\nimport { ensureTunnel, loginShell } from './remote-docker.js';\nimport { parseSandboxId } from './target.js';\n\nconst CONTAINER_USER = 'vscode';\n\nexport async function buildRemoteDockerAttach(\n box: BoxRecord,\n kind: AttachKind,\n opts: BuildAttachOptions = {},\n): Promise<AttachSpec> {\n const sandboxId = box.cloud?.sandboxId;\n if (!sandboxId) {\n throw new Error(`remote-docker box ${box.name} has no sandboxId — record is malformed`);\n }\n const { target: remote, container } = parseSandboxId(sandboxId);\n const target = await ensureTunnel(sandboxId, remote);\n\n // The tmux session bring-up + attach, identical to every other cloud box.\n const inner = renderInnerCommand(kind, opts);\n const dockerArgv = [\n 'exec',\n // `detached` only creates the session, so it needs no TTY — and asking for\n // one would make docker fail when the CLI runs it without a terminal.\n ...(opts.detached ? ['-i'] : ['-it']),\n '-u',\n opts.user ?? CONTAINER_USER,\n '-e',\n `TERM=${hostTermForCloud()}`,\n container,\n 'bash',\n '-lc',\n inner,\n ];\n // Wrap in a LOGIN shell for the same reason every other remote invocation does\n // (see `loginShell` in ./remote-docker.ts): ssh runs this string in the remote\n // user's NON-login shell, where `docker` is often not on PATH (Docker Desktop\n // in /usr/local/bin, OrbStack in ~/.orbstack/bin). `bash -lc` sources the\n // profile so `docker` resolves. The `-t` PTY flows through bash into `docker\n // exec -it` unchanged.\n const remoteCommand = loginShell(`docker ${quoteShellArgv(dockerArgv)}`);\n\n const argv = [\n 'ssh',\n ...sshOptArgs(target),\n // -t forces TTY allocation through ssh; without it tmux and readline break.\n ...(opts.detached ? [] : ['-t']),\n sshDestination(target),\n // One argv element: ssh hands the string to the remote login shell, which\n // re-parses it — so the docker argv is quoted, not concatenated.\n remoteCommand,\n ];\n return { argv };\n}\n\n/** Exposed for the unit test — the quoting is the part worth pinning down. */\nexport const _internal = { quoteShellArg };\n","/**\n * Making the BOX (not the engine) reachable over SSH, so `agentbox open`\n * (sshfs), `agentbox code` (Remote-SSH) and `agentbox connect` work exactly as\n * they do for every other provider.\n *\n * The box is a container on someone else's machine, and its sshd is published\n * on THAT machine's loopback (`-p 127.0.0.1:0:22`). So there is no host:port a\n * local ssh could dial directly. The answer is `ProxyJump`: ssh connects to the\n * engine's machine, and the engine dials `127.0.0.1:<published port>` on our\n * behalf — which is precisely the address the box's sshd is listening on from\n * where the jump host stands.\n *\n * Host agentbox-<box>\n * HostName 127.0.0.1 # as resolved ON the jump host\n * Port <published>\n * User vscode\n * ProxyJump <engine> # the ssh destination the box lives on\n * IdentityFile ~/.agentbox/remote-docker/boxes/<id>/ssh/id_ed25519\n *\n * No `ssh -L` forward is involved: ssh's own transport does the hop, so the\n * alias keeps working in any process (VS Code, sshfs) without AgentBox having\n * to hold a tunnel open for it.\n *\n * The private key never leaves the host. The public half is installed into the\n * box's `authorized_keys` over the ControlMaster we already have.\n */\n\nimport type { BoxRecord, SshTargetRecord } from '@agentbox/core';\nimport { bashScript, quoteShellArg } from '@agentbox/sandbox-cloud';\nimport { defaultBoxSshDir, mintSshKey } from '@agentbox/sandbox-core';\nimport { CONTAINER_USER, dockerExecArgv, dockerOnRemote, ensureTunnel } from './remote-docker.js';\nimport { resolveConnection } from './hosts-registry.js';\nimport { parseSandboxId } from './target.js';\nimport { parseDockerPort } from './backend.js';\n\n/** The box image's sshd listens here; we publish it on the engine's loopback. */\nconst SSH_CONTAINER_PORT = 22;\n\n/**\n * Bring the box's sshd up, make sure it trusts this host's per-box key, and\n * return the connection target. Idempotent — safe to call on every start: the\n * key is reused when present, `authorized_keys` is only appended to when the key\n * isn't already there, and sshd is only launched if it isn't already listening.\n *\n * Returns null (rather than throwing) when sshd doesn't come up, so a failure\n * here degrades `open`/`code` instead of breaking the lifecycle command that\n * triggered it.\n */\nexport async function resolveBoxSshTarget(box: BoxRecord): Promise<SshTargetRecord | null> {\n const sandboxId = box.cloud?.sandboxId;\n if (!sandboxId) return null;\n const { target: remote, container } = parseSandboxId(sandboxId);\n const conn = await ensureTunnel(sandboxId, remote);\n\n const key = await mintSshKey(\n defaultBoxSshDir(sandboxId, 'remote-docker'),\n `agentbox-${box.name}`,\n );\n\n // Install the public key. `grep -q` first so a restart doesn't grow the file\n // without bound. Runs as root because on a nested engine the container's init\n // is uid 0 and ~vscode/.ssh may not exist yet; the chown puts it back.\n const install = [\n `install -d -m 700 -o ${CONTAINER_USER} -g ${CONTAINER_USER} /home/${CONTAINER_USER}/.ssh`,\n `touch /home/${CONTAINER_USER}/.ssh/authorized_keys`,\n `grep -qF ${quoteShellArg(key.publicKey)} /home/${CONTAINER_USER}/.ssh/authorized_keys || echo ${quoteShellArg(key.publicKey)} >> /home/${CONTAINER_USER}/.ssh/authorized_keys`,\n `chown -R ${CONTAINER_USER}:${CONTAINER_USER} /home/${CONTAINER_USER}/.ssh`,\n `chmod 600 /home/${CONTAINER_USER}/.ssh/authorized_keys`,\n ].join(' && ');\n const installRes = await dockerOnRemote(\n conn,\n dockerExecArgv(container, bashScript(install), { user: 'root' }),\n );\n if (installRes.exitCode !== 0) return null;\n\n // Start sshd (the image ships `agentbox-sshd-start`, which manages the host\n // keys and /run/sshd). Idempotent, and a no-op when it's already listening.\n await dockerOnRemote(\n conn,\n dockerExecArgv(container, bashScript('/usr/local/bin/agentbox-sshd-start'), {\n user: 'root',\n }),\n { timeoutMs: 60_000 },\n );\n\n // The port docker published on the ENGINE's loopback. Re-read every time: it\n // is ephemeral and gets reassigned whenever the container restarts.\n const portRes = await dockerOnRemote(conn, ['port', container, String(SSH_CONTAINER_PORT)]);\n const port = portRes.exitCode === 0 ? parseDockerPort(portRes.stdout) : null;\n if (port === null) return null;\n\n return {\n // Resolved on the jump host, not here.\n host: '127.0.0.1',\n port,\n user: CONTAINER_USER,\n identityFile: key.privatePath,\n // The box id bakes an alias; ssh on THIS host can't resolve an AgentBox\n // alias, so the ProxyJump must be the alias's real connection string.\n proxyJump: resolveConnection(remote.spec),\n };\n}\n","/**\n * Doctor probes for the remote-docker provider.\n *\n * There is no credential to check — the provider authenticates as you, through\n * your own `~/.ssh/config` and agent (or, for a host shared with a control box,\n * the key registered for it). What *can* be wrong is the destination:\n * unset, unreachable, or reachable but with no docker on the login-shell PATH.\n * So the checks are exactly those three, run against the configured default.\n */\n\nimport { loadEffectiveConfig } from '@agentbox/config';\nimport { detectPortless, portlessDoctorRow, portlessServiceStatus } from '@agentbox/sandbox-cloud';\nimport { errSummary, type CheckResult } from '@agentbox/sandbox-core';\nimport { probeRemoteEngine } from './remote-docker.js';\nimport { getHostAlias } from './hosts-registry.js';\nimport { readPreparedState } from './prepared-state.js';\n\n// No `readCredStatus` / `ensureCredentials` on this provider's module, and that\n// is not an omission: there is no credential to store or prompt for. The CLI\n// and the hub both feature-detect those, so they simply show no login row.\n\nexport async function doctorChecks(): Promise<CheckResult[]> {\n try {\n const cfg = await loadEffectiveConfig(process.cwd());\n const alias = (cfg.effective.box.remoteDockerHost || '').trim();\n if (!alias) {\n return [\n {\n label: 'remote engine',\n status: 'warn',\n detail: 'no default host alias set',\n hint: '`agentbox remote-docker add <alias> <[user@]host[:port]>`',\n },\n ];\n }\n // box.remoteDockerHost is an alias; resolve it through the registry.\n const entry = getHostAlias(alias);\n if (!entry) {\n return [\n {\n label: 'remote engine',\n status: 'warn',\n detail: `host alias '${alias}' is not registered`,\n hint: `\\`agentbox remote-docker add ${alias} <[user@]host[:port]>\\``,\n },\n ];\n }\n\n const probe = await probeRemoteEngine(entry.ssh);\n const engineRes: CheckResult = probe.ok\n ? {\n label: 'remote engine',\n status: 'ok',\n detail: `${alias} → ${entry.ssh} — docker ${probe.version} (${probe.os}/${probe.arch})`,\n }\n : {\n label: 'remote engine',\n status: 'fail',\n detail: probe.error ?? 'unusable',\n hint: `check that \\`ssh ${entry.ssh} true\\` works and docker is installed there`,\n };\n\n const prepared = readPreparedState();\n const baked = prepared?.hosts[alias];\n const imageRes: CheckResult = baked\n ? {\n label: 'box image',\n status: 'ok',\n detail: `${baked.imageRef} (${baked.cliVersion ?? '—'})`,\n }\n : {\n label: 'box image',\n status: 'warn',\n detail: 'not baked on this host yet',\n hint: `\\`agentbox prepare --provider docker:${alias}\\` (otherwise the first create bakes it)`,\n };\n\n // Host Portless mints the <box>.localhost alias for the SSH-forwarded port;\n // without it the box's web URL degrades to a raw loopback port.\n const portlessRes = portlessDoctorRow(await detectPortless(), await portlessServiceStatus());\n return [engineRes, imageRes, portlessRes];\n } catch (err) {\n return [{ label: 'remote engine', status: 'warn', detail: errSummary(err) }];\n }\n}\n","/**\n * Interactive host registration for the `agentbox install` wizard.\n *\n * remote-docker has no credential to log in with — what it needs instead is a\n * host: an alias name + an SSH connection string. This drives that prompt flow\n * (the interactive twin of `remote-docker add`), registers the alias, and pins it\n * as the default host so the wizard's subsequent bake step + plain `agentbox\n * claude` target it.\n *\n * Install-only on purpose: it must NOT hang off `providerModule.ensureCredentials`,\n * which `getProvider()` runs on every create AND every box lifecycle op — a prompt\n * there would fire constantly. The wizard calls this directly instead.\n */\n\nimport * as p from '@clack/prompts';\nimport { setConfigValue } from '@agentbox/config';\nimport { probeRemoteEngine } from './remote-docker.js';\nimport { shareRegisteredHost } from './share-hook.js';\nimport {\n assertValidAlias,\n getHostAlias,\n listHostAliases,\n upsertHostAlias,\n} from './hosts-registry.js';\n\n/**\n * Prompt for an alias + SSH connection, probe it, register it, and set it as the\n * default host (`box.remoteDockerHost`, global). Returns the alias, or `null` if\n * there's no TTY or the user backs out. Never throws.\n */\nexport async function interactiveRegisterHost(): Promise<string | null> {\n if (!process.stdin.isTTY) {\n p.log.warn(\n 'remote-docker needs a host — run `agentbox remote-docker add <alias> <[user@]host[:port]>` to register one',\n );\n return null;\n }\n\n const alias = await p.text({\n message: 'Name this remote host (a short alias)',\n placeholder: 'buildbox',\n validate: (value) => {\n const v = (value ?? '').trim();\n if (!v) return 'required';\n try {\n assertValidAlias(v);\n } catch (err) {\n return err instanceof Error ? err.message : String(err);\n }\n if (getHostAlias(v)) return `'${v}' is already registered`;\n return undefined;\n },\n });\n if (p.isCancel(alias)) return null;\n const name = alias.trim();\n\n // Prompt + probe in a loop so a bad connection can be corrected without\n // restarting the wizard.\n for (;;) {\n const ssh = await p.text({\n message: 'SSH connection (an ~/.ssh/config alias or [user@]host[:port])',\n placeholder: 'user@host',\n validate: (value) => ((value ?? '').trim() ? undefined : 'required'),\n });\n if (p.isCancel(ssh)) return null;\n const conn = ssh.trim();\n\n const s = p.spinner();\n s.start(`probing ${conn}`);\n const res = await probeRemoteEngine(conn);\n if (!res.ok) {\n s.stop(`${conn}: unusable`);\n p.log.error(res.error ?? 'remote engine unusable');\n const retry = await p.confirm({\n message: 'Try a different SSH connection?',\n initialValue: true,\n });\n if (p.isCancel(retry) || !retry) return null;\n continue;\n }\n s.stop(`${conn}: docker ${res.version} (${res.os}/${res.arch})`);\n\n upsertHostAlias(name, conn);\n p.log.success(`registered '${name}' → ${conn}`);\n // Machine-level default, matching how the wizard pins box.provider global.\n await setConfigValue('global', 'box.remoteDockerHost', name, process.cwd(), { raw: true });\n // A control box can't read this machine's ssh config, so hand it over now.\n await shareRegisteredHost(name);\n // With more than one host registered, remind how to target a specific one.\n const hostCount = listHostAliases().length;\n if (hostCount > 1) {\n p.log.info(\n `you have ${String(hostCount)} remote hosts — run \\`agentbox docker:${name} claude\\` to use this one`,\n );\n }\n return name;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC8BA,SAAS,YAAY,WAAW,cAAc,YAAY,qBAAqB;AAC/E,SAAS,eAAe;AACxB,SAAS,SAAS,WAAW,mBAAmB;ACXhD,SAAS,aAAAA,kBAAiB;AAC1B,SAAS,WAAAC,UAAS,YAAY;AAC9B,SAAS,aAAa;ACHtB,SAAS,wBAAwB;AACjC,SAAS,UAAU;AACnB,SAAS,cAAc;AACvB,SAAS,QAAAC,aAAY;AACrB,SAAS,SAAAC,cAAa;AHkBf,SAAS,iBAAiB,SAAyB;AACxD,SAAO,YAAY,OAAO;AAC5B;AAOO,SAAS,kBAAkB,MAA4B;AAC5D,QAAM,MAAM,KAAK,KAAK;AACtB,MAAI,IAAI,WAAW,GAAG;AACpB,UAAM,IAAI,MAAM,sCAAsC;EACxD;AACA,MAAI,IAAI,SAAS,GAAG,GAAG;AACrB,UAAM,IAAI;MACR,2CAA2C,GAAG;IAChD;EACF;AACA,QAAM,KAAK,IAAI,YAAY,GAAG;AAC9B,QAAM,OAAO,MAAM,IAAI,IAAI,MAAM,GAAG,EAAE,IAAI;AAC1C,QAAM,WAA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;EAC/D;AACF;AAEO,IAAM,uBAAiC;EAC5C,GAAG;EACH,aAAa;;;;;EAKb,WAAW;EACX,YAAY;EACZ,SAAS;EACT,iBAAiB,YAAa,MAAM,kBAAkB,KAAM;AAC9D;AAGO,IAAM,iBAAiC;EAC5C,UAAU;EACV,SAAS;EACT,4BAA4B,YAAa,MAAM,kBAAkB,KAAM;EACvE;AACF;","names":["mkdirSync","dirname","join","execa","knownHosts","mkdirSync","dirname","log","ref","quoteShellArg","join","execa","sshOptArgs","sshDestination","SCHEMA","createReadStream","dirname","log","createReadStream","dirname","CONTAINER_USER","quoteShellArg","bashScript","loadEffectiveConfig"]}
@@ -17,13 +17,13 @@ import {
17
17
  resolveAgentInstall,
18
18
  resolveRuleRefs,
19
19
  substitutePlaceholders
20
- } from "./chunk-FM7PHYBD.js";
20
+ } from "./chunk-NEU5B2VO.js";
21
21
  import {
22
22
  BUILT_IN_DEFAULTS,
23
23
  PROVIDERS,
24
24
  isProviderKind,
25
25
  providerMeta
26
- } from "./chunk-YZZKWZO2.js";
26
+ } from "./chunk-3PTSPFR6.js";
27
27
 
28
28
  // ../../packages/sandbox-core/dist/index.js
29
29
  import { mkdir, open, readFile, rename, rm, stat, writeFile } from "fs/promises";
@@ -59,11 +59,13 @@ import { createConnection, createServer } from "net";
59
59
  import { homedir as homedir6 } from "os";
60
60
  import { join as join7, resolve as resolve2 } from "path";
61
61
  import { execa as execa5 } from "execa";
62
+ import { request as httpRequest } from "http";
63
+ import { request as httpsRequest } from "https";
62
64
  import { chmodSync, existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync as readFileSync3, renameSync, writeFileSync as writeFileSync2 } from "fs";
63
65
  import { homedir as homedir7 } from "os";
64
66
  import { dirname as dirname5, resolve as resolve3 } from "path";
65
67
  import { existsSync as existsSync5 } from "fs";
66
- import { request as httpRequest } from "http";
68
+ import { request as httpRequest2 } from "http";
67
69
  import { connect as netConnect } from "net";
68
70
  import { dirname as dirname6, resolve as resolve4 } from "path";
69
71
  import { setTimeout as delay3 } from "timers/promises";
@@ -139,9 +141,9 @@ import { copyFile, mkdir as mkdir11, mkdtemp as mkdtemp6, readdir as readdir7, r
139
141
  import { homedir as homedir14, tmpdir as tmpdir6 } from "os";
140
142
  import { basename as basename2, dirname as dirname13, join as join21 } from "path";
141
143
  import { execa as execa11 } from "execa";
142
- import { copyFile as copyFile2, mkdtemp as mkdtemp7, readdir as readdir8, rm as rm11, stat as stat14 } from "fs/promises";
144
+ import { copyFile as copyFile2, mkdtemp as mkdtemp7, rm as rm11, stat as stat14 } from "fs/promises";
143
145
  import { homedir as homedir15, tmpdir as tmpdir7 } from "os";
144
- import { basename as basename3, join as join22, relative as relative2 } from "path";
146
+ import { basename as basename3, join as join22 } from "path";
145
147
  import { execa as execa12 } from "execa";
146
148
  import { createHash as createHash5 } from "crypto";
147
149
  import { existsSync as existsSync8, mkdirSync as mkdirSync3, readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync3 } from "fs";
@@ -151,11 +153,11 @@ import { dirname as dirname14, resolve as pathResolve } from "path";
151
153
  import { basename as basename4 } from "path";
152
154
  import { realpath as realpath2, stat as stat16 } from "fs/promises";
153
155
  import { homedir as homedir17 } from "os";
154
- import { isAbsolute as isAbsolute3, join as join24, normalize as normalize2, relative as relative3, resolve as resolve8 } from "path";
155
- import { readdir as readdir9, stat as stat15 } from "fs/promises";
156
+ import { isAbsolute as isAbsolute3, join as join24, normalize as normalize2, relative as relative2, resolve as resolve8 } from "path";
157
+ import { readdir as readdir8, stat as stat15 } from "fs/promises";
156
158
  import { join as join23 } from "path";
157
159
  import { randomBytes } from "crypto";
158
- import { chmod as chmod4, mkdir as mkdir12, readFile as readFile16, readdir as readdir10, rename as rename4, rm as rm12, writeFile as writeFile12 } from "fs/promises";
160
+ import { chmod as chmod4, mkdir as mkdir12, readFile as readFile16, readdir as readdir9, rename as rename4, rm as rm12, writeFile as writeFile12 } from "fs/promises";
159
161
  import { join as join25 } from "path";
160
162
  var STATE_DIR = join(homedir(), ".agentbox");
161
163
  var STATE_FILE = join(STATE_DIR, "state.json");
@@ -1558,6 +1560,80 @@ function describeInbound(policy) {
1558
1560
  return "locked (SSH reachable only from the host egress IP)";
1559
1561
  }
1560
1562
  }
1563
+ var PROBES = [
1564
+ "https://api4.ipify.org",
1565
+ "https://ipv4.icanhazip.com",
1566
+ "https://ifconfig.io/ip"
1567
+ ];
1568
+ var TIMEOUT_MS = 3e3;
1569
+ var IPV4_RE = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
1570
+ function isIpv4(s) {
1571
+ const m = IPV4_RE.exec(s);
1572
+ if (!m) return false;
1573
+ return m.slice(1).every((o) => Number.parseInt(o, 10) <= 255);
1574
+ }
1575
+ async function detectEgressIp(opts = {}) {
1576
+ const probes = opts.probes ?? PROBES;
1577
+ const timeout = opts.timeoutMs ?? TIMEOUT_MS;
1578
+ const get = opts.get ?? getOverIpv4;
1579
+ const errors = [];
1580
+ for (const url of probes) {
1581
+ try {
1582
+ const res = await raceTimeout(get(url, timeout), timeout);
1583
+ if (res.status < 200 || res.status >= 300) {
1584
+ errors.push(`${url}: HTTP ${String(res.status)}`);
1585
+ continue;
1586
+ }
1587
+ const body = res.body.trim();
1588
+ if (isIpv4(body)) {
1589
+ opts.onLog?.(`egress-ip: detected ${body} via ${url}`);
1590
+ return body;
1591
+ }
1592
+ errors.push(
1593
+ body.includes(":") ? `${url}: answered with a non-IPv4 address (${body.slice(0, 64)})` : `${url}: empty/invalid response`
1594
+ );
1595
+ } catch (err) {
1596
+ errors.push(`${url}: ${err instanceof Error ? err.message : String(err)}`);
1597
+ }
1598
+ }
1599
+ throw new Error(
1600
+ `could not auto-detect the host's IPv4 egress address \u2014 all ${String(probes.length)} probes failed:
1601
+ ` + errors.map((e) => ` - ${e}`).join("\n") + "\nThe box firewall needs the IPv4 address the host uses to reach the VPS; an IPv6-only host cannot be locked down by IP." + (opts.overrideHint ? `
1602
+ ${opts.overrideHint}` : "")
1603
+ );
1604
+ }
1605
+ async function detectEgressCidr(opts = {}) {
1606
+ return `${await detectEgressIp(opts)}/32`;
1607
+ }
1608
+ var getOverIpv4 = (url, timeoutMs) => new Promise((resolve9, reject) => {
1609
+ const target = new URL(url);
1610
+ const request = target.protocol === "http:" ? httpRequest : httpsRequest;
1611
+ const req = request(target, { method: "GET", family: 4, timeout: timeoutMs }, (res) => {
1612
+ let body = "";
1613
+ res.setEncoding("utf8");
1614
+ res.on("data", (chunk) => {
1615
+ if (body.length < 4096) body += chunk;
1616
+ });
1617
+ res.on("end", () => resolve9({ status: res.statusCode ?? 0, body }));
1618
+ res.on("error", reject);
1619
+ });
1620
+ req.on("timeout", () => req.destroy(new Error(`probe timed out after ${String(timeoutMs)}ms`)));
1621
+ req.on("error", reject);
1622
+ req.end();
1623
+ });
1624
+ async function raceTimeout(p, ms) {
1625
+ let timer;
1626
+ try {
1627
+ return await Promise.race([
1628
+ p,
1629
+ new Promise((_resolve, reject) => {
1630
+ timer = setTimeout(() => reject(new Error(`probe timed out after ${String(ms)}ms`)), ms);
1631
+ })
1632
+ ]);
1633
+ } finally {
1634
+ if (timer !== void 0) clearTimeout(timer);
1635
+ }
1636
+ }
1561
1637
  var BOX_WORKSPACE = "/workspace";
1562
1638
  function run(provider, box, argv) {
1563
1639
  return provider.exec(box, argv, { cwd: BOX_WORKSPACE });
@@ -1771,7 +1847,7 @@ function portIsOccupied(timeoutMs, port = relayPort()) {
1771
1847
  }
1772
1848
  function pingHealthz(timeoutMs) {
1773
1849
  return new Promise((resolveP) => {
1774
- const req = httpRequest(
1850
+ const req = httpRequest2(
1775
1851
  {
1776
1852
  host: "127.0.0.1",
1777
1853
  port: relayPort(),
@@ -1795,7 +1871,7 @@ function pingHealthz(timeoutMs) {
1795
1871
  }
1796
1872
  function fetchHealthz(timeoutMs) {
1797
1873
  return new Promise((resolveP) => {
1798
- const req = httpRequest(
1874
+ const req = httpRequest2(
1799
1875
  {
1800
1876
  host: "127.0.0.1",
1801
1877
  port: relayPort(),
@@ -3340,7 +3416,7 @@ function makeSyncContext(init) {
3340
3416
  }
3341
3417
  async function resolveConfiguredSettings(agent) {
3342
3418
  try {
3343
- const { agentSettingsFor } = await import("./dist-WTPYXNRH.js");
3419
+ const { agentSettingsFor } = await import("./dist-PBO4UHJK.js");
3344
3420
  return await agentSettingsFor(agent);
3345
3421
  } catch {
3346
3422
  return void 0;
@@ -5023,29 +5099,7 @@ async function pathExists5(p) {
5023
5099
  }
5024
5100
  }
5025
5101
  async function findBrokenSymlinks(root) {
5026
- const broken = [];
5027
- async function walk(dir) {
5028
- let entries;
5029
- try {
5030
- entries = await readdir8(dir, { withFileTypes: true });
5031
- } catch {
5032
- return;
5033
- }
5034
- for (const ent of entries) {
5035
- const full = join22(dir, ent.name);
5036
- if (ent.isSymbolicLink()) {
5037
- try {
5038
- await stat14(full);
5039
- } catch {
5040
- broken.push(relative2(root, full));
5041
- }
5042
- } else if (ent.isDirectory()) {
5043
- await walk(full);
5044
- }
5045
- }
5046
- }
5047
- await walk(root);
5048
- return broken;
5102
+ return findUnsyncableSymlinks(root, ["/"]);
5049
5103
  }
5050
5104
  async function mkStageDir(prefix) {
5051
5105
  return mkdtemp7(join22(tmpdir7(), `agentbox-${prefix}-stage-`));
@@ -5097,12 +5151,19 @@ async function stageAgentStaticForUpload(agent, opts = {}) {
5097
5151
  if (await pathExists5(hostPath)) present.push({ path, hostPath });
5098
5152
  }
5099
5153
  if (present.length === 0) return emptyResult();
5154
+ const target = opts.target ?? "snapshot";
5155
+ const warnings = [];
5100
5156
  const stageDir = await mkStageDir(`${spec.id}-static`);
5101
5157
  let tarballPath = null;
5102
5158
  try {
5103
5159
  for (const { path, hostPath } of present) {
5104
5160
  const dest = path.relocToSubpath ? join22(stageDir, path.relocToSubpath) : stageDir;
5105
5161
  const broken = await findBrokenSymlinks(hostPath);
5162
+ for (const r of broken) {
5163
+ warnings.push(
5164
+ `${spec.id}: skipped ${join22(hostPath, r)} \u2014 it is a broken symlink on this host`
5165
+ );
5166
+ }
5106
5167
  await execa12("rsync", [
5107
5168
  "-a",
5108
5169
  STAGE_WRITABLE_CHMOD,
@@ -5112,13 +5173,13 @@ async function stageAgentStaticForUpload(agent, opts = {}) {
5112
5173
  ...(path.include ?? []).map((pat) => `--include=${pat}`),
5113
5174
  // One list for both transports. `agentPushExcludes` adds the
5114
5175
  // live-database deny and, for a SHARED snapshot, the credential file.
5115
- ...agentPushExcludes(spec, path, "snapshot").map((pat) => `--exclude=${pat}`),
5176
+ ...agentPushExcludes(spec, path, target).map((pat) => `--exclude=${pat}`),
5116
5177
  `${hostPath}/`,
5117
5178
  `${dest}/`
5118
5179
  ]);
5119
5180
  }
5120
5181
  tarballPath = await tarballFromDir(stageDir, `${spec.id}-static`);
5121
- return { tarballPath, cleanup: makeCleanup([stageDir, tarballPath]), warnings: [] };
5182
+ return { tarballPath, cleanup: makeCleanup([stageDir, tarballPath]), warnings };
5122
5183
  } catch (err) {
5123
5184
  await rm11(stageDir, { recursive: true, force: true });
5124
5185
  if (tarballPath) await rm11(tarballPath, { force: true });
@@ -5450,7 +5511,7 @@ async function buildNode(abs, rel, tokens, seen) {
5450
5511
  const children = [];
5451
5512
  let entries;
5452
5513
  try {
5453
- entries = await readdir9(abs);
5514
+ entries = await readdir8(abs);
5454
5515
  } catch {
5455
5516
  return { path: rel || ".", bytes: 0, children };
5456
5517
  }
@@ -5676,17 +5737,17 @@ async function dirSizeCapped(dir, cap, exclude = []) {
5676
5737
  const seen = /* @__PURE__ */ new Set();
5677
5738
  async function walk(d) {
5678
5739
  if (total > cap) return;
5679
- const { readdir: readdir11 } = await import("fs/promises");
5740
+ const { readdir: readdir10 } = await import("fs/promises");
5680
5741
  let names;
5681
5742
  try {
5682
- names = await readdir11(d);
5743
+ names = await readdir10(d);
5683
5744
  } catch {
5684
5745
  return;
5685
5746
  }
5686
5747
  for (const name of names) {
5687
5748
  if (total > cap) return;
5688
5749
  const full = join24(d, name);
5689
- const rel = relative3(dir, full).split(/[\\/]/).join("/");
5750
+ const rel = relative2(dir, full).split(/[\\/]/).join("/");
5690
5751
  if (exclude.length > 0 && isPathExcluded(rel, exclude)) continue;
5691
5752
  let st;
5692
5753
  try {
@@ -5958,7 +6019,7 @@ async function resolveModelAuth(args) {
5958
6019
  return resolveModelAuthSources(spec, chosen);
5959
6020
  }
5960
6021
  async function listAvailableSources(spec, env = process.env) {
5961
- const { findAgentSpec: findAgentSpec2 } = await import("./dist-5RMJLMYG.js");
6022
+ const { findAgentSpec: findAgentSpec2 } = await import("./dist-EIVYC2MR.js");
5962
6023
  const out = [];
5963
6024
  for (const s of spec.modelAuth?.sources ?? []) {
5964
6025
  if (s.kind === "env") {
@@ -6033,7 +6094,7 @@ async function readPtyMeta(managerId, baseDir = STATE_DIR) {
6033
6094
  async function listPtySessions(baseDir = STATE_DIR) {
6034
6095
  let names;
6035
6096
  try {
6036
- names = await readdir10(ptyDir(baseDir));
6097
+ names = await readdir9(ptyDir(baseDir));
6037
6098
  } catch {
6038
6099
  return [];
6039
6100
  }
@@ -6129,6 +6190,10 @@ export {
6129
6190
  parseInboundSpec,
6130
6191
  resolveInboundSources,
6131
6192
  describeInbound,
6193
+ isIpv4,
6194
+ detectEgressIp,
6195
+ detectEgressCidr,
6196
+ getOverIpv4,
6132
6197
  BOX_WORKSPACE,
6133
6198
  scratchBranchName,
6134
6199
  boxGitCheckout,
@@ -6418,4 +6483,4 @@ export {
6418
6483
  listPtySessions,
6419
6484
  removePtySession
6420
6485
  };
6421
- //# sourceMappingURL=chunk-U7J7JT6R.js.map
6486
+ //# sourceMappingURL=chunk-G35FJ4KT.js.map