@madarco/agentbox 0.21.0 → 0.22.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 (571) hide show
  1. package/CHANGELOG.md +109 -0
  2. package/README.md +32 -0
  3. package/dist/{_cloud-attach-U3QJO7IF.js → _cloud-attach-YH2SU75S.js} +5 -4
  4. package/dist/chunk-ALEYDWAO.js +2561 -0
  5. package/dist/chunk-ALEYDWAO.js.map +1 -0
  6. package/dist/{chunk-QKL7PCXQ.js → chunk-CDEJ2GQK.js} +836 -488
  7. package/dist/chunk-CDEJ2GQK.js.map +1 -0
  8. package/dist/{chunk-PX7G4PSI.js → chunk-GGWVTWJM.js} +65 -34
  9. package/dist/{chunk-PX7G4PSI.js.map → chunk-GGWVTWJM.js.map} +1 -1
  10. package/dist/chunk-KBVD2UUQ.js +1654 -0
  11. package/dist/chunk-KBVD2UUQ.js.map +1 -0
  12. package/dist/{chunk-IXQTUXWV.js → chunk-O2NDZQHN.js} +50 -52
  13. package/dist/{chunk-IXQTUXWV.js.map → chunk-O2NDZQHN.js.map} +1 -1
  14. package/dist/{dist-NWKOEWUJ.js → chunk-O67ZESNL.js} +1059 -109
  15. package/dist/chunk-O67ZESNL.js.map +1 -0
  16. package/dist/chunk-VBSRJG53.js +1241 -0
  17. package/dist/chunk-VBSRJG53.js.map +1 -0
  18. package/dist/{chunk-6JJIKCMY.js → chunk-W2FLHB54.js} +26 -56
  19. package/dist/chunk-W2FLHB54.js.map +1 -0
  20. package/dist/{chunk-YZVFGFYQ.js → chunk-YZXXBHWG.js} +1937 -2975
  21. package/dist/chunk-YZXXBHWG.js.map +1 -0
  22. package/dist/{dist-SAS4PIHA.js → dist-EJXUKIR7.js} +41 -36
  23. package/dist/{dist-UVQJ2BZJ.js → dist-LJHS4PTC.js} +112 -62
  24. package/dist/dist-LJHS4PTC.js.map +1 -0
  25. package/dist/dist-QBXEP4VY.js +89 -0
  26. package/dist/dist-QNV4H6NN.js +80 -0
  27. package/dist/dist-QNV4H6NN.js.map +1 -0
  28. package/dist/{dist-FMA5Y25B.js → dist-UR2DB2HT.js} +83 -9
  29. package/dist/dist-UR2DB2HT.js.map +1 -0
  30. package/dist/dist-YECTRVGD.js +102 -0
  31. package/dist/dist-YECTRVGD.js.map +1 -0
  32. package/dist/index.js +3243 -1448
  33. package/dist/index.js.map +1 -1
  34. package/dist/{prepared-state-MQHD3M5F-YYVVMTNJ.js → prepared-state-5FIGV4BE-BMUK63FD.js} +2 -2
  35. package/dist/prepared-state-5FIGV4BE-BMUK63FD.js.map +1 -0
  36. package/package.json +12 -5
  37. package/runtime/_shared/agentbox-checkpoint-cleanup +55 -0
  38. package/runtime/_shared/agentbox-codex-hooks.json +68 -0
  39. package/runtime/_shared/agentbox-dockerd-start +145 -0
  40. package/runtime/_shared/agentbox-open +28 -0
  41. package/runtime/_shared/agentbox-portless-trust +82 -0
  42. package/runtime/_shared/agentbox-setup-skill.md +317 -0
  43. package/runtime/_shared/agentbox-vnc-start +102 -0
  44. package/runtime/_shared/claude-managed-settings.json +116 -0
  45. package/runtime/_shared/ctl.cjs +27469 -0
  46. package/runtime/_shared/gh-shim +344 -0
  47. package/runtime/_shared/git-shim +131 -0
  48. package/runtime/_shared/linear-shim +181 -0
  49. package/runtime/_shared/ntn-shim +95 -0
  50. package/runtime/_shared/opencode-agentbox-plugin.js +76 -0
  51. package/runtime/docker/Dockerfile.box +30 -17
  52. package/runtime/docker/packages/ctl/dist/bin.cjs +11871 -10351
  53. package/runtime/e2b/ctl.cjs +11871 -10351
  54. package/runtime/e2b/scripts/build-template.sh +31 -15
  55. package/runtime/hetzner/ctl.cjs +11871 -10351
  56. package/runtime/hetzner/scripts/install-box.sh +37 -19
  57. package/runtime/hub/apps/hub/.next/BUILD_ID +1 -0
  58. package/runtime/hub/apps/hub/.next/app-path-routes-manifest.json +36 -0
  59. package/runtime/hub/apps/hub/.next/build-manifest.json +21 -0
  60. package/runtime/hub/apps/hub/.next/package.json +1 -0
  61. package/runtime/hub/apps/hub/.next/prerender-manifest.json +36 -0
  62. package/runtime/hub/apps/hub/.next/required-server-files.json +350 -0
  63. package/runtime/hub/apps/hub/.next/routes-manifest.json +292 -0
  64. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route/app-paths-manifest.json +3 -0
  65. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route/build-manifest.json +9 -0
  66. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route/server-reference-manifest.json +4 -0
  67. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js +13 -0
  68. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js.map +5 -0
  69. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js.nft.json +1 -0
  70. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route_client-reference-manifest.js +3 -0
  71. package/runtime/hub/apps/hub/.next/server/app/(auth)/signin/page/app-paths-manifest.json +3 -0
  72. package/runtime/hub/apps/hub/.next/server/app/(auth)/signin/page/build-manifest.json +17 -0
  73. package/runtime/hub/apps/hub/.next/server/app/(auth)/signin/page/next-font-manifest.json +13 -0
  74. package/runtime/hub/apps/hub/.next/server/app/(auth)/signin/page/react-loadable-manifest.json +1 -0
  75. package/runtime/hub/apps/hub/.next/server/app/(auth)/signin/page/server-reference-manifest.json +4 -0
  76. package/runtime/hub/apps/hub/.next/server/app/(auth)/signin/page.js +14 -0
  77. package/runtime/hub/apps/hub/.next/server/app/(auth)/signin/page.js.map +5 -0
  78. package/runtime/hub/apps/hub/.next/server/app/(auth)/signin/page.js.nft.json +1 -0
  79. package/runtime/hub/apps/hub/.next/server/app/(auth)/signin/page_client-reference-manifest.js +3 -0
  80. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/events/route/app-paths-manifest.json +3 -0
  81. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/events/route/build-manifest.json +9 -0
  82. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/events/route/server-reference-manifest.json +4 -0
  83. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/events/route.js +7 -0
  84. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/events/route.js.map +5 -0
  85. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/events/route.js.nft.json +1 -0
  86. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/events/route_client-reference-manifest.js +3 -0
  87. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/jobs/[id]/logs/route/app-paths-manifest.json +3 -0
  88. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/jobs/[id]/logs/route/build-manifest.json +9 -0
  89. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/jobs/[id]/logs/route/server-reference-manifest.json +4 -0
  90. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/jobs/[id]/logs/route.js +7 -0
  91. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/jobs/[id]/logs/route.js.map +5 -0
  92. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/jobs/[id]/logs/route.js.nft.json +1 -0
  93. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/jobs/[id]/logs/route_client-reference-manifest.js +3 -0
  94. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route/app-paths-manifest.json +3 -0
  95. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route/build-manifest.json +9 -0
  96. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route/server-reference-manifest.json +4 -0
  97. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route.js +9 -0
  98. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route.js.map +5 -0
  99. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route.js.nft.json +1 -0
  100. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route_client-reference-manifest.js +3 -0
  101. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route/app-paths-manifest.json +3 -0
  102. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route/build-manifest.json +9 -0
  103. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route/server-reference-manifest.json +4 -0
  104. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route.js +8 -0
  105. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route.js.map +5 -0
  106. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route.js.nft.json +1 -0
  107. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route_client-reference-manifest.js +3 -0
  108. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route/app-paths-manifest.json +3 -0
  109. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route/build-manifest.json +9 -0
  110. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route/server-reference-manifest.json +4 -0
  111. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route.js +9 -0
  112. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route.js.map +5 -0
  113. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route.js.nft.json +1 -0
  114. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route_client-reference-manifest.js +3 -0
  115. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route/app-paths-manifest.json +3 -0
  116. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route/build-manifest.json +9 -0
  117. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route/server-reference-manifest.json +4 -0
  118. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route.js +8 -0
  119. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route.js.map +5 -0
  120. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route.js.nft.json +1 -0
  121. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route_client-reference-manifest.js +3 -0
  122. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route/app-paths-manifest.json +3 -0
  123. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route/build-manifest.json +9 -0
  124. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route/server-reference-manifest.json +4 -0
  125. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.js +9 -0
  126. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.js.map +5 -0
  127. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.js.nft.json +1 -0
  128. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route_client-reference-manifest.js +3 -0
  129. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route/app-paths-manifest.json +3 -0
  130. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route/build-manifest.json +9 -0
  131. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route/server-reference-manifest.json +4 -0
  132. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route.js +8 -0
  133. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route.js.map +5 -0
  134. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route.js.nft.json +1 -0
  135. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route_client-reference-manifest.js +3 -0
  136. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route/app-paths-manifest.json +3 -0
  137. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route/build-manifest.json +9 -0
  138. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route/server-reference-manifest.json +4 -0
  139. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route.js +8 -0
  140. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route.js.map +5 -0
  141. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route.js.nft.json +1 -0
  142. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route_client-reference-manifest.js +3 -0
  143. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route/app-paths-manifest.json +3 -0
  144. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route/build-manifest.json +9 -0
  145. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route/server-reference-manifest.json +4 -0
  146. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route.js +9 -0
  147. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route.js.map +5 -0
  148. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route.js.nft.json +1 -0
  149. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route_client-reference-manifest.js +3 -0
  150. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route/app-paths-manifest.json +3 -0
  151. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route/build-manifest.json +9 -0
  152. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route/server-reference-manifest.json +4 -0
  153. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route.js +8 -0
  154. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route.js.map +5 -0
  155. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route.js.nft.json +1 -0
  156. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route_client-reference-manifest.js +3 -0
  157. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route/app-paths-manifest.json +3 -0
  158. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route/build-manifest.json +9 -0
  159. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route/server-reference-manifest.json +4 -0
  160. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route.js +9 -0
  161. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route.js.map +5 -0
  162. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route.js.nft.json +1 -0
  163. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route_client-reference-manifest.js +3 -0
  164. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/docs/route/app-paths-manifest.json +3 -0
  165. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/docs/route/build-manifest.json +9 -0
  166. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/docs/route/server-reference-manifest.json +4 -0
  167. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/docs/route.js +7 -0
  168. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/docs/route.js.map +5 -0
  169. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/docs/route.js.nft.json +1 -0
  170. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/docs/route_client-reference-manifest.js +3 -0
  171. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/health/route/app-paths-manifest.json +3 -0
  172. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/health/route/build-manifest.json +9 -0
  173. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/health/route/server-reference-manifest.json +4 -0
  174. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/health/route.js +8 -0
  175. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/health/route.js.map +5 -0
  176. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/health/route.js.nft.json +1 -0
  177. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/health/route_client-reference-manifest.js +3 -0
  178. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route/app-paths-manifest.json +3 -0
  179. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route/build-manifest.json +9 -0
  180. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route/server-reference-manifest.json +4 -0
  181. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route.js +9 -0
  182. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route.js.map +5 -0
  183. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route.js.nft.json +1 -0
  184. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route_client-reference-manifest.js +3 -0
  185. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route/app-paths-manifest.json +3 -0
  186. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route/build-manifest.json +9 -0
  187. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route/server-reference-manifest.json +4 -0
  188. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route.js +8 -0
  189. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route.js.map +5 -0
  190. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route.js.nft.json +1 -0
  191. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route_client-reference-manifest.js +3 -0
  192. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route/app-paths-manifest.json +3 -0
  193. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route/build-manifest.json +9 -0
  194. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route/server-reference-manifest.json +4 -0
  195. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route.js +8 -0
  196. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route.js.map +5 -0
  197. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route.js.nft.json +1 -0
  198. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route_client-reference-manifest.js +3 -0
  199. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/openapi.json/route/app-paths-manifest.json +3 -0
  200. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/openapi.json/route/build-manifest.json +9 -0
  201. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/openapi.json/route/server-reference-manifest.json +4 -0
  202. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/openapi.json/route.js +7 -0
  203. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/openapi.json/route.js.map +5 -0
  204. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/openapi.json/route.js.nft.json +1 -0
  205. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/openapi.json/route_client-reference-manifest.js +3 -0
  206. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route/app-paths-manifest.json +3 -0
  207. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route/build-manifest.json +9 -0
  208. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route/server-reference-manifest.json +4 -0
  209. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route.js +8 -0
  210. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route.js.map +5 -0
  211. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route.js.nft.json +1 -0
  212. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route_client-reference-manifest.js +3 -0
  213. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route/app-paths-manifest.json +3 -0
  214. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route/build-manifest.json +9 -0
  215. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route/server-reference-manifest.json +4 -0
  216. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route.js +8 -0
  217. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route.js.map +5 -0
  218. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route.js.nft.json +1 -0
  219. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route_client-reference-manifest.js +3 -0
  220. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route/app-paths-manifest.json +3 -0
  221. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route/build-manifest.json +9 -0
  222. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route/server-reference-manifest.json +4 -0
  223. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route.js +9 -0
  224. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route.js.map +5 -0
  225. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route.js.nft.json +1 -0
  226. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route_client-reference-manifest.js +3 -0
  227. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route/app-paths-manifest.json +3 -0
  228. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route/build-manifest.json +9 -0
  229. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route/server-reference-manifest.json +4 -0
  230. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route.js +9 -0
  231. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route.js.map +5 -0
  232. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route.js.nft.json +1 -0
  233. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route_client-reference-manifest.js +3 -0
  234. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route/app-paths-manifest.json +3 -0
  235. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route/build-manifest.json +9 -0
  236. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route/server-reference-manifest.json +4 -0
  237. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route.js +9 -0
  238. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route.js.map +5 -0
  239. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route.js.nft.json +1 -0
  240. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route_client-reference-manifest.js +3 -0
  241. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route/app-paths-manifest.json +3 -0
  242. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route/build-manifest.json +9 -0
  243. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route/server-reference-manifest.json +4 -0
  244. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route.js +8 -0
  245. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route.js.map +5 -0
  246. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route.js.nft.json +1 -0
  247. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route_client-reference-manifest.js +3 -0
  248. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page/app-paths-manifest.json +3 -0
  249. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page/build-manifest.json +17 -0
  250. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page/next-font-manifest.json +13 -0
  251. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page/react-loadable-manifest.json +1 -0
  252. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page/server-reference-manifest.json +17 -0
  253. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page.js +17 -0
  254. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page.js.map +5 -0
  255. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -0
  256. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +3 -0
  257. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page/app-paths-manifest.json +3 -0
  258. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page/build-manifest.json +17 -0
  259. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page/next-font-manifest.json +13 -0
  260. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page/react-loadable-manifest.json +1 -0
  261. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page/server-reference-manifest.json +137 -0
  262. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page.js +17 -0
  263. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page.js.map +5 -0
  264. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page.js.nft.json +1 -0
  265. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page_client-reference-manifest.js +3 -0
  266. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page/app-paths-manifest.json +3 -0
  267. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page/build-manifest.json +17 -0
  268. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page/next-font-manifest.json +13 -0
  269. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page/react-loadable-manifest.json +1 -0
  270. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page/server-reference-manifest.json +125 -0
  271. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page.js +17 -0
  272. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page.js.map +5 -0
  273. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page.js.nft.json +1 -0
  274. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page_client-reference-manifest.js +3 -0
  275. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page/app-paths-manifest.json +3 -0
  276. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page/build-manifest.json +17 -0
  277. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page/next-font-manifest.json +13 -0
  278. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page/react-loadable-manifest.json +1 -0
  279. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page/server-reference-manifest.json +89 -0
  280. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page.js +17 -0
  281. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page.js.map +5 -0
  282. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page.js.nft.json +1 -0
  283. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page_client-reference-manifest.js +3 -0
  284. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page/app-paths-manifest.json +3 -0
  285. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page/build-manifest.json +17 -0
  286. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page/next-font-manifest.json +13 -0
  287. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page/react-loadable-manifest.json +1 -0
  288. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page/server-reference-manifest.json +4 -0
  289. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page.js +16 -0
  290. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page.js.map +5 -0
  291. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -0
  292. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +3 -0
  293. package/runtime/hub/apps/hub/.next/server/app/[...path]/route/app-paths-manifest.json +3 -0
  294. package/runtime/hub/apps/hub/.next/server/app/[...path]/route/build-manifest.json +9 -0
  295. package/runtime/hub/apps/hub/.next/server/app/[...path]/route/server-reference-manifest.json +4 -0
  296. package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js +8 -0
  297. package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js.map +5 -0
  298. package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js.nft.json +1 -0
  299. package/runtime/hub/apps/hub/.next/server/app/[...path]/route_client-reference-manifest.js +3 -0
  300. package/runtime/hub/apps/hub/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
  301. package/runtime/hub/apps/hub/.next/server/app/_global-error/page/build-manifest.json +17 -0
  302. package/runtime/hub/apps/hub/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
  303. package/runtime/hub/apps/hub/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
  304. package/runtime/hub/apps/hub/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
  305. package/runtime/hub/apps/hub/.next/server/app/_global-error/page.js +10 -0
  306. package/runtime/hub/apps/hub/.next/server/app/_global-error/page.js.map +5 -0
  307. package/runtime/hub/apps/hub/.next/server/app/_global-error/page.js.nft.json +1 -0
  308. package/runtime/hub/apps/hub/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
  309. package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -0
  310. package/runtime/hub/apps/hub/.next/server/app/_global-error.meta +15 -0
  311. package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +14 -0
  312. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
  313. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +14 -0
  314. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +5 -0
  315. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
  316. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  317. package/runtime/hub/apps/hub/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
  318. package/runtime/hub/apps/hub/.next/server/app/_not-found/page/build-manifest.json +17 -0
  319. package/runtime/hub/apps/hub/.next/server/app/_not-found/page/next-font-manifest.json +13 -0
  320. package/runtime/hub/apps/hub/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
  321. package/runtime/hub/apps/hub/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
  322. package/runtime/hub/apps/hub/.next/server/app/_not-found/page.js +13 -0
  323. package/runtime/hub/apps/hub/.next/server/app/_not-found/page.js.map +5 -0
  324. package/runtime/hub/apps/hub/.next/server/app/_not-found/page.js.nft.json +1 -0
  325. package/runtime/hub/apps/hub/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
  326. package/runtime/hub/apps/hub/.next/server/app-paths-manifest.json +36 -0
  327. package/runtime/hub/apps/hub/.next/server/chunks/01te_@better-auth_kysely-adapter_dist_0jw_ngm._.js +3 -0
  328. package/runtime/hub/apps/hub/.next/server/chunks/01te_@better-auth_kysely-adapter_dist_0z6cvsk._.js +3 -0
  329. package/runtime/hub/apps/hub/.next/server/chunks/01te_@better-auth_kysely-adapter_dist_210bxd8._.js +3 -0
  330. package/runtime/hub/apps/hub/.next/server/chunks/01te_@better-auth_kysely-adapter_dist_index_mjs_0h-j5xt._.js +4 -0
  331. package/runtime/hub/apps/hub/.next/server/chunks/044u_hub__next-internal_server_app_(auth)_api_auth_[___all]_route_actions_1agi0ag.js +3 -0
  332. package/runtime/hub/apps/hub/.next/server/chunks/044u_hub__next-internal_server_app_(dashboard)_api_v1_boxes_route_actions_1ggp_5o.js +3 -0
  333. package/runtime/hub/apps/hub/.next/server/chunks/044u_hub__next-internal_server_app_(dashboard)_api_v1_health_route_actions_017gnzg.js +3 -0
  334. package/runtime/hub/apps/hub/.next/server/chunks/044u_hub__next-internal_server_app_(dashboard)_api_v1_projects_route_actions_04w8ozk.js +3 -0
  335. package/runtime/hub/apps/hub/.next/server/chunks/09mp_@better-auth_memory-adapter_dist_index_mjs_0ti_30h._.js +3 -0
  336. package/runtime/hub/apps/hub/.next/server/chunks/09xn_next_0tn6frk._.js +6 -0
  337. package/runtime/hub/apps/hub/.next/server/chunks/0d-b_next_dist_server_app-render_after-task-async-storage_external_0-exn7p.js +3 -0
  338. package/runtime/hub/apps/hub/.next/server/chunks/0m4a_kysely_dist_095p8vu._.js +3 -0
  339. package/runtime/hub/apps/hub/.next/server/chunks/0m4a_kysely_dist_1skbhvx._.js +3 -0
  340. package/runtime/hub/apps/hub/.next/server/chunks/0sj1_@opentelemetry_api_build_esm_index_0xy-j06.js +3 -0
  341. package/runtime/hub/apps/hub/.next/server/chunks/0ssw__next-internal_server_app_(dashboard)_api_jobs_[id]_logs_route_actions_01aqmf3.js +3 -0
  342. package/runtime/hub/apps/hub/.next/server/chunks/0ssw__next-internal_server_app_(dashboard)_api_v1_approvals_route_actions_1vwxs9a.js +3 -0
  343. package/runtime/hub/apps/hub/.next/server/chunks/0ssw__next-internal_server_app_(dashboard)_api_v1_boxes_[id]_route_actions_01510xg.js +3 -0
  344. package/runtime/hub/apps/hub/.next/server/chunks/0ssw__next-internal_server_app_(dashboard)_api_v1_jobs_[id]_route_actions_0oc630h.js +3 -0
  345. package/runtime/hub/apps/hub/.next/server/chunks/0ssw__next-internal_server_app_(dashboard)_api_v1_openapi_json_route_actions_1lunxjz.js +3 -0
  346. package/runtime/hub/apps/hub/.next/server/chunks/0ssw__next-internal_server_app_(dashboard)_api_v1_providers_route_actions_1666ry8.js +3 -0
  347. package/runtime/hub/apps/hub/.next/server/chunks/0web_next-internal_server_app_(dashboard)_api_v1_projects_[id]_route_actions_1beikpx.js +3 -0
  348. package/runtime/hub/apps/hub/.next/server/chunks/0zhp_better-auth_dist_adapters_kysely-adapter_index_mjs_1rl4qnh._.js +3 -0
  349. package/runtime/hub/apps/hub/.next/server/chunks/151__@better-auth_core_dist_0ecdp_3._.js +5 -0
  350. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_approvals_[id]_answer_route_actions_1cq4z5x.js +3 -0
  351. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_boxes_[id]_[action]_route_actions_0cib0ju.js +3 -0
  352. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_boxes_[id]_branches_route_actions_15snjix.js +3 -0
  353. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_boxes_[id]_git_[op]_route_actions_116a41w.js +3 -0
  354. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_boxes_[id]_git_route_actions_1a-q-i2.js +3 -0
  355. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_boxes_[id]_services_restart_route_actions_1yvsbmm.js +3 -0
  356. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_boxes_[id]_services_route_actions_1uvv36v.js +3 -0
  357. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_jobs_[id]_login-code_route_actions_1825jmw.js +3 -0
  358. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_jobs_[id]_logs_route_actions_0msc0_w.js +3 -0
  359. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_projects_[id]_branches_route_actions_07i0vrw.js +3 -0
  360. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_providers_[id]_credentials_route_actions_1cds5re.js +3 -0
  361. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_providers_[id]_prepare_route_actions_079fbng.js +3 -0
  362. package/runtime/hub/apps/hub/.next/server/chunks/[externals]__12m3qoa._.js +3 -0
  363. package/runtime/hub/apps/hub/.next/server/chunks/[externals]_pg_15jfwkh._.js +3 -0
  364. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__04h15ml._.js +3 -0
  365. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__04jgk9x._.js +3 -0
  366. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__07ednlo._.js +3 -0
  367. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1lmiq._.js +105 -0
  368. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ig1bot._.js +3 -0
  369. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0keu6we._.js +3 -0
  370. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ql4fjo._.js +3 -0
  371. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0se1fty._.js +3 -0
  372. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0t7o5ed._.js +3 -0
  373. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0vs8fma._.js +3 -0
  374. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0vxaujy._.js +6 -0
  375. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0w9ud8u._.js +3 -0
  376. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0yhb0gc._.js +3 -0
  377. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-9g0ae._.js +461 -0
  378. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13jwk_k._.js +3 -0
  379. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__16_uteg._.js +3 -0
  380. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__16p2m-g._.js +3 -0
  381. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__19pc87s._.js +3 -0
  382. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_gu2yk._.js +3 -0
  383. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ai-945._.js +3 -0
  384. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1bqbkd5._.js +14 -0
  385. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1bu2zio._.js +3 -0
  386. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ctczev._.js +3 -0
  387. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1d6mtlk._.js +3 -0
  388. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1d75vsx._.js +6 -0
  389. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1dn_3i1._.js +3 -0
  390. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1e4z_-v._.js +3 -0
  391. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1f2sueq._.js +3 -0
  392. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1f9zctr._.js +3 -0
  393. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1hqla7-._.js +3 -0
  394. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1js2jdv._.js +3 -0
  395. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mttufy._.js +3 -0
  396. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1nepkp-._.js +6 -0
  397. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1pp5oib._.js +3 -0
  398. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1q5bqse._.js +3 -0
  399. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qa4a0v._.js +14 -0
  400. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qwhzmi._.js +3 -0
  401. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1v9om6g._.js +3 -0
  402. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1xeczo7._.js +3 -0
  403. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20503l7._.js +3 -0
  404. package/runtime/hub/apps/hub/.next/server/chunks/[turbopack]_runtime.js +903 -0
  405. package/runtime/hub/apps/hub/.next/server/chunks/_033w048._.js +3 -0
  406. package/runtime/hub/apps/hub/.next/server/chunks/_06f2faq._.js +3 -0
  407. package/runtime/hub/apps/hub/.next/server/chunks/_0760z6y._.js +27 -0
  408. package/runtime/hub/apps/hub/.next/server/chunks/_0pyhcqe._.js +3 -0
  409. package/runtime/hub/apps/hub/.next/server/chunks/_1-42ili._.js +3 -0
  410. package/runtime/hub/apps/hub/.next/server/chunks/_11__3wi._.js +3 -0
  411. package/runtime/hub/apps/hub/.next/server/chunks/_12flzuh._.js +3 -0
  412. package/runtime/hub/apps/hub/.next/server/chunks/_1rpkqst._.js +3 -0
  413. package/runtime/hub/apps/hub/.next/server/chunks/_1wt72m1._.js +3 -0
  414. package/runtime/hub/apps/hub/.next/server/chunks/_1x3l5t8._.js +3 -0
  415. package/runtime/hub/apps/hub/.next/server/chunks/apps_hub__next-internal_server_app_(dashboard)_api_events_route_actions_17s9lxs.js +3 -0
  416. package/runtime/hub/apps/hub/.next/server/chunks/apps_hub__next-internal_server_app_(dashboard)_api_v1_docs_route_actions_0d-s_oo.js +3 -0
  417. package/runtime/hub/apps/hub/.next/server/chunks/apps_hub__next-internal_server_app_[___path]_route_actions_1hdraye.js +3 -0
  418. package/runtime/hub/apps/hub/.next/server/chunks/packages_relay_dist_control-plane_03a-9aj.js +86 -0
  419. package/runtime/hub/apps/hub/.next/server/chunks/ssr/044u_hub__next-internal_server_app_(dashboard)_projects_[id]_page_actions_15f56np.js +3 -0
  420. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_0iwlo01._.js +6 -0
  421. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_0xy-j7z._.js +3 -0
  422. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_client_components_20xzgz2._.js +3 -0
  423. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_client_components_builtin_forbidden_1x5yo9-.js +3 -0
  424. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_client_components_builtin_global-error_14poel6.js +3 -0
  425. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_client_components_builtin_unauthorized_0vj9qge.js +3 -0
  426. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_010858m.js +4 -0
  427. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_04zwxnx.js +4 -0
  428. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_06exuc7.js +4 -0
  429. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_0f2ldrt.js +4 -0
  430. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_0f2tzep.js +4 -0
  431. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_116nh32.js +4 -0
  432. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_11dyjcb.js +4 -0
  433. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_1_4knli.js +4 -0
  434. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[externals]_pg_15jfwkh._.js +3 -0
  435. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[externals]_pg_20c820g._.js +3 -0
  436. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__03-x9xy._.js +19 -0
  437. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__08-1wwu._.js +3 -0
  438. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0c9mbcn._.js +3 -0
  439. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0cpdgd0._.js +33 -0
  440. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0gdfxj4._.js +3 -0
  441. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0j0tjwn._.js +3 -0
  442. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0kc-hwp._.js +3 -0
  443. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0lu73p6._.js +3 -0
  444. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__10bfmwi._.js +3 -0
  445. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__18qvdzb._.js +33 -0
  446. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__1bq2f8q._.js +3 -0
  447. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__1c1x9zr._.js +3 -0
  448. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__1he4k-q._.js +3 -0
  449. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__1l2urlw._.js +3 -0
  450. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[turbopack]_runtime.js +903 -0
  451. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_04br1ft._.js +6 -0
  452. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_09gdzmo._.js +3 -0
  453. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0kpdmm-._.js +3 -0
  454. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ozyjt1._.js +21 -0
  455. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ro6vh6._.js +27 -0
  456. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0tgpglr._.js +3 -0
  457. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_1laion6._.js +3 -0
  458. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_0_lzzn3._.js +3 -0
  459. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_0b_hsjl._.js +3 -0
  460. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(auth)_signin_page_actions_1vmiwl7.js +3 -0
  461. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_approvals_page_actions_1mi0bpn.js +3 -0
  462. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_boxes_[id]_page_actions_0k7kgn2.js +3 -0
  463. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_page_actions_1t3u0xy.js +3 -0
  464. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_settings_page_actions_0ti7gxm.js +3 -0
  465. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app__global-error_page_actions_1ofuxm1.js +3 -0
  466. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app__not-found_page_actions_1fmdkci.js +3 -0
  467. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_[id]_page_tsx_1-j_972._.js +3 -0
  468. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_components_box-table_tsx_0a9pyn_._.js +3 -0
  469. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_components_1z1p98f._.js +3 -0
  470. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_lib_auth_client_ts_1uxjxr_._.js +3 -0
  471. package/runtime/hub/apps/hub/.next/server/chunks/ssr/node_modules__pnpm_04qfi10._.js +3 -0
  472. package/runtime/hub/apps/hub/.next/server/chunks/ssr/node_modules__pnpm_0kvuy0s._.js +33 -0
  473. package/runtime/hub/apps/hub/.next/server/chunks/ssr/packages_relay_dist_control-plane_0ve-wz4.js +80 -0
  474. package/runtime/hub/apps/hub/.next/server/functions-config-manifest.json +40 -0
  475. package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +21 -0
  476. package/runtime/hub/apps/hub/.next/server/middleware-manifest.json +6 -0
  477. package/runtime/hub/apps/hub/.next/server/middleware.js +5 -0
  478. package/runtime/hub/apps/hub/.next/server/next-font-manifest.js +1 -0
  479. package/runtime/hub/apps/hub/.next/server/next-font-manifest.json +49 -0
  480. package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -0
  481. package/runtime/hub/apps/hub/.next/server/pages-manifest.json +3 -0
  482. package/runtime/hub/apps/hub/.next/server/prefetch-hints.json +1 -0
  483. package/runtime/hub/apps/hub/.next/server/server-reference-manifest.js +1 -0
  484. package/runtime/hub/apps/hub/.next/server/server-reference-manifest.json +276 -0
  485. package/runtime/hub/apps/hub/.next/static/TpPTWVdZDxqrPlONtJcR5/_buildManifest.js +11 -0
  486. package/runtime/hub/apps/hub/.next/static/TpPTWVdZDxqrPlONtJcR5/_clientMiddlewareManifest.js +6 -0
  487. package/runtime/hub/apps/hub/.next/static/TpPTWVdZDxqrPlONtJcR5/_ssgManifest.js +1 -0
  488. package/runtime/hub/apps/hub/.next/static/chunks/0cz1d0mv5g_q7.js +1 -0
  489. package/runtime/hub/apps/hub/.next/static/chunks/0dx4alyqu7cq1.css +3 -0
  490. package/runtime/hub/apps/hub/.next/static/chunks/0lq354ziiwxxl.js +1 -0
  491. package/runtime/hub/apps/hub/.next/static/chunks/0ptag81psa0nj.js +1 -0
  492. package/runtime/hub/apps/hub/.next/static/chunks/11vmjdy3390ik.js +1 -0
  493. package/runtime/hub/apps/hub/.next/static/chunks/19cwkdx97a5_c.js +1 -0
  494. package/runtime/hub/apps/hub/.next/static/chunks/1svigjdfotduh.js +1 -0
  495. package/runtime/hub/apps/hub/.next/static/chunks/1t3645mc1s54c.js +1 -0
  496. package/runtime/hub/apps/hub/.next/static/chunks/1y49eldffr2-_.js +31 -0
  497. package/runtime/hub/apps/hub/.next/static/chunks/26ef4lcj-7-li.js +1 -0
  498. package/runtime/hub/apps/hub/.next/static/chunks/2d5e6t-5j4etp.js +1 -0
  499. package/runtime/hub/apps/hub/.next/static/chunks/2ozcn3ku69ymf.js +1 -0
  500. package/runtime/hub/apps/hub/.next/static/chunks/2w65a9zig6ya7.js +4 -0
  501. package/runtime/hub/apps/hub/.next/static/chunks/2x7nfpuaaba_a.js +1 -0
  502. package/runtime/hub/apps/hub/.next/static/chunks/3-zanu4ioia5i.js +1 -0
  503. package/runtime/hub/apps/hub/.next/static/chunks/3c49t4evjq8hf.js +1 -0
  504. package/runtime/hub/apps/hub/.next/static/chunks/3x8k7so-uoat8.js +2 -0
  505. package/runtime/hub/apps/hub/.next/static/chunks/3y2c7woqhtx9s.js +1 -0
  506. package/runtime/hub/apps/hub/.next/static/chunks/turbopack-2x4_cva4cco3h.js +1 -0
  507. package/runtime/hub/apps/hub/.next/static/media/02263ebadd758ea4-s.29yke99gs9qpn.woff2 +0 -0
  508. package/runtime/hub/apps/hub/.next/static/media/03fc1b4a8d284b5e-s.p.0wiir8udbzjvx.woff2 +0 -0
  509. package/runtime/hub/apps/hub/.next/static/media/1a69062cfe6f77f8-s.0o-3_g79811ob.woff2 +0 -0
  510. package/runtime/hub/apps/hub/.next/static/media/1bcd0e671759a44c-s.2qt3tdwt-y9x_.woff2 +0 -0
  511. package/runtime/hub/apps/hub/.next/static/media/23b7a97ae3b5c134-s.p.226pwps5o-gq_.woff2 +0 -0
  512. package/runtime/hub/apps/hub/.next/static/media/2e95a7d252b9825a-s.15orukf5wyxb5.woff2 +0 -0
  513. package/runtime/hub/apps/hub/.next/static/media/2fe89d53234c61d4-s.1u30mmyq6lnsd.woff2 +0 -0
  514. package/runtime/hub/apps/hub/.next/static/media/57215795b8570f5c-s.2rixgazldzomk.woff2 +0 -0
  515. package/runtime/hub/apps/hub/.next/static/media/59b15b4bcd7b1eb5-s.2vemzm0itqzfy.woff2 +0 -0
  516. package/runtime/hub/apps/hub/.next/static/media/5e05ae5b48faa55e-s.1yd4_i3e35931.woff2 +0 -0
  517. package/runtime/hub/apps/hub/.next/static/media/68757d6cddeff913-s.1i-sca43-qwng.woff2 +0 -0
  518. package/runtime/hub/apps/hub/.next/static/media/6ff74e33ebd7bca3-s.352ti9pm7m6qh.woff2 +0 -0
  519. package/runtime/hub/apps/hub/.next/static/media/7fea77d1d19108bf-s.2y65deuc30pmy.woff2 +0 -0
  520. package/runtime/hub/apps/hub/.next/static/media/90c51ce8fb754fe8-s.02z5rrbg5nt92.woff2 +0 -0
  521. package/runtime/hub/apps/hub/.next/static/media/99e609270109b47d-s.p.40sczeszzbjw1.woff2 +0 -0
  522. package/runtime/hub/apps/hub/.next/static/media/9a4838fcda0d1bca-s.0ngr-xkgqz1kf.woff2 +0 -0
  523. package/runtime/hub/apps/hub/.next/static/media/a7afbb44bec2bb18-s.1qc6dx89jd2qv.woff2 +0 -0
  524. package/runtime/hub/apps/hub/.next/static/media/e15f58668ad64cb8-s.3cvcemwuzoywn.woff2 +0 -0
  525. package/runtime/hub/apps/hub/.next/static/media/e390973e931a41c5-s.0rgnxg2b64rzs.woff2 +0 -0
  526. package/runtime/hub/apps/hub/.next/static/media/e532fa1b9921e1cd-s.3cb5lpr2l6xud.woff2 +0 -0
  527. package/runtime/hub/apps/hub/.next/static/media/effe91970fc4db64-s.p.0oace-s_gkfks.woff2 +0 -0
  528. package/runtime/hub/apps/hub/auth-YBXDRLHG.js +75 -0
  529. package/runtime/hub/apps/hub/auth-config-LJGI76HI.js +21 -0
  530. package/runtime/hub/apps/hub/chunk-3LAHFDJF.js +287 -0
  531. package/runtime/hub/apps/hub/chunk-AKLBSCSZ.js +8573 -0
  532. package/runtime/hub/apps/hub/chunk-EFW34I43.js +7299 -0
  533. package/runtime/hub/apps/hub/chunk-JDA7BPPN.js +2806 -0
  534. package/runtime/hub/apps/hub/chunk-LJG4CEGS.js +3341 -0
  535. package/runtime/hub/apps/hub/chunk-OBKLTPIR.js +41 -0
  536. package/runtime/hub/apps/hub/chunk-OF242BLD.js +797 -0
  537. package/runtime/hub/apps/hub/chunk-TZFWAJVB.js +38 -0
  538. package/runtime/hub/apps/hub/chunk-V5KGFHCF.js +12683 -0
  539. package/runtime/hub/apps/hub/cloud-poller-SUNA6ZQC-VSKVMYHL.js +10 -0
  540. package/runtime/hub/apps/hub/dist-BF54UNHK.js +1029 -0
  541. package/runtime/hub/apps/hub/dist-CM4YAQLI.js +1656 -0
  542. package/runtime/hub/apps/hub/dist-ELOY2IUE.js +533 -0
  543. package/runtime/hub/apps/hub/dist-FDBOJ74K.js +1085 -0
  544. package/runtime/hub/apps/hub/dist-GGM4BUKM.js +2281 -0
  545. package/runtime/hub/apps/hub/dist-IENF7YOD.js +88 -0
  546. package/runtime/hub/apps/hub/execa-4DLVNM6E.js +32 -0
  547. package/runtime/hub/apps/hub/hub-token-EW32VDIU.js +25 -0
  548. package/runtime/hub/apps/hub/package.json +55 -0
  549. package/runtime/hub/apps/hub/prepared-state-5FIGV4BE-FIXKBF5A.js +19 -0
  550. package/runtime/hub/apps/hub/public/logo.svg +5 -0
  551. package/runtime/hub/apps/hub/server.js +838 -0
  552. package/runtime/relay/bin.cjs +1738 -482
  553. package/runtime/vercel/ctl.cjs +11871 -10351
  554. package/runtime/vercel/scripts/provision.sh +31 -15
  555. package/dist/chunk-6JJIKCMY.js.map +0 -1
  556. package/dist/chunk-DBMLOY3T.js +0 -793
  557. package/dist/chunk-DBMLOY3T.js.map +0 -1
  558. package/dist/chunk-KTEDFUKM.js +0 -831
  559. package/dist/chunk-KTEDFUKM.js.map +0 -1
  560. package/dist/chunk-QKL7PCXQ.js.map +0 -1
  561. package/dist/chunk-X2DWS4KS.js +0 -820
  562. package/dist/chunk-X2DWS4KS.js.map +0 -1
  563. package/dist/chunk-YZVFGFYQ.js.map +0 -1
  564. package/dist/dist-FMA5Y25B.js.map +0 -1
  565. package/dist/dist-NWKOEWUJ.js.map +0 -1
  566. package/dist/dist-U76JL6HI.js +0 -738
  567. package/dist/dist-U76JL6HI.js.map +0 -1
  568. package/dist/dist-UVQJ2BZJ.js.map +0 -1
  569. /package/dist/{_cloud-attach-U3QJO7IF.js.map → _cloud-attach-YH2SU75S.js.map} +0 -0
  570. /package/dist/{dist-SAS4PIHA.js.map → dist-EJXUKIR7.js.map} +0 -0
  571. /package/dist/{prepared-state-MQHD3M5F-YYVVMTNJ.js.map → dist-QBXEP4VY.js.map} +0 -0
