@madarco/agentbox 0.31.4 → 0.32.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 (722) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/_cloud-attach-UXH3VKTM.js +31 -0
  3. package/dist/{chunk-VQONUZE4.js → chunk-2W3W3KNR.js} +4 -4
  4. package/dist/{chunk-RUKTOHK7.js → chunk-3AYSA62C.js} +2 -2
  5. package/dist/{chunk-EXF4PLBN.js → chunk-3ISG5THX.js} +3 -3
  6. package/dist/{chunk-BYZPRB7U.js → chunk-5D46PE5V.js} +5 -5
  7. package/dist/{chunk-IF4VXKJK.js → chunk-5F5NBZG7.js} +3 -3
  8. package/dist/{chunk-ZUTC2JZM.js → chunk-65G5R2HW.js} +27 -5
  9. package/dist/chunk-65G5R2HW.js.map +1 -0
  10. package/dist/{chunk-KCDLAP5Q.js → chunk-66GAYIJZ.js} +3252 -936
  11. package/dist/chunk-66GAYIJZ.js.map +1 -0
  12. package/dist/{chunk-IQMDGAMB.js → chunk-6N7OSMEA.js} +4 -4
  13. package/dist/{chunk-CUIJ2PIN.js → chunk-7PTM6JEX.js} +26 -22
  14. package/dist/{chunk-CUIJ2PIN.js.map → chunk-7PTM6JEX.js.map} +1 -1
  15. package/dist/{chunk-EP4IFSV5.js → chunk-B3C6NQB7.js} +75 -26
  16. package/dist/chunk-B3C6NQB7.js.map +1 -0
  17. package/dist/{chunk-L567TKOK.js → chunk-BJLUG6TE.js} +5 -5
  18. package/dist/{chunk-AYREFYEF.js → chunk-BV2UZ4SG.js} +4 -4
  19. package/dist/{chunk-MBZ4UOWF.js → chunk-EAT5IEWA.js} +3 -3
  20. package/dist/{chunk-ENFWBFBI.js → chunk-GBEV7ETR.js} +4 -4
  21. package/dist/{chunk-4NO5MO2P.js → chunk-GLIWCNFE.js} +6 -6
  22. package/dist/chunk-GVNKIACA.js +223 -0
  23. package/dist/chunk-GVNKIACA.js.map +1 -0
  24. package/dist/{chunk-VWJBQGXD.js → chunk-HCKRUAHW.js} +6 -6
  25. package/dist/{chunk-IFPTD73K.js → chunk-HUVSTEJR.js} +2 -2
  26. package/dist/{chunk-NKHRFR5G.js → chunk-IL7R2X6B.js} +16 -16
  27. package/dist/{chunk-5UX2HAF4.js → chunk-IQ4WLVXE.js} +43 -43
  28. package/dist/{chunk-AAMPHDB2.js → chunk-JL4EJ4EH.js} +5 -5
  29. package/dist/{chunk-OXBWZG2N.js → chunk-KTB7JGPA.js} +4 -4
  30. package/dist/{chunk-YL3VEQTS.js → chunk-LFBCFWG6.js} +5 -5
  31. package/dist/{chunk-MJZPECVQ.js → chunk-M2DWTQRF.js} +2 -2
  32. package/dist/{chunk-PXH3DERD.js → chunk-MB2K74BI.js} +164 -2
  33. package/dist/chunk-MB2K74BI.js.map +1 -0
  34. package/dist/{chunk-2MBELUE6.js → chunk-NGCG3IBH.js} +9 -9
  35. package/dist/{chunk-QT4MOS6R.js → chunk-NX27A3F2.js} +23 -23
  36. package/dist/{chunk-4Y365UYP.js → chunk-OUHDSEVQ.js} +2 -2
  37. package/dist/{chunk-M6VAID7T.js → chunk-QBVRWGXD.js} +2 -2
  38. package/dist/{chunk-VOVRWIBC.js → chunk-QLZPJIWF.js} +13 -13
  39. package/dist/{chunk-GCS5XAPC.js → chunk-R3XDO4SN.js} +3 -3
  40. package/dist/{chunk-IQ6BQ2LX.js → chunk-RF7Q7SHU.js} +3 -3
  41. package/dist/{chunk-YSC4VY43.js → chunk-SAEZJZ5Z.js} +3 -3
  42. package/dist/{chunk-QDVIMN57.js → chunk-TDPHZWJI.js} +4 -4
  43. package/dist/{chunk-QWWDG5B7.js → chunk-U5MUWZOS.js} +6 -6
  44. package/dist/{chunk-LR5RNEVO.js → chunk-ULQPPQ23.js} +3 -3
  45. package/dist/{chunk-75JF44DH.js → chunk-VWSERFTW.js} +2 -2
  46. package/dist/{chunk-4LSLXBFN.js → chunk-XFMCRD2J.js} +6 -6
  47. package/dist/{chunk-X6SZPGL5.js → chunk-YNAJUTYC.js} +6 -6
  48. package/dist/{chunk-C67DVYWA.js → chunk-ZKOLV4ZN.js} +37 -2
  49. package/dist/chunk-ZKOLV4ZN.js.map +1 -0
  50. package/dist/{cli-XRF7WFE5.js → cli-HFZMZWRM.js} +8 -8
  51. package/dist/{cli-KT5X4J74.js → cli-HPYDF5AP.js} +8 -8
  52. package/dist/{cli-HFLU5QTD.js → cli-PWK63DQI.js} +7 -7
  53. package/dist/{cli-7JW54ZTA.js → cli-RC5F6DYP.js} +8 -8
  54. package/dist/{cli-7Z7BD23R.js → cli-S7RGCNHG.js} +7 -7
  55. package/dist/cloud-backends.js +4 -4
  56. package/dist/{control-plane-DGLF4MBB.js → control-plane-HRJRAYKV.js} +19 -19
  57. package/dist/{cp-hub-upload-7YESYCVS.js → cp-hub-upload-N4PPUZHE.js} +6 -6
  58. package/dist/{custody-client-P7SCEDU2.js → custody-client-KYEZET6C.js} +4 -4
  59. package/dist/{deploy-hetzner-FOCNRRB2.js → deploy-hetzner-A42GILM3.js} +8 -8
  60. package/dist/{dist-63YBVZW4.js → dist-5OXP2N6H.js} +8 -8
  61. package/dist/{dist-36WLI6E2.js → dist-64QL2Q5L.js} +6 -6
  62. package/dist/{dist-MITAKWKQ.js → dist-D4LLY6JV.js} +7 -7
  63. package/dist/{dist-TJJ6KBNZ.js → dist-ETGTZQUT.js} +255 -5
  64. package/dist/{dist-54VRDCUU.js → dist-GS36Y2CW.js} +7 -7
  65. package/dist/{dist-CBPQZPQN.js → dist-HGUSK4LL.js} +7 -7
  66. package/dist/{dist-E4VLIH3H.js → dist-JU5COR7Y.js} +7 -7
  67. package/dist/{dist-2CAWJQT5.js → dist-NJ2U42MZ.js} +9 -5
  68. package/dist/{dist-FHPNYDCF.js → dist-URWWHI3X.js} +8 -2
  69. package/dist/{dist-XSAPZOEG.js → dist-Z4S5EKUS.js} +7 -7
  70. package/dist/{host-reach-drainer-XFLSMTSX.js → host-reach-drainer-WIKLZSLZ.js} +2 -2
  71. package/dist/host-session-YP5RKV6T.js +29 -0
  72. package/dist/hub-A6U3YB5D.js +39 -0
  73. package/dist/{hub-adopt-IYZ3WXYN.js → hub-adopt-O4LQLW6N.js} +6 -6
  74. package/dist/{hub-api-client-WOZ2BQ6H.js → hub-api-client-BI3E37CF.js} +3 -3
  75. package/dist/{hub-docker-target-IQHX6OYX.js → hub-docker-target-D67UXZSU.js} +13 -13
  76. package/dist/index.js +1223 -229
  77. package/dist/index.js.map +1 -1
  78. package/dist/{plugin-update-2ACFHFUI.js → plugin-update-LI3QDA4K.js} +4 -4
  79. package/dist/prepare-5Y7DWMZ7.js +45 -0
  80. package/dist/prepared-custody-L6PXXLD3.js +39 -0
  81. package/dist/{prepared-state-FO74QUCP-PZLOM6HD.js → prepared-state-FO74QUCP-M4Q2X3KN.js} +3 -3
  82. package/dist/{publish-credentials-TO5IIW2T.js → publish-credentials-WJ4KLIMW.js} +8 -8
  83. package/dist/{registry-X33JZU6B.js → registry-6VF5VPGD.js} +4 -4
  84. package/dist/relay-732OVYXR.js +22 -0
  85. package/dist/{remote-docker-share-YADHIHXV.js → remote-docker-share-WY5U5USV.js} +10 -10
  86. package/dist/remote-docker-share-WY5U5USV.js.map +1 -0
  87. package/dist/{tool-grant-push-7G2QAN3J.js → tool-grant-push-YQYYNMRQ.js} +3 -3
  88. package/package.json +1 -1
  89. package/runtime/_shared/ctl.cjs +1026 -309
  90. package/runtime/digitalocean/ctl.cjs +1026 -309
  91. package/runtime/docker/packages/ctl/dist/bin.cjs +1026 -309
  92. package/runtime/e2b/ctl.cjs +1026 -309
  93. package/runtime/hetzner/ctl.cjs +1026 -309
  94. package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
  95. package/runtime/hub/apps/hub/.next/app-path-routes-manifest.json +24 -0
  96. package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
  97. package/runtime/hub/apps/hub/.next/routes-manifest.json +188 -0
  98. package/runtime/hub/apps/hub/.next/server/app/(auth)/signin/page_client-reference-manifest.js +1 -1
  99. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route.js +2 -2
  100. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route.js.nft.json +1 -1
  101. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route.js.nft.json +1 -1
  102. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route.js +4 -4
  103. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route.js.nft.json +1 -1
  104. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/agent/route.js.nft.json +1 -1
  105. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/backup/route.js +2 -2
  106. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/backup/route.js.nft.json +1 -1
  107. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route.js.nft.json +1 -1
  108. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/checkpoint/route.js +2 -2
  109. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/checkpoint/route.js.nft.json +1 -1
  110. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/clone/route.js +2 -2
  111. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/clone/route.js.nft.json +1 -1
  112. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.js +4 -4
  113. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.js.nft.json +1 -1
  114. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route.js.nft.json +1 -1
  115. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/logs/route.js.nft.json +1 -1
  116. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js +2 -2
  117. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js.nft.json +1 -1
  118. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js +2 -2
  119. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js.nft.json +1 -1
  120. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route.js.nft.json +1 -1
  121. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route.js +2 -2
  122. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route.js.nft.json +1 -1
  123. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route.js.nft.json +1 -1
  124. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/upload/route.js +2 -2
  125. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/upload/route.js.nft.json +1 -1
  126. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route.js.nft.json +1 -1
  127. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/web/route.js.nft.json +1 -1
  128. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route.js +4 -4
  129. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route.js.nft.json +1 -1
  130. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/checkpoints/route.js.nft.json +1 -1
  131. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/[...path]/route.js +3 -3
  132. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route.js.nft.json +1 -1
  133. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route.js.nft.json +1 -1
  134. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route.js +2 -2
  135. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route.js.nft.json +1 -1
  136. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route.js +2 -2
  137. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route.js.nft.json +1 -1
  138. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route.js.nft.json +1 -1
  139. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route.js.nft.json +1 -1
  140. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/route.js.nft.json +1 -1
  141. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route/app-paths-manifest.json +3 -0
  142. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route/build-manifest.json +9 -0
  143. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route/server-reference-manifest.json +4 -0
  144. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route.js +9 -0
  145. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route.js.map +5 -0
  146. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route.js.nft.json +1 -0
  147. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route_client-reference-manifest.js +3 -0
  148. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route/app-paths-manifest.json +3 -0
  149. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route/build-manifest.json +9 -0
  150. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route/server-reference-manifest.json +4 -0
  151. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route.js +10 -0
  152. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route.js.map +5 -0
  153. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route.js.nft.json +1 -0
  154. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route_client-reference-manifest.js +3 -0
  155. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route/app-paths-manifest.json +3 -0
  156. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route/build-manifest.json +9 -0
  157. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route/server-reference-manifest.json +4 -0
  158. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route.js +10 -0
  159. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route.js.map +5 -0
  160. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route.js.nft.json +1 -0
  161. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route_client-reference-manifest.js +3 -0
  162. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route/app-paths-manifest.json +3 -0
  163. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route/build-manifest.json +9 -0
  164. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route/server-reference-manifest.json +4 -0
  165. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route.js +9 -0
  166. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route.js.map +5 -0
  167. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route.js.nft.json +1 -0
  168. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route_client-reference-manifest.js +3 -0
  169. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route/app-paths-manifest.json +3 -0
  170. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route/build-manifest.json +9 -0
  171. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route/server-reference-manifest.json +4 -0
  172. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route.js +10 -0
  173. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route.js.map +5 -0
  174. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route.js.nft.json +1 -0
  175. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route_client-reference-manifest.js +3 -0
  176. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route/app-paths-manifest.json +3 -0
  177. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route/build-manifest.json +9 -0
  178. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route/server-reference-manifest.json +4 -0
  179. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route.js +9 -0
  180. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route.js.map +5 -0
  181. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route.js.nft.json +1 -0
  182. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route_client-reference-manifest.js +3 -0
  183. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route/app-paths-manifest.json +3 -0
  184. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route/build-manifest.json +9 -0
  185. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route/server-reference-manifest.json +4 -0
  186. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route.js +10 -0
  187. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route.js.map +5 -0
  188. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route.js.nft.json +1 -0
  189. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route_client-reference-manifest.js +3 -0
  190. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route/app-paths-manifest.json +3 -0
  191. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route/build-manifest.json +9 -0
  192. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route/server-reference-manifest.json +4 -0
  193. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route.js +10 -0
  194. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route.js.map +5 -0
  195. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route.js.nft.json +1 -0
  196. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route_client-reference-manifest.js +3 -0
  197. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js.nft.json +1 -1
  198. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/bots/route.js.nft.json +1 -1
  199. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route.js.nft.json +1 -1
  200. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/create-preflight/route.js +2 -2
  201. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/create-preflight/route.js.nft.json +1 -1
  202. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/restore/route.js +2 -2
  203. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/restore/route.js.nft.json +1 -1
  204. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route.js.nft.json +1 -1
  205. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/seed/route.js.nft.json +1 -1
  206. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route.js +2 -2
  207. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route.js.nft.json +1 -1
  208. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route.js +2 -2
  209. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route.js.nft.json +1 -1
  210. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route.js +2 -2
  211. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route.js.nft.json +1 -1
  212. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/size-check/route.js +2 -2
  213. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/size-check/route.js.nft.json +1 -1
  214. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route.js.nft.json +1 -1
  215. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/prune/route.js +2 -2
  216. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/prune/route.js.nft.json +1 -1
  217. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/system/route.js.nft.json +1 -1
  218. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route/app-paths-manifest.json +3 -0
  219. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route/build-manifest.json +9 -0
  220. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route/server-reference-manifest.json +4 -0
  221. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route.js +10 -0
  222. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route.js.map +5 -0
  223. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route.js.nft.json +1 -0
  224. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route_client-reference-manifest.js +3 -0
  225. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route/app-paths-manifest.json +3 -0
  226. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route/build-manifest.json +9 -0
  227. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route/server-reference-manifest.json +4 -0
  228. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route.js +9 -0
  229. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route.js.map +5 -0
  230. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route.js.nft.json +1 -0
  231. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route_client-reference-manifest.js +3 -0
  232. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route/app-paths-manifest.json +3 -0
  233. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route/build-manifest.json +9 -0
  234. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route/server-reference-manifest.json +4 -0
  235. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route.js +9 -0
  236. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route.js.map +5 -0
  237. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route.js.nft.json +1 -0
  238. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route_client-reference-manifest.js +3 -0
  239. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route/app-paths-manifest.json +3 -0
  240. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route/build-manifest.json +9 -0
  241. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route/server-reference-manifest.json +4 -0
  242. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route.js +10 -0
  243. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route.js.map +5 -0
  244. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route.js.nft.json +1 -0
  245. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route_client-reference-manifest.js +3 -0
  246. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route/app-paths-manifest.json +3 -0
  247. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route/build-manifest.json +9 -0
  248. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route/server-reference-manifest.json +4 -0
  249. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route.js +10 -0
  250. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route.js.map +5 -0
  251. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route.js.nft.json +1 -0
  252. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route_client-reference-manifest.js +3 -0
  253. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route/app-paths-manifest.json +3 -0
  254. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route/build-manifest.json +9 -0
  255. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route/server-reference-manifest.json +4 -0
  256. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route.js +9 -0
  257. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route.js.map +5 -0
  258. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route.js.nft.json +1 -0
  259. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route_client-reference-manifest.js +3 -0
  260. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route/app-paths-manifest.json +3 -0
  261. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route/build-manifest.json +9 -0
  262. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route/server-reference-manifest.json +4 -0
  263. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route.js +10 -0
  264. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route.js.map +5 -0
  265. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route.js.nft.json +1 -0
  266. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route_client-reference-manifest.js +3 -0
  267. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route/app-paths-manifest.json +3 -0
  268. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route/build-manifest.json +9 -0
  269. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route/server-reference-manifest.json +4 -0
  270. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route.js +10 -0
  271. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route.js.map +5 -0
  272. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route.js.nft.json +1 -0
  273. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route_client-reference-manifest.js +3 -0
  274. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route/app-paths-manifest.json +3 -0
  275. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route/build-manifest.json +9 -0
  276. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route/server-reference-manifest.json +4 -0
  277. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route.js +9 -0
  278. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route.js.map +5 -0
  279. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route.js.nft.json +1 -0
  280. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route_client-reference-manifest.js +3 -0
  281. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route/app-paths-manifest.json +3 -0
  282. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route/build-manifest.json +9 -0
  283. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route/server-reference-manifest.json +4 -0
  284. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route.js +10 -0
  285. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route.js.map +5 -0
  286. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route.js.nft.json +1 -0
  287. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route_client-reference-manifest.js +3 -0
  288. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route/app-paths-manifest.json +3 -0
  289. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route/build-manifest.json +9 -0
  290. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route/server-reference-manifest.json +4 -0
  291. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route.js +9 -0
  292. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route.js.map +5 -0
  293. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route.js.nft.json +1 -0
  294. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route_client-reference-manifest.js +3 -0
  295. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route/app-paths-manifest.json +3 -0
  296. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route/build-manifest.json +9 -0
  297. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route/server-reference-manifest.json +4 -0
  298. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route.js +10 -0
  299. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route.js.map +5 -0
  300. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route.js.nft.json +1 -0
  301. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route_client-reference-manifest.js +3 -0
  302. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route/app-paths-manifest.json +3 -0
  303. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route/build-manifest.json +9 -0
  304. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route/server-reference-manifest.json +4 -0
  305. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route.js +10 -0
  306. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route.js.map +5 -0
  307. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route.js.nft.json +1 -0
  308. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route_client-reference-manifest.js +3 -0
  309. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route/app-paths-manifest.json +3 -0
  310. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route/build-manifest.json +9 -0
  311. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route/server-reference-manifest.json +4 -0
  312. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route.js +10 -0
  313. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route.js.map +5 -0
  314. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route.js.nft.json +1 -0
  315. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route_client-reference-manifest.js +3 -0
  316. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route/app-paths-manifest.json +3 -0
  317. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route/build-manifest.json +9 -0
  318. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route/server-reference-manifest.json +4 -0
  319. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route.js +10 -0
  320. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route.js.map +5 -0
  321. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route.js.nft.json +1 -0
  322. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route_client-reference-manifest.js +3 -0
  323. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route/app-paths-manifest.json +3 -0
  324. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route/build-manifest.json +9 -0
  325. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route/server-reference-manifest.json +4 -0
  326. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route.js +10 -0
  327. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route.js.map +5 -0
  328. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route.js.nft.json +1 -0
  329. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route_client-reference-manifest.js +3 -0
  330. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -1
  331. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
  332. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page.js.nft.json +1 -1
  333. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page_client-reference-manifest.js +1 -1
  334. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route.js.nft.json +1 -1
  335. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/web/route.js.nft.json +1 -1
  336. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/custody/page.js.nft.json +1 -1
  337. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/custody/page_client-reference-manifest.js +1 -1
  338. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  339. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  340. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page.js.nft.json +1 -1
  341. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page_client-reference-manifest.js +1 -1
  342. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  343. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  344. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/system/page.js.nft.json +1 -1
  345. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/system/page_client-reference-manifest.js +1 -1
  346. package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js +1 -1
  347. package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js.nft.json +1 -1
  348. package/runtime/hub/apps/hub/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  349. package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
  350. package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
  351. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  352. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  353. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  354. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  355. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  356. package/runtime/hub/apps/hub/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  357. package/runtime/hub/apps/hub/.next/server/app-paths-manifest.json +24 -0
  358. package/runtime/hub/apps/hub/.next/server/chunks/00je_(dashboard)_api_v1_workspaces_[id]_tasks_[taskId]_assign_route_actions_1sufsej.js +3 -0
  359. package/runtime/hub/apps/hub/.next/server/chunks/00je_(dashboard)_api_v1_workspaces_[id]_tasks_[taskId]_done_route_actions_216dixx.js +3 -0
  360. package/runtime/hub/apps/hub/.next/server/chunks/044u_hub__next-internal_server_app_(dashboard)_api_v1_managers_route_actions_1_vtgih.js +3 -0
  361. package/runtime/hub/apps/hub/.next/server/chunks/044u_hub__next-internal_server_app_(dashboard)_api_v1_tasks_route_actions_1h8tg_m.js +3 -0
  362. package/runtime/hub/apps/hub/.next/server/chunks/05v5_app_(dashboard)_api_v1_workspaces_[id]_managers_sessions_route_actions_16dksub.js +3 -0
  363. package/runtime/hub/apps/hub/.next/server/chunks/05v5_app_(dashboard)_api_v1_workspaces_[id]_managers_start_route_actions_1g-vmis.js +3 -0
  364. package/runtime/hub/apps/hub/.next/server/chunks/05v5_app_(dashboard)_api_v1_workspaces_[id]_tasks_[taskId]_route_actions_03oih6y.js +3 -0
  365. package/runtime/hub/apps/hub/.next/server/chunks/05v5_app_(dashboard)_api_v1_workspaces_[id]_tasks_assign_route_actions_196zwo9.js +3 -0
  366. package/runtime/hub/apps/hub/.next/server/chunks/05v5_app_(dashboard)_api_v1_workspaces_[id]_tasks_reorder_route_actions_1zkcfk-.js +3 -0
  367. package/runtime/hub/apps/hub/.next/server/chunks/0ssw__next-internal_server_app_(dashboard)_api_v1_workspaces_route_actions_12a7_y8.js +3 -0
  368. package/runtime/hub/apps/hub/.next/server/chunks/0web_next-internal_server_app_(dashboard)_api_v1_managers_[id]_route_actions_07cpyb_.js +3 -0
  369. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_managers_[id]_attach_route_actions_0o-khw8.js +3 -0
  370. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_managers_[id]_message_route_actions_0rjcqe5.js +3 -0
  371. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_managers_[id]_notes_route_actions_1-mf4r_.js +3 -0
  372. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_managers_[id]_resume_route_actions_0-cm1mu.js +3 -0
  373. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_managers_[id]_stop_route_actions_16nrl1r.js +3 -0
  374. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_managers_detect_route_actions_1sdbs-_.js +3 -0
  375. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_workspaces_[id]_managers_route_actions_1sxymv0.js +3 -0
  376. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_workspaces_[id]_rename_route_actions_0df5zi2.js +3 -0
  377. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_workspaces_[id]_rescan_route_actions_1yra_w8.js +3 -0
  378. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_workspaces_[id]_route_actions_1f56n_0.js +3 -0
  379. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_workspaces_[id]_tasks_route_actions_1t-6quw.js +3 -0
  380. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_workspaces_[id]_timeline_route_actions_0pbxblt.js +3 -0
  381. package/runtime/hub/apps/hub/.next/server/chunks/1viy_api_v1_workspaces_[id]_tasks_[taskId]_unassign_route_actions_18a1p_r.js +3 -0
  382. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0-c97gb._.js +1 -1
  383. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0spnud2._.js → [root-of-the-server]__0-kl55b._.js} +1 -1
  384. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__028ifqb._.js → [root-of-the-server]__0-xlf9z._.js} +2 -2
  385. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__074mxl5._.js → [root-of-the-server]__0004tsz._.js} +2 -2
  386. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__00bupbc._.js +1 -1
  387. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1cpr4qy._.js → [root-of-the-server]__0126167._.js} +1 -1
  388. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__01fy5q0._.js +1 -1
  389. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__02c077x._.js +3 -0
  390. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1ta1gr1._.js → [root-of-the-server]__02sueng._.js} +1 -1
  391. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0nndlre._.js → [root-of-the-server]__04-gm8c._.js} +2 -2
  392. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__05uinnp._.js +1 -1
  393. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__06wy8zz._.js +3 -0
  394. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__071c-t4._.js +3 -0
  395. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__08jg8w8._.js +1 -1
  396. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09059m-._.js +1 -1
  397. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__092y7_z._.js +1 -1
  398. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09ti2-t._.js +3 -0
  399. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09y4pdw._.js +3 -0
  400. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0_mog_h._.js +1 -1
  401. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0a689u5._.js +3 -0
  402. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0a8ere2._.js +3 -0
  403. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0bzqrje._.js +3 -0
  404. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0c_r3oe._.js +3 -0
  405. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cdoz9i._.js +1 -1
  406. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cmu4sk._.js +1 -1
  407. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cxjxz0._.js +1 -1
  408. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d27tlu._.js +3 -0
  409. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d3fx1z._.js +3 -0
  410. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dm5oqm._.js +1 -1
  411. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dy5g2k._.js +1 -1
  412. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0e1uaxg._.js +1 -1
  413. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0e6_t-d._.js +3 -0
  414. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ets4cd._.js +1 -1
  415. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0f2u0ul._.js +1 -1
  416. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0f9p_4f._.js +1 -1
  417. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0f_jmq2._.js +1 -1
  418. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0fksz_r._.js +1 -1
  419. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0fpygqn._.js +3 -0
  420. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0gym-rp._.js +1 -1
  421. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0hhlb2_._.js +1 -1
  422. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0i9phow._.js +1 -1
  423. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ikyoac._.js +1 -1
  424. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0j72bti._.js +1 -1
  425. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jb371p._.js +1 -1
  426. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jq6cdw._.js +3 -0
  427. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jt1d2s._.js +3 -0
  428. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0kcw8t0._.js +1 -1
  429. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0kdt9-i._.js +1 -1
  430. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0l27vs0._.js +1 -1
  431. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0lc-j_n._.js +3 -0
  432. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0lna-vq._.js +3 -0
  433. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0m5woxc._.js +1 -1
  434. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0mi9xib._.js +3 -0
  435. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0muy7eg._.js +3 -0
  436. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0nn0_b5._.js +3 -0
  437. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0no30or._.js +3 -0
  438. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0o3sjtx._.js +1 -1
  439. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0onk5r0._.js +1 -1
  440. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0pik2ie._.js +3 -0
  441. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qde3vr._.js +1 -1
  442. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qt_r6a._.js +3 -0
  443. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ry8baf._.js +1 -1
  444. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0sg4y_2._.js +3 -0
  445. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0sgjn2j._.js +1 -1
  446. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0st6oln._.js +1 -1
  447. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0t0p64l._.js +1 -1
  448. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0tbl11-._.js +3 -0
  449. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ve_tqz._.js +1 -1
  450. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0w4smfx._.js +3 -0
  451. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0wo4sqj._.js +1 -1
  452. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0wujjkl._.js +3 -0
  453. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xbu3yj._.js +3 -0
  454. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xl1-w6._.js +1 -1
  455. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0yct1tu._.js +1 -1
  456. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0yg67t0._.js +1 -1
  457. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ykw5oe._.js +3 -0
  458. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1c1rcl-._.js → [root-of-the-server]__0zznyx2._.js} +2 -2
  459. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1--u2xl._.js +3 -0
  460. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-8sj4i._.js +1 -1
  461. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__10kmcrt._.js +3 -0
  462. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__10l_-cd._.js +3 -0
  463. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__10yfcvu._.js +1 -1
  464. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__112hqrh._.js +3 -0
  465. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__11c-21i._.js +3 -0
  466. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__11qbpq8._.js +3 -0
  467. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__11s1mrd._.js +1 -1
  468. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__128w1nz._.js +3 -0
  469. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__12b2kuv._.js +1 -1
  470. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__12gbq5m._.js +1 -1
  471. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13nfpq5._.js +3 -0
  472. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13vl4-h._.js +1 -1
  473. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__153b7kv._.js +1 -1
  474. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__157kmse._.js +1 -1
  475. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__16695dw._.js +1 -1
  476. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__166_uek._.js +3 -0
  477. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__16o0ij7._.js +1 -1
  478. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__175lucf._.js +1 -1
  479. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__17p53e3._.js +3 -0
  480. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__17y9pmx._.js +3 -0
  481. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__18ec5_t._.js +3 -0
  482. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__18xpvkc._.js +1 -1
  483. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1925hyw._.js +3 -0
  484. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__19ew1r2._.js +3 -0
  485. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__19grunx._.js +1 -1
  486. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_4v0mh._.js +3 -0
  487. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_cbcl1._.js +1 -1
  488. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_wb2uh._.js +3 -0
  489. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_xgm2e._.js +3 -0
  490. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1an6-yb._.js +3 -0
  491. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1c0ex8m._.js +1 -1
  492. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1c1e08-._.js +3 -0
  493. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1c9f4uu._.js +1 -1
  494. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ci8hc2._.js +1 -1
  495. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1cs6d52._.js +3 -0
  496. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1d60scp._.js +3 -0
  497. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1dicjoc._.js +3 -0
  498. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1diipl4._.js +3 -0
  499. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1dp2exz._.js +1 -1
  500. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1epnstn._.js +1 -1
  501. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1fjnz2l._.js +3 -0
  502. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1g5wnt2._.js +1 -1
  503. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1g9v7bq._.js +1 -1
  504. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1gon0_4._.js +3 -0
  505. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1h_59cs._.js +1 -1
  506. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1h_q3sn._.js +3 -0
  507. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1hlugb4._.js +1 -1
  508. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1hux-70._.js +1 -1
  509. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1i-7bnu._.js +3 -0
  510. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1i_el2y._.js +3 -0
  511. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1j6clag._.js +1 -1
  512. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1k6q17t._.js +3 -0
  513. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1khvg39._.js +1 -1
  514. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lx9lyn._.js +3 -0
  515. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1m36v6k._.js +1 -1
  516. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mgu19x._.js +3 -0
  517. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mhyrr5._.js +3 -0
  518. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mk_lpu._.js +3 -0
  519. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mt32fu._.js +1 -1
  520. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1n1_2tw._.js +1 -1
  521. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1na4sdw._.js +3 -0
  522. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ntihlm._.js +3 -0
  523. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1odu62n._.js +3 -0
  524. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1q6xrlt._.js +2 -2
  525. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1r4x1-y._.js +3 -0
  526. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rjs_x0._.js +1 -1
  527. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rxud0j._.js +1 -1
  528. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1s5app0._.js +1 -1
  529. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1sjz59l._.js +3 -0
  530. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1slo4q_._.js +1 -1
  531. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1thrazp._.js +3 -0
  532. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1twtnwr._.js +1 -1
  533. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1txvsbk._.js +3 -0
  534. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1uch-60._.js +1 -1
  535. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1um2jum._.js +3 -0
  536. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1vnnuo1._.js +1 -1
  537. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1wegvep._.js +3 -0
  538. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1wi5roz._.js +1 -1
  539. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1xa9oiv._.js +3 -0
  540. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ypmy86._.js +3 -0
  541. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1zml9me._.js +1 -1
  542. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1zrf_a6._.js +1 -1
  543. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__2019yzl._.js +3 -0
  544. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20jyxyo._.js +2 -2
  545. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20ybhif._.js +1 -1
  546. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20zl5fr._.js +1 -1
  547. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__212dyoi._.js +1 -1
  548. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__218oup-._.js +1 -1
  549. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__21abvx9._.js +3 -0
  550. package/runtime/hub/apps/hub/.next/server/chunks/_0907rw0._.js +2 -1
  551. package/runtime/hub/apps/hub/.next/server/chunks/_0mcxq5g._.js +1 -1
  552. package/runtime/hub/apps/hub/.next/server/chunks/_0vg6gvw._.js +41 -41
  553. package/runtime/hub/apps/hub/.next/server/chunks/apps_hub_app_(dashboard)_api_v1_lib_openapi_ts_1yokmzt._.js +1 -1
  554. package/runtime/hub/apps/hub/.next/server/chunks/apps_hub_app_(dashboard)_api_v1_lib_validate_ts_16dhbzz._.js +1 -1
  555. package/runtime/hub/apps/hub/.next/server/chunks/packages_relay_dist_control-plane_03a-9aj.js +6 -6
  556. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__03-x9xy._.js +1 -1
  557. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__1jqga8h._.js +1 -1
  558. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0r2xlss._.js +2 -1
  559. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_14-qzbg._.js +26 -26
  560. package/runtime/hub/apps/hub/.next/server/chunks/ssr/packages_relay_dist_control-plane_0ve-wz4.js +1 -1
  561. package/runtime/hub/apps/hub/.next/server/functions-config-manifest.json +24 -0
  562. package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
  563. package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
  564. package/runtime/hub/apps/hub/.next/static/chunks/{31e1wjin30i__.css → 03_fxfc3849ms.css} +1 -1
  565. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/boxes/[id]/[action]/route.ts +4 -2
  566. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.ts +6 -4
  567. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/boxes/route.ts +2 -1
  568. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/actor.ts +48 -0
  569. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/envelope.ts +5 -2
  570. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/openapi.ts +1687 -52
  571. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/validate.ts +527 -1
  572. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/attach/route.ts +26 -0
  573. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/message/route.ts +34 -0
  574. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/notes/route.ts +26 -0
  575. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/resume/route.ts +26 -0
  576. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/route.ts +34 -0
  577. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/stop/route.ts +23 -0
  578. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/detect/route.ts +33 -0
  579. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/route.ts +27 -0
  580. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/tasks/route.ts +30 -0
  581. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/managers/route.ts +19 -0
  582. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route.ts +22 -0
  583. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route.ts +61 -0
  584. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/rename/route.ts +25 -0
  585. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/rescan/route.ts +20 -0
  586. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/route.ts +34 -0
  587. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route.ts +33 -0
  588. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route.ts +23 -0
  589. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route.ts +54 -0
  590. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route.ts +25 -0
  591. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route.ts +34 -0
  592. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route.ts +33 -0
  593. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/tasks/route.ts +59 -0
  594. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/timeline/route.ts +25 -0
  595. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/route.ts +31 -0
  596. package/runtime/hub/apps/hub/{chunk-SM2XYDPL.js → chunk-FBNAIUXZ.js} +36 -1
  597. package/runtime/hub/apps/hub/{chunk-F6GOERHP.js → chunk-GGHXBTGL.js} +3 -3
  598. package/runtime/hub/apps/hub/{chunk-7IIG6MIB.js → chunk-LEELYQVR.js} +9 -9
  599. package/runtime/hub/apps/hub/{chunk-AAF4CYVH.js → chunk-MD2UNTZR.js} +5 -5
  600. package/runtime/hub/apps/hub/{chunk-7JBH42LK.js → chunk-MQ7AJUJJ.js} +2 -2
  601. package/runtime/hub/apps/hub/{chunk-AIFVVQPX.js → chunk-OFJRKISZ.js} +3317 -1031
  602. package/runtime/hub/apps/hub/{dist-DS5LGBGK.js → dist-3LDUYWPK.js} +7 -1
  603. package/runtime/hub/apps/hub/{dist-YOTRYCRK.js → dist-DENRW6O5.js} +7 -3
  604. package/runtime/hub/apps/hub/{dist-BKCL4HAA.js → dist-NQYEPZJY.js} +4 -4
  605. package/runtime/hub/apps/hub/{dist-H7NIUVBD.js → dist-RIXE6NHS.js} +5 -5
  606. package/runtime/hub/apps/hub/{dist-YG4RVC24.js → dist-RK6SSH23.js} +5 -5
  607. package/runtime/hub/apps/hub/{dist-MQADLEEQ.js → dist-U5SDGYOA.js} +4 -4
  608. package/runtime/hub/apps/hub/{dist-LV6CHJVA.js → dist-U6XVHUNU.js} +4 -4
  609. package/runtime/hub/apps/hub/{dist-RJBPZWSZ.js → dist-W4YRUL6E.js} +4 -4
  610. package/runtime/hub/apps/hub/{dist-VENYRIRW.js → dist-Y3Q5YEOC.js} +4 -4
  611. package/runtime/hub/apps/hub/{hub-worker-DLFLGKCV.js → hub-worker-DVATYYST.js} +6 -6
  612. package/runtime/hub/apps/hub/lib/backend/background.ts +19 -0
  613. package/runtime/hub/apps/hub/lib/backend/box-facts.ts +97 -0
  614. package/runtime/hub/apps/hub/lib/backend/box-prs.ts +213 -0
  615. package/runtime/hub/apps/hub/lib/backend/deps.ts +99 -0
  616. package/runtime/hub/apps/hub/lib/backend/errors.ts +7 -0
  617. package/runtime/hub/apps/hub/lib/backend/github-prs.ts +302 -0
  618. package/runtime/hub/apps/hub/lib/backend/managers.ts +748 -0
  619. package/runtime/hub/apps/hub/lib/backend/timeline-lanes.ts +150 -0
  620. package/runtime/hub/apps/hub/lib/backend/timeline.ts +611 -0
  621. package/runtime/hub/apps/hub/lib/backend/workspaces.ts +439 -0
  622. package/runtime/hub/apps/hub/lib/boxes/backend-types.ts +355 -10
  623. package/runtime/hub/apps/hub/lib/boxes/postgres-source.ts +3 -0
  624. package/runtime/hub/apps/hub/lib/boxes/source.ts +18 -1
  625. package/runtime/hub/apps/hub/lib/boxes/types.ts +66 -0
  626. package/runtime/hub/apps/hub/lib/hub-backend.ts +114 -7
  627. package/runtime/hub/apps/hub/{prepared-state-FO74QUCP-FZ6PT4LA.js → prepared-state-FO74QUCP-75UBPW5I.js} +2 -2
  628. package/runtime/hub/apps/hub/server.js +2032 -163
  629. package/runtime/hub/apps/hub/test/backend-managers-background.test.ts +336 -0
  630. package/runtime/hub/apps/hub/test/backend-managers.test.ts +493 -0
  631. package/runtime/hub/apps/hub/test/backend-workspaces.test.ts +208 -0
  632. package/runtime/hub/apps/hub/test/box-prs.test.ts +198 -0
  633. package/runtime/hub/apps/hub/test/timeline-lanes.test.ts +261 -0
  634. package/runtime/hub/apps/hub/test/timeline.test.ts +1185 -0
  635. package/runtime/hub/apps/hub/test/validate.test.ts +252 -0
  636. package/runtime/hub/apps/hub/tsconfig.tsbuildinfo +1 -1
  637. package/runtime/relay/bin.cjs +1399 -616
  638. package/runtime/vercel/ctl.cjs +1026 -309
  639. package/share/host-skills/agentbox-info/SKILL.md +25 -4
  640. package/dist/_cloud-attach-B3BCOZ7U.js +0 -31
  641. package/dist/chunk-C67DVYWA.js.map +0 -1
  642. package/dist/chunk-EP4IFSV5.js.map +0 -1
  643. package/dist/chunk-KCDLAP5Q.js.map +0 -1
  644. package/dist/chunk-PXH3DERD.js.map +0 -1
  645. package/dist/chunk-ZUTC2JZM.js.map +0 -1
  646. package/dist/hub-OMGLWQEV.js +0 -39
  647. package/dist/prepare-OOZF37J6.js +0 -45
  648. package/dist/prepared-custody-E7CSZJ6V.js +0 -39
  649. package/dist/relay-7D5NOFKS.js +0 -22
  650. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__00o_3sf._.js +0 -3
  651. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__08xwxyo._.js +0 -3
  652. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-mtsr6._.js +0 -3
  653. /package/dist/{_cloud-attach-B3BCOZ7U.js.map → _cloud-attach-UXH3VKTM.js.map} +0 -0
  654. /package/dist/{chunk-VQONUZE4.js.map → chunk-2W3W3KNR.js.map} +0 -0
  655. /package/dist/{chunk-RUKTOHK7.js.map → chunk-3AYSA62C.js.map} +0 -0
  656. /package/dist/{chunk-EXF4PLBN.js.map → chunk-3ISG5THX.js.map} +0 -0
  657. /package/dist/{chunk-BYZPRB7U.js.map → chunk-5D46PE5V.js.map} +0 -0
  658. /package/dist/{chunk-IF4VXKJK.js.map → chunk-5F5NBZG7.js.map} +0 -0
  659. /package/dist/{chunk-IQMDGAMB.js.map → chunk-6N7OSMEA.js.map} +0 -0
  660. /package/dist/{chunk-L567TKOK.js.map → chunk-BJLUG6TE.js.map} +0 -0
  661. /package/dist/{chunk-AYREFYEF.js.map → chunk-BV2UZ4SG.js.map} +0 -0
  662. /package/dist/{chunk-MBZ4UOWF.js.map → chunk-EAT5IEWA.js.map} +0 -0
  663. /package/dist/{chunk-ENFWBFBI.js.map → chunk-GBEV7ETR.js.map} +0 -0
  664. /package/dist/{chunk-4NO5MO2P.js.map → chunk-GLIWCNFE.js.map} +0 -0
  665. /package/dist/{chunk-VWJBQGXD.js.map → chunk-HCKRUAHW.js.map} +0 -0
  666. /package/dist/{chunk-IFPTD73K.js.map → chunk-HUVSTEJR.js.map} +0 -0
  667. /package/dist/{chunk-NKHRFR5G.js.map → chunk-IL7R2X6B.js.map} +0 -0
  668. /package/dist/{chunk-5UX2HAF4.js.map → chunk-IQ4WLVXE.js.map} +0 -0
  669. /package/dist/{chunk-AAMPHDB2.js.map → chunk-JL4EJ4EH.js.map} +0 -0
  670. /package/dist/{chunk-OXBWZG2N.js.map → chunk-KTB7JGPA.js.map} +0 -0
  671. /package/dist/{chunk-YL3VEQTS.js.map → chunk-LFBCFWG6.js.map} +0 -0
  672. /package/dist/{chunk-MJZPECVQ.js.map → chunk-M2DWTQRF.js.map} +0 -0
  673. /package/dist/{chunk-2MBELUE6.js.map → chunk-NGCG3IBH.js.map} +0 -0
  674. /package/dist/{chunk-QT4MOS6R.js.map → chunk-NX27A3F2.js.map} +0 -0
  675. /package/dist/{chunk-4Y365UYP.js.map → chunk-OUHDSEVQ.js.map} +0 -0
  676. /package/dist/{chunk-M6VAID7T.js.map → chunk-QBVRWGXD.js.map} +0 -0
  677. /package/dist/{chunk-VOVRWIBC.js.map → chunk-QLZPJIWF.js.map} +0 -0
  678. /package/dist/{chunk-GCS5XAPC.js.map → chunk-R3XDO4SN.js.map} +0 -0
  679. /package/dist/{chunk-IQ6BQ2LX.js.map → chunk-RF7Q7SHU.js.map} +0 -0
  680. /package/dist/{chunk-YSC4VY43.js.map → chunk-SAEZJZ5Z.js.map} +0 -0
  681. /package/dist/{chunk-QDVIMN57.js.map → chunk-TDPHZWJI.js.map} +0 -0
  682. /package/dist/{chunk-QWWDG5B7.js.map → chunk-U5MUWZOS.js.map} +0 -0
  683. /package/dist/{chunk-LR5RNEVO.js.map → chunk-ULQPPQ23.js.map} +0 -0
  684. /package/dist/{chunk-75JF44DH.js.map → chunk-VWSERFTW.js.map} +0 -0
  685. /package/dist/{chunk-4LSLXBFN.js.map → chunk-XFMCRD2J.js.map} +0 -0
  686. /package/dist/{chunk-X6SZPGL5.js.map → chunk-YNAJUTYC.js.map} +0 -0
  687. /package/dist/{cli-7JW54ZTA.js.map → cli-HFZMZWRM.js.map} +0 -0
  688. /package/dist/{cli-7Z7BD23R.js.map → cli-HPYDF5AP.js.map} +0 -0
  689. /package/dist/{cli-HFLU5QTD.js.map → cli-PWK63DQI.js.map} +0 -0
  690. /package/dist/{cli-KT5X4J74.js.map → cli-RC5F6DYP.js.map} +0 -0
  691. /package/dist/{cli-XRF7WFE5.js.map → cli-S7RGCNHG.js.map} +0 -0
  692. /package/dist/{control-plane-DGLF4MBB.js.map → control-plane-HRJRAYKV.js.map} +0 -0
  693. /package/dist/{cp-hub-upload-7YESYCVS.js.map → cp-hub-upload-N4PPUZHE.js.map} +0 -0
  694. /package/dist/{custody-client-P7SCEDU2.js.map → custody-client-KYEZET6C.js.map} +0 -0
  695. /package/dist/{deploy-hetzner-FOCNRRB2.js.map → deploy-hetzner-A42GILM3.js.map} +0 -0
  696. /package/dist/{dist-2CAWJQT5.js.map → dist-5OXP2N6H.js.map} +0 -0
  697. /package/dist/{dist-36WLI6E2.js.map → dist-64QL2Q5L.js.map} +0 -0
  698. /package/dist/{dist-63YBVZW4.js.map → dist-D4LLY6JV.js.map} +0 -0
  699. /package/dist/{dist-CBPQZPQN.js.map → dist-ETGTZQUT.js.map} +0 -0
  700. /package/dist/{dist-54VRDCUU.js.map → dist-GS36Y2CW.js.map} +0 -0
  701. /package/dist/{dist-FHPNYDCF.js.map → dist-HGUSK4LL.js.map} +0 -0
  702. /package/dist/{dist-E4VLIH3H.js.map → dist-JU5COR7Y.js.map} +0 -0
  703. /package/dist/{dist-MITAKWKQ.js.map → dist-NJ2U42MZ.js.map} +0 -0
  704. /package/dist/{dist-TJJ6KBNZ.js.map → dist-URWWHI3X.js.map} +0 -0
  705. /package/dist/{dist-XSAPZOEG.js.map → dist-Z4S5EKUS.js.map} +0 -0
  706. /package/dist/{host-reach-drainer-XFLSMTSX.js.map → host-reach-drainer-WIKLZSLZ.js.map} +0 -0
  707. /package/dist/{hub-OMGLWQEV.js.map → host-session-YP5RKV6T.js.map} +0 -0
  708. /package/dist/{hub-adopt-IYZ3WXYN.js.map → hub-A6U3YB5D.js.map} +0 -0
  709. /package/dist/{hub-api-client-WOZ2BQ6H.js.map → hub-adopt-O4LQLW6N.js.map} +0 -0
  710. /package/dist/{prepare-OOZF37J6.js.map → hub-api-client-BI3E37CF.js.map} +0 -0
  711. /package/dist/{hub-docker-target-IQHX6OYX.js.map → hub-docker-target-D67UXZSU.js.map} +0 -0
  712. /package/dist/{plugin-update-2ACFHFUI.js.map → plugin-update-LI3QDA4K.js.map} +0 -0
  713. /package/dist/{prepared-custody-E7CSZJ6V.js.map → prepare-5Y7DWMZ7.js.map} +0 -0
  714. /package/dist/{prepared-state-FO74QUCP-PZLOM6HD.js.map → prepared-custody-L6PXXLD3.js.map} +0 -0
  715. /package/dist/{registry-X33JZU6B.js.map → prepared-state-FO74QUCP-M4Q2X3KN.js.map} +0 -0
  716. /package/dist/{publish-credentials-TO5IIW2T.js.map → publish-credentials-WJ4KLIMW.js.map} +0 -0
  717. /package/dist/{relay-7D5NOFKS.js.map → registry-6VF5VPGD.js.map} +0 -0
  718. /package/dist/{remote-docker-share-YADHIHXV.js.map → relay-732OVYXR.js.map} +0 -0
  719. /package/dist/{tool-grant-push-7G2QAN3J.js.map → tool-grant-push-YQYYNMRQ.js.map} +0 -0
  720. /package/runtime/hub/apps/hub/.next/static/{o9_g9S5JH-r8bfNfmPa5H → psd9s1F7NglKqhj4_onRN}/_buildManifest.js +0 -0
  721. /package/runtime/hub/apps/hub/.next/static/{o9_g9S5JH-r8bfNfmPa5H → psd9s1F7NglKqhj4_onRN}/_clientMiddlewareManifest.js +0 -0
  722. /package/runtime/hub/apps/hub/.next/static/{o9_g9S5JH-r8bfNfmPa5H → psd9s1F7NglKqhj4_onRN}/_ssgManifest.js +0 -0
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleLifecycleError
4
- } from "./chunk-YL3VEQTS.js";
4
+ } from "./chunk-LFBCFWG6.js";
5
5
  import {
6
6
  ensureRelay,
7
7
  getRelayStatus,
8
8
  rehydrateRelayRegistry,
9
9
  stopRelay
10
- } from "./chunk-EP4IFSV5.js";
10
+ } from "./chunk-B3C6NQB7.js";
11
11
  import {
12
12
  readState
13
- } from "./chunk-C67DVYWA.js";
13
+ } from "./chunk-ZKOLV4ZN.js";
14
14
  import {
15
15
  loadEffectiveConfig
16
16
  } from "./chunk-ES6DXNUA.js";
