@madarco/agentbox 0.28.1 → 0.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +146 -0
- package/dist/_cloud-attach-EUO2OL7W.js +30 -0
- package/dist/chunk-2JHPGPLE.js +71 -0
- package/dist/chunk-2JHPGPLE.js.map +1 -0
- package/dist/{chunk-JQLOGVZK.js → chunk-4KYP775X.js} +85 -21
- package/dist/chunk-4KYP775X.js.map +1 -0
- package/dist/{chunk-V5NWSLWD.js → chunk-4NUETVTR.js} +14 -14
- package/dist/{chunk-OXKW4GWD.js → chunk-53OTEDBS.js} +4 -70
- package/dist/chunk-53OTEDBS.js.map +1 -0
- package/dist/{chunk-FGQFVUMH.js → chunk-6YSYQZRH.js} +3 -3
- package/dist/{chunk-KFLGXE3R.js → chunk-73D2HKA3.js} +138 -24
- package/dist/chunk-73D2HKA3.js.map +1 -0
- package/dist/{chunk-HYXCH4GA.js → chunk-7LC5IG5K.js} +7 -7
- package/dist/{chunk-NHVGKFVY.js → chunk-7LNXTPEE.js} +340 -22
- package/dist/chunk-7LNXTPEE.js.map +1 -0
- package/dist/{chunk-74VIUGY6.js → chunk-A2TATHHJ.js} +6 -9
- package/dist/chunk-A2TATHHJ.js.map +1 -0
- package/dist/{chunk-YI4GHC2E.js → chunk-AC3HU25W.js} +12 -15
- package/dist/chunk-AC3HU25W.js.map +1 -0
- package/dist/{chunk-7ABO7OIF.js → chunk-AUHYXXCA.js} +4 -4
- package/dist/{chunk-FPMRFMVK.js → chunk-B4YFG5TB.js} +9 -9
- package/dist/{chunk-OUF3YTQO.js → chunk-BIKWXLX7.js} +14 -17
- package/dist/chunk-BIKWXLX7.js.map +1 -0
- package/dist/{chunk-CKD3PRON.js → chunk-CZPVVFCF.js} +12 -9
- package/dist/{chunk-CKD3PRON.js.map → chunk-CZPVVFCF.js.map} +1 -1
- package/dist/chunk-F4PPZ4SI.js +17 -0
- package/dist/chunk-F4PPZ4SI.js.map +1 -0
- package/dist/{chunk-BWM56FKY.js → chunk-FEFLAITR.js} +11 -11
- package/dist/{chunk-EVT2SNF2.js → chunk-FELVUIIM.js} +3 -3
- package/dist/{chunk-46NNZMZT.js → chunk-I2DEYQLZ.js} +372 -72
- package/dist/chunk-I2DEYQLZ.js.map +1 -0
- package/dist/{chunk-OUWVN2F2.js → chunk-I7BSBUPC.js} +16 -13
- package/dist/chunk-I7BSBUPC.js.map +1 -0
- package/dist/{chunk-G3H2L3O2.js → chunk-MNDKP4VS.js} +23 -3
- package/dist/chunk-MNDKP4VS.js.map +1 -0
- package/dist/{chunk-BUMKBUXS.js → chunk-PAWAGULH.js} +3 -3
- package/dist/{chunk-4PR3KJ5X.js → chunk-PFEBKXFD.js} +20 -20
- package/dist/{chunk-JDSYMTMS.js → chunk-QDU7YDME.js} +130 -66
- package/dist/chunk-QDU7YDME.js.map +1 -0
- package/dist/{chunk-JNC7MCWJ.js → chunk-S32GHLVU.js} +10 -10
- package/dist/chunk-S32GHLVU.js.map +1 -0
- package/dist/{chunk-WB6S4W7O.js → chunk-THKVKVRF.js} +2413 -1012
- package/dist/chunk-THKVKVRF.js.map +1 -0
- package/dist/{chunk-7RSE7ESY.js → chunk-UEEW5TW7.js} +27 -18
- package/dist/chunk-UEEW5TW7.js.map +1 -0
- package/dist/{chunk-B4DAH2F2.js → chunk-UTOC2NHC.js} +3 -3
- package/dist/{chunk-NHTRTST5.js → chunk-WDBDFLH3.js} +38 -15
- package/dist/chunk-WDBDFLH3.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-WJUKN4L4.js} +7 -6
- package/dist/chunk-WJUKN4L4.js.map +1 -0
- package/dist/{chunk-GFOWBXV7.js → chunk-XENTK32L.js} +463 -253
- package/dist/chunk-XENTK32L.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-YQFX2ILX.js} +19 -18
- package/dist/cp-hub-upload-RMJ3XJ65.js +81 -0
- package/dist/cp-hub-upload-RMJ3XJ65.js.map +1 -0
- package/dist/{custody-client-PNCC2HBJ.js → custody-client-L4FEFW4C.js} +5 -4
- package/dist/{deploy-hetzner-SSGSXAKA.js → deploy-hetzner-EECQ4JCM.js} +10 -10
- package/dist/{dist-RN6JOAG4.js → dist-3BKIPZR3.js} +81 -45
- package/dist/{dist-K5M4HKG7.js → dist-C5B6NGBO.js} +21 -9
- package/dist/{dist-6PYXFREL.js → dist-E5EXDZG4.js} +61 -16
- package/dist/dist-E5EXDZG4.js.map +1 -0
- package/dist/{dist-XATN4ZIR.js → dist-FBM2WS5S.js} +22 -4
- package/dist/{dist-XQLKK7H3.js → dist-NFF2KEMB.js} +54 -28
- package/dist/dist-NFF2KEMB.js.map +1 -0
- package/dist/{dist-5OR4QTQW.js → dist-NTUHJOK3.js} +9 -9
- package/dist/{dist-ZNQZHTUN.js → dist-PTYASENV.js} +35 -6
- package/dist/{dist-POILUDVJ.js → dist-Q4UDCSZQ.js} +9 -9
- package/dist/{dist-M4O5MU5K.js → dist-TXFTYNNE.js} +8 -8
- package/dist/{dist-EPFS5PRI.js → dist-XUOHE22G.js} +10 -10
- package/dist/{dist-SN2TCRZ5.js → dist-Z2TPC3EN.js} +9 -9
- package/dist/host-reach-drainer-N4JSFUBY.js +9 -0
- package/dist/hub-3HPYOV5O.js +37 -0
- package/dist/{hub-adopt-I44VGSBL.js → hub-adopt-NCCCMMXL.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-ZKAWXVPH.js} +16 -16
- package/dist/index.js +1321 -882
- package/dist/index.js.map +1 -1
- package/dist/prepare-KIVDQRMN.js +41 -0
- package/dist/prepared-custody-EFSOOAIQ.js +36 -0
- package/dist/{prepared-state-PV3GUBHO-MF56HWMZ.js → prepared-state-LNQ7DYSU-2YFSDOCV.js} +4 -3
- package/dist/{publish-credentials-BPHUO5VL.js → publish-credentials-F2A5OVCO.js} +11 -11
- package/dist/registry-O3X2CDDU.js +18 -0
- package/dist/relay-3T57T4RI.js +20 -0
- package/dist/relay-3T57T4RI.js.map +1 -0
- package/dist/{remote-docker-share-RX5ARK45.js → remote-docker-share-QDCBM5UM.js} +11 -11
- package/dist/remote-docker-share-QDCBM5UM.js.map +1 -0
- package/dist/tool-grant-push-6ISDIJKH.js +90 -0
- package/dist/tool-grant-push-6ISDIJKH.js.map +1 -0
- package/package.json +1 -2
- package/runtime/_shared/agentbox-tool-shim +21 -0
- package/runtime/_shared/ctl.cjs +6760 -5299
- package/runtime/_shared/gh-shim +103 -228
- package/runtime/digitalocean/agentbox-tool-shim +21 -0
- package/runtime/digitalocean/ctl.cjs +6760 -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 +6760 -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 +6760 -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 +6760 -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-QU3FFGJY.js → chunk-2WB3A5IN.js} +11 -14
- package/runtime/hub/apps/hub/{chunk-LPYK2354.js → chunk-5ABFGGPT.js} +339 -21
- package/runtime/hub/apps/hub/{chunk-VKOCY6SX.js → chunk-BI4MPGQT.js} +49 -14
- package/runtime/hub/apps/hub/{chunk-UMPTTQBE.js → chunk-G6FJR7TN.js} +461 -251
- package/runtime/hub/apps/hub/{chunk-KTVETF3F.js → chunk-QGAP34GN.js} +11 -8
- package/runtime/hub/apps/hub/{chunk-5TM7XXLT.js → chunk-QWSP6WJ2.js} +2833 -1277
- package/runtime/hub/apps/hub/{chunk-EZUK53CC.js → chunk-RPPOFMPA.js} +85 -21
- package/runtime/hub/apps/hub/{chunk-3LAHFDJF.js → chunk-VWQNSZGI.js} +22 -2
- 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-JVEDVVVG.js → dist-4F6XEJHK.js} +7 -7
- package/runtime/hub/apps/hub/{dist-2YP57GMB.js → dist-A3JOKKYG.js} +13 -13
- package/runtime/hub/apps/hub/{dist-D265LCAN.js → dist-CGH7PEMZ.js} +21 -3
- package/runtime/hub/apps/hub/{dist-SYWTB6RD.js → dist-F547YSBE.js} +15 -18
- package/runtime/hub/apps/hub/{dist-YK5FFPXZ.js → dist-FEHV4PC7.js} +62 -20
- package/runtime/hub/apps/hub/{dist-NKCXH5DW.js → dist-P7NT6VLK.js} +6 -6
- package/runtime/hub/apps/hub/{dist-E2FTSTCY.js → dist-W2YXTEQN.js} +34 -5
- package/runtime/hub/apps/hub/{dist-ELZHBQEM.js → dist-W5SGEJLA.js} +11 -11
- package/runtime/hub/apps/hub/{dist-N3E5YAYY.js → dist-YB3Y2XDK.js} +53 -26
- package/runtime/hub/apps/hub/{dist-5HTJSOHS.js → dist-ZTJMZLED.js} +19 -7
- 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-I5QBLSRU.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-4I7FNNNS.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 +16626 -14688
- package/runtime/vercel/agentbox-tool-shim +21 -0
- package/runtime/vercel/ctl.cjs +6760 -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-EUO2OL7W.js.map} +0 -0
- /package/dist/{chunk-V5NWSLWD.js.map → chunk-4NUETVTR.js.map} +0 -0
- /package/dist/{chunk-FGQFVUMH.js.map → chunk-6YSYQZRH.js.map} +0 -0
- /package/dist/{chunk-HYXCH4GA.js.map → chunk-7LC5IG5K.js.map} +0 -0
- /package/dist/{chunk-7ABO7OIF.js.map → chunk-AUHYXXCA.js.map} +0 -0
- /package/dist/{chunk-FPMRFMVK.js.map → chunk-B4YFG5TB.js.map} +0 -0
- /package/dist/{chunk-BWM56FKY.js.map → chunk-FEFLAITR.js.map} +0 -0
- /package/dist/{chunk-EVT2SNF2.js.map → chunk-FELVUIIM.js.map} +0 -0
- /package/dist/{chunk-BUMKBUXS.js.map → chunk-PAWAGULH.js.map} +0 -0
- /package/dist/{chunk-4PR3KJ5X.js.map → chunk-PFEBKXFD.js.map} +0 -0
- /package/dist/{chunk-B4DAH2F2.js.map → chunk-UTOC2NHC.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-YQFX2ILX.js.map} +0 -0
- /package/dist/{custody-client-PNCC2HBJ.js.map → custody-client-L4FEFW4C.js.map} +0 -0
- /package/dist/{deploy-hetzner-SSGSXAKA.js.map → deploy-hetzner-EECQ4JCM.js.map} +0 -0
- /package/dist/{dist-5OR4QTQW.js.map → dist-3BKIPZR3.js.map} +0 -0
- /package/dist/{dist-EPFS5PRI.js.map → dist-C5B6NGBO.js.map} +0 -0
- /package/dist/{dist-K5M4HKG7.js.map → dist-FBM2WS5S.js.map} +0 -0
- /package/dist/{dist-M4O5MU5K.js.map → dist-NTUHJOK3.js.map} +0 -0
- /package/dist/{dist-POILUDVJ.js.map → dist-PTYASENV.js.map} +0 -0
- /package/dist/{dist-RN6JOAG4.js.map → dist-Q4UDCSZQ.js.map} +0 -0
- /package/dist/{dist-SN2TCRZ5.js.map → dist-TXFTYNNE.js.map} +0 -0
- /package/dist/{dist-XATN4ZIR.js.map → dist-XUOHE22G.js.map} +0 -0
- /package/dist/{dist-ZNQZHTUN.js.map → dist-Z2TPC3EN.js.map} +0 -0
- /package/dist/{hub-MJ7O4WXW.js.map → host-reach-drainer-N4JSFUBY.js.map} +0 -0
- /package/dist/{hub-adopt-I44VGSBL.js.map → hub-3HPYOV5O.js.map} +0 -0
- /package/dist/{hub-api-client-WJPBXZAZ.js.map → hub-adopt-NCCCMMXL.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-ZKAWXVPH.js.map} +0 -0
- /package/dist/{prepared-custody-QIXW7MJM.js.map → prepare-KIVDQRMN.js.map} +0 -0
- /package/dist/{prepared-state-PV3GUBHO-MF56HWMZ.js.map → prepared-custody-EFSOOAIQ.js.map} +0 -0
- /package/dist/{relay-DRDELF6B.js.map → prepared-state-LNQ7DYSU-2YFSDOCV.js.map} +0 -0
- /package/dist/{publish-credentials-BPHUO5VL.js.map → publish-credentials-F2A5OVCO.js.map} +0 -0
- /package/dist/{remote-docker-share-RX5ARK45.js.map → registry-O3X2CDDU.js.map} +0 -0
- /package/runtime/hub/apps/hub/.next/static/{z7_2bKU93xE7GwllL1Duv → nDHi_1342DzyGDC14ocQo}/_buildManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{z7_2bKU93xE7GwllL1Duv → nDHi_1342DzyGDC14ocQo}/_clientMiddlewareManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{z7_2bKU93xE7GwllL1Duv → nDHi_1342DzyGDC14ocQo}/_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,233 @@ 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 placeholderLabel(name) {
|
|
1176
|
+
return name.charAt(0).toUpperCase() + name.slice(1);
|
|
1177
|
+
}
|
|
1178
|
+
function placeholderDescriptor(name) {
|
|
1179
|
+
return {
|
|
1180
|
+
name,
|
|
1181
|
+
kind: "cloud",
|
|
1182
|
+
label: placeholderLabel(name),
|
|
1183
|
+
loginHint: "",
|
|
1184
|
+
credentials: { envKeys: [], fields: [] },
|
|
1185
|
+
// NOT `true`: the hub's create gate deliberately skips the configured check
|
|
1186
|
+
// for plugins, so demanding a bake here would newly block creates that work.
|
|
1187
|
+
bake: { required: false, approxMinutes: "1" },
|
|
1188
|
+
capabilities: { ...FALLBACK_CAPABILITIES },
|
|
1189
|
+
blurb: `the ${name} provider`,
|
|
1190
|
+
sizeDesc: `Per-provider override of \`box.size\` for ${name}.`,
|
|
1191
|
+
imageDesc: `Per-provider override of \`box.image\` for ${name}.`
|
|
1192
|
+
};
|
|
1193
|
+
}
|
|
1194
|
+
function deriveDescriptor(name, mod) {
|
|
1195
|
+
const declared = mod.descriptor;
|
|
1196
|
+
if (declared) return declared;
|
|
1197
|
+
const base = placeholderDescriptor(name);
|
|
1198
|
+
const { provider, backend } = mod;
|
|
1199
|
+
return {
|
|
1200
|
+
...base,
|
|
1201
|
+
kind: backend ? "cloud" : "local",
|
|
1202
|
+
credentials: {
|
|
1203
|
+
envKeys: [],
|
|
1204
|
+
// Only offer a credential form when the module can actually consume one.
|
|
1205
|
+
fields: mod.setCredentials ? [{ key: "apiKey", label: "API key" }] : []
|
|
1206
|
+
},
|
|
1207
|
+
capabilities: {
|
|
1208
|
+
...base.capabilities,
|
|
1209
|
+
checkpoints: !!provider.checkpoint,
|
|
1210
|
+
ssh: !!provider.sshTarget,
|
|
1211
|
+
resync: !!provider.resyncWorkspace,
|
|
1212
|
+
prune: !!backend?.list,
|
|
1213
|
+
inbound: !!backend?.setInbound,
|
|
1214
|
+
...backend?.timeoutModel ? { timeoutModel: backend.timeoutModel } : {}
|
|
1215
|
+
}
|
|
1216
|
+
};
|
|
1217
|
+
}
|
|
1218
|
+
async function ensureProviderDescriptor(name, mod, path = PLUGINS_FILE) {
|
|
1219
|
+
const existing = resolveProviderDescriptor(name, path);
|
|
1220
|
+
if (existing) return existing;
|
|
1221
|
+
const derived = deriveDescriptor(name, mod);
|
|
1222
|
+
await recordPluginDescriptor(name, derived, path).catch(() => {
|
|
1223
|
+
});
|
|
1224
|
+
return derived;
|
|
1225
|
+
}
|
|
985
1226
|
async function resolveCloudSshTarget(box, provider, opts = {}) {
|
|
986
1227
|
if (!provider.buildAttach) {
|
|
987
1228
|
throw new Error(`cloud provider '${provider.name}' does not support SSH attach`);
|
|
@@ -1032,10 +1273,12 @@ async function ensureCloudSshAlias(box, provider, opts = {}) {
|
|
|
1032
1273
|
await syncAgentboxSshConfig();
|
|
1033
1274
|
return conn;
|
|
1034
1275
|
}
|
|
1035
|
-
|
|
1276
|
+
function hasDirectBoxSsh(name) {
|
|
1277
|
+
return resolveProviderDescriptor(name)?.capabilities.directBoxSsh ?? false;
|
|
1278
|
+
}
|
|
1036
1279
|
async function autoWriteSshConfig(box, provider, enabled, logWarn) {
|
|
1037
1280
|
if (!enabled) return;
|
|
1038
|
-
if (!provider.sshTarget && !
|
|
1281
|
+
if (!provider.sshTarget && !hasDirectBoxSsh(provider.name)) return;
|
|
1039
1282
|
try {
|
|
1040
1283
|
const conn = await resolveCloudSshTarget(box, provider, { bringOnline: false });
|
|
1041
1284
|
if (!conn.identityFile) return;
|
|
@@ -1055,22 +1298,22 @@ async function autoWriteSshConfig(box, provider, enabled, logWarn) {
|
|
|
1055
1298
|
}
|
|
1056
1299
|
async function mintSshKey(targetDir, comment) {
|
|
1057
1300
|
const dir = resolve3(targetDir);
|
|
1058
|
-
const priv =
|
|
1301
|
+
const priv = join6(dir, "id_ed25519");
|
|
1059
1302
|
const pub = `${priv}.pub`;
|
|
1060
|
-
await
|
|
1061
|
-
const existing = await
|
|
1303
|
+
await mkdir3(dir, { recursive: true, mode: 448 });
|
|
1304
|
+
const existing = await readFile3(pub, "utf8").catch(() => null);
|
|
1062
1305
|
if (existing !== null) {
|
|
1063
1306
|
return { dir, privatePath: priv, publicPath: pub, publicKey: existing.trim() };
|
|
1064
1307
|
}
|
|
1065
1308
|
await execa2("ssh-keygen", ["-t", "ed25519", "-N", "", "-C", comment, "-f", priv, "-q"], {
|
|
1066
1309
|
stdio: "pipe"
|
|
1067
1310
|
});
|
|
1068
|
-
const publicKey = (await
|
|
1311
|
+
const publicKey = (await readFile3(pub, "utf8")).trim();
|
|
1069
1312
|
return { dir, privatePath: priv, publicPath: pub, publicKey };
|
|
1070
1313
|
}
|
|
1071
1314
|
async function fileExists(path) {
|
|
1072
1315
|
try {
|
|
1073
|
-
return (await
|
|
1316
|
+
return (await stat4(path)).isFile();
|
|
1074
1317
|
} catch {
|
|
1075
1318
|
return false;
|
|
1076
1319
|
}
|
|
@@ -1101,7 +1344,7 @@ async function resolveSshConfigTarget(destination) {
|
|
|
1101
1344
|
const port = Number.parseInt(fields.get("port")?.[0]?.trim() ?? "", 10);
|
|
1102
1345
|
if (Number.isInteger(port) && port > 0 && port !== 22) out.port = port;
|
|
1103
1346
|
for (const raw of fields.get("identityfile") ?? []) {
|
|
1104
|
-
const path = raw.trim().replace(/^~(?=\/)/,
|
|
1347
|
+
const path = raw.trim().replace(/^~(?=\/)/, homedir5());
|
|
1105
1348
|
if (await fileExists(path)) {
|
|
1106
1349
|
out.identityFile = path;
|
|
1107
1350
|
break;
|
|
@@ -1214,7 +1457,7 @@ async function waitForSsh(target, deadlineMs, intervalMs = 5e3) {
|
|
|
1214
1457
|
var HOST = "127.0.0.1";
|
|
1215
1458
|
function controlSockPath(boxSshDir) {
|
|
1216
1459
|
const hash = createHash("sha1").update(boxSshDir).digest("hex").slice(0, 12);
|
|
1217
|
-
return resolve22(
|
|
1460
|
+
return resolve22(homedir6(), ".agentbox", "cm", `${hash}.sock`);
|
|
1218
1461
|
}
|
|
1219
1462
|
var SshTunnelManager = class {
|
|
1220
1463
|
/**
|
|
@@ -1233,10 +1476,10 @@ var SshTunnelManager = class {
|
|
|
1233
1476
|
*/
|
|
1234
1477
|
async open(opts) {
|
|
1235
1478
|
const boxSshDir = opts.boxSshDir ?? defaultBoxSshDir(opts.boxId, this.namespace);
|
|
1236
|
-
await
|
|
1479
|
+
await mkdir4(boxSshDir, { recursive: true, mode: 448 });
|
|
1237
1480
|
const controlPath = controlSockPath(boxSshDir);
|
|
1238
|
-
await
|
|
1239
|
-
const knownHosts =
|
|
1481
|
+
await mkdir4(join7(controlPath, ".."), { recursive: true, mode: 448 });
|
|
1482
|
+
const knownHosts = join7(boxSshDir, "known_hosts");
|
|
1240
1483
|
const tunnel = {
|
|
1241
1484
|
controlPath,
|
|
1242
1485
|
vpsHost: opts.vpsHost,
|
|
@@ -1246,12 +1489,12 @@ var SshTunnelManager = class {
|
|
|
1246
1489
|
boxSshDir,
|
|
1247
1490
|
forwards: /* @__PURE__ */ new Map()
|
|
1248
1491
|
};
|
|
1249
|
-
if (
|
|
1492
|
+
if (existsSync3(controlPath) && await this.isAlive(controlPath)) {
|
|
1250
1493
|
this.boxes.set(opts.boxId, tunnel);
|
|
1251
1494
|
return;
|
|
1252
1495
|
}
|
|
1253
|
-
if (
|
|
1254
|
-
await
|
|
1496
|
+
if (existsSync3(controlPath)) {
|
|
1497
|
+
await rm3(controlPath, { force: true });
|
|
1255
1498
|
}
|
|
1256
1499
|
const connectTimeout = opts.connectTimeoutSeconds ?? 10;
|
|
1257
1500
|
const argv = ["-fNT", "-M", "-S", controlPath];
|
|
@@ -1288,7 +1531,7 @@ var SshTunnelManager = class {
|
|
|
1288
1531
|
opts.vpsUser ? `${opts.vpsUser}@${opts.vpsHost}` : opts.vpsHost
|
|
1289
1532
|
);
|
|
1290
1533
|
const res = await execa5("ssh", argv, { reject: false });
|
|
1291
|
-
if (res.exitCode !== 0 || !
|
|
1534
|
+
if (res.exitCode !== 0 || !existsSync3(controlPath)) {
|
|
1292
1535
|
throw new Error(
|
|
1293
1536
|
`ssh ControlMaster failed for ${opts.boxId} (exit ${String(res.exitCode)}): ${res.stderr || res.stdout || "(no output)"}`
|
|
1294
1537
|
);
|
|
@@ -1347,14 +1590,14 @@ var SshTunnelManager = class {
|
|
|
1347
1590
|
const existing = this.boxes.get(opts.boxId);
|
|
1348
1591
|
if (existing) {
|
|
1349
1592
|
const alive = await this.isAlive(existing.controlPath);
|
|
1350
|
-
if (!alive &&
|
|
1593
|
+
if (!alive && existsSync3(existing.controlPath)) {
|
|
1351
1594
|
try {
|
|
1352
1595
|
await execa5("ssh", ["-O", "exit", "-S", existing.controlPath, "dummy"], {
|
|
1353
1596
|
reject: false
|
|
1354
1597
|
});
|
|
1355
1598
|
} catch {
|
|
1356
1599
|
}
|
|
1357
|
-
await
|
|
1600
|
+
await rm3(existing.controlPath, { force: true });
|
|
1358
1601
|
}
|
|
1359
1602
|
existing.forwards.clear();
|
|
1360
1603
|
}
|
|
@@ -1384,9 +1627,9 @@ var SshTunnelManager = class {
|
|
|
1384
1627
|
async close(boxId) {
|
|
1385
1628
|
const tunnel = this.boxes.get(boxId);
|
|
1386
1629
|
if (!tunnel) return;
|
|
1387
|
-
if (
|
|
1630
|
+
if (existsSync3(tunnel.controlPath)) {
|
|
1388
1631
|
await execa5("ssh", ["-O", "exit", "-S", tunnel.controlPath, "dummy"], { reject: false });
|
|
1389
|
-
await
|
|
1632
|
+
await rm3(tunnel.controlPath, { force: true });
|
|
1390
1633
|
}
|
|
1391
1634
|
this.boxes.delete(boxId);
|
|
1392
1635
|
}
|
|
@@ -1432,7 +1675,7 @@ var SshTunnelManager = class {
|
|
|
1432
1675
|
};
|
|
1433
1676
|
function defaultBoxSshDir(boxId, namespace) {
|
|
1434
1677
|
const safe = boxId.replace(/[^A-Za-z0-9._-]/g, "_");
|
|
1435
|
-
return namespace ? resolve22(
|
|
1678
|
+
return namespace ? resolve22(homedir6(), ".agentbox", namespace, "boxes", safe, "ssh") : resolve22(homedir6(), ".agentbox", "boxes", safe, "ssh");
|
|
1436
1679
|
}
|
|
1437
1680
|
function boxSshNamespaceForProvider(provider) {
|
|
1438
1681
|
switch (provider) {
|
|
@@ -1596,17 +1839,17 @@ function errSummary(err) {
|
|
|
1596
1839
|
return err instanceof Error ? firstLine(err.message) : String(err);
|
|
1597
1840
|
}
|
|
1598
1841
|
function secretsEnvPath() {
|
|
1599
|
-
return resolve32(
|
|
1842
|
+
return resolve32(homedir7(), ".agentbox", "secrets.env");
|
|
1600
1843
|
}
|
|
1601
1844
|
function writeManagedSecrets(managedKeys, record) {
|
|
1602
1845
|
for (const k of managedKeys) delete process.env[k];
|
|
1603
1846
|
for (const [k, v] of Object.entries(record)) process.env[k] = v;
|
|
1604
1847
|
const path = secretsEnvPath();
|
|
1605
|
-
mkdirSync2(
|
|
1848
|
+
mkdirSync2(dirname5(path), { recursive: true });
|
|
1606
1849
|
let existing = "";
|
|
1607
|
-
if (
|
|
1850
|
+
if (existsSync4(path)) {
|
|
1608
1851
|
try {
|
|
1609
|
-
existing =
|
|
1852
|
+
existing = readFileSync3(path, "utf8");
|
|
1610
1853
|
} catch {
|
|
1611
1854
|
existing = "";
|
|
1612
1855
|
}
|
|
@@ -1649,7 +1892,26 @@ async function publishManagedCredentials(providerId, fields) {
|
|
|
1649
1892
|
} catch {
|
|
1650
1893
|
}
|
|
1651
1894
|
}
|
|
1652
|
-
var
|
|
1895
|
+
var FALLBACK_RELAY_PORT = 8787;
|
|
1896
|
+
var RELAY_PORT_ENV = "AGENTBOX_RELAY_PORT";
|
|
1897
|
+
var override = null;
|
|
1898
|
+
function isValidRelayPort(port) {
|
|
1899
|
+
return Number.isInteger(port) && port >= 1 && port <= 65535;
|
|
1900
|
+
}
|
|
1901
|
+
function setRelayPort(port) {
|
|
1902
|
+
if (!isValidRelayPort(port)) return;
|
|
1903
|
+
override = port;
|
|
1904
|
+
process.env[RELAY_PORT_ENV] = String(port);
|
|
1905
|
+
}
|
|
1906
|
+
function relayPort() {
|
|
1907
|
+
if (override !== null) return override;
|
|
1908
|
+
const fromEnv = Number.parseInt(process.env[RELAY_PORT_ENV] ?? "", 10);
|
|
1909
|
+
return isValidRelayPort(fromEnv) ? fromEnv : FALLBACK_RELAY_PORT;
|
|
1910
|
+
}
|
|
1911
|
+
function resetRelayPort() {
|
|
1912
|
+
override = null;
|
|
1913
|
+
delete process.env[RELAY_PORT_ENV];
|
|
1914
|
+
}
|
|
1653
1915
|
function shouldReclaimForVersion(health, currentVersion) {
|
|
1654
1916
|
if (health.cliEntry === false) return true;
|
|
1655
1917
|
if (typeof health.version === "string" && health.version.length > 0 && typeof currentVersion === "string" && currentVersion.length > 0 && health.version !== currentVersion) {
|
|
@@ -1673,19 +1935,32 @@ async function killPid(pid) {
|
|
|
1673
1935
|
}
|
|
1674
1936
|
for (let i = 0; i < 20; i++) {
|
|
1675
1937
|
if (!await processAlive(pid)) return;
|
|
1676
|
-
await
|
|
1938
|
+
await delay3(100);
|
|
1677
1939
|
}
|
|
1678
1940
|
try {
|
|
1679
1941
|
process.kill(pid, "SIGKILL");
|
|
1680
1942
|
} catch {
|
|
1681
1943
|
}
|
|
1682
1944
|
}
|
|
1945
|
+
function portIsOccupied(timeoutMs, port = relayPort()) {
|
|
1946
|
+
return new Promise((resolveP) => {
|
|
1947
|
+
const sock = netConnect({ host: "127.0.0.1", port });
|
|
1948
|
+
const done = (occupied) => {
|
|
1949
|
+
sock.destroy();
|
|
1950
|
+
resolveP(occupied);
|
|
1951
|
+
};
|
|
1952
|
+
sock.setTimeout(timeoutMs);
|
|
1953
|
+
sock.once("connect", () => done(true));
|
|
1954
|
+
sock.once("timeout", () => done(false));
|
|
1955
|
+
sock.once("error", () => done(false));
|
|
1956
|
+
});
|
|
1957
|
+
}
|
|
1683
1958
|
function pingHealthz(timeoutMs) {
|
|
1684
1959
|
return new Promise((resolveP) => {
|
|
1685
1960
|
const req = httpRequest(
|
|
1686
1961
|
{
|
|
1687
1962
|
host: "127.0.0.1",
|
|
1688
|
-
port:
|
|
1963
|
+
port: relayPort(),
|
|
1689
1964
|
method: "GET",
|
|
1690
1965
|
path: "/healthz",
|
|
1691
1966
|
timeout: timeoutMs
|
|
@@ -1709,7 +1984,7 @@ function fetchHealthz(timeoutMs) {
|
|
|
1709
1984
|
const req = httpRequest(
|
|
1710
1985
|
{
|
|
1711
1986
|
host: "127.0.0.1",
|
|
1712
|
-
port:
|
|
1987
|
+
port: relayPort(),
|
|
1713
1988
|
method: "GET",
|
|
1714
1989
|
path: "/healthz",
|
|
1715
1990
|
timeout: timeoutMs
|
|
@@ -1760,30 +2035,30 @@ function fetchHealthz(timeoutMs) {
|
|
|
1760
2035
|
});
|
|
1761
2036
|
}
|
|
1762
2037
|
function resolveCliEntry() {
|
|
1763
|
-
const
|
|
1764
|
-
if (
|
|
1765
|
-
const here =
|
|
2038
|
+
const override2 = process.env.AGENTBOX_CLI_ENTRY;
|
|
2039
|
+
if (override2 && existsSync5(override2)) return override2;
|
|
2040
|
+
const here = dirname6(fileURLToPath(import.meta.url));
|
|
1766
2041
|
const candidates = [
|
|
1767
2042
|
resolve4(here, "index.js"),
|
|
1768
2043
|
resolve4(here, "..", "..", "..", "apps", "cli", "dist", "index.js"),
|
|
1769
2044
|
resolve4(here, "..", "..", "..", "..", "dist", "index.js")
|
|
1770
2045
|
];
|
|
1771
2046
|
for (const c of candidates) {
|
|
1772
|
-
if (
|
|
2047
|
+
if (existsSync5(c)) return c;
|
|
1773
2048
|
}
|
|
1774
2049
|
return null;
|
|
1775
2050
|
}
|
|
1776
2051
|
var RUNTIME_ROOT_ENV = "AGENTBOX_RUNTIME_ROOT";
|
|
1777
2052
|
function stagedRuntimeRootCandidates(self) {
|
|
1778
2053
|
const candidates = [];
|
|
1779
|
-
const
|
|
1780
|
-
if (
|
|
2054
|
+
const override2 = process.env[RUNTIME_ROOT_ENV];
|
|
2055
|
+
if (override2) candidates.push(override2);
|
|
1781
2056
|
candidates.push(resolve5(self, "..", "runtime"), resolve5(self, "..", "..", "runtime"));
|
|
1782
2057
|
return candidates;
|
|
1783
2058
|
}
|
|
1784
2059
|
function resolveStagedRuntimeRoot(self, marker) {
|
|
1785
2060
|
for (const candidate of stagedRuntimeRootCandidates(self)) {
|
|
1786
|
-
if (
|
|
2061
|
+
if (existsSync6(resolve5(candidate, marker))) return candidate;
|
|
1787
2062
|
}
|
|
1788
2063
|
return void 0;
|
|
1789
2064
|
}
|
|
@@ -1821,22 +2096,22 @@ function setHubDockerContext(dir) {
|
|
|
1821
2096
|
function hubDockerContext() {
|
|
1822
2097
|
return dockerContext;
|
|
1823
2098
|
}
|
|
1824
|
-
var STATE_DIR2 =
|
|
1825
|
-
var HUB_PID_FILE =
|
|
1826
|
-
var
|
|
1827
|
-
var
|
|
1828
|
-
var
|
|
2099
|
+
var STATE_DIR2 = join8(homedir8(), ".agentbox");
|
|
2100
|
+
var HUB_PID_FILE = join8(STATE_DIR2, "hub.pid");
|
|
2101
|
+
var RELAY_PID_FILE = join8(STATE_DIR2, "relay.pid");
|
|
2102
|
+
var HUB_LOG_FILE = join8(STATE_DIR2, "hub.log");
|
|
2103
|
+
var HUB_TOKEN_FILE = join8(STATE_DIR2, "hub", "token");
|
|
1829
2104
|
var HOST2 = "0.0.0.0";
|
|
1830
2105
|
var LOOPBACK_HOST = "127.0.0.1";
|
|
1831
2106
|
var NODE_MIN = { major: 22, minor: 5 };
|
|
1832
|
-
var CP_DIR =
|
|
2107
|
+
var CP_DIR = join8(STATE_DIR2, "control-plane");
|
|
1833
2108
|
async function resolveExposedSpawn() {
|
|
1834
2109
|
try {
|
|
1835
2110
|
const record = JSON.parse(
|
|
1836
|
-
await
|
|
2111
|
+
await readFile4(controlPlaneDeployPath(), "utf8")
|
|
1837
2112
|
);
|
|
1838
2113
|
if (record.provider !== "local") return null;
|
|
1839
|
-
const envBody = await
|
|
2114
|
+
const envBody = await readFile4(join8(CP_DIR, "control-plane.env"), "utf8").catch(() => "");
|
|
1840
2115
|
const env = buildExposedHubEnv(record, parseEnvFileBody(envBody));
|
|
1841
2116
|
return { env, profile: EXPOSED_HUB_PROFILE };
|
|
1842
2117
|
} catch {
|
|
@@ -1861,7 +2136,7 @@ function nodeFlags() {
|
|
|
1861
2136
|
}
|
|
1862
2137
|
async function readPid(file) {
|
|
1863
2138
|
try {
|
|
1864
|
-
const pid = Number.parseInt((await
|
|
2139
|
+
const pid = Number.parseInt((await readFile4(file, "utf8")).trim(), 10);
|
|
1865
2140
|
return Number.isFinite(pid) && pid > 0 ? pid : null;
|
|
1866
2141
|
} catch {
|
|
1867
2142
|
return null;
|
|
@@ -1869,7 +2144,7 @@ async function readPid(file) {
|
|
|
1869
2144
|
}
|
|
1870
2145
|
async function readToken() {
|
|
1871
2146
|
try {
|
|
1872
|
-
const t = (await
|
|
2147
|
+
const t = (await readFile4(HUB_TOKEN_FILE, "utf8")).trim();
|
|
1873
2148
|
return t.length > 0 ? t : null;
|
|
1874
2149
|
} catch {
|
|
1875
2150
|
return null;
|
|
@@ -1880,25 +2155,25 @@ function readHubToken() {
|
|
|
1880
2155
|
}
|
|
1881
2156
|
async function endpointFor(portlessUrl) {
|
|
1882
2157
|
const token = await readToken();
|
|
1883
|
-
const hostUrl = portlessUrl ?? `http://${LOOPBACK_HOST}:${String(
|
|
2158
|
+
const hostUrl = portlessUrl ?? `http://${LOOPBACK_HOST}:${String(relayPort())}`;
|
|
1884
2159
|
return {
|
|
1885
2160
|
hostUrl,
|
|
1886
2161
|
openUrl: token ? `${hostUrl}/?token=${token}` : hostUrl,
|
|
1887
|
-
port:
|
|
2162
|
+
port: relayPort(),
|
|
1888
2163
|
token
|
|
1889
2164
|
};
|
|
1890
2165
|
}
|
|
1891
2166
|
function resolveHubServer() {
|
|
1892
|
-
const
|
|
1893
|
-
if (
|
|
1894
|
-
const here =
|
|
2167
|
+
const override2 = process.env.AGENTBOX_HUB_BIN;
|
|
2168
|
+
if (override2 && existsSync7(override2)) return override2;
|
|
2169
|
+
const here = dirname7(fileURLToPath2(import.meta.url));
|
|
1895
2170
|
const candidates = [
|
|
1896
2171
|
resolve6(here, "..", "runtime", "hub", "apps", "hub", "server.js"),
|
|
1897
2172
|
resolve6(here, "..", "..", "..", "apps", "hub", "dist-standalone", "apps", "hub", "server.js"),
|
|
1898
2173
|
resolve6(here, "..", "..", "apps", "hub", "dist-standalone", "apps", "hub", "server.js")
|
|
1899
2174
|
];
|
|
1900
2175
|
for (const c of candidates) {
|
|
1901
|
-
if (
|
|
2176
|
+
if (existsSync7(c)) return c;
|
|
1902
2177
|
}
|
|
1903
2178
|
throw new Error(
|
|
1904
2179
|
`could not locate the built hub server; run \`pnpm --filter @agentbox/hub build:standalone\` (dev), or set AGENTBOX_HUB_BIN. Tried:
|
|
@@ -1909,7 +2184,7 @@ function hubRuntimeEnv(opts = {}) {
|
|
|
1909
2184
|
const env = {};
|
|
1910
2185
|
const dockerContext2 = opts.dockerContext ?? hubDockerContext();
|
|
1911
2186
|
if (dockerContext2) env.AGENTBOX_DOCKER_CONTEXT = dockerContext2;
|
|
1912
|
-
const runtimeRoot = opts.runtimeRoot ?? resolveStagedRuntimeRoot(
|
|
2187
|
+
const runtimeRoot = opts.runtimeRoot ?? resolveStagedRuntimeRoot(dirname7(fileURLToPath2(import.meta.url)), "docker/Dockerfile.box");
|
|
1913
2188
|
if (runtimeRoot) env[RUNTIME_ROOT_ENV] = runtimeRoot;
|
|
1914
2189
|
return env;
|
|
1915
2190
|
}
|
|
@@ -1920,14 +2195,16 @@ async function reclaimPort(reportedPid, log) {
|
|
|
1920
2195
|
if (typeof pid !== "number" || pid <= 0 || seen.has(pid)) continue;
|
|
1921
2196
|
seen.add(pid);
|
|
1922
2197
|
if (!await processAlive(pid)) continue;
|
|
1923
|
-
log(`stopping process on :${String(
|
|
2198
|
+
log(`stopping process on :${String(relayPort())} (pid ${String(pid)})`);
|
|
1924
2199
|
await killPid(pid);
|
|
1925
2200
|
}
|
|
1926
2201
|
await unlink(HUB_PID_FILE).catch(() => {
|
|
1927
2202
|
});
|
|
2203
|
+
await unlink(RELAY_PID_FILE).catch(() => {
|
|
2204
|
+
});
|
|
1928
2205
|
if (await pingHealthz(300)) {
|
|
1929
2206
|
throw new Error(
|
|
1930
|
-
`something is still listening on :${String(
|
|
2207
|
+
`something is still listening on :${String(relayPort())} and could not be stopped (reported pid ${String(reportedPid ?? "unknown")}); kill it manually and retry`
|
|
1931
2208
|
);
|
|
1932
2209
|
}
|
|
1933
2210
|
}
|
|
@@ -1935,19 +2212,26 @@ async function ensureHub(opts = {}) {
|
|
|
1935
2212
|
const log = opts.onLog ?? (() => {
|
|
1936
2213
|
});
|
|
1937
2214
|
assertNodeSupported();
|
|
1938
|
-
await
|
|
2215
|
+
await mkdir5(STATE_DIR2, { recursive: true });
|
|
1939
2216
|
const exposed = await resolveExposedSpawn();
|
|
1940
2217
|
const desiredProfile = exposed?.profile ?? "localhost";
|
|
2218
|
+
const exposedPort = Number.parseInt(exposed?.env["AGENTBOX_HUB_PORT"] ?? "", 10);
|
|
2219
|
+
if (isValidRelayPort(exposedPort) && exposedPort !== relayPort()) {
|
|
2220
|
+
log(
|
|
2221
|
+
`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`
|
|
2222
|
+
);
|
|
2223
|
+
setRelayPort(exposedPort);
|
|
2224
|
+
}
|
|
1941
2225
|
const currentVersion = process.env.AGENTBOX_CLI_VERSION;
|
|
1942
2226
|
const reusable = (h) => h.ui === true && !shouldReclaimForVersion(h, currentVersion) && (h.profile ?? "localhost") === desiredProfile;
|
|
1943
2227
|
const health = await fetchHealthz(500);
|
|
1944
2228
|
if (health !== null) {
|
|
1945
2229
|
const profileMismatch = (health.profile ?? "localhost") !== desiredProfile;
|
|
1946
2230
|
if (reusable(health)) {
|
|
1947
|
-
return endpointFor(await hubPortlessSync(opts.portlessEnabled,
|
|
2231
|
+
return endpointFor(await hubPortlessSync(opts.portlessEnabled, relayPort()));
|
|
1948
2232
|
}
|
|
1949
2233
|
log(
|
|
1950
|
-
profileMismatch ? `a hub in the ${health.profile ?? "localhost"} profile holds :${String(
|
|
2234
|
+
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
2235
|
);
|
|
1952
2236
|
await reclaimPort(health.pid, log);
|
|
1953
2237
|
} else {
|
|
@@ -1957,14 +2241,14 @@ async function ensureHub(opts = {}) {
|
|
|
1957
2241
|
for (let i = 0; i < 10; i++) {
|
|
1958
2242
|
late = await fetchHealthz(300);
|
|
1959
2243
|
if (late !== null) break;
|
|
1960
|
-
await
|
|
2244
|
+
await delay4(200);
|
|
1961
2245
|
}
|
|
1962
2246
|
if (late !== null && reusable(late)) {
|
|
1963
|
-
return endpointFor(await hubPortlessSync(opts.portlessEnabled,
|
|
2247
|
+
return endpointFor(await hubPortlessSync(opts.portlessEnabled, relayPort()));
|
|
1964
2248
|
}
|
|
1965
2249
|
if (late !== null) {
|
|
1966
2250
|
log(
|
|
1967
|
-
`a hub in the ${late.profile ?? "localhost"} profile holds :${String(
|
|
2251
|
+
`a hub in the ${late.profile ?? "localhost"} profile holds :${String(relayPort())} \u2014 reclaiming to run ${desiredProfile}`
|
|
1968
2252
|
);
|
|
1969
2253
|
}
|
|
1970
2254
|
log(`hub pid ${String(pid)} alive but /healthz unresponsive \u2014 restarting it`);
|
|
@@ -2000,6 +2284,10 @@ async function spawnHub(hubServer, cliEntry, log, portlessEnabled, exposedEnv) {
|
|
|
2000
2284
|
// so docker boxes reach its embedded relay via host.docker.internal; the
|
|
2001
2285
|
// profile is set independently of the bind host in server.ts.
|
|
2002
2286
|
AGENTBOX_HUB_HOST: HOST2,
|
|
2287
|
+
// Load-bearing for `relay.port`: server.ts defaults to 8787 on its own, so
|
|
2288
|
+
// without this the hub keeps binding 8787 while everything here probes the
|
|
2289
|
+
// configured port.
|
|
2290
|
+
AGENTBOX_HUB_PORT: String(relayPort()),
|
|
2003
2291
|
// The hub bundle ships no staged build context of its own, so its
|
|
2004
2292
|
// in-process freshness checks couldn't fingerprint (degrading to
|
|
2005
2293
|
// 'unknown'). Hand it the CLI's resolved roots so hub-side fingerprints
|
|
@@ -2016,29 +2304,29 @@ async function spawnHub(hubServer, cliEntry, log, portlessEnabled, exposedEnv) {
|
|
|
2016
2304
|
exit = { code, signal };
|
|
2017
2305
|
});
|
|
2018
2306
|
if (typeof child.pid === "number") {
|
|
2019
|
-
await
|
|
2020
|
-
log(`spawned hub process (pid ${String(child.pid)}, port ${String(
|
|
2307
|
+
await writeFile3(HUB_PID_FILE, String(child.pid), "utf8");
|
|
2308
|
+
log(`spawned hub process (pid ${String(child.pid)}, port ${String(relayPort())})`);
|
|
2021
2309
|
}
|
|
2022
2310
|
for (let i = 0; i < 50; i++) {
|
|
2023
2311
|
if (await pingHealthz(300)) {
|
|
2024
|
-
log(`hub reachable on http://${LOOPBACK_HOST}:${String(
|
|
2025
|
-
const purl = await hubPortlessSync(portlessEnabled,
|
|
2312
|
+
log(`hub reachable on http://${LOOPBACK_HOST}:${String(relayPort())}`);
|
|
2313
|
+
const purl = await hubPortlessSync(portlessEnabled, relayPort());
|
|
2026
2314
|
if (purl) log(`hub also reachable on ${purl}`);
|
|
2027
2315
|
return endpointFor(purl);
|
|
2028
2316
|
}
|
|
2029
2317
|
if (exit !== null) {
|
|
2030
2318
|
await unlink(HUB_PID_FILE).catch(() => {
|
|
2031
2319
|
});
|
|
2032
|
-
await
|
|
2320
|
+
await delay4(150);
|
|
2033
2321
|
throw new Error(
|
|
2034
2322
|
await hubStartupError(`hub process exited (${describeExit(exit)}) during startup`)
|
|
2035
2323
|
);
|
|
2036
2324
|
}
|
|
2037
|
-
await
|
|
2325
|
+
await delay4(200);
|
|
2038
2326
|
}
|
|
2039
2327
|
throw new Error(
|
|
2040
2328
|
await hubStartupError(
|
|
2041
|
-
`hub did not become reachable on http://${LOOPBACK_HOST}:${String(
|
|
2329
|
+
`hub did not become reachable on http://${LOOPBACK_HOST}:${String(relayPort())} within ~25s`
|
|
2042
2330
|
)
|
|
2043
2331
|
);
|
|
2044
2332
|
}
|
|
@@ -2055,7 +2343,7 @@ ${tail}` : `; see ${HUB_LOG_FILE}`;
|
|
|
2055
2343
|
}
|
|
2056
2344
|
async function tailFile(file, maxLines) {
|
|
2057
2345
|
try {
|
|
2058
|
-
const lines = (await
|
|
2346
|
+
const lines = (await readFile4(file, "utf8")).split("\n").filter((l) => l.trim().length > 0);
|
|
2059
2347
|
return lines.slice(-maxLines).join("\n");
|
|
2060
2348
|
} catch {
|
|
2061
2349
|
return "";
|
|
@@ -2089,16 +2377,29 @@ async function getHubStatus() {
|
|
|
2089
2377
|
ui: health?.ui === true,
|
|
2090
2378
|
pid,
|
|
2091
2379
|
pidAlive,
|
|
2092
|
-
port:
|
|
2380
|
+
port: relayPort(),
|
|
2093
2381
|
hostUrl: ep.hostUrl,
|
|
2094
2382
|
openUrl: ep.openUrl,
|
|
2095
2383
|
token: ep.token,
|
|
2096
2384
|
pidFile: HUB_PID_FILE,
|
|
2097
2385
|
logFile: HUB_LOG_FILE,
|
|
2098
2386
|
...health?.profile ? { profile: health.profile } : {},
|
|
2099
|
-
...health?.worker ? { worker: true } : {}
|
|
2387
|
+
...health?.worker ? { worker: true } : {},
|
|
2388
|
+
...await bundleIsNewerThanHub(pid) ? { staleBundle: true } : {}
|
|
2100
2389
|
};
|
|
2101
2390
|
}
|
|
2391
|
+
async function bundleIsNewerThanHub(pid) {
|
|
2392
|
+
if (pid === null) return false;
|
|
2393
|
+
try {
|
|
2394
|
+
const [startedAt, builtAt] = await Promise.all([
|
|
2395
|
+
stat5(HUB_PID_FILE).then((st) => st.mtimeMs),
|
|
2396
|
+
stat5(resolveHubServer()).then((st) => st.mtimeMs)
|
|
2397
|
+
]);
|
|
2398
|
+
return builtAt > startedAt;
|
|
2399
|
+
} catch {
|
|
2400
|
+
return false;
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2102
2403
|
var activeRefresher;
|
|
2103
2404
|
function setDockerCredentialRefresh(fn) {
|
|
2104
2405
|
activeRefresher = fn;
|
|
@@ -2110,129 +2411,6 @@ async function runDockerCredentialRefresh(opts) {
|
|
|
2110
2411
|
} catch {
|
|
2111
2412
|
}
|
|
2112
2413
|
}
|
|
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
2414
|
function carryPlaceholderContext(ctx) {
|
|
2237
2415
|
const out = {};
|
|
2238
2416
|
if (ctx.name) out.AGENTBOX_BOX_NAME = ctx.name;
|
|
@@ -2804,7 +2982,7 @@ function parseFlatInventory(stdout) {
|
|
|
2804
2982
|
}
|
|
2805
2983
|
async function pathExists(path) {
|
|
2806
2984
|
try {
|
|
2807
|
-
await
|
|
2985
|
+
await stat6(path);
|
|
2808
2986
|
return true;
|
|
2809
2987
|
} catch {
|
|
2810
2988
|
return false;
|
|
@@ -3175,7 +3353,7 @@ function planCarryEntry(entry) {
|
|
|
3175
3353
|
}
|
|
3176
3354
|
async function pathExists2(p) {
|
|
3177
3355
|
try {
|
|
3178
|
-
await
|
|
3356
|
+
await stat7(p);
|
|
3179
3357
|
return true;
|
|
3180
3358
|
} catch {
|
|
3181
3359
|
return false;
|
|
@@ -3244,7 +3422,7 @@ async function findUnsyncableSymlinks(root, reachableRoots) {
|
|
|
3244
3422
|
unsyncable.push(virtualFull);
|
|
3245
3423
|
continue;
|
|
3246
3424
|
}
|
|
3247
|
-
const st = await
|
|
3425
|
+
const st = await stat8(real).catch(() => null);
|
|
3248
3426
|
if (st?.isDirectory()) await walk(real, virtualFull);
|
|
3249
3427
|
} else if (ent.isDirectory()) {
|
|
3250
3428
|
await walk(realFull, virtualFull);
|
|
@@ -3259,7 +3437,7 @@ async function findUnsyncableSymlinks(root, reachableRoots) {
|
|
|
3259
3437
|
}
|
|
3260
3438
|
async function pathExists3(p) {
|
|
3261
3439
|
try {
|
|
3262
|
-
await
|
|
3440
|
+
await stat9(p);
|
|
3263
3441
|
return true;
|
|
3264
3442
|
} catch {
|
|
3265
3443
|
return false;
|
|
@@ -3307,7 +3485,7 @@ function isRealAgentCredential(agent, text) {
|
|
|
3307
3485
|
}
|
|
3308
3486
|
return Object.keys(parsed).length > 0;
|
|
3309
3487
|
}
|
|
3310
|
-
async function
|
|
3488
|
+
async function hostClaudeAccessTokenExpired(path = CLAUDE_HOST_BACKUP, now = Date.now()) {
|
|
3311
3489
|
try {
|
|
3312
3490
|
const parsed = JSON.parse(await readFile7(path, "utf8"));
|
|
3313
3491
|
const exp = parsed?.claudeAiOauth?.expiresAt;
|
|
@@ -3316,6 +3494,17 @@ async function hostClaudeBackupExpired(path = CLAUDE_HOST_BACKUP, now = Date.now
|
|
|
3316
3494
|
return false;
|
|
3317
3495
|
}
|
|
3318
3496
|
}
|
|
3497
|
+
async function hostClaudeLoginDead(path = CLAUDE_HOST_BACKUP, now = Date.now()) {
|
|
3498
|
+
let text;
|
|
3499
|
+
try {
|
|
3500
|
+
text = await readFile7(path, "utf8");
|
|
3501
|
+
} catch {
|
|
3502
|
+
return false;
|
|
3503
|
+
}
|
|
3504
|
+
if (!isRealAgentCredential("claude", text)) return true;
|
|
3505
|
+
const exp = claudeRefreshExpiresAt(text);
|
|
3506
|
+
return exp !== null && exp < now;
|
|
3507
|
+
}
|
|
3319
3508
|
async function hostBackupHasCredentials(path = CLAUDE_HOST_BACKUP) {
|
|
3320
3509
|
try {
|
|
3321
3510
|
const parsed = JSON.parse(await readFile7(path, "utf8"));
|
|
@@ -3374,6 +3563,15 @@ function claudeExpiresAt(text) {
|
|
|
3374
3563
|
return null;
|
|
3375
3564
|
}
|
|
3376
3565
|
}
|
|
3566
|
+
function claudeRefreshExpiresAt(text) {
|
|
3567
|
+
try {
|
|
3568
|
+
const parsed = JSON.parse(text);
|
|
3569
|
+
const exp = parsed?.claudeAiOauth?.refreshTokenExpiresAt;
|
|
3570
|
+
return typeof exp === "number" && Number.isFinite(exp) ? exp : null;
|
|
3571
|
+
} catch {
|
|
3572
|
+
return null;
|
|
3573
|
+
}
|
|
3574
|
+
}
|
|
3377
3575
|
function shouldAcceptCredentialUpdate(agent, incoming, existing) {
|
|
3378
3576
|
if (existing === null) return { accept: true, reason: "no existing backup" };
|
|
3379
3577
|
if (existing === incoming) return { accept: false, reason: "unchanged" };
|
|
@@ -3595,7 +3793,7 @@ var BOX_DYNAMIC_SYNC_MANIFEST = "/home/vscode/.agentbox/dynamic-sync.json";
|
|
|
3595
3793
|
var BOX_MEMORY_DIR = `${BOX_CLAUDE_PROJECT_DIR}/memory`;
|
|
3596
3794
|
async function pathExists4(p) {
|
|
3597
3795
|
try {
|
|
3598
|
-
await
|
|
3796
|
+
await stat10(p);
|
|
3599
3797
|
return true;
|
|
3600
3798
|
} catch {
|
|
3601
3799
|
return false;
|
|
@@ -3618,7 +3816,7 @@ async function walkFiles(root, prefix = "") {
|
|
|
3618
3816
|
out.push(rel);
|
|
3619
3817
|
} else if (ent.isSymbolicLink()) {
|
|
3620
3818
|
try {
|
|
3621
|
-
const s = await
|
|
3819
|
+
const s = await stat10(full);
|
|
3622
3820
|
if (s.isFile()) out.push(rel);
|
|
3623
3821
|
} catch {
|
|
3624
3822
|
}
|
|
@@ -3914,7 +4112,7 @@ var CREDENTIALS_BACKUP_FILE = resolveAgentSpec("claude").credential.hostBackup;
|
|
|
3914
4112
|
var CLOUD_WORKSPACE = "/workspace";
|
|
3915
4113
|
async function pathExists5(p) {
|
|
3916
4114
|
try {
|
|
3917
|
-
await
|
|
4115
|
+
await stat11(p);
|
|
3918
4116
|
return true;
|
|
3919
4117
|
} catch {
|
|
3920
4118
|
return false;
|
|
@@ -3933,7 +4131,7 @@ async function findBrokenSymlinks(root) {
|
|
|
3933
4131
|
const full = join19(dir, ent.name);
|
|
3934
4132
|
if (ent.isSymbolicLink()) {
|
|
3935
4133
|
try {
|
|
3936
|
-
await
|
|
4134
|
+
await stat11(full);
|
|
3937
4135
|
} catch {
|
|
3938
4136
|
broken.push(relative2(root, full));
|
|
3939
4137
|
}
|
|
@@ -4422,13 +4620,9 @@ var DOCKER_CONTEXT_FILE_MAP = {
|
|
|
4422
4620
|
staged: "packages/sandbox-docker/scripts/git-shim",
|
|
4423
4621
|
dev: "scripts/git-shim"
|
|
4424
4622
|
},
|
|
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"
|
|
4623
|
+
"scripts/agentbox-tool-shim": {
|
|
4624
|
+
staged: "packages/sandbox-docker/scripts/agentbox-tool-shim",
|
|
4625
|
+
dev: "scripts/agentbox-tool-shim"
|
|
4432
4626
|
},
|
|
4433
4627
|
"scripts/chromium-resolver": {
|
|
4434
4628
|
staged: "packages/sandbox-docker/scripts/chromium-resolver",
|
|
@@ -4512,6 +4706,8 @@ function boxNameBasisFromOriginUrl(originUrl) {
|
|
|
4512
4706
|
|
|
4513
4707
|
export {
|
|
4514
4708
|
resolveAgentLauncher,
|
|
4709
|
+
claudeTuiEnv,
|
|
4710
|
+
buildNoVncUrl,
|
|
4515
4711
|
ReplaceError,
|
|
4516
4712
|
parseReplaceRules,
|
|
4517
4713
|
parseReplacements,
|
|
@@ -4577,6 +4773,21 @@ export {
|
|
|
4577
4773
|
EXPOSED_HUB_PROFILE,
|
|
4578
4774
|
parseEnvFileBody,
|
|
4579
4775
|
buildExposedHubEnv,
|
|
4776
|
+
PLUGINS_FILE,
|
|
4777
|
+
SUPPORTED_SDK_API_VERSIONS,
|
|
4778
|
+
isSupportedApiVersion,
|
|
4779
|
+
PLUGINS_FILE_VERSION,
|
|
4780
|
+
readPluginRegistrySync,
|
|
4781
|
+
readPluginRegistry,
|
|
4782
|
+
recordPluginDescriptor,
|
|
4783
|
+
addPluginRecord,
|
|
4784
|
+
removePluginRecord,
|
|
4785
|
+
pluginProviderNames,
|
|
4786
|
+
pluginForProvider,
|
|
4787
|
+
resolveProviderDescriptor,
|
|
4788
|
+
listProviderDescriptors,
|
|
4789
|
+
deriveDescriptor,
|
|
4790
|
+
ensureProviderDescriptor,
|
|
4580
4791
|
resolveCloudSshTarget,
|
|
4581
4792
|
ensureCloudSshAlias,
|
|
4582
4793
|
autoWriteSshConfig,
|
|
@@ -4621,10 +4832,16 @@ export {
|
|
|
4621
4832
|
maskSecret,
|
|
4622
4833
|
setCredentialPublisher,
|
|
4623
4834
|
publishManagedCredentials,
|
|
4624
|
-
|
|
4835
|
+
FALLBACK_RELAY_PORT,
|
|
4836
|
+
RELAY_PORT_ENV,
|
|
4837
|
+
isValidRelayPort,
|
|
4838
|
+
setRelayPort,
|
|
4839
|
+
relayPort,
|
|
4840
|
+
resetRelayPort,
|
|
4625
4841
|
shouldReclaimForVersion,
|
|
4626
4842
|
processAlive,
|
|
4627
4843
|
killPid,
|
|
4844
|
+
portIsOccupied,
|
|
4628
4845
|
pingHealthz,
|
|
4629
4846
|
fetchHealthz,
|
|
4630
4847
|
resolveCliEntry,
|
|
@@ -4642,15 +4859,6 @@ export {
|
|
|
4642
4859
|
getHubStatus,
|
|
4643
4860
|
setDockerCredentialRefresh,
|
|
4644
4861
|
runDockerCredentialRefresh,
|
|
4645
|
-
PLUGINS_FILE,
|
|
4646
|
-
SUPPORTED_SDK_API_VERSIONS,
|
|
4647
|
-
isSupportedApiVersion,
|
|
4648
|
-
readPluginRegistrySync,
|
|
4649
|
-
readPluginRegistry,
|
|
4650
|
-
addPluginRecord,
|
|
4651
|
-
removePluginRecord,
|
|
4652
|
-
pluginProviderNames,
|
|
4653
|
-
pluginForProvider,
|
|
4654
4862
|
carryPlaceholderContext,
|
|
4655
4863
|
renderCarryEntries,
|
|
4656
4864
|
makeRecordingTransport,
|
|
@@ -4707,11 +4915,13 @@ export {
|
|
|
4707
4915
|
seedAgentsVolume,
|
|
4708
4916
|
SEED_MARKER,
|
|
4709
4917
|
isRealAgentCredential,
|
|
4710
|
-
|
|
4918
|
+
hostClaudeAccessTokenExpired,
|
|
4919
|
+
hostClaudeLoginDead,
|
|
4711
4920
|
hostBackupHasCredentials,
|
|
4712
4921
|
extractCredentials,
|
|
4713
4922
|
parseCredentialsUpdate,
|
|
4714
4923
|
claudeExpiresAt,
|
|
4924
|
+
claudeRefreshExpiresAt,
|
|
4715
4925
|
shouldAcceptCredentialUpdate,
|
|
4716
4926
|
writeCredentialBackup,
|
|
4717
4927
|
readCredentialBackup,
|
|
@@ -4767,4 +4977,4 @@ export {
|
|
|
4767
4977
|
deriveRepoLabel,
|
|
4768
4978
|
boxNameBasisFromOriginUrl
|
|
4769
4979
|
};
|
|
4770
|
-
//# sourceMappingURL=chunk-
|
|
4980
|
+
//# sourceMappingURL=chunk-XENTK32L.js.map
|