@@ -1,67 +1,804 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- DEFAULT_HCLOUD_ENDPOINT,
4
- HetznerApiError,
5
- RUNTIME_ASSETS,
6
- candidatesFor,
7
- createPerBoxFirewall,
8
- currentHetznerBaseFingerprintLive,
9
- deletePerBoxFirewall,
10
- detectEgressIp,
11
- ensureHetznerCredentials,
12
- ensureHetznerEnvLoaded,
13
- findStagedCliRuntimeRoot,
14
- firewallNeedsSync,
15
- isAttemptTimeout,
16
- isRetriable,
17
- makeHetznerClient,
18
- maskKey,
19
- normalizeSourceCidr,
20
- preparedStatePath,
21
- readHetznerCredStatus,
22
- readPreparedState,
23
- resolveRuntimeAssets,
24
- secretsPath,
25
- sshOnlyInboundRule,
26
- syncFirewallSource,
27
- updatePreparedState,
28
- withHetznerRetry,
29
- writePreparedState
30
- } from "./chunk-DBMLOY3T.js";
31
2
  import {
32
3
  createCloudProvider
33
- } from "./chunk-QKL7PCXQ.js";
4
+ } from "./chunk-CDEJ2GQK.js";
5
+ import {
6
+ detectPortless,
7
+ portlessDoctorRow
8
+ } from "./chunk-YZXXBHWG.js";
34
9
  import {
10
+ UserFacingError,
11
+ claudeInstallFingerprint,
12
+ computeContextSha256,
13
+ errSummary,
14
+ hostOpenCommand,
15
+ preparedStatePathFor,
16
+ readCliStamp,
17
+ readPreparedStateRaw,
35
18
  stageAgentsStaticForUpload,
36
19
  stageClaudeStaticForUpload,
37
20
  stageCodexStaticForUpload,
38
- stageOpencodeStaticForUpload
39
- } from "./chunk-YZVFGFYQ.js";
21
+ stageOpencodeStaticForUpload,
22
+ writeManagedSecrets,
23
+ writePreparedStateRaw
24
+ } from "./chunk-ALEYDWAO.js";
25
+
26
+ // ../../packages/sandbox-hetzner/dist/chunk-3ZWBEZND.js
27
+ import { existsSync, readFileSync } from "fs";
28
+ import { homedir } from "os";
29
+ import { resolve } from "path";
30
+ import { spawnSync } from "child_process";
31
+ import { homedir as homedir2 } from "os";
32
+ import { resolve as resolve2 } from "path";
40
33
  import {
41
- UserFacingError,
42
- computeContextSha256,
43
- readCliStamp
44
- } from "./chunk-X2DWS4KS.js";
45
- import "./chunk-G3H2L3O2.js";
46
- import "./chunk-WJFZJZIM.js";
34
+ cancel,
35
+ confirm,
36
+ isCancel,
37
+ intro,
38
+ log,
39
+ note,
40
+ outro,
41
+ password,
42
+ spinner
43
+ } from "@clack/prompts";
44
+ import { existsSync as existsSync2 } from "fs";
45
+ import { dirname, resolve as resolve3 } from "path";
46
+ import { fileURLToPath } from "url";
47
+ var HETZNER_KEYS = ["HCLOUD_TOKEN", "HCLOUD_ENDPOINT"];
48
+ var loaded = false;
49
+ function ensureHetznerEnvLoaded() {
50
+ if (loaded) return;
51
+ loaded = true;
52
+ importHetznerFromFile(resolve(homedir(), ".agentbox", "secrets.env"));
53
+ }
54
+ function importHetznerFromFile(path) {
55
+ if (!existsSync(path)) return;
56
+ let body;
57
+ try {
58
+ body = readFileSync(path, "utf8");
59
+ } catch {
60
+ return;
61
+ }
62
+ const parsed = parseEnvFile(body);
63
+ for (const key of HETZNER_KEYS) {
64
+ if (process.env[key] !== void 0) continue;
65
+ const value = parsed[key];
66
+ if (typeof value === "string") {
67
+ process.env[key] = value;
68
+ }
69
+ }
70
+ }
71
+ function parseEnvFile(body) {
72
+ const out = {};
73
+ for (const rawLine of body.split(/\r?\n/)) {
74
+ const line = rawLine.trim();
75
+ if (line.length === 0 || line.startsWith("#")) continue;
76
+ const stripped = line.startsWith("export ") ? line.slice("export ".length) : line;
77
+ const eq = stripped.indexOf("=");
78
+ if (eq <= 0) continue;
79
+ const key = stripped.slice(0, eq).trim();
80
+ let value = stripped.slice(eq + 1).trim();
81
+ if (value.length >= 2 && (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'"))) {
82
+ value = value.slice(1, -1);
83
+ }
84
+ out[key] = value;
85
+ }
86
+ return out;
87
+ }
88
+ var DEFAULT_HCLOUD_ENDPOINT = "https://api.hetzner.cloud/v1";
89
+ var HetznerApiError = class extends Error {
90
+ statusCode;
91
+ code;
92
+ details;
93
+ constructor(statusCode, code, message, details) {
94
+ super(`hetzner ${String(statusCode)} ${code}: ${message}`);
95
+ this.name = "HetznerApiError";
96
+ this.statusCode = statusCode;
97
+ this.code = code;
98
+ this.details = details;
99
+ }
100
+ };
101
+ function makeHetznerClient(opts = {}) {
102
+ ensureHetznerEnvLoaded();
103
+ const rawToken = opts.token ?? process.env.HCLOUD_TOKEN;
104
+ if (!rawToken || rawToken.trim().length === 0) {
105
+ throw new Error(
106
+ "Hetzner credentials not configured: HCLOUD_TOKEN is empty.\nRun `agentbox hetzner login` interactively, or set HCLOUD_TOKEN in the environment."
107
+ );
108
+ }
109
+ const token = rawToken.trim();
110
+ const endpoint = (opts.endpoint ?? process.env.HCLOUD_ENDPOINT ?? DEFAULT_HCLOUD_ENDPOINT).replace(/\/$/, "");
111
+ const fetchImpl = opts.fetchImpl ?? fetch;
112
+ async function req(method, path, body) {
113
+ const url = `${endpoint}${path}`;
114
+ const init = {
115
+ method,
116
+ headers: {
117
+ Authorization: `Bearer ${token}`,
118
+ ...body !== void 0 ? { "Content-Type": "application/json" } : {}
119
+ },
120
+ ...body !== void 0 ? { body: JSON.stringify(body) } : {}
121
+ };
122
+ const res = await fetchImpl(url, init);
123
+ if (res.status === 204) return null;
124
+ if (res.status === 404) return null;
125
+ if (!res.ok) {
126
+ let parsed = {};
127
+ try {
128
+ parsed = await res.json();
129
+ } catch {
130
+ }
131
+ const code = parsed.error?.code ?? `http_${String(res.status)}`;
132
+ const msg = parsed.error?.message ?? res.statusText ?? "unknown error";
133
+ throw new HetznerApiError(res.status, code, msg, parsed.error?.details);
134
+ }
135
+ const text = await res.text();
136
+ if (text.length === 0) return null;
137
+ return JSON.parse(text);
138
+ }
139
+ async function reqExpect(method, path, body) {
140
+ const out = await req(method, path, body);
141
+ if (out === null) {
142
+ throw new HetznerApiError(0, "empty_response", `expected a body from ${method} ${path}`);
143
+ }
144
+ return out;
145
+ }
146
+ return {
147
+ async getServer(id) {
148
+ const r = await req("GET", `/servers/${String(id)}`);
149
+ return r?.server ?? null;
150
+ },
151
+ async createServer(reqBody) {
152
+ const r = await reqExpect(
153
+ "POST",
154
+ "/servers",
155
+ reqBody
156
+ );
157
+ return { server: r.server, action: r.action };
158
+ },
159
+ async listServers(opts2) {
160
+ const params = new URLSearchParams();
161
+ if (opts2?.label_selector) params.set("label_selector", opts2.label_selector);
162
+ params.set("per_page", "50");
163
+ const all = [];
164
+ let pageNum = 1;
165
+ while (true) {
166
+ params.set("page", String(pageNum));
167
+ const r = await reqExpect("GET", `/servers?${params.toString()}`);
168
+ all.push(...r.servers);
169
+ const next = r.meta?.pagination?.next_page;
170
+ if (typeof next !== "number") break;
171
+ pageNum = next;
172
+ }
173
+ return all;
174
+ },
175
+ async deleteServer(id) {
176
+ const r = await req("DELETE", `/servers/${String(id)}`);
177
+ return r?.action ?? null;
178
+ },
179
+ async powerOn(id) {
180
+ const r = await reqExpect(
181
+ "POST",
182
+ `/servers/${String(id)}/actions/poweron`
183
+ );
184
+ return r.action;
185
+ },
186
+ async powerOff(id) {
187
+ const r = await reqExpect(
188
+ "POST",
189
+ `/servers/${String(id)}/actions/poweroff`
190
+ );
191
+ return r.action;
192
+ },
193
+ async shutdown(id) {
194
+ const r = await reqExpect(
195
+ "POST",
196
+ `/servers/${String(id)}/actions/shutdown`
197
+ );
198
+ return r.action;
199
+ },
200
+ async createImage(id, body) {
201
+ const r = await reqExpect(
202
+ "POST",
203
+ `/servers/${String(id)}/actions/create_image`,
204
+ body
205
+ );
206
+ return { image: r.image, action: r.action };
207
+ },
208
+ async getImage(id) {
209
+ const r = await req("GET", `/images/${String(id)}`);
210
+ return r?.image ?? null;
211
+ },
212
+ async listImages(opts2) {
213
+ const params = new URLSearchParams();
214
+ if (opts2?.type) params.set("type", opts2.type);
215
+ if (opts2?.label_selector) params.set("label_selector", opts2.label_selector);
216
+ if (opts2?.name) params.set("name", opts2.name);
217
+ params.set("per_page", "50");
218
+ const all = [];
219
+ let pageNum = 1;
220
+ while (true) {
221
+ params.set("page", String(pageNum));
222
+ const r = await reqExpect("GET", `/images?${params.toString()}`);
223
+ all.push(...r.images);
224
+ const next = r.meta?.pagination?.next_page;
225
+ if (typeof next !== "number") break;
226
+ pageNum = next;
227
+ }
228
+ return all;
229
+ },
230
+ async deleteImage(id) {
231
+ await req("DELETE", `/images/${String(id)}`);
232
+ },
233
+ async createFirewall(reqBody) {
234
+ const r = await reqExpect("POST", "/firewalls", reqBody);
235
+ return r.firewall;
236
+ },
237
+ async setFirewallRules(id, rules) {
238
+ const r = await reqExpect(
239
+ "POST",
240
+ `/firewalls/${String(id)}/actions/set_rules`,
241
+ { rules }
242
+ );
243
+ return r.actions;
244
+ },
245
+ async getFirewall(id) {
246
+ const r = await req("GET", `/firewalls/${String(id)}`);
247
+ return r?.firewall ?? null;
248
+ },
249
+ async deleteFirewall(id) {
250
+ await req("DELETE", `/firewalls/${String(id)}`);
251
+ },
252
+ async listLocations() {
253
+ const r = await reqExpect("GET", "/locations");
254
+ return r.locations;
255
+ }
256
+ };
257
+ }
258
+ function exitOnCancel(v) {
259
+ if (isCancel(v)) {
260
+ cancel("Cancelled.");
261
+ process.exit(130);
262
+ }
263
+ return v;
264
+ }
265
+ var DASHBOARD_KEYS_URL = "https://console.hetzner.cloud/projects";
266
+ var MANAGED_KEYS = ["HCLOUD_TOKEN", "HCLOUD_ENDPOINT"];
267
+ async function ensureHetznerCredentials(opts = {}) {
268
+ ensureHetznerEnvLoaded();
269
+ if (!opts.force && hasUsableCredentials()) return;
270
+ if (!process.stdin.isTTY) return;
271
+ intro("Hetzner Cloud setup");
272
+ note(
273
+ `AgentBox needs a Hetzner Cloud API token (project-scoped) to provision VPSes.
274
+
275
+ 1. Open ${DASHBOARD_KEYS_URL}
276
+ 2. Pick a project (or create one).
277
+ 3. Security \u2192 API Tokens \u2192 Generate API Token (Read + Write).`,
278
+ "API token required"
279
+ );
280
+ const open = exitOnCancel(
281
+ await confirm({
282
+ message: `Open ${DASHBOARD_KEYS_URL} in your browser?`,
283
+ initialValue: true
284
+ })
285
+ );
286
+ if (open) openDashboard();
287
+ for (let attempt = 0; attempt < 2; attempt++) {
288
+ const creds = await promptForCredentials();
289
+ const result = await validateCredentials(creds);
290
+ if (result.ok) {
291
+ persistCredentials(creds);
292
+ log.success(`Hetzner credentials saved to ${secretsPath()}`);
293
+ outro("Setup complete.");
294
+ return;
295
+ }
296
+ if (result.kind === "auth" && attempt === 0) {
297
+ log.error(`That token was rejected by Hetzner: ${result.message}`);
298
+ log.info("Try again, or press Ctrl-C to cancel.");
299
+ continue;
300
+ }
301
+ if (result.kind === "network") {
302
+ log.warn(`Could not reach Hetzner to validate (${result.message}) \u2014 saving anyway.`);
303
+ persistCredentials(creds);
304
+ log.success(`Hetzner credentials saved to ${secretsPath()}`);
305
+ outro("Setup complete (unvalidated).");
306
+ return;
307
+ }
308
+ throw new Error(`Hetzner credentials rejected: ${result.message}`);
309
+ }
310
+ }
311
+ function hasUsableCredentials() {
312
+ return typeof process.env.HCLOUD_TOKEN === "string" && process.env.HCLOUD_TOKEN.length > 0;
313
+ }
314
+ async function promptForCredentials() {
315
+ const token = exitOnCancel(
316
+ await password({
317
+ message: "Paste your Hetzner Cloud API token",
318
+ validate(v) {
319
+ if (!v || v.trim().length === 0) return "Cannot be empty";
320
+ return void 0;
321
+ }
322
+ })
323
+ );
324
+ return { token: token.trim() };
325
+ }
326
+ async function validateCredentials(creds) {
327
+ const s = spinner();
328
+ s.start("Validating credentials with Hetzner");
329
+ try {
330
+ const client2 = makeHetznerClient({ token: creds.token, endpoint: creds.endpoint });
331
+ await client2.listLocations();
332
+ s.stop("Hetzner credentials accepted");
333
+ return { ok: true };
334
+ } catch (err) {
335
+ const message = err instanceof Error ? err.message : String(err);
336
+ s.stop("Hetzner credentials check failed");
337
+ if (/401|403|unauthor|forbidden|invalid|token/i.test(message)) {
338
+ return { ok: false, kind: "auth", message };
339
+ }
340
+ return { ok: false, kind: "network", message };
341
+ }
342
+ }
343
+ function persistCredentials(creds) {
344
+ const record = { HCLOUD_TOKEN: creds.token };
345
+ if (creds.endpoint) record.HCLOUD_ENDPOINT = creds.endpoint;
346
+ writeManagedSecrets(MANAGED_KEYS, record);
347
+ }
348
+ async function setHetznerCredentials(fields) {
349
+ const token = (fields.token ?? "").trim();
350
+ const endpoint = (fields.endpoint ?? "").trim() || void 0;
351
+ if (!token) {
352
+ return { ok: false, error: "token is required", status: { configured: false } };
353
+ }
354
+ const creds = { token, endpoint };
355
+ const result = await validateCredentials(creds);
356
+ if (!result.ok && result.kind === "auth") {
357
+ return { ok: false, error: `token rejected by Hetzner: ${result.message}`, status: { configured: false } };
358
+ }
359
+ persistCredentials(creds);
360
+ const label = result.ok ? "token" : "token (unvalidated)";
361
+ return { ok: true, status: { configured: true, label } };
362
+ }
363
+ function openDashboard() {
364
+ try {
365
+ const r = spawnSync(hostOpenCommand(), [DASHBOARD_KEYS_URL], { stdio: "ignore" });
366
+ if (r.status !== 0) {
367
+ log.warn(`Could not auto-open the browser \u2014 visit ${DASHBOARD_KEYS_URL} manually.`);
368
+ }
369
+ } catch {
370
+ log.warn(`Could not auto-open the browser \u2014 visit ${DASHBOARD_KEYS_URL} manually.`);
371
+ }
372
+ }
373
+ function secretsPath() {
374
+ return resolve2(homedir2(), ".agentbox", "secrets.env");
375
+ }
376
+ function readHetznerCredStatus() {
377
+ const shellHadToken = !!process.env.HCLOUD_TOKEN;
378
+ ensureHetznerEnvLoaded();
379
+ const token = process.env.HCLOUD_TOKEN;
380
+ const endpoint = process.env.HCLOUD_ENDPOINT;
381
+ if (!token) return { source: "none" };
382
+ return {
383
+ token,
384
+ endpoint,
385
+ source: shellHadToken ? "env" : "secrets.env"
386
+ };
387
+ }
388
+ function maskKey(value) {
389
+ if (value.length <= 8) return "*".repeat(value.length);
390
+ return `${value.slice(0, 4)}\u2026${"*".repeat(8)}${value.slice(-4)}`;
391
+ }
392
+ var PROBES = [
393
+ "https://api.ipify.org",
394
+ "https://ifconfig.io/ip",
395
+ "https://icanhazip.com"
396
+ ];
397
+ var TIMEOUT_MS = 3e3;
398
+ var IPV4_RE = /^(?:\d{1,3}\.){3}\d{1,3}$/;
399
+ var IPV6_RE = /^[0-9a-fA-F:]+$/;
400
+ async function detectEgressIp(opts = {}) {
401
+ const probes = opts.probes ?? PROBES;
402
+ const timeout = opts.timeoutMs ?? TIMEOUT_MS;
403
+ const fetchImpl = opts.fetchImpl ?? fetch;
404
+ const errors = [];
405
+ for (const url of probes) {
406
+ try {
407
+ const ip = await raceTimeout(probe(url, fetchImpl), timeout);
408
+ if (ip) {
409
+ opts.onLog?.(`egress-ip: detected ${ip} via ${url}`);
410
+ return ip;
411
+ }
412
+ errors.push(`${url}: empty/invalid response`);
413
+ } catch (err) {
414
+ errors.push(`${url}: ${err instanceof Error ? err.message : String(err)}`);
415
+ }
416
+ }
417
+ throw new Error(
418
+ `could not auto-detect the host's egress IP \u2014 all ${String(probes.length)} probes failed:
419
+ ` + errors.map((e) => ` - ${e}`).join("\n") + `
420
+ Override with --firewall-source <cidr> (e.g. --firewall-source 0.0.0.0/0 for the explicit-open opt-in).`
421
+ );
422
+ }
423
+ async function probe(url, fetchImpl) {
424
+ const res = await fetchImpl(url, { method: "GET" });
425
+ if (!res.ok) return null;
426
+ const body = (await res.text()).trim();
427
+ if (IPV4_RE.test(body)) {
428
+ const parts = body.split(".").map((p) => Number.parseInt(p, 10));
429
+ if (parts.every((p) => p >= 0 && p <= 255)) return body;
430
+ return null;
431
+ }
432
+ if (IPV6_RE.test(body) && body.includes(":")) return body;
433
+ return null;
434
+ }
435
+ async function raceTimeout(p, ms) {
436
+ let timer;
437
+ try {
438
+ return await Promise.race([
439
+ p,
440
+ new Promise((_resolve, reject) => {
441
+ timer = setTimeout(() => reject(new Error(`probe timed out after ${String(ms)}ms`)), ms);
442
+ })
443
+ ]);
444
+ } finally {
445
+ if (timer !== void 0) clearTimeout(timer);
446
+ }
447
+ }
448
+ var DEFAULT_BACKOFF = [1e3, 2e3, 4e3];
449
+ var DEFAULT_ATTEMPT_TIMEOUT_MS = 3e4;
450
+ var AttemptTimeoutError = class extends Error {
451
+ constructor(method, ms) {
452
+ super(`hetzner ${method}: per-attempt timeout after ${String(ms)}ms`);
453
+ this.name = "AttemptTimeoutError";
454
+ }
455
+ };
456
+ function isAttemptTimeout(err) {
457
+ return err instanceof AttemptTimeoutError;
458
+ }
459
+ function isRetriable(err, allowAmbiguous) {
460
+ if (err instanceof HetznerApiError) {
461
+ if (err.statusCode === 429 || err.code === "rate_limit_exceeded") return true;
462
+ if (err.statusCode >= 500 && err.statusCode <= 599) return allowAmbiguous;
463
+ if (err.code === "locked" || err.code === "conflict") return true;
464
+ return false;
465
+ }
466
+ if (err instanceof AttemptTimeoutError) return allowAmbiguous;
467
+ if (err && typeof err === "object") {
468
+ const candidates = [err, err.cause];
469
+ for (const c of candidates) {
470
+ if (!c || typeof c !== "object") continue;
471
+ const code = c.code;
472
+ if (code === "ECONNRESET" || code === "ETIMEDOUT" || code === "ECONNABORTED" || code === "EAI_AGAIN" || code === "ECONNREFUSED" || code === "ENOTFOUND" || code === "UND_ERR_SOCKET" || code === "UND_ERR_CONNECT_TIMEOUT") {
473
+ return allowAmbiguous;
474
+ }
475
+ }
476
+ }
477
+ return false;
478
+ }
479
+ async function withHetznerRetry(opts, fn) {
480
+ const backoff = opts.backoffMs ?? DEFAULT_BACKOFF;
481
+ const maxAttempts = backoff.length + 1;
482
+ const timeoutMs = opts.attemptTimeoutMs ?? DEFAULT_ATTEMPT_TIMEOUT_MS;
483
+ const log2 = opts.onRetry ?? defaultRetryLog;
484
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
485
+ try {
486
+ return await raceTimeout2(fn(), timeoutMs, opts.method);
487
+ } catch (err) {
488
+ const last = attempt === maxAttempts;
489
+ if (last || !isRetriable(err, opts.retryOnAmbiguous)) throw err;
490
+ const delay = backoff[attempt - 1] ?? backoff[backoff.length - 1] ?? 4e3;
491
+ log2(
492
+ `hetzner ${opts.method}: attempt ${String(attempt)} failed (${errorSummary(err)}); retrying in ${String(delay)}ms`
493
+ );
494
+ await sleep(delay);
495
+ }
496
+ }
497
+ throw new Error(`withHetznerRetry: exhausted attempts for ${opts.method}`);
498
+ }
499
+ function defaultRetryLog(line) {
500
+ process.stderr.write(`
501
+ [hetzner-retry] ${line}
502
+ `);
503
+ }
504
+ function sleep(ms) {
505
+ return new Promise((resolve42) => setTimeout(resolve42, ms));
506
+ }
507
+ async function raceTimeout2(p, ms, method) {
508
+ let timer;
509
+ try {
510
+ return await Promise.race([
511
+ p,
512
+ new Promise((_resolve, reject) => {
513
+ timer = setTimeout(() => reject(new AttemptTimeoutError(method, ms)), ms);
514
+ })
515
+ ]);
516
+ } finally {
517
+ if (timer !== void 0) clearTimeout(timer);
518
+ }
519
+ }
520
+ function errorSummary(err) {
521
+ if (err instanceof HetznerApiError) {
522
+ return `HetznerApiError ${String(err.statusCode)} ${err.code}: ${truncate(err.message)}`;
523
+ }
524
+ if (err instanceof Error) {
525
+ const code = err.code;
526
+ return code !== void 0 ? `${err.name}(${String(code)}): ${truncate(err.message)}` : `${err.name}: ${truncate(err.message)}`;
527
+ }
528
+ return truncate(String(err));
529
+ }
530
+ function truncate(s, max = 160) {
531
+ return s.length > max ? `${s.slice(0, max)}\u2026` : s;
532
+ }
533
+ function sshOnlyInboundRule(sourceCidr) {
534
+ return [
535
+ {
536
+ direction: "in",
537
+ protocol: "tcp",
538
+ port: "22",
539
+ source_ips: [sourceCidr],
540
+ description: "agentbox: SSH from host egress IP only"
541
+ }
542
+ ];
543
+ }
544
+ function controlPlaneInboundRules(hostCidr) {
545
+ return [
546
+ {
547
+ direction: "in",
548
+ protocol: "tcp",
549
+ port: "22",
550
+ source_ips: [hostCidr],
551
+ description: "agentbox control plane: SSH from host egress IP only"
552
+ },
553
+ {
554
+ direction: "in",
555
+ protocol: "tcp",
556
+ port: "80",
557
+ source_ips: ["0.0.0.0/0", "::/0"],
558
+ description: "agentbox control plane: HTTP (ACME challenge + redirect)"
559
+ },
560
+ {
561
+ direction: "in",
562
+ protocol: "tcp",
563
+ port: "443",
564
+ source_ips: ["0.0.0.0/0", "::/0"],
565
+ description: "agentbox control plane: HTTPS"
566
+ }
567
+ ];
568
+ }
569
+ async function createPerBoxFirewall(client2, opts) {
570
+ return withHetznerRetry(
571
+ { method: "createFirewall", retryOnAmbiguous: false, attemptTimeoutMs: 6e4 },
572
+ () => client2.createFirewall({
573
+ name: opts.name,
574
+ rules: sshOnlyInboundRule(opts.sourceCidr),
575
+ labels: {
576
+ "agentbox.managed": "true",
577
+ "agentbox.role": "box",
578
+ ...opts.labels
579
+ }
580
+ })
581
+ );
582
+ }
583
+ async function syncFirewallSource(client2, firewallId, sourceCidr) {
584
+ await withHetznerRetry(
585
+ { method: "setFirewallRules", retryOnAmbiguous: true, attemptTimeoutMs: 6e4 },
586
+ () => client2.setFirewallRules(firewallId, sshOnlyInboundRule(sourceCidr))
587
+ );
588
+ }
589
+ async function deletePerBoxFirewall(client2, firewallId, opts = {}) {
590
+ const deadline = Date.now() + (opts.detachWaitMs ?? 6e4);
591
+ let interval = 1e3;
592
+ while (true) {
593
+ try {
594
+ await withHetznerRetry(
595
+ { method: "deleteFirewall", retryOnAmbiguous: true, attemptTimeoutMs: 3e4 },
596
+ () => client2.deleteFirewall(firewallId)
597
+ );
598
+ return;
599
+ } catch (err) {
600
+ if (err instanceof HetznerApiError && (err.statusCode === 404 || err.code === "not_found")) {
601
+ return;
602
+ }
603
+ const stillAttached = err instanceof HetznerApiError && (err.statusCode === 409 || err.code === "conflict" || err.code === "resource_in_use");
604
+ if (stillAttached && Date.now() < deadline) {
605
+ await new Promise((r) => setTimeout(r, interval));
606
+ interval = Math.min(interval * 2, 8e3);
607
+ continue;
608
+ }
609
+ throw err;
610
+ }
611
+ }
612
+ }
613
+ function firewallNeedsSync(allowedSource, currentEgress) {
614
+ if (allowedSource === "0.0.0.0/0") return false;
615
+ return allowedSource !== currentEgress;
616
+ }
617
+ function normalizeSourceCidr(raw) {
618
+ const trimmed = raw.trim();
619
+ if (trimmed.includes("/")) return trimmed;
620
+ if (trimmed.includes(":")) return `${trimmed}/128`;
621
+ return `${trimmed}/32`;
622
+ }
623
+ var SELF = dirname(fileURLToPath(import.meta.url));
624
+ function findStagedCliRuntimeRoot() {
625
+ const candidates = [
626
+ resolve3(SELF, "..", "runtime"),
627
+ // <cliRoot>/dist/.. → <cliRoot> then /runtime
628
+ resolve3(SELF, "..", "..", "runtime")
629
+ // chunk-NNNN.js at <cliRoot>/dist/<sub>/.. → <cliRoot>/runtime
630
+ ];
631
+ for (const c of candidates) {
632
+ if (existsSync2(resolve3(c, "hetzner", "scripts", "install-box.sh"))) return c;
633
+ }
634
+ return void 0;
635
+ }
636
+ var RUNTIME_ASSETS = [
637
+ { name: "install-box.sh", remoteBasename: "agentbox-install.sh", remoteMode: 493 },
638
+ { name: "agentbox-ctl", remoteBasename: "agentbox-ctl", remoteMode: 493 },
639
+ { name: "agentbox-vnc-start", remoteBasename: "agentbox-vnc-start", remoteMode: 493 },
640
+ { name: "agentbox-dockerd-start", remoteBasename: "agentbox-dockerd-start", remoteMode: 493 },
641
+ { name: "agentbox-portless-trust", remoteBasename: "agentbox-portless-trust", remoteMode: 493 },
642
+ { name: "agentbox-checkpoint-cleanup", remoteBasename: "agentbox-checkpoint-cleanup", remoteMode: 493 },
643
+ { name: "agentbox-open", remoteBasename: "agentbox-open", remoteMode: 493 },
644
+ { name: "gh-shim", remoteBasename: "agentbox-gh-shim", remoteMode: 493 },
645
+ { name: "git-shim", remoteBasename: "agentbox-git-shim", remoteMode: 493 },
646
+ { name: "ntn-shim", remoteBasename: "agentbox-ntn-shim", remoteMode: 493 },
647
+ { name: "linear-shim", remoteBasename: "agentbox-linear-shim", remoteMode: 493 },
648
+ { name: "custom-system-CLAUDE.md", remoteBasename: "agentbox-custom-CLAUDE.md", remoteMode: 420 },
649
+ { name: "claude-managed-settings.json", remoteBasename: "agentbox-managed-settings.json", remoteMode: 420 },
650
+ { name: "agentbox-codex-hooks.json", remoteBasename: "agentbox-codex-hooks.json", remoteMode: 420 },
651
+ { name: "agentbox-setup-skill.md", remoteBasename: "agentbox-setup-skill.md", remoteMode: 420 }
652
+ ];
653
+ function candidatesFor(name, opts = {}) {
654
+ const cliRoot = opts.cliRuntimeRoot;
655
+ const monorepo = opts.repoRoot ?? guessRepoRoot();
656
+ const monorepoRelative = {
657
+ "install-box.sh": ["packages/sandbox-hetzner/scripts/install-box.sh"],
658
+ "agentbox-ctl": ["packages/ctl/dist/bin.cjs"],
659
+ "agentbox-vnc-start": ["packages/sandbox-docker/scripts/agentbox-vnc-start"],
660
+ "agentbox-dockerd-start": ["packages/sandbox-docker/scripts/agentbox-dockerd-start"],
661
+ "agentbox-portless-trust": ["packages/sandbox-docker/scripts/agentbox-portless-trust"],
662
+ "agentbox-checkpoint-cleanup": ["packages/sandbox-docker/scripts/agentbox-checkpoint-cleanup"],
663
+ "agentbox-open": ["packages/sandbox-docker/scripts/agentbox-open"],
664
+ "gh-shim": ["packages/sandbox-docker/scripts/gh-shim"],
665
+ "git-shim": ["packages/sandbox-docker/scripts/git-shim"],
666
+ "ntn-shim": ["packages/sandbox-docker/scripts/ntn-shim"],
667
+ "linear-shim": ["packages/sandbox-docker/scripts/linear-shim"],
668
+ "custom-system-CLAUDE.md": ["packages/sandbox-hetzner/scripts/custom-system-CLAUDE.md"],
669
+ "claude-managed-settings.json": ["packages/sandbox-docker/scripts/claude-managed-settings.json"],
670
+ "agentbox-codex-hooks.json": ["packages/sandbox-docker/scripts/agentbox-codex-hooks.json"],
671
+ "agentbox-setup-skill.md": ["apps/cli/share/agentbox-setup/SKILL.md"]
672
+ };
673
+ const cliRelative = {
674
+ "install-box.sh": ["hetzner/scripts/install-box.sh"],
675
+ "agentbox-ctl": ["hetzner/ctl.cjs"],
676
+ "agentbox-vnc-start": ["hetzner/agentbox-vnc-start", "docker/packages/sandbox-docker/scripts/agentbox-vnc-start"],
677
+ "agentbox-dockerd-start": ["hetzner/agentbox-dockerd-start", "docker/packages/sandbox-docker/scripts/agentbox-dockerd-start"],
678
+ "agentbox-portless-trust": ["hetzner/agentbox-portless-trust", "docker/packages/sandbox-docker/scripts/agentbox-portless-trust"],
679
+ "agentbox-checkpoint-cleanup": ["hetzner/agentbox-checkpoint-cleanup", "docker/packages/sandbox-docker/scripts/agentbox-checkpoint-cleanup"],
680
+ "agentbox-open": ["hetzner/agentbox-open", "docker/packages/sandbox-docker/scripts/agentbox-open"],
681
+ "gh-shim": ["hetzner/gh-shim", "docker/packages/sandbox-docker/scripts/gh-shim"],
682
+ "git-shim": ["hetzner/git-shim", "docker/packages/sandbox-docker/scripts/git-shim"],
683
+ "ntn-shim": ["hetzner/ntn-shim", "docker/packages/sandbox-docker/scripts/ntn-shim"],
684
+ "linear-shim": ["hetzner/linear-shim", "docker/packages/sandbox-docker/scripts/linear-shim"],
685
+ "custom-system-CLAUDE.md": ["hetzner/custom-system-CLAUDE.md"],
686
+ "claude-managed-settings.json": ["hetzner/claude-managed-settings.json", "docker/packages/sandbox-docker/scripts/claude-managed-settings.json"],
687
+ "agentbox-codex-hooks.json": ["hetzner/agentbox-codex-hooks.json", "docker/packages/sandbox-docker/scripts/agentbox-codex-hooks.json"],
688
+ "agentbox-setup-skill.md": ["hetzner/agentbox-setup-skill.md", "docker/apps/cli/share/agentbox-setup/SKILL.md"]
689
+ };
690
+ const out = [];
691
+ if (cliRoot) {
692
+ for (const rel of cliRelative[name] ?? []) out.push(resolve3(cliRoot, rel));
693
+ }
694
+ for (const rel of monorepoRelative[name] ?? []) out.push(resolve3(monorepo, rel));
695
+ return out;
696
+ }
697
+ function resolveRuntimeAssets(opts = {}) {
698
+ const out = [];
699
+ const missing = [];
700
+ for (const asset of RUNTIME_ASSETS) {
701
+ const cands = candidatesFor(asset.name, opts);
702
+ const hit = cands.find((p) => existsSync2(p));
703
+ if (!hit) {
704
+ missing.push({ name: asset.name, tried: cands });
705
+ continue;
706
+ }
707
+ out.push({ ...asset, localPath: hit });
708
+ }
709
+ if (missing.length > 0) {
710
+ const lines = missing.flatMap((m) => [` - ${m.name}: tried`, ...m.tried.map((p) => ` ${p}`)]);
711
+ throw new Error(
712
+ `hetzner: could not resolve runtime assets \u2014 these files are needed to install on the prepare VPS:
713
+ ` + lines.join("\n") + `
714
+
715
+ If you are running from the monorepo, ensure \`pnpm -w build\` has run so packages/ctl/dist/bin.cjs exists. If you are running from a published CLI bundle, the runtime/hetzner tree should be staged automatically.`
716
+ );
717
+ }
718
+ return out;
719
+ }
720
+ function guessRepoRoot() {
721
+ let cur = SELF;
722
+ for (let i = 0; i < 8; i++) {
723
+ if (existsSync2(resolve3(cur, "pnpm-workspace.yaml"))) return cur;
724
+ const parent = dirname(cur);
725
+ if (parent === cur) break;
726
+ cur = parent;
727
+ }
728
+ return SELF;
729
+ }
730
+ var SCHEMA = 2;
731
+ function preparedStatePath() {
732
+ return preparedStatePathFor("hetzner");
733
+ }
734
+ function readPreparedState() {
735
+ const raw = readPreparedStateRaw("hetzner");
736
+ if (raw === null || typeof raw !== "object") return { schema: SCHEMA };
737
+ const parsed = raw;
738
+ if (parsed.schema === 1) {
739
+ const v1 = parsed;
740
+ return migrateFromV1(v1);
741
+ }
742
+ if (parsed.schema !== SCHEMA) {
743
+ return { schema: SCHEMA };
744
+ }
745
+ return {
746
+ schema: SCHEMA,
747
+ base: parsed.base
748
+ };
749
+ }
750
+ function migrateFromV1(v1) {
751
+ const base = v1.base ? {
752
+ imageId: v1.base.imageId,
753
+ description: v1.base.description,
754
+ createdAt: v1.base.createdAt,
755
+ contextSha256: v1.base.installScriptSha256
756
+ } : void 0;
757
+ return {
758
+ schema: SCHEMA,
759
+ base
760
+ };
761
+ }
762
+ function writePreparedState(state) {
763
+ writePreparedStateRaw("hetzner", state);
764
+ }
765
+ function updatePreparedState(mutate) {
766
+ const s = readPreparedState();
767
+ mutate(s);
768
+ writePreparedState(s);
769
+ }
770
+ async function currentHetznerBaseFingerprintLive(claudeInstall = "native") {
771
+ try {
772
+ const assets = resolveRuntimeAssets({ cliRuntimeRoot: findStagedCliRuntimeRoot() });
773
+ return claudeInstallFingerprint(
774
+ await computeContextSha256(assets.map((a) => ({ rel: a.name, abs: a.localPath }))),
775
+ claudeInstall
776
+ );
777
+ } catch {
778
+ return void 0;
779
+ }
780
+ }
47
781
 
