@madarco/agentbox 0.28.1 → 0.29.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 (452) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/dist/_cloud-attach-HKRHYCY7.js +30 -0
  3. package/dist/{chunk-JNC7MCWJ.js → chunk-3INUZQTR.js} +10 -10
  4. package/dist/chunk-3INUZQTR.js.map +1 -0
  5. package/dist/{chunk-4PR3KJ5X.js → chunk-6PIGTR4D.js} +20 -20
  6. package/dist/{chunk-NHVGKFVY.js → chunk-7LNXTPEE.js} +340 -22
  7. package/dist/chunk-7LNXTPEE.js.map +1 -0
  8. package/dist/{chunk-WB6S4W7O.js → chunk-7Q6BG5AN.js} +2413 -1012
  9. package/dist/chunk-7Q6BG5AN.js.map +1 -0
  10. package/dist/{chunk-BUMKBUXS.js → chunk-7QU6XENE.js} +3 -3
  11. package/dist/chunk-BWE2I5QG.js +17 -0
  12. package/dist/chunk-BWE2I5QG.js.map +1 -0
  13. package/dist/{chunk-7ABO7OIF.js → chunk-CO2I3CQI.js} +4 -4
  14. package/dist/{chunk-OUF3YTQO.js → chunk-DBXCFLAR.js} +14 -17
  15. package/dist/chunk-DBXCFLAR.js.map +1 -0
  16. package/dist/{chunk-74VIUGY6.js → chunk-DYETLPUT.js} +6 -9
  17. package/dist/chunk-DYETLPUT.js.map +1 -0
  18. package/dist/{chunk-HYXCH4GA.js → chunk-EFVTQ7YB.js} +7 -7
  19. package/dist/{chunk-46NNZMZT.js → chunk-EPFXLXCW.js} +372 -72
  20. package/dist/chunk-EPFXLXCW.js.map +1 -0
  21. package/dist/chunk-GWKGSXDC.js +71 -0
  22. package/dist/chunk-GWKGSXDC.js.map +1 -0
  23. package/dist/{chunk-CKD3PRON.js → chunk-GWYD7YBK.js} +12 -9
  24. package/dist/{chunk-CKD3PRON.js.map → chunk-GWYD7YBK.js.map} +1 -1
  25. package/dist/{chunk-NHTRTST5.js → chunk-HNWZO2XU.js} +38 -15
  26. package/dist/chunk-HNWZO2XU.js.map +1 -0
  27. package/dist/{chunk-EVT2SNF2.js → chunk-HO2ACZES.js} +3 -3
  28. package/dist/{chunk-V5NWSLWD.js → chunk-HP4L45LW.js} +14 -14
  29. package/dist/{chunk-B4DAH2F2.js → chunk-LHOKRCNF.js} +3 -3
  30. package/dist/{chunk-G3H2L3O2.js → chunk-MNDKP4VS.js} +23 -3
  31. package/dist/chunk-MNDKP4VS.js.map +1 -0
  32. package/dist/{chunk-JDSYMTMS.js → chunk-NAT2H7J4.js} +110 -66
  33. package/dist/chunk-NAT2H7J4.js.map +1 -0
  34. package/dist/{chunk-KFLGXE3R.js → chunk-NGERWFSA.js} +133 -22
  35. package/dist/chunk-NGERWFSA.js.map +1 -0
  36. package/dist/{chunk-GFOWBXV7.js → chunk-OKLEPEWZ.js} +460 -253
  37. package/dist/chunk-OKLEPEWZ.js.map +1 -0
  38. package/dist/{chunk-YI4GHC2E.js → chunk-QU5BI2HC.js} +12 -15
  39. package/dist/chunk-QU5BI2HC.js.map +1 -0
  40. package/dist/{chunk-BWM56FKY.js → chunk-RQURMAPA.js} +11 -11
  41. package/dist/{chunk-FPMRFMVK.js → chunk-RZCLRWNY.js} +9 -9
  42. package/dist/{chunk-JQLOGVZK.js → chunk-THUST2QK.js} +85 -21
  43. package/dist/chunk-THUST2QK.js.map +1 -0
  44. package/dist/{chunk-OXKW4GWD.js → chunk-UPVP6YGJ.js} +4 -70
  45. package/dist/chunk-UPVP6YGJ.js.map +1 -0
  46. package/dist/{chunk-7RSE7ESY.js → chunk-VVNXQ4XS.js} +27 -18
  47. package/dist/chunk-VVNXQ4XS.js.map +1 -0
  48. package/dist/{chunk-FGQFVUMH.js → chunk-VY54AX4T.js} +3 -3
  49. package/dist/{chunk-OUWVN2F2.js → chunk-WGNI24H2.js} +16 -13
  50. package/dist/chunk-WGNI24H2.js.map +1 -0
  51. package/dist/{chunk-PSA6GADQ.js → chunk-WHFCJBMO.js} +14 -1
  52. package/dist/chunk-WHFCJBMO.js.map +1 -0
  53. package/dist/{chunk-KJ5TCYNI.js → chunk-WHJYOO5H.js} +7 -6
  54. package/dist/chunk-WHJYOO5H.js.map +1 -0
  55. package/dist/cloud-backends.js +5 -5
  56. package/dist/{cloud-poller-SUNA6ZQC-7M5LJHHE.js → cloud-poller-QJRZXB4W-LJ2BRB3L.js} +2 -2
  57. package/dist/{control-plane-5R7PYRQ6.js → control-plane-UKKYXHIQ.js} +19 -18
  58. package/dist/cp-hub-upload-BM2OLTOS.js +81 -0
  59. package/dist/cp-hub-upload-BM2OLTOS.js.map +1 -0
  60. package/dist/{custody-client-PNCC2HBJ.js → custody-client-NPXJ46TB.js} +5 -4
  61. package/dist/{deploy-hetzner-SSGSXAKA.js → deploy-hetzner-Y3ILCDRF.js} +10 -10
  62. package/dist/{dist-RN6JOAG4.js → dist-5OGQ3CJQ.js} +81 -45
  63. package/dist/{dist-5OR4QTQW.js → dist-7B3VCLZI.js} +9 -9
  64. package/dist/{dist-EPFS5PRI.js → dist-A5ZEIVAW.js} +10 -10
  65. package/dist/{dist-6PYXFREL.js → dist-DOEGENNW.js} +61 -16
  66. package/dist/dist-DOEGENNW.js.map +1 -0
  67. package/dist/{dist-XQLKK7H3.js → dist-EOGD7KD6.js} +54 -28
  68. package/dist/dist-EOGD7KD6.js.map +1 -0
  69. package/dist/{dist-XATN4ZIR.js → dist-FBM2WS5S.js} +22 -4
  70. package/dist/{dist-POILUDVJ.js → dist-MUTFY7FA.js} +9 -9
  71. package/dist/{dist-ZNQZHTUN.js → dist-SMDXLPZO.js} +35 -6
  72. package/dist/{dist-M4O5MU5K.js → dist-VTLQKZ2E.js} +8 -8
  73. package/dist/{dist-SN2TCRZ5.js → dist-ZJIJHCZB.js} +9 -9
  74. package/dist/{dist-K5M4HKG7.js → dist-ZNYS7CVF.js} +21 -9
  75. package/dist/host-reach-drainer-ZJU2STQQ.js +9 -0
  76. package/dist/hub-Q4VOF4WN.js +37 -0
  77. package/dist/{hub-adopt-I44VGSBL.js → hub-adopt-OA336ZXZ.js} +8 -8
  78. package/dist/{hub-api-client-WJPBXZAZ.js → hub-api-client-5U6WOTZ3.js} +2 -2
  79. package/dist/{hub-docker-target-REEEWUG2.js → hub-docker-target-JKFCABK4.js} +16 -16
  80. package/dist/index.js +1321 -882
  81. package/dist/index.js.map +1 -1
  82. package/dist/prepare-GFWWKWGF.js +41 -0
  83. package/dist/prepared-custody-KU4PDVBT.js +36 -0
  84. package/dist/{prepared-state-PV3GUBHO-MF56HWMZ.js → prepared-state-LNQ7DYSU-AR5RMXAO.js} +4 -3
  85. package/dist/{publish-credentials-BPHUO5VL.js → publish-credentials-3SQXX45P.js} +11 -11
  86. package/dist/registry-AFKV3EO2.js +18 -0
  87. package/dist/relay-QH6OEY2V.js +20 -0
  88. package/dist/relay-QH6OEY2V.js.map +1 -0
  89. package/dist/{remote-docker-share-RX5ARK45.js → remote-docker-share-RMS6IB5X.js} +11 -11
  90. package/dist/remote-docker-share-RMS6IB5X.js.map +1 -0
  91. package/dist/tool-grant-push-T6DRBY3W.js +90 -0
  92. package/dist/tool-grant-push-T6DRBY3W.js.map +1 -0
  93. package/package.json +1 -2
  94. package/runtime/_shared/agentbox-tool-shim +21 -0
  95. package/runtime/_shared/ctl.cjs +6757 -5299
  96. package/runtime/_shared/gh-shim +103 -228
  97. package/runtime/digitalocean/agentbox-tool-shim +21 -0
  98. package/runtime/digitalocean/ctl.cjs +6757 -5299
  99. package/runtime/digitalocean/gh-shim +103 -228
  100. package/runtime/digitalocean/scripts/install-box.sh +9 -15
  101. package/runtime/docker/Dockerfile.box +8 -18
  102. package/runtime/docker/packages/ctl/dist/bin.cjs +6757 -5299
  103. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-tool-shim +21 -0
  104. package/runtime/docker/packages/sandbox-docker/scripts/gh-shim +103 -228
  105. package/runtime/e2b/agentbox-tool-shim +21 -0
  106. package/runtime/e2b/ctl.cjs +6757 -5299
  107. package/runtime/e2b/gh-shim +103 -228
  108. package/runtime/e2b/scripts/build-template.sh +5 -9
  109. package/runtime/hetzner/agentbox-tool-shim +21 -0
  110. package/runtime/hetzner/ctl.cjs +6757 -5299
  111. package/runtime/hetzner/gh-shim +103 -228
  112. package/runtime/hetzner/scripts/install-box.sh +9 -15
  113. package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
  114. package/runtime/hub/apps/hub/.next/app-path-routes-manifest.json +2 -0
  115. package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
  116. package/runtime/hub/apps/hub/.next/routes-manifest.json +16 -0
  117. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js +5 -5
  118. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js.nft.json +1 -1
  119. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route.js +2 -2
  120. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route.js.nft.json +1 -1
  121. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route.js +2 -2
  122. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route.js.nft.json +1 -1
  123. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route.js +2 -2
  124. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route.js.nft.json +1 -1
  125. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/agent/route.js +2 -2
  126. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/agent/route.js.nft.json +1 -1
  127. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route.js +2 -2
  128. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route.js.nft.json +1 -1
  129. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/checkpoint/route.js +2 -2
  130. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/checkpoint/route.js.nft.json +1 -1
  131. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.js +2 -2
  132. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.js.nft.json +1 -1
  133. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route.js +2 -2
  134. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route.js.nft.json +1 -1
  135. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/logs/route.js +1 -1
  136. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/logs/route.js.nft.json +1 -1
  137. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js +2 -2
  138. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js.nft.json +1 -1
  139. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js +2 -2
  140. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js.nft.json +1 -1
  141. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route.js +2 -2
  142. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route.js.nft.json +1 -1
  143. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route.js +2 -2
  144. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route.js.nft.json +1 -1
  145. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route.js +2 -2
  146. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route.js.nft.json +1 -1
  147. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route/app-paths-manifest.json +3 -0
  148. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route/build-manifest.json +9 -0
  149. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route/server-reference-manifest.json +4 -0
  150. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route.js +8 -0
  151. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route.js.map +5 -0
  152. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route.js.nft.json +1 -0
  153. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route_client-reference-manifest.js +3 -0
  154. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route.js +2 -2
  155. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route.js.nft.json +1 -1
  156. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/checkpoints/route.js +2 -2
  157. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/checkpoints/route.js.nft.json +1 -1
  158. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/[...path]/route.js +1 -1
  159. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/[...path]/route.js.nft.json +1 -1
  160. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/blob/[...path]/route.js +2 -2
  161. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/blob/[...path]/route.js.nft.json +1 -1
  162. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/health/route.js +2 -2
  163. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/health/route.js.nft.json +1 -1
  164. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route.js +2 -2
  165. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route.js.nft.json +1 -1
  166. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route.js +2 -2
  167. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route.js.nft.json +1 -1
  168. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route.js +2 -2
  169. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route.js.nft.json +1 -1
  170. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route.js +2 -2
  171. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route.js.nft.json +1 -1
  172. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route.js +2 -2
  173. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route.js.nft.json +1 -1
  174. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route.js +2 -2
  175. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route.js.nft.json +1 -1
  176. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/route.js +2 -2
  177. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/route.js.nft.json +1 -1
  178. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js +2 -2
  179. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js.nft.json +1 -1
  180. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route.js +2 -2
  181. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route.js.nft.json +1 -1
  182. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route.js +2 -2
  183. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route.js.nft.json +1 -1
  184. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/seed/route.js +2 -2
  185. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/seed/route.js.nft.json +1 -1
  186. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route.js +2 -2
  187. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route.js.nft.json +1 -1
  188. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route.js +2 -2
  189. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route.js.nft.json +1 -1
  190. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route.js +2 -2
  191. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route.js.nft.json +1 -1
  192. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route.js +2 -2
  193. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route.js.nft.json +1 -1
  194. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/prune/route.js +2 -2
  195. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/prune/route.js.nft.json +1 -1
  196. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/system/route.js +2 -2
  197. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/system/route.js.nft.json +1 -1
  198. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page.js +1 -1
  199. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -1
  200. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page.js +1 -1
  201. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page.js.nft.json +1 -1
  202. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page_client-reference-manifest.js +1 -1
  203. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route/app-paths-manifest.json +3 -0
  204. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route/build-manifest.json +9 -0
  205. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route/server-reference-manifest.json +4 -0
  206. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route.js +8 -0
  207. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route.js.map +5 -0
  208. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route.js.nft.json +1 -0
  209. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route_client-reference-manifest.js +3 -0
  210. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/custody/page.js +1 -1
  211. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/custody/page.js.nft.json +1 -1
  212. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page.js +1 -1
  213. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  214. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page.js +1 -1
  215. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page.js.nft.json +1 -1
  216. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page.js +1 -1
  217. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  218. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  219. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/system/page.js +1 -1
  220. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/system/page.js.nft.json +1 -1
  221. package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js +4 -4
  222. package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js.nft.json +1 -1
  223. package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
  224. package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
  225. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  226. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  227. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  228. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  229. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  230. package/runtime/hub/apps/hub/.next/server/app-paths-manifest.json +2 -0
  231. package/runtime/hub/apps/hub/.next/server/chunks/044u_hub__next-internal_server_app_(dashboard)_boxes_[id]_vnc_route_actions_1cy1392.js +3 -0
  232. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_boxes_[id]_vnc_route_actions_10y_e83.js +3 -0
  233. package/runtime/hub/apps/hub/.next/server/chunks/{[externals]__1nj4awx._.js → [externals]__02a249v._.js} +2 -2
  234. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__00f9v4p._.js +1 -1
  235. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__01nppdu._.js +1 -1
  236. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__02f8rwr._.js +1 -1
  237. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__068_052._.js +1 -1
  238. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__06ma5m4._.js +3 -0
  239. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__07kp2fu._.js +1 -1
  240. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1yi-2wa._.js → [root-of-the-server]__08u01ud._.js} +3 -3
  241. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__098bkh3._.js +3 -0
  242. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1hxo1tv._.js → [root-of-the-server]__09hbkgm._.js} +2 -2
  243. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09tmbom._.js +3 -0
  244. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0_3m9sf._.js +1 -1
  245. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0aotdzg._.js +3 -0
  246. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0bn6-pu._.js +1 -1
  247. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cpt9f9._.js +1 -1
  248. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1lmiq._.js +15 -15
  249. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dom248._.js +1 -1
  250. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0f0bb7o._.js +1 -1
  251. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0gb04bp._.js +1 -1
  252. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0glplq7._.js +1 -1
  253. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0xrdbh9._.js → [root-of-the-server]__0gxfyol._.js} +2 -2
  254. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0hsb2ak._.js +1 -1
  255. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0joqm8t._.js +1 -1
  256. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jp-895._.js +1 -1
  257. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1leda2s._.js → [root-of-the-server]__0jpqg_t._.js} +2 -2
  258. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__17bhgkz._.js → [root-of-the-server]__0lgnu00._.js} +2 -2
  259. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0lsv9-6._.js +1 -1
  260. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0pzgufc._.js +1 -1
  261. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qfv7z6._.js +1 -1
  262. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qlr61y._.js +1 -1
  263. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0s8srqi._.js +1 -1
  264. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0urn9j5._.js +1 -1
  265. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0vb8mk2._.js +4 -0
  266. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__17w5eaa._.js → [root-of-the-server]__0x27ifo._.js} +2 -2
  267. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0y7rvy1._.js +1 -1
  268. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0zsgjre._.js +1 -1
  269. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-bqa8a._.js +1 -1
  270. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__11uspjg._.js +1 -1
  271. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0zvr6ul._.js → [root-of-the-server]__15tgdh6._.js} +2 -2
  272. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1ek7nxv._.js → [root-of-the-server]__16bz_kz._.js} +2 -2
  273. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1w7jw4q._.js → [root-of-the-server]__18tehjj._.js} +2 -2
  274. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1ds8g0e._.js → [root-of-the-server]__1_hzv4s._.js} +2 -2
  275. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0cgpsh8._.js → [root-of-the-server]__1b5f5h4._.js} +2 -2
  276. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__10-aihp._.js → [root-of-the-server]__1dv80yf._.js} +2 -2
  277. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1eanlxn._.js +1 -1
  278. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__16lcb2d._.js → [root-of-the-server]__1fc-nvn._.js} +2 -2
  279. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1h4iahl._.js +1 -1
  280. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0f-c-eh._.js → [root-of-the-server]__1j0vnh3._.js} +2 -2
  281. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lgrtx6._.js +1 -1
  282. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1unqgd7._.js → [root-of-the-server]__1lz7931._.js} +2 -2
  283. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1oclxlx._.js → [root-of-the-server]__1n3u6-5._.js} +2 -2
  284. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qky5cd._.js +1 -1
  285. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1r2quye._.js +3 -0
  286. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rb_nc5._.js +1 -1
  287. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0cv16py._.js → [root-of-the-server]__1spr8ss._.js} +2 -2
  288. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1t_juqb._.js +1 -1
  289. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0t8kwy3._.js → [root-of-the-server]__1tct9rj._.js} +3 -3
  290. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0gfa1jg._.js → [root-of-the-server]__1tjtt06._.js} +2 -2
  291. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__09cigc7._.js → [root-of-the-server]__1whjno0._.js} +2 -2
  292. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1wn4-iv._.js +3 -0
  293. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1x6zxrf._.js +1 -1
  294. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0tyixgg._.js → [root-of-the-server]__1xfxc6i._.js} +2 -2
  295. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1m1_gm_._.js → [root-of-the-server]__1xqcvi4._.js} +2 -2
  296. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__207d30i._.js +1 -1
  297. package/runtime/hub/apps/hub/.next/server/chunks/_07icdxf._.js +1 -1
  298. package/runtime/hub/apps/hub/.next/server/chunks/_0907rw0._.js +1 -1
  299. package/runtime/hub/apps/hub/.next/server/chunks/_0adm87k._.js +1 -1
  300. package/runtime/hub/apps/hub/.next/server/chunks/_0g01mkg._.js +1 -1
  301. package/runtime/hub/apps/hub/.next/server/chunks/_0l_klgd._.js +1 -1
  302. package/runtime/hub/apps/hub/.next/server/chunks/_0lfm81x._.js +1 -1
  303. package/runtime/hub/apps/hub/.next/server/chunks/_0tbg83f._.js +1 -1
  304. package/runtime/hub/apps/hub/.next/server/chunks/_0tms_au._.js +1 -1
  305. package/runtime/hub/apps/hub/.next/server/chunks/_0zhli27._.js +1 -1
  306. package/runtime/hub/apps/hub/.next/server/chunks/_10yfoq5._.js +1 -1
  307. package/runtime/hub/apps/hub/.next/server/chunks/_12uhpbp._.js +1 -1
  308. package/runtime/hub/apps/hub/.next/server/chunks/_17a9v8y._.js +2 -2
  309. package/runtime/hub/apps/hub/.next/server/chunks/_1c7x9ee._.js +1 -1
  310. package/runtime/hub/apps/hub/.next/server/chunks/_1n-c443._.js +1 -1
  311. package/runtime/hub/apps/hub/.next/server/chunks/_1y80vfg._.js +1 -1
  312. package/runtime/hub/apps/hub/.next/server/chunks/_214_q-1._.js +1 -1
  313. package/runtime/hub/apps/hub/.next/server/chunks/apps_hub_app_(dashboard)_api_v1_lib_openapi_ts_1yokmzt._.js +1 -1
  314. package/runtime/hub/apps/hub/.next/server/chunks/{packages_relay_dist_0eg7ay1._.js → packages_relay_dist_0p8dnf4._.js} +4 -4
  315. package/runtime/hub/apps/hub/.next/server/chunks/ssr/{[root-of-the-server]__1plrs94._.js → [root-of-the-server]__0-c5j6l._.js} +2 -2
  316. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0r2xlss._.js +1 -1
  317. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_19vy9ni._.js +2 -2
  318. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_[id]_page_tsx_1-j_972._.js +1 -1
  319. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_settings_page_tsx_0hv6n82._.js +1 -1
  320. package/runtime/hub/apps/hub/.next/server/chunks/ssr/{packages_relay_dist_1z9j3g0._.js → packages_relay_dist_0sap-2l._.js} +4 -4
  321. package/runtime/hub/apps/hub/.next/server/functions-config-manifest.json +3 -1
  322. package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
  323. package/runtime/hub/apps/hub/.next/server/middleware.js +1 -1
  324. package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
  325. package/runtime/hub/apps/hub/.next/static/chunks/{328ny-3zs_h7m.js → 0jefm3re1-2jv.js} +1 -1
  326. package/runtime/hub/apps/hub/.next/static/chunks/{30h8mz040b5-l.js → 3u4odx1_-dy6b.js} +1 -1
  327. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/boxes/[id]/vnc/route.ts +45 -0
  328. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/openapi.ts +45 -1
  329. package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/validate.ts +14 -3
  330. package/runtime/hub/apps/hub/app/(dashboard)/boxes/[id]/vnc/route.ts +58 -0
  331. package/runtime/hub/apps/hub/app/(dashboard)/boxes/components/access.tsx +26 -9
  332. package/runtime/hub/apps/hub/app/(dashboard)/settings/components/provider-actions.tsx +34 -26
  333. package/runtime/hub/apps/hub/{auth-JMVHQKWY.js → auth-V7KPRWPS.js} +2 -2
  334. package/runtime/hub/apps/hub/{auth-config-5IFRWOK4.js → auth-config-B3Y3BT2I.js} +2 -2
  335. package/runtime/hub/apps/hub/{chunk-VKOCY6SX.js → chunk-3AD3MYNV.js} +49 -14
  336. package/runtime/hub/apps/hub/{chunk-KTVETF3F.js → chunk-3ZDBZYOY.js} +11 -8
  337. package/runtime/hub/apps/hub/{chunk-LPYK2354.js → chunk-5ABFGGPT.js} +339 -21
  338. package/runtime/hub/apps/hub/{chunk-UMPTTQBE.js → chunk-GBYD2ODL.js} +458 -251
  339. package/runtime/hub/apps/hub/{chunk-5TM7XXLT.js → chunk-H5SUXDZA.js} +2833 -1277
  340. package/runtime/hub/apps/hub/{chunk-QU3FFGJY.js → chunk-UQ5XNPOF.js} +11 -14
  341. package/runtime/hub/apps/hub/{chunk-3LAHFDJF.js → chunk-VWQNSZGI.js} +22 -2
  342. package/runtime/hub/apps/hub/{chunk-EZUK53CC.js → chunk-WHGY7HOC.js} +85 -21
  343. package/runtime/hub/apps/hub/{chunk-D33EV4YZ.js → chunk-ZP4RYI4U.js} +1 -1
  344. package/runtime/hub/apps/hub/{cloud-poller-SUNA6ZQC-VSKVMYHL.js → cloud-poller-QJRZXB4W-G7ECKNKQ.js} +1 -1
  345. package/runtime/hub/apps/hub/{dist-ELZHBQEM.js → dist-37EKQ6RZ.js} +11 -11
  346. package/runtime/hub/apps/hub/{dist-D265LCAN.js → dist-CGH7PEMZ.js} +21 -3
  347. package/runtime/hub/apps/hub/{dist-SYWTB6RD.js → dist-CMVSARW5.js} +15 -18
  348. package/runtime/hub/apps/hub/{dist-5HTJSOHS.js → dist-EGXZRZH2.js} +19 -7
  349. package/runtime/hub/apps/hub/{dist-YK5FFPXZ.js → dist-EOGGFZZS.js} +62 -20
  350. package/runtime/hub/apps/hub/{dist-E2FTSTCY.js → dist-LJBHOO3K.js} +34 -5
  351. package/runtime/hub/apps/hub/{dist-N3E5YAYY.js → dist-R77W6WJ5.js} +53 -26
  352. package/runtime/hub/apps/hub/{dist-JVEDVVVG.js → dist-TH2JZYZY.js} +7 -7
  353. package/runtime/hub/apps/hub/{dist-2YP57GMB.js → dist-XPRGHQH2.js} +13 -13
  354. package/runtime/hub/apps/hub/{dist-NKCXH5DW.js → dist-Z2Y5F7AF.js} +6 -6
  355. package/runtime/hub/apps/hub/docker-compose.yml +1 -0
  356. package/runtime/hub/apps/hub/{hub-token-MDOBY7MZ.js → hub-token-DDJ5Z6RS.js} +2 -2
  357. package/runtime/hub/apps/hub/{hub-worker-UFFLF37F.js → hub-worker-DXVMUQWF.js} +16 -16
  358. package/runtime/hub/apps/hub/lib/boxes/backend-types.ts +11 -0
  359. package/runtime/hub/apps/hub/lib/boxes/types.ts +43 -0
  360. package/runtime/hub/apps/hub/lib/boxes/vnc-link.ts +51 -0
  361. package/runtime/hub/apps/hub/lib/hub-backend.ts +127 -54
  362. package/runtime/hub/apps/hub/lib/hub-worker.ts +4 -4
  363. package/runtime/hub/apps/hub/lib/provider-importers.ts +66 -1
  364. package/runtime/hub/apps/hub/{prepared-state-PV3GUBHO-PPRQDYFR.js → prepared-state-LNQ7DYSU-ABC2EQVI.js} +3 -2
  365. package/runtime/hub/apps/hub/server.js +130 -72
  366. package/runtime/hub/apps/hub/server.ts +18 -0
  367. package/runtime/hub/apps/hub/test/vnc-link.test.ts +61 -0
  368. package/runtime/hub/apps/hub/tsconfig.tsbuildinfo +1 -1
  369. package/runtime/hub-deploy/docker-compose.yml +1 -0
  370. package/runtime/relay/bin.cjs +16623 -14688
  371. package/runtime/vercel/agentbox-tool-shim +21 -0
  372. package/runtime/vercel/ctl.cjs +6757 -5299
  373. package/runtime/vercel/gh-shim +103 -228
  374. package/runtime/vercel/scripts/provision.sh +5 -9
  375. package/share/host-skills/agentbox-info/SKILL.md +24 -14
  376. package/dist/_cloud-attach-Y5HIQ373.js +0 -28
  377. package/dist/chunk-46NNZMZT.js.map +0 -1
  378. package/dist/chunk-74VIUGY6.js.map +0 -1
  379. package/dist/chunk-7RSE7ESY.js.map +0 -1
  380. package/dist/chunk-G3H2L3O2.js.map +0 -1
  381. package/dist/chunk-GFOWBXV7.js.map +0 -1
  382. package/dist/chunk-JDSYMTMS.js.map +0 -1
  383. package/dist/chunk-JNC7MCWJ.js.map +0 -1
  384. package/dist/chunk-JQLOGVZK.js.map +0 -1
  385. package/dist/chunk-KFLGXE3R.js.map +0 -1
  386. package/dist/chunk-KJ5TCYNI.js.map +0 -1
  387. package/dist/chunk-NHTRTST5.js.map +0 -1
  388. package/dist/chunk-NHVGKFVY.js.map +0 -1
  389. package/dist/chunk-OUF3YTQO.js.map +0 -1
  390. package/dist/chunk-OUWVN2F2.js.map +0 -1
  391. package/dist/chunk-OXKW4GWD.js.map +0 -1
  392. package/dist/chunk-PSA6GADQ.js.map +0 -1
  393. package/dist/chunk-WB6S4W7O.js.map +0 -1
  394. package/dist/chunk-YI4GHC2E.js.map +0 -1
  395. package/dist/dist-6PYXFREL.js.map +0 -1
  396. package/dist/dist-XQLKK7H3.js.map +0 -1
  397. package/dist/hub-MJ7O4WXW.js +0 -36
  398. package/dist/prepare-V4U5HVJU.js +0 -40
  399. package/dist/prepared-custody-QIXW7MJM.js +0 -35
  400. package/dist/relay-DRDELF6B.js +0 -20
  401. package/runtime/_shared/linear-shim +0 -181
  402. package/runtime/_shared/ntn-shim +0 -95
  403. package/runtime/digitalocean/linear-shim +0 -181
  404. package/runtime/digitalocean/ntn-shim +0 -95
  405. package/runtime/docker/packages/sandbox-docker/scripts/linear-shim +0 -181
  406. package/runtime/docker/packages/sandbox-docker/scripts/ntn-shim +0 -95
  407. package/runtime/e2b/linear-shim +0 -181
  408. package/runtime/e2b/ntn-shim +0 -95
  409. package/runtime/hetzner/linear-shim +0 -181
  410. package/runtime/hetzner/ntn-shim +0 -95
  411. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__039tc0m._.js +0 -3
  412. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0c_3x8u._.js +0 -3
  413. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ty7ew1._.js +0 -3
  414. package/runtime/vercel/linear-shim +0 -181
  415. package/runtime/vercel/ntn-shim +0 -95
  416. /package/dist/{_cloud-attach-Y5HIQ373.js.map → _cloud-attach-HKRHYCY7.js.map} +0 -0
  417. /package/dist/{chunk-4PR3KJ5X.js.map → chunk-6PIGTR4D.js.map} +0 -0
  418. /package/dist/{chunk-BUMKBUXS.js.map → chunk-7QU6XENE.js.map} +0 -0
  419. /package/dist/{chunk-7ABO7OIF.js.map → chunk-CO2I3CQI.js.map} +0 -0
  420. /package/dist/{chunk-HYXCH4GA.js.map → chunk-EFVTQ7YB.js.map} +0 -0
  421. /package/dist/{chunk-EVT2SNF2.js.map → chunk-HO2ACZES.js.map} +0 -0
  422. /package/dist/{chunk-V5NWSLWD.js.map → chunk-HP4L45LW.js.map} +0 -0
  423. /package/dist/{chunk-B4DAH2F2.js.map → chunk-LHOKRCNF.js.map} +0 -0
  424. /package/dist/{chunk-BWM56FKY.js.map → chunk-RQURMAPA.js.map} +0 -0
  425. /package/dist/{chunk-FPMRFMVK.js.map → chunk-RZCLRWNY.js.map} +0 -0
  426. /package/dist/{chunk-FGQFVUMH.js.map → chunk-VY54AX4T.js.map} +0 -0
  427. /package/dist/{cloud-poller-SUNA6ZQC-7M5LJHHE.js.map → cloud-poller-QJRZXB4W-LJ2BRB3L.js.map} +0 -0
  428. /package/dist/{control-plane-5R7PYRQ6.js.map → control-plane-UKKYXHIQ.js.map} +0 -0
  429. /package/dist/{custody-client-PNCC2HBJ.js.map → custody-client-NPXJ46TB.js.map} +0 -0
  430. /package/dist/{deploy-hetzner-SSGSXAKA.js.map → deploy-hetzner-Y3ILCDRF.js.map} +0 -0
  431. /package/dist/{dist-5OR4QTQW.js.map → dist-5OGQ3CJQ.js.map} +0 -0
  432. /package/dist/{dist-EPFS5PRI.js.map → dist-7B3VCLZI.js.map} +0 -0
  433. /package/dist/{dist-K5M4HKG7.js.map → dist-A5ZEIVAW.js.map} +0 -0
  434. /package/dist/{dist-M4O5MU5K.js.map → dist-FBM2WS5S.js.map} +0 -0
  435. /package/dist/{dist-POILUDVJ.js.map → dist-MUTFY7FA.js.map} +0 -0
  436. /package/dist/{dist-RN6JOAG4.js.map → dist-SMDXLPZO.js.map} +0 -0
  437. /package/dist/{dist-SN2TCRZ5.js.map → dist-VTLQKZ2E.js.map} +0 -0
  438. /package/dist/{dist-XATN4ZIR.js.map → dist-ZJIJHCZB.js.map} +0 -0
  439. /package/dist/{dist-ZNQZHTUN.js.map → dist-ZNYS7CVF.js.map} +0 -0
  440. /package/dist/{hub-MJ7O4WXW.js.map → host-reach-drainer-ZJU2STQQ.js.map} +0 -0
  441. /package/dist/{hub-adopt-I44VGSBL.js.map → hub-Q4VOF4WN.js.map} +0 -0
  442. /package/dist/{hub-api-client-WJPBXZAZ.js.map → hub-adopt-OA336ZXZ.js.map} +0 -0
  443. /package/dist/{prepare-V4U5HVJU.js.map → hub-api-client-5U6WOTZ3.js.map} +0 -0
  444. /package/dist/{hub-docker-target-REEEWUG2.js.map → hub-docker-target-JKFCABK4.js.map} +0 -0
  445. /package/dist/{prepared-custody-QIXW7MJM.js.map → prepare-GFWWKWGF.js.map} +0 -0
  446. /package/dist/{prepared-state-PV3GUBHO-MF56HWMZ.js.map → prepared-custody-KU4PDVBT.js.map} +0 -0
  447. /package/dist/{relay-DRDELF6B.js.map → prepared-state-LNQ7DYSU-AR5RMXAO.js.map} +0 -0
  448. /package/dist/{publish-credentials-BPHUO5VL.js.map → publish-credentials-3SQXX45P.js.map} +0 -0
  449. /package/dist/{remote-docker-share-RX5ARK45.js.map → registry-AFKV3EO2.js.map} +0 -0
  450. /package/runtime/hub/apps/hub/.next/static/{z7_2bKU93xE7GwllL1Duv → XIx10ozuCZRzwSsiCF_5t}/_buildManifest.js +0 -0
  451. /package/runtime/hub/apps/hub/.next/static/{z7_2bKU93xE7GwllL1Duv → XIx10ozuCZRzwSsiCF_5t}/_clientMiddlewareManifest.js +0 -0
  452. /package/runtime/hub/apps/hub/.next/static/{z7_2bKU93xE7GwllL1Duv → XIx10ozuCZRzwSsiCF_5t}/_ssgManifest.js +0 -0
