@madarco/agentbox 0.22.1 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/dist/{_cloud-attach-YH2SU75S.js → _cloud-attach-RFPLNACE.js} +5 -5
  3. package/dist/{chunk-GGWVTWJM.js → chunk-6OQENOJZ.js} +16 -13
  4. package/dist/chunk-6OQENOJZ.js.map +1 -0
  5. package/dist/{chunk-ALEYDWAO.js → chunk-CKC3CP7Y.js} +494 -148
  6. package/dist/chunk-CKC3CP7Y.js.map +1 -0
  7. package/dist/{chunk-O67ZESNL.js → chunk-ERMU7RMK.js} +43 -58
  8. package/dist/{chunk-O67ZESNL.js.map → chunk-ERMU7RMK.js.map} +1 -1
  9. package/dist/chunk-G3H2L3O2.js +0 -0
  10. package/dist/{chunk-KBVD2UUQ.js → chunk-JXDSSSXS.js} +3 -3
  11. package/dist/{chunk-CDEJ2GQK.js → chunk-L5SOSNQI.js} +4 -4
  12. package/dist/{chunk-W2FLHB54.js → chunk-Q626V2YX.js} +2 -2
  13. package/dist/{chunk-YZXXBHWG.js → chunk-QGL734YX.js} +170 -53
  14. package/dist/chunk-QGL734YX.js.map +1 -0
  15. package/dist/{chunk-VBSRJG53.js → chunk-QT3SHMLY.js} +9 -1
  16. package/dist/chunk-QT3SHMLY.js.map +1 -0
  17. package/dist/{chunk-O2NDZQHN.js → chunk-QVWGQJV6.js} +2 -2
  18. package/dist/chunk-WJFZJZIM.js +0 -0
  19. package/dist/cloud-poller-SUNA6ZQC-7M5LJHHE.js +0 -0
  20. package/dist/{dist-QBXEP4VY.js → dist-2BTJQUJS.js} +2 -2
  21. package/dist/{dist-UR2DB2HT.js → dist-GEHCZJCS.js} +6 -6
  22. package/dist/{dist-LJHS4PTC.js → dist-GJCIKH2C.js} +6 -6
  23. package/dist/{dist-EJXUKIR7.js → dist-JFUUDAI3.js} +18 -4
  24. package/dist/{dist-QNV4H6NN.js → dist-W5476E2U.js} +6 -6
  25. package/dist/{dist-YECTRVGD.js → dist-Z3GSHEFO.js} +8 -7
  26. package/dist/index.js +1339 -782
  27. package/dist/index.js.map +1 -1
  28. package/dist/{prepared-state-5FIGV4BE-BMUK63FD.js → prepared-state-LW2PKTEQ-5YMKG7UN.js} +2 -2
  29. package/package.json +28 -27
  30. package/runtime/_shared/agentbox-checkpoint-cleanup +0 -0
  31. package/runtime/_shared/agentbox-dockerd-start +0 -0
  32. package/runtime/_shared/agentbox-open +0 -0
  33. package/runtime/_shared/agentbox-portless-trust +0 -0
  34. package/runtime/_shared/agentbox-vnc-start +0 -0
  35. package/runtime/_shared/ctl.cjs +13 -1
  36. package/runtime/_shared/gh-shim +0 -0
  37. package/runtime/_shared/git-shim +0 -0
  38. package/runtime/_shared/linear-shim +0 -0
  39. package/runtime/_shared/ntn-shim +0 -0
  40. package/runtime/docker/Dockerfile.box +12 -0
  41. package/runtime/docker/packages/ctl/dist/bin.cjs +13 -1
  42. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-checkpoint-cleanup +0 -0
  43. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-dockerd-start +0 -0
  44. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-open +0 -0
  45. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-portless-trust +0 -0
  46. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-sshd-start +44 -0
  47. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-vnc-start +0 -0
  48. package/runtime/docker/packages/sandbox-docker/scripts/chromium-resolver +0 -0
  49. package/runtime/docker/packages/sandbox-docker/scripts/gh-shim +0 -0
  50. package/runtime/docker/packages/sandbox-docker/scripts/git-shim +0 -0
  51. package/runtime/docker/packages/sandbox-docker/scripts/linear-shim +0 -0
  52. package/runtime/docker/packages/sandbox-docker/scripts/ntn-shim +0 -0
  53. package/runtime/e2b/agentbox-checkpoint-cleanup +0 -0
  54. package/runtime/e2b/agentbox-dockerd-start +0 -0
  55. package/runtime/e2b/agentbox-open +0 -0
  56. package/runtime/e2b/agentbox-vnc-start +0 -0
  57. package/runtime/e2b/ctl.cjs +13 -1
  58. package/runtime/e2b/gh-shim +0 -0
  59. package/runtime/e2b/git-shim +0 -0
  60. package/runtime/e2b/linear-shim +0 -0
  61. package/runtime/e2b/ntn-shim +0 -0
  62. package/runtime/e2b/scripts/build-template.sh +0 -0
  63. package/runtime/hetzner/agentbox-checkpoint-cleanup +0 -0
  64. package/runtime/hetzner/agentbox-dockerd-start +0 -0
  65. package/runtime/hetzner/agentbox-open +0 -0
  66. package/runtime/hetzner/agentbox-portless-trust +0 -0
  67. package/runtime/hetzner/agentbox-vnc-start +0 -0
  68. package/runtime/hetzner/ctl.cjs +13 -1
  69. package/runtime/hetzner/gh-shim +0 -0
  70. package/runtime/hetzner/git-shim +0 -0
  71. package/runtime/hetzner/linear-shim +0 -0
  72. package/runtime/hetzner/ntn-shim +0 -0
  73. package/runtime/hetzner/scripts/install-box.sh +0 -0
  74. package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
  75. package/runtime/hub/apps/hub/.next/app-path-routes-manifest.json +3 -0
  76. package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
  77. package/runtime/hub/apps/hub/.next/routes-manifest.json +22 -0
  78. package/runtime/hub/apps/hub/.next/server/app/(auth)/signin/page_client-reference-manifest.js +1 -1
  79. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route/app-paths-manifest.json +3 -0
  80. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route/build-manifest.json +9 -0
  81. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route/server-reference-manifest.json +4 -0
  82. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js +9 -0
  83. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js.map +5 -0
  84. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js.nft.json +1 -0
  85. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route_client-reference-manifest.js +3 -0
  86. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route/app-paths-manifest.json +3 -0
  87. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route/build-manifest.json +9 -0
  88. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route/server-reference-manifest.json +4 -0
  89. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js +9 -0
  90. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js.map +5 -0
  91. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js.nft.json +1 -0
  92. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route_client-reference-manifest.js +3 -0
  93. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route/app-paths-manifest.json +3 -0
  94. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route/build-manifest.json +9 -0
  95. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route/server-reference-manifest.json +4 -0
  96. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js +8 -0
  97. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js.map +5 -0
  98. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js.nft.json +1 -0
  99. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route_client-reference-manifest.js +3 -0
  100. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
  101. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page/server-reference-manifest.json +12 -0
  102. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page_client-reference-manifest.js +1 -1
  103. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page/server-reference-manifest.json +12 -0
  104. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  105. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page/server-reference-manifest.json +12 -0
  106. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page_client-reference-manifest.js +1 -1
  107. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  108. package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
  109. package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
  110. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  111. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  112. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  113. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  114. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  115. package/runtime/hub/apps/hub/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  116. package/runtime/hub/apps/hub/.next/server/app-paths-manifest.json +3 -0
  117. package/runtime/hub/apps/hub/.next/server/chunks/0m4a_kysely_dist_095p8vu._.js +1 -1
  118. package/runtime/hub/apps/hub/.next/server/chunks/0ssw__next-internal_server_app_(dashboard)_api_v1_open-targets_route_actions_1z-vd4m.js +3 -0
  119. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_boxes_[id]_open_route_actions_1agwl8h.js +3 -0
  120. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_boxes_[id]_rename_route_actions_0mf3a9p.js +3 -0
  121. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1lmiq._.js +1 -1
  122. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0keu6we._.js +1 -1
  123. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ql4fjo._.js +1 -1
  124. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0szd4sh._.js +3 -0
  125. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0vs8fma._.js +1 -1
  126. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0w9ud8u._.js +1 -1
  127. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0yhb0gc._.js +1 -1
  128. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-0flwc._.js +3 -0
  129. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1a50b07._.js +3 -0
  130. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1bqbkd5._.js +2 -2
  131. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1dn_3i1._.js +1 -1
  132. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1hqla7-._.js +1 -1
  133. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1js2jdv._.js +1 -1
  134. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1nepkp-._.js +1 -1
  135. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1q5bqse._.js +1 -1
  136. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qa4a0v._.js +2 -2
  137. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1thipug._.js +3 -0
  138. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1v9om6g._.js +1 -1
  139. package/runtime/hub/apps/hub/.next/server/chunks/_06f2faq._.js +1 -1
  140. package/runtime/hub/apps/hub/.next/server/chunks/_0760z6y._.js +14 -14
  141. package/runtime/hub/apps/hub/.next/server/chunks/_0f3molr._.js +3 -0
  142. package/runtime/hub/apps/hub/.next/server/chunks/_0lgs9kd._.js +3 -0
  143. package/runtime/hub/apps/hub/.next/server/chunks/ssr/044u_hub__next-internal_server_app_(dashboard)_projects_[id]_page_actions_15f56np.js +1 -1
  144. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_09gdzmo._.js +1 -1
  145. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ozyjt1._.js +1 -1
  146. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ro6vh6._.js +1 -1
  147. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0tgpglr._.js +1 -1
  148. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_1laion6._.js +1 -1
  149. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_0b_hsjl._.js +1 -1
  150. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_boxes_[id]_page_actions_0k7kgn2.js +1 -1
  151. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_page_actions_1t3u0xy.js +1 -1
  152. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_[id]_page_tsx_1-j_972._.js +1 -1
  153. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_components_box-table_tsx_0a9pyn_._.js +1 -1
  154. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_components_1z1p98f._.js +1 -1
  155. package/runtime/hub/apps/hub/.next/server/functions-config-manifest.json +3 -0
  156. package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
  157. package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
  158. package/runtime/hub/apps/hub/.next/server/server-reference-manifest.js +1 -1
  159. package/runtime/hub/apps/hub/.next/server/server-reference-manifest.json +24 -0
  160. package/runtime/hub/apps/hub/.next/static/chunks/1py5tlz57h7ra.js +1 -0
  161. package/runtime/hub/apps/hub/.next/static/chunks/{3y2c7woqhtx9s.js → 23fswvjrabu89.js} +1 -1
  162. package/runtime/hub/apps/hub/.next/static/chunks/2xc1sm79a6tsb.js +1 -0
  163. package/runtime/hub/apps/hub/.next/static/chunks/3nedwutnzpdis.css +3 -0
  164. package/runtime/hub/apps/hub/.next/static/chunks/3p86ecqhr_7yy.js +1 -0
  165. package/runtime/hub/apps/hub/.next/static/chunks/3qof5hg87qf5n.js +1 -0
  166. package/runtime/hub/apps/hub/{auth-YBXDRLHG.js → auth-675P3LQS.js} +2 -2
  167. package/runtime/hub/apps/hub/{auth-config-LJGI76HI.js → auth-config-AOBEKRZQ.js} +2 -2
  168. package/runtime/hub/apps/hub/{chunk-OBKLTPIR.js → chunk-56YQBVN2.js} +1 -1
  169. package/runtime/hub/apps/hub/{chunk-JDA7BPPN.js → chunk-6HD4PARX.js} +9 -9
  170. package/runtime/hub/apps/hub/{chunk-AKLBSCSZ.js → chunk-EXQCBM5Q.js} +8 -0
  171. package/runtime/hub/apps/hub/{chunk-V5KGFHCF.js → chunk-JQFB2CNA.js} +132 -16
  172. package/runtime/hub/apps/hub/{chunk-LJG4CEGS.js → chunk-K6RA5GJI.js} +412 -117
  173. package/runtime/hub/apps/hub/{dist-ELOY2IUE.js → dist-3HR4RIPE.js} +17 -3
  174. package/runtime/hub/apps/hub/{dist-GGM4BUKM.js → dist-7GNKBKFV.js} +29 -42
  175. package/runtime/hub/apps/hub/{dist-BF54UNHK.js → dist-JWVTVHBT.js} +4 -4
  176. package/runtime/hub/apps/hub/{dist-CM4YAQLI.js → dist-OUNL2TCW.js} +4 -4
  177. package/runtime/hub/apps/hub/{dist-IENF7YOD.js → dist-STQK5XM6.js} +1 -1
  178. package/runtime/hub/apps/hub/{dist-FDBOJ74K.js → dist-TOHA4OA5.js} +4 -4
  179. package/runtime/hub/apps/hub/{hub-token-EW32VDIU.js → hub-token-2BZFBBW3.js} +2 -2
  180. package/runtime/hub/apps/hub/{prepared-state-5FIGV4BE-FIXKBF5A.js → prepared-state-LW2PKTEQ-7BCXARGA.js} +1 -1
  181. package/runtime/hub/apps/hub/server.js +153 -31
  182. package/runtime/relay/bin.cjs +13 -1
  183. package/runtime/vercel/agentbox-checkpoint-cleanup +0 -0
  184. package/runtime/vercel/agentbox-dockerd-start +0 -0
  185. package/runtime/vercel/agentbox-open +0 -0
  186. package/runtime/vercel/agentbox-vnc-start +0 -0
  187. package/runtime/vercel/ctl.cjs +13 -1
  188. package/runtime/vercel/gh-shim +0 -0
  189. package/runtime/vercel/git-shim +0 -0
  190. package/runtime/vercel/linear-shim +0 -0
  191. package/runtime/vercel/ntn-shim +0 -0
  192. package/runtime/vercel/scripts/provision.sh +0 -0
  193. package/LICENSE +0 -21
  194. package/dist/chunk-ALEYDWAO.js.map +0 -1
  195. package/dist/chunk-GGWVTWJM.js.map +0 -1
  196. package/dist/chunk-VBSRJG53.js.map +0 -1
  197. package/dist/chunk-YZXXBHWG.js.map +0 -1
  198. package/runtime/hub/apps/hub/.next/static/chunks/0dx4alyqu7cq1.css +0 -3
  199. package/runtime/hub/apps/hub/.next/static/chunks/0lq354ziiwxxl.js +0 -1
  200. package/runtime/hub/apps/hub/.next/static/chunks/11vmjdy3390ik.js +0 -1
  201. package/runtime/hub/apps/hub/.next/static/chunks/1svigjdfotduh.js +0 -1
  202. package/runtime/hub/apps/hub/.next/static/chunks/2d5e6t-5j4etp.js +0 -1
  203. /package/dist/{_cloud-attach-YH2SU75S.js.map → _cloud-attach-RFPLNACE.js.map} +0 -0
  204. /package/dist/{chunk-KBVD2UUQ.js.map → chunk-JXDSSSXS.js.map} +0 -0
  205. /package/dist/{chunk-CDEJ2GQK.js.map → chunk-L5SOSNQI.js.map} +0 -0
  206. /package/dist/{chunk-W2FLHB54.js.map → chunk-Q626V2YX.js.map} +0 -0
  207. /package/dist/{chunk-O2NDZQHN.js.map → chunk-QVWGQJV6.js.map} +0 -0
  208. /package/dist/{dist-EJXUKIR7.js.map → dist-2BTJQUJS.js.map} +0 -0
  209. /package/dist/{dist-UR2DB2HT.js.map → dist-GEHCZJCS.js.map} +0 -0
  210. /package/dist/{dist-LJHS4PTC.js.map → dist-GJCIKH2C.js.map} +0 -0
  211. /package/dist/{dist-QBXEP4VY.js.map → dist-JFUUDAI3.js.map} +0 -0
  212. /package/dist/{dist-QNV4H6NN.js.map → dist-W5476E2U.js.map} +0 -0
  213. /package/dist/{dist-YECTRVGD.js.map → dist-Z3GSHEFO.js.map} +0 -0
  214. /package/dist/{prepared-state-5FIGV4BE-BMUK63FD.js.map → prepared-state-LW2PKTEQ-5YMKG7UN.js.map} +0 -0
  215. /package/runtime/hub/apps/hub/.next/static/{TpPTWVdZDxqrPlONtJcR5 → 6WtaFwavHBpin3eT7-HjR}/_buildManifest.js +0 -0
  216. /package/runtime/hub/apps/hub/.next/static/{TpPTWVdZDxqrPlONtJcR5 → 6WtaFwavHBpin3eT7-HjR}/_clientMiddlewareManifest.js +0 -0
  217. /package/runtime/hub/apps/hub/.next/static/{TpPTWVdZDxqrPlONtJcR5 → 6WtaFwavHBpin3eT7-HjR}/_ssgManifest.js +0 -0