48
782
  // ../../packages/sandbox-hetzner/dist/index.js
49
- import { existsSync as existsSync2 } from "fs";
783
+ import { existsSync as existsSync22 } from "fs";
50
784
  import { rm as rm2, rename, mkdir as mkdir3 } from "fs/promises";
51
785
  import { join as join4 } from "path";
52
786
  import { execa as execa4 } from "execa";
53
787
  import { resolve as resolvePath } from "path";
54
788
  import { join as join2 } from "path";
55
789
  import { mkdir, readFile } from "fs/promises";
56
- import { dirname, join, resolve } from "path";
790
+ import { dirname as dirname2, join, resolve as resolve4 } from "path";
57
791
  import { execa } from "execa";
58
792
  import { execa as execa2 } from "execa";
59
- import { existsSync } from "fs";
793
+ import { existsSync as existsSync3 } from "fs";
60
794
  import { mkdir as mkdir2, rm } from "fs/promises";
61
795
  import { createServer } from "net";
62
- import { homedir } from "os";
63
- import { dirname as dirname2, join as join3, resolve as resolve2 } from "path";
796
+ import { homedir as homedir3 } from "os";
797
+ import { dirname as dirname22, join as join3, resolve as resolve22 } from "path";
64
798
  import { execa as execa3 } from "execa";
