@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.
- package/CHANGELOG.md +124 -0
- package/dist/_cloud-attach-HKRHYCY7.js +30 -0
- package/dist/{chunk-JNC7MCWJ.js → chunk-3INUZQTR.js} +10 -10
- package/dist/chunk-3INUZQTR.js.map +1 -0
- package/dist/{chunk-4PR3KJ5X.js → chunk-6PIGTR4D.js} +20 -20
- package/dist/{chunk-NHVGKFVY.js → chunk-7LNXTPEE.js} +340 -22
- package/dist/chunk-7LNXTPEE.js.map +1 -0
- package/dist/{chunk-WB6S4W7O.js → chunk-7Q6BG5AN.js} +2413 -1012
- package/dist/chunk-7Q6BG5AN.js.map +1 -0
- package/dist/{chunk-BUMKBUXS.js → chunk-7QU6XENE.js} +3 -3
- package/dist/chunk-BWE2I5QG.js +17 -0
- package/dist/chunk-BWE2I5QG.js.map +1 -0
- package/dist/{chunk-7ABO7OIF.js → chunk-CO2I3CQI.js} +4 -4
- package/dist/{chunk-OUF3YTQO.js → chunk-DBXCFLAR.js} +14 -17
- package/dist/chunk-DBXCFLAR.js.map +1 -0
- package/dist/{chunk-74VIUGY6.js → chunk-DYETLPUT.js} +6 -9
- package/dist/chunk-DYETLPUT.js.map +1 -0
- package/dist/{chunk-HYXCH4GA.js → chunk-EFVTQ7YB.js} +7 -7
- package/dist/{chunk-46NNZMZT.js → chunk-EPFXLXCW.js} +372 -72
- package/dist/chunk-EPFXLXCW.js.map +1 -0
- package/dist/chunk-GWKGSXDC.js +71 -0
- package/dist/chunk-GWKGSXDC.js.map +1 -0
- package/dist/{chunk-CKD3PRON.js → chunk-GWYD7YBK.js} +12 -9
- package/dist/{chunk-CKD3PRON.js.map → chunk-GWYD7YBK.js.map} +1 -1
- package/dist/{chunk-NHTRTST5.js → chunk-HNWZO2XU.js} +38 -15
- package/dist/chunk-HNWZO2XU.js.map +1 -0
- package/dist/{chunk-EVT2SNF2.js → chunk-HO2ACZES.js} +3 -3
- package/dist/{chunk-V5NWSLWD.js → chunk-HP4L45LW.js} +14 -14
- package/dist/{chunk-B4DAH2F2.js → chunk-LHOKRCNF.js} +3 -3
- package/dist/{chunk-G3H2L3O2.js → chunk-MNDKP4VS.js} +23 -3
- package/dist/chunk-MNDKP4VS.js.map +1 -0
- package/dist/{chunk-JDSYMTMS.js → chunk-NAT2H7J4.js} +110 -66
- package/dist/chunk-NAT2H7J4.js.map +1 -0
- package/dist/{chunk-KFLGXE3R.js → chunk-NGERWFSA.js} +133 -22
- package/dist/chunk-NGERWFSA.js.map +1 -0
- package/dist/{chunk-GFOWBXV7.js → chunk-OKLEPEWZ.js} +460 -253
- package/dist/chunk-OKLEPEWZ.js.map +1 -0
- package/dist/{chunk-YI4GHC2E.js → chunk-QU5BI2HC.js} +12 -15
- package/dist/chunk-QU5BI2HC.js.map +1 -0
- package/dist/{chunk-BWM56FKY.js → chunk-RQURMAPA.js} +11 -11
- package/dist/{chunk-FPMRFMVK.js → chunk-RZCLRWNY.js} +9 -9
- package/dist/{chunk-JQLOGVZK.js → chunk-THUST2QK.js} +85 -21
- package/dist/chunk-THUST2QK.js.map +1 -0
- package/dist/{chunk-OXKW4GWD.js → chunk-UPVP6YGJ.js} +4 -70
- package/dist/chunk-UPVP6YGJ.js.map +1 -0
- package/dist/{chunk-7RSE7ESY.js → chunk-VVNXQ4XS.js} +27 -18
- package/dist/chunk-VVNXQ4XS.js.map +1 -0
- package/dist/{chunk-FGQFVUMH.js → chunk-VY54AX4T.js} +3 -3
- package/dist/{chunk-OUWVN2F2.js → chunk-WGNI24H2.js} +16 -13
- package/dist/chunk-WGNI24H2.js.map +1 -0
- package/dist/{chunk-PSA6GADQ.js → chunk-WHFCJBMO.js} +14 -1
- package/dist/chunk-WHFCJBMO.js.map +1 -0
- package/dist/{chunk-KJ5TCYNI.js → chunk-WHJYOO5H.js} +7 -6
- package/dist/chunk-WHJYOO5H.js.map +1 -0
- package/dist/cloud-backends.js +5 -5
- package/dist/{cloud-poller-SUNA6ZQC-7M5LJHHE.js → cloud-poller-QJRZXB4W-LJ2BRB3L.js} +2 -2
- package/dist/{control-plane-5R7PYRQ6.js → control-plane-UKKYXHIQ.js} +19 -18
- package/dist/cp-hub-upload-BM2OLTOS.js +81 -0
- package/dist/cp-hub-upload-BM2OLTOS.js.map +1 -0
- package/dist/{custody-client-PNCC2HBJ.js → custody-client-NPXJ46TB.js} +5 -4
- package/dist/{deploy-hetzner-SSGSXAKA.js → deploy-hetzner-Y3ILCDRF.js} +10 -10
- package/dist/{dist-RN6JOAG4.js → dist-5OGQ3CJQ.js} +81 -45
- package/dist/{dist-5OR4QTQW.js → dist-7B3VCLZI.js} +9 -9
- package/dist/{dist-EPFS5PRI.js → dist-A5ZEIVAW.js} +10 -10
- package/dist/{dist-6PYXFREL.js → dist-DOEGENNW.js} +61 -16
- package/dist/dist-DOEGENNW.js.map +1 -0
- package/dist/{dist-XQLKK7H3.js → dist-EOGD7KD6.js} +54 -28
- package/dist/dist-EOGD7KD6.js.map +1 -0
- package/dist/{dist-XATN4ZIR.js → dist-FBM2WS5S.js} +22 -4
- package/dist/{dist-POILUDVJ.js → dist-MUTFY7FA.js} +9 -9
- package/dist/{dist-ZNQZHTUN.js → dist-SMDXLPZO.js} +35 -6
- package/dist/{dist-M4O5MU5K.js → dist-VTLQKZ2E.js} +8 -8
- package/dist/{dist-SN2TCRZ5.js → dist-ZJIJHCZB.js} +9 -9
- package/dist/{dist-K5M4HKG7.js → dist-ZNYS7CVF.js} +21 -9
- package/dist/host-reach-drainer-ZJU2STQQ.js +9 -0
- package/dist/hub-Q4VOF4WN.js +37 -0
- package/dist/{hub-adopt-I44VGSBL.js → hub-adopt-OA336ZXZ.js} +8 -8
- package/dist/{hub-api-client-WJPBXZAZ.js → hub-api-client-5U6WOTZ3.js} +2 -2
- package/dist/{hub-docker-target-REEEWUG2.js → hub-docker-target-JKFCABK4.js} +16 -16
- package/dist/index.js +1321 -882
- package/dist/index.js.map +1 -1
- package/dist/prepare-GFWWKWGF.js +41 -0
- package/dist/prepared-custody-KU4PDVBT.js +36 -0
- package/dist/{prepared-state-PV3GUBHO-MF56HWMZ.js → prepared-state-LNQ7DYSU-AR5RMXAO.js} +4 -3
- package/dist/{publish-credentials-BPHUO5VL.js → publish-credentials-3SQXX45P.js} +11 -11
- package/dist/registry-AFKV3EO2.js +18 -0
- package/dist/relay-QH6OEY2V.js +20 -0
- package/dist/relay-QH6OEY2V.js.map +1 -0
- package/dist/{remote-docker-share-RX5ARK45.js → remote-docker-share-RMS6IB5X.js} +11 -11
- package/dist/remote-docker-share-RMS6IB5X.js.map +1 -0
- package/dist/tool-grant-push-T6DRBY3W.js +90 -0
- package/dist/tool-grant-push-T6DRBY3W.js.map +1 -0
- package/package.json +1 -2
- package/runtime/_shared/agentbox-tool-shim +21 -0
- package/runtime/_shared/ctl.cjs +6757 -5299
- package/runtime/_shared/gh-shim +103 -228
- package/runtime/digitalocean/agentbox-tool-shim +21 -0
- package/runtime/digitalocean/ctl.cjs +6757 -5299
- package/runtime/digitalocean/gh-shim +103 -228
- package/runtime/digitalocean/scripts/install-box.sh +9 -15
- package/runtime/docker/Dockerfile.box +8 -18
- package/runtime/docker/packages/ctl/dist/bin.cjs +6757 -5299
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-tool-shim +21 -0
- package/runtime/docker/packages/sandbox-docker/scripts/gh-shim +103 -228
- package/runtime/e2b/agentbox-tool-shim +21 -0
- package/runtime/e2b/ctl.cjs +6757 -5299
- package/runtime/e2b/gh-shim +103 -228
- package/runtime/e2b/scripts/build-template.sh +5 -9
- package/runtime/hetzner/agentbox-tool-shim +21 -0
- package/runtime/hetzner/ctl.cjs +6757 -5299
- package/runtime/hetzner/gh-shim +103 -228
- package/runtime/hetzner/scripts/install-box.sh +9 -15
- package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
- package/runtime/hub/apps/hub/.next/app-path-routes-manifest.json +2 -0
- package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
- package/runtime/hub/apps/hub/.next/routes-manifest.json +16 -0
- package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js +5 -5
- package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/[id]/answer/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/approvals/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/agent/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/agent/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/branches/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/checkpoint/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/checkpoint/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/logs/route.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/logs/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/restart/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/services/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route.js +8 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/checkpoints/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/checkpoints/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/[...path]/route.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/[...path]/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/blob/[...path]/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/blob/[...path]/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/health/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/health/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/login-code/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/logs/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/[id]/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/jobs/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/branches/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/seed/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/seed/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/credentials/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/prepare/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/prune/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/prune/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/system/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/system/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page_client-reference-manifest.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route.js +8 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/vnc/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/custody/page.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/custody/page.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/system/page.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/system/page.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js +4 -4
- package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app-paths-manifest.json +2 -0
- package/runtime/hub/apps/hub/.next/server/chunks/044u_hub__next-internal_server_app_(dashboard)_boxes_[id]_vnc_route_actions_1cy1392.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_boxes_[id]_vnc_route_actions_10y_e83.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/{[externals]__1nj4awx._.js → [externals]__02a249v._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__00f9v4p._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__01nppdu._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__02f8rwr._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__068_052._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__06ma5m4._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__07kp2fu._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1yi-2wa._.js → [root-of-the-server]__08u01ud._.js} +3 -3
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__098bkh3._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1hxo1tv._.js → [root-of-the-server]__09hbkgm._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09tmbom._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0_3m9sf._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0aotdzg._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0bn6-pu._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cpt9f9._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1lmiq._.js +15 -15
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dom248._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0f0bb7o._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0gb04bp._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0glplq7._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0xrdbh9._.js → [root-of-the-server]__0gxfyol._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0hsb2ak._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0joqm8t._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jp-895._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1leda2s._.js → [root-of-the-server]__0jpqg_t._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__17bhgkz._.js → [root-of-the-server]__0lgnu00._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0lsv9-6._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0pzgufc._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qfv7z6._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qlr61y._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0s8srqi._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0urn9j5._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0vb8mk2._.js +4 -0
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__17w5eaa._.js → [root-of-the-server]__0x27ifo._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0y7rvy1._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0zsgjre._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-bqa8a._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__11uspjg._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0zvr6ul._.js → [root-of-the-server]__15tgdh6._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1ek7nxv._.js → [root-of-the-server]__16bz_kz._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1w7jw4q._.js → [root-of-the-server]__18tehjj._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1ds8g0e._.js → [root-of-the-server]__1_hzv4s._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0cgpsh8._.js → [root-of-the-server]__1b5f5h4._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__10-aihp._.js → [root-of-the-server]__1dv80yf._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1eanlxn._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__16lcb2d._.js → [root-of-the-server]__1fc-nvn._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1h4iahl._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0f-c-eh._.js → [root-of-the-server]__1j0vnh3._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lgrtx6._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1unqgd7._.js → [root-of-the-server]__1lz7931._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1oclxlx._.js → [root-of-the-server]__1n3u6-5._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qky5cd._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1r2quye._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rb_nc5._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0cv16py._.js → [root-of-the-server]__1spr8ss._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1t_juqb._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0t8kwy3._.js → [root-of-the-server]__1tct9rj._.js} +3 -3
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0gfa1jg._.js → [root-of-the-server]__1tjtt06._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__09cigc7._.js → [root-of-the-server]__1whjno0._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1wn4-iv._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1x6zxrf._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0tyixgg._.js → [root-of-the-server]__1xfxc6i._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1m1_gm_._.js → [root-of-the-server]__1xqcvi4._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__207d30i._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_07icdxf._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_0907rw0._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_0adm87k._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_0g01mkg._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_0l_klgd._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_0lfm81x._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_0tbg83f._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_0tms_au._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_0zhli27._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_10yfoq5._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_12uhpbp._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_17a9v8y._.js +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/_1c7x9ee._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_1n-c443._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_1y80vfg._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_214_q-1._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/apps_hub_app_(dashboard)_api_v1_lib_openapi_ts_1yokmzt._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/{packages_relay_dist_0eg7ay1._.js → packages_relay_dist_0p8dnf4._.js} +4 -4
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/{[root-of-the-server]__1plrs94._.js → [root-of-the-server]__0-c5j6l._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0r2xlss._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/_19vy9ni._.js +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_[id]_page_tsx_1-j_972._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_settings_page_tsx_0hv6n82._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/{packages_relay_dist_1z9j3g0._.js → packages_relay_dist_0sap-2l._.js} +4 -4
- package/runtime/hub/apps/hub/.next/server/functions-config-manifest.json +3 -1
- package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
- package/runtime/hub/apps/hub/.next/server/middleware.js +1 -1
- package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
- package/runtime/hub/apps/hub/.next/static/chunks/{328ny-3zs_h7m.js → 0jefm3re1-2jv.js} +1 -1
- package/runtime/hub/apps/hub/.next/static/chunks/{30h8mz040b5-l.js → 3u4odx1_-dy6b.js} +1 -1
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/boxes/[id]/vnc/route.ts +45 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/openapi.ts +45 -1
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/validate.ts +14 -3
- package/runtime/hub/apps/hub/app/(dashboard)/boxes/[id]/vnc/route.ts +58 -0
- package/runtime/hub/apps/hub/app/(dashboard)/boxes/components/access.tsx +26 -9
- package/runtime/hub/apps/hub/app/(dashboard)/settings/components/provider-actions.tsx +34 -26
- package/runtime/hub/apps/hub/{auth-JMVHQKWY.js → auth-V7KPRWPS.js} +2 -2
- package/runtime/hub/apps/hub/{auth-config-5IFRWOK4.js → auth-config-B3Y3BT2I.js} +2 -2
- package/runtime/hub/apps/hub/{chunk-VKOCY6SX.js → chunk-3AD3MYNV.js} +49 -14
- package/runtime/hub/apps/hub/{chunk-KTVETF3F.js → chunk-3ZDBZYOY.js} +11 -8
- package/runtime/hub/apps/hub/{chunk-LPYK2354.js → chunk-5ABFGGPT.js} +339 -21
- package/runtime/hub/apps/hub/{chunk-UMPTTQBE.js → chunk-GBYD2ODL.js} +458 -251
- package/runtime/hub/apps/hub/{chunk-5TM7XXLT.js → chunk-H5SUXDZA.js} +2833 -1277
- package/runtime/hub/apps/hub/{chunk-QU3FFGJY.js → chunk-UQ5XNPOF.js} +11 -14
- package/runtime/hub/apps/hub/{chunk-3LAHFDJF.js → chunk-VWQNSZGI.js} +22 -2
- package/runtime/hub/apps/hub/{chunk-EZUK53CC.js → chunk-WHGY7HOC.js} +85 -21
- package/runtime/hub/apps/hub/{chunk-D33EV4YZ.js → chunk-ZP4RYI4U.js} +1 -1
- package/runtime/hub/apps/hub/{cloud-poller-SUNA6ZQC-VSKVMYHL.js → cloud-poller-QJRZXB4W-G7ECKNKQ.js} +1 -1
- package/runtime/hub/apps/hub/{dist-ELZHBQEM.js → dist-37EKQ6RZ.js} +11 -11
- package/runtime/hub/apps/hub/{dist-D265LCAN.js → dist-CGH7PEMZ.js} +21 -3
- package/runtime/hub/apps/hub/{dist-SYWTB6RD.js → dist-CMVSARW5.js} +15 -18
- package/runtime/hub/apps/hub/{dist-5HTJSOHS.js → dist-EGXZRZH2.js} +19 -7
- package/runtime/hub/apps/hub/{dist-YK5FFPXZ.js → dist-EOGGFZZS.js} +62 -20
- package/runtime/hub/apps/hub/{dist-E2FTSTCY.js → dist-LJBHOO3K.js} +34 -5
- package/runtime/hub/apps/hub/{dist-N3E5YAYY.js → dist-R77W6WJ5.js} +53 -26
- package/runtime/hub/apps/hub/{dist-JVEDVVVG.js → dist-TH2JZYZY.js} +7 -7
- package/runtime/hub/apps/hub/{dist-2YP57GMB.js → dist-XPRGHQH2.js} +13 -13
- package/runtime/hub/apps/hub/{dist-NKCXH5DW.js → dist-Z2Y5F7AF.js} +6 -6
- package/runtime/hub/apps/hub/docker-compose.yml +1 -0
- package/runtime/hub/apps/hub/{hub-token-MDOBY7MZ.js → hub-token-DDJ5Z6RS.js} +2 -2
- package/runtime/hub/apps/hub/{hub-worker-UFFLF37F.js → hub-worker-DXVMUQWF.js} +16 -16
- package/runtime/hub/apps/hub/lib/boxes/backend-types.ts +11 -0
- package/runtime/hub/apps/hub/lib/boxes/types.ts +43 -0
- package/runtime/hub/apps/hub/lib/boxes/vnc-link.ts +51 -0
- package/runtime/hub/apps/hub/lib/hub-backend.ts +127 -54
- package/runtime/hub/apps/hub/lib/hub-worker.ts +4 -4
- package/runtime/hub/apps/hub/lib/provider-importers.ts +66 -1
- package/runtime/hub/apps/hub/{prepared-state-PV3GUBHO-PPRQDYFR.js → prepared-state-LNQ7DYSU-ABC2EQVI.js} +3 -2
- package/runtime/hub/apps/hub/server.js +130 -72
- package/runtime/hub/apps/hub/server.ts +18 -0
- package/runtime/hub/apps/hub/test/vnc-link.test.ts +61 -0
- package/runtime/hub/apps/hub/tsconfig.tsbuildinfo +1 -1
- package/runtime/hub-deploy/docker-compose.yml +1 -0
- package/runtime/relay/bin.cjs +16623 -14688
- package/runtime/vercel/agentbox-tool-shim +21 -0
- package/runtime/vercel/ctl.cjs +6757 -5299
- package/runtime/vercel/gh-shim +103 -228
- package/runtime/vercel/scripts/provision.sh +5 -9
- package/share/host-skills/agentbox-info/SKILL.md +24 -14
- package/dist/_cloud-attach-Y5HIQ373.js +0 -28
- package/dist/chunk-46NNZMZT.js.map +0 -1
- package/dist/chunk-74VIUGY6.js.map +0 -1
- package/dist/chunk-7RSE7ESY.js.map +0 -1
- package/dist/chunk-G3H2L3O2.js.map +0 -1
- package/dist/chunk-GFOWBXV7.js.map +0 -1
- package/dist/chunk-JDSYMTMS.js.map +0 -1
- package/dist/chunk-JNC7MCWJ.js.map +0 -1
- package/dist/chunk-JQLOGVZK.js.map +0 -1
- package/dist/chunk-KFLGXE3R.js.map +0 -1
- package/dist/chunk-KJ5TCYNI.js.map +0 -1
- package/dist/chunk-NHTRTST5.js.map +0 -1
- package/dist/chunk-NHVGKFVY.js.map +0 -1
- package/dist/chunk-OUF3YTQO.js.map +0 -1
- package/dist/chunk-OUWVN2F2.js.map +0 -1
- package/dist/chunk-OXKW4GWD.js.map +0 -1
- package/dist/chunk-PSA6GADQ.js.map +0 -1
- package/dist/chunk-WB6S4W7O.js.map +0 -1
- package/dist/chunk-YI4GHC2E.js.map +0 -1
- package/dist/dist-6PYXFREL.js.map +0 -1
- package/dist/dist-XQLKK7H3.js.map +0 -1
- package/dist/hub-MJ7O4WXW.js +0 -36
- package/dist/prepare-V4U5HVJU.js +0 -40
- package/dist/prepared-custody-QIXW7MJM.js +0 -35
- package/dist/relay-DRDELF6B.js +0 -20
- package/runtime/_shared/linear-shim +0 -181
- package/runtime/_shared/ntn-shim +0 -95
- package/runtime/digitalocean/linear-shim +0 -181
- package/runtime/digitalocean/ntn-shim +0 -95
- package/runtime/docker/packages/sandbox-docker/scripts/linear-shim +0 -181
- package/runtime/docker/packages/sandbox-docker/scripts/ntn-shim +0 -95
- package/runtime/e2b/linear-shim +0 -181
- package/runtime/e2b/ntn-shim +0 -95
- package/runtime/hetzner/linear-shim +0 -181
- package/runtime/hetzner/ntn-shim +0 -95
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__039tc0m._.js +0 -3
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0c_3x8u._.js +0 -3
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ty7ew1._.js +0 -3
- package/runtime/vercel/linear-shim +0 -181
- package/runtime/vercel/ntn-shim +0 -95
- /package/dist/{_cloud-attach-Y5HIQ373.js.map → _cloud-attach-HKRHYCY7.js.map} +0 -0
- /package/dist/{chunk-4PR3KJ5X.js.map → chunk-6PIGTR4D.js.map} +0 -0
- /package/dist/{chunk-BUMKBUXS.js.map → chunk-7QU6XENE.js.map} +0 -0
- /package/dist/{chunk-7ABO7OIF.js.map → chunk-CO2I3CQI.js.map} +0 -0
- /package/dist/{chunk-HYXCH4GA.js.map → chunk-EFVTQ7YB.js.map} +0 -0
- /package/dist/{chunk-EVT2SNF2.js.map → chunk-HO2ACZES.js.map} +0 -0
- /package/dist/{chunk-V5NWSLWD.js.map → chunk-HP4L45LW.js.map} +0 -0
- /package/dist/{chunk-B4DAH2F2.js.map → chunk-LHOKRCNF.js.map} +0 -0
- /package/dist/{chunk-BWM56FKY.js.map → chunk-RQURMAPA.js.map} +0 -0
- /package/dist/{chunk-FPMRFMVK.js.map → chunk-RZCLRWNY.js.map} +0 -0
- /package/dist/{chunk-FGQFVUMH.js.map → chunk-VY54AX4T.js.map} +0 -0
- /package/dist/{cloud-poller-SUNA6ZQC-7M5LJHHE.js.map → cloud-poller-QJRZXB4W-LJ2BRB3L.js.map} +0 -0
- /package/dist/{control-plane-5R7PYRQ6.js.map → control-plane-UKKYXHIQ.js.map} +0 -0
- /package/dist/{custody-client-PNCC2HBJ.js.map → custody-client-NPXJ46TB.js.map} +0 -0
- /package/dist/{deploy-hetzner-SSGSXAKA.js.map → deploy-hetzner-Y3ILCDRF.js.map} +0 -0
- /package/dist/{dist-5OR4QTQW.js.map → dist-5OGQ3CJQ.js.map} +0 -0
- /package/dist/{dist-EPFS5PRI.js.map → dist-7B3VCLZI.js.map} +0 -0
- /package/dist/{dist-K5M4HKG7.js.map → dist-A5ZEIVAW.js.map} +0 -0
- /package/dist/{dist-M4O5MU5K.js.map → dist-FBM2WS5S.js.map} +0 -0
- /package/dist/{dist-POILUDVJ.js.map → dist-MUTFY7FA.js.map} +0 -0
- /package/dist/{dist-RN6JOAG4.js.map → dist-SMDXLPZO.js.map} +0 -0
- /package/dist/{dist-SN2TCRZ5.js.map → dist-VTLQKZ2E.js.map} +0 -0
- /package/dist/{dist-XATN4ZIR.js.map → dist-ZJIJHCZB.js.map} +0 -0
- /package/dist/{dist-ZNQZHTUN.js.map → dist-ZNYS7CVF.js.map} +0 -0
- /package/dist/{hub-MJ7O4WXW.js.map → host-reach-drainer-ZJU2STQQ.js.map} +0 -0
- /package/dist/{hub-adopt-I44VGSBL.js.map → hub-Q4VOF4WN.js.map} +0 -0
- /package/dist/{hub-api-client-WJPBXZAZ.js.map → hub-adopt-OA336ZXZ.js.map} +0 -0
- /package/dist/{prepare-V4U5HVJU.js.map → hub-api-client-5U6WOTZ3.js.map} +0 -0
- /package/dist/{hub-docker-target-REEEWUG2.js.map → hub-docker-target-JKFCABK4.js.map} +0 -0
- /package/dist/{prepared-custody-QIXW7MJM.js.map → prepare-GFWWKWGF.js.map} +0 -0
- /package/dist/{prepared-state-PV3GUBHO-MF56HWMZ.js.map → prepared-custody-KU4PDVBT.js.map} +0 -0
- /package/dist/{relay-DRDELF6B.js.map → prepared-state-LNQ7DYSU-AR5RMXAO.js.map} +0 -0
- /package/dist/{publish-credentials-BPHUO5VL.js.map → publish-credentials-3SQXX45P.js.map} +0 -0
- /package/dist/{remote-docker-share-RX5ARK45.js.map → registry-AFKV3EO2.js.map} +0 -0
- /package/runtime/hub/apps/hub/.next/static/{z7_2bKU93xE7GwllL1Duv → XIx10ozuCZRzwSsiCF_5t}/_buildManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{z7_2bKU93xE7GwllL1Duv → XIx10ozuCZRzwSsiCF_5t}/_clientMiddlewareManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{z7_2bKU93xE7GwllL1Duv → XIx10ozuCZRzwSsiCF_5t}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
PROVIDERS,
|
|
4
|
+
isProviderKind,
|
|
5
|
+
providerMeta
|
|
6
|
+
} from "./chunk-7LNXTPEE.js";
|
|
2
7
|
|
|
3
8
|
// ../../packages/sandbox-core/dist/index.js
|
|
4
9
|
import { mkdir, open, readFile, rename, rm, stat, writeFile } from "fs/promises";
|
|
@@ -14,19 +19,24 @@ import { dirname as dirname3, join as join4 } from "path";
|
|
|
14
19
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
15
20
|
import { homedir as homedir22 } from "os";
|
|
16
21
|
import { dirname as dirname22, join as join3 } from "path";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { execa as execa2 } from "execa";
|
|
20
|
-
import { stat as stat3 } from "fs/promises";
|
|
22
|
+
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
23
|
+
import { mkdir as mkdir2, open as open2, readFile as readFile2, rename as rename2, rm as rm2, stat as stat3, writeFile as writeFile2 } from "fs/promises";
|
|
21
24
|
import { homedir as homedir4 } from "os";
|
|
25
|
+
import { dirname as dirname4, join as join5 } from "path";
|
|
26
|
+
import { setTimeout as delay2 } from "timers/promises";
|
|
27
|
+
import { mkdir as mkdir3, readFile as readFile3 } from "fs/promises";
|
|
28
|
+
import { join as join6, resolve as resolve3 } from "path";
|
|
29
|
+
import { execa as execa2 } from "execa";
|
|
30
|
+
import { stat as stat4 } from "fs/promises";
|
|
31
|
+
import { homedir as homedir5 } from "os";
|
|
22
32
|
import { execa as execa3 } from "execa";
|
|
23
33
|
import { execa as execa4 } from "execa";
|
|
24
34
|
import { createHash } from "crypto";
|
|
25
|
-
import { existsSync as
|
|
26
|
-
import { mkdir as
|
|
35
|
+
import { existsSync as existsSync3 } from "fs";
|
|
36
|
+
import { mkdir as mkdir4, rm as rm3 } from "fs/promises";
|
|
27
37
|
import { createServer } from "net";
|
|
28
|
-
import { homedir as
|
|
29
|
-
import { join as
|
|
38
|
+
import { homedir as homedir6 } from "os";
|
|
39
|
+
import { join as join7, resolve as resolve22 } from "path";
|
|
30
40
|
import { execa as execa5 } from "execa";
|
|
31
41
|
|
|
32
42
|
// ../../packages/core/dist/index.js
|
|
@@ -65,6 +75,14 @@ function resolveAgentLauncher(kind) {
|
|
|
65
75
|
if (kind === "opencode") return opencodeLauncher;
|
|
66
76
|
throw new Error(`unknown agent kind: ${String(kind)}`);
|
|
67
77
|
}
|
|
78
|
+
function claudeTuiEnv(mode) {
|
|
79
|
+
if (mode === "default") return { CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN: "1" };
|
|
80
|
+
if (mode === "fullscreen") return { CLAUDE_CODE_NO_FLICKER: "1" };
|
|
81
|
+
return {};
|
|
82
|
+
}
|
|
83
|
+
function buildNoVncUrl(base, password) {
|
|
84
|
+
return `${base.replace(/\/+$/, "")}/vnc.html?autoconnect=1&password=${encodeURIComponent(password)}`;
|
|
85
|
+
}
|
|
68
86
|
var PLACEHOLDER_KEYS = [
|
|
69
87
|
"AGENTBOX_BOX_NAME",
|
|
70
88
|
"AGENTBOX_BOX_ID",
|
|
@@ -377,33 +395,29 @@ function sanitizeGitArgs(args) {
|
|
|
377
395
|
}
|
|
378
396
|
|
|
379
397
|
// ../../packages/sandbox-core/dist/index.js
|
|
380
|
-
import { chmodSync, existsSync as
|
|
381
|
-
import { homedir as
|
|
382
|
-
import { dirname as
|
|
383
|
-
import { existsSync as
|
|
398
|
+
import { chmodSync, existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync as readFileSync3, renameSync, writeFileSync as writeFileSync2 } from "fs";
|
|
399
|
+
import { homedir as homedir7 } from "os";
|
|
400
|
+
import { dirname as dirname5, resolve as resolve32 } from "path";
|
|
401
|
+
import { existsSync as existsSync5 } from "fs";
|
|
384
402
|
import { request as httpRequest } from "http";
|
|
385
|
-
import {
|
|
386
|
-
import {
|
|
403
|
+
import { connect as netConnect } from "net";
|
|
404
|
+
import { dirname as dirname6, resolve as resolve4 } from "path";
|
|
405
|
+
import { setTimeout as delay3 } from "timers/promises";
|
|
387
406
|
import { fileURLToPath } from "url";
|
|
388
407
|
import { spawn } from "child_process";
|
|
389
|
-
import { existsSync as
|
|
390
|
-
import { mkdir as
|
|
391
|
-
import { homedir as homedir7 } from "os";
|
|
392
|
-
import { dirname as dirname6, join as join7, resolve as resolve6 } from "path";
|
|
393
|
-
import { setTimeout as delay3 } from "timers/promises";
|
|
394
|
-
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
395
|
-
import { existsSync as existsSync5 } from "fs";
|
|
396
|
-
import { resolve as resolve5 } from "path";
|
|
397
|
-
import { existsSync as existsSync7, readFileSync as readFileSync3 } from "fs";
|
|
398
|
-
import { mkdir as mkdir5, open as open2, readFile as readFile4, rename as rename2, rm as rm3, stat as stat4, writeFile as writeFile3 } from "fs/promises";
|
|
408
|
+
import { existsSync as existsSync7, openSync } from "fs";
|
|
409
|
+
import { mkdir as mkdir5, readFile as readFile4, stat as stat5, unlink, writeFile as writeFile3 } from "fs/promises";
|
|
399
410
|
import { homedir as homedir8 } from "os";
|
|
400
|
-
import { dirname as dirname7, join as join8 } from "path";
|
|
411
|
+
import { dirname as dirname7, join as join8, resolve as resolve6 } from "path";
|
|
401
412
|
import { setTimeout as delay4 } from "timers/promises";
|
|
413
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
414
|
+
import { existsSync as existsSync6 } from "fs";
|
|
415
|
+
import { resolve as resolve5 } from "path";
|
|
402
416
|
import { mkdtemp, readFile as readFile5, writeFile as writeFile4 } from "fs/promises";
|
|
403
417
|
import { tmpdir } from "os";
|
|
404
418
|
import { basename as basename2, join as join9 } from "path";
|
|
405
419
|
import { join as join10 } from "path";
|
|
406
|
-
import { chmod, mkdir as mkdir6, readdir as readdir2, readFile as readFile6, stat as
|
|
420
|
+
import { chmod, mkdir as mkdir6, readdir as readdir2, readFile as readFile6, stat as stat6, writeFile as writeFile5 } from "fs/promises";
|
|
407
421
|
import { homedir as homedir9 } from "os";
|
|
408
422
|
import { dirname as dirname8, join as join11 } from "path";
|
|
409
423
|
import { mkdir as mkdir7, mkdtemp as mkdtemp2, rm as rm4, writeFile as writeFile6 } from "fs/promises";
|
|
@@ -414,12 +428,12 @@ import { mkdtemp as mkdtemp3, rm as rm5 } from "fs/promises";
|
|
|
414
428
|
import { tmpdir as tmpdir3 } from "os";
|
|
415
429
|
import { join as join13 } from "path";
|
|
416
430
|
import { execa as execa6 } from "execa";
|
|
417
|
-
import { readdir as readdir3, stat as
|
|
431
|
+
import { readdir as readdir3, stat as stat7 } from "fs/promises";
|
|
418
432
|
import { homedir as homedir11 } from "os";
|
|
419
433
|
import { join as join14 } from "path";
|
|
420
|
-
import { readdir as readdir4, realpath as realpath2, stat as
|
|
434
|
+
import { readdir as readdir4, realpath as realpath2, stat as stat8 } from "fs/promises";
|
|
421
435
|
import { isAbsolute as isAbsolute3, join as join15, relative } from "path";
|
|
422
|
-
import { stat as
|
|
436
|
+
import { stat as stat9 } from "fs/promises";
|
|
423
437
|
import { chmod as chmod2, mkdir as mkdir8, mkdtemp as mkdtemp4, readFile as readFile7, rename as rename3, rm as rm6, writeFile as writeFile7 } from "fs/promises";
|
|
424
438
|
import { tmpdir as tmpdir4 } from "os";
|
|
425
439
|
import { dirname as dirname10, join as join16 } from "path";
|
|
@@ -428,11 +442,11 @@ import { readFile as readFile8 } from "fs/promises";
|
|
|
428
442
|
import { join as join17 } from "path";
|
|
429
443
|
import { execa as execa7 } from "execa";
|
|
430
444
|
import { createHash as createHash3 } from "crypto";
|
|
431
|
-
import { copyFile, mkdir as mkdir9, mkdtemp as mkdtemp5, readdir as readdir5, readFile as readFile9, rm as rm7, stat as
|
|
445
|
+
import { copyFile, mkdir as mkdir9, mkdtemp as mkdtemp5, readdir as readdir5, readFile as readFile9, rm as rm7, stat as stat10 } from "fs/promises";
|
|
432
446
|
import { homedir as homedir12, tmpdir as tmpdir5 } from "os";
|
|
433
447
|
import { basename as basename22, dirname as dirname11, join as join18 } from "path";
|
|
434
448
|
import { execa as execa8 } from "execa";
|
|
435
|
-
import { copyFile as copyFile2, mkdtemp as mkdtemp6, readdir as readdir6, readFile as readFile10, rm as rm8, stat as
|
|
449
|
+
import { copyFile as copyFile2, mkdtemp as mkdtemp6, readdir as readdir6, readFile as readFile10, rm as rm8, stat as stat11, writeFile as writeFile8 } from "fs/promises";
|
|
436
450
|
import { homedir as homedir14, tmpdir as tmpdir6 } from "os";
|
|
437
451
|
import { basename as basename3, join as join19, relative as relative2 } from "path";
|
|
438
452
|
import { execa as execa9 } from "execa";
|
|
@@ -982,6 +996,230 @@ function buildExposedHubEnv(record, env) {
|
|
|
982
996
|
}
|
|
983
997
|
return out;
|
|
984
998
|
}
|
|
999
|
+
var PLUGINS_FILE = join5(homedir4(), ".agentbox", "plugins.json");
|
|
1000
|
+
var SUPPORTED_SDK_API_VERSIONS = [1, 2];
|
|
1001
|
+
function isSupportedApiVersion(v) {
|
|
1002
|
+
return SUPPORTED_SDK_API_VERSIONS.includes(v);
|
|
1003
|
+
}
|
|
1004
|
+
var PLUGINS_FILE_VERSION = 2;
|
|
1005
|
+
var EMPTY2 = { version: PLUGINS_FILE_VERSION, plugins: [] };
|
|
1006
|
+
function isKnownVersion(v) {
|
|
1007
|
+
return v === 1 || v === 2;
|
|
1008
|
+
}
|
|
1009
|
+
var LOCK_STALE_MS2 = 15e3;
|
|
1010
|
+
var LOCK_ACQUIRE_TIMEOUT_MS2 = 2e4;
|
|
1011
|
+
var LOCK_RETRY_MS2 = 25;
|
|
1012
|
+
async function withFileLock(path, fn) {
|
|
1013
|
+
const lockPath = `${path}.lock`;
|
|
1014
|
+
await mkdir2(dirname4(path), { recursive: true });
|
|
1015
|
+
const deadline = Date.now() + LOCK_ACQUIRE_TIMEOUT_MS2;
|
|
1016
|
+
let held = false;
|
|
1017
|
+
while (!held) {
|
|
1018
|
+
try {
|
|
1019
|
+
const fh = await open2(lockPath, "wx");
|
|
1020
|
+
await fh.writeFile(`${String(process.pid)}
|
|
1021
|
+
`);
|
|
1022
|
+
await fh.close();
|
|
1023
|
+
held = true;
|
|
1024
|
+
} catch (err) {
|
|
1025
|
+
if (err.code !== "EEXIST") throw err;
|
|
1026
|
+
try {
|
|
1027
|
+
const st = await stat3(lockPath);
|
|
1028
|
+
if (Date.now() - st.mtimeMs > LOCK_STALE_MS2) {
|
|
1029
|
+
await rm2(lockPath, { force: true });
|
|
1030
|
+
continue;
|
|
1031
|
+
}
|
|
1032
|
+
} catch {
|
|
1033
|
+
continue;
|
|
1034
|
+
}
|
|
1035
|
+
if (Date.now() >= deadline) break;
|
|
1036
|
+
await delay2(LOCK_RETRY_MS2);
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
try {
|
|
1040
|
+
return await fn();
|
|
1041
|
+
} finally {
|
|
1042
|
+
if (held) await rm2(lockPath, { force: true }).catch(() => {
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
function normalize2(raw) {
|
|
1047
|
+
const parsed = raw;
|
|
1048
|
+
if (!parsed || !isKnownVersion(parsed.version) || !Array.isArray(parsed.plugins)) {
|
|
1049
|
+
return { ...EMPTY2 };
|
|
1050
|
+
}
|
|
1051
|
+
return parsed;
|
|
1052
|
+
}
|
|
1053
|
+
function readPluginRegistrySync(path = PLUGINS_FILE) {
|
|
1054
|
+
try {
|
|
1055
|
+
if (!existsSync2(path)) return { ...EMPTY2 };
|
|
1056
|
+
return normalize2(JSON.parse(readFileSync2(path, "utf8")));
|
|
1057
|
+
} catch {
|
|
1058
|
+
return { ...EMPTY2 };
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
async function readPluginRegistry(path = PLUGINS_FILE) {
|
|
1062
|
+
try {
|
|
1063
|
+
return normalize2(JSON.parse(await readFile2(path, "utf8")));
|
|
1064
|
+
} catch (err) {
|
|
1065
|
+
if (err.code === "ENOENT") return { ...EMPTY2 };
|
|
1066
|
+
return { ...EMPTY2 };
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
async function readForWrite(path) {
|
|
1070
|
+
let raw;
|
|
1071
|
+
try {
|
|
1072
|
+
raw = await readFile2(path, "utf8");
|
|
1073
|
+
} catch (err) {
|
|
1074
|
+
if (err.code === "ENOENT") return { ...EMPTY2 };
|
|
1075
|
+
throw err;
|
|
1076
|
+
}
|
|
1077
|
+
let parsed;
|
|
1078
|
+
try {
|
|
1079
|
+
parsed = JSON.parse(raw);
|
|
1080
|
+
} catch (err) {
|
|
1081
|
+
throw new Error(
|
|
1082
|
+
`refusing to modify a corrupt plugin registry at ${path} (${err.message}) \u2014 fix or delete the file and retry.`
|
|
1083
|
+
);
|
|
1084
|
+
}
|
|
1085
|
+
const p = parsed;
|
|
1086
|
+
if (!p || !isKnownVersion(p.version) || !Array.isArray(p.plugins)) {
|
|
1087
|
+
throw new Error(
|
|
1088
|
+
`refusing to modify an unrecognized plugin registry at ${path} \u2014 fix or delete the file and retry.`
|
|
1089
|
+
);
|
|
1090
|
+
}
|
|
1091
|
+
return p;
|
|
1092
|
+
}
|
|
1093
|
+
async function writeRegistry(file, path = PLUGINS_FILE) {
|
|
1094
|
+
await mkdir2(dirname4(path), { recursive: true });
|
|
1095
|
+
const tmp = `${path}.tmp.${String(process.pid)}.${String(Date.now())}`;
|
|
1096
|
+
const out = { ...file, version: PLUGINS_FILE_VERSION };
|
|
1097
|
+
await writeFile2(tmp, JSON.stringify(out, null, 2) + "\n", "utf8");
|
|
1098
|
+
await rename2(tmp, path);
|
|
1099
|
+
}
|
|
1100
|
+
async function recordPluginDescriptor(providerName, descriptor, path = PLUGINS_FILE) {
|
|
1101
|
+
await withFileLock(path, async () => {
|
|
1102
|
+
const file = await readForWrite(path);
|
|
1103
|
+
const rec = file.plugins.find((p) => p.providers.includes(providerName));
|
|
1104
|
+
if (!rec) return;
|
|
1105
|
+
rec.descriptors = { ...rec.descriptors, [providerName]: descriptor };
|
|
1106
|
+
await writeRegistry(file, path);
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
async function addPluginRecord(record, path = PLUGINS_FILE) {
|
|
1110
|
+
await withFileLock(path, async () => {
|
|
1111
|
+
const file = await readForWrite(path);
|
|
1112
|
+
const next = file.plugins.filter((p) => p.packageName !== record.packageName);
|
|
1113
|
+
next.push(record);
|
|
1114
|
+
await writeRegistry({ version: PLUGINS_FILE_VERSION, plugins: next }, path);
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
async function removePluginRecord(nameOrPackage, path = PLUGINS_FILE) {
|
|
1118
|
+
let removed = 0;
|
|
1119
|
+
await withFileLock(path, async () => {
|
|
1120
|
+
const file = await readForWrite(path);
|
|
1121
|
+
const next = file.plugins.filter((p) => {
|
|
1122
|
+
const match = p.packageName === nameOrPackage || p.providers.includes(nameOrPackage);
|
|
1123
|
+
if (match) removed += 1;
|
|
1124
|
+
return !match;
|
|
1125
|
+
});
|
|
1126
|
+
await writeRegistry({ version: PLUGINS_FILE_VERSION, plugins: next }, path);
|
|
1127
|
+
});
|
|
1128
|
+
return removed;
|
|
1129
|
+
}
|
|
1130
|
+
function pluginProviderNames(path = PLUGINS_FILE) {
|
|
1131
|
+
return readPluginRegistrySync(path).plugins.flatMap((p) => p.providers);
|
|
1132
|
+
}
|
|
1133
|
+
function pluginForProvider(providerName, path = PLUGINS_FILE) {
|
|
1134
|
+
return readPluginRegistrySync(path).plugins.find((p) => p.providers.includes(providerName)) ?? null;
|
|
1135
|
+
}
|
|
1136
|
+
function resolveProviderDescriptor(name, path = PLUGINS_FILE) {
|
|
1137
|
+
if (isProviderKind(name)) return providerMeta(name);
|
|
1138
|
+
return pluginForProvider(name, path)?.descriptors?.[name];
|
|
1139
|
+
}
|
|
1140
|
+
function listProviderDescriptors(path = PLUGINS_FILE) {
|
|
1141
|
+
const builtIns = [...PROVIDERS];
|
|
1142
|
+
const plugins = [];
|
|
1143
|
+
for (const rec of readPluginRegistrySync(path).plugins) {
|
|
1144
|
+
for (const providerName of rec.providers) {
|
|
1145
|
+
const d = rec.descriptors?.[providerName];
|
|
1146
|
+
plugins.push(d ?? placeholderDescriptor(providerName));
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
return [...builtIns, ...plugins];
|
|
1150
|
+
}
|
|
1151
|
+
var FALLBACK_CAPABILITIES = {
|
|
1152
|
+
// Cloud plugins are near-universally built on `createCloudProvider`, which
|
|
1153
|
+
// gives them a working `checkpoint`. `deriveDescriptor` refines this from the
|
|
1154
|
+
// real module when one is available.
|
|
1155
|
+
checkpoints: false,
|
|
1156
|
+
checkpointReboots: false,
|
|
1157
|
+
ssh: false,
|
|
1158
|
+
// Plugins were excluded from PERSISTENT_SSH_PROVIDERS / the direct-ssh list,
|
|
1159
|
+
// so false IS the status quo — a plugin opts in by declaring a descriptor.
|
|
1160
|
+
persistentSsh: false,
|
|
1161
|
+
directBoxSsh: false,
|
|
1162
|
+
inbound: false,
|
|
1163
|
+
directGit: false,
|
|
1164
|
+
resync: true,
|
|
1165
|
+
prune: false,
|
|
1166
|
+
// TRUE on purpose: `createCloudProvider` wires VNC unconditionally and
|
|
1167
|
+
// degrades best-effort, and `launchDockerd` defaults true. Defaulting these
|
|
1168
|
+
// false would remove a VNC button / DinD that works today.
|
|
1169
|
+
vnc: true,
|
|
1170
|
+
dind: true,
|
|
1171
|
+
// The pre-descriptor UI showed an unqualified Pause for every running box.
|
|
1172
|
+
pauseSemantics: "freeze",
|
|
1173
|
+
hubRoutable: true
|
|
1174
|
+
};
|
|
1175
|
+
function placeholderDescriptor(name) {
|
|
1176
|
+
return {
|
|
1177
|
+
name,
|
|
1178
|
+
kind: "cloud",
|
|
1179
|
+
label: name,
|
|
1180
|
+
loginHint: "",
|
|
1181
|
+
credentials: { envKeys: [], fields: [] },
|
|
1182
|
+
// NOT `true`: the hub's create gate deliberately skips the configured check
|
|
1183
|
+
// for plugins, so demanding a bake here would newly block creates that work.
|
|
1184
|
+
bake: { required: false, approxMinutes: "1" },
|
|
1185
|
+
capabilities: { ...FALLBACK_CAPABILITIES },
|
|
1186
|
+
blurb: `the ${name} provider`,
|
|
1187
|
+
sizeDesc: `Per-provider override of \`box.size\` for ${name}.`,
|
|
1188
|
+
imageDesc: `Per-provider override of \`box.image\` for ${name}.`
|
|
1189
|
+
};
|
|
1190
|
+
}
|
|
1191
|
+
function deriveDescriptor(name, mod) {
|
|
1192
|
+
const declared = mod.descriptor;
|
|
1193
|
+
if (declared) return declared;
|
|
1194
|
+
const base = placeholderDescriptor(name);
|
|
1195
|
+
const { provider, backend } = mod;
|
|
1196
|
+
return {
|
|
1197
|
+
...base,
|
|
1198
|
+
kind: backend ? "cloud" : "local",
|
|
1199
|
+
credentials: {
|
|
1200
|
+
envKeys: [],
|
|
1201
|
+
// Only offer a credential form when the module can actually consume one.
|
|
1202
|
+
fields: mod.setCredentials ? [{ key: "apiKey", label: "API key" }] : []
|
|
1203
|
+
},
|
|
1204
|
+
capabilities: {
|
|
1205
|
+
...base.capabilities,
|
|
1206
|
+
checkpoints: !!provider.checkpoint,
|
|
1207
|
+
ssh: !!provider.sshTarget,
|
|
1208
|
+
resync: !!provider.resyncWorkspace,
|
|
1209
|
+
prune: !!backend?.list,
|
|
1210
|
+
inbound: !!backend?.setInbound,
|
|
1211
|
+
...backend?.timeoutModel ? { timeoutModel: backend.timeoutModel } : {}
|
|
1212
|
+
}
|
|
1213
|
+
};
|
|
1214
|
+
}
|
|
1215
|
+
async function ensureProviderDescriptor(name, mod, path = PLUGINS_FILE) {
|
|
1216
|
+
const existing = resolveProviderDescriptor(name, path);
|
|
1217
|
+
if (existing) return existing;
|
|
1218
|
+
const derived = deriveDescriptor(name, mod);
|
|
1219
|
+
await recordPluginDescriptor(name, derived, path).catch(() => {
|
|
1220
|
+
});
|
|
1221
|
+
return derived;
|
|
1222
|
+
}
|
|
985
1223
|
async function resolveCloudSshTarget(box, provider, opts = {}) {
|
|
986
1224
|
if (!provider.buildAttach) {
|
|
987
1225
|
throw new Error(`cloud provider '${provider.name}' does not support SSH attach`);
|
|
@@ -1032,10 +1270,12 @@ async function ensureCloudSshAlias(box, provider, opts = {}) {
|
|
|
1032
1270
|
await syncAgentboxSshConfig();
|
|
1033
1271
|
return conn;
|
|
1034
1272
|
}
|
|
1035
|
-
|
|
1273
|
+
function hasDirectBoxSsh(name) {
|
|
1274
|
+
return resolveProviderDescriptor(name)?.capabilities.directBoxSsh ?? false;
|
|
1275
|
+
}
|
|
1036
1276
|
async function autoWriteSshConfig(box, provider, enabled, logWarn) {
|
|
1037
1277
|
if (!enabled) return;
|
|
1038
|
-
if (!provider.sshTarget && !
|
|
1278
|
+
if (!provider.sshTarget && !hasDirectBoxSsh(provider.name)) return;
|
|
1039
1279
|
try {
|
|
1040
1280
|
const conn = await resolveCloudSshTarget(box, provider, { bringOnline: false });
|
|
1041
1281
|
if (!conn.identityFile) return;
|
|
@@ -1055,22 +1295,22 @@ async function autoWriteSshConfig(box, provider, enabled, logWarn) {
|
|
|
1055
1295
|
}
|
|
1056
1296
|
async function mintSshKey(targetDir, comment) {
|
|
1057
1297
|
const dir = resolve3(targetDir);
|
|
1058
|
-
const priv =
|
|
1298
|
+
const priv = join6(dir, "id_ed25519");
|
|
1059
1299
|
const pub = `${priv}.pub`;
|
|
1060
|
-
await
|
|
1061
|
-
const existing = await
|
|
1300
|
+
await mkdir3(dir, { recursive: true, mode: 448 });
|
|
1301
|
+
const existing = await readFile3(pub, "utf8").catch(() => null);
|
|
1062
1302
|
if (existing !== null) {
|
|
1063
1303
|
return { dir, privatePath: priv, publicPath: pub, publicKey: existing.trim() };
|
|
1064
1304
|
}
|
|
1065
1305
|
await execa2("ssh-keygen", ["-t", "ed25519", "-N", "", "-C", comment, "-f", priv, "-q"], {
|
|
1066
1306
|
stdio: "pipe"
|
|
1067
1307
|
});
|
|
1068
|
-
const publicKey = (await
|
|
1308
|
+
const publicKey = (await readFile3(pub, "utf8")).trim();
|
|
1069
1309
|
return { dir, privatePath: priv, publicPath: pub, publicKey };
|
|
1070
1310
|
}
|
|
1071
1311
|
async function fileExists(path) {
|
|
1072
1312
|
try {
|
|
1073
|
-
return (await
|
|
1313
|
+
return (await stat4(path)).isFile();
|
|
1074
1314
|
} catch {
|
|
1075
1315
|
return false;
|
|
1076
1316
|
}
|
|
@@ -1101,7 +1341,7 @@ async function resolveSshConfigTarget(destination) {
|
|
|
1101
1341
|
const port = Number.parseInt(fields.get("port")?.[0]?.trim() ?? "", 10);
|
|
1102
1342
|
if (Number.isInteger(port) && port > 0 && port !== 22) out.port = port;
|
|
1103
1343
|
for (const raw of fields.get("identityfile") ?? []) {
|
|
1104
|
-
const path = raw.trim().replace(/^~(?=\/)/,
|
|
1344
|
+
const path = raw.trim().replace(/^~(?=\/)/, homedir5());
|
|
1105
1345
|
if (await fileExists(path)) {
|
|
1106
1346
|
out.identityFile = path;
|
|
1107
1347
|
break;
|
|
@@ -1214,7 +1454,7 @@ async function waitForSsh(target, deadlineMs, intervalMs = 5e3) {
|
|
|
1214
1454
|
var HOST = "127.0.0.1";
|
|
1215
1455
|
function controlSockPath(boxSshDir) {
|
|
1216
1456
|
const hash = createHash("sha1").update(boxSshDir).digest("hex").slice(0, 12);
|
|
1217
|
-
return resolve22(
|
|
1457
|
+
return resolve22(homedir6(), ".agentbox", "cm", `${hash}.sock`);
|
|
1218
1458
|
}
|
|
1219
1459
|
var SshTunnelManager = class {
|
|
1220
1460
|
/**
|
|
@@ -1233,10 +1473,10 @@ var SshTunnelManager = class {
|
|
|
1233
1473
|
*/
|
|
1234
1474
|
async open(opts) {
|
|
1235
1475
|
const boxSshDir = opts.boxSshDir ?? defaultBoxSshDir(opts.boxId, this.namespace);
|
|
1236
|
-
await
|
|
1476
|
+
await mkdir4(boxSshDir, { recursive: true, mode: 448 });
|
|
1237
1477
|
const controlPath = controlSockPath(boxSshDir);
|
|
1238
|
-
await
|
|
1239
|
-
const knownHosts =
|
|
1478
|
+
await mkdir4(join7(controlPath, ".."), { recursive: true, mode: 448 });
|
|
1479
|
+
const knownHosts = join7(boxSshDir, "known_hosts");
|
|
1240
1480
|
const tunnel = {
|
|
1241
1481
|
controlPath,
|
|
1242
1482
|
vpsHost: opts.vpsHost,
|
|
@@ -1246,12 +1486,12 @@ var SshTunnelManager = class {
|
|
|
1246
1486
|
boxSshDir,
|
|
1247
1487
|
forwards: /* @__PURE__ */ new Map()
|
|
1248
1488
|
};
|
|
1249
|
-
if (
|
|
1489
|
+
if (existsSync3(controlPath) && await this.isAlive(controlPath)) {
|
|
1250
1490
|
this.boxes.set(opts.boxId, tunnel);
|
|
1251
1491
|
return;
|
|
1252
1492
|
}
|
|
1253
|
-
if (
|
|
1254
|
-
await
|
|
1493
|
+
if (existsSync3(controlPath)) {
|
|
1494
|
+
await rm3(controlPath, { force: true });
|
|
1255
1495
|
}
|
|
1256
1496
|
const connectTimeout = opts.connectTimeoutSeconds ?? 10;
|
|
1257
1497
|
const argv = ["-fNT", "-M", "-S", controlPath];
|
|
@@ -1288,7 +1528,7 @@ var SshTunnelManager = class {
|
|
|
1288
1528
|
opts.vpsUser ? `${opts.vpsUser}@${opts.vpsHost}` : opts.vpsHost
|
|
1289
1529
|
);
|
|
1290
1530
|
const res = await execa5("ssh", argv, { reject: false });
|
|
1291
|
-
if (res.exitCode !== 0 || !
|
|
1531
|
+
if (res.exitCode !== 0 || !existsSync3(controlPath)) {
|
|
1292
1532
|
throw new Error(
|
|
1293
1533
|
`ssh ControlMaster failed for ${opts.boxId} (exit ${String(res.exitCode)}): ${res.stderr || res.stdout || "(no output)"}`
|
|
1294
1534
|
);
|
|
@@ -1347,14 +1587,14 @@ var SshTunnelManager = class {
|
|
|
1347
1587
|
const existing = this.boxes.get(opts.boxId);
|
|
1348
1588
|
if (existing) {
|
|
1349
1589
|
const alive = await this.isAlive(existing.controlPath);
|
|
1350
|
-
if (!alive &&
|
|
1590
|
+
if (!alive && existsSync3(existing.controlPath)) {
|
|
1351
1591
|
try {
|
|
1352
1592
|
await execa5("ssh", ["-O", "exit", "-S", existing.controlPath, "dummy"], {
|
|
1353
1593
|
reject: false
|
|
1354
1594
|
});
|
|
1355
1595
|
} catch {
|
|
1356
1596
|
}
|
|
1357
|
-
await
|
|
1597
|
+
await rm3(existing.controlPath, { force: true });
|
|
1358
1598
|
}
|
|
1359
1599
|
existing.forwards.clear();
|
|
1360
1600
|
}
|
|
@@ -1384,9 +1624,9 @@ var SshTunnelManager = class {
|
|
|
1384
1624
|
async close(boxId) {
|
|
1385
1625
|
const tunnel = this.boxes.get(boxId);
|
|
1386
1626
|
if (!tunnel) return;
|
|
1387
|
-
if (
|
|
1627
|
+
if (existsSync3(tunnel.controlPath)) {
|
|
1388
1628
|
await execa5("ssh", ["-O", "exit", "-S", tunnel.controlPath, "dummy"], { reject: false });
|
|
1389
|
-
await
|
|
1629
|
+
await rm3(tunnel.controlPath, { force: true });
|
|
1390
1630
|
}
|
|
1391
1631
|
this.boxes.delete(boxId);
|
|
1392
1632
|
}
|
|
@@ -1432,7 +1672,7 @@ var SshTunnelManager = class {
|
|
|
1432
1672
|
};
|
|
1433
1673
|
function defaultBoxSshDir(boxId, namespace) {
|
|
1434
1674
|
const safe = boxId.replace(/[^A-Za-z0-9._-]/g, "_");
|
|
1435
|
-
return namespace ? resolve22(
|
|
1675
|
+
return namespace ? resolve22(homedir6(), ".agentbox", namespace, "boxes", safe, "ssh") : resolve22(homedir6(), ".agentbox", "boxes", safe, "ssh");
|
|
1436
1676
|
}
|
|
1437
1677
|
function boxSshNamespaceForProvider(provider) {
|
|
1438
1678
|
switch (provider) {
|
|
@@ -1596,17 +1836,17 @@ function errSummary(err) {
|
|
|
1596
1836
|
return err instanceof Error ? firstLine(err.message) : String(err);
|
|
1597
1837
|
}
|
|
1598
1838
|
function secretsEnvPath() {
|
|
1599
|
-
return resolve32(
|
|
1839
|
+
return resolve32(homedir7(), ".agentbox", "secrets.env");
|
|
1600
1840
|
}
|
|
1601
1841
|
function writeManagedSecrets(managedKeys, record) {
|
|
1602
1842
|
for (const k of managedKeys) delete process.env[k];
|
|
1603
1843
|
for (const [k, v] of Object.entries(record)) process.env[k] = v;
|
|
1604
1844
|
const path = secretsEnvPath();
|
|
1605
|
-
mkdirSync2(
|
|
1845
|
+
mkdirSync2(dirname5(path), { recursive: true });
|
|
1606
1846
|
let existing = "";
|
|
1607
|
-
if (
|
|
1847
|
+
if (existsSync4(path)) {
|
|
1608
1848
|
try {
|
|
1609
|
-
existing =
|
|
1849
|
+
existing = readFileSync3(path, "utf8");
|
|
1610
1850
|
} catch {
|
|
1611
1851
|
existing = "";
|
|
1612
1852
|
}
|
|
@@ -1649,7 +1889,26 @@ async function publishManagedCredentials(providerId, fields) {
|
|
|
1649
1889
|
} catch {
|
|
1650
1890
|
}
|
|
1651
1891
|
}
|
|
1652
|
-
var
|
|
1892
|
+
var FALLBACK_RELAY_PORT = 8787;
|
|
1893
|
+
var RELAY_PORT_ENV = "AGENTBOX_RELAY_PORT";
|
|
1894
|
+
var override = null;
|
|
1895
|
+
function isValidRelayPort(port) {
|
|
1896
|
+
return Number.isInteger(port) && port >= 1 && port <= 65535;
|
|
1897
|
+
}
|
|
1898
|
+
function setRelayPort(port) {
|
|
1899
|
+
if (!isValidRelayPort(port)) return;
|
|
1900
|
+
override = port;
|
|
1901
|
+
process.env[RELAY_PORT_ENV] = String(port);
|
|
1902
|
+
}
|
|
1903
|
+
function relayPort() {
|
|
1904
|
+
if (override !== null) return override;
|
|
1905
|
+
const fromEnv = Number.parseInt(process.env[RELAY_PORT_ENV] ?? "", 10);
|
|
1906
|
+
return isValidRelayPort(fromEnv) ? fromEnv : FALLBACK_RELAY_PORT;
|
|
1907
|
+
}
|
|
1908
|
+
function resetRelayPort() {
|
|
1909
|
+
override = null;
|
|
1910
|
+
delete process.env[RELAY_PORT_ENV];
|
|
1911
|
+
}
|
|
1653
1912
|
function shouldReclaimForVersion(health, currentVersion) {
|
|
1654
1913
|
if (health.cliEntry === false) return true;
|
|
1655
1914
|
if (typeof health.version === "string" && health.version.length > 0 && typeof currentVersion === "string" && currentVersion.length > 0 && health.version !== currentVersion) {
|
|
@@ -1673,19 +1932,32 @@ async function killPid(pid) {
|
|
|
1673
1932
|
}
|
|
1674
1933
|
for (let i = 0; i < 20; i++) {
|
|
1675
1934
|
if (!await processAlive(pid)) return;
|
|
1676
|
-
await
|
|
1935
|
+
await delay3(100);
|
|
1677
1936
|
}
|
|
1678
1937
|
try {
|
|
1679
1938
|
process.kill(pid, "SIGKILL");
|
|
1680
1939
|
} catch {
|
|
1681
1940
|
}
|
|
1682
1941
|
}
|
|
1942
|
+
function portIsOccupied(timeoutMs, port = relayPort()) {
|
|
1943
|
+
return new Promise((resolveP) => {
|
|
1944
|
+
const sock = netConnect({ host: "127.0.0.1", port });
|
|
1945
|
+
const done = (occupied) => {
|
|
1946
|
+
sock.destroy();
|
|
1947
|
+
resolveP(occupied);
|
|
1948
|
+
};
|
|
1949
|
+
sock.setTimeout(timeoutMs);
|
|
1950
|
+
sock.once("connect", () => done(true));
|
|
1951
|
+
sock.once("timeout", () => done(false));
|
|
1952
|
+
sock.once("error", () => done(false));
|
|
1953
|
+
});
|
|
1954
|
+
}
|
|
1683
1955
|
function pingHealthz(timeoutMs) {
|
|
1684
1956
|
return new Promise((resolveP) => {
|
|
1685
1957
|
const req = httpRequest(
|
|
1686
1958
|
{
|
|
1687
1959
|
host: "127.0.0.1",
|
|
1688
|
-
port:
|
|
1960
|
+
port: relayPort(),
|
|
1689
1961
|
method: "GET",
|
|
1690
1962
|
path: "/healthz",
|
|
1691
1963
|
timeout: timeoutMs
|
|
@@ -1709,7 +1981,7 @@ function fetchHealthz(timeoutMs) {
|
|
|
1709
1981
|
const req = httpRequest(
|
|
1710
1982
|
{
|
|
1711
1983
|
host: "127.0.0.1",
|
|
1712
|
-
port:
|
|
1984
|
+
port: relayPort(),
|
|
1713
1985
|
method: "GET",
|
|
1714
1986
|
path: "/healthz",
|
|
1715
1987
|
timeout: timeoutMs
|
|
@@ -1760,30 +2032,30 @@ function fetchHealthz(timeoutMs) {
|
|
|
1760
2032
|
});
|
|
1761
2033
|
}
|
|
1762
2034
|
function resolveCliEntry() {
|
|
1763
|
-
const
|
|
1764
|
-
if (
|
|
1765
|
-
const here =
|
|
2035
|
+
const override2 = process.env.AGENTBOX_CLI_ENTRY;
|
|
2036
|
+
if (override2 && existsSync5(override2)) return override2;
|
|
2037
|
+
const here = dirname6(fileURLToPath(import.meta.url));
|
|
1766
2038
|
const candidates = [
|
|
1767
2039
|
resolve4(here, "index.js"),
|
|
1768
2040
|
resolve4(here, "..", "..", "..", "apps", "cli", "dist", "index.js"),
|
|
1769
2041
|
resolve4(here, "..", "..", "..", "..", "dist", "index.js")
|
|
1770
2042
|
];
|
|
1771
2043
|
for (const c of candidates) {
|
|
1772
|
-
if (
|
|
2044
|
+
if (existsSync5(c)) return c;
|
|
1773
2045
|
}
|
|
1774
2046
|
return null;
|
|
1775
2047
|
}
|
|
1776
2048
|
var RUNTIME_ROOT_ENV = "AGENTBOX_RUNTIME_ROOT";
|
|
1777
2049
|
function stagedRuntimeRootCandidates(self) {
|
|
1778
2050
|
const candidates = [];
|
|
1779
|
-
const
|
|
1780
|
-
if (
|
|
2051
|
+
const override2 = process.env[RUNTIME_ROOT_ENV];
|
|
2052
|
+
if (override2) candidates.push(override2);
|
|
1781
2053
|
candidates.push(resolve5(self, "..", "runtime"), resolve5(self, "..", "..", "runtime"));
|
|
1782
2054
|
return candidates;
|
|
1783
2055
|
}
|
|
1784
2056
|
function resolveStagedRuntimeRoot(self, marker) {
|
|
1785
2057
|
for (const candidate of stagedRuntimeRootCandidates(self)) {
|
|
1786
|
-
if (
|
|
2058
|
+
if (existsSync6(resolve5(candidate, marker))) return candidate;
|
|
1787
2059
|
}
|
|
1788
2060
|
return void 0;
|
|
1789
2061
|
}
|
|
@@ -1821,22 +2093,22 @@ function setHubDockerContext(dir) {
|
|
|
1821
2093
|
function hubDockerContext() {
|
|
1822
2094
|
return dockerContext;
|
|
1823
2095
|
}
|
|
1824
|
-
var STATE_DIR2 =
|
|
1825
|
-
var HUB_PID_FILE =
|
|
1826
|
-
var
|
|
1827
|
-
var
|
|
1828
|
-
var
|
|
2096
|
+
var STATE_DIR2 = join8(homedir8(), ".agentbox");
|
|
2097
|
+
var HUB_PID_FILE = join8(STATE_DIR2, "hub.pid");
|
|
2098
|
+
var RELAY_PID_FILE = join8(STATE_DIR2, "relay.pid");
|
|
2099
|
+
var HUB_LOG_FILE = join8(STATE_DIR2, "hub.log");
|
|
2100
|
+
var HUB_TOKEN_FILE = join8(STATE_DIR2, "hub", "token");
|
|
1829
2101
|
var HOST2 = "0.0.0.0";
|
|
1830
2102
|
var LOOPBACK_HOST = "127.0.0.1";
|
|
1831
2103
|
var NODE_MIN = { major: 22, minor: 5 };
|
|
1832
|
-
var CP_DIR =
|
|
2104
|
+
var CP_DIR = join8(STATE_DIR2, "control-plane");
|
|
1833
2105
|
async function resolveExposedSpawn() {
|
|
1834
2106
|
try {
|
|
1835
2107
|
const record = JSON.parse(
|
|
1836
|
-
await
|
|
2108
|
+
await readFile4(controlPlaneDeployPath(), "utf8")
|
|
1837
2109
|
);
|
|
1838
2110
|
if (record.provider !== "local") return null;
|
|
1839
|
-
const envBody = await
|
|
2111
|
+
const envBody = await readFile4(join8(CP_DIR, "control-plane.env"), "utf8").catch(() => "");
|
|
1840
2112
|
const env = buildExposedHubEnv(record, parseEnvFileBody(envBody));
|
|
1841
2113
|
return { env, profile: EXPOSED_HUB_PROFILE };
|
|
1842
2114
|
} catch {
|
|
@@ -1861,7 +2133,7 @@ function nodeFlags() {
|
|
|
1861
2133
|
}
|
|
1862
2134
|
async function readPid(file) {
|
|
1863
2135
|
try {
|
|
1864
|
-
const pid = Number.parseInt((await
|
|
2136
|
+
const pid = Number.parseInt((await readFile4(file, "utf8")).trim(), 10);
|
|
1865
2137
|
return Number.isFinite(pid) && pid > 0 ? pid : null;
|
|
1866
2138
|
} catch {
|
|
1867
2139
|
return null;
|
|
@@ -1869,7 +2141,7 @@ async function readPid(file) {
|
|
|
1869
2141
|
}
|
|
1870
2142
|
async function readToken() {
|
|
1871
2143
|
try {
|
|
1872
|
-
const t = (await
|
|
2144
|
+
const t = (await readFile4(HUB_TOKEN_FILE, "utf8")).trim();
|
|
1873
2145
|
return t.length > 0 ? t : null;
|
|
1874
2146
|
} catch {
|
|
1875
2147
|
return null;
|
|
@@ -1880,25 +2152,25 @@ function readHubToken() {
|
|
|
1880
2152
|
}
|
|
1881
2153
|
async function endpointFor(portlessUrl) {
|
|
1882
2154
|
const token = await readToken();
|
|
1883
|
-
const hostUrl = portlessUrl ?? `http://${LOOPBACK_HOST}:${String(
|
|
2155
|
+
const hostUrl = portlessUrl ?? `http://${LOOPBACK_HOST}:${String(relayPort())}`;
|
|
1884
2156
|
return {
|
|
1885
2157
|
hostUrl,
|
|
1886
2158
|
openUrl: token ? `${hostUrl}/?token=${token}` : hostUrl,
|
|
1887
|
-
port:
|
|
2159
|
+
port: relayPort(),
|
|
1888
2160
|
token
|
|
1889
2161
|
};
|
|
1890
2162
|
}
|
|
1891
2163
|
function resolveHubServer() {
|
|
1892
|
-
const
|
|
1893
|
-
if (
|
|
1894
|
-
const here =
|
|
2164
|
+
const override2 = process.env.AGENTBOX_HUB_BIN;
|
|
2165
|
+
if (override2 && existsSync7(override2)) return override2;
|
|
2166
|
+
const here = dirname7(fileURLToPath2(import.meta.url));
|
|
1895
2167
|
const candidates = [
|
|
1896
2168
|
resolve6(here, "..", "runtime", "hub", "apps", "hub", "server.js"),
|
|
1897
2169
|
resolve6(here, "..", "..", "..", "apps", "hub", "dist-standalone", "apps", "hub", "server.js"),
|
|
1898
2170
|
resolve6(here, "..", "..", "apps", "hub", "dist-standalone", "apps", "hub", "server.js")
|
|
1899
2171
|
];
|
|
1900
2172
|
for (const c of candidates) {
|
|
1901
|
-
if (
|
|
2173
|
+
if (existsSync7(c)) return c;
|
|
1902
2174
|
}
|
|
1903
2175
|
throw new Error(
|
|
1904
2176
|
`could not locate the built hub server; run \`pnpm --filter @agentbox/hub build:standalone\` (dev), or set AGENTBOX_HUB_BIN. Tried:
|
|
@@ -1909,7 +2181,7 @@ function hubRuntimeEnv(opts = {}) {
|
|
|
1909
2181
|
const env = {};
|
|
1910
2182
|
const dockerContext2 = opts.dockerContext ?? hubDockerContext();
|
|
1911
2183
|
if (dockerContext2) env.AGENTBOX_DOCKER_CONTEXT = dockerContext2;
|
|
1912
|
-
const runtimeRoot = opts.runtimeRoot ?? resolveStagedRuntimeRoot(
|
|
2184
|
+
const runtimeRoot = opts.runtimeRoot ?? resolveStagedRuntimeRoot(dirname7(fileURLToPath2(import.meta.url)), "docker/Dockerfile.box");
|
|
1913
2185
|
if (runtimeRoot) env[RUNTIME_ROOT_ENV] = runtimeRoot;
|
|
1914
2186
|
return env;
|
|
1915
2187
|
}
|
|
@@ -1920,14 +2192,16 @@ async function reclaimPort(reportedPid, log) {
|
|
|
1920
2192
|
if (typeof pid !== "number" || pid <= 0 || seen.has(pid)) continue;
|
|
1921
2193
|
seen.add(pid);
|
|
1922
2194
|
if (!await processAlive(pid)) continue;
|
|
1923
|
-
log(`stopping process on :${String(
|
|
2195
|
+
log(`stopping process on :${String(relayPort())} (pid ${String(pid)})`);
|
|
1924
2196
|
await killPid(pid);
|
|
1925
2197
|
}
|
|
1926
2198
|
await unlink(HUB_PID_FILE).catch(() => {
|
|
1927
2199
|
});
|
|
2200
|
+
await unlink(RELAY_PID_FILE).catch(() => {
|
|
2201
|
+
});
|
|
1928
2202
|
if (await pingHealthz(300)) {
|
|
1929
2203
|
throw new Error(
|
|
1930
|
-
`something is still listening on :${String(
|
|
2204
|
+
`something is still listening on :${String(relayPort())} and could not be stopped (reported pid ${String(reportedPid ?? "unknown")}); kill it manually and retry`
|
|
1931
2205
|
);
|
|
1932
2206
|
}
|
|
1933
2207
|
}
|
|
@@ -1935,19 +2209,26 @@ async function ensureHub(opts = {}) {
|
|
|
1935
2209
|
const log = opts.onLog ?? (() => {
|
|
1936
2210
|
});
|
|
1937
2211
|
assertNodeSupported();
|
|
1938
|
-
await
|
|
2212
|
+
await mkdir5(STATE_DIR2, { recursive: true });
|
|
1939
2213
|
const exposed = await resolveExposedSpawn();
|
|
1940
2214
|
const desiredProfile = exposed?.profile ?? "localhost";
|
|
2215
|
+
const exposedPort = Number.parseInt(exposed?.env["AGENTBOX_HUB_PORT"] ?? "", 10);
|
|
2216
|
+
if (isValidRelayPort(exposedPort) && exposedPort !== relayPort()) {
|
|
2217
|
+
log(
|
|
2218
|
+
`this machine's hub is exposed on :${String(exposedPort)}, so relay.port (${String(relayPort())}) does not apply here \u2014 re-run \`agentbox hub expose --port\` to move it`
|
|
2219
|
+
);
|
|
2220
|
+
setRelayPort(exposedPort);
|
|
2221
|
+
}
|
|
1941
2222
|
const currentVersion = process.env.AGENTBOX_CLI_VERSION;
|
|
1942
2223
|
const reusable = (h) => h.ui === true && !shouldReclaimForVersion(h, currentVersion) && (h.profile ?? "localhost") === desiredProfile;
|
|
1943
2224
|
const health = await fetchHealthz(500);
|
|
1944
2225
|
if (health !== null) {
|
|
1945
2226
|
const profileMismatch = (health.profile ?? "localhost") !== desiredProfile;
|
|
1946
2227
|
if (reusable(health)) {
|
|
1947
|
-
return endpointFor(await hubPortlessSync(opts.portlessEnabled,
|
|
2228
|
+
return endpointFor(await hubPortlessSync(opts.portlessEnabled, relayPort()));
|
|
1948
2229
|
}
|
|
1949
2230
|
log(
|
|
1950
|
-
profileMismatch ? `a hub in the ${health.profile ?? "localhost"} profile holds :${String(
|
|
2231
|
+
profileMismatch ? `a hub in the ${health.profile ?? "localhost"} profile holds :${String(relayPort())} \u2014 reclaiming to run ${desiredProfile}` : health.ui === true ? "a hub from a different agentbox version holds :8787 \u2014 reclaiming" : "a lean relay holds :8787 \u2014 reclaiming to start the hub"
|
|
1951
2232
|
);
|
|
1952
2233
|
await reclaimPort(health.pid, log);
|
|
1953
2234
|
} else {
|
|
@@ -1957,14 +2238,14 @@ async function ensureHub(opts = {}) {
|
|
|
1957
2238
|
for (let i = 0; i < 10; i++) {
|
|
1958
2239
|
late = await fetchHealthz(300);
|
|
1959
2240
|
if (late !== null) break;
|
|
1960
|
-
await
|
|
2241
|
+
await delay4(200);
|
|
1961
2242
|
}
|
|
1962
2243
|
if (late !== null && reusable(late)) {
|
|
1963
|
-
return endpointFor(await hubPortlessSync(opts.portlessEnabled,
|
|
2244
|
+
return endpointFor(await hubPortlessSync(opts.portlessEnabled, relayPort()));
|
|
1964
2245
|
}
|
|
1965
2246
|
if (late !== null) {
|
|
1966
2247
|
log(
|
|
1967
|
-
`a hub in the ${late.profile ?? "localhost"} profile holds :${String(
|
|
2248
|
+
`a hub in the ${late.profile ?? "localhost"} profile holds :${String(relayPort())} \u2014 reclaiming to run ${desiredProfile}`
|
|
1968
2249
|
);
|
|
1969
2250
|
}
|
|
1970
2251
|
log(`hub pid ${String(pid)} alive but /healthz unresponsive \u2014 restarting it`);
|
|
@@ -2000,6 +2281,10 @@ async function spawnHub(hubServer, cliEntry, log, portlessEnabled, exposedEnv) {
|
|
|
2000
2281
|
// so docker boxes reach its embedded relay via host.docker.internal; the
|
|
2001
2282
|
// profile is set independently of the bind host in server.ts.
|
|
2002
2283
|
AGENTBOX_HUB_HOST: HOST2,
|
|
2284
|
+
// Load-bearing for `relay.port`: server.ts defaults to 8787 on its own, so
|
|
2285
|
+
// without this the hub keeps binding 8787 while everything here probes the
|
|
2286
|
+
// configured port.
|
|
2287
|
+
AGENTBOX_HUB_PORT: String(relayPort()),
|
|
2003
2288
|
// The hub bundle ships no staged build context of its own, so its
|
|
2004
2289
|
// in-process freshness checks couldn't fingerprint (degrading to
|
|
2005
2290
|
// 'unknown'). Hand it the CLI's resolved roots so hub-side fingerprints
|
|
@@ -2016,29 +2301,29 @@ async function spawnHub(hubServer, cliEntry, log, portlessEnabled, exposedEnv) {
|
|
|
2016
2301
|
exit = { code, signal };
|
|
2017
2302
|
});
|
|
2018
2303
|
if (typeof child.pid === "number") {
|
|
2019
|
-
await
|
|
2020
|
-
log(`spawned hub process (pid ${String(child.pid)}, port ${String(
|
|
2304
|
+
await writeFile3(HUB_PID_FILE, String(child.pid), "utf8");
|
|
2305
|
+
log(`spawned hub process (pid ${String(child.pid)}, port ${String(relayPort())})`);
|
|
2021
2306
|
}
|
|
2022
2307
|
for (let i = 0; i < 50; i++) {
|
|
2023
2308
|
if (await pingHealthz(300)) {
|
|
2024
|
-
log(`hub reachable on http://${LOOPBACK_HOST}:${String(
|
|
2025
|
-
const purl = await hubPortlessSync(portlessEnabled,
|
|
2309
|
+
log(`hub reachable on http://${LOOPBACK_HOST}:${String(relayPort())}`);
|
|
2310
|
+
const purl = await hubPortlessSync(portlessEnabled, relayPort());
|
|
2026
2311
|
if (purl) log(`hub also reachable on ${purl}`);
|
|
2027
2312
|
return endpointFor(purl);
|
|
2028
2313
|
}
|
|
2029
2314
|
if (exit !== null) {
|
|
2030
2315
|
await unlink(HUB_PID_FILE).catch(() => {
|
|
2031
2316
|
});
|
|
2032
|
-
await
|
|
2317
|
+
await delay4(150);
|
|
2033
2318
|
throw new Error(
|
|
2034
2319
|
await hubStartupError(`hub process exited (${describeExit(exit)}) during startup`)
|
|
2035
2320
|
);
|
|
2036
2321
|
}
|
|
2037
|
-
await
|
|
2322
|
+
await delay4(200);
|
|
2038
2323
|
}
|
|
2039
2324
|
throw new Error(
|
|
2040
2325
|
await hubStartupError(
|
|
2041
|
-
`hub did not become reachable on http://${LOOPBACK_HOST}:${String(
|
|
2326
|
+
`hub did not become reachable on http://${LOOPBACK_HOST}:${String(relayPort())} within ~25s`
|
|
2042
2327
|
)
|
|
2043
2328
|
);
|
|
2044
2329
|
}
|
|
@@ -2055,7 +2340,7 @@ ${tail}` : `; see ${HUB_LOG_FILE}`;
|
|
|
2055
2340
|
}
|
|
2056
2341
|
async function tailFile(file, maxLines) {
|
|
2057
2342
|
try {
|
|
2058
|
-
const lines = (await
|
|
2343
|
+
const lines = (await readFile4(file, "utf8")).split("\n").filter((l) => l.trim().length > 0);
|
|
2059
2344
|
return lines.slice(-maxLines).join("\n");
|
|
2060
2345
|
} catch {
|
|
2061
2346
|
return "";
|
|
@@ -2089,16 +2374,29 @@ async function getHubStatus() {
|
|
|
2089
2374
|
ui: health?.ui === true,
|
|
2090
2375
|
pid,
|
|
2091
2376
|
pidAlive,
|
|
2092
|
-
port:
|
|
2377
|
+
port: relayPort(),
|
|
2093
2378
|
hostUrl: ep.hostUrl,
|
|
2094
2379
|
openUrl: ep.openUrl,
|
|
2095
2380
|
token: ep.token,
|
|
2096
2381
|
pidFile: HUB_PID_FILE,
|
|
2097
2382
|
logFile: HUB_LOG_FILE,
|
|
2098
2383
|
...health?.profile ? { profile: health.profile } : {},
|
|
2099
|
-
...health?.worker ? { worker: true } : {}
|
|
2384
|
+
...health?.worker ? { worker: true } : {},
|
|
2385
|
+
...await bundleIsNewerThanHub(pid) ? { staleBundle: true } : {}
|
|
2100
2386
|
};
|
|
2101
2387
|
}
|
|
2388
|
+
async function bundleIsNewerThanHub(pid) {
|
|
2389
|
+
if (pid === null) return false;
|
|
2390
|
+
try {
|
|
2391
|
+
const [startedAt, builtAt] = await Promise.all([
|
|
2392
|
+
stat5(HUB_PID_FILE).then((st) => st.mtimeMs),
|
|
2393
|
+
stat5(resolveHubServer()).then((st) => st.mtimeMs)
|
|
2394
|
+
]);
|
|
2395
|
+
return builtAt > startedAt;
|
|
2396
|
+
} catch {
|
|
2397
|
+
return false;
|
|
2398
|
+
}
|
|
2399
|
+
}
|
|
2102
2400
|
var activeRefresher;
|
|
2103
2401
|
function setDockerCredentialRefresh(fn) {
|
|
2104
2402
|
activeRefresher = fn;
|
|
@@ -2110,129 +2408,6 @@ async function runDockerCredentialRefresh(opts) {
|
|
|
2110
2408
|
} catch {
|
|
2111
2409
|
}
|
|
2112
2410
|
}
|
|
2113
|
-
var PLUGINS_FILE = join8(homedir8(), ".agentbox", "plugins.json");
|
|
2114
|
-
var SUPPORTED_SDK_API_VERSIONS = [1, 2];
|
|
2115
|
-
function isSupportedApiVersion(v) {
|
|
2116
|
-
return SUPPORTED_SDK_API_VERSIONS.includes(v);
|
|
2117
|
-
}
|
|
2118
|
-
var EMPTY2 = { version: 1, plugins: [] };
|
|
2119
|
-
var LOCK_STALE_MS2 = 15e3;
|
|
2120
|
-
var LOCK_ACQUIRE_TIMEOUT_MS2 = 2e4;
|
|
2121
|
-
var LOCK_RETRY_MS2 = 25;
|
|
2122
|
-
async function withFileLock(path, fn) {
|
|
2123
|
-
const lockPath = `${path}.lock`;
|
|
2124
|
-
await mkdir5(dirname7(path), { recursive: true });
|
|
2125
|
-
const deadline = Date.now() + LOCK_ACQUIRE_TIMEOUT_MS2;
|
|
2126
|
-
let held = false;
|
|
2127
|
-
while (!held) {
|
|
2128
|
-
try {
|
|
2129
|
-
const fh = await open2(lockPath, "wx");
|
|
2130
|
-
await fh.writeFile(`${String(process.pid)}
|
|
2131
|
-
`);
|
|
2132
|
-
await fh.close();
|
|
2133
|
-
held = true;
|
|
2134
|
-
} catch (err) {
|
|
2135
|
-
if (err.code !== "EEXIST") throw err;
|
|
2136
|
-
try {
|
|
2137
|
-
const st = await stat4(lockPath);
|
|
2138
|
-
if (Date.now() - st.mtimeMs > LOCK_STALE_MS2) {
|
|
2139
|
-
await rm3(lockPath, { force: true });
|
|
2140
|
-
continue;
|
|
2141
|
-
}
|
|
2142
|
-
} catch {
|
|
2143
|
-
continue;
|
|
2144
|
-
}
|
|
2145
|
-
if (Date.now() >= deadline) break;
|
|
2146
|
-
await delay4(LOCK_RETRY_MS2);
|
|
2147
|
-
}
|
|
2148
|
-
}
|
|
2149
|
-
try {
|
|
2150
|
-
return await fn();
|
|
2151
|
-
} finally {
|
|
2152
|
-
if (held) await rm3(lockPath, { force: true }).catch(() => {
|
|
2153
|
-
});
|
|
2154
|
-
}
|
|
2155
|
-
}
|
|
2156
|
-
function normalize2(raw) {
|
|
2157
|
-
const parsed = raw;
|
|
2158
|
-
if (!parsed || parsed.version !== 1 || !Array.isArray(parsed.plugins)) {
|
|
2159
|
-
return { ...EMPTY2 };
|
|
2160
|
-
}
|
|
2161
|
-
return parsed;
|
|
2162
|
-
}
|
|
2163
|
-
function readPluginRegistrySync(path = PLUGINS_FILE) {
|
|
2164
|
-
try {
|
|
2165
|
-
if (!existsSync7(path)) return { ...EMPTY2 };
|
|
2166
|
-
return normalize2(JSON.parse(readFileSync3(path, "utf8")));
|
|
2167
|
-
} catch {
|
|
2168
|
-
return { ...EMPTY2 };
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
async function readPluginRegistry(path = PLUGINS_FILE) {
|
|
2172
|
-
try {
|
|
2173
|
-
return normalize2(JSON.parse(await readFile4(path, "utf8")));
|
|
2174
|
-
} catch (err) {
|
|
2175
|
-
if (err.code === "ENOENT") return { ...EMPTY2 };
|
|
2176
|
-
return { ...EMPTY2 };
|
|
2177
|
-
}
|
|
2178
|
-
}
|
|
2179
|
-
async function readForWrite(path) {
|
|
2180
|
-
let raw;
|
|
2181
|
-
try {
|
|
2182
|
-
raw = await readFile4(path, "utf8");
|
|
2183
|
-
} catch (err) {
|
|
2184
|
-
if (err.code === "ENOENT") return { ...EMPTY2 };
|
|
2185
|
-
throw err;
|
|
2186
|
-
}
|
|
2187
|
-
let parsed;
|
|
2188
|
-
try {
|
|
2189
|
-
parsed = JSON.parse(raw);
|
|
2190
|
-
} catch (err) {
|
|
2191
|
-
throw new Error(
|
|
2192
|
-
`refusing to modify a corrupt plugin registry at ${path} (${err.message}) \u2014 fix or delete the file and retry.`
|
|
2193
|
-
);
|
|
2194
|
-
}
|
|
2195
|
-
const p = parsed;
|
|
2196
|
-
if (!p || p.version !== 1 || !Array.isArray(p.plugins)) {
|
|
2197
|
-
throw new Error(
|
|
2198
|
-
`refusing to modify an unrecognized plugin registry at ${path} \u2014 fix or delete the file and retry.`
|
|
2199
|
-
);
|
|
2200
|
-
}
|
|
2201
|
-
return p;
|
|
2202
|
-
}
|
|
2203
|
-
async function writeRegistry(file, path = PLUGINS_FILE) {
|
|
2204
|
-
await mkdir5(dirname7(path), { recursive: true });
|
|
2205
|
-
const tmp = `${path}.tmp.${String(process.pid)}.${String(Date.now())}`;
|
|
2206
|
-
await writeFile3(tmp, JSON.stringify(file, null, 2) + "\n", "utf8");
|
|
2207
|
-
await rename2(tmp, path);
|
|
2208
|
-
}
|
|
2209
|
-
async function addPluginRecord(record, path = PLUGINS_FILE) {
|
|
2210
|
-
await withFileLock(path, async () => {
|
|
2211
|
-
const file = await readForWrite(path);
|
|
2212
|
-
const next = file.plugins.filter((p) => p.packageName !== record.packageName);
|
|
2213
|
-
next.push(record);
|
|
2214
|
-
await writeRegistry({ version: 1, plugins: next }, path);
|
|
2215
|
-
});
|
|
2216
|
-
}
|
|
2217
|
-
async function removePluginRecord(nameOrPackage, path = PLUGINS_FILE) {
|
|
2218
|
-
let removed = 0;
|
|
2219
|
-
await withFileLock(path, async () => {
|
|
2220
|
-
const file = await readForWrite(path);
|
|
2221
|
-
const next = file.plugins.filter((p) => {
|
|
2222
|
-
const match = p.packageName === nameOrPackage || p.providers.includes(nameOrPackage);
|
|
2223
|
-
if (match) removed += 1;
|
|
2224
|
-
return !match;
|
|
2225
|
-
});
|
|
2226
|
-
await writeRegistry({ version: 1, plugins: next }, path);
|
|
2227
|
-
});
|
|
2228
|
-
return removed;
|
|
2229
|
-
}
|
|
2230
|
-
function pluginProviderNames(path = PLUGINS_FILE) {
|
|
2231
|
-
return readPluginRegistrySync(path).plugins.flatMap((p) => p.providers);
|
|
2232
|
-
}
|
|
2233
|
-
function pluginForProvider(providerName, path = PLUGINS_FILE) {
|
|
2234
|
-
return readPluginRegistrySync(path).plugins.find((p) => p.providers.includes(providerName)) ?? null;
|
|
2235
|
-
}
|
|
2236
2411
|
function carryPlaceholderContext(ctx) {
|
|
2237
2412
|
const out = {};
|
|
2238
2413
|
if (ctx.name) out.AGENTBOX_BOX_NAME = ctx.name;
|
|
@@ -2804,7 +2979,7 @@ function parseFlatInventory(stdout) {
|
|
|
2804
2979
|
}
|
|
2805
2980
|
async function pathExists(path) {
|
|
2806
2981
|
try {
|
|
2807
|
-
await
|
|
2982
|
+
await stat6(path);
|
|
2808
2983
|
return true;
|
|
2809
2984
|
} catch {
|
|
2810
2985
|
return false;
|
|
@@ -3175,7 +3350,7 @@ function planCarryEntry(entry) {
|
|
|
3175
3350
|
}
|
|
3176
3351
|
async function pathExists2(p) {
|
|
3177
3352
|
try {
|
|
3178
|
-
await
|
|
3353
|
+
await stat7(p);
|
|
3179
3354
|
return true;
|
|
3180
3355
|
} catch {
|
|
3181
3356
|
return false;
|
|
@@ -3244,7 +3419,7 @@ async function findUnsyncableSymlinks(root, reachableRoots) {
|
|
|
3244
3419
|
unsyncable.push(virtualFull);
|
|
3245
3420
|
continue;
|
|
3246
3421
|
}
|
|
3247
|
-
const st = await
|
|
3422
|
+
const st = await stat8(real).catch(() => null);
|
|
3248
3423
|
if (st?.isDirectory()) await walk(real, virtualFull);
|
|
3249
3424
|
} else if (ent.isDirectory()) {
|
|
3250
3425
|
await walk(realFull, virtualFull);
|
|
@@ -3259,7 +3434,7 @@ async function findUnsyncableSymlinks(root, reachableRoots) {
|
|
|
3259
3434
|
}
|
|
3260
3435
|
async function pathExists3(p) {
|
|
3261
3436
|
try {
|
|
3262
|
-
await
|
|
3437
|
+
await stat9(p);
|
|
3263
3438
|
return true;
|
|
3264
3439
|
} catch {
|
|
3265
3440
|
return false;
|
|
@@ -3307,7 +3482,7 @@ function isRealAgentCredential(agent, text) {
|
|
|
3307
3482
|
}
|
|
3308
3483
|
return Object.keys(parsed).length > 0;
|
|
3309
3484
|
}
|
|
3310
|
-
async function
|
|
3485
|
+
async function hostClaudeAccessTokenExpired(path = CLAUDE_HOST_BACKUP, now = Date.now()) {
|
|
3311
3486
|
try {
|
|
3312
3487
|
const parsed = JSON.parse(await readFile7(path, "utf8"));
|
|
3313
3488
|
const exp = parsed?.claudeAiOauth?.expiresAt;
|
|
@@ -3316,6 +3491,17 @@ async function hostClaudeBackupExpired(path = CLAUDE_HOST_BACKUP, now = Date.now
|
|
|
3316
3491
|
return false;
|
|
3317
3492
|
}
|
|
3318
3493
|
}
|
|
3494
|
+
async function hostClaudeLoginDead(path = CLAUDE_HOST_BACKUP, now = Date.now()) {
|
|
3495
|
+
let text;
|
|
3496
|
+
try {
|
|
3497
|
+
text = await readFile7(path, "utf8");
|
|
3498
|
+
} catch {
|
|
3499
|
+
return false;
|
|
3500
|
+
}
|
|
3501
|
+
if (!isRealAgentCredential("claude", text)) return true;
|
|
3502
|
+
const exp = claudeRefreshExpiresAt(text);
|
|
3503
|
+
return exp !== null && exp < now;
|
|
3504
|
+
}
|
|
3319
3505
|
async function hostBackupHasCredentials(path = CLAUDE_HOST_BACKUP) {
|
|
3320
3506
|
try {
|
|
3321
3507
|
const parsed = JSON.parse(await readFile7(path, "utf8"));
|
|
@@ -3374,6 +3560,15 @@ function claudeExpiresAt(text) {
|
|
|
3374
3560
|
return null;
|
|
3375
3561
|
}
|
|
3376
3562
|
}
|
|
3563
|
+
function claudeRefreshExpiresAt(text) {
|
|
3564
|
+
try {
|
|
3565
|
+
const parsed = JSON.parse(text);
|
|
3566
|
+
const exp = parsed?.claudeAiOauth?.refreshTokenExpiresAt;
|
|
3567
|
+
return typeof exp === "number" && Number.isFinite(exp) ? exp : null;
|
|
3568
|
+
} catch {
|
|
3569
|
+
return null;
|
|
3570
|
+
}
|
|
3571
|
+
}
|
|
3377
3572
|
function shouldAcceptCredentialUpdate(agent, incoming, existing) {
|
|
3378
3573
|
if (existing === null) return { accept: true, reason: "no existing backup" };
|
|
3379
3574
|
if (existing === incoming) return { accept: false, reason: "unchanged" };
|
|
@@ -3595,7 +3790,7 @@ var BOX_DYNAMIC_SYNC_MANIFEST = "/home/vscode/.agentbox/dynamic-sync.json";
|
|
|
3595
3790
|
var BOX_MEMORY_DIR = `${BOX_CLAUDE_PROJECT_DIR}/memory`;
|
|
3596
3791
|
async function pathExists4(p) {
|
|
3597
3792
|
try {
|
|
3598
|
-
await
|
|
3793
|
+
await stat10(p);
|
|
3599
3794
|
return true;
|
|
3600
3795
|
} catch {
|
|
3601
3796
|
return false;
|
|
@@ -3618,7 +3813,7 @@ async function walkFiles(root, prefix = "") {
|
|
|
3618
3813
|
out.push(rel);
|
|
3619
3814
|
} else if (ent.isSymbolicLink()) {
|
|
3620
3815
|
try {
|
|
3621
|
-
const s = await
|
|
3816
|
+
const s = await stat10(full);
|
|
3622
3817
|
if (s.isFile()) out.push(rel);
|
|
3623
3818
|
} catch {
|
|
3624
3819
|
}
|
|
@@ -3914,7 +4109,7 @@ var CREDENTIALS_BACKUP_FILE = resolveAgentSpec("claude").credential.hostBackup;
|
|
|
3914
4109
|
var CLOUD_WORKSPACE = "/workspace";
|
|
3915
4110
|
async function pathExists5(p) {
|
|
3916
4111
|
try {
|
|
3917
|
-
await
|
|
4112
|
+
await stat11(p);
|
|
3918
4113
|
return true;
|
|
3919
4114
|
} catch {
|
|
3920
4115
|
return false;
|
|
@@ -3933,7 +4128,7 @@ async function findBrokenSymlinks(root) {
|
|
|
3933
4128
|
const full = join19(dir, ent.name);
|
|
3934
4129
|
if (ent.isSymbolicLink()) {
|
|
3935
4130
|
try {
|
|
3936
|
-
await
|
|
4131
|
+
await stat11(full);
|
|
3937
4132
|
} catch {
|
|
3938
4133
|
broken.push(relative2(root, full));
|
|
3939
4134
|
}
|
|
@@ -4422,13 +4617,9 @@ var DOCKER_CONTEXT_FILE_MAP = {
|
|
|
4422
4617
|
staged: "packages/sandbox-docker/scripts/git-shim",
|
|
4423
4618
|
dev: "scripts/git-shim"
|
|
4424
4619
|
},
|
|
4425
|
-
"scripts/
|
|
4426
|
-
staged: "packages/sandbox-docker/scripts/
|
|
4427
|
-
dev: "scripts/
|
|
4428
|
-
},
|
|
4429
|
-
"scripts/linear-shim": {
|
|
4430
|
-
staged: "packages/sandbox-docker/scripts/linear-shim",
|
|
4431
|
-
dev: "scripts/linear-shim"
|
|
4620
|
+
"scripts/agentbox-tool-shim": {
|
|
4621
|
+
staged: "packages/sandbox-docker/scripts/agentbox-tool-shim",
|
|
4622
|
+
dev: "scripts/agentbox-tool-shim"
|
|
4432
4623
|
},
|
|
4433
4624
|
"scripts/chromium-resolver": {
|
|
4434
4625
|
staged: "packages/sandbox-docker/scripts/chromium-resolver",
|
|
@@ -4512,6 +4703,8 @@ function boxNameBasisFromOriginUrl(originUrl) {
|
|
|
4512
4703
|
|
|
4513
4704
|
export {
|
|
4514
4705
|
resolveAgentLauncher,
|
|
4706
|
+
claudeTuiEnv,
|
|
4707
|
+
buildNoVncUrl,
|
|
4515
4708
|
ReplaceError,
|
|
4516
4709
|
parseReplaceRules,
|
|
4517
4710
|
parseReplacements,
|
|
@@ -4577,6 +4770,21 @@ export {
|
|
|
4577
4770
|
EXPOSED_HUB_PROFILE,
|
|
4578
4771
|
parseEnvFileBody,
|
|
4579
4772
|
buildExposedHubEnv,
|
|
4773
|
+
PLUGINS_FILE,
|
|
4774
|
+
SUPPORTED_SDK_API_VERSIONS,
|
|
4775
|
+
isSupportedApiVersion,
|
|
4776
|
+
PLUGINS_FILE_VERSION,
|
|
4777
|
+
readPluginRegistrySync,
|
|
4778
|
+
readPluginRegistry,
|
|
4779
|
+
recordPluginDescriptor,
|
|
4780
|
+
addPluginRecord,
|
|
4781
|
+
removePluginRecord,
|
|
4782
|
+
pluginProviderNames,
|
|
4783
|
+
pluginForProvider,
|
|
4784
|
+
resolveProviderDescriptor,
|
|
4785
|
+
listProviderDescriptors,
|
|
4786
|
+
deriveDescriptor,
|
|
4787
|
+
ensureProviderDescriptor,
|
|
4580
4788
|
resolveCloudSshTarget,
|
|
4581
4789
|
ensureCloudSshAlias,
|
|
4582
4790
|
autoWriteSshConfig,
|
|
@@ -4621,10 +4829,16 @@ export {
|
|
|
4621
4829
|
maskSecret,
|
|
4622
4830
|
setCredentialPublisher,
|
|
4623
4831
|
publishManagedCredentials,
|
|
4624
|
-
|
|
4832
|
+
FALLBACK_RELAY_PORT,
|
|
4833
|
+
RELAY_PORT_ENV,
|
|
4834
|
+
isValidRelayPort,
|
|
4835
|
+
setRelayPort,
|
|
4836
|
+
relayPort,
|
|
4837
|
+
resetRelayPort,
|
|
4625
4838
|
shouldReclaimForVersion,
|
|
4626
4839
|
processAlive,
|
|
4627
4840
|
killPid,
|
|
4841
|
+
portIsOccupied,
|
|
4628
4842
|
pingHealthz,
|
|
4629
4843
|
fetchHealthz,
|
|
4630
4844
|
resolveCliEntry,
|
|
@@ -4642,15 +4856,6 @@ export {
|
|
|
4642
4856
|
getHubStatus,
|
|
4643
4857
|
setDockerCredentialRefresh,
|
|
4644
4858
|
runDockerCredentialRefresh,
|
|
4645
|
-
PLUGINS_FILE,
|
|
4646
|
-
SUPPORTED_SDK_API_VERSIONS,
|
|
4647
|
-
isSupportedApiVersion,
|
|
4648
|
-
readPluginRegistrySync,
|
|
4649
|
-
readPluginRegistry,
|
|
4650
|
-
addPluginRecord,
|
|
4651
|
-
removePluginRecord,
|
|
4652
|
-
pluginProviderNames,
|
|
4653
|
-
pluginForProvider,
|
|
4654
4859
|
carryPlaceholderContext,
|
|
4655
4860
|
renderCarryEntries,
|
|
4656
4861
|
makeRecordingTransport,
|
|
@@ -4707,11 +4912,13 @@ export {
|
|
|
4707
4912
|
seedAgentsVolume,
|
|
4708
4913
|
SEED_MARKER,
|
|
4709
4914
|
isRealAgentCredential,
|
|
4710
|
-
|
|
4915
|
+
hostClaudeAccessTokenExpired,
|
|
4916
|
+
hostClaudeLoginDead,
|
|
4711
4917
|
hostBackupHasCredentials,
|
|
4712
4918
|
extractCredentials,
|
|
4713
4919
|
parseCredentialsUpdate,
|
|
4714
4920
|
claudeExpiresAt,
|
|
4921
|
+
claudeRefreshExpiresAt,
|
|
4715
4922
|
shouldAcceptCredentialUpdate,
|
|
4716
4923
|
writeCredentialBackup,
|
|
4717
4924
|
readCredentialBackup,
|
|
@@ -4767,4 +4974,4 @@ export {
|
|
|
4767
4974
|
deriveRepoLabel,
|
|
4768
4975
|
boxNameBasisFromOriginUrl
|
|
4769
4976
|
};
|
|
4770
|
-
//# sourceMappingURL=chunk-
|
|
4977
|
+
//# sourceMappingURL=chunk-OKLEPEWZ.js.map
|