@@ -174,4 +174,4 @@ export {
174
174
  rehydrateFromState,
175
175
  relayCommand
176
176
  };
177
- //# sourceMappingURL=chunk-IQMDGAMB.js.map
177
+ //# sourceMappingURL=chunk-6N7OSMEA.js.map
@@ -9,15 +9,15 @@ import {
9
9
  resolveHubApiTarget,
10
10
  restoreTunnelIfExposed,
11
11
  stopTunnelIfExposed
12
- } from "./chunk-5UX2HAF4.js";
12
+ } from "./chunk-IQ4WLVXE.js";
13
13
  import {
14
14
  CustodyClient
15
- } from "./chunk-EXF4PLBN.js";
15
+ } from "./chunk-3ISG5THX.js";
16
16
  import {
17
17
  HubBoxNotFoundError,
18
18
  adoptHubBox,
19
19
  pullBoxSshKeys
20
- } from "./chunk-OXBWZG2N.js";
20
+ } from "./chunk-KTB7JGPA.js";
21
21
  import {
22
22
  confirm,
23
23
  intro,
@@ -25,24 +25,24 @@ import {
25
25
  note,
26
26
  outro,
27
27
  spinner3
28
- } from "./chunk-M6VAID7T.js";
28
+ } from "./chunk-QBVRWGXD.js";
29
29
  import {
30
30
  HubApiClient
31
- } from "./chunk-PXH3DERD.js";
31
+ } from "./chunk-MB2K74BI.js";
32
32
  import {
33
33
  loadControlPlaneEnv
34
34
  } from "./chunk-QNYGNHM2.js";