@@ -1,181 +0,0 @@
1
- #!/usr/bin/env bash
2
- # agentbox `linear` shim — translates a strict subset of `linear`
3
- # (@schpet/linear-cli, v2) subcommands into `agentbox-ctl integration
4
- # linear <op>` so the host's authenticated `linear` runs the operation and
5
- # only the result crosses back into the box. The in-box agent never sees a
6
- # Linear API token.
7
- #
8
- # Installed at /usr/local/bin/linear (real `linear` is not in the box).
9
- #
10
- # This shim ships only what documented agent flows need; anything outside
11
- # the subset below is rejected with a clear error. Add ops deliberately —
12
- # the relay is gated by `integrations.linear.enabled` and an explicit op
13
- # allowlist in @agentbox/integrations.
14
- #
15
- # Three classes of upstream subcommand are EXPLICITLY rejected even though
16
- # they exist on the host CLI, because proxying them would defeat the
17
- # security model:
18
- # - `auth token` PRINTS the raw API token to stdout — proxying it would
19
- # hand the box the host's Linear credential. The only auth-family op
20
- # we proxy is `auth whoami` (identity only), via `linear whoami`.
21
- # - `auth login/logout/migrate/default` would mutate host auth state.
22
- # - `issue delete` / `team delete` / `team create` are destructive and
23
- # off-list (widen deliberately, as gated writes, only if needed).
24
-
25
- set -euo pipefail
26
-
27
- # Path is a constant in production; the env override exists purely to let
28
- # unit tests substitute a stub `agentbox-ctl` on PATH without rewriting the
29
- # shim. Mirrors gh-shim / git-shim / ntn-shim.
30
- CTL="${AGENTBOX_CTL_PATH:-/usr/local/bin/agentbox-ctl}"
31
-
32
- die() {
33
- printf 'agentbox linear shim: %s\n' "$*" >&2
34
- exit 2
35
- }
36
-
37
- handle_auth() {
38
- local sub="${1-}"; shift || true
39
- case "$sub" in
40
- whoami)
41
- exec "$CTL" integration linear whoami -- "$@"
42
- ;;
43
- token)
44
- die "'auth token' leaks the raw API key — refused. Use 'linear whoami' for identity."
45
- ;;
46
- login|logout|migrate|default)
47
- die "'auth $sub' is not proxied (the host owns auth; run it on the host)."
48
- ;;
49
- '')
50
- die "missing subcommand for 'auth'. Supported: whoami"
51
- ;;
52
- *)
53
- die "unsupported 'auth $sub' (allowed: whoami)"
54
- ;;
55
- esac
56
- }
57
-
58
- handle_issue_comment() {
59
- local sub="${1-}"; shift || true
60
- case "$sub" in
61
- add)
62
- exec "$CTL" integration linear issue.comment -- "$@"
63
- ;;
64
- '')
65
- die "missing subcommand for 'issue comment'. Supported: add"
66
- ;;
67
- *)
68
- die "unsupported 'issue comment $sub' (allowed: add)"
69
- ;;
70
- esac
71
- }
72
-
73
- handle_issue() {
74
- local sub="${1-}"; shift || true
75
- case "$sub" in
76
- list)
77
- exec "$CTL" integration linear issue.list -- "$@"
78
- ;;
79
- mine)
80
- exec "$CTL" integration linear issue.mine -- "$@"
81
- ;;
82
- view)
83
- exec "$CTL" integration linear issue.view -- "$@"
84
- ;;
85
- query)
86
- exec "$CTL" integration linear issue.query -- "$@"
87
- ;;
88
- create)
89
- exec "$CTL" integration linear issue.create -- "$@"
90
- ;;
91
- update)
92
- exec "$CTL" integration linear issue.update -- "$@"
93
- ;;
94
- comment)
95
- handle_issue_comment "$@"
96
- ;;
97
- delete)
98
- die "'issue delete' is not proxied (destructive; off-list by default)."
99
- ;;
100
- '')
101
- die "missing subcommand for 'issue'. Supported: list, mine, view, query, create, update, comment add"
102
- ;;
103
- *)
104
- die "unsupported 'issue $sub' (allowed: list, mine, view, query, create, update, comment add)"
105
- ;;
106
- esac
107
- }
108
-
109
- handle_team() {
110
- local sub="${1-}"; shift || true
111
- case "$sub" in
112
- list)
113
- exec "$CTL" integration linear team.list -- "$@"
114
- ;;
115
- create|delete)
116
- die "'team $sub' is not proxied (destructive; off-list by default)."
117
- ;;
118
- '')
119
- die "missing subcommand for 'team'. Supported: list"
120
- ;;
121
- *)
122
- die "unsupported 'team $sub' (allowed: list)"
123
- ;;
124
- esac
125
- }
126
-
127
- # Top-level dispatch. `linear`'s real subcommands are
128
- # `auth issue team project cycle milestone initiative label document api schema`;
129
- # we expose only the read-safe ones plus a few gated writes (no destructive
130
- # ops, no auth token).
131
- if [ $# -eq 0 ]; then
132
- die "no subcommand. Supported: whoami, auth whoami, issue {list,mine,view,query,create,update,comment add}, team list, api <query>, --version"
133
- fi
134
-
135
- case "$1" in
136
- --version|-v)
137
- # Tools that sniff "linear --version" succeed with our shim line. The
138
- # real version lives host-side and is reported by the relay's
139
- # readiness probe (`assertIntegrationReady`).
140
- printf 'linear version 0.0.0 (agentbox-shim)\n'
141
- ;;
142
- --help|-h)
143
- printf 'agentbox linear shim — strict subset.\n' >&2
144
- printf 'Supported: whoami, auth whoami, issue {list,mine,view,query,create,update,comment add}, team list, api <query>, --version\n' >&2
145
- printf 'Anything else is rejected. Run host `linear --help` for full upstream docs.\n' >&2
146
- ;;
147
- whoami)
148
- shift
149
- exec "$CTL" integration linear whoami -- "$@"
150
- ;;
151
- auth)
152
- shift
153
- handle_auth "$@"
154
- ;;
155
- issue)
156
- shift
157
- handle_issue "$@"
158
- ;;
159
- team)
160
- shift
161
- handle_team "$@"
162
- ;;
163
- api)
164
- shift
165
- # `linear api` accepts pre-positional flags (`--variable`,
166
- # `--variables-json`, `--paginate`, `--silent`) before the GraphQL
167
- # query, so we don't require the FIRST arg to be a non-flag — only
168
- # that some arg is present. The relay's refuseGraphqlNonQuery
169
- # enforces query-only by rejecting any positional whose first
170
- # keyword is `mutation`/`subscription` (and any `--variable
171
- # key=@<path>` host-file load), so we don't duplicate that check
172
- # here. Writes go through the dedicated issue.* ops.
173
- if [ $# -eq 0 ]; then
174
- die "'api' requires a positional <query> (e.g. '{ teams { id } }')"
175
- fi
176
- exec "$CTL" integration linear api -- "$@"
177
- ;;
178
- *)
179
- die "'$1' is not proxied (supported: whoami, issue {list,mine,view,query,create,update,comment add}, team list, api <query>, --version)"
180
- ;;
181
- esac
@@ -1,95 +0,0 @@
1
- #!/usr/bin/env bash
2
- # agentbox `ntn` shim — translates a strict subset of `ntn` (the official
3
- # Notion CLI) subcommands into `agentbox-ctl integration notion <op>` so the
4
- # host's authenticated `ntn` runs the operation and only the result crosses
5
- # back into the box. The in-box agent never sees a Notion token.
6
- #
7
- # Installed at /usr/local/bin/ntn (real `ntn` is not in the box). The same
8
- # shim is symlinked as /usr/local/bin/notion — the per-service surface name
9
- # from docs/integrations_backlog.md — both invocations behave identically.
10
- #
11
- # This shim ships only what documented agent flows need; anything outside
12
- # the subset below is rejected with a clear error. Add ops deliberately —
13
- # the relay is gated by `integrations.notion.enabled` and an explicit op
14
- # allowlist in @agentbox/integrations.
15
-
16
- set -euo pipefail
17
-
18
- # Path is a constant in production; the env override exists purely to let
19
- # unit tests substitute a stub `agentbox-ctl` on PATH without rewriting the
20
- # shim. Mirrors gh-shim / git-shim.
21
- CTL="${AGENTBOX_CTL_PATH:-/usr/local/bin/agentbox-ctl}"
22
-
23
- die() {
24
- printf 'agentbox notion shim: %s\n' "$*" >&2
25
- exit 2
26
- }
27
-
28
- handle_pages() {
29
- local op="${1-}"; shift || true
30
- case "$op" in
31
- create)
32
- exec "$CTL" integration notion page.create -- "$@"
33
- ;;
34
- update)
35
- exec "$CTL" integration notion page.update -- "$@"
36
- ;;
37
- '')
38
- die "missing subcommand for 'pages'. Supported: create, update"
39
- ;;
40
- *)
41
- die "unsupported 'pages $op' (allowed: create, update)"
42
- ;;
43
- esac
44
- }
45
-
46
- # Top-level dispatch. `ntn`'s real subcommands are
47
- # `api datasources files pages login logout whoami workers`; we expose only
48
- # the read-safe ones plus `pages {create,update}`.
49
- if [ $# -eq 0 ]; then
50
- die "no subcommand. Supported: whoami, api <endpoint>, pages {create,update}, --version"
51
- fi
52
-
53
- case "$1" in
54
- --version|-v)
55
- # Tools that sniff "ntn version" succeed with our shim line. The real
56
- # version lives host-side and is reported by the relay's readiness probe
57
- # (`assertIntegrationReady`).
58
- printf 'ntn version 0.0.0 (agentbox-shim)\n'
59
- ;;
60
- --help|-h)
61
- printf 'agentbox notion shim — strict subset.\n' >&2
62
- printf 'Supported: whoami, api <path> [inputs] [-d JSON], pages {create, update}, --version\n' >&2
63
- printf 'api is read-only: GET to any endpoint; POST only to v1/search and\n' >&2
64
- printf 'v1/{databases,data_sources}/{id}/query. Writes go through `pages`.\n' >&2
65
- printf 'Anything else is rejected. Run host `ntn --help` for full upstream docs.\n' >&2
66
- ;;
67
- whoami)
68
- shift
69
- exec "$CTL" integration notion whoami -- "$@"
70
- ;;
71
- api)
72
- shift
73
- # Forward verbatim to mirror real `ntn api` (options may precede the path;
74
- # `ls`/`help`/`--spec`/`--docs` and `-d <JSON>` bodies are all valid). The
75
- # relay's refuseUnsafeApiCall is the security boundary: GET to any endpoint,
76
- # POST only to read endpoints (v1/search, v1/databases/{id}/query,
77
- # v1/data_sources/{id}/query); every other method/endpoint is refused.
78
- # Writes go through the dedicated `pages create/update` ops.
79
- exec "$CTL" integration notion api -- "$@"
80
- ;;
81
- pages)
82
- shift
83
- handle_pages "$@"
84
- ;;
85
- comment|comments)
86
- # The T1 connector intentionally has no comment op — `ntn` exposes no
87
- # top-level `comment` subcommand and Notion's REST POST /v1/comments
88
- # takes a structured JSON body that doesn't trivially map from CLI
89
- # flags. Tracked as a focused follow-up in docs/notion_backlog.md.
90
- die "comment ops not supported yet (deferred from T2; see docs/notion_backlog.md)"
91
- ;;
92
- *)
93
- die "'$1' is not proxied (supported: whoami, api <endpoint>, pages {create,update}, --version)"
94
- ;;
95
- esac
@@ -1,3 +0,0 @@
1
- module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},24868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},29220,(e,t,r)=>{t.exports=e.x("timers/promises",()=>require("timers/promises"))},5365,(e,t,r)=>{t.exports=e.x("process",()=>require("process"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},89551,e=>{"use strict";var t=e.i(50227),r=e.i(46063);function n(){let e=process.env.AGENTBOX_HUB_PROFILE;return"hetzner"===e||"vercel"===e?e:"localhost"}let o=(0,t.join)(r.STATE_DIR,"hub","auth.db");(0,t.join)(r.STATE_DIR,"hub","store.db"),(0,t.join)(r.STATE_DIR,"hub","token"),e.s(["AUTH_DB_PATH",0,o,"authMode",0,function(){return"off"===process.env.AGENTBOX_HUB_AUTH?"off":"localhost"===n()?process.env.AGENTBOX_HUB_TOKEN?"token":"off":"off"!==process.env.AGENTBOX_HUB_AUTH&&("on"===process.env.AGENTBOX_HUB_AUTH||process.env.BETTER_AUTH_SECRET)?"password":"off"},"cookieSecure",0,function(){return"vercel"===n()},"hubProfile",0,n])},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},96253,(e,t,r)=>{"use strict";t.exports=e.r(18622)},85132,(e,t,r)=>{"use strict";t.exports=e.r(96253).vendored["react-rsc"].React},86109,(e,t,r)=>{"use strict";var n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,i={},l={RequestCookies:()=>m,ResponseCookies:()=>v,parseCookie:()=>d,parseSetCookie:()=>c,stringifyCookie:()=>p};for(var u in l)n(i,u,{get:l[u],enumerable:!0});function p(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?n:`${n}; ${r.join("; ")}`}function d(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[n,o]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=o?o:"true"))}catch{}}return t}function c(e){if(!e)return;let[[t,r],...n]=d(e),{domain:o,expires:s,httponly:a,maxage:i,path:l,samesite:u,secure:p,partitioned:c,priority:m}=Object.fromEntries(n.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var v,g,x={name:t,value:decodeURIComponent(r),domain:o,...s&&{expires:new Date(s)},...a&&{httpOnly:!0},..."string"==typeof i&&{maxAge:Number(i)},path:l,...u&&{sameSite:h.includes(v=(v=u).toLowerCase())?v:void 0},...p&&{secure:!0},...m&&{priority:f.includes(g=(g=m).toLowerCase())?g:void 0},...c&&{partitioned:!0}};let e={};for(let t in x)x[t]&&(e[t]=x[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of s(t))a.call(e,i)||void 0===i||n(e,i,{get:()=>t[i],enumerable:!(r=o(t,i))||r.enumerable});return e})(n({},"__esModule",{value:!0}),i);var h=["strict","lax","none"],f=["low","medium","high"],m=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of d(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===n).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([e,t])=>p(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>p(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},v=class{constructor(e){var t,r,n;this._parsed=new Map,this._headers=e;const o=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[];for(const e of Array.isArray(o)?o:function(e){if(!e)return[];var t,r,n,o,s,a=[],i=0;function l(){for(;i<e.length&&/\s/.test(e.charAt(i));)i+=1;return i<e.length}for(;i<e.length;){for(t=i,s=!1;l();)if(","===(r=e.charAt(i))){for(n=i,i+=1,l(),o=i;i<e.length&&"="!==(r=e.charAt(i))&&";"!==r&&","!==r;)i+=1;i<e.length&&"="===e.charAt(i)?(s=!0,i=o,a.push(e.substring(t,n)),t=i):i=n+1}else i+=1;(!s||i>=e.length)&&a.push(e.substring(t,e.length))}return a}(o)){const t=c(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,r,n]=1===e.length?[e[0].name,e[0].value,e[0]]:e,o=this._parsed;return o.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...n})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=p(r);t.append("set-cookie",e)}}(o,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(p).join("; ")}}},53733,e=>{"use strict";let t={invalid_request:400,unauthorized:401,not_found:404,conflict:409,backend_unavailable:503,internal:500};function r(e,r,n){let o=t[e];return Response.json({error:{code:e,message:r,...void 0===n?{}:{details:n}}},{status:o})}e.s(["fail",0,r,"failFromAction",0,function(e,t){return r(/\b(not found|no such|does not exist)\b/i.test(e)||/\bunknown (project|box)\b/i.test(e)||/no pending approval/i.test(e)?"not_found":"conflict",e,t)},"ok",0,function(e,t=200){return Response.json(e,{status:t})}])},7339,e=>{"use strict";var t=e.i(56710),r=e.i(82809),n=e.i(74001),o=e.i(73300),s=e.i(68744),a=e.i(98570),i=e.i(56147),l=e.i(32931),u=e.i(61810),p=e.i(59963),d=e.i(44491),c=e.i(74916),h=e.i(33073),f=e.i(98603),m=e.i(93317),v=e.i(93695);e.i(95533);var g=e.i(75616),x=e.i(89551),y=e.i(53733);e.s(["GET",0,function(){return(0,y.ok)({ok:!0,apiVersion:"v1",version:process.env.AGENTBOX_CLI_VERSION??"dev",profile:(0,x.hubProfile)()})},"dynamic",0,"force-dynamic","runtime",0,"nodejs"],16768);var R=e.i(16768);let _=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/(dashboard)/api/v1/health/route",pathname:"/api/v1/health",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/apps/hub/app/(dashboard)/api/v1/health/route.ts",nextConfigOutput:"standalone",userland:R,...{}}),{workAsyncStorage:b,workUnitAsyncStorage:A,serverHooks:E}=_;async function w(e,t,n){n.requestMeta&&(0,o.setRequestMeta)(e,n.requestMeta),_.isDev&&(0,o.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let x="/(dashboard)/api/v1/health/route";x=x.replace(/\/index$/,"")||"/";let y=await _.prepare(e,t,{srcPage:x,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:R,deploymentId:b,params:A,nextConfig:E,parsedUrl:w,isDraftMode:C,prerenderManifest:T,routerServerContext:O,isOnDemandRevalidate:S,revalidateOnlyGenerated:k,resolvedPathname:N,clientReferenceManifest:j,serverActionsManifest:P}=y,q=(0,i.normalizeAppPath)(x),U=!!(T.dynamicRoutes[q]||T.routes[N]),H=async()=>((null==O?void 0:O.render404)?await O.render404(e,t,w,!1):t.end("This page could not be found"),null);if(U&&!C){let e=!!T.routes[N],t=T.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await H();throw new v.NoFallbackError}}let I=null;!U||_.isDev||C||(I="/index"===(I=N)?"/":I);let D=!0===_.isDev||!U,$=U&&!D;P&&j&&(0,a.setManifestsSingleton)({page:x,clientReferenceManifest:j,serverActionsManifest:P});let M=e.method||"GET",B=(0,s.getTracer)(),F=B.getActiveScopeSpan(),G=!!(null==O?void 0:O.isWrappedByNextServer),L=!!(0,o.getRequestMeta)(e,"minimalMode"),K=(0,o.getRequestMeta)(e,"incrementalCache")||await _.getIncrementalCache(e,E,T,L);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let X={params:A,previewProps:T.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:D,incrementalCache:K,cacheLifeProfiles:E.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,o)=>_.onRequestError(e,t,n,o,O)},sharedContext:{buildId:R,deploymentId:b}},z=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),W=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t));try{let o,a=async e=>_.handle(W,X).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=B.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),o&&o!==e&&(o.setAttribute("http.route",n),o.updateName(t))}else e.updateName(`${M} ${x}`)}),i=async o=>{var s,i;let l=async({previousCacheEntry:r})=>{try{if(!L&&S&&k&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await a(o);e.fetchMetrics=X.renderOpts.fetchMetrics;let i=X.renderOpts.pendingWaitUntil;i&&n.waitUntil&&(n.waitUntil(i),i=void 0);let l=X.renderOpts.collectedTags;if(!U)return await (0,c.sendResponse)(z,V,s,X.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,n=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:X.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await _.onRequestError(e,t,{routerKind:"App Router",routePath:x,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:S})},!1,O),t}},u=await _.handleResponse({req:e,nextConfig:E,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:k,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:L});if(!U)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(i=u.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",S?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let p=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return L&&U||p.delete(m.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||p.get("Cache-Control")||p.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(z,V,new Response(u.value.body,{headers:p,status:u.value.status||200})),null};G&&F?await i(F):(o=B.getActiveScopeSpan(),await B.withPropagatedContext(e.headers,()=>B.trace(p.BaseServerSpan.handleRequest,{spanName:`${M} ${x}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},i),void 0,!G))}catch(t){if(t instanceof v.NoFallbackError||await _.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:S})},!1,O),U)throw t;return await (0,c.sendResponse)(z,V,new Response(null,{status:500})),null}}e.s(["handler",0,w,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:A})},"routeModule",0,_,"serverHooks",0,E,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,A],7339)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__039tc0m._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},24868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},29220,(e,t,r)=>{t.exports=e.x("timers/promises",()=>require("timers/promises"))},5365,(e,t,r)=>{t.exports=e.x("process",()=>require("process"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},89551,e=>{"use strict";var t=e.i(50227),r=e.i(46063);function o(){let e=process.env.AGENTBOX_HUB_PROFILE;return"hetzner"===e||"vercel"===e?e:"localhost"}let n=(0,t.join)(r.STATE_DIR,"hub","auth.db");(0,t.join)(r.STATE_DIR,"hub","store.db"),(0,t.join)(r.STATE_DIR,"hub","token"),e.s(["AUTH_DB_PATH",0,n,"authMode",0,function(){return"off"===process.env.AGENTBOX_HUB_AUTH?"off":"localhost"===o()?process.env.AGENTBOX_HUB_TOKEN?"token":"off":"off"!==process.env.AGENTBOX_HUB_AUTH&&("on"===process.env.AGENTBOX_HUB_AUTH||process.env.BETTER_AUTH_SECRET)?"password":"off"},"cookieSecure",0,function(){return"vercel"===o()},"hubProfile",0,o])},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},96253,(e,t,r)=>{"use strict";t.exports=e.r(18622)},85132,(e,t,r)=>{"use strict";t.exports=e.r(96253).vendored["react-rsc"].React},86109,(e,t,r)=>{"use strict";var o=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a={},u={RequestCookies:()=>m,ResponseCookies:()=>v,parseCookie:()=>p,parseSetCookie:()=>d,stringifyCookie:()=>c};for(var l in u)o(a,l,{get:u[l],enumerable:!0});function c(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),o=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?o:`${o}; ${r.join("; ")}`}function p(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[o,n]=[r.slice(0,e),r.slice(e+1)];try{t.set(o,decodeURIComponent(null!=n?n:"true"))}catch{}}return t}function d(e){if(!e)return;let[[t,r],...o]=p(e),{domain:n,expires:s,httponly:i,maxage:a,path:u,samesite:l,secure:c,partitioned:d,priority:m}=Object.fromEntries(o.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var v,h,b={name:t,value:decodeURIComponent(r),domain:n,...s&&{expires:new Date(s)},...i&&{httpOnly:!0},..."string"==typeof a&&{maxAge:Number(a)},path:u,...l&&{sameSite:f.includes(v=(v=l).toLowerCase())?v:void 0},...c&&{secure:!0},...m&&{priority:g.includes(h=(h=m).toLowerCase())?h:void 0},...d&&{partitioned:!0}};let e={};for(let t in b)b[t]&&(e[t]=b[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of s(t))i.call(e,a)||void 0===a||o(e,a,{get:()=>t[a],enumerable:!(r=n(t,a))||r.enumerable});return e})(o({},"__esModule",{value:!0}),a);var f=["strict","lax","none"],g=["low","medium","high"],m=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of p(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let o="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===o).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,o=this._parsed;return o.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(o).map(([e,t])=>c(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>c(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},v=class{constructor(e){var t,r,o;this._parsed=new Map,this._headers=e;const n=null!=(o=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?o:[];for(const e of Array.isArray(n)?n:function(e){if(!e)return[];var t,r,o,n,s,i=[],a=0;function u(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,s=!1;u();)if(","===(r=e.charAt(a))){for(o=a,a+=1,u(),n=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(s=!0,a=n,i.push(e.substring(t,o)),t=a):a=o+1}else a+=1;(!s||a>=e.length)&&i.push(e.substring(t,e.length))}return i}(n)){const t=d(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let o="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===o)}has(e){return this._parsed.has(e)}set(...e){let[t,r,o]=1===e.length?[e[0].name,e[0].value,e[0]]:e,n=this._parsed;return n.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...o})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=c(r);t.append("set-cookie",e)}}(n,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(c).join("; ")}}},53733,e=>{"use strict";let t={invalid_request:400,unauthorized:401,not_found:404,conflict:409,backend_unavailable:503,internal:500};function r(e,r,o){let n=t[e];return Response.json({error:{code:e,message:r,...void 0===o?{}:{details:o}}},{status:n})}e.s(["fail",0,r,"failFromAction",0,function(e,t){return r(/\b(not found|no such|does not exist)\b/i.test(e)||/\bunknown (project|box)\b/i.test(e)||/no pending approval/i.test(e)?"not_found":"conflict",e,t)},"ok",0,function(e,t=200){return Response.json(e,{status:t})}])},82477,e=>{"use strict";var t=e.i(89551);function r(e){return function(e){if(e.originUrl){let t,r=(t=e.originUrl.trim().replace(/\/+$/,"").replace(/\.git$/i,"").split(/[/:]/).filter(e=>e.length>0).pop())&&t.length>0?t:void 0;if(r)return r}if(e.projectSlug){let t,r=(t=e.projectSlug.split("__").filter(e=>e.length>0).pop())&&t.length>0?t:void 0;if(r)return r}return e.name}({originUrl:e.originUrl,projectSlug:e.projectSlug,name:e.name})}function o(e){var t;return t=e.originUrl??e.name,Buffer.from(t).toString("base64url")}function n(e){return{claude:e?.claude,codex:e?.codex,opencode:e?.opencode}}function s(e){if(!e)return"stopped";let{claude:t,codex:r,opencode:o}=n(e);return[t?.state,r?.state,o?.state].includes("error")?"error":t?.sessionRunning||r?.sessionRunning||o?.sessionRunning?"running":"stopped"}let i=null;async function a(){var t;let a=process.env.POSTGRES_URL??process.env.RELAY_STORE_URL;if(!a)throw Error("hub: POSTGRES_URL required for the hosted source");let u=await (!i&&(i=(async()=>{let{PostgresStore:t}=await e.A(59249),r=new t({connectionString:a});return await r.migrate(),r})().catch(e=>{throw i=null,e})),i),l=await u.listBoxes(),c=new Map((await u.listStatuses()).map(e=>[e.boxId,e.status])),p=[];for(let e of l)for(let r of(await u.listPendingPrompts(e.boxId)))p.push((t=e.boxId,{id:r.ev.id,boxId:t,message:r.ev.message,detail:r.ev.detail,command:r.ev.context?.command,cwd:r.ev.context?.cwd,argv:r.ev.context?.argv,defaultAnswer:r.ev.defaultAnswer??"n",createdAt:Date.parse(r.createdAt)||Date.now()}));return{user:{login:"hub",name:"hub"},github:{available:!1,installed:!1,appName:"GitHub App",account:"",installedAt:0,repos:[]},projects:function(e){let t=new Map;for(let n of e){let e=o(n),s=Date.parse(n.createdAt??n.registeredAt)||Date.now(),i=t.get(e);i?(s<i.createdAt&&(i.createdAt=s),i.originUrl??=n.originUrl,i.projectSlug??=n.projectSlug):t.set(e,{key:e,name:r(n),createdAt:s,originUrl:n.originUrl,projectSlug:n.projectSlug})}return[...t.values()].map(e=>({id:e.key,name:e.name,repo:e.name,defaultBranch:"main",provider:"cloud",createdAt:e.createdAt,originUrl:e.originUrl??null,projectSlug:e.projectSlug??null})).sort((e,t)=>t.createdAt-e.createdAt)}(l),boxes:l.map(e=>(function(e,t){let{claude:i,codex:a,opencode:u}=n(t),l=Date.parse(e.createdAt??e.registeredAt)||Date.now();return{id:e.boxId,projectId:o(e),repo:r(e),branch:e.worktrees?.[0]?.branch??"",task:i?.sessionTitle??a?.sessionTitle??u?.sessionTitle??e.name,agent:a?.sessionRunning?"codex":u?.sessionRunning?"opencode":"claude",status:s(t),createdAt:l,lastActivity:l,host:e.backend?`${e.kind??"cloud"} \xb7 ${e.backend}`:e.kind??"cloud",provider:e.kind??"docker",commits:null,filesTouched:null,error:"error"===s(t)?i?.sessionTitle??"Agent reported an error":null,webUrl:null,vncUrl:null,name:e.name,sandboxId:e.sandboxId,originUrl:e.originUrl,publicHost:e.publicHost,image:e.image,webPort:e.webPort,lastAgent:"claude"===e.agent||"codex"===e.agent||"opencode"===e.agent?e.agent:void 0,topology:"control-plane"}})(e,c.get(e.boxId))),approvals:p,controlPlane:null,providers:[]}}async function u(e){let r=globalThis.__AGENTBOX_HUB_BACKEND;return r?{...await r.getData(e),authMode:(0,t.authMode)()}:process.env.POSTGRES_URL??process.env.RELAY_STORE_URL?{...await a(),authMode:(0,t.authMode)()}:{user:{login:"user",name:"user"},github:{available:!1,installed:!1,appName:"GitHub App",account:"",installedAt:0,repos:[]},projects:[],boxes:[],approvals:[],providers:[],controlPlane:null,authMode:(0,t.authMode)()}}async function l(e){return u(e)}e.s(["backendOrNull",0,function(){return globalThis.__AGENTBOX_HUB_BACKEND??null},"readState",0,l],82477)},49714,e=>{"use strict";let t=["claude","codex","opencode","none"],r=["docker","daytona","hetzner","vercel","e2b","digitalocean","remote-docker"],o=["start","pause","resume","stop","destroy","screen"];function n(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let s=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,i=["checkout","branch","pull","push","push-host"],a=["claude","codex","herdr","cmux","vscode","iterm2","finder"];function u(e,t){return void 0===e?{ok:!0,value:void 0}:"string"!=typeof e?{ok:!1,message:`${t} must be a string`}:{ok:!0,value:e}}function l(e,t){return void 0===e?{ok:!0,value:void 0}:"boolean"!=typeof e?{ok:!1,message:`${t} must be a boolean`}:{ok:!0,value:e}}function c(e,t){if(void 0===e)return{ok:!0,value:void 0};if(!Array.isArray(e))return{ok:!1,message:`${t} must be an array of strings`};for(let r of e)if("string"!=typeof r)return{ok:!1,message:`${t} must be an array of strings`};return{ok:!0,value:e.length>0?e:void 0}}async function p(e){let t=await e.text();if(0===t.trim().length)return{ok:!0,value:{}};try{return{ok:!0,value:JSON.parse(t)}}catch{return{ok:!1,message:"body is not valid JSON"}}}e.s(["GIT_OPS",0,i,"LIFECYCLE_ACTIONS",0,o,"isGitOp",0,function(e){return i.includes(e)},"isLifecycleAction",0,function(e){return o.includes(e)},"isProviderId",0,function(e){return r.includes(e)},"parseAnswer",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{answer:t,cancelled:r}=e;return"y"!==t&&"n"!==t?{ok:!1,message:"answer must be 'y' or 'n'"}:void 0!==r&&"boolean"!=typeof r?{ok:!1,message:"cancelled must be a boolean when present"}:{ok:!0,value:{answer:t,...!0===r?{cancelled:!0}:{}}}},"parseCheckpointCreate",0,function(e){if(null==e)return{ok:!0,value:{}};if(!n(e))return{ok:!1,message:"body must be a JSON object"};let t=u(e.name,"name");if(!t.ok)return t;let r=l(e.merged,"merged");if(!r.ok)return r;let o=l(e.setDefault,"setDefault");if(!o.ok)return o;let s=l(e.replace,"replace");return s.ok?{ok:!0,value:{name:t.value,merged:r.value,setDefault:o.value,replace:s.value}}:s},"parseCreateBox",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{projectId:o,repoUrl:s,agent:i,provider:a,name:p,prompt:d,fromBranch:f,setupWizard:g}=e,{agentArgs:m,startAgent:v,foreground:h,opts:b}=e,k="string"==typeof o&&o.length>0,y="string"==typeof s&&s.length>0;if(!k&&!y)return{ok:!1,message:"one of projectId or repoUrl is required (string)"};if(k&&y)return{ok:!1,message:"send exactly one of projectId or repoUrl, not both"};if(void 0!==o&&"string"!=typeof o)return{ok:!1,message:"projectId must be a string"};if(void 0!==s&&"string"!=typeof s)return{ok:!1,message:"repoUrl must be a string"};if("string"!=typeof i||!t.includes(i))return{ok:!1,message:`agent must be one of ${t.join(", ")}`,details:{got:i}};let x="string"==typeof a&&/^(?:docker|remote-docker):[A-Za-z0-9][A-Za-z0-9._-]*$/.test(a);if(void 0!==a&&!x&&("string"!=typeof a||!r.includes(a)))return{ok:!1,message:`provider must be one of ${r.join(", ")} (or a docker:<host> spec)`,details:{got:a}};if(void 0!==p&&"string"!=typeof p)return{ok:!1,message:"name must be a string"};if(void 0!==d&&"string"!=typeof d)return{ok:!1,message:"prompt must be a string"};let A=u(f,"fromBranch");if(!A.ok)return A;let j=l(g,"setupWizard");if(!j.ok)return j;let S=c(m,"agentArgs");if(!S.ok)return S;let _=l(v,"startAgent");if(!_.ok)return _;let O=l(h,"foreground");if(!O.ok)return O;let w=function(e){var t;if(void 0===e)return{ok:!0,value:void 0};if(!n(e))return{ok:!1,message:"opts must be a JSON object"};let r={};for(let t of["image","snapshot","memory","cpus","pidsLimit","disk","size","location","inbound","useBranch","imageRegistry","remoteHost","sessionName"]){let o=u(e[t],`opts.${t}`);if(!o.ok)return o;void 0!==o.value&&(r[t]=o.value)}for(let t of["hostSnapshot","withPlaywright","withEnv","vnc","resync","sharedDockerCache","portless","build","credentialSync","dangerouslySkipPermissions"]){let o=l(e[t],`opts.${t}`);if(!o.ok)return o;void 0!==o.value&&(r[t]=o.value)}let o=void 0===(t=e.bundleDepth)?{ok:!0,value:void 0}:"number"==typeof t&&Number.isFinite(t)?{ok:!0,value:t}:{ok:!1,message:"opts.bundleDepth must be a number"};if(!o.ok)return o;void 0!==o.value&&(r.bundleDepth=o.value);let s=c(e.envFiles,"opts.envFiles");if(!s.ok)return s;if(void 0!==s.value&&(r.envFiles=s.value),void 0!==e.gitPushMode){let t=["auto","relay","lease","direct"];if("string"!=typeof e.gitPushMode||!t.includes(e.gitPushMode))return{ok:!1,message:`opts.gitPushMode must be one of ${t.join(", ")}`};r.gitPushMode=e.gitPushMode}if(void 0!==e.carry){if(!Array.isArray(e.carry))return{ok:!1,message:"opts.carry must be an array"};r.carry=e.carry}return{ok:!0,value:r}}(b);return w.ok?{ok:!0,value:{projectId:k?o:void 0,repoUrl:y?s:void 0,agent:i,provider:a,name:p,prompt:d,agentArgs:S.value,startAgent:_.value,foreground:O.value,fromBranch:A.value,setupWizard:j.value,opts:w.value}}:w},"parseGitBranch",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{name:t,from:r}=e;if("string"!=typeof t||0===t.trim().length)return{ok:!1,message:"name is required (non-empty string)"};let o=u(r,"from");return o.ok?{ok:!0,value:{name:t,from:o.value}}:o},"parseGitCheckout",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{branch:t}=e;if("string"!=typeof t||0===t.trim().length)return{ok:!1,message:"branch is required (non-empty string)"};let r=c(e.args,"args");return r.ok?{ok:!0,value:{branch:t,args:r.value}}:r},"parseGitPull",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let t=u(e.remote,"remote");if(!t.ok)return t;let r=l(e.ffOnly,"ffOnly");if(!r.ok)return r;let o=c(e.args,"args");return o.ok?{ok:!0,value:{remote:t.value,ffOnly:r.value,args:o.value}}:o},"parseGitPush",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let t=u(e.remote,"remote");if(!t.ok)return t;let r=l(e.force,"force");if(!r.ok)return r;let o=c(e.args,"args");return o.ok?{ok:!0,value:{remote:t.value,force:r.value,args:o.value}}:o},"parseGitPushHost",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let t=u(e.as,"as");if(!t.ok)return t;let r=l(e.force,"force");if(!r.ok)return r;let o=c(e.args,"args");return o.ok?{ok:!0,value:{as:t.value,force:r.value,args:o.value}}:o},"parseHostUpsert",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{alias:t,ssh:r,default:o,connection:i,identity:a}=e;if("string"!=typeof t||!s.test(t))return{ok:!1,message:"alias must be a plain name (letters, digits, ., _, -; no @, :, /)"};if("string"!=typeof r||0===r.trim().length)return{ok:!1,message:"ssh is required (an ~/.ssh/config alias or [user@]host[:port])"};let u=l(o,"default");if(!u.ok)return u;let c={alias:t,ssh:r.trim(),default:u.value};if(void 0!==i){if(!n(i))return{ok:!1,message:"connection must be an object"};let{host:e,user:t,port:r}=i;if("string"!=typeof e||0===e.trim().length)return{ok:!1,message:"connection.host is required when connection is given"};if(/[@/\s]/.test(e.trim()))return{ok:!1,message:"connection.host must be a hostname or IP"};let o={host:e.trim()};if(void 0!==t){if("string"!=typeof t||0===t.trim().length)return{ok:!1,message:"connection.user must be a non-empty string"};o.user=t.trim()}if(void 0!==r){if("number"!=typeof r||!Number.isInteger(r)||r<1||r>65535)return{ok:!1,message:"connection.port must be a port number"};o.port=r}c.connection=o}if(void 0!==a){if("string"!=typeof a||!a.includes("PRIVATE KEY"))return{ok:!1,message:"identity must be a PEM-encoded private key"};if(Buffer.byteLength(a,"utf8")>16384)return{ok:!1,message:"identity is too large to be a private key"};if(!c.connection)return{ok:!1,message:"identity requires connection (send the ssh -G expansion)"};c.identity=a}return{ok:!0,value:c}},"parseLoginCode",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{code:t}=e;return"string"!=typeof t||0===t.trim().length?{ok:!1,message:"code is required (non-empty string)"}:{ok:!0,value:{code:t.trim()}}},"parseOpenIn",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{app:t}=e;return"string"==typeof t&&a.includes(t)?{ok:!0,value:{app:t}}:{ok:!1,message:`app must be one of ${a.join(", ")}`,details:{got:t}}},"parseProject",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{path:t}=e;return"string"!=typeof t||0===t.length?{ok:!1,message:"path is required (absolute directory path)"}:{ok:!0,value:{path:t}}},"parseProviderCredentials",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let t={};for(let[r,o]of Object.entries(e)){if("string"!=typeof o)return{ok:!1,message:`field ${r} must be a string`};t[r]=o}return 0===Object.keys(t).length?{ok:!1,message:"at least one credential field is required"}:{ok:!0,value:t}},"parseProviderPrepare",0,function(e){if(null==e)return{ok:!0,value:{}};if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{force:t,claudeInstall:r,build:o,size:s,location:i,name:a}=e,c=l(t,"force");if(!c.ok)return c;if(void 0!==r&&"native"!==r&&"npm"!==r)return{ok:!1,message:"claudeInstall must be 'native' or 'npm'"};let p=l(o,"build");if(!p.ok)return p;let d=u(s,"size");if(!d.ok)return d;let f=u(i,"location");if(!f.ok)return f;let g=u(a,"name");return g.ok?{ok:!0,value:{force:c.value,claudeInstall:r,build:p.value,size:d.value,location:f.value,name:g.value}}:g},"parsePrune",0,function(e){if(null==e)return{ok:!0,value:{}};if(!n(e))return{ok:!1,message:"body must be a JSON object"};let t=l(e.all,"all");if(!t.ok)return t;let r=l(e.dryRun,"dryRun");if(!r.ok)return r;let o=u(e.provider,"provider");return o.ok?{ok:!0,value:{all:t.value,dryRun:r.value,provider:o.value}}:o},"parseRenameBox",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{displayName:t}=e;return"string"!=typeof t?{ok:!1,message:"displayName is required (string; empty string clears the label)"}:t.trim().length>60?{ok:!1,message:"displayName too long (max 60 chars)"}:{ok:!0,value:{displayName:t}}},"parseServiceRestart",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let t=u(e.name,"name");return t.ok?{ok:!0,value:{name:t.value}}:t},"readJson",0,p])}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0c_3x8u._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},24868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},29220,(e,t,r)=>{t.exports=e.x("timers/promises",()=>require("timers/promises"))},5365,(e,t,r)=>{t.exports=e.x("process",()=>require("process"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},89551,e=>{"use strict";var t=e.i(50227),r=e.i(46063);function o(){let e=process.env.AGENTBOX_HUB_PROFILE;return"hetzner"===e||"vercel"===e?e:"localhost"}let n=(0,t.join)(r.STATE_DIR,"hub","auth.db");(0,t.join)(r.STATE_DIR,"hub","store.db"),(0,t.join)(r.STATE_DIR,"hub","token"),e.s(["AUTH_DB_PATH",0,n,"authMode",0,function(){return"off"===process.env.AGENTBOX_HUB_AUTH?"off":"localhost"===o()?process.env.AGENTBOX_HUB_TOKEN?"token":"off":"off"!==process.env.AGENTBOX_HUB_AUTH&&("on"===process.env.AGENTBOX_HUB_AUTH||process.env.BETTER_AUTH_SECRET)?"password":"off"},"cookieSecure",0,function(){return"vercel"===o()},"hubProfile",0,o])},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},96253,(e,t,r)=>{"use strict";t.exports=e.r(18622)},85132,(e,t,r)=>{"use strict";t.exports=e.r(96253).vendored["react-rsc"].React},86109,(e,t,r)=>{"use strict";var o=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a={},u={RequestCookies:()=>g,ResponseCookies:()=>v,parseCookie:()=>p,parseSetCookie:()=>c,stringifyCookie:()=>f};for(var l in u)o(a,l,{get:u[l],enumerable:!0});function f(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),o=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?o:`${o}; ${r.join("; ")}`}function p(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[o,n]=[r.slice(0,e),r.slice(e+1)];try{t.set(o,decodeURIComponent(null!=n?n:"true"))}catch{}}return t}function c(e){if(!e)return;let[[t,r],...o]=p(e),{domain:n,expires:s,httponly:i,maxage:a,path:u,samesite:l,secure:f,partitioned:c,priority:g}=Object.fromEntries(o.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var v,k,h={name:t,value:decodeURIComponent(r),domain:n,...s&&{expires:new Date(s)},...i&&{httpOnly:!0},..."string"==typeof a&&{maxAge:Number(a)},path:u,...l&&{sameSite:d.includes(v=(v=l).toLowerCase())?v:void 0},...f&&{secure:!0},...g&&{priority:m.includes(k=(k=g).toLowerCase())?k:void 0},...c&&{partitioned:!0}};let e={};for(let t in h)h[t]&&(e[t]=h[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of s(t))i.call(e,a)||void 0===a||o(e,a,{get:()=>t[a],enumerable:!(r=n(t,a))||r.enumerable});return e})(o({},"__esModule",{value:!0}),a);var d=["strict","lax","none"],m=["low","medium","high"],g=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of p(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let o="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===o).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,o=this._parsed;return o.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(o).map(([e,t])=>f(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>f(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},v=class{constructor(e){var t,r,o;this._parsed=new Map,this._headers=e;const n=null!=(o=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?o:[];for(const e of Array.isArray(n)?n:function(e){if(!e)return[];var t,r,o,n,s,i=[],a=0;function u(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,s=!1;u();)if(","===(r=e.charAt(a))){for(o=a,a+=1,u(),n=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(s=!0,a=n,i.push(e.substring(t,o)),t=a):a=o+1}else a+=1;(!s||a>=e.length)&&i.push(e.substring(t,e.length))}return i}(n)){const t=c(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let o="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===o)}has(e){return this._parsed.has(e)}set(...e){let[t,r,o]=1===e.length?[e[0].name,e[0].value,e[0]]:e,n=this._parsed;return n.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...o})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=f(r);t.append("set-cookie",e)}}(n,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(f).join("; ")}}},53733,e=>{"use strict";let t={invalid_request:400,unauthorized:401,not_found:404,conflict:409,backend_unavailable:503,internal:500};function r(e,r,o){let n=t[e];return Response.json({error:{code:e,message:r,...void 0===o?{}:{details:o}}},{status:n})}e.s(["fail",0,r,"failFromAction",0,function(e,t){return r(/\b(not found|no such|does not exist)\b/i.test(e)||/\bunknown (project|box)\b/i.test(e)||/no pending approval/i.test(e)?"not_found":"conflict",e,t)},"ok",0,function(e,t=200){return Response.json(e,{status:t})}])},49714,e=>{"use strict";let t=["claude","codex","opencode","none"],r=["docker","daytona","hetzner","vercel","e2b","digitalocean","remote-docker"],o=["start","pause","resume","stop","destroy","screen"];function n(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let s=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,i=["checkout","branch","pull","push","push-host"],a=["claude","codex","herdr","cmux","vscode","iterm2","finder"];function u(e,t){return void 0===e?{ok:!0,value:void 0}:"string"!=typeof e?{ok:!1,message:`${t} must be a string`}:{ok:!0,value:e}}function l(e,t){return void 0===e?{ok:!0,value:void 0}:"boolean"!=typeof e?{ok:!1,message:`${t} must be a boolean`}:{ok:!0,value:e}}function f(e,t){if(void 0===e)return{ok:!0,value:void 0};if(!Array.isArray(e))return{ok:!1,message:`${t} must be an array of strings`};for(let r of e)if("string"!=typeof r)return{ok:!1,message:`${t} must be an array of strings`};return{ok:!0,value:e.length>0?e:void 0}}async function p(e){let t=await e.text();if(0===t.trim().length)return{ok:!0,value:{}};try{return{ok:!0,value:JSON.parse(t)}}catch{return{ok:!1,message:"body is not valid JSON"}}}e.s(["GIT_OPS",0,i,"LIFECYCLE_ACTIONS",0,o,"isGitOp",0,function(e){return i.includes(e)},"isLifecycleAction",0,function(e){return o.includes(e)},"isProviderId",0,function(e){return r.includes(e)},"parseAnswer",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{answer:t,cancelled:r}=e;return"y"!==t&&"n"!==t?{ok:!1,message:"answer must be 'y' or 'n'"}:void 0!==r&&"boolean"!=typeof r?{ok:!1,message:"cancelled must be a boolean when present"}:{ok:!0,value:{answer:t,...!0===r?{cancelled:!0}:{}}}},"parseCheckpointCreate",0,function(e){if(null==e)return{ok:!0,value:{}};if(!n(e))return{ok:!1,message:"body must be a JSON object"};let t=u(e.name,"name");if(!t.ok)return t;let r=l(e.merged,"merged");if(!r.ok)return r;let o=l(e.setDefault,"setDefault");if(!o.ok)return o;let s=l(e.replace,"replace");return s.ok?{ok:!0,value:{name:t.value,merged:r.value,setDefault:o.value,replace:s.value}}:s},"parseCreateBox",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{projectId:o,repoUrl:s,agent:i,provider:a,name:p,prompt:c,fromBranch:d,setupWizard:m}=e,{agentArgs:g,startAgent:v,foreground:k,opts:h}=e,b="string"==typeof o&&o.length>0,y="string"==typeof s&&s.length>0;if(!b&&!y)return{ok:!1,message:"one of projectId or repoUrl is required (string)"};if(b&&y)return{ok:!1,message:"send exactly one of projectId or repoUrl, not both"};if(void 0!==o&&"string"!=typeof o)return{ok:!1,message:"projectId must be a string"};if(void 0!==s&&"string"!=typeof s)return{ok:!1,message:"repoUrl must be a string"};if("string"!=typeof i||!t.includes(i))return{ok:!1,message:`agent must be one of ${t.join(", ")}`,details:{got:i}};let x="string"==typeof a&&/^(?:docker|remote-docker):[A-Za-z0-9][A-Za-z0-9._-]*$/.test(a);if(void 0!==a&&!x&&("string"!=typeof a||!r.includes(a)))return{ok:!1,message:`provider must be one of ${r.join(", ")} (or a docker:<host> spec)`,details:{got:a}};if(void 0!==p&&"string"!=typeof p)return{ok:!1,message:"name must be a string"};if(void 0!==c&&"string"!=typeof c)return{ok:!1,message:"prompt must be a string"};let j=u(d,"fromBranch");if(!j.ok)return j;let A=l(m,"setupWizard");if(!A.ok)return A;let O=f(g,"agentArgs");if(!O.ok)return O;let _=l(v,"startAgent");if(!_.ok)return _;let S=l(k,"foreground");if(!S.ok)return S;let N=function(e){var t;if(void 0===e)return{ok:!0,value:void 0};if(!n(e))return{ok:!1,message:"opts must be a JSON object"};let r={};for(let t of["image","snapshot","memory","cpus","pidsLimit","disk","size","location","inbound","useBranch","imageRegistry","remoteHost","sessionName"]){let o=u(e[t],`opts.${t}`);if(!o.ok)return o;void 0!==o.value&&(r[t]=o.value)}for(let t of["hostSnapshot","withPlaywright","withEnv","vnc","resync","sharedDockerCache","portless","build","credentialSync","dangerouslySkipPermissions"]){let o=l(e[t],`opts.${t}`);if(!o.ok)return o;void 0!==o.value&&(r[t]=o.value)}let o=void 0===(t=e.bundleDepth)?{ok:!0,value:void 0}:"number"==typeof t&&Number.isFinite(t)?{ok:!0,value:t}:{ok:!1,message:"opts.bundleDepth must be a number"};if(!o.ok)return o;void 0!==o.value&&(r.bundleDepth=o.value);let s=f(e.envFiles,"opts.envFiles");if(!s.ok)return s;if(void 0!==s.value&&(r.envFiles=s.value),void 0!==e.gitPushMode){let t=["auto","relay","lease","direct"];if("string"!=typeof e.gitPushMode||!t.includes(e.gitPushMode))return{ok:!1,message:`opts.gitPushMode must be one of ${t.join(", ")}`};r.gitPushMode=e.gitPushMode}if(void 0!==e.carry){if(!Array.isArray(e.carry))return{ok:!1,message:"opts.carry must be an array"};r.carry=e.carry}return{ok:!0,value:r}}(h);return N.ok?{ok:!0,value:{projectId:b?o:void 0,repoUrl:y?s:void 0,agent:i,provider:a,name:p,prompt:c,agentArgs:O.value,startAgent:_.value,foreground:S.value,fromBranch:j.value,setupWizard:A.value,opts:N.value}}:N},"parseGitBranch",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{name:t,from:r}=e;if("string"!=typeof t||0===t.trim().length)return{ok:!1,message:"name is required (non-empty string)"};let o=u(r,"from");return o.ok?{ok:!0,value:{name:t,from:o.value}}:o},"parseGitCheckout",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{branch:t}=e;if("string"!=typeof t||0===t.trim().length)return{ok:!1,message:"branch is required (non-empty string)"};let r=f(e.args,"args");return r.ok?{ok:!0,value:{branch:t,args:r.value}}:r},"parseGitPull",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let t=u(e.remote,"remote");if(!t.ok)return t;let r=l(e.ffOnly,"ffOnly");if(!r.ok)return r;let o=f(e.args,"args");return o.ok?{ok:!0,value:{remote:t.value,ffOnly:r.value,args:o.value}}:o},"parseGitPush",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let t=u(e.remote,"remote");if(!t.ok)return t;let r=l(e.force,"force");if(!r.ok)return r;let o=f(e.args,"args");return o.ok?{ok:!0,value:{remote:t.value,force:r.value,args:o.value}}:o},"parseGitPushHost",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let t=u(e.as,"as");if(!t.ok)return t;let r=l(e.force,"force");if(!r.ok)return r;let o=f(e.args,"args");return o.ok?{ok:!0,value:{as:t.value,force:r.value,args:o.value}}:o},"parseHostUpsert",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{alias:t,ssh:r,default:o,connection:i,identity:a}=e;if("string"!=typeof t||!s.test(t))return{ok:!1,message:"alias must be a plain name (letters, digits, ., _, -; no @, :, /)"};if("string"!=typeof r||0===r.trim().length)return{ok:!1,message:"ssh is required (an ~/.ssh/config alias or [user@]host[:port])"};let u=l(o,"default");if(!u.ok)return u;let f={alias:t,ssh:r.trim(),default:u.value};if(void 0!==i){if(!n(i))return{ok:!1,message:"connection must be an object"};let{host:e,user:t,port:r}=i;if("string"!=typeof e||0===e.trim().length)return{ok:!1,message:"connection.host is required when connection is given"};if(/[@/\s]/.test(e.trim()))return{ok:!1,message:"connection.host must be a hostname or IP"};let o={host:e.trim()};if(void 0!==t){if("string"!=typeof t||0===t.trim().length)return{ok:!1,message:"connection.user must be a non-empty string"};o.user=t.trim()}if(void 0!==r){if("number"!=typeof r||!Number.isInteger(r)||r<1||r>65535)return{ok:!1,message:"connection.port must be a port number"};o.port=r}f.connection=o}if(void 0!==a){if("string"!=typeof a||!a.includes("PRIVATE KEY"))return{ok:!1,message:"identity must be a PEM-encoded private key"};if(Buffer.byteLength(a,"utf8")>16384)return{ok:!1,message:"identity is too large to be a private key"};if(!f.connection)return{ok:!1,message:"identity requires connection (send the ssh -G expansion)"};f.identity=a}return{ok:!0,value:f}},"parseLoginCode",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{code:t}=e;return"string"!=typeof t||0===t.trim().length?{ok:!1,message:"code is required (non-empty string)"}:{ok:!0,value:{code:t.trim()}}},"parseOpenIn",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{app:t}=e;return"string"==typeof t&&a.includes(t)?{ok:!0,value:{app:t}}:{ok:!1,message:`app must be one of ${a.join(", ")}`,details:{got:t}}},"parseProject",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{path:t}=e;return"string"!=typeof t||0===t.length?{ok:!1,message:"path is required (absolute directory path)"}:{ok:!0,value:{path:t}}},"parseProviderCredentials",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let t={};for(let[r,o]of Object.entries(e)){if("string"!=typeof o)return{ok:!1,message:`field ${r} must be a string`};t[r]=o}return 0===Object.keys(t).length?{ok:!1,message:"at least one credential field is required"}:{ok:!0,value:t}},"parseProviderPrepare",0,function(e){if(null==e)return{ok:!0,value:{}};if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{force:t,claudeInstall:r,build:o,size:s,location:i,name:a}=e,f=l(t,"force");if(!f.ok)return f;if(void 0!==r&&"native"!==r&&"npm"!==r)return{ok:!1,message:"claudeInstall must be 'native' or 'npm'"};let p=l(o,"build");if(!p.ok)return p;let c=u(s,"size");if(!c.ok)return c;let d=u(i,"location");if(!d.ok)return d;let m=u(a,"name");return m.ok?{ok:!0,value:{force:f.value,claudeInstall:r,build:p.value,size:c.value,location:d.value,name:m.value}}:m},"parsePrune",0,function(e){if(null==e)return{ok:!0,value:{}};if(!n(e))return{ok:!1,message:"body must be a JSON object"};let t=l(e.all,"all");if(!t.ok)return t;let r=l(e.dryRun,"dryRun");if(!r.ok)return r;let o=u(e.provider,"provider");return o.ok?{ok:!0,value:{all:t.value,dryRun:r.value,provider:o.value}}:o},"parseRenameBox",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let{displayName:t}=e;return"string"!=typeof t?{ok:!1,message:"displayName is required (string; empty string clears the label)"}:t.trim().length>60?{ok:!1,message:"displayName too long (max 60 chars)"}:{ok:!0,value:{displayName:t}}},"parseServiceRestart",0,function(e){if(!n(e))return{ok:!1,message:"body must be a JSON object"};let t=u(e.name,"name");return t.ok?{ok:!0,value:{name:t.value}}:t},"readJson",0,p])}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0ty7ew1._.js.map
@@ -1,181 +0,0 @@
1
- #!/usr/bin/env bash
2
- # agentbox `linear` shim — translates a strict subset of `linear`
3
- # (@schpet/linear-cli, v2) subcommands into `agentbox-ctl integration
4
- # linear <op>` so the host's authenticated `linear` runs the operation and
5
- # only the result crosses back into the box. The in-box agent never sees a
6
- # Linear API token.
7
- #
8
- # Installed at /usr/local/bin/linear (real `linear` is not in the box).
9
- #
10
- # This shim ships only what documented agent flows need; anything outside
11
- # the subset below is rejected with a clear error. Add ops deliberately —
12
- # the relay is gated by `integrations.linear.enabled` and an explicit op
13
- # allowlist in @agentbox/integrations.
14
- #
15
- # Three classes of upstream subcommand are EXPLICITLY rejected even though
16
- # they exist on the host CLI, because proxying them would defeat the
17
- # security model:
18
- # - `auth token` PRINTS the raw API token to stdout — proxying it would
19
- # hand the box the host's Linear credential. The only auth-family op
20
- # we proxy is `auth whoami` (identity only), via `linear whoami`.
21
- # - `auth login/logout/migrate/default` would mutate host auth state.
22
- # - `issue delete` / `team delete` / `team create` are destructive and
23
- # off-list (widen deliberately, as gated writes, only if needed).
24
-
25
- set -euo pipefail
26
-
27
- # Path is a constant in production; the env override exists purely to let
28
- # unit tests substitute a stub `agentbox-ctl` on PATH without rewriting the
29
- # shim. Mirrors gh-shim / git-shim / ntn-shim.
30
- CTL="${AGENTBOX_CTL_PATH:-/usr/local/bin/agentbox-ctl}"
31
-
32
- die() {
33
- printf 'agentbox linear shim: %s\n' "$*" >&2
34
- exit 2
35
- }
36
-
37
- handle_auth() {
38
- local sub="${1-}"; shift || true
39
- case "$sub" in
40
- whoami)
41
- exec "$CTL" integration linear whoami -- "$@"
42
- ;;
43
- token)
44
- die "'auth token' leaks the raw API key — refused. Use 'linear whoami' for identity."
45
- ;;
46
- login|logout|migrate|default)
47
- die "'auth $sub' is not proxied (the host owns auth; run it on the host)."
48
- ;;
49
- '')
50
- die "missing subcommand for 'auth'. Supported: whoami"
51
- ;;
52
- *)
53
- die "unsupported 'auth $sub' (allowed: whoami)"
54
- ;;
55
- esac
56
- }
57
-
58
- handle_issue_comment() {
59
- local sub="${1-}"; shift || true
60
- case "$sub" in
61
- add)
62
- exec "$CTL" integration linear issue.comment -- "$@"
63
- ;;
64
- '')
65
- die "missing subcommand for 'issue comment'. Supported: add"
66
- ;;
67
- *)
68
- die "unsupported 'issue comment $sub' (allowed: add)"
69
- ;;
70
- esac
71
- }
72
-
73
- handle_issue() {
74
- local sub="${1-}"; shift || true
75
- case "$sub" in
76
- list)
77
- exec "$CTL" integration linear issue.list -- "$@"
78
- ;;
79
- mine)
80
- exec "$CTL" integration linear issue.mine -- "$@"
81
- ;;
82
- view)
83
- exec "$CTL" integration linear issue.view -- "$@"
84
- ;;
85
- query)
86
- exec "$CTL" integration linear issue.query -- "$@"
87
- ;;
88
- create)
89
- exec "$CTL" integration linear issue.create -- "$@"
90
- ;;
91
- update)
92
- exec "$CTL" integration linear issue.update -- "$@"
93
- ;;
94
- comment)
95
- handle_issue_comment "$@"
96
- ;;
97
- delete)
98
- die "'issue delete' is not proxied (destructive; off-list by default)."
99
- ;;
100
- '')
101
- die "missing subcommand for 'issue'. Supported: list, mine, view, query, create, update, comment add"
102
- ;;
103
- *)
104
- die "unsupported 'issue $sub' (allowed: list, mine, view, query, create, update, comment add)"
105
- ;;
106
- esac
107
- }
108
-
109
- handle_team() {
110
- local sub="${1-}"; shift || true
111
- case "$sub" in
112
- list)
113
- exec "$CTL" integration linear team.list -- "$@"
114
- ;;
115
- create|delete)
116
- die "'team $sub' is not proxied (destructive; off-list by default)."
117
- ;;
118
- '')
119
- die "missing subcommand for 'team'. Supported: list"
120
- ;;
121
- *)
122
- die "unsupported 'team $sub' (allowed: list)"
123
- ;;
124
- esac
125
- }
126
-
127
- # Top-level dispatch. `linear`'s real subcommands are
128
- # `auth issue team project cycle milestone initiative label document api schema`;
129
- # we expose only the read-safe ones plus a few gated writes (no destructive
130
- # ops, no auth token).
131
- if [ $# -eq 0 ]; then
132
- die "no subcommand. Supported: whoami, auth whoami, issue {list,mine,view,query,create,update,comment add}, team list, api <query>, --version"
133
- fi
134
-
135
- case "$1" in
136
- --version|-v)
137
- # Tools that sniff "linear --version" succeed with our shim line. The
138
- # real version lives host-side and is reported by the relay's
139
- # readiness probe (`assertIntegrationReady`).
140
- printf 'linear version 0.0.0 (agentbox-shim)\n'
141
- ;;
142
- --help|-h)
143
- printf 'agentbox linear shim — strict subset.\n' >&2
144
- printf 'Supported: whoami, auth whoami, issue {list,mine,view,query,create,update,comment add}, team list, api <query>, --version\n' >&2
145
- printf 'Anything else is rejected. Run host `linear --help` for full upstream docs.\n' >&2
146
- ;;
147
- whoami)
148
- shift
149
- exec "$CTL" integration linear whoami -- "$@"
150
- ;;
151
- auth)
152
- shift
153
- handle_auth "$@"
154
- ;;
155
- issue)
156
- shift
157
- handle_issue "$@"
158
- ;;
159
- team)
160
- shift
161
- handle_team "$@"
162
- ;;
163
- api)
164
- shift
165
- # `linear api` accepts pre-positional flags (`--variable`,
166
- # `--variables-json`, `--paginate`, `--silent`) before the GraphQL
167
- # query, so we don't require the FIRST arg to be a non-flag — only
168
- # that some arg is present. The relay's refuseGraphqlNonQuery
169
- # enforces query-only by rejecting any positional whose first
170
- # keyword is `mutation`/`subscription` (and any `--variable
171
- # key=@<path>` host-file load), so we don't duplicate that check
172
- # here. Writes go through the dedicated issue.* ops.
173
- if [ $# -eq 0 ]; then
174
- die "'api' requires a positional <query> (e.g. '{ teams { id } }')"
175
- fi
176
- exec "$CTL" integration linear api -- "$@"
177
- ;;
178
- *)
179
- die "'$1' is not proxied (supported: whoami, issue {list,mine,view,query,create,update,comment add}, team list, api <query>, --version)"
180
- ;;
181
- esac