799
+ import { mkdir as mkdir4, rm as rm3, writeFile } from "fs/promises";
800
+ import { homedir as homedir22, tmpdir } from "os";
801
+ import { join as join5 } from "path";
65
802
  function generatePrepareCloudInit(opts) {
66
803
  const pubkey = opts.sshPubkey.trim();
67
804
  return [
@@ -91,6 +828,32 @@ function generatePrepareCloudInit(opts) {
91
828
  ""
92
829
  ].join("\n");
93
830
  }
831
+ function controlPlaneCloudInit(opts) {
832
+ const pubkey = opts.sshPubkey.trim();
833
+ return [
834
+ "#cloud-config",
835
+ "# AgentBox control-plane VPS \u2014 provisioned by `agentbox control-plane setup --deploy hetzner`.",
836
+ "disable_root: false",
837
+ "ssh_pwauth: false",
838
+ "chpasswd:",
839
+ " expire: false",
840
+ "users:",
841
+ " - name: root",
842
+ " lock_passwd: false",
843
+ " ssh_authorized_keys:",
844
+ ` - ${yamlScalar(pubkey)}`,
845
+ "runcmd:",
846
+ " - [ passwd, -d, root ]",
847
+ ' - [ chage, -E, "-1", -I, "-1", -M, "99999", root ]',
848
+ ' - [ bash, -lc, "curl -fsSL https://get.docker.com | sh" ]',
849
+ ' - [ bash, -lc, "apt-get update && apt-get install -y git" ]',
850
+ ` - [ bash, -lc, "git clone --depth 1 --branch ${shArg(opts.repoRef)} ${shArg(opts.repoUrl)} /opt/agentbox || git clone ${shArg(opts.repoUrl)} /opt/agentbox" ]`,
851
+ ""
852
+ ].join("\n");
853
+ }
854
+ function shArg(value) {
855
+ return `'${value.replace(/'/g, "'\\''")}'`;
856
+ }
94
857
  function generateBoxCloudInit(opts) {
95
858
  const pubkey = opts.sshPubkey.trim();
96
859
  const lines = [
@@ -152,7 +915,7 @@ async function pollUntil(label, check, opts = {}) {
152
915
  }
153
916
  }
154
917
  async function mintSshKey(targetDir, comment) {
155
- const dir = resolve(targetDir);
918
+ const dir = resolve4(targetDir);
156
919
  const priv = join(dir, "id_ed25519");
157
920
  const pub = `${priv}.pub`;
158
921
  await mkdir(dir, { recursive: true, mode: 448 });
@@ -165,14 +928,14 @@ async function mintSshKey(targetDir, comment) {
165
928
  return { dir, privatePath: priv, publicPath: pub, publicKey };
166
929
  }
167
930
  async function mintPrepareKey() {
168
- const root = resolve(homedirOrCwd(), ".agentbox", "hetzner", `prepare-${Date.now().toString(36)}`);
931
+ const root = resolve4(homedirOrCwd(), ".agentbox", "hetzner", `prepare-${Date.now().toString(36)}`);
169
932
  const key = await mintSshKey(root, `agentbox-prepare-${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`);
170
933
  return {
171
934
  ...key,
172
935
  cleanup: async () => {
173
936
  try {
174
- const { rm: rm3 } = await import("fs/promises");
175
- await rm3(dirname(key.privatePath), { recursive: true, force: true });
937
+ const { rm: rm4 } = await import("fs/promises");
938
+ await rm4(dirname2(key.privatePath), { recursive: true, force: true });
176
939
  } catch {
177
940
  }
178
941
  }
@@ -292,16 +1055,18 @@ var SNAPSHOT_DEADLINE_MS = 20 * 6e4;
292
1055
  async function prepareHetzner(opts = {}) {
293
1056
  await ensureHetznerCredentials();
294
1057
  const client2 = makeHetznerClient();
295
- const log = opts.onLog ?? (() => {
1058
+ const log2 = opts.onLog ?? (() => {
296
1059
  });
297
- const progress = (step) => log(`prepare-hetzner: ${step}`);
1060
+ const progress = (step) => log2(`prepare-hetzner: ${step}`);
298
1061
  const existingState = readPreparedState();
299
1062
  const assets = resolveRuntimeAssets({
300
1063
  cliRuntimeRoot: opts.cliRuntimeRoot ?? findStagedCliRuntimeRoot(),
301
1064
  repoRoot: opts.repoRoot
302
1065
  });
303
- const contextSha = await computeContextSha256(
304
- assets.map((a) => ({ rel: a.name, abs: a.localPath }))
1066
+ const claudeInstall = opts.claudeInstall ?? "native";
1067
+ const contextSha = claudeInstallFingerprint(
1068
+ await computeContextSha256(assets.map((a) => ({ rel: a.name, abs: a.localPath }))),
1069
+ claudeInstall
305
1070
  );
306
1071
  if (!opts.force && existingState.base) {
307
1072
  const remote = await client2.getImage(existingState.base.imageId).catch(() => null);
@@ -330,7 +1095,7 @@ async function prepareHetzner(opts = {}) {
330
1095
  let serverId = null;
331
1096
  try {
332
1097
  progress("detecting host egress IP");
333
- const source = opts.firewallSource ? normalizeSourceCidr(opts.firewallSource) : `${await detectEgressIp({ onLog: log })}/32`;
1098
+ const source = opts.firewallSource ? normalizeSourceCidr(opts.firewallSource) : `${await detectEgressIp({ onLog: log2 })}/32`;
334
1099
  const stamp = Date.now().toString(36);
335
1100
  const firewallName = `agentbox-prepare-${stamp}`;
336
1101
  progress(`creating firewall ${firewallName} (source ${source})`);
@@ -376,7 +1141,7 @@ async function prepareHetzner(opts = {}) {
376
1141
  progress("ssh up \u2014 scp'ing runtime assets");
377
1142
  for (const asset of assets) {
378
1143
  const remote = `/tmp/${asset.remoteBasename}`;
379
- log(`prepare-hetzner: scp ${asset.name} -> ${remote}`);
1144
+ log2(`prepare-hetzner: scp ${asset.name} -> ${remote}`);
380
1145
  await scpUpload(sshTarget, asset.localPath, remote);
381
1146
  if (asset.remoteMode !== void 0) {
382
1147
  const modeOctal = asset.remoteMode.toString(8);
@@ -386,10 +1151,10 @@ async function prepareHetzner(opts = {}) {
386
1151
  progress("running install-box.sh on temp VPS (this takes ~5-15 min)");
387
1152
  const installRes = await sshExec(
388
1153
  sshTarget,
389
- `sudo mkdir -p /var/log/agentbox && set -o pipefail && bash -x /tmp/agentbox-install.sh 2>&1 | sudo tee /var/log/agentbox/install.log`,
1154
+ `sudo mkdir -p /var/log/agentbox && set -o pipefail && AGENTBOX_CLAUDE_INSTALL=${claudeInstall} bash -x /tmp/agentbox-install.sh 2>&1 | sudo tee /var/log/agentbox/install.log`,
390
1155
  {
391
1156
  timeoutMs: INSTALL_SCRIPT_TIMEOUT_MS,
392
- onLine: (line) => log(`[install] ${line}`)
1157
+ onLine: (line) => log2(`[install] ${line}`)
393
1158
  }
394
1159
  );
395
1160
  if (installRes.exitCode !== 0) {
@@ -413,17 +1178,17 @@ The full trace was preserved at /var/log/agentbox/install.log inside any box mad
413
1178
  const stagings = [];
414
1179
  try {
415
1180
  const claudeTar = await stageClaudeStaticForUpload({ hostWorkspace: opts.hostWorkspace });
416
- for (const w of claudeTar.warnings) log(`prepare-hetzner: ${w}`);
1181
+ for (const w of claudeTar.warnings) log2(`prepare-hetzner: ${w}`);
417
1182
  if (claudeTar.tarballPath)
418
1183
  stagings.push({ kind: "claude", tar: claudeTar, dest: "/home/vscode/.claude" });
419
1184
  else await claudeTar.cleanup();
420
1185
  const codexTar = await stageCodexStaticForUpload();
421
- for (const w of codexTar.warnings) log(`prepare-hetzner: ${w}`);
1186
+ for (const w of codexTar.warnings) log2(`prepare-hetzner: ${w}`);
422
1187
  if (codexTar.tarballPath)
423
1188
  stagings.push({ kind: "codex", tar: codexTar, dest: "/home/vscode/.codex" });
424
1189
  else await codexTar.cleanup();
425
1190
  const opencodeTar = await stageOpencodeStaticForUpload();
426
- for (const w of opencodeTar.warnings) log(`prepare-hetzner: ${w}`);
1191
+ for (const w of opencodeTar.warnings) log2(`prepare-hetzner: ${w}`);
427
1192
  if (opencodeTar.tarballPath)
428
1193
  stagings.push({
429
1194
  kind: "opencode",
@@ -432,17 +1197,17 @@ The full trace was preserved at /var/log/agentbox/install.log inside any box mad
432
1197
  });
433
1198
  else await opencodeTar.cleanup();
434
1199
  const agentsTar = await stageAgentsStaticForUpload();
435
- for (const w of agentsTar.warnings) log(`prepare-hetzner: ${w}`);
1200
+ for (const w of agentsTar.warnings) log2(`prepare-hetzner: ${w}`);
436
1201
  if (agentsTar.tarballPath)
437
1202
  stagings.push({ kind: "agents", tar: agentsTar, dest: "/home/vscode/.agents" });
438
1203
  else await agentsTar.cleanup();
439
1204
  for (const s of stagings) {
440
1205
  const remote = `/tmp/agentbox-${s.kind}-static.tar.gz`;
441
- log(`prepare-hetzner: scp ${s.kind} static (${s.tar.tarballPath}) -> ${remote}`);
1206
+ log2(`prepare-hetzner: scp ${s.kind} static (${s.tar.tarballPath}) -> ${remote}`);
442
1207
  await scpUpload(sshTarget, s.tar.tarballPath, remote);
443
1208
  const extractCmd = `sudo -u vscode mkdir -p ${s.dest} && sudo -u vscode tar -xzf ${remote} -C ${s.dest} --no-same-permissions --no-same-owner -m && rm -f ${remote}`;
444
1209
  const r = await sshExec(sshTarget, extractCmd, {
445
- onLine: (line) => log(`[stage:${s.kind}] ${line}`)
1210
+ onLine: (line) => log2(`[stage:${s.kind}] ${line}`)
446
1211
  });
447
1212
  if (r.exitCode !== 0) {
448
1213
  throw new Error(
@@ -476,7 +1241,7 @@ The full trace was preserved at /var/log/agentbox/install.log inside any box mad
476
1241
  deadlineMs: SNAPSHOT_DEADLINE_MS,
477
1242
  intervalMs: 3e3,
478
1243
  maxIntervalMs: 1e4,
479
- onPoll: (l) => log(`prepare-hetzner: ${l}`)
1244
+ onPoll: (l) => log2(`prepare-hetzner: ${l}`)
480
1245
  }
481
1246
  );
482
1247
  progress("persisting hetzner-prepared.json");
@@ -491,7 +1256,7 @@ The full trace was preserved at /var/log/agentbox/install.log inside any box mad
491
1256
  cliCommit: cliStamp.cliCommit
492
1257
  };
493
1258
  writePreparedState(state);
494
- log(`prepare-hetzner: wrote ${preparedStatePath()}`);
1259
+ log2(`prepare-hetzner: wrote ${preparedStatePath()}`);
495
1260
  progress(`deleting temp VPS ${String(serverId)}`);
496
1261
  await client2.deleteServer(serverId);
497
1262
  serverId = null;
@@ -502,23 +1267,23 @@ The full trace was preserved at /var/log/agentbox/install.log inside any box mad
502
1267
  return { snapshotName: ready.description, imageId: ready.id };
503
1268
  } catch (err) {
504
1269
  if (serverId !== null) {
505
- log(`prepare-hetzner: cleanup \u2014 deleting temp VPS ${String(serverId)} after failure`);
1270
+ log2(`prepare-hetzner: cleanup \u2014 deleting temp VPS ${String(serverId)} after failure`);
506
1271
  try {
507
1272
  await client2.deleteServer(serverId);
508
1273
  } catch (cleanupErr) {
509
- log(
1274
+ log2(
510
1275
  `prepare-hetzner: WARN \u2014 failed to delete temp VPS ${String(serverId)}; check the Hetzner dashboard manually. ${cleanupErr instanceof Error ? cleanupErr.message : String(cleanupErr)}`
511
1276
  );
512
1277
  }
513
1278
  }
514
1279
  if (firewallId !== null) {
515
- log(
1280
+ log2(
516
1281
  `prepare-hetzner: cleanup \u2014 deleting per-prepare firewall ${String(firewallId)} after failure`
517
1282
  );
518
1283
  try {
519
1284
  await deletePerBoxFirewall(client2, firewallId);
520
1285
  } catch (cleanupErr) {
521
- log(
1286
+ log2(
522
1287
  `prepare-hetzner: WARN \u2014 failed to delete firewall ${String(firewallId)}; check the Hetzner dashboard manually. ${cleanupErr instanceof Error ? cleanupErr.message : String(cleanupErr)}`
523
1288
  );
524
1289
  }
@@ -532,7 +1297,12 @@ var prepareHetznerProvider = (req) => prepareHetzner({
532
1297
  name: req.name,
533
1298
  hostWorkspace: req.hostWorkspace ?? process.cwd(),
534
1299
  force: req.force,
535
- onLog: req.onLog
1300
+ onLog: req.onLog,
1301
+ // Forward the Claude install mode (native | npm). Without this the Hetzner
1302
+ // bake always ran the native `curl install.sh`, whose CDN 403s datacenter
1303
+ // egress IPs — the `npm` escape hatch (box.claudeInstall / --claude-install
1304
+ // npm) never reached the bake. (matches prepareVercelProvider.)
1305
+ claudeInstall: req.claudeInstall
536
1306
  });
537
1307
  async function ensureHetznerBaseSnapshot() {
538
1308
  const state = readPreparedState();
@@ -565,11 +1335,11 @@ var SshTunnelManager = class {
565
1335
  boxSshDir,
566
1336
  forwards: /* @__PURE__ */ new Map()
567
1337
  };
568
- if (existsSync(controlPath) && await this.isAlive(controlPath)) {
1338
+ if (existsSync3(controlPath) && await this.isAlive(controlPath)) {
569
1339
  this.boxes.set(opts.boxId, tunnel);
570
1340
  return;
571
1341
  }
572
- if (existsSync(controlPath)) {
1342
+ if (existsSync3(controlPath)) {
573
1343
  await rm(controlPath, { force: true });
574
1344
  }
575
1345
  const connectTimeout = opts.connectTimeoutSeconds ?? 10;
@@ -601,7 +1371,7 @@ var SshTunnelManager = class {
601
1371
  `${user}@${opts.vpsHost}`
602
1372
  ];
603
1373
  const res = await execa3("ssh", argv, { reject: false });
604
- if (res.exitCode !== 0 || !existsSync(controlPath)) {
1374
+ if (res.exitCode !== 0 || !existsSync3(controlPath)) {
605
1375
  throw new Error(
606
1376
  `ssh ControlMaster failed for ${opts.boxId} (exit ${String(res.exitCode)}): ${res.stderr || res.stdout || "(no output)"}`
607
1377
  );
@@ -663,7 +1433,7 @@ var SshTunnelManager = class {
663
1433
  const existing = this.boxes.get(opts.boxId);
664
1434
  if (existing) {
665
1435
  const alive = await this.isAlive(existing.controlPath);
666
- if (!alive && existsSync(existing.controlPath)) {
1436
+ if (!alive && existsSync3(existing.controlPath)) {
667
1437
  try {
668
1438
  await execa3(
669
1439
  "ssh",
@@ -702,7 +1472,7 @@ var SshTunnelManager = class {
702
1472
  async close(boxId) {
703
1473
  const tunnel = this.boxes.get(boxId);
704
1474
  if (!tunnel) return;
705
- if (existsSync(tunnel.controlPath)) {
1475
+ if (existsSync3(tunnel.controlPath)) {
706
1476
  await execa3("ssh", ["-O", "exit", "-S", tunnel.controlPath, "dummy"], { reject: false });
707
1477
  await rm(tunnel.controlPath, { force: true });
708
1478
  }
@@ -748,7 +1518,7 @@ var SshTunnelManager = class {
748
1518
  }
749
1519
  };
750
1520
  function defaultBoxSshDir(boxId) {
751
- return resolve2(homedir(), ".agentbox", "boxes", boxId, "ssh");
1521
+ return resolve22(homedir3(), ".agentbox", "boxes", boxId, "ssh");
752
1522
  }
753
1523
  async function pickFreePort() {
754
1524
  return new Promise((resolveOk, reject) => {
@@ -926,7 +1696,7 @@ async function ensureLiveTarget(sandboxId) {
926
1696
  throw new Error(`hetzner: server ${String(id)} has no IPv4 address`);
927
1697
  }
928
1698
  const state = await ensurePerBoxState(sandboxId);
929
- if (!existsSync2(state.identity)) {
1699
+ if (!existsSync22(state.identity)) {
930
1700
  throw new Error(
931
1701
  `hetzner: per-box SSH key missing for sandbox ${sandboxId} (expected at ${state.identity}). If this box was created by a different host, you'll need to re-create it on this host.`
932
1702
  );
@@ -1034,10 +1804,10 @@ var hetznerBackend = {
1034
1804
  }
1035
1805
  }
1036
1806
  try {
1037
- if (existsSync2(key.dir)) await rm2(key.dir, { recursive: true, force: true });
1807
+ if (existsSync22(key.dir)) await rm2(key.dir, { recursive: true, force: true });
1038
1808
  if (serverId !== null) {
1039
1809
  const finalDir = perBoxDir(String(serverId));
1040
- if (existsSync2(finalDir)) await rm2(finalDir, { recursive: true, force: true });
1810
+ if (existsSync22(finalDir)) await rm2(finalDir, { recursive: true, force: true });
1041
1811
  }
1042
1812
  } catch {
1043
1813
  }
@@ -1277,6 +2047,172 @@ var hetznerBackend = {
1277
2047
  }
1278
2048
  }
1279
2049
  };
2050
+ function readCredStatusSummary() {
2051
+ return { configured: readHetznerCredStatus().source !== "none" };
2052
+ }
2053
+ async function doctorChecks() {
2054
+ try {
2055
+ const cred = readHetznerCredStatus();
2056
+ const credRes = cred.source === "none" ? {
2057
+ label: "credentials",
2058
+ status: "warn",
2059
+ detail: "HCLOUD_TOKEN not set",
2060
+ hint: "`agentbox hetzner login`"
2061
+ } : { label: "credentials", status: "ok", detail: `token from ${cred.source}` };
2062
+ const prepared = readPreparedState();
2063
+ const snapRes = prepared.base?.imageId ? {
2064
+ label: "base snapshot",
2065
+ status: "ok",
2066
+ detail: `image ${String(prepared.base.imageId)} (${prepared.base.cliVersion ?? "\u2014"})`
2067
+ } : {
2068
+ label: "base snapshot",
2069
+ status: "warn",
2070
+ detail: "not baked",
2071
+ hint: "`agentbox prepare --provider hetzner`"
2072
+ };
2073
+ const portlessRes = portlessDoctorRow(await detectPortless());
2074
+ return [credRes, snapRes, portlessRes];
2075
+ } catch (err) {
2076
+ return [{ label: "credentials", status: "warn", detail: errSummary(err) }];
2077
+ }
2078
+ }
2079
+ var REMOTE_APP_DIR = "/opt/agentbox/apps/hub";
2080
+ function caddyfile(domain) {
2081
+ return `${domain} {
2082
+ reverse_proxy app:3000
2083
+ }
2084
+ `;
2085
+ }
2086
+ var CADDY_COMPOSE = `services:
2087
+ caddy:
2088
+ image: caddy:2.8
2089
+ restart: unless-stopped
2090
+ ports:
2091
+ - '80:80'
2092
+ - '443:443'
2093
+ volumes:
2094
+ - ${REMOTE_APP_DIR}/Caddyfile:/etc/caddy/Caddyfile:ro
2095
+ - caddy_data:/data
2096
+ - caddy_config:/config
2097
+ depends_on:
2098
+ - app
2099
+ volumes:
2100
+ caddy_data:
2101
+ caddy_config:
2102
+ `;
2103
+ async function serverIpv4(client2, server, deadlineMs) {
2104
+ if (server.public_net.ipv4?.ip) return server.public_net.ipv4.ip;
2105
+ const stop = Date.now() + deadlineMs;
2106
+ while (Date.now() < stop) {
2107
+ const s = await client2.getServer(server.id);
2108
+ if (s?.public_net.ipv4?.ip) return s.public_net.ipv4.ip;
2109
+ await new Promise((r) => setTimeout(r, 3e3));
2110
+ }
2111
+ throw new Error(`server ${String(server.id)} never got a public IPv4`);
2112
+ }
2113
+ async function pollHealthz(url, deadlineMs, log2) {
2114
+ const stop = Date.now() + deadlineMs;
2115
+ let lastErr = "";
2116
+ while (Date.now() < stop) {
2117
+ try {
2118
+ const res = await fetch(`${url}/healthz`, { signal: AbortSignal.timeout(8e3) });
2119
+ if (res.ok) return;
2120
+ lastErr = `HTTP ${String(res.status)}`;
2121
+ } catch (e) {
2122
+ lastErr = e instanceof Error ? e.name : String(e);
2123
+ }
2124
+ log2(`waiting for ${url}/healthz (cert + app)\u2026 ${lastErr}`);
2125
+ await new Promise((r) => setTimeout(r, 6e3));
2126
+ }
2127
+ throw new Error(`control plane did not become healthy at ${url} (${lastErr})`);
2128
+ }
2129
+ async function deployControlPlaneToHetzner(opts) {
2130
+ const log2 = opts.onLog ?? (() => {
2131
+ });
2132
+ const repoUrl = opts.repoUrl ?? "https://github.com/madarco/agentbox.git";
2133
+ const repoRef = opts.repoRef ?? "main";
2134
+ const client2 = makeHetznerClient();
2135
+ const stamp = Date.now().toString(36);
2136
+ const name = `agentbox-control-plane-${stamp}`;
2137
+ log2("detecting host egress IP for the firewall\u2026");
2138
+ const hostCidr = normalizeSourceCidr(await detectEgressIp());
2139
+ log2("creating the control-plane firewall (:22 host-only, :80/:443 open)\u2026");
2140
+ const firewall = await withHetznerRetry(
2141
+ { method: "createFirewall", retryOnAmbiguous: false, attemptTimeoutMs: 6e4 },
2142
+ () => client2.createFirewall({
2143
+ name,
2144
+ rules: controlPlaneInboundRules(hostCidr),
2145
+ labels: { "agentbox.managed": "true", "agentbox.role": "control-plane" }
2146
+ })
2147
+ );
2148
+ const keyDir = join5(homedir22(), ".agentbox", "control-plane", "ssh", stamp);
2149
+ const key = await mintSshKey(keyDir, `agentbox-control-plane-${stamp}`);
2150
+ const knownHosts = join5(keyDir, "known_hosts");
2151
+ log2(`provisioning ${opts.serverType ?? "cx23"} VPS (cloning ${repoUrl}@${repoRef})\u2026`);
2152
+ const { server } = await withHetznerRetry(
2153
+ { method: "createServer", retryOnAmbiguous: false, attemptTimeoutMs: 12e4 },
2154
+ () => client2.createServer({
2155
+ name,
2156
+ server_type: opts.serverType ?? "cx23",
2157
+ image: opts.serverImage ?? "ubuntu-24.04",
2158
+ location: opts.location ?? "nbg1",
2159
+ user_data: controlPlaneCloudInit({ sshPubkey: key.publicKey, repoUrl, repoRef }),
2160
+ firewalls: [{ firewall: firewall.id }],
2161
+ labels: { "agentbox.managed": "true", "agentbox.role": "control-plane" },
2162
+ start_after_create: true
2163
+ })
2164
+ );
2165
+ const ip = await serverIpv4(client2, server, 6e4);
2166
+ const domain = opts.domain ?? `${ip}.sslip.io`;
2167
+ const url = `https://${domain}`;
2168
+ const target = { host: ip, user: "root", identity: key.privatePath, knownHosts };
2169
+ log2(`VPS ${ip} up; waiting for ssh\u2026`);
2170
+ if (!await waitForSsh(target, 5 * 6e4)) {
2171
+ throw new Error(`ssh never came up on ${ip}`);
2172
+ }
2173
+ log2("waiting for cloud-init (Docker + repo clone)\u2026");
2174
+ await sshExec(target, "cloud-init status --wait || true", { timeoutMs: 12 * 6e4, onLine: log2 });
2175
+ const cloned = await sshExec(target, `test -d ${REMOTE_APP_DIR}`);
2176
+ if (cloned.exitCode !== 0) {
2177
+ throw new Error("repo clone did not complete on the VPS (cloud-init failed)");
2178
+ }
2179
+ const staging = join5(tmpdir(), `agentbox-cp-deploy-${stamp}`);
2180
+ await mkdir4(staging, { recursive: true });
2181
+ try {
2182
+ const envLocal = join5(staging, "control-plane.env");
2183
+ const caddyLocal = join5(staging, "Caddyfile");
2184
+ const composeLocal = join5(staging, "docker-compose.caddy.yml");
2185
+ await writeFile(envLocal, opts.envContent, { mode: 384 });
2186
+ await writeFile(caddyLocal, caddyfile(domain));
2187
+ await writeFile(composeLocal, CADDY_COMPOSE);
2188
+ log2("uploading env + Caddy config\u2026");
2189
+ await scpUpload(target, envLocal, `${REMOTE_APP_DIR}/.env`);
2190
+ await scpUpload(target, caddyLocal, `${REMOTE_APP_DIR}/Caddyfile`);
2191
+ await scpUpload(target, composeLocal, `${REMOTE_APP_DIR}/docker-compose.caddy.yml`);
2192
+ } finally {
2193
+ await rm3(staging, { recursive: true, force: true });
2194
+ }
2195
+ log2("building + starting the control plane (docker compose up --build)\u2026");
2196
+ const up = await sshExec(
2197
+ target,
2198
+ `cd ${REMOTE_APP_DIR} && docker compose -f docker-compose.yml -f docker-compose.caddy.yml up -d --build`,
2199
+ { timeoutMs: 25 * 6e4, onLine: log2 }
2200
+ );
2201
+ if (up.exitCode !== 0) {
2202
+ throw new Error(`docker compose up failed (exit ${String(up.exitCode)}): ${up.stderr || up.stdout}`);
2203
+ }
2204
+ log2(`provisioned; waiting for HTTPS at ${url} \u2026`);
2205
+ await pollHealthz(url, 3 * 6e4, log2);
2206
+ const result = {
2207
+ url,
2208
+ serverId: server.id,
2209
+ ip,
2210
+ domain,
2211
+ firewallId: firewall.id,
2212
+ sshKeyDir: keyDir
2213
+ };
2214
+ return result;
2215
+ }
1280
2216
  var cloudProvider = createCloudProvider(hetznerBackend, {
1281
2217
  defaultResources: { cpu: 2, memory: 4, disk: 40 }
1282
2218
  });
@@ -1285,47 +2221,61 @@ var hetznerProvider = {
1285
2221
  prepare: prepareHetznerProvider,
1286
2222
  baseFingerprint: () => currentHetznerBaseFingerprintLive()
1287
2223
  };
2224
+ var providerModule = {
2225
+ provider: hetznerProvider,
2226
+ backend: hetznerBackend,
2227
+ ensureCredentials: ensureHetznerCredentials,
2228
+ readCredStatus: readCredStatusSummary,
2229
+ setCredentials: setHetznerCredentials,
2230
+ currentBaseFingerprintLive: (claudeInstall) => currentHetznerBaseFingerprintLive(claudeInstall),
2231
+ doctorChecks
2232
+ };
2233
+
1288
2234
  export {
2235
+ ensureHetznerEnvLoaded,
1289
2236
  DEFAULT_HCLOUD_ENDPOINT,
1290
- HETZNER_DEFAULT_BOX_IMAGE_REF,
1291
2237
  HetznerApiError,
1292
- RUNTIME_ASSETS,
1293
- candidatesFor,
1294
- createPerBoxFirewall,
1295
- currentHetznerBaseFingerprintLive,
1296
- deletePerBoxFirewall,
1297
- detectEgressIp,
1298
- ensureHetznerBaseSnapshot,
2238
+ makeHetznerClient,
1299
2239
  ensureHetznerCredentials,
1300
- ensureHetznerEnvLoaded,
1301
- generateBoxCloudInit,
1302
- generatePrepareCloudInit,
1303
- hetznerBackend,
1304
- hetznerProvider,
2240
+ setHetznerCredentials,
2241
+ secretsPath,
2242
+ readHetznerCredStatus,
2243
+ maskKey,
2244
+ detectEgressIp,
1305
2245
  isAttemptTimeout,
1306
2246
  isRetriable,
1307
- makeHetznerClient,
1308
- maskKey,
1309
- mintPrepareKey,
1310
- mintSshKey,
2247
+ withHetznerRetry,
2248
+ sshOnlyInboundRule,
2249
+ createPerBoxFirewall,
2250
+ syncFirewallSource,
2251
+ deletePerBoxFirewall,
1311
2252
  normalizeSourceCidr,
1312
- pollUntil,
1313
- prepareHetzner,
1314
- prepareHetznerProvider,
2253
+ RUNTIME_ASSETS,
2254
+ candidatesFor,
2255
+ resolveRuntimeAssets,
1315
2256
  preparedStatePath,
1316
- readHetznerCredStatus,
1317
2257
  readPreparedState,
1318
- resolveRuntimeAssets,
1319
- scpDownload,
1320
- scpUpload,
1321
- secretsPath,
1322
- sshExec,
1323
- sshOnlyInboundRule,
1324
- sshOptArgs,
1325
- syncFirewallSource,
2258
+ writePreparedState,
1326
2259
  updatePreparedState,
2260
+ currentHetznerBaseFingerprintLive,
2261
+ generatePrepareCloudInit,
2262
+ controlPlaneCloudInit,
2263
+ generateBoxCloudInit,
2264
+ pollUntil,
2265
+ mintSshKey,
2266
+ mintPrepareKey,
2267
+ sshOptArgs,
2268
+ sshExec,
2269
+ scpUpload,
2270
+ scpDownload,
1327
2271
  waitForSsh,
1328
- withHetznerRetry,
1329
- writePreparedState
2272
+ prepareHetzner,
2273
+ prepareHetznerProvider,
2274
+ ensureHetznerBaseSnapshot,
2275
+ HETZNER_DEFAULT_BOX_IMAGE_REF,
2276
+ hetznerBackend,
2277
+ deployControlPlaneToHetzner,
2278
+ hetznerProvider,
2279
+ providerModule
1330
2280
  };
1331
- //# sourceMappingURL=dist-NWKOEWUJ.js.map
2281
+ //# sourceMappingURL=chunk-O67ZESNL.js.map