35
35
  import {
36
36
  rehydrateFromState
37
- } from "./chunk-IQMDGAMB.js";
37
+ } from "./chunk-6N7OSMEA.js";
38
38
  import {
39
39
  handleLifecycleError
40
- } from "./chunk-YL3VEQTS.js";
40
+ } from "./chunk-LFBCFWG6.js";
41
41
  import {
42
42
  detectPortless,
43
43
  ensurePortlessProxy,
44
44
  installPortless,
45
- installPortlessService,
45
+ installPortlessServiceDetailed,
46
46
  portlessGetUrl,
47
47
  portlessInstallHint,
48
48
  portlessServiceHint,
@@ -50,14 +50,14 @@ import {
50
50
  portlessStartHint,
51
51
  resetPortlessCache,
52
52
  uninstallPortlessService
53
- } from "./chunk-EP4IFSV5.js";
53
+ } from "./chunk-B3C6NQB7.js";
54
54
  import {
55
55
  controlPlaneDeployPath,
56
56
  ensureHub,
57
57
  getHubStatus,
58
58
  hostOpenCommand,
59
59
  stopHub
60
- } from "./chunk-C67DVYWA.js";
60
+ } from "./chunk-ZKOLV4ZN.js";
61
61
  import {
62
62
  loadEffectiveConfig,
63
63
  setConfigValue
@@ -74,7 +74,7 @@ import { Command } from "commander";
74
74
  async function offerPortlessService() {
75
75
  if (!process.stdin.isTTY) return;
76
76
  const service = await portlessServiceStatus();
77
- if (service.installed) return;
77
+ if (service.installed && service.failing !== true) return;
78
78
  const yes = await confirm({
79
79
  message: "Start the Portless proxy automatically at boot? (otherwise box URLs stop working after every restart)",
80
80
  initialValue: true
@@ -89,25 +89,29 @@ async function runServiceInstall() {
89
89
  log2.info(
90
90
  "Installing the Portless startup service (HTTPS on port 443) \u2014 you may be asked for your password. Box URLs become https://<box>.localhost (the same URL that works inside a box)."
91
91
  );
92
- const res = await installPortlessService();
92
+ const startedAt = Date.now();
93
+ const { result: res, detail } = await installPortlessServiceDetailed();
93
94
  resetPortlessCache();
94
95
  if (res === "cancelled") {
95
96
  log2.warn("Password prompt dismissed \u2014 the proxy will not start at boot.");
96
97
  return false;
97
98
  }
98
- if (res === "failed") {
99
- log2.warn("Could not install the Portless startup service \u2014 run `portless service install`.");
100
- return false;
99
+ await new Promise((r) => setTimeout(r, 3e3));
100
+ const service = await portlessServiceStatus({ sinceMs: startedAt });
101
+ if (service.installed && service.failing !== true) {
102
+ log2.success("Portless starts at boot now.");
103
+ return true;
101
104
  }
102
- const service = await portlessServiceStatus();
103
- if (!service.installed) {
105
+ if (service.failing === true) {
104
106
  log2.warn(
105
- "Portless reported success but the service is not registered \u2014 check `portless service status`."
107
+ "The Portless startup service is installed but keeps failing: another proxy holds port 443 \u2014 check `portless service status` and ~/.portless/service.log."
106
108
  );
107
109
  return false;
108
110
  }
109
- log2.success("Portless starts at boot now.");
110
- return true;
111
+ log2.warn(
112
+ "Could not install the Portless startup service" + (detail ? ` (${detail})` : "") + " \u2014 run `portless service install`."
113
+ );
114
+ return false;
111
115
  }
112
116
  var installPortlessCommand = new Command("portless").description(
113
117
  "Install Portless and start its proxy at boot, so https://<box>.localhost URLs survive a reboot."
@@ -137,7 +141,7 @@ var installPortlessCommand = new Command("portless").description(
137
141
  state = await detectPortless();
138
142
  }
139
143
  const service = await portlessServiceStatus();
140
- if (service.installed) {
144
+ if (service.installed && service.failing !== true) {
141
145
  log2.info("Portless startup service already installed.");
142
146
  } else if (opts.yes === true) {
143
147
  await runServiceInstall();
@@ -637,4 +641,4 @@ export {
637
641
  describeRemoteHubBuild,
638
642
  hubCommand
639
643
  };
640
- //# sourceMappingURL=chunk-CUIJ2PIN.js.map
644
+ //# sourceMappingURL=chunk-7PTM6JEX.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/commands/hub.ts","../src/commands/install-portless.ts","../src/portless-prompt.ts"],"sourcesContent":["import { spawn } from 'node:child_process';\nimport { readFile } from 'node:fs/promises';\nimport { log, spinner } from '@clack/prompts';\nimport { loadEffectiveConfig } from '@agentbox/config';\nimport {\n ensureHub,\n getHubStatus,\n stopHub,\n controlPlaneDeployPath,\n hostOpenCommand,\n type HubStatus,\n type ControlPlaneDeployRecord,\n} from '@agentbox/sandbox-core';\nimport { Command } from 'commander';\nimport { handleLifecycleError } from './_errors.js';\nimport { rehydrateFromState } from './relay.js';\nimport { ensurePortlessProxyQuietly, resolvePortlessEnabled } from '../portless-prompt.js';\nimport {\n resolveCustodyApiTarget,\n resolveHubApiTarget,\n controlPlaneSubcommands,\n probeControlPlaneStatus,\n localExposedLoopbackUrl,\n} from './control-plane.js';\nimport { restoreTunnelIfExposed, stopTunnelIfExposed } from '../control-plane/expose.js';\nimport { loadControlPlaneEnv } from '../control-plane/env-file.js';\nimport { channelOfVersion } from '../lib/channel.js';\nimport { AGENTBOX_VERSION } from '../version.js';\nimport { CustodyClient } from '../control-plane/custody-client.js';\nimport { HubApiClient } from '../control-plane/hub-api-client.js';\nimport type { HubApiBox } from '../control-plane/hub-api-client.js';\nimport { pullBoxSshKeys } from '../control-plane/hub-pull.js';\nimport { adoptHubBox, HubBoxNotFoundError } from '../control-plane/hub-adopt.js';\n\n/**\n * Resolve `portless.enabled` and, when the user has opted in, make sure a proxy\n * is actually up before the hub reports its URL — a proxy does not survive a\n * reboot, so \"the hub is on agentbox.localhost\" was regularly a lie. Only\n * `true` starts one: an unset preference still registers the alias (that costs\n * nothing) but must not spawn a daemon nobody asked for.\n */\nasync function resolvePortlessForHub(): Promise<boolean | undefined> {\n const enabled = await resolvePortlessEnabled();\n if (enabled === true) await ensurePortlessProxyQuietly();\n return enabled;\n}\n\n/** Best-effort: open the hub URL in the host browser (never throws). */\nfunction openInBrowser(url: string): void {\n try {\n const child = spawn(hostOpenCommand(), [url], { detached: true, stdio: 'ignore' });\n child.unref();\n } catch {\n /* the caller has already printed the URL */\n }\n}\n\n/**\n * The client-facing hub the CLI + tray talk to. `mode` is `remote` when a control\n * box is configured, else `local`. `token` is the single Bearer that authorizes\n * both `/api/v1` and the `/api/events` SSE stream (the local hub token, or\n * `AGENTBOX_HUB_API_KEY` for the remote control box).\n */\nexport interface HubTarget {\n mode: 'local' | 'remote';\n url: string;\n token: string;\n /**\n * Whether that hub is a process on THIS machine. `mode` alone can't answer it:\n * a `hub expose`-d machine is its own control box, so it is `remote`-shaped\n * (password profile, keyed by `AGENTBOX_HUB_API_KEY`) while still running\n * here. Callers that need to *start* or *stop* the hub — rather than merely\n * call it — have to branch on this, not on `mode`.\n */\n onThisMachine: boolean;\n}\n\n/**\n * Resolve the hub the CLI should talk to: the remote control box when one is\n * configured (`--url` > `relay.controlPlaneUrl`, with `AGENTBOX_HUB_API_KEY`),\n * else the local hub (`127.0.0.1:<port>` + `~/.agentbox/hub/token`). Surfaced to\n * the macOS tray via `agentbox hub target --json` so it follows the same config\n * (it can't parse the layered config itself). One Bearer authorizes both surfaces\n * in either mode (see `apps/hub/proxy.ts`).\n *\n * `preferLocal` prefers the hub on THIS machine even when a remote control box is\n * configured — the \"which hub\" knob for callers that have decided an operation\n * belongs here (e.g. a `cloud.viaHub=false` bake, or a base whose artifact lands\n * here). It skips only the configured REMOTE control-plane URL; it does NOT skip\n * the loopback branch, because a `hub expose`-d machine's hub IS on this machine\n * yet runs the password profile (its `/api/v1` wants `AGENTBOX_HUB_API_KEY` over\n * loopback, not the plain `~/.agentbox/hub/token`). Same precedence ladder as the\n * default, minus the remote URL — never a second resolver that could disagree.\n */\nexport async function resolveHubTarget(\n urlFlag?: string,\n opts: { preferLocal?: boolean } = {},\n): Promise<HubTarget> {\n const cfg = await loadEffectiveConfig(process.cwd());\n const url = (urlFlag ?? cfg.effective.relay.controlPlaneUrl ?? '').replace(/\\/$/, '');\n // A control box that IS this machine (`hub expose`) is reached over loopback,\n // not the box-facing LAN/tunnel URL — but it's still the `remote`-shaped API\n // (password profile, /api/v1 keyed by AGENTBOX_HUB_API_KEY). This is ALSO the\n // `preferLocal` answer for an exposed machine: the hub is right here, so the\n // plain local-hub token below would 401 against its password profile.\n //\n // Checked BEFORE the configured URL is required, because the two can disagree:\n // `hub unset-url` clears the config but leaves the exposed record, and the hub\n // keeps running the password profile. Falling through to local mode then\n // handed out the localhost token — which that hub does not accept — so\n // `hub target`, and the tray that follows it, pointed at the wrong credential.\n const loopback = urlFlag ? null : await localExposedLoopbackUrl();\n if (loopback) {\n loadControlPlaneEnv();\n return {\n mode: 'remote',\n url: loopback,\n token: process.env.AGENTBOX_HUB_API_KEY ?? '',\n onThisMachine: true,\n };\n }\n // The configured REMOTE control box — skipped under preferLocal so the caller\n // gets this machine's plain local hub instead (the not-exposed local case).\n if (url && !opts.preferLocal) {\n loadControlPlaneEnv();\n return {\n mode: 'remote',\n url,\n token: process.env.AGENTBOX_HUB_API_KEY ?? '',\n onThisMachine: false,\n };\n }\n const s = await getHubStatus();\n return {\n mode: 'local',\n url: `http://127.0.0.1:${String(s.port)}`,\n token: s.token ?? '',\n onThisMachine: true,\n };\n}\n\ninterface StatusOpts {\n url?: string;\n json?: boolean;\n}\n\nfunction renderStatus(s: HubStatus, exposed?: ControlPlaneDeployRecord | null): string {\n // The exposed CONFIG is a property of the machine, not of the running process,\n // so it is reported whether or not the hub is up. Reporting it only while\n // running made a stopped control box look like a plain local hub — with\n // autostart still installed and boxes still pointed at it.\n const exposedLines = exposed\n ? [\n ...(exposed.publicUrl ? [` box-facing url: ${exposed.publicUrl}`] : []),\n ...(exposed.tunnel ? [` tunnel: ${exposed.tunnel}`] : []),\n ...(exposed.autostart ? [' autostart: on'] : []),\n ]\n : [];\n if (s.running) {\n // `mode` describes the PROCESS, so it stays keyed on the live profile: a hub\n // running plain on a machine that is configured exposed is exactly the\n // mismatch worth seeing.\n const mode =\n s.profile === 'hetzner'\n ? [` mode: exposed (control box${s.worker ? ', worker on' : ''})`]\n : exposed\n ? [' mode: NOT exposed yet (configured, but this process is the plain hub)']\n : [];\n return [\n `hub: running${s.ui ? '' : ' (bare relay on the port — no UI; run `agentbox hub start`)'}`,\n ` pid: ${s.pid === null ? '?' : String(s.pid)}`,\n ` port: ${String(s.port)}`,\n ` url: ${s.openUrl}`,\n ...mode,\n ...exposedLines,\n ` log: ${s.logFile}`,\n // A rebuild under a live hub only fails LATER, on the first lazy import\n // (\"Cannot find module 'dist-XXXX.js'\"). Say so here, where someone is\n // already looking, instead of leaving them to decode that at the call site.\n ...(s.staleBundle\n ? [' stale: rebuilt since this hub started — run `agentbox hub restart`']\n : []),\n ].join('\\n');\n }\n const stoppedExposed = exposed ? [' mode: exposed (configured; the hub is not running)'] : [];\n if (s.pidAlive) {\n return [\n `hub: not responding (pid ${String(s.pid)} alive but /healthz silent)`,\n ...stoppedExposed,\n ...exposedLines,\n ` log: ${s.logFile}`,\n ].join('\\n');\n }\n return ['hub: not running', ...stoppedExposed, ...exposedLines, ` log: ${s.logFile}`].join(\n '\\n',\n );\n}\n\n/**\n * What `hub deploy` recorded for the control box at `url` — the only trace of\n * which build a remote hub is running (the VPS keeps no version marker, and in\n * package mode not even a git checkout to `rev-parse`). Matched on URL so a\n * `--url` probe of somebody else's hub doesn't get this machine's record.\n * Best-effort: an absent or unreadable record just omits the line.\n */\nasync function readDeployRecordFor(url: string): Promise<ControlPlaneDeployRecord | null> {\n try {\n const rec = JSON.parse(\n await readFile(controlPlaneDeployPath(), 'utf8'),\n ) as ControlPlaneDeployRecord;\n return rec.url === url ? rec : null;\n } catch {\n return null;\n }\n}\n\n/** The deploy record for a control box that IS this machine (`hub expose`), or null. */\nasync function readLocalDeployRecord(): Promise<ControlPlaneDeployRecord | null> {\n try {\n const rec = JSON.parse(\n await readFile(controlPlaneDeployPath(), 'utf8'),\n ) as ControlPlaneDeployRecord;\n return rec.provider === 'local' ? rec : null;\n } catch {\n return null;\n }\n}\n\nexport interface RemoteHubBuild {\n /** The version the hub reports, else the version that was deployed. */\n version: string | null;\n /** Where `version` came from — a live probe beats a local record. */\n versionSource: 'live' | 'deployed' | null;\n /** `nightly` / `stable`, or `source (<ref>)` for a build-from-source box. */\n channel: string | null;\n /** The deploy record's build line, e.g. `@madarco/agentbox@0.28.0 (npm)`. */\n build: string | null;\n /** Set when the control box runs a different version than this CLI. */\n drift: string | null;\n}\n\n/**\n * Reconcile what the hub reports with what this machine deployed.\n *\n * The live version wins: the record only says what was last *deployed*, which is\n * wrong after a failed update, and is absent entirely for a hub someone else set\n * up. A control box built before the images exported `AGENTBOX_CLI_VERSION`\n * reports nothing, so the record is the fallback rather than the source.\n *\n * Pure so the precedence is unit-testable.\n */\nexport function describeRemoteHubBuild(input: {\n liveVersion?: string | undefined;\n record: ControlPlaneDeployRecord | null;\n cliVersion: string;\n}): RemoteHubBuild {\n const source = input.record?.source ?? null;\n const build = source\n ? source.kind === 'package'\n ? `@madarco/agentbox@${source.spec} (npm)`\n : `${source.repoUrl}@${source.repoRef} (built from source)`\n : null;\n // A spec may be a dist-tag or a range (`--package nightly`), not a version.\n // Treating one as a version would print `version: nightly` and, worse, classify\n // it `stable` — `channelOfVersion` only looks for a `-nightly.` suffix. Until\n // the hub reports what it actually installed, we simply don't know.\n const deployedVersion =\n source?.kind === 'package' && /^\\d+\\.\\d+\\.\\d+/.test(source.spec) ? source.spec : null;\n const version = input.liveVersion ?? deployedVersion;\n const versionSource = input.liveVersion ? 'live' : deployedVersion ? 'deployed' : null;\n // A source build's \"channel\" is the ref itself — which is the branch the user\n // actually cares about (`nightly`, `main`, a feature branch).\n const channel =\n source?.kind === 'source'\n ? `source (${source.repoRef})`\n : version\n ? channelOfVersion(version)\n : null;\n // Only meaningful for a version we know is live; a stale record would nag forever.\n const drift =\n input.liveVersion && input.liveVersion !== input.cliVersion\n ? `this CLI is ${input.cliVersion} — run \\`agentbox hub update\\` to match`\n : null;\n return { version, versionSource, channel, build, drift };\n}\n\nconst statusSub = new Command('status')\n .description(\n 'Show hub status — the remote control box (reachability + box/event counts) when one is configured, else the local hub process',\n )\n .option(\n '--url <url>',\n 'probe this control-plane URL as the remote hub (default: relay.controlPlaneUrl)',\n )\n .option('--json', 'emit status as JSON')\n .action(async (opts: StatusOpts) => {\n try {\n // A control box that IS this machine (`hub expose`): show the exposed\n // detail (profile, worker, box-facing URL, tunnel) that a plain remote\n // probe of its loopback can't. Skipped when `--url` targets another hub.\n const localExposed = opts.url ? null : await readLocalDeployRecord();\n if (localExposed) {\n const s = await getHubStatus();\n if (opts.json) {\n process.stdout.write(JSON.stringify({ ...s, exposed: localExposed }, null, 2) + '\\n');\n return;\n }\n process.stdout.write(renderStatus(s, localExposed) + '\\n');\n return;\n }\n const target = await resolveHubTarget(opts.url);\n // Remote (a control box is configured, or --url given): probe its /healthz.\n if (target.mode === 'remote') {\n const st = await probeControlPlaneStatus(target.url);\n const record = await readDeployRecordFor(st.url);\n const b = describeRemoteHubBuild({\n liveVersion: st.version,\n record,\n cliVersion: AGENTBOX_VERSION,\n });\n if (opts.json) {\n process.stdout.write(\n JSON.stringify({\n ...st,\n ...(b.version ? { version: b.version, versionSource: b.versionSource } : {}),\n ...(b.channel ? { channel: b.channel } : {}),\n ...(b.build ? { deployed: b.build } : {}),\n }) + '\\n',\n );\n return;\n }\n // Copies between a box and THIS machine are served by this machine's\n // relay draining the control box's queue. With it down they fall back to\n // the hub's cached copy (or fail) — a degradation worth naming here,\n // where someone is already asking how the hub is doing.\n const drainer = (await getHubStatus()).running\n ? []\n : [\n ' local: this machine is not draining host actions — `cp` between a box and',\n ' your files will use the hub cache; run `agentbox relay start` to serve live',\n ];\n process.stdout.write(\n [\n `hub: remote (${st.healthy ? 'reachable' : 'UNREACHABLE'})`,\n ` url: ${st.url}`,\n ` health: ${st.detail}`,\n ...drainer,\n ...(b.version\n ? [` version: ${b.version}${b.versionSource === 'deployed' ? ' (as deployed)' : ''}`]\n : []),\n ...(b.channel ? [` channel: ${b.channel}`] : []),\n ...(b.build ? [` build: ${b.build}`] : []),\n ...(b.drift ? [` update: ${b.drift}`] : []),\n ].join('\\n') + '\\n',\n );\n return;\n }\n // Local: introspect the hub daemon process on this machine.\n const s = await getHubStatus();\n // When exposed, the deploy record carries the box-facing URL / tunnel /\n // autostart that /healthz doesn't.\n const exposed = s.profile === 'hetzner' ? await readLocalDeployRecord() : null;\n if (opts.json) {\n process.stdout.write(\n JSON.stringify({ ...s, ...(exposed ? { exposed } : {}) }, null, 2) + '\\n',\n );\n return;\n }\n process.stdout.write(renderStatus(s, exposed) + '\\n');\n } catch (err) {\n handleLifecycleError(err);\n }\n });\n\nconst targetSub = new Command('target')\n .description(\n 'Print the hub the CLI talks to — the remote control box when configured, else the local hub — with its API token. The seam the macOS tray follows to point at the same hub.',\n )\n .option('--url <url>', 'override the control-plane URL (default: relay.controlPlaneUrl)')\n .option('--json', 'emit { mode, url, token } as JSON (consumed by the tray)')\n .action(async (opts: { url?: string; json?: boolean }) => {\n try {\n const t = await resolveHubTarget(opts.url);\n if (opts.json) {\n process.stdout.write(JSON.stringify(t) + '\\n');\n return;\n }\n const tokenNote = t.token\n ? 'present'\n : t.mode === 'remote'\n ? '(none — set AGENTBOX_HUB_API_KEY, or run `agentbox hub setup`)'\n : '(none — start the hub with `agentbox hub`)';\n process.stdout.write(\n [`hub: ${t.mode}`, ` url: ${t.url}`, ` token: ${tokenNote}`].join('\\n') + '\\n',\n );\n } catch (err) {\n handleLifecycleError(err);\n }\n });\n\ninterface StartOpts {\n open?: boolean;\n local?: boolean;\n}\n\n/**\n * With a remote control box configured, `agentbox hub` opens THAT hub instead of\n * starting one here: it is the hub this CLI already talks to, it holds the boxes,\n * and booting a second empty UI on 127.0.0.1 only invites acting on the wrong\n * one. Nothing is lost by not starting it — every local operation that needs the\n * hub on this machine auto-starts it (`resolveHubApiClient`), and `--local`\n * forces it explicitly.\n *\n * A `hub expose`-d machine is excluded: it *is* the control box, so the hub to\n * open is the one to start (hence `onThisMachine`, not `mode`).\n */\nasync function openRemoteHub(target: HubTarget, opts: StartOpts): Promise<void> {\n const s = spinner();\n s.start(`reaching the control box at ${target.url}`);\n const st = await probeControlPlaneStatus(target.url);\n s.stop(\n st.healthy ? `control box reachable — ${st.detail}` : `control box UNREACHABLE (${st.detail})`,\n );\n process.stdout.write(`\\n Open: ${target.url}\\n\\n`);\n if (!st.healthy) {\n log.warn(\n 'Opening it anyway. `agentbox hub status` has the detail; ' +\n '`agentbox hub start --local` runs a hub on this machine instead.',\n );\n }\n if (opts.open !== false) openInBrowser(target.url);\n}\n\nconst startSub = new Command('start')\n .description(\n 'Open the hub — the remote control box when one is configured, else start the local hub (relay + Web UI on port 8787) and open it',\n )\n .option('--no-open', \"don't open the browser, just print the URL\")\n .option('--local', 'start the hub on this machine even when a control box is configured')\n .action(async (opts: StartOpts) => {\n try {\n if (opts.local !== true) {\n const target = await resolveHubTarget();\n if (!target.onThisMachine) {\n await openRemoteHub(target, opts);\n return;\n }\n }\n const s = spinner();\n s.start('starting hub');\n // If this machine is an exposed control box with a tunnel, (re)establish it\n // first so the hub boots knowing its public URL (autostart path).\n await restoreTunnelIfExposed((line) => s.message(line));\n const ep = await ensureHub({\n onLog: (line) => s.message(line),\n portlessEnabled: await resolvePortlessForHub(),\n });\n await rehydrateFromState();\n s.stop(`hub running on ${ep.hostUrl}`);\n process.stdout.write(`\\n Open: ${ep.openUrl}\\n\\n`);\n if (opts.open !== false) openInBrowser(ep.openUrl);\n } catch (err) {\n handleLifecycleError(err);\n }\n });\n\nconst stopSub = new Command('stop')\n .description('Stop the hub process (idempotent)')\n .action(async () => {\n try {\n const s = spinner();\n s.start('stopping hub');\n const result = await stopHub();\n // A tunnel outliving the hub serves nothing and, worse, the next\n // `hub start` would spawn a second one over it. Idempotent + no-op when\n // this machine isn't exposed.\n await stopTunnelIfExposed((line) => s.message(line));\n s.stop(result.stopped ? `stopped hub (pid ${String(result.pid)})` : 'hub was not running');\n } catch (err) {\n handleLifecycleError(err);\n }\n });\n\nconst restartSub = new Command('restart')\n .description('Stop then start the hub')\n .option('--no-open', \"don't open the browser, just print the URL\")\n .action(async (opts: StartOpts) => {\n try {\n const s = spinner();\n s.start('stopping hub');\n const stopped = await stopHub();\n s.stop(stopped.stopped ? `stopped hub (pid ${String(stopped.pid)})` : 'hub was not running');\n const s2 = spinner();\n s2.start('starting hub');\n try {\n await restoreTunnelIfExposed((line) => s2.message(line));\n const ep = await ensureHub({\n onLog: (line) => s2.message(line),\n portlessEnabled: await resolvePortlessForHub(),\n });\n await rehydrateFromState();\n s2.stop(`hub running on ${ep.hostUrl}`);\n process.stdout.write(`\\n Open: ${ep.openUrl}\\n\\n`);\n if (opts.open !== false) openInBrowser(ep.openUrl);\n } catch (err) {\n s2.stop('hub start failed');\n log.warn(err instanceof Error ? err.message : String(err));\n throw err;\n }\n } catch (err) {\n handleLifecycleError(err);\n }\n });\n\n/**\n * Resolve a box ref through the hub's `/api/v1` (server-side `findBox`) for the\n * `hub pull` / `hub adopt` commands. Returns the unique match + the hub API URL\n * (persisted on the adopted record), or null after printing an actionable error\n * — an ambiguous prefix lists the candidates, a total miss throws\n * {@link HubBoxNotFoundError} for the caller's catch to render.\n */\nasync function resolveHubBox(\n ref: string,\n urlFlag: string | undefined,\n): Promise<{ box: HubApiBox; url: string } | null> {\n const target = await resolveHubApiTarget(urlFlag);\n if (!target) {\n process.exitCode = 1;\n return null;\n }\n const matches = await new HubApiClient(target).resolveBox(ref);\n if (matches.length === 0) throw new HubBoxNotFoundError(ref);\n if (matches.length > 1) {\n log.error(`'${ref}' matches multiple boxes on the control box — pick one:`);\n for (const b of matches) process.stderr.write(` ${b.name ?? b.id} (id ${b.id})\\n`);\n log.info('retry with a longer id prefix, the full name, or the sandbox id');\n process.exitCode = 1;\n return null;\n }\n return { box: matches[0]!, url: target.url };\n}\n\nconst pullSub = new Command('pull')\n .description(\n \"Download a control-box-created box's SSH keys so this PC can attach / port-forward / cp to it\",\n )\n .argument('<box>', 'box id or name as shown by `agentbox hub boxes list`')\n .option('--url <url>', 'override the control-plane URL (default: relay.controlPlaneUrl)')\n .action(async (box: string, opts: { url?: string }) => {\n try {\n const resolved = await resolveHubBox(box, opts.url);\n if (!resolved) return;\n // SSH keys live in custody, over the hub's /api/v1: the byte-read needs the\n // admin token (elevated), so this only works from a machine that ran\n // `hub setup`/`expose`. remoteOnly — a control-box box has no keys on a\n // plain local hub.\n const custodyTarget = await resolveCustodyApiTarget(opts.url, { remoteOnly: true });\n if (!custodyTarget) {\n process.exitCode = 1;\n return;\n }\n const res = await pullBoxSshKeys({\n custody: new CustodyClient(custodyTarget),\n box: resolved.box,\n });\n if (res.files.length === 0) {\n log.warn(\n `No SSH key material in custody for '${box}' (boxes/${res.key}/ssh). ` +\n 'The box may mint no keypair (e2b/vercel).',\n );\n process.exitCode = 1;\n return;\n }\n log.success(\n `Pulled ${String(res.files.length)} key file(s) to ${res.dest} — attach / cp / port-forward now work.`,\n );\n } catch (err) {\n if (err instanceof HubBoxNotFoundError) {\n log.error(`${err.message}. Run \\`agentbox hub boxes list\\` to see what's there.`);\n process.exitCode = 1;\n return;\n }\n handleLifecycleError(err);\n }\n });\n\nconst adoptSub = new Command('adopt')\n .description(\n 'Rebuild local state for a control-box-created box so it resolves by name here: writes its BoxRecord and downloads its SSH keys. After this it shows in `agentbox ls` and works with attach / cp / url / screen.',\n )\n .argument('<box>', 'box id, name, or sandbox id as shown by `agentbox hub boxes list`')\n .option('--url <url>', 'override the control-plane URL (default: relay.controlPlaneUrl)')\n .action(async (box: string, opts: { url?: string }) => {\n try {\n const resolved = await resolveHubBox(box, opts.url);\n if (!resolved) return;\n // SSH keys come from custody over /api/v1 (best-effort): a thin client with\n // no admin token adopts the record and warns for SSH providers (the byte-read\n // is refused). remoteOnly — adoption is a control-box concern.\n const custodyTarget = await resolveCustodyApiTarget(opts.url, {\n quiet: true,\n remoteOnly: true,\n });\n const custody = custodyTarget ? new CustodyClient(custodyTarget) : undefined;\n const res = await adoptHubBox({\n box: resolved.box,\n custody,\n controlPlaneUrl: resolved.url,\n log: (line) => log.info(line),\n });\n const where = res.projectRoot\n ? `linked to ${res.projectRoot}`\n : 'no local clone of its repo — it shows under `agentbox ls -g` only';\n log.success(\n `${res.refreshed ? 'Refreshed' : 'Adopted'} ${res.record.name} (${res.record.provider} ${res.record.cloud?.sandboxId ?? ''}) — ${where}.`,\n );\n if (res.sshKeysMissing) {\n log.warn(\n `But the control box has no SSH key for it, so attach / cp / port-forward won't work yet. ` +\n `The key is uploaded by the host that created the box — check that it ran with a control box configured.`,\n );\n }\n } catch (err) {\n if (err instanceof HubBoxNotFoundError) {\n log.error(`${err.message}. Run \\`agentbox hub boxes list\\` to see what's there.`);\n process.exitCode = 1;\n return;\n }\n handleLifecycleError(err);\n }\n });\n\nexport const hubCommand = new Command('hub')\n .description(\n 'Run + manage the AgentBox hub — the local relay + Web UI on http://127.0.0.1:8787 ' +\n '(also https://agentbox.localhost when Portless is installed), and the remote control box ' +\n '(setup, deploy, boxes, approvals, credentials, custody)',\n )\n .addCommand(startSub, { isDefault: true })\n .addCommand(statusSub)\n .addCommand(targetSub)\n .addCommand(stopSub)\n .addCommand(restartSub)\n .addCommand(pullSub)\n .addCommand(adoptSub);\n\n// Fold the remote-hub admin subcommands (setup/deploy/set-url/add/worker/\n// credentials/secrets/project/custody/boxes/approvals) into the one `hub` group —\n// there is no separate `control-plane` command. All surfaced (not hidden).\nfor (const sub of controlPlaneSubcommands) hubCommand.addCommand(sub);\n","/**\n * `agentbox install portless` — set up Portless properly, once, so box URLs\n * keep working across reboots.\n *\n * Portless (https://portless.sh) is what turns a box's published port into\n * `https://<box>.localhost`. AgentBox can install the CLI and start a proxy on\n * demand, but a proxy started that way is just a process: it dies with the\n * machine, while the route registry it serves survives on disk. The result is\n * the failure this command exists to remove — `portless get` keeps answering\n * with a URL, `agentbox hub` keeps printing it, and nothing is listening.\n *\n * Portless ships the fix (`portless service install`: a root LaunchDaemon on\n * macOS, systemd on Linux, a startup task on Windows), so this command drives\n * that rather than hand-rolling autostart, and pairs it with the CA trust the\n * HTTPS proxy needs.\n */\n\nimport { confirm, intro, log, note, outro, spinner } from '@agentbox/cli-kit';\nimport { Command } from 'commander';\nimport {\n detectPortless,\n ensurePortlessProxy,\n installPortless,\n installPortlessService,\n portlessGetUrl,\n portlessInstallHint,\n portlessServiceStatus,\n resetPortlessCache,\n uninstallPortlessService,\n} from '@agentbox/sandbox-docker';\n\ninterface InstallPortlessOptions {\n uninstall?: boolean;\n yes?: boolean;\n}\n\n/**\n * Offer to make an already-running proxy permanent. Interactive-only and\n * best-effort: called from the first-run opt-in and from this command, never\n * from a background path. A \"no\" is simply not repeated in that session — the\n * `doctor` row keeps the nudge visible without another prompt.\n */\nexport async function offerPortlessService(): Promise<void> {\n if (!process.stdin.isTTY) return;\n const service = await portlessServiceStatus();\n if (service.installed) return;\n\n const yes = await confirm({\n message:\n 'Start the Portless proxy automatically at boot? ' +\n '(otherwise box URLs stop working after every restart)',\n initialValue: true,\n });\n if (!yes) {\n log.info('Skipped — run `agentbox install portless` later to set it up.');\n return;\n }\n await runServiceInstall();\n}\n\n/**\n * Install the OS service, reporting what happened. Shared by the interactive\n * offer and the command itself.\n */\nasync function runServiceInstall(): Promise<boolean> {\n // The service runs Portless's default mode — HTTPS on :443 — so a host that\n // was on the no-root :1355 proxy moves to clean, port-less URLs. That is the\n // mode the rest of AgentBox is written against (a cloud box mirrors it\n // internally, and `{{AGENTBOX_BOX_HOST}}` templates spell `https://…` by\n // hand), but it *does* change existing box URLs, so say so before prompting.\n log.info(\n 'Installing the Portless startup service (HTTPS on port 443) — ' +\n 'you may be asked for your password. Box URLs become https://<box>.localhost ' +\n '(the same URL that works inside a box).',\n );\n const res = await installPortlessService();\n resetPortlessCache();\n if (res === 'cancelled') {\n log.warn('Password prompt dismissed — the proxy will not start at boot.');\n return false;\n }\n if (res === 'failed') {\n log.warn('Could not install the Portless startup service — run `portless service install`.');\n return false;\n }\n const service = await portlessServiceStatus();\n if (!service.installed) {\n log.warn(\n 'Portless reported success but the service is not registered — check `portless service status`.',\n );\n return false;\n }\n log.success('Portless starts at boot now.');\n return true;\n}\n\nexport const installPortlessCommand = new Command('portless')\n .description(\n 'Install Portless and start its proxy at boot, so https://<box>.localhost URLs survive a reboot.',\n )\n .option('--uninstall', 'remove the Portless startup service (leaves the CLI installed)')\n .option('-y, --yes', 'no prompts: install the CLI and the startup service')\n .action(async (opts: InstallPortlessOptions) => {\n intro('agentbox install portless');\n\n if (opts.uninstall === true) {\n const ok = await uninstallPortlessService();\n if (ok) outro('Portless startup service removed.');\n else {\n log.warn('Could not remove the service — run `portless service uninstall`.');\n outro('nothing changed');\n }\n return;\n }\n\n let state = await detectPortless();\n if (!state.installed) {\n const s = spinner();\n s.start(`installing portless (${portlessInstallHint()})`);\n const ok = await installPortless();\n resetPortlessCache();\n s.stop(ok ? 'portless installed' : 'portless install failed');\n if (!ok) {\n log.warn(`Run \\`${portlessInstallHint()}\\` yourself, then re-run this command.`);\n outro('nothing changed');\n return;\n }\n state = await detectPortless();\n }\n\n const service = await portlessServiceStatus();\n if (service.installed) {\n log.info('Portless startup service already installed.');\n } else if (opts.yes === true) {\n await runServiceInstall();\n } else if (process.stdin.isTTY) {\n await offerPortlessService();\n } else {\n // Installing the service raises a password dialog. Never do that from a\n // script or a hook that nobody is watching — say what to run instead.\n log.info('Startup service not installed — run `agentbox install portless -y` to add it.');\n }\n\n // Whether or not the service went in, leave the host with a live proxy —\n // the service starts one at *boot*, not retroactively for this session.\n state = await ensurePortlessProxy({ allowRootPrompt: false });\n if (!state.proxyRunning) {\n log.warn('No Portless proxy is running — box URLs fall back to loopback ports.');\n outro('done, with warnings');\n return;\n }\n\n // Show the real URL rather than an assumed one: whether it carries a port\n // and which scheme it uses is decided by whichever proxy actually answered.\n const hubUrl = await portlessGetUrl('agentbox');\n const boxUrl = hubUrl.replace('//agentbox.', '//<box>.');\n note([`hub: ${hubUrl}`, `boxes: ${boxUrl}`].join('\\n'), 'URLs served by this proxy');\n outro('portless ready');\n });\n","import { confirm, log, spinner } from '@agentbox/cli-kit';\nimport { loadEffectiveConfig, setConfigValue } from '@agentbox/config';\nimport {\n detectPortless,\n type DockerEngine,\n ensurePortlessProxy,\n installPortless,\n portlessInstallHint,\n portlessServiceHint,\n portlessStartHint,\n resetPortlessCache,\n} from '@agentbox/sandbox-docker';\nimport { offerPortlessService } from './commands/install-portless.js';\n\nexport interface PortlessPromptArgs {\n engine: DockerEngine;\n /** Effective `portless.enabled` — `undefined` means \"never prompted\". */\n enabled: boolean | undefined;\n yes: boolean;\n /** cwd for the config write (global scope resolves a fixed path regardless). */\n cwd: string;\n}\n\n/**\n * Bring the host Portless into a usable state after the user opts in: install\n * the CLI if missing, then start a proxy if none is running. We start the\n * default HTTPS proxy on :443 so box web apps get the clean\n * `https://<box>.localhost` (no port). Portless self-elevates via `sudo`, so\n * this asks for the host password once — a native GUI dialog on macOS. If the\n * user dismisses that prompt (or elevation fails) we fall back to the no-root\n * proxy (`--no-tls -p 1355`, `http://<box>.localhost:1355`) so create still\n * works. Best-effort — any failure degrades to a printed hint, never throws.\n *\n * `allowRootPrompt` gates the :443 attempt: the Docker path only reaches here\n * after an interactive \"yes\", but the Hetzner path calls this directly, so it\n * passes `false` for non-interactive / `--yes` runs to avoid a surprise\n * password dialog (falling straight through to the no-root :1355 proxy).\n *\n * The :443 preference is not cosmetic. `https://<box>.localhost` is the URL a\n * cloud box mirrors internally and the one users hand-write against\n * `{{AGENTBOX_BOX_HOST}}`, so host and box only agree while the host proxy\n * serves that exact scheme and port.\n */\nexport async function setupPortlessHost(opts: { allowRootPrompt?: boolean } = {}): Promise<void> {\n const allowRootPrompt = opts.allowRootPrompt ?? true;\n let state = await detectPortless();\n\n if (!state.installed) {\n const s = spinner();\n s.start('installing portless (npm install -g portless)');\n const ok = await installPortless();\n resetPortlessCache();\n s.stop(ok ? 'portless installed' : 'portless install failed');\n if (!ok) {\n log.warn(`Could not install Portless — run \\`${portlessInstallHint()}\\` yourself.`);\n return;\n }\n state = await detectPortless();\n }\n\n if (state.proxyRunning) {\n log.info('Portless proxy already running — boxes will use it.');\n // Running now, but a manually started proxy is gone after the next reboot.\n if (allowRootPrompt) await offerPortlessService();\n return;\n }\n\n // `ensurePortlessProxy` runs the ladder: the clean :443 proxy when we may ask\n // for a password, the no-root port when that is refused or already the mode\n // this host uses. No spinner around the root attempt — the elevation prompt is\n // modal and shouldn't race one.\n if (allowRootPrompt) {\n log.info(\n 'Starting the Portless proxy on https://<box>.localhost — you may be asked for your password.',\n );\n state = await ensurePortlessProxy({ allowRootPrompt: true });\n } else {\n const s = spinner();\n s.start('starting portless proxy');\n state = await ensurePortlessProxy({ allowRootPrompt: false });\n // No port asserted here: which port comes back is whichever one this host is\n // already configured for. The real URL is resolved via `portless get`.\n s.stop(state.proxyRunning ? 'portless proxy started' : 'portless proxy did not start');\n }\n\n if (!state.proxyRunning) {\n log.warn(\n `Could not start the Portless proxy — run \\`${portlessServiceHint()}\\` (starts it at boot) ` +\n `or \\`${portlessStartHint()}\\` for a one-off.`,\n );\n return;\n }\n if (allowRootPrompt) {\n log.success('Portless proxy started');\n await offerPortlessService();\n }\n}\n\n/**\n * Effective `portless.enabled`, resolved against the cwd so the global layer is\n * picked up. Best effort — a config read failure leaves it `undefined`, which\n * every caller treats as \"never decided\", not as an opt-out.\n */\nexport async function resolvePortlessEnabled(): Promise<boolean | undefined> {\n try {\n const cfg = await loadEffectiveConfig(process.cwd());\n return cfg.effective.portless.enabled;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Bring an already-opted-in host back to a working state without asking\n * anything. A proxy dies on reboot while its route registry survives, so\n * `portless get` keeps answering with URLs that resolve to nothing until\n * something restarts it — and before this, nothing did. Every entry point that\n * is about to hand out a `<box>.localhost` URL calls this.\n *\n * Silent by design: it never prompts for a password (the tray app, the queue\n * worker and `self-update` all reach here). It restarts the mode this host is\n * already configured for and never switches modes, so a host on the clean\n * HTTPS :443 proxy — which needs root — gets a pointer to the one-time fix\n * rather than a silently different URL. Warns once, at most.\n */\nexport async function ensurePortlessProxyQuietly(): Promise<void> {\n const state = await ensurePortlessProxy({ allowRootPrompt: false });\n if (!state.installed || state.proxyRunning) return;\n log.warn(\n `Portless proxy is not running — box URLs fall back to loopback ports. ` +\n `Start it at boot with \\`${portlessServiceHint()}\\`.`,\n );\n}\n\n/**\n * First-run opt-in for Portless. On Docker Desktop there is no per-container\n * DNS, so we offer to give box web apps a friendly `<box>.localhost` URL. The\n * answer — yes or no — is persisted to the *global* config so the prompt fires\n * exactly once per machine; a \"yes\" also installs the CLI and starts the proxy\n * (see `setupPortlessHost`). Returns the resolved enabled flag.\n *\n * Silent no-op (returns the effective value) when: already decided in any\n * config layer or via --portless/--no-portless; non-interactive or --yes; or\n * the engine is OrbStack (which already has .orb.local).\n */\nexport async function maybePromptPortless(args: PortlessPromptArgs): Promise<boolean> {\n if (args.enabled !== undefined) {\n // Already decided — but \"decided\" only ever meant the *preference* was\n // stored. The proxy itself is not durable (a reboot kills it), so an\n // opted-in host used to sit here with dead `<box>.localhost` URLs forever.\n if (args.enabled) await ensurePortlessProxyQuietly();\n return args.enabled;\n }\n if (args.engine === 'orbstack') return false;\n // Non-interactive (`--yes`, CI, no TTY): can't prompt — adopt a running proxy\n // instead of forcing the user to opt in from a terminal first.\n if (!process.stdin.isTTY || args.yes) return resolvePortlessNonInteractive(args);\n\n const answer = await confirm({\n message:\n 'Use Portless to give box web apps a friendly local URL? ' +\n '(installs the portless CLI and starts a local proxy if needed)',\n initialValue: true,\n });\n\n try {\n await setConfigValue('global', 'portless.enabled', answer, args.cwd, { raw: false });\n } catch (err) {\n log.warn(\n `Could not save the Portless preference: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n\n if (answer) await setupPortlessHost();\n return answer;\n}\n\n/**\n * Resolve `portless.enabled` when we can't prompt — background queue jobs, the\n * tray app's hub-create path, `--yes`, CI. Honors an already-decided value\n * (config or `--portless`/`--no-portless`). Otherwise, on Docker Desktop, it\n * adopts an already-running Portless proxy — and persists the choice so later\n * runs skip re-detection, mirroring an interactive \"yes\" for a user who already\n * has Portless up. Without this, the first box started from the tray app never\n * uses Portless even though the proxy is live on :443, until the user happens to\n * run `agentbox` once from a real terminal. Never installs or starts a proxy\n * unasked; OrbStack needs no Portless (it has `.orb.local`).\n */\nexport async function resolvePortlessNonInteractive(args: {\n engine: DockerEngine;\n enabled: boolean | undefined;\n cwd: string;\n}): Promise<boolean> {\n if (args.enabled !== undefined) {\n if (args.enabled) await ensurePortlessProxyQuietly();\n return args.enabled;\n }\n if (args.engine === 'orbstack') return false;\n const state = await detectPortless();\n if (state.proxyRunning) {\n try {\n await setConfigValue('global', 'portless.enabled', true, args.cwd, { raw: false });\n } catch {\n // Best-effort persist; still use the running proxy for this run.\n }\n }\n return state.proxyRunning;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAS,KAAK,eAAe;AAW7B,SAAS,WAAAA,gBAAe;;;ACKxB,SAAS,eAAe;AAwBxB,eAAsB,uBAAsC;AAC1D,MAAI,CAAC,QAAQ,MAAM,MAAO;AAC1B,QAAM,UAAU,MAAM,sBAAsB;AAC5C,MAAI,QAAQ,UAAW;AAEvB,QAAM,MAAM,MAAM,QAAQ;AAAA,IACxB,SACE;AAAA,IAEF,cAAc;AAAA,EAChB,CAAC;AACD,MAAI,CAAC,KAAK;AACR,SAAI,KAAK,oEAA+D;AACxE;AAAA,EACF;AACA,QAAM,kBAAkB;AAC1B;AAMA,eAAe,oBAAsC;AAMnD,OAAI;AAAA,IACF;AAAA,EAGF;AACA,QAAM,MAAM,MAAM,uBAAuB;AACzC,qBAAmB;AACnB,MAAI,QAAQ,aAAa;AACvB,SAAI,KAAK,oEAA+D;AACxE,WAAO;AAAA,EACT;AACA,MAAI,QAAQ,UAAU;AACpB,SAAI,KAAK,uFAAkF;AAC3F,WAAO;AAAA,EACT;AACA,QAAM,UAAU,MAAM,sBAAsB;AAC5C,MAAI,CAAC,QAAQ,WAAW;AACtB,SAAI;AAAA,MACF;AAAA,IACF;AACA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EACvF,OAAO,OAAO,KAAa,SAA2B;AACrD,MAAI;AACF,UAAM,WAAW,MAAM,cAAc,KAAK,KAAK,GAAG;AAClD,QAAI,CAAC,SAAU;AAIf,UAAM,gBAAgB,MAAM,wBAAwB,KAAK,KAAK;AAAA,MAC5D,OAAO;AAAA,MACP,YAAY;AAAA,IACd,CAAC;AACD,UAAM,UAAU,gBAAgB,IAAI,cAAc,aAAa,IAAI;AACnE,UAAM,MAAM,MAAM,YAAY;AAAA,MAC5B,KAAK,SAAS;AAAA,MACd;AAAA,MACA,iBAAiB,SAAS;AAAA,MAC1B,KAAK,CAAC,SAAS,IAAI,KAAK,IAAI;AAAA,IAC9B,CAAC;AACD,UAAM,QAAQ,IAAI,cACd,aAAa,IAAI,WAAW,KAC5B;AACJ,QAAI;AAAA,MACF,GAAG,IAAI,YAAY,cAAc,SAAS,IAAI,IAAI,OAAO,IAAI,KAAK,IAAI,OAAO,QAAQ,IAAI,IAAI,OAAO,OAAO,aAAa,EAAE,YAAO,KAAK;AAAA,IACxI;AACA,QAAI,IAAI,gBAAgB;AACtB,UAAI;AAAA,QACF;AAAA,MAEF;AAAA,IACF;AAAA,EACF,SAAS,KAAK;AACZ,QAAI,eAAe,qBAAqB;AACtC,UAAI,MAAM,GAAG,IAAI,OAAO,wDAAwD;AAChF,cAAQ,WAAW;AACnB;AAAA,IACF;AACA,yBAAqB,GAAG;AAAA,EAC1B;AACF,CAAC;AAEI,IAAM,aAAa,IAAIA,SAAQ,KAAK,EACxC;AAAA,EACC;AAGF,EACC,WAAW,UAAU,EAAE,WAAW,KAAK,CAAC,EACxC,WAAW,SAAS,EACpB,WAAW,SAAS,EACpB,WAAW,OAAO,EAClB,WAAW,UAAU,EACrB,WAAW,OAAO,EAClB,WAAW,QAAQ;AAKtB,WAAW,OAAO,wBAAyB,YAAW,WAAW,GAAG;","names":["Command","Command","s"]}
1
+ {"version":3,"sources":["../src/commands/hub.ts","../src/commands/install-portless.ts","../src/portless-prompt.ts"],"sourcesContent":["import { spawn } from 'node:child_process';\nimport { readFile } from 'node:fs/promises';\nimport { log, spinner } from '@clack/prompts';\nimport { loadEffectiveConfig } from '@agentbox/config';\nimport {\n ensureHub,\n getHubStatus,\n stopHub,\n controlPlaneDeployPath,\n hostOpenCommand,\n type HubStatus,\n type ControlPlaneDeployRecord,\n} from '@agentbox/sandbox-core';\nimport { Command } from 'commander';\nimport { handleLifecycleError } from './_errors.js';\nimport { rehydrateFromState } from './relay.js';\nimport { ensurePortlessProxyQuietly, resolvePortlessEnabled } from '../portless-prompt.js';\nimport {\n resolveCustodyApiTarget,\n resolveHubApiTarget,\n controlPlaneSubcommands,\n probeControlPlaneStatus,\n localExposedLoopbackUrl,\n} from './control-plane.js';\nimport { restoreTunnelIfExposed, stopTunnelIfExposed } from '../control-plane/expose.js';\nimport { loadControlPlaneEnv } from '../control-plane/env-file.js';\nimport { channelOfVersion } from '../lib/channel.js';\nimport { AGENTBOX_VERSION } from '../version.js';\nimport { CustodyClient } from '../control-plane/custody-client.js';\nimport { HubApiClient } from '../control-plane/hub-api-client.js';\nimport type { HubApiBox } from '../control-plane/hub-api-client.js';\nimport { pullBoxSshKeys } from '../control-plane/hub-pull.js';\nimport { adoptHubBox, HubBoxNotFoundError } from '../control-plane/hub-adopt.js';\n\n/**\n * Resolve `portless.enabled` and, when the user has opted in, make sure a proxy\n * is actually up before the hub reports its URL — a proxy does not survive a\n * reboot, so \"the hub is on agentbox.localhost\" was regularly a lie. Only\n * `true` starts one: an unset preference still registers the alias (that costs\n * nothing) but must not spawn a daemon nobody asked for.\n */\nasync function resolvePortlessForHub(): Promise<boolean | undefined> {\n const enabled = await resolvePortlessEnabled();\n if (enabled === true) await ensurePortlessProxyQuietly();\n return enabled;\n}\n\n/** Best-effort: open the hub URL in the host browser (never throws). */\nfunction openInBrowser(url: string): void {\n try {\n const child = spawn(hostOpenCommand(), [url], { detached: true, stdio: 'ignore' });\n child.unref();\n } catch {\n /* the caller has already printed the URL */\n }\n}\n\n/**\n * The client-facing hub the CLI + tray talk to. `mode` is `remote` when a control\n * box is configured, else `local`. `token` is the single Bearer that authorizes\n * both `/api/v1` and the `/api/events` SSE stream (the local hub token, or\n * `AGENTBOX_HUB_API_KEY` for the remote control box).\n */\nexport interface HubTarget {\n mode: 'local' | 'remote';\n url: string;\n token: string;\n /**\n * Whether that hub is a process on THIS machine. `mode` alone can't answer it:\n * a `hub expose`-d machine is its own control box, so it is `remote`-shaped\n * (password profile, keyed by `AGENTBOX_HUB_API_KEY`) while still running\n * here. Callers that need to *start* or *stop* the hub — rather than merely\n * call it — have to branch on this, not on `mode`.\n */\n onThisMachine: boolean;\n}\n\n/**\n * Resolve the hub the CLI should talk to: the remote control box when one is\n * configured (`--url` > `relay.controlPlaneUrl`, with `AGENTBOX_HUB_API_KEY`),\n * else the local hub (`127.0.0.1:<port>` + `~/.agentbox/hub/token`). Surfaced to\n * the macOS tray via `agentbox hub target --json` so it follows the same config\n * (it can't parse the layered config itself). One Bearer authorizes both surfaces\n * in either mode (see `apps/hub/proxy.ts`).\n *\n * `preferLocal` prefers the hub on THIS machine even when a remote control box is\n * configured — the \"which hub\" knob for callers that have decided an operation\n * belongs here (e.g. a `cloud.viaHub=false` bake, or a base whose artifact lands\n * here). It skips only the configured REMOTE control-plane URL; it does NOT skip\n * the loopback branch, because a `hub expose`-d machine's hub IS on this machine\n * yet runs the password profile (its `/api/v1` wants `AGENTBOX_HUB_API_KEY` over\n * loopback, not the plain `~/.agentbox/hub/token`). Same precedence ladder as the\n * default, minus the remote URL — never a second resolver that could disagree.\n */\nexport async function resolveHubTarget(\n urlFlag?: string,\n opts: { preferLocal?: boolean } = {},\n): Promise<HubTarget> {\n const cfg = await loadEffectiveConfig(process.cwd());\n const url = (urlFlag ?? cfg.effective.relay.controlPlaneUrl ?? '').replace(/\\/$/, '');\n // A control box that IS this machine (`hub expose`) is reached over loopback,\n // not the box-facing LAN/tunnel URL — but it's still the `remote`-shaped API\n // (password profile, /api/v1 keyed by AGENTBOX_HUB_API_KEY). This is ALSO the\n // `preferLocal` answer for an exposed machine: the hub is right here, so the\n // plain local-hub token below would 401 against its password profile.\n //\n // Checked BEFORE the configured URL is required, because the two can disagree:\n // `hub unset-url` clears the config but leaves the exposed record, and the hub\n // keeps running the password profile. Falling through to local mode then\n // handed out the localhost token — which that hub does not accept — so\n // `hub target`, and the tray that follows it, pointed at the wrong credential.\n const loopback = urlFlag ? null : await localExposedLoopbackUrl();\n if (loopback) {\n loadControlPlaneEnv();\n return {\n mode: 'remote',\n url: loopback,\n token: process.env.AGENTBOX_HUB_API_KEY ?? '',\n onThisMachine: true,\n };\n }\n // The configured REMOTE control box — skipped under preferLocal so the caller\n // gets this machine's plain local hub instead (the not-exposed local case).\n if (url && !opts.preferLocal) {\n loadControlPlaneEnv();\n return {\n mode: 'remote',\n url,\n token: process.env.AGENTBOX_HUB_API_KEY ?? '',\n onThisMachine: false,\n };\n }\n const s = await getHubStatus();\n return {\n mode: 'local',\n url: `http://127.0.0.1:${String(s.port)}`,\n token: s.token ?? '',\n onThisMachine: true,\n };\n}\n\ninterface StatusOpts {\n url?: string;\n json?: boolean;\n}\n\nfunction renderStatus(s: HubStatus, exposed?: ControlPlaneDeployRecord | null): string {\n // The exposed CONFIG is a property of the machine, not of the running process,\n // so it is reported whether or not the hub is up. Reporting it only while\n // running made a stopped control box look like a plain local hub — with\n // autostart still installed and boxes still pointed at it.\n const exposedLines = exposed\n ? [\n ...(exposed.publicUrl ? [` box-facing url: ${exposed.publicUrl}`] : []),\n ...(exposed.tunnel ? [` tunnel: ${exposed.tunnel}`] : []),\n ...(exposed.autostart ? [' autostart: on'] : []),\n ]\n : [];\n if (s.running) {\n // `mode` describes the PROCESS, so it stays keyed on the live profile: a hub\n // running plain on a machine that is configured exposed is exactly the\n // mismatch worth seeing.\n const mode =\n s.profile === 'hetzner'\n ? [` mode: exposed (control box${s.worker ? ', worker on' : ''})`]\n : exposed\n ? [' mode: NOT exposed yet (configured, but this process is the plain hub)']\n : [];\n return [\n `hub: running${s.ui ? '' : ' (bare relay on the port — no UI; run `agentbox hub start`)'}`,\n ` pid: ${s.pid === null ? '?' : String(s.pid)}`,\n ` port: ${String(s.port)}`,\n ` url: ${s.openUrl}`,\n ...mode,\n ...exposedLines,\n ` log: ${s.logFile}`,\n // A rebuild under a live hub only fails LATER, on the first lazy import\n // (\"Cannot find module 'dist-XXXX.js'\"). Say so here, where someone is\n // already looking, instead of leaving them to decode that at the call site.\n ...(s.staleBundle\n ? [' stale: rebuilt since this hub started — run `agentbox hub restart`']\n : []),\n ].join('\\n');\n }\n const stoppedExposed = exposed ? [' mode: exposed (configured; the hub is not running)'] : [];\n if (s.pidAlive) {\n return [\n `hub: not responding (pid ${String(s.pid)} alive but /healthz silent)`,\n ...stoppedExposed,\n ...exposedLines,\n ` log: ${s.logFile}`,\n ].join('\\n');\n }\n return ['hub: not running', ...stoppedExposed, ...exposedLines, ` log: ${s.logFile}`].join(\n '\\n',\n );\n}\n\n/**\n * What `hub deploy` recorded for the control box at `url` — the only trace of\n * which build a remote hub is running (the VPS keeps no version marker, and in\n * package mode not even a git checkout to `rev-parse`). Matched on URL so a\n * `--url` probe of somebody else's hub doesn't get this machine's record.\n * Best-effort: an absent or unreadable record just omits the line.\n */\nasync function readDeployRecordFor(url: string): Promise<ControlPlaneDeployRecord | null> {\n try {\n const rec = JSON.parse(\n await readFile(controlPlaneDeployPath(), 'utf8'),\n ) as ControlPlaneDeployRecord;\n return rec.url === url ? rec : null;\n } catch {\n return null;\n }\n}\n\n/** The deploy record for a control box that IS this machine (`hub expose`), or null. */\nasync function readLocalDeployRecord(): Promise<ControlPlaneDeployRecord | null> {\n try {\n const rec = JSON.parse(\n await readFile(controlPlaneDeployPath(), 'utf8'),\n ) as ControlPlaneDeployRecord;\n return rec.provider === 'local' ? rec : null;\n } catch {\n return null;\n }\n}\n\nexport interface RemoteHubBuild {\n /** The version the hub reports, else the version that was deployed. */\n version: string | null;\n /** Where `version` came from — a live probe beats a local record. */\n versionSource: 'live' | 'deployed' | null;\n /** `nightly` / `stable`, or `source (<ref>)` for a build-from-source box. */\n channel: string | null;\n /** The deploy record's build line, e.g. `@madarco/agentbox@0.28.0 (npm)`. */\n build: string | null;\n /** Set when the control box runs a different version than this CLI. */\n drift: string | null;\n}\n\n/**\n * Reconcile what the hub reports with what this machine deployed.\n *\n * The live version wins: the record only says what was last *deployed*, which is\n * wrong after a failed update, and is absent entirely for a hub someone else set\n * up. A control box built before the images exported `AGENTBOX_CLI_VERSION`\n * reports nothing, so the record is the fallback rather than the source.\n *\n * Pure so the precedence is unit-testable.\n */\nexport function describeRemoteHubBuild(input: {\n liveVersion?: string | undefined;\n record: ControlPlaneDeployRecord | null;\n cliVersion: string;\n}): RemoteHubBuild {\n const source = input.record?.source ?? null;\n const build = source\n ? source.kind === 'package'\n ? `@madarco/agentbox@${source.spec} (npm)`\n : `${source.repoUrl}@${source.repoRef} (built from source)`\n : null;\n // A spec may be a dist-tag or a range (`--package nightly`), not a version.\n // Treating one as a version would print `version: nightly` and, worse, classify\n // it `stable` — `channelOfVersion` only looks for a `-nightly.` suffix. Until\n // the hub reports what it actually installed, we simply don't know.\n const deployedVersion =\n source?.kind === 'package' && /^\\d+\\.\\d+\\.\\d+/.test(source.spec) ? source.spec : null;\n const version = input.liveVersion ?? deployedVersion;\n const versionSource = input.liveVersion ? 'live' : deployedVersion ? 'deployed' : null;\n // A source build's \"channel\" is the ref itself — which is the branch the user\n // actually cares about (`nightly`, `main`, a feature branch).\n const channel =\n source?.kind === 'source'\n ? `source (${source.repoRef})`\n : version\n ? channelOfVersion(version)\n : null;\n // Only meaningful for a version we know is live; a stale record would nag forever.\n const drift =\n input.liveVersion && input.liveVersion !== input.cliVersion\n ? `this CLI is ${input.cliVersion} — run \\`agentbox hub update\\` to match`\n : null;\n return { version, versionSource, channel, build, drift };\n}\n\nconst statusSub = new Command('status')\n .description(\n 'Show hub status — the remote control box (reachability + box/event counts) when one is configured, else the local hub process',\n )\n .option(\n '--url <url>',\n 'probe this control-plane URL as the remote hub (default: relay.controlPlaneUrl)',\n )\n .option('--json', 'emit status as JSON')\n .action(async (opts: StatusOpts) => {\n try {\n // A control box that IS this machine (`hub expose`): show the exposed\n // detail (profile, worker, box-facing URL, tunnel) that a plain remote\n // probe of its loopback can't. Skipped when `--url` targets another hub.\n const localExposed = opts.url ? null : await readLocalDeployRecord();\n if (localExposed) {\n const s = await getHubStatus();\n if (opts.json) {\n process.stdout.write(JSON.stringify({ ...s, exposed: localExposed }, null, 2) + '\\n');\n return;\n }\n process.stdout.write(renderStatus(s, localExposed) + '\\n');\n return;\n }\n const target = await resolveHubTarget(opts.url);\n // Remote (a control box is configured, or --url given): probe its /healthz.\n if (target.mode === 'remote') {\n const st = await probeControlPlaneStatus(target.url);\n const record = await readDeployRecordFor(st.url);\n const b = describeRemoteHubBuild({\n liveVersion: st.version,\n record,\n cliVersion: AGENTBOX_VERSION,\n });\n if (opts.json) {\n process.stdout.write(\n JSON.stringify({\n ...st,\n ...(b.version ? { version: b.version, versionSource: b.versionSource } : {}),\n ...(b.channel ? { channel: b.channel } : {}),\n ...(b.build ? { deployed: b.build } : {}),\n }) + '\\n',\n );\n return;\n }\n // Copies between a box and THIS machine are served by this machine's\n // relay draining the control box's queue. With it down they fall back to\n // the hub's cached copy (or fail) — a degradation worth naming here,\n // where someone is already asking how the hub is doing.\n const drainer = (await getHubStatus()).running\n ? []\n : [\n ' local: this machine is not draining host actions — `cp` between a box and',\n ' your files will use the hub cache; run `agentbox relay start` to serve live',\n ];\n process.stdout.write(\n [\n `hub: remote (${st.healthy ? 'reachable' : 'UNREACHABLE'})`,\n ` url: ${st.url}`,\n ` health: ${st.detail}`,\n ...drainer,\n ...(b.version\n ? [` version: ${b.version}${b.versionSource === 'deployed' ? ' (as deployed)' : ''}`]\n : []),\n ...(b.channel ? [` channel: ${b.channel}`] : []),\n ...(b.build ? [` build: ${b.build}`] : []),\n ...(b.drift ? [` update: ${b.drift}`] : []),\n ].join('\\n') + '\\n',\n );\n return;\n }\n // Local: introspect the hub daemon process on this machine.\n const s = await getHubStatus();\n // When exposed, the deploy record carries the box-facing URL / tunnel /\n // autostart that /healthz doesn't.\n const exposed = s.profile === 'hetzner' ? await readLocalDeployRecord() : null;\n if (opts.json) {\n process.stdout.write(\n JSON.stringify({ ...s, ...(exposed ? { exposed } : {}) }, null, 2) + '\\n',\n );\n return;\n }\n process.stdout.write(renderStatus(s, exposed) + '\\n');\n } catch (err) {\n handleLifecycleError(err);\n }\n });\n\nconst targetSub = new Command('target')\n .description(\n 'Print the hub the CLI talks to — the remote control box when configured, else the local hub — with its API token. The seam the macOS tray follows to point at the same hub.',\n )\n .option('--url <url>', 'override the control-plane URL (default: relay.controlPlaneUrl)')\n .option('--json', 'emit { mode, url, token } as JSON (consumed by the tray)')\n .action(async (opts: { url?: string; json?: boolean }) => {\n try {\n const t = await resolveHubTarget(opts.url);\n if (opts.json) {\n process.stdout.write(JSON.stringify(t) + '\\n');\n return;\n }\n const tokenNote = t.token\n ? 'present'\n : t.mode === 'remote'\n ? '(none — set AGENTBOX_HUB_API_KEY, or run `agentbox hub setup`)'\n : '(none — start the hub with `agentbox hub`)';\n process.stdout.write(\n [`hub: ${t.mode}`, ` url: ${t.url}`, ` token: ${tokenNote}`].join('\\n') + '\\n',\n );\n } catch (err) {\n handleLifecycleError(err);\n }\n });\n\ninterface StartOpts {\n open?: boolean;\n local?: boolean;\n}\n\n/**\n * With a remote control box configured, `agentbox hub` opens THAT hub instead of\n * starting one here: it is the hub this CLI already talks to, it holds the boxes,\n * and booting a second empty UI on 127.0.0.1 only invites acting on the wrong\n * one. Nothing is lost by not starting it — every local operation that needs the\n * hub on this machine auto-starts it (`resolveHubApiClient`), and `--local`\n * forces it explicitly.\n *\n * A `hub expose`-d machine is excluded: it *is* the control box, so the hub to\n * open is the one to start (hence `onThisMachine`, not `mode`).\n */\nasync function openRemoteHub(target: HubTarget, opts: StartOpts): Promise<void> {\n const s = spinner();\n s.start(`reaching the control box at ${target.url}`);\n const st = await probeControlPlaneStatus(target.url);\n s.stop(\n st.healthy ? `control box reachable — ${st.detail}` : `control box UNREACHABLE (${st.detail})`,\n );\n process.stdout.write(`\\n Open: ${target.url}\\n\\n`);\n if (!st.healthy) {\n log.warn(\n 'Opening it anyway. `agentbox hub status` has the detail; ' +\n '`agentbox hub start --local` runs a hub on this machine instead.',\n );\n }\n if (opts.open !== false) openInBrowser(target.url);\n}\n\nconst startSub = new Command('start')\n .description(\n 'Open the hub — the remote control box when one is configured, else start the local hub (relay + Web UI on port 8787) and open it',\n )\n .option('--no-open', \"don't open the browser, just print the URL\")\n .option('--local', 'start the hub on this machine even when a control box is configured')\n .action(async (opts: StartOpts) => {\n try {\n if (opts.local !== true) {\n const target = await resolveHubTarget();\n if (!target.onThisMachine) {\n await openRemoteHub(target, opts);\n return;\n }\n }\n const s = spinner();\n s.start('starting hub');\n // If this machine is an exposed control box with a tunnel, (re)establish it\n // first so the hub boots knowing its public URL (autostart path).\n await restoreTunnelIfExposed((line) => s.message(line));\n const ep = await ensureHub({\n onLog: (line) => s.message(line),\n portlessEnabled: await resolvePortlessForHub(),\n });\n await rehydrateFromState();\n s.stop(`hub running on ${ep.hostUrl}`);\n process.stdout.write(`\\n Open: ${ep.openUrl}\\n\\n`);\n if (opts.open !== false) openInBrowser(ep.openUrl);\n } catch (err) {\n handleLifecycleError(err);\n }\n });\n\nconst stopSub = new Command('stop')\n .description('Stop the hub process (idempotent)')\n .action(async () => {\n try {\n const s = spinner();\n s.start('stopping hub');\n const result = await stopHub();\n // A tunnel outliving the hub serves nothing and, worse, the next\n // `hub start` would spawn a second one over it. Idempotent + no-op when\n // this machine isn't exposed.\n await stopTunnelIfExposed((line) => s.message(line));\n s.stop(result.stopped ? `stopped hub (pid ${String(result.pid)})` : 'hub was not running');\n } catch (err) {\n handleLifecycleError(err);\n }\n });\n\nconst restartSub = new Command('restart')\n .description('Stop then start the hub')\n .option('--no-open', \"don't open the browser, just print the URL\")\n .action(async (opts: StartOpts) => {\n try {\n const s = spinner();\n s.start('stopping hub');\n const stopped = await stopHub();\n s.stop(stopped.stopped ? `stopped hub (pid ${String(stopped.pid)})` : 'hub was not running');\n const s2 = spinner();\n s2.start('starting hub');\n try {\n await restoreTunnelIfExposed((line) => s2.message(line));\n const ep = await ensureHub({\n onLog: (line) => s2.message(line),\n portlessEnabled: await resolvePortlessForHub(),\n });\n await rehydrateFromState();\n s2.stop(`hub running on ${ep.hostUrl}`);\n process.stdout.write(`\\n Open: ${ep.openUrl}\\n\\n`);\n if (opts.open !== false) openInBrowser(ep.openUrl);\n } catch (err) {\n s2.stop('hub start failed');\n log.warn(err instanceof Error ? err.message : String(err));\n throw err;\n }\n } catch (err) {\n handleLifecycleError(err);\n }\n });\n\n/**\n * Resolve a box ref through the hub's `/api/v1` (server-side `findBox`) for the\n * `hub pull` / `hub adopt` commands. Returns the unique match + the hub API URL\n * (persisted on the adopted record), or null after printing an actionable error\n * — an ambiguous prefix lists the candidates, a total miss throws\n * {@link HubBoxNotFoundError} for the caller's catch to render.\n */\nasync function resolveHubBox(\n ref: string,\n urlFlag: string | undefined,\n): Promise<{ box: HubApiBox; url: string } | null> {\n const target = await resolveHubApiTarget(urlFlag);\n if (!target) {\n process.exitCode = 1;\n return null;\n }\n const matches = await new HubApiClient(target).resolveBox(ref);\n if (matches.length === 0) throw new HubBoxNotFoundError(ref);\n if (matches.length > 1) {\n log.error(`'${ref}' matches multiple boxes on the control box — pick one:`);\n for (const b of matches) process.stderr.write(` ${b.name ?? b.id} (id ${b.id})\\n`);\n log.info('retry with a longer id prefix, the full name, or the sandbox id');\n process.exitCode = 1;\n return null;\n }\n return { box: matches[0]!, url: target.url };\n}\n\nconst pullSub = new Command('pull')\n .description(\n \"Download a control-box-created box's SSH keys so this PC can attach / port-forward / cp to it\",\n )\n .argument('<box>', 'box id or name as shown by `agentbox hub boxes list`')\n .option('--url <url>', 'override the control-plane URL (default: relay.controlPlaneUrl)')\n .action(async (box: string, opts: { url?: string }) => {\n try {\n const resolved = await resolveHubBox(box, opts.url);\n if (!resolved) return;\n // SSH keys live in custody, over the hub's /api/v1: the byte-read needs the\n // admin token (elevated), so this only works from a machine that ran\n // `hub setup`/`expose`. remoteOnly — a control-box box has no keys on a\n // plain local hub.\n const custodyTarget = await resolveCustodyApiTarget(opts.url, { remoteOnly: true });\n if (!custodyTarget) {\n process.exitCode = 1;\n return;\n }\n const res = await pullBoxSshKeys({\n custody: new CustodyClient(custodyTarget),\n box: resolved.box,\n });\n if (res.files.length === 0) {\n log.warn(\n `No SSH key material in custody for '${box}' (boxes/${res.key}/ssh). ` +\n 'The box may mint no keypair (e2b/vercel).',\n );\n process.exitCode = 1;\n return;\n }\n log.success(\n `Pulled ${String(res.files.length)} key file(s) to ${res.dest} — attach / cp / port-forward now work.`,\n );\n } catch (err) {\n if (err instanceof HubBoxNotFoundError) {\n log.error(`${err.message}. Run \\`agentbox hub boxes list\\` to see what's there.`);\n process.exitCode = 1;\n return;\n }\n handleLifecycleError(err);\n }\n });\n\nconst adoptSub = new Command('adopt')\n .description(\n 'Rebuild local state for a control-box-created box so it resolves by name here: writes its BoxRecord and downloads its SSH keys. After this it shows in `agentbox ls` and works with attach / cp / url / screen.',\n )\n .argument('<box>', 'box id, name, or sandbox id as shown by `agentbox hub boxes list`')\n .option('--url <url>', 'override the control-plane URL (default: relay.controlPlaneUrl)')\n .action(async (box: string, opts: { url?: string }) => {\n try {\n const resolved = await resolveHubBox(box, opts.url);\n if (!resolved) return;\n // SSH keys come from custody over /api/v1 (best-effort): a thin client with\n // no admin token adopts the record and warns for SSH providers (the byte-read\n // is refused). remoteOnly — adoption is a control-box concern.\n const custodyTarget = await resolveCustodyApiTarget(opts.url, {\n quiet: true,\n remoteOnly: true,\n });\n const custody = custodyTarget ? new CustodyClient(custodyTarget) : undefined;\n const res = await adoptHubBox({\n box: resolved.box,\n custody,\n controlPlaneUrl: resolved.url,\n log: (line) => log.info(line),\n });\n const where = res.projectRoot\n ? `linked to ${res.projectRoot}`\n : 'no local clone of its repo — it shows under `agentbox ls -g` only';\n log.success(\n `${res.refreshed ? 'Refreshed' : 'Adopted'} ${res.record.name} (${res.record.provider} ${res.record.cloud?.sandboxId ?? ''}) — ${where}.`,\n );\n if (res.sshKeysMissing) {\n log.warn(\n `But the control box has no SSH key for it, so attach / cp / port-forward won't work yet. ` +\n `The key is uploaded by the host that created the box — check that it ran with a control box configured.`,\n );\n }\n } catch (err) {\n if (err instanceof HubBoxNotFoundError) {\n log.error(`${err.message}. Run \\`agentbox hub boxes list\\` to see what's there.`);\n process.exitCode = 1;\n return;\n }\n handleLifecycleError(err);\n }\n });\n\nexport const hubCommand = new Command('hub')\n .description(\n 'Run + manage the AgentBox hub — the local relay + Web UI on http://127.0.0.1:8787 ' +\n '(also https://agentbox.localhost when Portless is installed), and the remote control box ' +\n '(setup, deploy, boxes, approvals, credentials, custody)',\n )\n .addCommand(startSub, { isDefault: true })\n .addCommand(statusSub)\n .addCommand(targetSub)\n .addCommand(stopSub)\n .addCommand(restartSub)\n .addCommand(pullSub)\n .addCommand(adoptSub);\n\n// Fold the remote-hub admin subcommands (setup/deploy/set-url/add/worker/\n// credentials/secrets/project/custody/boxes/approvals) into the one `hub` group —\n// there is no separate `control-plane` command. All surfaced (not hidden).\nfor (const sub of controlPlaneSubcommands) hubCommand.addCommand(sub);\n","/**\n * `agentbox install portless` — set up Portless properly, once, so box URLs\n * keep working across reboots.\n *\n * Portless (https://portless.sh) is what turns a box's published port into\n * `https://<box>.localhost`. AgentBox can install the CLI and start a proxy on\n * demand, but a proxy started that way is just a process: it dies with the\n * machine, while the route registry it serves survives on disk. The result is\n * the failure this command exists to remove — `portless get` keeps answering\n * with a URL, `agentbox hub` keeps printing it, and nothing is listening.\n *\n * Portless ships the fix (`portless service install`: a root LaunchDaemon on\n * macOS, systemd on Linux, a startup task on Windows), so this command drives\n * that rather than hand-rolling autostart, and pairs it with the CA trust the\n * HTTPS proxy needs.\n */\n\nimport { confirm, intro, log, note, outro, spinner } from '@agentbox/cli-kit';\nimport { Command } from 'commander';\nimport {\n detectPortless,\n ensurePortlessProxy,\n installPortless,\n installPortlessServiceDetailed,\n portlessGetUrl,\n portlessInstallHint,\n portlessServiceStatus,\n resetPortlessCache,\n uninstallPortlessService,\n} from '@agentbox/sandbox-docker';\n\ninterface InstallPortlessOptions {\n uninstall?: boolean;\n yes?: boolean;\n}\n\n/**\n * Offer to make an already-running proxy permanent. Interactive-only and\n * best-effort: called from the first-run opt-in and from this command, never\n * from a background path. A \"no\" is simply not repeated in that session — the\n * `doctor` row keeps the nudge visible without another prompt.\n */\nexport async function offerPortlessService(): Promise<void> {\n if (!process.stdin.isTTY) return;\n const service = await portlessServiceStatus();\n if (service.installed && service.failing !== true) return;\n\n const yes = await confirm({\n message:\n 'Start the Portless proxy automatically at boot? ' +\n '(otherwise box URLs stop working after every restart)',\n initialValue: true,\n });\n if (!yes) {\n log.info('Skipped — run `agentbox install portless` later to set it up.');\n return;\n }\n await runServiceInstall();\n}\n\n/**\n * Install the OS service, reporting what happened. Shared by the interactive\n * offer and the command itself.\n */\nasync function runServiceInstall(): Promise<boolean> {\n // The service runs Portless's default mode — HTTPS on :443 — so a host that\n // was on the no-root :1355 proxy moves to clean, port-less URLs. That is the\n // mode the rest of AgentBox is written against (a cloud box mirrors it\n // internally, and `{{AGENTBOX_BOX_HOST}}` templates spell `https://…` by\n // hand), but it *does* change existing box URLs, so say so before prompting.\n log.info(\n 'Installing the Portless startup service (HTTPS on port 443) — ' +\n 'you may be asked for your password. Box URLs become https://<box>.localhost ' +\n '(the same URL that works inside a box).',\n );\n const startedAt = Date.now();\n const { result: res, detail } = await installPortlessServiceDetailed();\n resetPortlessCache();\n if (res === 'cancelled') {\n log.warn('Password prompt dismissed — the proxy will not start at boot.');\n return false;\n }\n // The exit code is not the verdict: an install whose last step exits non-zero can\n // still leave a working service, and a clean exit can leave one crash-looping on a\n // port another proxy holds. Give launchd a moment to start it, then read the state.\n await new Promise((r) => setTimeout(r, 3000));\n const service = await portlessServiceStatus({ sinceMs: startedAt });\n if (service.installed && service.failing !== true) {\n log.success('Portless starts at boot now.');\n return true;\n }\n if (service.failing === true) {\n log.warn(\n 'The Portless startup service is installed but keeps failing: another proxy holds port 443 — ' +\n 'check `portless service status` and ~/.portless/service.log.',\n );\n return false;\n }\n log.warn(\n 'Could not install the Portless startup service' +\n (detail ? ` (${detail})` : '') +\n ' — run `portless service install`.',\n );\n return false;\n}\n\nexport const installPortlessCommand = new Command('portless')\n .description(\n 'Install Portless and start its proxy at boot, so https://<box>.localhost URLs survive a reboot.',\n )\n .option('--uninstall', 'remove the Portless startup service (leaves the CLI installed)')\n .option('-y, --yes', 'no prompts: install the CLI and the startup service')\n .action(async (opts: InstallPortlessOptions) => {\n intro('agentbox install portless');\n\n if (opts.uninstall === true) {\n const ok = await uninstallPortlessService();\n if (ok) outro('Portless startup service removed.');\n else {\n log.warn('Could not remove the service — run `portless service uninstall`.');\n outro('nothing changed');\n }\n return;\n }\n\n let state = await detectPortless();\n if (!state.installed) {\n const s = spinner();\n s.start(`installing portless (${portlessInstallHint()})`);\n const ok = await installPortless();\n resetPortlessCache();\n s.stop(ok ? 'portless installed' : 'portless install failed');\n if (!ok) {\n log.warn(`Run \\`${portlessInstallHint()}\\` yourself, then re-run this command.`);\n outro('nothing changed');\n return;\n }\n state = await detectPortless();\n }\n\n const service = await portlessServiceStatus();\n if (service.installed && service.failing !== true) {\n log.info('Portless startup service already installed.');\n } else if (opts.yes === true) {\n await runServiceInstall();\n } else if (process.stdin.isTTY) {\n await offerPortlessService();\n } else {\n // Installing the service raises a password dialog. Never do that from a\n // script or a hook that nobody is watching — say what to run instead.\n log.info('Startup service not installed — run `agentbox install portless -y` to add it.');\n }\n\n // Whether or not the service went in, leave the host with a live proxy —\n // the service starts one at *boot*, not retroactively for this session.\n state = await ensurePortlessProxy({ allowRootPrompt: false });\n if (!state.proxyRunning) {\n log.warn('No Portless proxy is running — box URLs fall back to loopback ports.');\n outro('done, with warnings');\n return;\n }\n\n // Show the real URL rather than an assumed one: whether it carries a port\n // and which scheme it uses is decided by whichever proxy actually answered.\n const hubUrl = await portlessGetUrl('agentbox');\n const boxUrl = hubUrl.replace('//agentbox.', '//<box>.');\n note([`hub: ${hubUrl}`, `boxes: ${boxUrl}`].join('\\n'), 'URLs served by this proxy');\n outro('portless ready');\n });\n","import { confirm, log, spinner } from '@agentbox/cli-kit';\nimport { loadEffectiveConfig, setConfigValue } from '@agentbox/config';\nimport {\n detectPortless,\n type DockerEngine,\n ensurePortlessProxy,\n installPortless,\n portlessInstallHint,\n portlessServiceHint,\n portlessStartHint,\n resetPortlessCache,\n} from '@agentbox/sandbox-docker';\nimport { offerPortlessService } from './commands/install-portless.js';\n\nexport interface PortlessPromptArgs {\n engine: DockerEngine;\n /** Effective `portless.enabled` — `undefined` means \"never prompted\". */\n enabled: boolean | undefined;\n yes: boolean;\n /** cwd for the config write (global scope resolves a fixed path regardless). */\n cwd: string;\n}\n\n/**\n * Bring the host Portless into a usable state after the user opts in: install\n * the CLI if missing, then start a proxy if none is running. We start the\n * default HTTPS proxy on :443 so box web apps get the clean\n * `https://<box>.localhost` (no port). Portless self-elevates via `sudo`, so\n * this asks for the host password once — a native GUI dialog on macOS. If the\n * user dismisses that prompt (or elevation fails) we fall back to the no-root\n * proxy (`--no-tls -p 1355`, `http://<box>.localhost:1355`) so create still\n * works. Best-effort — any failure degrades to a printed hint, never throws.\n *\n * `allowRootPrompt` gates the :443 attempt: the Docker path only reaches here\n * after an interactive \"yes\", but the Hetzner path calls this directly, so it\n * passes `false` for non-interactive / `--yes` runs to avoid a surprise\n * password dialog (falling straight through to the no-root :1355 proxy).\n *\n * The :443 preference is not cosmetic. `https://<box>.localhost` is the URL a\n * cloud box mirrors internally and the one users hand-write against\n * `{{AGENTBOX_BOX_HOST}}`, so host and box only agree while the host proxy\n * serves that exact scheme and port.\n */\nexport async function setupPortlessHost(opts: { allowRootPrompt?: boolean } = {}): Promise<void> {\n const allowRootPrompt = opts.allowRootPrompt ?? true;\n let state = await detectPortless();\n\n if (!state.installed) {\n const s = spinner();\n s.start('installing portless (npm install -g portless)');\n const ok = await installPortless();\n resetPortlessCache();\n s.stop(ok ? 'portless installed' : 'portless install failed');\n if (!ok) {\n log.warn(`Could not install Portless — run \\`${portlessInstallHint()}\\` yourself.`);\n return;\n }\n state = await detectPortless();\n }\n\n if (state.proxyRunning) {\n log.info('Portless proxy already running — boxes will use it.');\n // Running now, but a manually started proxy is gone after the next reboot.\n if (allowRootPrompt) await offerPortlessService();\n return;\n }\n\n // `ensurePortlessProxy` runs the ladder: the clean :443 proxy when we may ask\n // for a password, the no-root port when that is refused or already the mode\n // this host uses. No spinner around the root attempt — the elevation prompt is\n // modal and shouldn't race one.\n if (allowRootPrompt) {\n log.info(\n 'Starting the Portless proxy on https://<box>.localhost — you may be asked for your password.',\n );\n state = await ensurePortlessProxy({ allowRootPrompt: true });\n } else {\n const s = spinner();\n s.start('starting portless proxy');\n state = await ensurePortlessProxy({ allowRootPrompt: false });\n // No port asserted here: which port comes back is whichever one this host is\n // already configured for. The real URL is resolved via `portless get`.\n s.stop(state.proxyRunning ? 'portless proxy started' : 'portless proxy did not start');\n }\n\n if (!state.proxyRunning) {\n log.warn(\n `Could not start the Portless proxy — run \\`${portlessServiceHint()}\\` (starts it at boot) ` +\n `or \\`${portlessStartHint()}\\` for a one-off.`,\n );\n return;\n }\n if (allowRootPrompt) {\n log.success('Portless proxy started');\n await offerPortlessService();\n }\n}\n\n/**\n * Effective `portless.enabled`, resolved against the cwd so the global layer is\n * picked up. Best effort — a config read failure leaves it `undefined`, which\n * every caller treats as \"never decided\", not as an opt-out.\n */\nexport async function resolvePortlessEnabled(): Promise<boolean | undefined> {\n try {\n const cfg = await loadEffectiveConfig(process.cwd());\n return cfg.effective.portless.enabled;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Bring an already-opted-in host back to a working state without asking\n * anything. A proxy dies on reboot while its route registry survives, so\n * `portless get` keeps answering with URLs that resolve to nothing until\n * something restarts it — and before this, nothing did. Every entry point that\n * is about to hand out a `<box>.localhost` URL calls this.\n *\n * Silent by design: it never prompts for a password (the tray app, the queue\n * worker and `self-update` all reach here). It restarts the mode this host is\n * already configured for and never switches modes, so a host on the clean\n * HTTPS :443 proxy — which needs root — gets a pointer to the one-time fix\n * rather than a silently different URL. Warns once, at most.\n */\nexport async function ensurePortlessProxyQuietly(): Promise<void> {\n const state = await ensurePortlessProxy({ allowRootPrompt: false });\n if (!state.installed || state.proxyRunning) return;\n log.warn(\n `Portless proxy is not running — box URLs fall back to loopback ports. ` +\n `Start it at boot with \\`${portlessServiceHint()}\\`.`,\n );\n}\n\n/**\n * First-run opt-in for Portless. On Docker Desktop there is no per-container\n * DNS, so we offer to give box web apps a friendly `<box>.localhost` URL. The\n * answer — yes or no — is persisted to the *global* config so the prompt fires\n * exactly once per machine; a \"yes\" also installs the CLI and starts the proxy\n * (see `setupPortlessHost`). Returns the resolved enabled flag.\n *\n * Silent no-op (returns the effective value) when: already decided in any\n * config layer or via --portless/--no-portless; non-interactive or --yes; or\n * the engine is OrbStack (which already has .orb.local).\n */\nexport async function maybePromptPortless(args: PortlessPromptArgs): Promise<boolean> {\n if (args.enabled !== undefined) {\n // Already decided — but \"decided\" only ever meant the *preference* was\n // stored. The proxy itself is not durable (a reboot kills it), so an\n // opted-in host used to sit here with dead `<box>.localhost` URLs forever.\n if (args.enabled) await ensurePortlessProxyQuietly();\n return args.enabled;\n }\n if (args.engine === 'orbstack') return false;\n // Non-interactive (`--yes`, CI, no TTY): can't prompt — adopt a running proxy\n // instead of forcing the user to opt in from a terminal first.\n if (!process.stdin.isTTY || args.yes) return resolvePortlessNonInteractive(args);\n\n const answer = await confirm({\n message:\n 'Use Portless to give box web apps a friendly local URL? ' +\n '(installs the portless CLI and starts a local proxy if needed)',\n initialValue: true,\n });\n\n try {\n await setConfigValue('global', 'portless.enabled', answer, args.cwd, { raw: false });\n } catch (err) {\n log.warn(\n `Could not save the Portless preference: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n\n if (answer) await setupPortlessHost();\n return answer;\n}\n\n/**\n * Resolve `portless.enabled` when we can't prompt — background queue jobs, the\n * tray app's hub-create path, `--yes`, CI. Honors an already-decided value\n * (config or `--portless`/`--no-portless`). Otherwise, on Docker Desktop, it\n * adopts an already-running Portless proxy — and persists the choice so later\n * runs skip re-detection, mirroring an interactive \"yes\" for a user who already\n * has Portless up. Without this, the first box started from the tray app never\n * uses Portless even though the proxy is live on :443, until the user happens to\n * run `agentbox` once from a real terminal. Never installs or starts a proxy\n * unasked; OrbStack needs no Portless (it has `.orb.local`).\n */\nexport async function resolvePortlessNonInteractive(args: {\n engine: DockerEngine;\n enabled: boolean | undefined;\n cwd: string;\n}): Promise<boolean> {\n if (args.enabled !== undefined) {\n if (args.enabled) await ensurePortlessProxyQuietly();\n return args.enabled;\n }\n if (args.engine === 'orbstack') return false;\n const state = await detectPortless();\n if (state.proxyRunning) {\n try {\n await setConfigValue('global', 'portless.enabled', true, args.cwd, { raw: false });\n } catch {\n // Best-effort persist; still use the running proxy for this run.\n }\n }\n return state.proxyRunning;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAS,KAAK,eAAe;AAW7B,SAAS,WAAAA,gBAAe;;;ACKxB,SAAS,eAAe;AAwBxB,eAAsB,uBAAsC;AAC1D,MAAI,CAAC,QAAQ,MAAM,MAAO;AAC1B,QAAM,UAAU,MAAM,sBAAsB;AAC5C,MAAI,QAAQ,aAAa,QAAQ,YAAY,KAAM;AAEnD,QAAM,MAAM,MAAM,QAAQ;AAAA,IACxB,SACE;AAAA,IAEF,cAAc;AAAA,EAChB,CAAC;AACD,MAAI,CAAC,KAAK;AACR,SAAI,KAAK,oEAA+D;AACxE;AAAA,EACF;AACA,QAAM,kBAAkB;AAC1B;AAMA,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