@@ -1,17 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createCloudProvider
4
- } from "./chunk-CDEJ2GQK.js";
4
+ } from "./chunk-L5SOSNQI.js";
5
5
  import {
6
6
  detectPortless,
7
7
  portlessDoctorRow
8
- } from "./chunk-YZXXBHWG.js";
8
+ } from "./chunk-QGL734YX.js";
9
9
  import {
10
10
  UserFacingError,
11
11
  claudeInstallFingerprint,
12
12
  computeContextSha256,
13
13
  errSummary,
14
14
  hostOpenCommand,
15
+ mintSshKey,
15
16
  preparedStatePathFor,
16
17
  readCliStamp,
17
18
  readPreparedStateRaw,
@@ -21,7 +22,7 @@ import {
21
22
  stageOpencodeStaticForUpload,
22
23
  writeManagedSecrets,
23
24
  writePreparedStateRaw
24
- } from "./chunk-ALEYDWAO.js";
25
+ } from "./chunk-CKC3CP7Y.js";
25
26
 
26
27
  // ../../packages/sandbox-hetzner/dist/chunk-3ZWBEZND.js
27
28
  import { existsSync, readFileSync } from "fs";
@@ -781,24 +782,22 @@ async function currentHetznerBaseFingerprintLive(claudeInstall = "native") {
781
782
 
782
783
  // ../../packages/sandbox-hetzner/dist/index.js
783
784
  import { existsSync as existsSync22 } from "fs";
784
- import { rm as rm2, rename, mkdir as mkdir3 } from "fs/promises";
785
- import { join as join4 } from "path";
786
- import { execa as execa4 } from "execa";
785
+ import { rm as rm2, rename, mkdir as mkdir2 } from "fs/promises";
786
+ import { join as join3 } from "path";
787
+ import { execa as execa3 } from "execa";
787
788
  import { resolve as resolvePath } from "path";
788
- import { join as join2 } from "path";
789
- import { mkdir, readFile } from "fs/promises";
790
- import { dirname as dirname2, join, resolve as resolve4 } from "path";
789
+ import { join } from "path";
790
+ import { dirname as dirname2, resolve as resolve4 } from "path";
791
791
  import { execa } from "execa";
792
- import { execa as execa2 } from "execa";
793
792
  import { existsSync as existsSync3 } from "fs";
794
- import { mkdir as mkdir2, rm } from "fs/promises";
793
+ import { mkdir, rm } from "fs/promises";
795
794
  import { createServer } from "net";
796
795
  import { homedir as homedir3 } from "os";
797
- import { dirname as dirname22, join as join3, resolve as resolve22 } from "path";
798
- import { execa as execa3 } from "execa";
799
- import { mkdir as mkdir4, rm as rm3, writeFile } from "fs/promises";
796
+ import { dirname as dirname22, join as join2, resolve as resolve22 } from "path";
797
+ import { execa as execa2 } from "execa";
798
+ import { mkdir as mkdir3, rm as rm3, writeFile } from "fs/promises";
800
799
  import { homedir as homedir22, tmpdir } from "os";
801
- import { join as join5 } from "path";
800
+ import { join as join4 } from "path";
802
801
  function generatePrepareCloudInit(opts) {
803
802
  const pubkey = opts.sshPubkey.trim();
804
803
  return [
@@ -914,19 +913,6 @@ async function pollUntil(label, check, opts = {}) {
914
913
  interval = Math.min(interval * 2, max);
915
914
  }
916
915
  }
917
- async function mintSshKey(targetDir, comment) {
918
- const dir = resolve4(targetDir);
919
- const priv = join(dir, "id_ed25519");
920
- const pub = `${priv}.pub`;
921
- await mkdir(dir, { recursive: true, mode: 448 });
922
- await execa(
923
- "ssh-keygen",
924
- ["-t", "ed25519", "-N", "", "-C", comment, "-f", priv, "-q"],
925
- { stdio: "pipe" }
926
- );
927
- const publicKey = (await readFile(pub, "utf8")).trim();
928
- return { dir, privatePath: priv, publicPath: pub, publicKey };
929
- }
930
916
  async function mintPrepareKey() {
931
917
  const root = resolve4(homedirOrCwd(), ".agentbox", "hetzner", `prepare-${Date.now().toString(36)}`);
932
918
  const key = await mintSshKey(root, `agentbox-prepare-${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`);
@@ -977,7 +963,7 @@ async function sshExec(target, remoteCmd, opts = {}) {
977
963
  `${target.user}@${target.host}`,
978
964
  remoteCmd
979
965
  ];
980
- const child = execa2("ssh", argv, {
966
+ const child = execa("ssh", argv, {
981
967
  reject: false,
982
968
  timeout: opts.timeoutMs,
983
969
  env: { ...process.env, ...opts.env },
@@ -1006,7 +992,7 @@ async function scpUpload(target, localPath, remotePath, opts = {}) {
1006
992
  localPath,
1007
993
  `${target.user}@${target.host}:${remotePath}`
1008
994
  ];
1009
- const res = await execa2("scp", argv, {
995
+ const res = await execa("scp", argv, {
1010
996
  reject: false,
1011
997
  timeout: opts.timeoutMs
1012
998
  });
@@ -1023,7 +1009,7 @@ async function scpDownload(target, remotePath, localPath, opts = {}) {
1023
1009
  `${target.user}@${target.host}:${remotePath}`,
1024
1010
  localPath
1025
1011
  ];
1026
- const res = await execa2("scp", argv, {
1012
+ const res = await execa("scp", argv, {
1027
1013
  reject: false,
1028
1014
  timeout: opts.timeoutMs
1029
1015
  });
@@ -1130,7 +1116,7 @@ async function prepareHetzner(opts = {}) {
1130
1116
  host: ip,
1131
1117
  user: "root",
1132
1118
  identity: key.privatePath,
1133
- knownHosts: join2(key.dir, "known_hosts")
1119
+ knownHosts: join(key.dir, "known_hosts")
1134
1120
  };
1135
1121
  const up = await waitForSsh(sshTarget, PREPARE_SSH_DEADLINE_MS);
1136
1122
  if (!up) {
@@ -1323,9 +1309,9 @@ var SshTunnelManager = class {
1323
1309
  */
1324
1310
  async open(opts) {
1325
1311
  const boxSshDir = opts.boxSshDir ?? defaultBoxSshDir(opts.boxId);
1326
- await mkdir2(boxSshDir, { recursive: true, mode: 448 });
1327
- const controlPath = join3(boxSshDir, "control.sock");
1328
- const knownHosts = join3(boxSshDir, "known_hosts");
1312
+ await mkdir(boxSshDir, { recursive: true, mode: 448 });
1313
+ const controlPath = join2(boxSshDir, "control.sock");
1314
+ const knownHosts = join2(boxSshDir, "known_hosts");
1329
1315
  const user = opts.vpsUser ?? "vscode";
1330
1316
  const tunnel = {
1331
1317
  controlPath,
@@ -1370,7 +1356,7 @@ var SshTunnelManager = class {
1370
1356
  `ConnectTimeout=${String(connectTimeout)}`,
1371
1357
  `${user}@${opts.vpsHost}`
1372
1358
  ];
1373
- const res = await execa3("ssh", argv, { reject: false });
1359
+ const res = await execa2("ssh", argv, { reject: false });
1374
1360
  if (res.exitCode !== 0 || !existsSync3(controlPath)) {
1375
1361
  throw new Error(
1376
1362
  `ssh ControlMaster failed for ${opts.boxId} (exit ${String(res.exitCode)}): ${res.stderr || res.stdout || "(no output)"}`
@@ -1408,7 +1394,7 @@ var SshTunnelManager = class {
1408
1394
  "dummy"
1409
1395
  // the target host is ignored when -O is used, but argv needs one
1410
1396
  ];
1411
- const res = await execa3("ssh", argv, { reject: false });
1397
+ const res = await execa2("ssh", argv, { reject: false });
1412
1398
  if (res.exitCode !== 0) {
1413
1399
  throw new Error(
1414
1400
  `ssh -O forward failed for ${boxId} (exit ${String(res.exitCode)}): ${res.stderr || res.stdout || "(no output)"}`
@@ -1435,7 +1421,7 @@ var SshTunnelManager = class {
1435
1421
  const alive = await this.isAlive(existing.controlPath);
1436
1422
  if (!alive && existsSync3(existing.controlPath)) {
1437
1423
  try {
1438
- await execa3(
1424
+ await execa2(
1439
1425
  "ssh",
1440
1426
  ["-O", "exit", "-S", existing.controlPath, "dummy"],
1441
1427
  { reject: false }
@@ -1462,7 +1448,7 @@ var SshTunnelManager = class {
1462
1448
  tunnel.controlPath,
1463
1449
  "dummy"
1464
1450
  ];
1465
- await execa3("ssh", argv, { reject: false });
1451
+ await execa2("ssh", argv, { reject: false });
1466
1452
  tunnel.forwards.delete(remotePort);
1467
1453
  }
1468
1454
  /**
@@ -1473,7 +1459,7 @@ var SshTunnelManager = class {
1473
1459
  const tunnel = this.boxes.get(boxId);
1474
1460
  if (!tunnel) return;
1475
1461
  if (existsSync3(tunnel.controlPath)) {
1476
- await execa3("ssh", ["-O", "exit", "-S", tunnel.controlPath, "dummy"], { reject: false });
1462
+ await execa2("ssh", ["-O", "exit", "-S", tunnel.controlPath, "dummy"], { reject: false });
1477
1463
  await rm(tunnel.controlPath, { force: true });
1478
1464
  }
1479
1465
  this.boxes.delete(boxId);
@@ -1499,7 +1485,7 @@ var SshTunnelManager = class {
1499
1485
  registerExisting(boxId, opts) {
1500
1486
  const boxSshDir = opts.boxSshDir ?? defaultBoxSshDir(opts.boxId);
1501
1487
  this.boxes.set(boxId, {
1502
- controlPath: join3(boxSshDir, "control.sock"),
1488
+ controlPath: join2(boxSshDir, "control.sock"),
1503
1489
  vpsHost: opts.vpsHost,
1504
1490
  vpsUser: opts.vpsUser ?? "vscode",
1505
1491
  identity: opts.identity,
@@ -1508,7 +1494,7 @@ var SshTunnelManager = class {
1508
1494
  });
1509
1495
  }
1510
1496
  async isAlive(controlPath) {
1511
- const res = await execa3("ssh", ["-O", "check", "-S", controlPath, "dummy"], { reject: false });
1497
+ const res = await execa2("ssh", ["-O", "check", "-S", controlPath, "dummy"], { reject: false });
1512
1498
  return res.exitCode === 0;
1513
1499
  }
1514
1500
  getTunnelOrThrow(boxId) {
@@ -1622,12 +1608,12 @@ function perBoxDir(sandboxId) {
1622
1608
  }
1623
1609
  async function ensurePerBoxState(sandboxId) {
1624
1610
  const dir = perBoxDir(sandboxId);
1625
- const sshDir = join4(dir, "ssh");
1626
- await mkdir3(sshDir, { recursive: true, mode: 448 });
1611
+ const sshDir = join3(dir, "ssh");
1612
+ await mkdir2(sshDir, { recursive: true, mode: 448 });
1627
1613
  return {
1628
1614
  dir,
1629
- identity: join4(sshDir, "id_ed25519"),
1630
- knownHosts: join4(sshDir, "known_hosts")
1615
+ identity: join3(sshDir, "id_ed25519"),
1616
+ knownHosts: join3(sshDir, "known_hosts")
1631
1617
  };
1632
1618
  }
1633
1619
  function bashScript(s) {
@@ -1914,7 +1900,7 @@ var hetznerBackend = {
1914
1900
  `${target.user}@${target.host}`,
1915
1901
  bashScript(opts?.cwd ? `cd ${shellQuote(opts.cwd)} && ${cmd}` : cmd)
1916
1902
  ];
1917
- const res = await execa4("ssh", argv, {
1903
+ const res = await execa3("ssh", argv, {
1918
1904
  reject: false,
1919
1905
  timeout: opts?.attemptTimeoutMs ?? 12e4,
1920
1906
  env: { ...process.env, ...opts?.env ?? {} }
@@ -1932,7 +1918,7 @@ var hetznerBackend = {
1932
1918
  localPath,
1933
1919
  `${target.user}@${target.host}:${remotePath}`
1934
1920
  ];
1935
- const res = await execa4("scp", argv, { reject: false, timeout: 3e5 });
1921
+ const res = await execa3("scp", argv, { reject: false, timeout: 3e5 });
1936
1922
  if (res.exitCode !== 0) {
1937
1923
  throw new Error(`hetzner: scp upload failed (exit ${String(res.exitCode)}): ${res.stderr || ""}`);
1938
1924
  }
@@ -1944,7 +1930,7 @@ var hetznerBackend = {
1944
1930
  `${target.user}@${target.host}:${remotePath}`,
1945
1931
  localPath
1946
1932
  ];
1947
- const res = await execa4("scp", argv, { reject: false, timeout: 3e5 });
1933
+ const res = await execa3("scp", argv, { reject: false, timeout: 3e5 });
1948
1934
  if (res.exitCode !== 0) {
1949
1935
  throw new Error(`hetzner: scp download failed (exit ${String(res.exitCode)}): ${res.stderr || ""}`);
1950
1936
  }
@@ -2145,9 +2131,9 @@ async function deployControlPlaneToHetzner(opts) {
2145
2131
  labels: { "agentbox.managed": "true", "agentbox.role": "control-plane" }
2146
2132
  })
2147
2133
  );
2148
- const keyDir = join5(homedir22(), ".agentbox", "control-plane", "ssh", stamp);
2134
+ const keyDir = join4(homedir22(), ".agentbox", "control-plane", "ssh", stamp);
2149
2135
  const key = await mintSshKey(keyDir, `agentbox-control-plane-${stamp}`);
2150
- const knownHosts = join5(keyDir, "known_hosts");
2136
+ const knownHosts = join4(keyDir, "known_hosts");
2151
2137
  log2(`provisioning ${opts.serverType ?? "cx23"} VPS (cloning ${repoUrl}@${repoRef})\u2026`);
2152
2138
  const { server } = await withHetznerRetry(
2153
2139
  { method: "createServer", retryOnAmbiguous: false, attemptTimeoutMs: 12e4 },
@@ -2176,12 +2162,12 @@ async function deployControlPlaneToHetzner(opts) {
2176
2162
  if (cloned.exitCode !== 0) {
2177
2163
  throw new Error("repo clone did not complete on the VPS (cloud-init failed)");
2178
2164
  }
2179
- const staging = join5(tmpdir(), `agentbox-cp-deploy-${stamp}`);
2180
- await mkdir4(staging, { recursive: true });
2165
+ const staging = join4(tmpdir(), `agentbox-cp-deploy-${stamp}`);
2166
+ await mkdir3(staging, { recursive: true });
2181
2167
  try {
2182
- const envLocal = join5(staging, "control-plane.env");
2183
- const caddyLocal = join5(staging, "Caddyfile");
2184
- const composeLocal = join5(staging, "docker-compose.caddy.yml");
2168
+ const envLocal = join4(staging, "control-plane.env");
2169
+ const caddyLocal = join4(staging, "Caddyfile");
2170
+ const composeLocal = join4(staging, "docker-compose.caddy.yml");
2185
2171
  await writeFile(envLocal, opts.envContent, { mode: 384 });
2186
2172
  await writeFile(caddyLocal, caddyfile(domain));
2187
2173
  await writeFile(composeLocal, CADDY_COMPOSE);
@@ -2262,7 +2248,6 @@ export {
2262
2248
  controlPlaneCloudInit,
2263
2249
  generateBoxCloudInit,
2264
2250
  pollUntil,
2265
- mintSshKey,
2266
2251
  mintPrepareKey,
2267
2252
  sshOptArgs,
2268
2253
  sshExec,
@@ -2278,4 +2263,4 @@ export {
2278
2263
  hetznerProvider,
2279
2264
  providerModule
2280
2265
  };
2281
- //# sourceMappingURL=chunk-O67ZESNL.js.map
2266
+ //# sourceMappingURL=chunk-ERMU7RMK.js.map