@madarco/agentbox 0.31.4 → 0.32.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 +50 -0
- package/dist/_cloud-attach-UXH3VKTM.js +31 -0
- package/dist/{chunk-VQONUZE4.js → chunk-2W3W3KNR.js} +4 -4
- package/dist/{chunk-RUKTOHK7.js → chunk-3AYSA62C.js} +2 -2
- package/dist/{chunk-EXF4PLBN.js → chunk-3ISG5THX.js} +3 -3
- package/dist/{chunk-BYZPRB7U.js → chunk-5D46PE5V.js} +5 -5
- package/dist/{chunk-IF4VXKJK.js → chunk-5F5NBZG7.js} +3 -3
- package/dist/{chunk-ZUTC2JZM.js → chunk-65G5R2HW.js} +27 -5
- package/dist/chunk-65G5R2HW.js.map +1 -0
- package/dist/{chunk-KCDLAP5Q.js → chunk-66GAYIJZ.js} +3252 -936
- package/dist/chunk-66GAYIJZ.js.map +1 -0
- package/dist/{chunk-IQMDGAMB.js → chunk-6N7OSMEA.js} +4 -4
- package/dist/{chunk-CUIJ2PIN.js → chunk-7PTM6JEX.js} +26 -22
- package/dist/{chunk-CUIJ2PIN.js.map → chunk-7PTM6JEX.js.map} +1 -1
- package/dist/{chunk-EP4IFSV5.js → chunk-B3C6NQB7.js} +75 -26
- package/dist/chunk-B3C6NQB7.js.map +1 -0
- package/dist/{chunk-L567TKOK.js → chunk-BJLUG6TE.js} +5 -5
- package/dist/{chunk-AYREFYEF.js → chunk-BV2UZ4SG.js} +4 -4
- package/dist/{chunk-MBZ4UOWF.js → chunk-EAT5IEWA.js} +3 -3
- package/dist/{chunk-ENFWBFBI.js → chunk-GBEV7ETR.js} +4 -4
- package/dist/{chunk-4NO5MO2P.js → chunk-GLIWCNFE.js} +6 -6
- package/dist/chunk-GVNKIACA.js +223 -0
- package/dist/chunk-GVNKIACA.js.map +1 -0
- package/dist/{chunk-VWJBQGXD.js → chunk-HCKRUAHW.js} +6 -6
- package/dist/{chunk-IFPTD73K.js → chunk-HUVSTEJR.js} +2 -2
- package/dist/{chunk-NKHRFR5G.js → chunk-IL7R2X6B.js} +16 -16
- package/dist/{chunk-5UX2HAF4.js → chunk-IQ4WLVXE.js} +43 -43
- package/dist/{chunk-AAMPHDB2.js → chunk-JL4EJ4EH.js} +5 -5
- package/dist/{chunk-OXBWZG2N.js → chunk-KTB7JGPA.js} +4 -4
- package/dist/{chunk-YL3VEQTS.js → chunk-LFBCFWG6.js} +5 -5
- package/dist/{chunk-MJZPECVQ.js → chunk-M2DWTQRF.js} +2 -2
- package/dist/{chunk-PXH3DERD.js → chunk-MB2K74BI.js} +164 -2
- package/dist/chunk-MB2K74BI.js.map +1 -0
- package/dist/{chunk-2MBELUE6.js → chunk-NGCG3IBH.js} +9 -9
- package/dist/{chunk-QT4MOS6R.js → chunk-NX27A3F2.js} +23 -23
- package/dist/{chunk-4Y365UYP.js → chunk-OUHDSEVQ.js} +2 -2
- package/dist/{chunk-M6VAID7T.js → chunk-QBVRWGXD.js} +2 -2
- package/dist/{chunk-VOVRWIBC.js → chunk-QLZPJIWF.js} +13 -13
- package/dist/{chunk-GCS5XAPC.js → chunk-R3XDO4SN.js} +3 -3
- package/dist/{chunk-IQ6BQ2LX.js → chunk-RF7Q7SHU.js} +3 -3
- package/dist/{chunk-YSC4VY43.js → chunk-SAEZJZ5Z.js} +3 -3
- package/dist/{chunk-QDVIMN57.js → chunk-TDPHZWJI.js} +4 -4
- package/dist/{chunk-QWWDG5B7.js → chunk-U5MUWZOS.js} +6 -6
- package/dist/{chunk-LR5RNEVO.js → chunk-ULQPPQ23.js} +3 -3
- package/dist/{chunk-75JF44DH.js → chunk-VWSERFTW.js} +2 -2
- package/dist/{chunk-4LSLXBFN.js → chunk-XFMCRD2J.js} +6 -6
- package/dist/{chunk-X6SZPGL5.js → chunk-YNAJUTYC.js} +6 -6
- package/dist/{chunk-C67DVYWA.js → chunk-ZKOLV4ZN.js} +37 -2
- package/dist/chunk-ZKOLV4ZN.js.map +1 -0
- package/dist/{cli-XRF7WFE5.js → cli-HFZMZWRM.js} +8 -8
- package/dist/{cli-KT5X4J74.js → cli-HPYDF5AP.js} +8 -8
- package/dist/{cli-HFLU5QTD.js → cli-PWK63DQI.js} +7 -7
- package/dist/{cli-7JW54ZTA.js → cli-RC5F6DYP.js} +8 -8
- package/dist/{cli-7Z7BD23R.js → cli-S7RGCNHG.js} +7 -7
- package/dist/cloud-backends.js +4 -4
- package/dist/{control-plane-DGLF4MBB.js → control-plane-HRJRAYKV.js} +19 -19
- package/dist/{cp-hub-upload-7YESYCVS.js → cp-hub-upload-N4PPUZHE.js} +6 -6
- package/dist/{custody-client-P7SCEDU2.js → custody-client-KYEZET6C.js} +4 -4
- package/dist/{deploy-hetzner-FOCNRRB2.js → deploy-hetzner-A42GILM3.js} +8 -8
- package/dist/{dist-63YBVZW4.js → dist-5OXP2N6H.js} +8 -8
- package/dist/{dist-36WLI6E2.js → dist-64QL2Q5L.js} +6 -6
- package/dist/{dist-MITAKWKQ.js → dist-D4LLY6JV.js} +7 -7
- package/dist/{dist-TJJ6KBNZ.js → dist-ETGTZQUT.js} +255 -5
- package/dist/{dist-54VRDCUU.js → dist-GS36Y2CW.js} +7 -7
- package/dist/{dist-CBPQZPQN.js → dist-HGUSK4LL.js} +7 -7
- package/dist/{dist-E4VLIH3H.js → dist-JU5COR7Y.js} +7 -7
- package/dist/{dist-2CAWJQT5.js → dist-NJ2U42MZ.js} +9 -5
- package/dist/{dist-FHPNYDCF.js → dist-URWWHI3X.js} +8 -2
- package/dist/{dist-XSAPZOEG.js → dist-Z4S5EKUS.js} +7 -7
- package/dist/{host-reach-drainer-XFLSMTSX.js → host-reach-drainer-WIKLZSLZ.js} +2 -2
- package/dist/host-session-YP5RKV6T.js +29 -0
- package/dist/hub-A6U3YB5D.js +39 -0
- package/dist/{hub-adopt-IYZ3WXYN.js → hub-adopt-O4LQLW6N.js} +6 -6
- package/dist/{hub-api-client-WOZ2BQ6H.js → hub-api-client-BI3E37CF.js} +3 -3
- package/dist/{hub-docker-target-IQHX6OYX.js → hub-docker-target-D67UXZSU.js} +13 -13
- package/dist/index.js +1223 -229
- package/dist/index.js.map +1 -1
- package/dist/{plugin-update-2ACFHFUI.js → plugin-update-LI3QDA4K.js} +4 -4
- package/dist/prepare-5Y7DWMZ7.js +45 -0
- package/dist/prepared-custody-L6PXXLD3.js +39 -0
- package/dist/{prepared-state-FO74QUCP-PZLOM6HD.js → prepared-state-FO74QUCP-M4Q2X3KN.js} +3 -3
- package/dist/{publish-credentials-TO5IIW2T.js → publish-credentials-WJ4KLIMW.js} +8 -8
- package/dist/{registry-X33JZU6B.js → registry-6VF5VPGD.js} +4 -4
- package/dist/relay-732OVYXR.js +22 -0
- package/dist/{remote-docker-share-YADHIHXV.js → remote-docker-share-WY5U5USV.js} +10 -10
- package/dist/remote-docker-share-WY5U5USV.js.map +1 -0
- package/dist/{tool-grant-push-7G2QAN3J.js → tool-grant-push-YQYYNMRQ.js} +3 -3
- package/package.json +1 -1
- package/runtime/_shared/ctl.cjs +1026 -309
- package/runtime/digitalocean/ctl.cjs +1026 -309
- package/runtime/docker/packages/ctl/dist/bin.cjs +1026 -309
- package/runtime/e2b/ctl.cjs +1026 -309
- package/runtime/hetzner/ctl.cjs +1026 -309
- package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
- package/runtime/hub/apps/hub/.next/app-path-routes-manifest.json +24 -0
- package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
- package/runtime/hub/apps/hub/.next/routes-manifest.json +188 -0
- package/runtime/hub/apps/hub/.next/server/app/(auth)/signin/page_client-reference-manifest.js +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.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/[action]/route.js +4 -4
- 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.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/backup/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/backup/route.js.nft.json +1 -1
- 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]/clone/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/clone/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.js +4 -4
- 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.nft.json +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.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.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/upload/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/upload/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/vnc/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/web/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/route.js +4 -4
- 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.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/custody/[...path]/route.js +3 -3
- 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.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.nft.json +1 -1
- 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.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route.js +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/attach/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/message/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/notes/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route.js +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/resume/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route.js +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/[id]/stop/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/detect/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/managers/route_client-reference-manifest.js +3 -0
- 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]/bots/route.js.nft.json +1 -1
- 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]/create-preflight/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/create-preflight/route.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/restore/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/projects/[id]/restore/route.js.nft.json +1 -1
- 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.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/[id]/size-check/route.js +2 -2
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/providers/[id]/size-check/route.js.nft.json +1 -1
- 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.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/tasks/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route.js +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route.js +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rename/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route.js +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/rescan/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route.js +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route.js +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/tasks/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/[id]/timeline/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route.js +10 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/workspaces/route_client-reference-manifest.js +3 -0
- 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)/approvals/page_client-reference-manifest.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.js.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/web/route.js.nft.json +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)/custody/page_client-reference-manifest.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)/page_client-reference-manifest.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)/projects/[id]/page_client-reference-manifest.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.nft.json +1 -1
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/system/page_client-reference-manifest.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app/[...path]/route.js +1 -1
- 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/page_client-reference-manifest.js +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/_not-found/page_client-reference-manifest.js +1 -1
- package/runtime/hub/apps/hub/.next/server/app-paths-manifest.json +24 -0
- package/runtime/hub/apps/hub/.next/server/chunks/00je_(dashboard)_api_v1_workspaces_[id]_tasks_[taskId]_assign_route_actions_1sufsej.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/00je_(dashboard)_api_v1_workspaces_[id]_tasks_[taskId]_done_route_actions_216dixx.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/044u_hub__next-internal_server_app_(dashboard)_api_v1_managers_route_actions_1_vtgih.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/044u_hub__next-internal_server_app_(dashboard)_api_v1_tasks_route_actions_1h8tg_m.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/05v5_app_(dashboard)_api_v1_workspaces_[id]_managers_sessions_route_actions_16dksub.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/05v5_app_(dashboard)_api_v1_workspaces_[id]_managers_start_route_actions_1g-vmis.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/05v5_app_(dashboard)_api_v1_workspaces_[id]_tasks_[taskId]_route_actions_03oih6y.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/05v5_app_(dashboard)_api_v1_workspaces_[id]_tasks_assign_route_actions_196zwo9.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/05v5_app_(dashboard)_api_v1_workspaces_[id]_tasks_reorder_route_actions_1zkcfk-.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/0ssw__next-internal_server_app_(dashboard)_api_v1_workspaces_route_actions_12a7_y8.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/0web_next-internal_server_app_(dashboard)_api_v1_managers_[id]_route_actions_07cpyb_.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_managers_[id]_attach_route_actions_0o-khw8.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_managers_[id]_message_route_actions_0rjcqe5.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_managers_[id]_notes_route_actions_1-mf4r_.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_managers_[id]_resume_route_actions_0-cm1mu.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_managers_[id]_stop_route_actions_16nrl1r.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_managers_detect_route_actions_1sdbs-_.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_workspaces_[id]_managers_route_actions_1sxymv0.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_workspaces_[id]_rename_route_actions_0df5zi2.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_workspaces_[id]_rescan_route_actions_1yra_w8.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_workspaces_[id]_route_actions_1f56n_0.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_workspaces_[id]_tasks_route_actions_1t-6quw.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_workspaces_[id]_timeline_route_actions_0pbxblt.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1viy_api_v1_workspaces_[id]_tasks_[taskId]_unassign_route_actions_18a1p_r.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0-c97gb._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0spnud2._.js → [root-of-the-server]__0-kl55b._.js} +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__028ifqb._.js → [root-of-the-server]__0-xlf9z._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__074mxl5._.js → [root-of-the-server]__0004tsz._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__00bupbc._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1cpr4qy._.js → [root-of-the-server]__0126167._.js} +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__01fy5q0._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__02c077x._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1ta1gr1._.js → [root-of-the-server]__02sueng._.js} +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__0nndlre._.js → [root-of-the-server]__04-gm8c._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__05uinnp._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__06wy8zz._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__071c-t4._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__08jg8w8._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09059m-._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__092y7_z._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09ti2-t._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__09y4pdw._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0_mog_h._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0a689u5._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0a8ere2._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0bzqrje._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0c_r3oe._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cdoz9i._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cmu4sk._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0cxjxz0._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d27tlu._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d3fx1z._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dm5oqm._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0dy5g2k._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0e1uaxg._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0e6_t-d._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ets4cd._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0f2u0ul._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0f9p_4f._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0f_jmq2._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0fksz_r._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0fpygqn._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0gym-rp._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0hhlb2_._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0i9phow._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ikyoac._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0j72bti._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jb371p._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jq6cdw._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0jt1d2s._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0kcw8t0._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0kdt9-i._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0l27vs0._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0lc-j_n._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0lna-vq._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0m5woxc._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0mi9xib._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0muy7eg._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0nn0_b5._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0no30or._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0o3sjtx._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0onk5r0._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0pik2ie._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qde3vr._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0qt_r6a._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ry8baf._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0sg4y_2._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0sgjn2j._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0st6oln._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0t0p64l._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0tbl11-._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ve_tqz._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0w4smfx._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0wo4sqj._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0wujjkl._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xbu3yj._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xl1-w6._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0yct1tu._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0yg67t0._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ykw5oe._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__1c1rcl-._.js → [root-of-the-server]__0zznyx2._.js} +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1--u2xl._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-8sj4i._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__10kmcrt._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__10l_-cd._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__10yfcvu._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__112hqrh._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__11c-21i._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__11qbpq8._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__11s1mrd._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__128w1nz._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__12b2kuv._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__12gbq5m._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13nfpq5._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13vl4-h._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__153b7kv._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__157kmse._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__16695dw._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__166_uek._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__16o0ij7._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__175lucf._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__17p53e3._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__17y9pmx._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__18ec5_t._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__18xpvkc._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1925hyw._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__19ew1r2._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__19grunx._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_4v0mh._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_cbcl1._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_wb2uh._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1_xgm2e._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1an6-yb._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1c0ex8m._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1c1e08-._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1c9f4uu._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ci8hc2._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1cs6d52._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1d60scp._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1dicjoc._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1diipl4._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1dp2exz._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1epnstn._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1fjnz2l._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1g5wnt2._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1g9v7bq._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1gon0_4._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1h_59cs._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1h_q3sn._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1hlugb4._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1hux-70._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1i-7bnu._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1i_el2y._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1j6clag._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1k6q17t._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1khvg39._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1lx9lyn._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1m36v6k._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mgu19x._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mhyrr5._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mk_lpu._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1mt32fu._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1n1_2tw._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1na4sdw._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ntihlm._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1odu62n._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1q6xrlt._.js +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1r4x1-y._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rjs_x0._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1rxud0j._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1s5app0._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1sjz59l._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1slo4q_._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1thrazp._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1twtnwr._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1txvsbk._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1uch-60._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1um2jum._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1vnnuo1._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1wegvep._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1wi5roz._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1xa9oiv._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1ypmy86._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1zml9me._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1zrf_a6._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__2019yzl._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20jyxyo._.js +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20ybhif._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__20zl5fr._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__212dyoi._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__218oup-._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__21abvx9._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/_0907rw0._.js +2 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_0mcxq5g._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_0vg6gvw._.js +41 -41
- 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/apps_hub_app_(dashboard)_api_v1_lib_validate_ts_16dhbzz._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/packages_relay_dist_control-plane_03a-9aj.js +6 -6
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__03-x9xy._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__1jqga8h._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0r2xlss._.js +2 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/_14-qzbg._.js +26 -26
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/packages_relay_dist_control-plane_0ve-wz4.js +1 -1
- package/runtime/hub/apps/hub/.next/server/functions-config-manifest.json +24 -0
- package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
- package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
- package/runtime/hub/apps/hub/.next/static/chunks/{31e1wjin30i__.css → 03_fxfc3849ms.css} +1 -1
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/boxes/[id]/[action]/route.ts +4 -2
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/boxes/[id]/git/[op]/route.ts +6 -4
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/boxes/route.ts +2 -1
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/actor.ts +48 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/envelope.ts +5 -2
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/openapi.ts +1687 -52
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/lib/validate.ts +527 -1
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/attach/route.ts +26 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/message/route.ts +34 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/notes/route.ts +26 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/resume/route.ts +26 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/route.ts +34 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/[id]/stop/route.ts +23 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/detect/route.ts +33 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/managers/route.ts +27 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/tasks/route.ts +30 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/managers/route.ts +19 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/managers/sessions/route.ts +22 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/managers/start/route.ts +61 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/rename/route.ts +25 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/rescan/route.ts +20 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/route.ts +34 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/assign/route.ts +33 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/done/route.ts +23 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/route.ts +54 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/tasks/[taskId]/unassign/route.ts +25 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/tasks/assign/route.ts +34 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/tasks/reorder/route.ts +33 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/tasks/route.ts +59 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/[id]/timeline/route.ts +25 -0
- package/runtime/hub/apps/hub/app/(dashboard)/api/v1/workspaces/route.ts +31 -0
- package/runtime/hub/apps/hub/{chunk-SM2XYDPL.js → chunk-FBNAIUXZ.js} +36 -1
- package/runtime/hub/apps/hub/{chunk-F6GOERHP.js → chunk-GGHXBTGL.js} +3 -3
- package/runtime/hub/apps/hub/{chunk-7IIG6MIB.js → chunk-LEELYQVR.js} +9 -9
- package/runtime/hub/apps/hub/{chunk-AAF4CYVH.js → chunk-MD2UNTZR.js} +5 -5
- package/runtime/hub/apps/hub/{chunk-7JBH42LK.js → chunk-MQ7AJUJJ.js} +2 -2
- package/runtime/hub/apps/hub/{chunk-AIFVVQPX.js → chunk-OFJRKISZ.js} +3317 -1031
- package/runtime/hub/apps/hub/{dist-DS5LGBGK.js → dist-3LDUYWPK.js} +7 -1
- package/runtime/hub/apps/hub/{dist-YOTRYCRK.js → dist-DENRW6O5.js} +7 -3
- package/runtime/hub/apps/hub/{dist-BKCL4HAA.js → dist-NQYEPZJY.js} +4 -4
- package/runtime/hub/apps/hub/{dist-H7NIUVBD.js → dist-RIXE6NHS.js} +5 -5
- package/runtime/hub/apps/hub/{dist-YG4RVC24.js → dist-RK6SSH23.js} +5 -5
- package/runtime/hub/apps/hub/{dist-MQADLEEQ.js → dist-U5SDGYOA.js} +4 -4
- package/runtime/hub/apps/hub/{dist-LV6CHJVA.js → dist-U6XVHUNU.js} +4 -4
- package/runtime/hub/apps/hub/{dist-RJBPZWSZ.js → dist-W4YRUL6E.js} +4 -4
- package/runtime/hub/apps/hub/{dist-VENYRIRW.js → dist-Y3Q5YEOC.js} +4 -4
- package/runtime/hub/apps/hub/{hub-worker-DLFLGKCV.js → hub-worker-DVATYYST.js} +6 -6
- package/runtime/hub/apps/hub/lib/backend/background.ts +19 -0
- package/runtime/hub/apps/hub/lib/backend/box-facts.ts +97 -0
- package/runtime/hub/apps/hub/lib/backend/box-prs.ts +213 -0
- package/runtime/hub/apps/hub/lib/backend/deps.ts +99 -0
- package/runtime/hub/apps/hub/lib/backend/errors.ts +7 -0
- package/runtime/hub/apps/hub/lib/backend/github-prs.ts +302 -0
- package/runtime/hub/apps/hub/lib/backend/managers.ts +748 -0
- package/runtime/hub/apps/hub/lib/backend/timeline-lanes.ts +150 -0
- package/runtime/hub/apps/hub/lib/backend/timeline.ts +611 -0
- package/runtime/hub/apps/hub/lib/backend/workspaces.ts +439 -0
- package/runtime/hub/apps/hub/lib/boxes/backend-types.ts +355 -10
- package/runtime/hub/apps/hub/lib/boxes/postgres-source.ts +3 -0
- package/runtime/hub/apps/hub/lib/boxes/source.ts +18 -1
- package/runtime/hub/apps/hub/lib/boxes/types.ts +66 -0
- package/runtime/hub/apps/hub/lib/hub-backend.ts +114 -7
- package/runtime/hub/apps/hub/{prepared-state-FO74QUCP-FZ6PT4LA.js → prepared-state-FO74QUCP-75UBPW5I.js} +2 -2
- package/runtime/hub/apps/hub/server.js +2032 -163
- package/runtime/hub/apps/hub/test/backend-managers-background.test.ts +336 -0
- package/runtime/hub/apps/hub/test/backend-managers.test.ts +493 -0
- package/runtime/hub/apps/hub/test/backend-workspaces.test.ts +208 -0
- package/runtime/hub/apps/hub/test/box-prs.test.ts +198 -0
- package/runtime/hub/apps/hub/test/timeline-lanes.test.ts +261 -0
- package/runtime/hub/apps/hub/test/timeline.test.ts +1185 -0
- package/runtime/hub/apps/hub/test/validate.test.ts +252 -0
- package/runtime/hub/apps/hub/tsconfig.tsbuildinfo +1 -1
- package/runtime/relay/bin.cjs +1399 -616
- package/runtime/vercel/ctl.cjs +1026 -309
- package/share/host-skills/agentbox-info/SKILL.md +25 -4
- package/dist/_cloud-attach-B3BCOZ7U.js +0 -31
- package/dist/chunk-C67DVYWA.js.map +0 -1
- package/dist/chunk-EP4IFSV5.js.map +0 -1
- package/dist/chunk-KCDLAP5Q.js.map +0 -1
- package/dist/chunk-PXH3DERD.js.map +0 -1
- package/dist/chunk-ZUTC2JZM.js.map +0 -1
- package/dist/hub-OMGLWQEV.js +0 -39
- package/dist/prepare-OOZF37J6.js +0 -45
- package/dist/prepared-custody-E7CSZJ6V.js +0 -39
- package/dist/relay-7D5NOFKS.js +0 -22
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__00o_3sf._.js +0 -3
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__08xwxyo._.js +0 -3
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-mtsr6._.js +0 -3
- /package/dist/{_cloud-attach-B3BCOZ7U.js.map → _cloud-attach-UXH3VKTM.js.map} +0 -0
- /package/dist/{chunk-VQONUZE4.js.map → chunk-2W3W3KNR.js.map} +0 -0
- /package/dist/{chunk-RUKTOHK7.js.map → chunk-3AYSA62C.js.map} +0 -0
- /package/dist/{chunk-EXF4PLBN.js.map → chunk-3ISG5THX.js.map} +0 -0
- /package/dist/{chunk-BYZPRB7U.js.map → chunk-5D46PE5V.js.map} +0 -0
- /package/dist/{chunk-IF4VXKJK.js.map → chunk-5F5NBZG7.js.map} +0 -0
- /package/dist/{chunk-IQMDGAMB.js.map → chunk-6N7OSMEA.js.map} +0 -0
- /package/dist/{chunk-L567TKOK.js.map → chunk-BJLUG6TE.js.map} +0 -0
- /package/dist/{chunk-AYREFYEF.js.map → chunk-BV2UZ4SG.js.map} +0 -0
- /package/dist/{chunk-MBZ4UOWF.js.map → chunk-EAT5IEWA.js.map} +0 -0
- /package/dist/{chunk-ENFWBFBI.js.map → chunk-GBEV7ETR.js.map} +0 -0
- /package/dist/{chunk-4NO5MO2P.js.map → chunk-GLIWCNFE.js.map} +0 -0
- /package/dist/{chunk-VWJBQGXD.js.map → chunk-HCKRUAHW.js.map} +0 -0
- /package/dist/{chunk-IFPTD73K.js.map → chunk-HUVSTEJR.js.map} +0 -0
- /package/dist/{chunk-NKHRFR5G.js.map → chunk-IL7R2X6B.js.map} +0 -0
- /package/dist/{chunk-5UX2HAF4.js.map → chunk-IQ4WLVXE.js.map} +0 -0
- /package/dist/{chunk-AAMPHDB2.js.map → chunk-JL4EJ4EH.js.map} +0 -0
- /package/dist/{chunk-OXBWZG2N.js.map → chunk-KTB7JGPA.js.map} +0 -0
- /package/dist/{chunk-YL3VEQTS.js.map → chunk-LFBCFWG6.js.map} +0 -0
- /package/dist/{chunk-MJZPECVQ.js.map → chunk-M2DWTQRF.js.map} +0 -0
- /package/dist/{chunk-2MBELUE6.js.map → chunk-NGCG3IBH.js.map} +0 -0
- /package/dist/{chunk-QT4MOS6R.js.map → chunk-NX27A3F2.js.map} +0 -0
- /package/dist/{chunk-4Y365UYP.js.map → chunk-OUHDSEVQ.js.map} +0 -0
- /package/dist/{chunk-M6VAID7T.js.map → chunk-QBVRWGXD.js.map} +0 -0
- /package/dist/{chunk-VOVRWIBC.js.map → chunk-QLZPJIWF.js.map} +0 -0
- /package/dist/{chunk-GCS5XAPC.js.map → chunk-R3XDO4SN.js.map} +0 -0
- /package/dist/{chunk-IQ6BQ2LX.js.map → chunk-RF7Q7SHU.js.map} +0 -0
- /package/dist/{chunk-YSC4VY43.js.map → chunk-SAEZJZ5Z.js.map} +0 -0
- /package/dist/{chunk-QDVIMN57.js.map → chunk-TDPHZWJI.js.map} +0 -0
- /package/dist/{chunk-QWWDG5B7.js.map → chunk-U5MUWZOS.js.map} +0 -0
- /package/dist/{chunk-LR5RNEVO.js.map → chunk-ULQPPQ23.js.map} +0 -0
- /package/dist/{chunk-75JF44DH.js.map → chunk-VWSERFTW.js.map} +0 -0
- /package/dist/{chunk-4LSLXBFN.js.map → chunk-XFMCRD2J.js.map} +0 -0
- /package/dist/{chunk-X6SZPGL5.js.map → chunk-YNAJUTYC.js.map} +0 -0
- /package/dist/{cli-7JW54ZTA.js.map → cli-HFZMZWRM.js.map} +0 -0
- /package/dist/{cli-7Z7BD23R.js.map → cli-HPYDF5AP.js.map} +0 -0
- /package/dist/{cli-HFLU5QTD.js.map → cli-PWK63DQI.js.map} +0 -0
- /package/dist/{cli-KT5X4J74.js.map → cli-RC5F6DYP.js.map} +0 -0
- /package/dist/{cli-XRF7WFE5.js.map → cli-S7RGCNHG.js.map} +0 -0
- /package/dist/{control-plane-DGLF4MBB.js.map → control-plane-HRJRAYKV.js.map} +0 -0
- /package/dist/{cp-hub-upload-7YESYCVS.js.map → cp-hub-upload-N4PPUZHE.js.map} +0 -0
- /package/dist/{custody-client-P7SCEDU2.js.map → custody-client-KYEZET6C.js.map} +0 -0
- /package/dist/{deploy-hetzner-FOCNRRB2.js.map → deploy-hetzner-A42GILM3.js.map} +0 -0
- /package/dist/{dist-2CAWJQT5.js.map → dist-5OXP2N6H.js.map} +0 -0
- /package/dist/{dist-36WLI6E2.js.map → dist-64QL2Q5L.js.map} +0 -0
- /package/dist/{dist-63YBVZW4.js.map → dist-D4LLY6JV.js.map} +0 -0
- /package/dist/{dist-CBPQZPQN.js.map → dist-ETGTZQUT.js.map} +0 -0
- /package/dist/{dist-54VRDCUU.js.map → dist-GS36Y2CW.js.map} +0 -0
- /package/dist/{dist-FHPNYDCF.js.map → dist-HGUSK4LL.js.map} +0 -0
- /package/dist/{dist-E4VLIH3H.js.map → dist-JU5COR7Y.js.map} +0 -0
- /package/dist/{dist-MITAKWKQ.js.map → dist-NJ2U42MZ.js.map} +0 -0
- /package/dist/{dist-TJJ6KBNZ.js.map → dist-URWWHI3X.js.map} +0 -0
- /package/dist/{dist-XSAPZOEG.js.map → dist-Z4S5EKUS.js.map} +0 -0
- /package/dist/{host-reach-drainer-XFLSMTSX.js.map → host-reach-drainer-WIKLZSLZ.js.map} +0 -0
- /package/dist/{hub-OMGLWQEV.js.map → host-session-YP5RKV6T.js.map} +0 -0
- /package/dist/{hub-adopt-IYZ3WXYN.js.map → hub-A6U3YB5D.js.map} +0 -0
- /package/dist/{hub-api-client-WOZ2BQ6H.js.map → hub-adopt-O4LQLW6N.js.map} +0 -0
- /package/dist/{prepare-OOZF37J6.js.map → hub-api-client-BI3E37CF.js.map} +0 -0
- /package/dist/{hub-docker-target-IQHX6OYX.js.map → hub-docker-target-D67UXZSU.js.map} +0 -0
- /package/dist/{plugin-update-2ACFHFUI.js.map → plugin-update-LI3QDA4K.js.map} +0 -0
- /package/dist/{prepared-custody-E7CSZJ6V.js.map → prepare-5Y7DWMZ7.js.map} +0 -0
- /package/dist/{prepared-state-FO74QUCP-PZLOM6HD.js.map → prepared-custody-L6PXXLD3.js.map} +0 -0
- /package/dist/{registry-X33JZU6B.js.map → prepared-state-FO74QUCP-M4Q2X3KN.js.map} +0 -0
- /package/dist/{publish-credentials-TO5IIW2T.js.map → publish-credentials-WJ4KLIMW.js.map} +0 -0
- /package/dist/{relay-7D5NOFKS.js.map → registry-6VF5VPGD.js.map} +0 -0
- /package/dist/{remote-docker-share-YADHIHXV.js.map → relay-732OVYXR.js.map} +0 -0
- /package/dist/{tool-grant-push-7G2QAN3J.js.map → tool-grant-push-YQYYNMRQ.js.map} +0 -0
- /package/runtime/hub/apps/hub/.next/static/{o9_g9S5JH-r8bfNfmPa5H → psd9s1F7NglKqhj4_onRN}/_buildManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{o9_g9S5JH-r8bfNfmPa5H → psd9s1F7NglKqhj4_onRN}/_clientMiddlewareManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{o9_g9S5JH-r8bfNfmPa5H → psd9s1F7NglKqhj4_onRN}/_ssgManifest.js +0 -0
package/runtime/hetzner/ctl.cjs
CHANGED
|
@@ -11445,11 +11445,11 @@ var init_base = __esm({
|
|
|
11445
11445
|
"use strict";
|
|
11446
11446
|
import_node_tty = __toESM(require("tty"), 1);
|
|
11447
11447
|
hasColors = import_node_tty.default?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
11448
|
-
format = (
|
|
11448
|
+
format = (open5, close) => {
|
|
11449
11449
|
if (!hasColors) {
|
|
11450
11450
|
return (input) => input;
|
|
11451
11451
|
}
|
|
11452
|
-
const openCode = `\x1B[${
|
|
11452
|
+
const openCode = `\x1B[${open5}m`;
|
|
11453
11453
|
const closeCode = `\x1B[${close}m`;
|
|
11454
11454
|
return (input) => {
|
|
11455
11455
|
const string = input + "";
|
|
@@ -11754,15 +11754,15 @@ var require_windows = __commonJS({
|
|
|
11754
11754
|
}
|
|
11755
11755
|
return false;
|
|
11756
11756
|
}
|
|
11757
|
-
function checkStat(
|
|
11758
|
-
if (!
|
|
11757
|
+
function checkStat(stat19, path6, options) {
|
|
11758
|
+
if (!stat19.isSymbolicLink() && !stat19.isFile()) {
|
|
11759
11759
|
return false;
|
|
11760
11760
|
}
|
|
11761
11761
|
return checkPathExt(path6, options);
|
|
11762
11762
|
}
|
|
11763
11763
|
function isexe(path6, options, cb) {
|
|
11764
|
-
fs2.stat(path6, function(er,
|
|
11765
|
-
cb(er, er ? false : checkStat(
|
|
11764
|
+
fs2.stat(path6, function(er, stat19) {
|
|
11765
|
+
cb(er, er ? false : checkStat(stat19, path6, options));
|
|
11766
11766
|
});
|
|
11767
11767
|
}
|
|
11768
11768
|
function sync(path6, options) {
|
|
@@ -11779,20 +11779,20 @@ var require_mode = __commonJS({
|
|
|
11779
11779
|
isexe.sync = sync;
|
|
11780
11780
|
var fs2 = require("fs");
|
|
11781
11781
|
function isexe(path6, options, cb) {
|
|
11782
|
-
fs2.stat(path6, function(er,
|
|
11783
|
-
cb(er, er ? false : checkStat(
|
|
11782
|
+
fs2.stat(path6, function(er, stat19) {
|
|
11783
|
+
cb(er, er ? false : checkStat(stat19, options));
|
|
11784
11784
|
});
|
|
11785
11785
|
}
|
|
11786
11786
|
function sync(path6, options) {
|
|
11787
11787
|
return checkStat(fs2.statSync(path6), options);
|
|
11788
11788
|
}
|
|
11789
|
-
function checkStat(
|
|
11790
|
-
return
|
|
11789
|
+
function checkStat(stat19, options) {
|
|
11790
|
+
return stat19.isFile() && checkMode(stat19, options);
|
|
11791
11791
|
}
|
|
11792
|
-
function checkMode(
|
|
11793
|
-
var mod =
|
|
11794
|
-
var uid =
|
|
11795
|
-
var gid =
|
|
11792
|
+
function checkMode(stat19, options) {
|
|
11793
|
+
var mod = stat19.mode;
|
|
11794
|
+
var uid = stat19.uid;
|
|
11795
|
+
var gid = stat19.gid;
|
|
11796
11796
|
var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
|
|
11797
11797
|
var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
|
|
11798
11798
|
var u2 = parseInt("100", 8);
|
|
@@ -12211,7 +12211,7 @@ var require_cross_spawn = __commonJS({
|
|
|
12211
12211
|
var cp2 = require("child_process");
|
|
12212
12212
|
var parse = require_parse();
|
|
12213
12213
|
var enoent = require_enoent();
|
|
12214
|
-
function
|
|
12214
|
+
function spawn15(command, args, options) {
|
|
12215
12215
|
const parsed = parse(command, args, options);
|
|
12216
12216
|
const spawned = cp2.spawn(parsed.command, parsed.args, parsed.options);
|
|
12217
12217
|
enoent.hookChildProcess(spawned, parsed);
|
|
@@ -12223,8 +12223,8 @@ var require_cross_spawn = __commonJS({
|
|
|
12223
12223
|
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
12224
12224
|
return result;
|
|
12225
12225
|
}
|
|
12226
|
-
module2.exports =
|
|
12227
|
-
module2.exports.spawn =
|
|
12226
|
+
module2.exports = spawn15;
|
|
12227
|
+
module2.exports.spawn = spawn15;
|
|
12228
12228
|
module2.exports.sync = spawnSync2;
|
|
12229
12229
|
module2.exports._parse = parse;
|
|
12230
12230
|
module2.exports._enoent = enoent;
|
|
@@ -22815,6 +22815,7 @@ __export(dist_exports3, {
|
|
|
22815
22815
|
AGENTBOX_HUB_SSH_ALIAS: () => AGENTBOX_HUB_SSH_ALIAS,
|
|
22816
22816
|
AGENTS_STATIC_BOX_DIR: () => AGENTS_STATIC_BOX_DIR,
|
|
22817
22817
|
AGENT_SEED_MARKER: () => AGENT_SEED_MARKER,
|
|
22818
|
+
AGENT_SESSION_ENV_VARS: () => AGENT_SESSION_ENV_VARS,
|
|
22818
22819
|
AGENT_SYNC_SPECS: () => AGENT_SYNC_SPECS,
|
|
22819
22820
|
AgentInstallError: () => AgentInstallError,
|
|
22820
22821
|
BACKUP_GITIGNORE_ENTRY: () => BACKUP_GITIGNORE_ENTRY,
|
|
@@ -22898,6 +22899,7 @@ __export(dist_exports3, {
|
|
|
22898
22899
|
botDir: () => botDir,
|
|
22899
22900
|
botWorkspaceRoot: () => botWorkspaceRoot,
|
|
22900
22901
|
boxGitCheckout: () => boxGitCheckout,
|
|
22902
|
+
boxGitCurrentBranch: () => boxGitCurrentBranch,
|
|
22901
22903
|
boxGitNewBranch: () => boxGitNewBranch,
|
|
22902
22904
|
boxGitPull: () => boxGitPull,
|
|
22903
22905
|
boxGitPush: () => boxGitPush,
|
|
@@ -23112,6 +23114,7 @@ __export(dist_exports3, {
|
|
|
23112
23114
|
scpDownload: () => scpDownload,
|
|
23113
23115
|
scpUpload: () => scpUpload,
|
|
23114
23116
|
scratchBranchName: () => scratchBranchName,
|
|
23117
|
+
scrubAgentSessionEnv: () => scrubAgentSessionEnv,
|
|
23115
23118
|
secretsEnvPath: () => secretsEnvPath,
|
|
23116
23119
|
seedAgentsVolume: () => seedAgentsVolume,
|
|
23117
23120
|
seedExcludeTarArgs: () => seedExcludeTarArgs,
|
|
@@ -24258,6 +24261,12 @@ function scratchBranchName(name) {
|
|
|
24258
24261
|
function boxGitCheckout(provider, box, branch, extraArgs = []) {
|
|
24259
24262
|
return run4(provider, box, ["git", "checkout", branch, ...extraArgs]);
|
|
24260
24263
|
}
|
|
24264
|
+
async function boxGitCurrentBranch(provider, box) {
|
|
24265
|
+
const r = await run4(provider, box, ["git", "symbolic-ref", "--quiet", "--short", "HEAD"]).catch(
|
|
24266
|
+
() => void 0
|
|
24267
|
+
);
|
|
24268
|
+
return r?.exitCode === 0 ? r.stdout.trim() || void 0 : void 0;
|
|
24269
|
+
}
|
|
24261
24270
|
function boxGitNewBranch(provider, box, name, from) {
|
|
24262
24271
|
const argv = ["git", "checkout", "-b", scratchBranchName(name)];
|
|
24263
24272
|
if (from && from.trim()) argv.push(from.trim());
|
|
@@ -24541,6 +24550,11 @@ function resolveCliEntry() {
|
|
|
24541
24550
|
}
|
|
24542
24551
|
return null;
|
|
24543
24552
|
}
|
|
24553
|
+
function scrubAgentSessionEnv(env) {
|
|
24554
|
+
const out = { ...env };
|
|
24555
|
+
for (const key of [...AGENT_SESSION_ENV_VARS, "TMUX", "TMUX_PANE"]) delete out[key];
|
|
24556
|
+
return out;
|
|
24557
|
+
}
|
|
24544
24558
|
function stagedRuntimeRootCandidates(self) {
|
|
24545
24559
|
const candidates = [];
|
|
24546
24560
|
const override2 = process.env[RUNTIME_ROOT_ENV];
|
|
@@ -24554,15 +24568,15 @@ function resolveStagedRuntimeRoot(self, marker) {
|
|
|
24554
24568
|
}
|
|
24555
24569
|
return void 0;
|
|
24556
24570
|
}
|
|
24557
|
-
function sharedRuntimeAssetPath(
|
|
24571
|
+
function sharedRuntimeAssetPath(basename52) {
|
|
24558
24572
|
const roots = [];
|
|
24559
24573
|
const stamped = process.env[CLI_RUNTIME_DIR_ENV];
|
|
24560
24574
|
if (stamped) roots.push(stamped);
|
|
24561
24575
|
const self = (0, import_path24.dirname)((0, import_url3.fileURLToPath)(import_meta.url));
|
|
24562
|
-
const found = resolveStagedRuntimeRoot(self, `_shared/${
|
|
24576
|
+
const found = resolveStagedRuntimeRoot(self, `_shared/${basename52}`);
|
|
24563
24577
|
if (found) roots.push(found);
|
|
24564
24578
|
for (const root of roots) {
|
|
24565
|
-
const p = (0, import_path24.resolve)(root, "_shared",
|
|
24579
|
+
const p = (0, import_path24.resolve)(root, "_shared", basename52);
|
|
24566
24580
|
if ((0, import_fs10.existsSync)(p)) return p;
|
|
24567
24581
|
}
|
|
24568
24582
|
return null;
|
|
@@ -24768,7 +24782,9 @@ async function spawnHub(hubServer, cliEntry, log, portlessEnabled, exposedEnv) {
|
|
|
24768
24782
|
detached: true,
|
|
24769
24783
|
stdio: ["ignore", logFd, logFd],
|
|
24770
24784
|
env: {
|
|
24771
|
-
|
|
24785
|
+
// A hub started from inside an agent session must not pass that session's
|
|
24786
|
+
// identity to the managers it runs.
|
|
24787
|
+
...scrubAgentSessionEnv(process.env),
|
|
24772
24788
|
// The staged hub is a production Next build; force production so server.ts
|
|
24773
24789
|
// takes the standalone path (dev mode would load webpack, which the
|
|
24774
24790
|
// standalone build prunes).
|
|
@@ -26115,17 +26131,17 @@ function buildHostEnvFindArgs(patterns) {
|
|
|
26115
26131
|
")"
|
|
26116
26132
|
];
|
|
26117
26133
|
}
|
|
26118
|
-
async function findEnvFilesForTar(
|
|
26134
|
+
async function findEnvFilesForTar(workspaceDir2, patterns) {
|
|
26119
26135
|
if (patterns.length === 0) return [];
|
|
26120
26136
|
const found = await execa("find", buildHostEnvFindArgs(patterns).slice(1), {
|
|
26121
|
-
cwd:
|
|
26137
|
+
cwd: workspaceDir2,
|
|
26122
26138
|
reject: false
|
|
26123
26139
|
});
|
|
26124
26140
|
if (found.exitCode !== 0) return [];
|
|
26125
26141
|
return String(found.stdout).split("\0").filter((p) => p.length > 0);
|
|
26126
26142
|
}
|
|
26127
|
-
async function scanHostEnvFiles(
|
|
26128
|
-
const raw = await findEnvFilesForTar(
|
|
26143
|
+
async function scanHostEnvFiles(workspaceDir2, patterns) {
|
|
26144
|
+
const raw = await findEnvFilesForTar(workspaceDir2, patterns);
|
|
26129
26145
|
return raw.map((p) => p.replace(/^\.\//, "")).filter((p) => p.length > 0);
|
|
26130
26146
|
}
|
|
26131
26147
|
async function pushEnvFiles(ctx, transport, patterns) {
|
|
@@ -26763,8 +26779,8 @@ async function resolveBotBundle(projectRoot, bot, stamp) {
|
|
|
26763
26779
|
}
|
|
26764
26780
|
const dir = (0, import_path34.join)(base, chosen);
|
|
26765
26781
|
const manifest = await readBackupManifest(dir);
|
|
26766
|
-
const
|
|
26767
|
-
if (!(await (0, import_promises51.lstat)(
|
|
26782
|
+
const workspaceDir2 = (0, import_path34.join)(dir, "workspace");
|
|
26783
|
+
if (!(await (0, import_promises51.lstat)(workspaceDir2).catch(() => null))?.isDirectory()) {
|
|
26768
26784
|
throw new Error(`${dir}: the backup has no workspace/ directory`);
|
|
26769
26785
|
}
|
|
26770
26786
|
const stateDir = (0, import_path34.join)(dir, "state");
|
|
@@ -26774,7 +26790,7 @@ async function resolveBotBundle(projectRoot, bot, stamp) {
|
|
|
26774
26790
|
bot: manifest.bot,
|
|
26775
26791
|
stamp: chosen,
|
|
26776
26792
|
manifest,
|
|
26777
|
-
workspaceDir,
|
|
26793
|
+
workspaceDir: workspaceDir2,
|
|
26778
26794
|
...hasState ? { stateDir } : {}
|
|
26779
26795
|
};
|
|
26780
26796
|
}
|
|
@@ -28431,7 +28447,7 @@ async function listAvailableSources(spec, env = process.env) {
|
|
|
28431
28447
|
}
|
|
28432
28448
|
return out;
|
|
28433
28449
|
}
|
|
28434
|
-
var import_promises29, import_os3, import_path14, import_promises30, import_promises31, import_path15, import_child_process, import_fs3, import_os4, import_path16, import_fs4, import_os5, import_path17, import_fs5, import_promises32, import_os6, import_path18, import_promises33, import_promises34, import_path19, import_promises35, import_os7, import_crypto3, import_fs6, import_promises36, import_net, import_os8, import_path20, import_fs7, import_os9, import_path21, import_fs8, import_http, import_net2, import_path22, import_promises37, import_url, import_child_process2, import_fs9, import_promises38, import_os10, import_path23, import_promises39, import_url2, import_fs10, import_path24, import_url3, import_promises40, import_os11, import_path25, import_promises41, import_os12, import_path26, import_promises42, import_promises43, import_os13, import_path27, import_promises44, import_os14, import_path28, import_promises45, import_os15, import_path29, import_os16, import_promises46, import_os17, import_path30, import_promises47, import_os18, import_path31, import_promises48, import_path32, import_promises49, import_crypto4, import_promises50, import_path33, import_promises51, import_path34, import_crypto5, import_promises52, import_path35, import_promises53, import_os19, import_path36, import_promises54, import_path37, import_promises55, import_crypto6, import_promises56, import_os20, import_path38, import_promises57, import_os21, import_path39, import_crypto7, import_fs11, import_promises58, import_os22, import_path40, import_path41, import_promises59, import_os23, import_path42, import_promises60, import_path43, import_meta, STATE_DIR2, STATE_FILE, EMPTY2, LOCK_STALE_MS2, LOCK_ACQUIRE_TIMEOUT_MS2, LOCK_RETRY_MS2, GitWorktreeError, AGENTBOX_HUB_SSH_ALIAS, INCLUDE_BEGIN, INCLUDE_END, EXPOSED_HUB_PROFILE, PLUGINS_FILE, SUPPORTED_SDK_API_VERSIONS, PLUGINS_FILE_VERSION, EMPTY22, LOCK_STALE_MS22, LOCK_ACQUIRE_TIMEOUT_MS22, LOCK_RETRY_MS22, FALLBACK_CAPABILITIES, HOST, SshTunnelManager, OPEN_INBOUND_SOURCES, BOX_WORKSPACE, activePublisher, FALLBACK_RELAY_PORT, RELAY_PORT_ENV, override, RUNTIME_ROOT_ENV, CLI_RUNTIME_DIR_ENV, activePortless, dockerContext, STATE_DIR22, HUB_PID_FILE, RELAY_PID_FILE, HUB_LOG_FILE, HUB_TOKEN_FILE, HOST2, LOOPBACK_HOST, NODE_MIN, CP_DIR, activeRefresher, AGENT_SYNC_SPECS, SEED_MARKER, CLAUDE_HOST_BACKUP, MAX_CREDENTIAL_BYTES, DEFAULT_CAPS, PULL_CATEGORIES, SKILL_EXCLUDE_PREFIXES, CONTAINER_PLUGINS_PREFIX, CLAUDE_BOX_CONFIG_DIR, CODEX_BOX_CONFIG_DIR, OPENCODE_BOX_DATA_DIR, CLAUDE_PULL_DIR_CATEGORIES, CODEX_PULL_ITEMS, OPENCODE_PULL_DATA_ITEMS, OPENCODE_PULL_CONFIG_ITEMS, CLAUDE_REGISTRY_FILES, AGENT_SEED_MARKER, AgentInstallError, DEFAULT_ENV_PATTERNS, ENV_PRUNE_DIRS, BOX_HOME2, BOX_CLAUDE_PROJECT_DIR, NON_REGULAR_TOKEN, MODULES, BOTS_DIR_REL, BACKUP_GITIGNORE_ENTRY, STAMP_RE, DEFAULT_BACKUP_KEEP, SOURCE_READ_TIMEOUT_MS, WORKSPACE_EXCLUDE_DIR_NAMES, GIT_MODE_EXCLUDE_DIRS, REMOTE_TAR, MAX_PAYLOAD_BYTES, BoxProbeError, FILELIST_NAME, BOX_WORKFLOWS_DIR, BOX_DYNAMIC_SYNC_MANIFEST, BOX_MEMORY_DIR, SET_NAMES, STAGE_WRITABLE_CHMOD, STAGE_NO_SPECIALS, AGENTS_STATIC_BOX_DIR, DOCKER_CONTEXT_FILE_MAP, BOX_IMAGE_REGISTRY, HUB_WORKER_CLONE_PREFIX, DEFAULT_CP_EXCLUDES, DENYLIST_DEST_PREFIXES, DENYLIST_DEST_EXACT, CARRY_TOPIC, CARRY_GRANT_TOPIC, CARRY_NON_INTERACTIVE_HINT, MODEL_AUTH_TOPIC, MODEL_AUTH_SETTING, MODEL_AUTH_NONE;
|
|
28450
|
+
var import_promises29, import_os3, import_path14, import_promises30, import_promises31, import_path15, import_child_process, import_fs3, import_os4, import_path16, import_fs4, import_os5, import_path17, import_fs5, import_promises32, import_os6, import_path18, import_promises33, import_promises34, import_path19, import_promises35, import_os7, import_crypto3, import_fs6, import_promises36, import_net, import_os8, import_path20, import_fs7, import_os9, import_path21, import_fs8, import_http, import_net2, import_path22, import_promises37, import_url, import_child_process2, import_fs9, import_promises38, import_os10, import_path23, import_promises39, import_url2, import_fs10, import_path24, import_url3, import_promises40, import_os11, import_path25, import_promises41, import_os12, import_path26, import_promises42, import_promises43, import_os13, import_path27, import_promises44, import_os14, import_path28, import_promises45, import_os15, import_path29, import_os16, import_promises46, import_os17, import_path30, import_promises47, import_os18, import_path31, import_promises48, import_path32, import_promises49, import_crypto4, import_promises50, import_path33, import_promises51, import_path34, import_crypto5, import_promises52, import_path35, import_promises53, import_os19, import_path36, import_promises54, import_path37, import_promises55, import_crypto6, import_promises56, import_os20, import_path38, import_promises57, import_os21, import_path39, import_crypto7, import_fs11, import_promises58, import_os22, import_path40, import_path41, import_promises59, import_os23, import_path42, import_promises60, import_path43, import_meta, STATE_DIR2, STATE_FILE, EMPTY2, LOCK_STALE_MS2, LOCK_ACQUIRE_TIMEOUT_MS2, LOCK_RETRY_MS2, GitWorktreeError, AGENTBOX_HUB_SSH_ALIAS, INCLUDE_BEGIN, INCLUDE_END, EXPOSED_HUB_PROFILE, PLUGINS_FILE, SUPPORTED_SDK_API_VERSIONS, PLUGINS_FILE_VERSION, EMPTY22, LOCK_STALE_MS22, LOCK_ACQUIRE_TIMEOUT_MS22, LOCK_RETRY_MS22, FALLBACK_CAPABILITIES, HOST, SshTunnelManager, OPEN_INBOUND_SOURCES, BOX_WORKSPACE, activePublisher, FALLBACK_RELAY_PORT, RELAY_PORT_ENV, override, AGENT_SESSION_ENV_VARS, RUNTIME_ROOT_ENV, CLI_RUNTIME_DIR_ENV, activePortless, dockerContext, STATE_DIR22, HUB_PID_FILE, RELAY_PID_FILE, HUB_LOG_FILE, HUB_TOKEN_FILE, HOST2, LOOPBACK_HOST, NODE_MIN, CP_DIR, activeRefresher, AGENT_SYNC_SPECS, SEED_MARKER, CLAUDE_HOST_BACKUP, MAX_CREDENTIAL_BYTES, DEFAULT_CAPS, PULL_CATEGORIES, SKILL_EXCLUDE_PREFIXES, CONTAINER_PLUGINS_PREFIX, CLAUDE_BOX_CONFIG_DIR, CODEX_BOX_CONFIG_DIR, OPENCODE_BOX_DATA_DIR, CLAUDE_PULL_DIR_CATEGORIES, CODEX_PULL_ITEMS, OPENCODE_PULL_DATA_ITEMS, OPENCODE_PULL_CONFIG_ITEMS, CLAUDE_REGISTRY_FILES, AGENT_SEED_MARKER, AgentInstallError, DEFAULT_ENV_PATTERNS, ENV_PRUNE_DIRS, BOX_HOME2, BOX_CLAUDE_PROJECT_DIR, NON_REGULAR_TOKEN, MODULES, BOTS_DIR_REL, BACKUP_GITIGNORE_ENTRY, STAMP_RE, DEFAULT_BACKUP_KEEP, SOURCE_READ_TIMEOUT_MS, WORKSPACE_EXCLUDE_DIR_NAMES, GIT_MODE_EXCLUDE_DIRS, REMOTE_TAR, MAX_PAYLOAD_BYTES, BoxProbeError, FILELIST_NAME, BOX_WORKFLOWS_DIR, BOX_DYNAMIC_SYNC_MANIFEST, BOX_MEMORY_DIR, SET_NAMES, STAGE_WRITABLE_CHMOD, STAGE_NO_SPECIALS, AGENTS_STATIC_BOX_DIR, DOCKER_CONTEXT_FILE_MAP, BOX_IMAGE_REGISTRY, HUB_WORKER_CLONE_PREFIX, DEFAULT_CP_EXCLUDES, DENYLIST_DEST_PREFIXES, DENYLIST_DEST_EXACT, CARRY_TOPIC, CARRY_GRANT_TOPIC, CARRY_NON_INTERACTIVE_HINT, MODEL_AUTH_TOPIC, MODEL_AUTH_SETTING, MODEL_AUTH_NONE;
|
|
28435
28451
|
var init_dist4 = __esm({
|
|
28436
28452
|
"../sandbox-core/dist/index.js"() {
|
|
28437
28453
|
"use strict";
|
|
@@ -28874,6 +28890,25 @@ var init_dist4 = __esm({
|
|
|
28874
28890
|
FALLBACK_RELAY_PORT = 8787;
|
|
28875
28891
|
RELAY_PORT_ENV = "AGENTBOX_RELAY_PORT";
|
|
28876
28892
|
override = null;
|
|
28893
|
+
AGENT_SESSION_ENV_VARS = [
|
|
28894
|
+
"CLAUDECODE",
|
|
28895
|
+
"CLAUDE_PID",
|
|
28896
|
+
"CLAUDE_CODE_SESSION_ID",
|
|
28897
|
+
"CLAUDE_CODE_BRIDGE_SESSION_ID",
|
|
28898
|
+
"CLAUDE_CODE_CHILD_SESSION",
|
|
28899
|
+
"CLAUDE_CODE_ENTRYPOINT",
|
|
28900
|
+
"CLAUDE_CODE_EXECPATH",
|
|
28901
|
+
"CLAUDE_CODE_MESSAGING_SOCKET",
|
|
28902
|
+
"CLAUDE_CODE_MESSAGING_TOKEN",
|
|
28903
|
+
"CLAUDE_CODE_SESSION_ATTENDED",
|
|
28904
|
+
"CLAUDE_CODE_SESSION_KIND",
|
|
28905
|
+
"CLAUDE_AGENTS_SELECT",
|
|
28906
|
+
"CLAUDE_BG_BACKEND",
|
|
28907
|
+
"CLAUDE_BG_SOCKET_TOKENS_PATH",
|
|
28908
|
+
"CODEX_THREAD_ID",
|
|
28909
|
+
"AGENTBOX_MANAGER",
|
|
28910
|
+
"AGENTBOX_WORKSPACE"
|
|
28911
|
+
];
|
|
28877
28912
|
RUNTIME_ROOT_ENV = "AGENTBOX_RUNTIME_ROOT";
|
|
28878
28913
|
CLI_RUNTIME_DIR_ENV = "AGENTBOX_CLI_RUNTIME_DIR";
|
|
28879
28914
|
STATE_DIR22 = (0, import_path23.join)((0, import_os10.homedir)(), ".agentbox");
|
|
@@ -30241,7 +30276,7 @@ var init_sql = __esm({
|
|
|
30241
30276
|
return new SQL([new StringChunk(str)]);
|
|
30242
30277
|
}
|
|
30243
30278
|
sql2.raw = raw;
|
|
30244
|
-
function
|
|
30279
|
+
function join36(chunks, separator) {
|
|
30245
30280
|
const result = [];
|
|
30246
30281
|
for (const [i2, chunk] of chunks.entries()) {
|
|
30247
30282
|
if (i2 > 0 && separator !== void 0) {
|
|
@@ -30251,7 +30286,7 @@ var init_sql = __esm({
|
|
|
30251
30286
|
}
|
|
30252
30287
|
return new SQL(result);
|
|
30253
30288
|
}
|
|
30254
|
-
sql2.join =
|
|
30289
|
+
sql2.join = join36;
|
|
30255
30290
|
function identifier(value) {
|
|
30256
30291
|
return new Name(value);
|
|
30257
30292
|
}
|
|
@@ -34412,7 +34447,7 @@ var init_select2 = __esm({
|
|
|
34412
34447
|
const baseTableName = this.tableName;
|
|
34413
34448
|
const tableName = getTableLikeName(table);
|
|
34414
34449
|
for (const item of extractUsedTable(table)) this.usedTables.add(item);
|
|
34415
|
-
if (typeof tableName === "string" && this.config.joins?.some((
|
|
34450
|
+
if (typeof tableName === "string" && this.config.joins?.some((join36) => join36.alias === tableName)) {
|
|
34416
34451
|
throw new Error(`Alias "${tableName}" is already used in this query`);
|
|
34417
34452
|
}
|
|
34418
34453
|
if (!this.isPartialSelect) {
|
|
@@ -35947,7 +35982,7 @@ var init_update = __esm({
|
|
|
35947
35982
|
createJoin(joinType) {
|
|
35948
35983
|
return (table, on6) => {
|
|
35949
35984
|
const tableName = getTableLikeName(table);
|
|
35950
|
-
if (typeof tableName === "string" && this.config.joins.some((
|
|
35985
|
+
if (typeof tableName === "string" && this.config.joins.some((join36) => join36.alias === tableName)) {
|
|
35951
35986
|
throw new Error(`Alias "${tableName}" is already used in this query`);
|
|
35952
35987
|
}
|
|
35953
35988
|
if (typeof on6 === "function") {
|
|
@@ -36043,10 +36078,10 @@ var init_update = __esm({
|
|
|
36043
36078
|
const fromFields = this.getTableLikeFields(this.config.from);
|
|
36044
36079
|
fields[tableName] = fromFields;
|
|
36045
36080
|
}
|
|
36046
|
-
for (const
|
|
36047
|
-
const tableName2 = getTableLikeName(
|
|
36048
|
-
if (typeof tableName2 === "string" && !is(
|
|
36049
|
-
const fromFields = this.getTableLikeFields(
|
|
36081
|
+
for (const join36 of this.config.joins) {
|
|
36082
|
+
const tableName2 = getTableLikeName(join36.table);
|
|
36083
|
+
if (typeof tableName2 === "string" && !is(join36.table, SQL)) {
|
|
36084
|
+
const fromFields = this.getTableLikeFields(join36.table);
|
|
36050
36085
|
fields[tableName2] = fromFields;
|
|
36051
36086
|
}
|
|
36052
36087
|
}
|
|
@@ -38812,7 +38847,7 @@ var init_select3 = __esm({
|
|
|
38812
38847
|
const baseTableName = this.tableName;
|
|
38813
38848
|
const tableName = getTableLikeName(table);
|
|
38814
38849
|
for (const item of extractUsedTable2(table)) this.usedTables.add(item);
|
|
38815
|
-
if (typeof tableName === "string" && this.config.joins?.some((
|
|
38850
|
+
if (typeof tableName === "string" && this.config.joins?.some((join36) => join36.alias === tableName)) {
|
|
38816
38851
|
throw new Error(`Alias "${tableName}" is already used in this query`);
|
|
38817
38852
|
}
|
|
38818
38853
|
if (!this.isPartialSelect) {
|
|
@@ -39702,7 +39737,7 @@ var init_update2 = __esm({
|
|
|
39702
39737
|
createJoin(joinType) {
|
|
39703
39738
|
return (table, on6) => {
|
|
39704
39739
|
const tableName = getTableLikeName(table);
|
|
39705
|
-
if (typeof tableName === "string" && this.config.joins.some((
|
|
39740
|
+
if (typeof tableName === "string" && this.config.joins.some((join36) => join36.alias === tableName)) {
|
|
39706
39741
|
throw new Error(`Alias "${tableName}" is already used in this query`);
|
|
39707
39742
|
}
|
|
39708
39743
|
if (typeof on6 === "function") {
|
|
@@ -40734,13 +40769,13 @@ function isConnectionLevelError(err) {
|
|
|
40734
40769
|
const msg = err instanceof Error ? err.message : String(err);
|
|
40735
40770
|
return /\b(ECONNREFUSED|ENOTFOUND|EHOSTUNREACH|ECONNRESET|EPIPE)\b/.test(msg);
|
|
40736
40771
|
}
|
|
40737
|
-
var import_http2, import_https,
|
|
40772
|
+
var import_http2, import_https, import_promises67, BACKOFF_BASE_MS, BACKOFF_MAX_MS, REQUEST_TIMEOUT_MS, FAST_REQUEST_TIMEOUT_MS, FAST_MODE_DECAY_POLLS, STOPPED_TICK_MS, CONNECTION_LEVEL_CODES, CloudBoxPoller, CloudBoxPollers;
|
|
40738
40773
|
var init_chunk_Q5KIPAZI = __esm({
|
|
40739
40774
|
"../relay/dist/chunk-Q5KIPAZI.js"() {
|
|
40740
40775
|
"use strict";
|
|
40741
40776
|
import_http2 = require("http");
|
|
40742
40777
|
import_https = require("https");
|
|
40743
|
-
|
|
40778
|
+
import_promises67 = require("timers/promises");
|
|
40744
40779
|
BACKOFF_BASE_MS = 1500;
|
|
40745
40780
|
BACKOFF_MAX_MS = 3e4;
|
|
40746
40781
|
REQUEST_TIMEOUT_MS = 25e3;
|
|
@@ -40906,12 +40941,12 @@ var init_chunk_Q5KIPAZI = __esm({
|
|
|
40906
40941
|
if (this.currentBackoffMs === 0 && this.fastModePolls > 0) {
|
|
40907
40942
|
this.fastModePolls -= 1;
|
|
40908
40943
|
}
|
|
40909
|
-
if (this.currentBackoffMs === 0) await (0,
|
|
40944
|
+
if (this.currentBackoffMs === 0) await (0, import_promises67.setTimeout)(STOPPED_TICK_MS);
|
|
40910
40945
|
}
|
|
40911
40946
|
}
|
|
40912
40947
|
async backoff() {
|
|
40913
40948
|
this.currentBackoffMs = this.currentBackoffMs === 0 ? BACKOFF_BASE_MS : Math.min(this.currentBackoffMs * 2, BACKOFF_MAX_MS);
|
|
40914
|
-
await (0,
|
|
40949
|
+
await (0, import_promises67.setTimeout)(this.currentBackoffMs);
|
|
40915
40950
|
}
|
|
40916
40951
|
async tryRecoverPreviewUrl() {
|
|
40917
40952
|
if (!this.deps.recoverPreviewUrl) return;
|
|
@@ -43513,7 +43548,7 @@ var cpCommand = new Command("cp").description(
|
|
|
43513
43548
|
})
|
|
43514
43549
|
);
|
|
43515
43550
|
|
|
43516
|
-
// ../relay/dist/chunk-
|
|
43551
|
+
// ../relay/dist/chunk-JONRP7IU.js
|
|
43517
43552
|
var import_promises61 = require("fs/promises");
|
|
43518
43553
|
var import_os24 = require("os");
|
|
43519
43554
|
var import_path44 = require("path");
|
|
@@ -43529,7 +43564,27 @@ var import_promises62 = require("fs/promises");
|
|
|
43529
43564
|
var import_path45 = require("path");
|
|
43530
43565
|
var import_crypto13 = require("crypto");
|
|
43531
43566
|
var import_crypto14 = require("crypto");
|
|
43567
|
+
var import_child_process3 = require("child_process");
|
|
43568
|
+
var import_fs13 = require("fs");
|
|
43569
|
+
var import_os25 = require("os");
|
|
43570
|
+
init_dist4();
|
|
43532
43571
|
var import_path46 = require("path");
|
|
43572
|
+
init_dist4();
|
|
43573
|
+
var import_promises63 = require("fs/promises");
|
|
43574
|
+
var import_path47 = require("path");
|
|
43575
|
+
init_dist2();
|
|
43576
|
+
var import_crypto15 = require("crypto");
|
|
43577
|
+
var import_promises64 = require("fs/promises");
|
|
43578
|
+
init_dist2();
|
|
43579
|
+
init_dist4();
|
|
43580
|
+
init_execa();
|
|
43581
|
+
var import_promises65 = require("fs/promises");
|
|
43582
|
+
init_dist2();
|
|
43583
|
+
var import_crypto16 = require("crypto");
|
|
43584
|
+
var import_promises66 = require("fs/promises");
|
|
43585
|
+
init_dist2();
|
|
43586
|
+
init_dist4();
|
|
43587
|
+
var import_path48 = require("path");
|
|
43533
43588
|
init_dist2();
|
|
43534
43589
|
init_dist4();
|
|
43535
43590
|
init_dist();
|
|
@@ -44580,8 +44635,8 @@ async function handleRemoteBoxesRequest(req, deps) {
|
|
|
44580
44635
|
async function reapLocalBoxState(boxId, sandboxId, log) {
|
|
44581
44636
|
let removed = false;
|
|
44582
44637
|
try {
|
|
44583
|
-
const { mutateState: mutateState2, readState:
|
|
44584
|
-
const state = await
|
|
44638
|
+
const { mutateState: mutateState2, readState: readState3, boxSshDirForProvider: boxSshDirForProvider2 } = await Promise.resolve().then(() => (init_dist4(), dist_exports3));
|
|
44639
|
+
const state = await readState3();
|
|
44585
44640
|
const record = state.boxes.find((b) => b.id === boxId);
|
|
44586
44641
|
if (record) {
|
|
44587
44642
|
await mutateState2((s) => ({ ...s, boxes: s.boxes.filter((b) => b.id !== boxId) }));
|
|
@@ -44830,185 +44885,6 @@ var GitHubAppLeaser = class {
|
|
|
44830
44885
|
return { token: body.token, expiresAt: body.expires_at };
|
|
44831
44886
|
}
|
|
44832
44887
|
};
|
|
44833
|
-
var QUEUE_DIR = (0, import_path46.join)(STATE_DIR2, "queue");
|
|
44834
|
-
var TERMINAL_RETENTION_MS = 60 * 60 * 1e3;
|
|
44835
|
-
var SWEEP_INTERVAL_MS = 60 * 1e3;
|
|
44836
|
-
var QUEUE_LOGS_DIR = (0, import_path46.join)(STATE_DIR2, "logs");
|
|
44837
|
-
function queueLogPath(id) {
|
|
44838
|
-
return (0, import_path46.join)(QUEUE_LOGS_DIR, `queue-${id}.log`);
|
|
44839
|
-
}
|
|
44840
|
-
|
|
44841
|
-
// ../relay/dist/chunk-4ECL7BHW.js
|
|
44842
|
-
init_dist();
|
|
44843
|
-
init_pg_core();
|
|
44844
|
-
init_sqlite_core();
|
|
44845
|
-
var import_path47 = require("path");
|
|
44846
|
-
init_dist2();
|
|
44847
|
-
var import_path48 = require("path");
|
|
44848
|
-
init_dist2();
|
|
44849
|
-
var pgBoxes = pgTable("boxes", {
|
|
44850
|
-
boxId: text("box_id").primaryKey(),
|
|
44851
|
-
token: text("token").notNull(),
|
|
44852
|
-
originUrl: text("origin_url"),
|
|
44853
|
-
data: jsonb("data").$type().notNull(),
|
|
44854
|
-
registeredAt: timestamp("registered_at", { withTimezone: true }).notNull()
|
|
44855
|
-
});
|
|
44856
|
-
var pgEvents = pgTable("events", {
|
|
44857
|
-
id: bigint("id", { mode: "number" }).generatedAlwaysAsIdentity().primaryKey(),
|
|
44858
|
-
boxId: text("box_id").notNull(),
|
|
44859
|
-
type: text("type").notNull(),
|
|
44860
|
-
ts: text("ts"),
|
|
44861
|
-
payload: jsonb("payload"),
|
|
44862
|
-
receivedAt: timestamp("received_at", { withTimezone: true }).notNull()
|
|
44863
|
-
});
|
|
44864
|
-
var pgBoxStatus = pgTable("box_status", {
|
|
44865
|
-
boxId: text("box_id").primaryKey(),
|
|
44866
|
-
name: text("name"),
|
|
44867
|
-
projectIndex: integer("project_index"),
|
|
44868
|
-
status: jsonb("status").$type().notNull(),
|
|
44869
|
-
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull()
|
|
44870
|
-
});
|
|
44871
|
-
var pgPrompts = pgTable("prompts", {
|
|
44872
|
-
id: text("id").primaryKey(),
|
|
44873
|
-
boxId: text("box_id").notNull(),
|
|
44874
|
-
ev: jsonb("ev").$type().notNull(),
|
|
44875
|
-
method: text("method").notNull(),
|
|
44876
|
-
params: jsonb("params"),
|
|
44877
|
-
status: text("status").$type().notNull(),
|
|
44878
|
-
answer: text("answer").$type(),
|
|
44879
|
-
cancelled: boolean("cancelled"),
|
|
44880
|
-
result: jsonb("result").$type(),
|
|
44881
|
-
createdAt: timestamp("created_at", { withTimezone: true }).notNull(),
|
|
44882
|
-
expiresAt: timestamp("expires_at", { withTimezone: true })
|
|
44883
|
-
});
|
|
44884
|
-
var pgCreateJobs = pgTable("create_jobs", {
|
|
44885
|
-
id: text("id").primaryKey(),
|
|
44886
|
-
status: text("status").$type().notNull(),
|
|
44887
|
-
request: jsonb("request").$type().notNull(),
|
|
44888
|
-
result: jsonb("result").$type(),
|
|
44889
|
-
claimedBy: text("claimed_by"),
|
|
44890
|
-
createdAt: timestamp("created_at", { withTimezone: true }).notNull(),
|
|
44891
|
-
startedAt: timestamp("started_at", { withTimezone: true }),
|
|
44892
|
-
finishedAt: timestamp("finished_at", { withTimezone: true })
|
|
44893
|
-
});
|
|
44894
|
-
var sqliteBoxes = sqliteTable(
|
|
44895
|
-
"boxes",
|
|
44896
|
-
{
|
|
44897
|
-
boxId: text2("box_id").primaryKey(),
|
|
44898
|
-
token: text2("token").notNull(),
|
|
44899
|
-
originUrl: text2("origin_url"),
|
|
44900
|
-
data: text2("data", { mode: "json" }).$type().notNull(),
|
|
44901
|
-
registeredAt: text2("registered_at").notNull()
|
|
44902
|
-
},
|
|
44903
|
-
(t) => [index("boxes_token_idx").on(t.token)]
|
|
44904
|
-
);
|
|
44905
|
-
var sqliteEvents = sqliteTable(
|
|
44906
|
-
"events",
|
|
44907
|
-
{
|
|
44908
|
-
id: integer2("id").primaryKey({ autoIncrement: true }),
|
|
44909
|
-
boxId: text2("box_id").notNull(),
|
|
44910
|
-
type: text2("type").notNull(),
|
|
44911
|
-
ts: text2("ts"),
|
|
44912
|
-
payload: text2("payload", { mode: "json" }),
|
|
44913
|
-
receivedAt: text2("received_at").notNull()
|
|
44914
|
-
},
|
|
44915
|
-
(t) => [index("events_box_idx").on(t.boxId, t.id)]
|
|
44916
|
-
);
|
|
44917
|
-
var sqliteBoxStatus = sqliteTable("box_status", {
|
|
44918
|
-
boxId: text2("box_id").primaryKey(),
|
|
44919
|
-
name: text2("name"),
|
|
44920
|
-
projectIndex: integer2("project_index"),
|
|
44921
|
-
status: text2("status", { mode: "json" }).$type().notNull(),
|
|
44922
|
-
updatedAt: text2("updated_at").notNull()
|
|
44923
|
-
});
|
|
44924
|
-
var sqlitePrompts = sqliteTable(
|
|
44925
|
-
"prompts",
|
|
44926
|
-
{
|
|
44927
|
-
id: text2("id").primaryKey(),
|
|
44928
|
-
boxId: text2("box_id").notNull(),
|
|
44929
|
-
ev: text2("ev", { mode: "json" }).$type().notNull(),
|
|
44930
|
-
method: text2("method").notNull(),
|
|
44931
|
-
params: text2("params", { mode: "json" }),
|
|
44932
|
-
status: text2("status").$type().notNull(),
|
|
44933
|
-
answer: text2("answer").$type(),
|
|
44934
|
-
cancelled: integer2("cancelled", { mode: "boolean" }),
|
|
44935
|
-
result: text2("result", { mode: "json" }).$type(),
|
|
44936
|
-
createdAt: text2("created_at").notNull(),
|
|
44937
|
-
expiresAt: text2("expires_at")
|
|
44938
|
-
},
|
|
44939
|
-
(t) => [index("prompts_box_status_idx").on(t.boxId, t.status)]
|
|
44940
|
-
);
|
|
44941
|
-
var sqliteCreateJobs = sqliteTable(
|
|
44942
|
-
"create_jobs",
|
|
44943
|
-
{
|
|
44944
|
-
id: text2("id").primaryKey(),
|
|
44945
|
-
status: text2("status").$type().notNull(),
|
|
44946
|
-
request: text2("request", { mode: "json" }).$type().notNull(),
|
|
44947
|
-
result: text2("result", { mode: "json" }).$type(),
|
|
44948
|
-
claimedBy: text2("claimed_by"),
|
|
44949
|
-
createdAt: text2("created_at").notNull(),
|
|
44950
|
-
startedAt: text2("started_at"),
|
|
44951
|
-
finishedAt: text2("finished_at")
|
|
44952
|
-
},
|
|
44953
|
-
(t) => [index("create_jobs_status_idx").on(t.status, t.createdAt)]
|
|
44954
|
-
);
|
|
44955
|
-
var DEFAULT_SQLITE_STORE_PATH = (0, import_path47.join)(STATE_DIR, "hub", "store.db");
|
|
44956
|
-
var DEFAULT_CUSTODY_DIR = (0, import_path48.join)(STATE_DIR, "hub", "custody");
|
|
44957
|
-
|
|
44958
|
-
// ../relay/dist/chunk-RG7E35UQ.js
|
|
44959
|
-
var import_child_process3 = require("child_process");
|
|
44960
|
-
var import_fs13 = require("fs");
|
|
44961
|
-
var import_http3 = require("http");
|
|
44962
|
-
init_execa();
|
|
44963
|
-
var import_fs14 = require("fs");
|
|
44964
|
-
var import_promises64 = require("fs/promises");
|
|
44965
|
-
var import_os25 = require("os");
|
|
44966
|
-
var import_path49 = require("path");
|
|
44967
|
-
var import_url4 = require("url");
|
|
44968
|
-
init_dist();
|
|
44969
|
-
init_dist4();
|
|
44970
|
-
var import_child_process4 = require("child_process");
|
|
44971
|
-
var import_fs15 = require("fs");
|
|
44972
|
-
var import_os26 = require("os");
|
|
44973
|
-
init_dist4();
|
|
44974
|
-
var import_crypto15 = require("crypto");
|
|
44975
|
-
var import_crypto16 = require("crypto");
|
|
44976
|
-
init_dist2();
|
|
44977
|
-
var import_path50 = require("path");
|
|
44978
|
-
init_dist2();
|
|
44979
|
-
var import_child_process5 = require("child_process");
|
|
44980
|
-
init_dist();
|
|
44981
|
-
init_dist4();
|
|
44982
|
-
var import_crypto17 = require("crypto");
|
|
44983
|
-
init_dist4();
|
|
44984
|
-
var import_crypto18 = require("crypto");
|
|
44985
|
-
var import_crypto19 = require("crypto");
|
|
44986
|
-
var import_child_process6 = require("child_process");
|
|
44987
|
-
var import_fs16 = require("fs");
|
|
44988
|
-
var import_promises65 = require("fs/promises");
|
|
44989
|
-
var import_os27 = require("os");
|
|
44990
|
-
var import_path51 = require("path");
|
|
44991
|
-
var import_promises66 = require("stream/promises");
|
|
44992
|
-
var import_crypto20 = require("crypto");
|
|
44993
|
-
var import_child_process7 = require("child_process");
|
|
44994
|
-
var import_fs17 = require("fs");
|
|
44995
|
-
var import_promises67 = require("fs/promises");
|
|
44996
|
-
var import_os28 = require("os");
|
|
44997
|
-
var import_path52 = require("path");
|
|
44998
|
-
var import_crypto21 = require("crypto");
|
|
44999
|
-
init_dist4();
|
|
45000
|
-
init_dist();
|
|
45001
|
-
var import_crypto22 = require("crypto");
|
|
45002
|
-
var import_promises68 = require("fs/promises");
|
|
45003
|
-
init_dist2();
|
|
45004
|
-
init_execa();
|
|
45005
|
-
init_dist4();
|
|
45006
|
-
init_dist2();
|
|
45007
|
-
init_dist4();
|
|
45008
|
-
init_dist2();
|
|
45009
|
-
init_dist4();
|
|
45010
|
-
init_dist4();
|
|
45011
|
-
init_dist();
|
|
45012
44888
|
var GH_BLOCKED = [
|
|
45013
44889
|
{
|
|
45014
44890
|
pattern: /^auth\s+(token|refresh)\b/i,
|
|
@@ -45226,22 +45102,22 @@ function firstNonEmptyEnv(names) {
|
|
|
45226
45102
|
return null;
|
|
45227
45103
|
}
|
|
45228
45104
|
function ghRunContext(workspacePath, originUrl, args) {
|
|
45229
|
-
if (workspacePath.length > 0 && (0,
|
|
45105
|
+
if (workspacePath.length > 0 && (0, import_fs13.existsSync)(workspacePath)) {
|
|
45230
45106
|
return { cwd: workspacePath, args };
|
|
45231
45107
|
}
|
|
45232
45108
|
const origin = originUrl?.trim() ?? "";
|
|
45233
45109
|
const alreadyScoped = args.some((a2) => a2 === "--repo" || a2 === "-R" || a2.startsWith("--repo="));
|
|
45234
|
-
if (origin.length === 0 || alreadyScoped) return { cwd: (0,
|
|
45110
|
+
if (origin.length === 0 || alreadyScoped) return { cwd: (0, import_os25.tmpdir)(), args };
|
|
45235
45111
|
try {
|
|
45236
|
-
return { cwd: (0,
|
|
45112
|
+
return { cwd: (0, import_os25.tmpdir)(), args: ["--repo", repoSlugFromRemote(origin), ...args] };
|
|
45237
45113
|
} catch {
|
|
45238
|
-
return { cwd: (0,
|
|
45114
|
+
return { cwd: (0, import_os25.tmpdir)(), args };
|
|
45239
45115
|
}
|
|
45240
45116
|
}
|
|
45241
45117
|
function runHostGh(args, cwd, opts = {}) {
|
|
45242
45118
|
const timeoutMs = opts.timeoutMs ?? GH_RPC_TIMEOUT_MS;
|
|
45243
45119
|
return new Promise((resolve9) => {
|
|
45244
|
-
const child = (0,
|
|
45120
|
+
const child = (0, import_child_process3.spawn)("gh", args, {
|
|
45245
45121
|
cwd,
|
|
45246
45122
|
// GH_HOST is what points gh at a GitHub Enterprise Server instance; without
|
|
45247
45123
|
// it gh targets github.com no matter what the repo's remote says.
|
|
@@ -45319,7 +45195,7 @@ async function checkoutGuards(hostMainRepo, registeredBranches) {
|
|
|
45319
45195
|
}
|
|
45320
45196
|
function runGitProbe(args) {
|
|
45321
45197
|
return new Promise((resolve9) => {
|
|
45322
|
-
const child = (0,
|
|
45198
|
+
const child = (0, import_child_process3.spawn)("git", args, { env: process.env, stdio: ["ignore", "pipe", "pipe"] });
|
|
45323
45199
|
let stdout = "";
|
|
45324
45200
|
let stderr = "";
|
|
45325
45201
|
child.stdout?.on("data", (c3) => {
|
|
@@ -45345,9 +45221,772 @@ function refuseCheckoutByDefault(op) {
|
|
|
45345
45221
|
stderr: "gh pr checkout: disabled by default; set AGENTBOX_GH_PR_CHECKOUT=allow to enable\n"
|
|
45346
45222
|
};
|
|
45347
45223
|
}
|
|
45224
|
+
var WORKSPACES_DIR = (0, import_path46.join)(STATE_DIR2, "workspaces");
|
|
45225
|
+
var WORKSPACE_LOCK = { staleMs: 2e3, acquireTimeoutMs: 5e3 };
|
|
45226
|
+
function workspaceDir(id, root) {
|
|
45227
|
+
return (0, import_path47.join)(WORKSPACES_DIR, root ? projectDirSegment(root) : id);
|
|
45228
|
+
}
|
|
45229
|
+
function workspaceFile(dir) {
|
|
45230
|
+
return (0, import_path47.join)(dir, "workspace.json");
|
|
45231
|
+
}
|
|
45232
|
+
function tasksFile(dir) {
|
|
45233
|
+
return (0, import_path47.join)(dir, "tasks.json");
|
|
45234
|
+
}
|
|
45235
|
+
function timelineFile(dir) {
|
|
45236
|
+
return (0, import_path47.join)(dir, "timeline.jsonl");
|
|
45237
|
+
}
|
|
45238
|
+
function managersFile(dir) {
|
|
45239
|
+
return (0, import_path47.join)(dir, "managers.json");
|
|
45240
|
+
}
|
|
45241
|
+
function legacyManagerFiles(dir) {
|
|
45242
|
+
return { rec: (0, import_path47.join)(dir, "manager.json"), exit: (0, import_path47.join)(dir, "manager.exit") };
|
|
45243
|
+
}
|
|
45244
|
+
async function resolveWorkspaceDir(id) {
|
|
45245
|
+
let entries;
|
|
45246
|
+
try {
|
|
45247
|
+
entries = await (0, import_promises63.readdir)(WORKSPACES_DIR);
|
|
45248
|
+
} catch (err) {
|
|
45249
|
+
if (err.code === "ENOENT") return null;
|
|
45250
|
+
throw err;
|
|
45251
|
+
}
|
|
45252
|
+
for (const name of entries) {
|
|
45253
|
+
const m = /^([0-9a-f]{16})(?:-.+)?$/.exec(name);
|
|
45254
|
+
if (m && m[1] === id) return (0, import_path47.join)(WORKSPACES_DIR, name);
|
|
45255
|
+
}
|
|
45256
|
+
return null;
|
|
45257
|
+
}
|
|
45258
|
+
async function canonicalWorkspaceRoot(absPath) {
|
|
45259
|
+
const resolved = await (0, import_promises63.realpath)(absPath).catch(() => absPath);
|
|
45260
|
+
return resolved.length > 1 && resolved.endsWith("/") ? resolved.slice(0, -1) : resolved;
|
|
45261
|
+
}
|
|
45262
|
+
async function listWorkspaces() {
|
|
45263
|
+
let entries;
|
|
45264
|
+
try {
|
|
45265
|
+
entries = await (0, import_promises63.readdir)(WORKSPACES_DIR);
|
|
45266
|
+
} catch (err) {
|
|
45267
|
+
if (err.code === "ENOENT") return [];
|
|
45268
|
+
throw err;
|
|
45269
|
+
}
|
|
45270
|
+
const out = [];
|
|
45271
|
+
for (const name of entries) {
|
|
45272
|
+
if (!/^[0-9a-f]{16}(?:-.+)?$/.test(name)) continue;
|
|
45273
|
+
try {
|
|
45274
|
+
const raw = await (0, import_promises63.readFile)(workspaceFile((0, import_path47.join)(WORKSPACES_DIR, name)), "utf8");
|
|
45275
|
+
out.push(JSON.parse(raw));
|
|
45276
|
+
} catch {
|
|
45277
|
+
}
|
|
45278
|
+
}
|
|
45279
|
+
out.sort((a2, b) => a2.name.localeCompare(b.name));
|
|
45280
|
+
return out;
|
|
45281
|
+
}
|
|
45282
|
+
function findWorkspaceContaining(records, absPath) {
|
|
45283
|
+
const target = absPath.length > 1 && absPath.endsWith("/") ? absPath.slice(0, -1) : absPath;
|
|
45284
|
+
let best = null;
|
|
45285
|
+
for (const rec of records) {
|
|
45286
|
+
if (target !== rec.root && !target.startsWith(`${rec.root}/`)) continue;
|
|
45287
|
+
if (!best || rec.root.length > best.root.length) best = rec;
|
|
45288
|
+
}
|
|
45289
|
+
return best;
|
|
45290
|
+
}
|
|
45291
|
+
var SESSION_HEAD_BYTES = 256 * 1024;
|
|
45292
|
+
var SESSION_FIRST_LINE_MAX = 4 * 1024 * 1024;
|
|
45293
|
+
var SESSION_INDEX_BYTES = 1024 * 1024;
|
|
45294
|
+
var RESUME_ARGV = {
|
|
45295
|
+
claude: (id) => ["--resume", id],
|
|
45296
|
+
codex: (id) => ["resume", id]
|
|
45297
|
+
};
|
|
45298
|
+
var RESUMABLE_MANAGER_AGENTS = Object.keys(RESUME_ARGV);
|
|
45299
|
+
var DEFAULT_RESUMABLE_AGENT = RESUMABLE_MANAGER_AGENTS[0] ?? "claude";
|
|
45300
|
+
function newManagerId() {
|
|
45301
|
+
return (0, import_crypto15.randomBytes)(8).toString("hex");
|
|
45302
|
+
}
|
|
45303
|
+
async function dirFor(wsId) {
|
|
45304
|
+
return await resolveWorkspaceDir(wsId) ?? workspaceDir(wsId);
|
|
45305
|
+
}
|
|
45306
|
+
async function readManagerFile(dir) {
|
|
45307
|
+
try {
|
|
45308
|
+
const parsed = JSON.parse(await (0, import_promises64.readFile)(managersFile(dir), "utf8"));
|
|
45309
|
+
return Array.isArray(parsed.managers) ? parsed.managers : [];
|
|
45310
|
+
} catch (err) {
|
|
45311
|
+
if (err.code === "ENOENT") return null;
|
|
45312
|
+
return [];
|
|
45313
|
+
}
|
|
45314
|
+
}
|
|
45315
|
+
async function readLegacyManager(dir, wsId) {
|
|
45316
|
+
const files = legacyManagerFiles(dir);
|
|
45317
|
+
let legacy;
|
|
45318
|
+
try {
|
|
45319
|
+
legacy = JSON.parse(await (0, import_promises64.readFile)(files.rec, "utf8"));
|
|
45320
|
+
} catch {
|
|
45321
|
+
return null;
|
|
45322
|
+
}
|
|
45323
|
+
if (typeof legacy.agent !== "string" || typeof legacy.cwd !== "string") return null;
|
|
45324
|
+
let lastExit = legacy.lastExit;
|
|
45325
|
+
let exitConsumed = false;
|
|
45326
|
+
if (lastExit === void 0) {
|
|
45327
|
+
lastExit = await readExitFile(files.exit);
|
|
45328
|
+
exitConsumed = lastExit !== void 0;
|
|
45329
|
+
}
|
|
45330
|
+
const at = legacy.startedAt ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
45331
|
+
const record = {
|
|
45332
|
+
id: newManagerId(),
|
|
45333
|
+
workspaceId: wsId,
|
|
45334
|
+
agent: legacy.agent,
|
|
45335
|
+
kind: "hub",
|
|
45336
|
+
cwd: legacy.cwd,
|
|
45337
|
+
tmuxSession: legacy.tmuxSession ?? `agentbox-manager-${wsId}`,
|
|
45338
|
+
...legacy.argv ? { argv: legacy.argv } : {},
|
|
45339
|
+
...legacy.sessionId ? { sessionId: legacy.sessionId } : {},
|
|
45340
|
+
boxIds: [],
|
|
45341
|
+
boxJobIds: [],
|
|
45342
|
+
createdAt: at,
|
|
45343
|
+
lastSeenAt: legacy.stoppedAt ?? at,
|
|
45344
|
+
startedAt: at,
|
|
45345
|
+
...legacy.stoppedAt ? { stoppedAt: legacy.stoppedAt } : {},
|
|
45346
|
+
...lastExit === void 0 ? {} : { lastExit }
|
|
45347
|
+
};
|
|
45348
|
+
return { record, exitConsumed };
|
|
45349
|
+
}
|
|
45350
|
+
async function readExitFile(file) {
|
|
45351
|
+
const raw = await (0, import_promises64.readFile)(file, "utf8").catch(() => "");
|
|
45352
|
+
const n2 = Number.parseInt(raw.trim(), 10);
|
|
45353
|
+
return Number.isNaN(n2) ? void 0 : n2;
|
|
45354
|
+
}
|
|
45355
|
+
async function writeManagerFile(dir, managers) {
|
|
45356
|
+
const final = managersFile(dir);
|
|
45357
|
+
await (0, import_promises64.mkdir)(dir, { recursive: true });
|
|
45358
|
+
const tmp = `${final}.tmp.${String(process.pid)}.${Date.now().toString(36)}`;
|
|
45359
|
+
const doc = { version: 1, managers };
|
|
45360
|
+
await (0, import_promises64.writeFile)(tmp, JSON.stringify(doc, null, 2) + "\n", "utf8");
|
|
45361
|
+
await (0, import_promises64.rename)(tmp, final);
|
|
45362
|
+
}
|
|
45363
|
+
async function updateManagers(wsId, fn) {
|
|
45364
|
+
const dir = await dirFor(wsId);
|
|
45365
|
+
return withFileLock(
|
|
45366
|
+
managersFile(dir),
|
|
45367
|
+
async () => {
|
|
45368
|
+
const current = await readManagerFile(dir);
|
|
45369
|
+
const legacy = current === null ? await readLegacyManager(dir, wsId) : null;
|
|
45370
|
+
const { managers, result } = await fn(current ?? (legacy ? [legacy.record] : []));
|
|
45371
|
+
await writeManagerFile(dir, managers);
|
|
45372
|
+
if (legacy) {
|
|
45373
|
+
const files = legacyManagerFiles(dir);
|
|
45374
|
+
await (0, import_promises64.rm)(files.rec, { force: true }).catch(() => {
|
|
45375
|
+
});
|
|
45376
|
+
if (legacy.exitConsumed) await (0, import_promises64.rm)(files.exit, { force: true }).catch(() => {
|
|
45377
|
+
});
|
|
45378
|
+
}
|
|
45379
|
+
return result;
|
|
45380
|
+
},
|
|
45381
|
+
WORKSPACE_LOCK
|
|
45382
|
+
);
|
|
45383
|
+
}
|
|
45384
|
+
async function readManagers(wsId) {
|
|
45385
|
+
const dir = await resolveWorkspaceDir(wsId);
|
|
45386
|
+
if (!dir) return [];
|
|
45387
|
+
const current = await readManagerFile(dir);
|
|
45388
|
+
if (current !== null) return current;
|
|
45389
|
+
if (await (0, import_promises64.stat)(legacyManagerFiles(dir).rec).catch(() => null) === null) return [];
|
|
45390
|
+
return updateManagers(wsId, (managers) => ({ managers, result: managers }));
|
|
45391
|
+
}
|
|
45392
|
+
async function allManagers() {
|
|
45393
|
+
const out = [];
|
|
45394
|
+
for (const ws of await listWorkspaces()) out.push(...await readManagers(ws.id));
|
|
45395
|
+
return out;
|
|
45396
|
+
}
|
|
45397
|
+
async function managerIdForTarget(target, opts = {}) {
|
|
45398
|
+
const hit = (await allManagers()).find(
|
|
45399
|
+
(m) => (opts.workspaceId === void 0 || m.workspaceId === opts.workspaceId) && ("boxId" in target ? m.boxIds.includes(target.boxId) : m.boxJobIds.includes(target.boxJobId))
|
|
45400
|
+
);
|
|
45401
|
+
return hit?.id;
|
|
45402
|
+
}
|
|
45403
|
+
var MANAGER_SEEN_WINDOW_MS = 30 * 60 * 1e3;
|
|
45404
|
+
var TURN_READ_CHUNK = 4 * 1024 * 1024;
|
|
45405
|
+
var PUSH_STAT_TIMEOUT_MS = 2e3;
|
|
45406
|
+
var DEFAULT_BRANCH_REFS = [
|
|
45407
|
+
"refs/remotes/origin/main",
|
|
45408
|
+
"refs/remotes/origin/master",
|
|
45409
|
+
"refs/heads/main",
|
|
45410
|
+
"refs/heads/master"
|
|
45411
|
+
];
|
|
45412
|
+
function parseShortstat(out) {
|
|
45413
|
+
const num = (re) => Number(re.exec(out)?.[1] ?? 0);
|
|
45414
|
+
return {
|
|
45415
|
+
filesChanged: num(/(\d+) files? changed/u),
|
|
45416
|
+
additions: num(/(\d+) insertions?\(\+\)/u),
|
|
45417
|
+
deletions: num(/(\d+) deletions?\(-\)/u)
|
|
45418
|
+
};
|
|
45419
|
+
}
|
|
45420
|
+
function pushedRef(branch, opts) {
|
|
45421
|
+
const remote = opts.remote ?? "origin";
|
|
45422
|
+
if (opts.hostOnly || !/^[A-Za-z0-9._-]+$/u.test(remote)) return `refs/heads/${branch}`;
|
|
45423
|
+
return `refs/remotes/${remote}/${branch}`;
|
|
45424
|
+
}
|
|
45425
|
+
function gitWithin(repo, deadline) {
|
|
45426
|
+
return async (args) => {
|
|
45427
|
+
const left = deadline - Date.now();
|
|
45428
|
+
if (left <= 0) return void 0;
|
|
45429
|
+
try {
|
|
45430
|
+
const r = await execa("git", ["-C", repo, ...args], { reject: false, timeout: left });
|
|
45431
|
+
return r.exitCode === 0 ? r.stdout.trim() : void 0;
|
|
45432
|
+
} catch {
|
|
45433
|
+
return void 0;
|
|
45434
|
+
}
|
|
45435
|
+
};
|
|
45436
|
+
}
|
|
45437
|
+
function tipWith(git, ref) {
|
|
45438
|
+
return git(["rev-parse", "--verify", "--quiet", `${ref}^{commit}`]).then((s) => s || void 0);
|
|
45439
|
+
}
|
|
45440
|
+
function readRefTip(repo, ref, timeoutMs = PUSH_STAT_TIMEOUT_MS) {
|
|
45441
|
+
return tipWith(gitWithin(repo, Date.now() + timeoutMs), ref);
|
|
45442
|
+
}
|
|
45443
|
+
async function defaultBranchBase(git, tip) {
|
|
45444
|
+
const head = await git(["symbolic-ref", "--quiet", "refs/remotes/origin/HEAD"]);
|
|
45445
|
+
for (const ref of [...head ? [head] : [], ...DEFAULT_BRANCH_REFS]) {
|
|
45446
|
+
if (!await tipWith(git, ref)) continue;
|
|
45447
|
+
return git(["merge-base", ref, tip]);
|
|
45448
|
+
}
|
|
45449
|
+
return void 0;
|
|
45450
|
+
}
|
|
45451
|
+
async function isAncestor(git, before, after) {
|
|
45452
|
+
return await git(["merge-base", "--is-ancestor", before, after]) !== void 0;
|
|
45453
|
+
}
|
|
45454
|
+
async function pushLineStat(input) {
|
|
45455
|
+
const git = gitWithin(input.repo, Date.now() + (input.timeoutMs ?? PUSH_STAT_TIMEOUT_MS));
|
|
45456
|
+
const after = await tipWith(git, input.ref) ?? await tipWith(git, `refs/heads/${input.branch}`);
|
|
45457
|
+
if (!after) return void 0;
|
|
45458
|
+
const base = input.before && (input.before === after || await isAncestor(git, input.before, after)) ? input.before : await defaultBranchBase(git, after);
|
|
45459
|
+
if (!base || base === after) return void 0;
|
|
45460
|
+
const out = await git(["diff", "--shortstat", `${base}..${after}`]);
|
|
45461
|
+
if (out === void 0) return void 0;
|
|
45462
|
+
const { additions, deletions } = parseShortstat(out);
|
|
45463
|
+
return additions + deletions > 0 ? { additions, deletions } : void 0;
|
|
45464
|
+
}
|
|
45465
|
+
async function tasksPathFor(wsId, root) {
|
|
45466
|
+
const dir = await resolveWorkspaceDir(wsId) ?? workspaceDir(wsId, root);
|
|
45467
|
+
return tasksFile(dir);
|
|
45468
|
+
}
|
|
45469
|
+
async function readTasks(wsId) {
|
|
45470
|
+
try {
|
|
45471
|
+
const raw = await (0, import_promises65.readFile)(await tasksPathFor(wsId), "utf8");
|
|
45472
|
+
const parsed = JSON.parse(raw);
|
|
45473
|
+
return Array.isArray(parsed.tasks) ? parsed.tasks : [];
|
|
45474
|
+
} catch {
|
|
45475
|
+
return [];
|
|
45476
|
+
}
|
|
45477
|
+
}
|
|
45478
|
+
var GH_PR_JSON_FIELDS = [
|
|
45479
|
+
"number",
|
|
45480
|
+
"title",
|
|
45481
|
+
"url",
|
|
45482
|
+
"headRefName",
|
|
45483
|
+
"baseRefName",
|
|
45484
|
+
"state",
|
|
45485
|
+
"mergedAt",
|
|
45486
|
+
"closedAt",
|
|
45487
|
+
"createdAt",
|
|
45488
|
+
"additions",
|
|
45489
|
+
"deletions",
|
|
45490
|
+
"statusCheckRollup",
|
|
45491
|
+
"mergeStateStatus",
|
|
45492
|
+
"autoMergeRequest",
|
|
45493
|
+
"mergedBy",
|
|
45494
|
+
"author"
|
|
45495
|
+
].join(",");
|
|
45496
|
+
function prEventKey(repo, number, kind) {
|
|
45497
|
+
return `pr:${repo}#${String(number)}:${kind}`;
|
|
45498
|
+
}
|
|
45499
|
+
function parsePrUrl(url) {
|
|
45500
|
+
const m = /https?:\/\/[^/\s]+\/([^/\s]+)\/([^/\s]+)\/pull\/(\d+)/u.exec(url);
|
|
45501
|
+
if (!m) return null;
|
|
45502
|
+
return { repo: `${m[1]}/${m[2]}`, number: Number(m[3]), url: m[0] };
|
|
45503
|
+
}
|
|
45504
|
+
var FAILED = /* @__PURE__ */ new Set([
|
|
45505
|
+
"FAILURE",
|
|
45506
|
+
"ERROR",
|
|
45507
|
+
"TIMED_OUT",
|
|
45508
|
+
"CANCELLED",
|
|
45509
|
+
"ACTION_REQUIRED",
|
|
45510
|
+
"STARTUP_FAILURE"
|
|
45511
|
+
]);
|
|
45512
|
+
var PASSED = /* @__PURE__ */ new Set(["SUCCESS", "NEUTRAL", "SKIPPED"]);
|
|
45513
|
+
function checksOf(rollup) {
|
|
45514
|
+
if (!rollup || rollup.length === 0) return "none";
|
|
45515
|
+
let pending = false;
|
|
45516
|
+
for (const c3 of rollup) {
|
|
45517
|
+
const verdict = (c3.conclusion ?? c3.state ?? "").toUpperCase();
|
|
45518
|
+
if (FAILED.has(verdict)) return "fail";
|
|
45519
|
+
if (c3.status && c3.status.toUpperCase() !== "COMPLETED") pending = true;
|
|
45520
|
+
else if (!PASSED.has(verdict)) pending = true;
|
|
45521
|
+
}
|
|
45522
|
+
return pending ? "pending" : "pass";
|
|
45523
|
+
}
|
|
45524
|
+
function isPrReady(pr) {
|
|
45525
|
+
if (pr.state !== "OPEN") return false;
|
|
45526
|
+
if (checksOf(pr.statusCheckRollup) !== "pass") return false;
|
|
45527
|
+
return pr.mergeStateStatus === "CLEAN" || pr.mergeStateStatus === "HAS_HOOKS";
|
|
45528
|
+
}
|
|
45529
|
+
function timelinePrOf(pr, repo) {
|
|
45530
|
+
return {
|
|
45531
|
+
repo,
|
|
45532
|
+
number: pr.number,
|
|
45533
|
+
title: pr.title,
|
|
45534
|
+
url: pr.url,
|
|
45535
|
+
base: pr.baseRefName,
|
|
45536
|
+
head: pr.headRefName,
|
|
45537
|
+
...typeof pr.additions === "number" ? { additions: pr.additions } : {},
|
|
45538
|
+
...typeof pr.deletions === "number" ? { deletions: pr.deletions } : {},
|
|
45539
|
+
checks: checksOf(pr.statusCheckRollup),
|
|
45540
|
+
...pr.mergeStateStatus ? { mergeState: pr.mergeStateStatus } : {},
|
|
45541
|
+
autoMerge: Boolean(pr.autoMergeRequest),
|
|
45542
|
+
...pr.mergedBy?.login ? { mergedBy: pr.mergedBy.login } : {}
|
|
45543
|
+
};
|
|
45544
|
+
}
|
|
45545
|
+
function prTimelineEvents(pr, repo, base, nowIso = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
45546
|
+
const tpr = timelinePrOf(pr, repo);
|
|
45547
|
+
const common2 = { ...base, branch: base.branch ?? pr.headRefName, pr: tpr };
|
|
45548
|
+
const out = [
|
|
45549
|
+
{
|
|
45550
|
+
...common2,
|
|
45551
|
+
type: "pr.opened",
|
|
45552
|
+
at: pr.createdAt ?? nowIso,
|
|
45553
|
+
key: prEventKey(repo, pr.number, "opened")
|
|
45554
|
+
}
|
|
45555
|
+
];
|
|
45556
|
+
if (pr.state === "MERGED") {
|
|
45557
|
+
out.push({
|
|
45558
|
+
...common2,
|
|
45559
|
+
type: "pr.merged",
|
|
45560
|
+
at: pr.mergedAt ?? nowIso,
|
|
45561
|
+
key: prEventKey(repo, pr.number, "merged")
|
|
45562
|
+
});
|
|
45563
|
+
} else if (pr.state === "CLOSED") {
|
|
45564
|
+
out.push({
|
|
45565
|
+
...common2,
|
|
45566
|
+
type: "pr.closed",
|
|
45567
|
+
at: pr.closedAt ?? nowIso,
|
|
45568
|
+
key: prEventKey(repo, pr.number, "closed")
|
|
45569
|
+
});
|
|
45570
|
+
} else if (isPrReady(pr)) {
|
|
45571
|
+
out.push({
|
|
45572
|
+
...common2,
|
|
45573
|
+
type: "pr.ready",
|
|
45574
|
+
at: nowIso,
|
|
45575
|
+
key: prEventKey(repo, pr.number, "ready")
|
|
45576
|
+
});
|
|
45577
|
+
}
|
|
45578
|
+
return out;
|
|
45579
|
+
}
|
|
45580
|
+
var TIMELINE_MAX_LINES = 5e3;
|
|
45581
|
+
var TIMELINE_KEEP_LINES = 4e3;
|
|
45582
|
+
var TIMELINE_RETENTION_MS = 90 * 24 * 60 * 60 * 1e3;
|
|
45583
|
+
function newTimelineEventId(ms = Date.now()) {
|
|
45584
|
+
return `${ms.toString(36).padStart(9, "0")}-${(0, import_crypto16.randomBytes)(3).toString("hex")}`;
|
|
45585
|
+
}
|
|
45586
|
+
var indexes = /* @__PURE__ */ new Map();
|
|
45587
|
+
function emptyIndex(ino = 0) {
|
|
45588
|
+
return { ino, offset: 0, lines: 0, oldestMs: Number.POSITIVE_INFINITY, keys: /* @__PURE__ */ new Set() };
|
|
45589
|
+
}
|
|
45590
|
+
function absorb(idx, line2) {
|
|
45591
|
+
if (!line2.trim()) return;
|
|
45592
|
+
try {
|
|
45593
|
+
const ev = JSON.parse(line2);
|
|
45594
|
+
idx.lines += 1;
|
|
45595
|
+
const at = typeof ev.at === "string" ? Date.parse(ev.at) : Number.NaN;
|
|
45596
|
+
if (!Number.isNaN(at) && at < idx.oldestMs) idx.oldestMs = at;
|
|
45597
|
+
if (typeof ev.key === "string") idx.keys.add(ev.key);
|
|
45598
|
+
} catch {
|
|
45599
|
+
}
|
|
45600
|
+
}
|
|
45601
|
+
async function indexOf(file) {
|
|
45602
|
+
let st;
|
|
45603
|
+
try {
|
|
45604
|
+
st = await (0, import_promises66.stat)(file);
|
|
45605
|
+
} catch {
|
|
45606
|
+
indexes.delete(file);
|
|
45607
|
+
return emptyIndex();
|
|
45608
|
+
}
|
|
45609
|
+
let idx = indexes.get(file);
|
|
45610
|
+
if (!idx || idx.ino !== st.ino || st.size < idx.offset) {
|
|
45611
|
+
idx = emptyIndex(st.ino);
|
|
45612
|
+
indexes.set(file, idx);
|
|
45613
|
+
}
|
|
45614
|
+
if (st.size === idx.offset) return idx;
|
|
45615
|
+
const fh = await (0, import_promises66.open)(file, "r");
|
|
45616
|
+
try {
|
|
45617
|
+
const buf = Buffer.alloc(st.size - idx.offset);
|
|
45618
|
+
const { bytesRead } = await fh.read(buf, 0, buf.length, idx.offset);
|
|
45619
|
+
const text3 = buf.subarray(0, bytesRead).toString("utf8");
|
|
45620
|
+
const end = text3.lastIndexOf("\n");
|
|
45621
|
+
if (end === -1) return idx;
|
|
45622
|
+
for (const line2 of text3.slice(0, end).split("\n")) absorb(idx, line2);
|
|
45623
|
+
idx.offset += Buffer.byteLength(text3.slice(0, end + 1), "utf8");
|
|
45624
|
+
} finally {
|
|
45625
|
+
await fh.close();
|
|
45626
|
+
}
|
|
45627
|
+
return idx;
|
|
45628
|
+
}
|
|
45629
|
+
function parseLines(raw) {
|
|
45630
|
+
const out = [];
|
|
45631
|
+
for (const line2 of raw.split("\n")) {
|
|
45632
|
+
if (!line2.trim()) continue;
|
|
45633
|
+
try {
|
|
45634
|
+
const ev = JSON.parse(line2);
|
|
45635
|
+
if (typeof ev.id === "string" && typeof ev.at === "string" && typeof ev.type === "string") {
|
|
45636
|
+
out.push(ev);
|
|
45637
|
+
}
|
|
45638
|
+
} catch {
|
|
45639
|
+
continue;
|
|
45640
|
+
}
|
|
45641
|
+
}
|
|
45642
|
+
return out;
|
|
45643
|
+
}
|
|
45644
|
+
function byTime(a2, b) {
|
|
45645
|
+
if (a2.at !== b.at) return a2.at < b.at ? -1 : 1;
|
|
45646
|
+
return a2.id < b.id ? -1 : a2.id > b.id ? 1 : 0;
|
|
45647
|
+
}
|
|
45648
|
+
async function compact(file, now) {
|
|
45649
|
+
const raw = await (0, import_promises66.readFile)(file, "utf8").catch(() => "");
|
|
45650
|
+
const kept = parseLines(raw).filter((ev) => {
|
|
45651
|
+
const at = Date.parse(ev.at);
|
|
45652
|
+
return Number.isNaN(at) || now - at <= TIMELINE_RETENTION_MS;
|
|
45653
|
+
}).sort(byTime).slice(-TIMELINE_KEEP_LINES);
|
|
45654
|
+
const tmp = `${file}.tmp.${String(process.pid)}.${Date.now().toString(36)}`;
|
|
45655
|
+
await (0, import_promises66.writeFile)(tmp, kept.map((ev) => JSON.stringify(ev)).join("\n") + (kept.length ? "\n" : ""));
|
|
45656
|
+
await (0, import_promises66.rename)(tmp, file);
|
|
45657
|
+
indexes.delete(file);
|
|
45658
|
+
}
|
|
45659
|
+
async function fileFor(wsId) {
|
|
45660
|
+
const dir = await resolveWorkspaceDir(wsId);
|
|
45661
|
+
return dir ? timelineFile(dir) : null;
|
|
45662
|
+
}
|
|
45663
|
+
async function appendTimelineEvent(wsId, input, now = Date.now) {
|
|
45664
|
+
const file = await fileFor(wsId);
|
|
45665
|
+
if (!file) return null;
|
|
45666
|
+
return withFileLock(
|
|
45667
|
+
file,
|
|
45668
|
+
async () => {
|
|
45669
|
+
const idx = await indexOf(file);
|
|
45670
|
+
if (input.key && idx.keys.has(input.key)) return null;
|
|
45671
|
+
const ms = now();
|
|
45672
|
+
const ev = {
|
|
45673
|
+
...input,
|
|
45674
|
+
id: input.id ?? newTimelineEventId(ms),
|
|
45675
|
+
at: input.at ?? new Date(ms).toISOString()
|
|
45676
|
+
};
|
|
45677
|
+
await (0, import_promises66.appendFile)(file, JSON.stringify(ev) + "\n", "utf8");
|
|
45678
|
+
const after = await indexOf(file);
|
|
45679
|
+
if (after.lines > TIMELINE_MAX_LINES || Number.isFinite(after.oldestMs) && ms - after.oldestMs > TIMELINE_RETENTION_MS) {
|
|
45680
|
+
await compact(file, ms);
|
|
45681
|
+
}
|
|
45682
|
+
return ev;
|
|
45683
|
+
},
|
|
45684
|
+
WORKSPACE_LOCK
|
|
45685
|
+
);
|
|
45686
|
+
}
|
|
45687
|
+
async function recordTimelineEvent(wsId, input) {
|
|
45688
|
+
try {
|
|
45689
|
+
return await appendTimelineEvent(wsId, input);
|
|
45690
|
+
} catch (err) {
|
|
45691
|
+
console.warn(
|
|
45692
|
+
`[timeline] could not record ${input.type} in ${wsId}: ${err instanceof Error ? err.message : String(err)}`
|
|
45693
|
+
);
|
|
45694
|
+
return null;
|
|
45695
|
+
}
|
|
45696
|
+
}
|
|
45697
|
+
async function workspaceForPath(path6) {
|
|
45698
|
+
if (!path6) return null;
|
|
45699
|
+
const records = await listWorkspaces();
|
|
45700
|
+
if (records.length === 0) return null;
|
|
45701
|
+
return findWorkspaceContaining(records, await canonicalWorkspaceRoot(path6));
|
|
45702
|
+
}
|
|
45703
|
+
async function boxTaskIds(wsId, boxId) {
|
|
45704
|
+
const tasks = await readTasks(wsId).catch(() => []);
|
|
45705
|
+
return tasks.filter((t) => t.boxId === boxId).map((t) => t.id);
|
|
45706
|
+
}
|
|
45707
|
+
async function recordBoxGitPush(ctx, origin, result, stat43) {
|
|
45708
|
+
if (result.exitCode !== 0 || origin.hostInitiated || origin.hostOnly) return;
|
|
45709
|
+
try {
|
|
45710
|
+
const ws = await workspaceForPath(ctx.hostPath);
|
|
45711
|
+
if (!ws) return;
|
|
45712
|
+
const [taskIds, managerId, diff] = await Promise.all([
|
|
45713
|
+
boxTaskIds(ws.id, ctx.boxId),
|
|
45714
|
+
managerIdForTarget({ boxId: ctx.boxId }, { workspaceId: ws.id }),
|
|
45715
|
+
stat43 ? pushLineStat(stat43) : void 0
|
|
45716
|
+
]);
|
|
45717
|
+
await recordTimelineEvent(ws.id, {
|
|
45718
|
+
type: "git.push",
|
|
45719
|
+
actor: "box",
|
|
45720
|
+
boxId: ctx.boxId,
|
|
45721
|
+
...ctx.boxName ? { boxName: ctx.boxName } : {},
|
|
45722
|
+
...ctx.branch ? { branch: ctx.branch } : {},
|
|
45723
|
+
...managerId ? { managerId } : {},
|
|
45724
|
+
...taskIds.length ? { taskIds } : {},
|
|
45725
|
+
...diff ?? {}
|
|
45726
|
+
});
|
|
45727
|
+
} catch {
|
|
45728
|
+
}
|
|
45729
|
+
}
|
|
45730
|
+
var MERGE_VALUE_FLAGS = /* @__PURE__ */ new Set([
|
|
45731
|
+
"-b",
|
|
45732
|
+
"--body",
|
|
45733
|
+
"-F",
|
|
45734
|
+
"--body-file",
|
|
45735
|
+
"-t",
|
|
45736
|
+
"--subject",
|
|
45737
|
+
"-A",
|
|
45738
|
+
"--author-email",
|
|
45739
|
+
"--match-head-commit",
|
|
45740
|
+
"-R",
|
|
45741
|
+
"--repo"
|
|
45742
|
+
]);
|
|
45743
|
+
function prMergeTarget(rest) {
|
|
45744
|
+
for (let i2 = 0; i2 < rest.length; i2++) {
|
|
45745
|
+
const arg = rest[i2] ?? "";
|
|
45746
|
+
if (MERGE_VALUE_FLAGS.has(arg)) {
|
|
45747
|
+
i2++;
|
|
45748
|
+
continue;
|
|
45749
|
+
}
|
|
45750
|
+
if (!arg.startsWith("-")) return arg;
|
|
45751
|
+
}
|
|
45752
|
+
return void 0;
|
|
45753
|
+
}
|
|
45754
|
+
function prMergeRepo(rest) {
|
|
45755
|
+
for (let i2 = 0; i2 < rest.length; i2++) {
|
|
45756
|
+
const arg = rest[i2] ?? "";
|
|
45757
|
+
if (arg === "-R" || arg === "--repo") return rest[i2 + 1] || void 0;
|
|
45758
|
+
if (arg.startsWith("--repo=")) return arg.slice("--repo=".length) || void 0;
|
|
45759
|
+
if (arg.startsWith("-R") && arg.length > 2) return arg.slice(2);
|
|
45760
|
+
if (MERGE_VALUE_FLAGS.has(arg)) i2++;
|
|
45761
|
+
}
|
|
45762
|
+
return void 0;
|
|
45763
|
+
}
|
|
45764
|
+
function prViewArgs(lead, target, repo) {
|
|
45765
|
+
return [
|
|
45766
|
+
...lead,
|
|
45767
|
+
"pr",
|
|
45768
|
+
"view",
|
|
45769
|
+
target,
|
|
45770
|
+
...repo ? ["--repo", repo] : [],
|
|
45771
|
+
"--json",
|
|
45772
|
+
GH_PR_JSON_FIELDS
|
|
45773
|
+
];
|
|
45774
|
+
}
|
|
45775
|
+
async function recordBoxGhResult(ctx, args, result) {
|
|
45776
|
+
if (result.exitCode !== 0) return;
|
|
45777
|
+
const verb = ghVerbArgv(args);
|
|
45778
|
+
if (verb[0] !== "pr" || verb[1] !== "create" && verb[1] !== "merge") return;
|
|
45779
|
+
try {
|
|
45780
|
+
const ws = await workspaceForPath(ctx.hostPath);
|
|
45781
|
+
if (!ws) return;
|
|
45782
|
+
const target = verb[1] === "create" ? parsePrUrl(result.stdout)?.url : prMergeTarget(verb.slice(2)) ?? ctx.branch;
|
|
45783
|
+
if (!target) return;
|
|
45784
|
+
const lead = args.slice(0, args.length - verb.length);
|
|
45785
|
+
const ghTarget = await resolveGhTarget(ctx.originUrl);
|
|
45786
|
+
if (ghTarget.error) return;
|
|
45787
|
+
const repo = verb[1] === "merge" ? prMergeRepo(verb.slice(2)) : void 0;
|
|
45788
|
+
const run5 = ghRunContext(ctx.hostPath, ctx.originUrl, prViewArgs(lead, target, repo));
|
|
45789
|
+
const view = await runHostGh(run5.args, run5.cwd, { host: ghTarget.host, timeoutMs: 2e4 });
|
|
45790
|
+
if (view.exitCode !== 0) return;
|
|
45791
|
+
const pr = JSON.parse(view.stdout);
|
|
45792
|
+
const parsed = parsePrUrl(pr.url);
|
|
45793
|
+
if (!parsed) return;
|
|
45794
|
+
const [taskIds, managerId] = await Promise.all([
|
|
45795
|
+
boxTaskIds(ws.id, ctx.boxId),
|
|
45796
|
+
managerIdForTarget({ boxId: ctx.boxId }, { workspaceId: ws.id })
|
|
45797
|
+
]);
|
|
45798
|
+
const events = prTimelineEvents(pr, parsed.repo, {
|
|
45799
|
+
actor: "box",
|
|
45800
|
+
boxId: ctx.boxId,
|
|
45801
|
+
...ctx.boxName ? { boxName: ctx.boxName } : {},
|
|
45802
|
+
...managerId ? { managerId } : {},
|
|
45803
|
+
...taskIds.length ? { taskIds } : {}
|
|
45804
|
+
});
|
|
45805
|
+
for (const ev of events) {
|
|
45806
|
+
if (ev.type === "pr.ready") continue;
|
|
45807
|
+
await recordTimelineEvent(ws.id, ev);
|
|
45808
|
+
}
|
|
45809
|
+
} catch {
|
|
45810
|
+
}
|
|
45811
|
+
}
|
|
45812
|
+
var QUEUE_DIR = (0, import_path48.join)(STATE_DIR2, "queue");
|
|
45813
|
+
var TERMINAL_RETENTION_MS = 60 * 60 * 1e3;
|
|
45814
|
+
var SWEEP_INTERVAL_MS = 60 * 1e3;
|
|
45815
|
+
var QUEUE_LOGS_DIR = (0, import_path48.join)(STATE_DIR2, "logs");
|
|
45816
|
+
function queueLogPath(id) {
|
|
45817
|
+
return (0, import_path48.join)(QUEUE_LOGS_DIR, `queue-${id}.log`);
|
|
45818
|
+
}
|
|
45819
|
+
|
|
45820
|
+
// ../relay/dist/chunk-2F65LVQC.js
|
|
45821
|
+
init_dist();
|
|
45822
|
+
init_pg_core();
|
|
45823
|
+
init_sqlite_core();
|
|
45824
|
+
var import_path49 = require("path");
|
|
45825
|
+
init_dist2();
|
|
45826
|
+
var import_path50 = require("path");
|
|
45827
|
+
init_dist2();
|
|
45828
|
+
var pgBoxes = pgTable("boxes", {
|
|
45829
|
+
boxId: text("box_id").primaryKey(),
|
|
45830
|
+
token: text("token").notNull(),
|
|
45831
|
+
originUrl: text("origin_url"),
|
|
45832
|
+
data: jsonb("data").$type().notNull(),
|
|
45833
|
+
registeredAt: timestamp("registered_at", { withTimezone: true }).notNull()
|
|
45834
|
+
});
|
|
45835
|
+
var pgEvents = pgTable("events", {
|
|
45836
|
+
id: bigint("id", { mode: "number" }).generatedAlwaysAsIdentity().primaryKey(),
|
|
45837
|
+
boxId: text("box_id").notNull(),
|
|
45838
|
+
type: text("type").notNull(),
|
|
45839
|
+
ts: text("ts"),
|
|
45840
|
+
payload: jsonb("payload"),
|
|
45841
|
+
receivedAt: timestamp("received_at", { withTimezone: true }).notNull()
|
|
45842
|
+
});
|
|
45843
|
+
var pgBoxStatus = pgTable("box_status", {
|
|
45844
|
+
boxId: text("box_id").primaryKey(),
|
|
45845
|
+
name: text("name"),
|
|
45846
|
+
projectIndex: integer("project_index"),
|
|
45847
|
+
status: jsonb("status").$type().notNull(),
|
|
45848
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull()
|
|
45849
|
+
});
|
|
45850
|
+
var pgPrompts = pgTable("prompts", {
|
|
45851
|
+
id: text("id").primaryKey(),
|
|
45852
|
+
boxId: text("box_id").notNull(),
|
|
45853
|
+
ev: jsonb("ev").$type().notNull(),
|
|
45854
|
+
method: text("method").notNull(),
|
|
45855
|
+
params: jsonb("params"),
|
|
45856
|
+
status: text("status").$type().notNull(),
|
|
45857
|
+
answer: text("answer").$type(),
|
|
45858
|
+
cancelled: boolean("cancelled"),
|
|
45859
|
+
result: jsonb("result").$type(),
|
|
45860
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull(),
|
|
45861
|
+
expiresAt: timestamp("expires_at", { withTimezone: true })
|
|
45862
|
+
});
|
|
45863
|
+
var pgCreateJobs = pgTable("create_jobs", {
|
|
45864
|
+
id: text("id").primaryKey(),
|
|
45865
|
+
status: text("status").$type().notNull(),
|
|
45866
|
+
request: jsonb("request").$type().notNull(),
|
|
45867
|
+
result: jsonb("result").$type(),
|
|
45868
|
+
claimedBy: text("claimed_by"),
|
|
45869
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull(),
|
|
45870
|
+
startedAt: timestamp("started_at", { withTimezone: true }),
|
|
45871
|
+
finishedAt: timestamp("finished_at", { withTimezone: true })
|
|
45872
|
+
});
|
|
45873
|
+
var sqliteBoxes = sqliteTable(
|
|
45874
|
+
"boxes",
|
|
45875
|
+
{
|
|
45876
|
+
boxId: text2("box_id").primaryKey(),
|
|
45877
|
+
token: text2("token").notNull(),
|
|
45878
|
+
originUrl: text2("origin_url"),
|
|
45879
|
+
data: text2("data", { mode: "json" }).$type().notNull(),
|
|
45880
|
+
registeredAt: text2("registered_at").notNull()
|
|
45881
|
+
},
|
|
45882
|
+
(t) => [index("boxes_token_idx").on(t.token)]
|
|
45883
|
+
);
|
|
45884
|
+
var sqliteEvents = sqliteTable(
|
|
45885
|
+
"events",
|
|
45886
|
+
{
|
|
45887
|
+
id: integer2("id").primaryKey({ autoIncrement: true }),
|
|
45888
|
+
boxId: text2("box_id").notNull(),
|
|
45889
|
+
type: text2("type").notNull(),
|
|
45890
|
+
ts: text2("ts"),
|
|
45891
|
+
payload: text2("payload", { mode: "json" }),
|
|
45892
|
+
receivedAt: text2("received_at").notNull()
|
|
45893
|
+
},
|
|
45894
|
+
(t) => [index("events_box_idx").on(t.boxId, t.id)]
|
|
45895
|
+
);
|
|
45896
|
+
var sqliteBoxStatus = sqliteTable("box_status", {
|
|
45897
|
+
boxId: text2("box_id").primaryKey(),
|
|
45898
|
+
name: text2("name"),
|
|
45899
|
+
projectIndex: integer2("project_index"),
|
|
45900
|
+
status: text2("status", { mode: "json" }).$type().notNull(),
|
|
45901
|
+
updatedAt: text2("updated_at").notNull()
|
|
45902
|
+
});
|
|
45903
|
+
var sqlitePrompts = sqliteTable(
|
|
45904
|
+
"prompts",
|
|
45905
|
+
{
|
|
45906
|
+
id: text2("id").primaryKey(),
|
|
45907
|
+
boxId: text2("box_id").notNull(),
|
|
45908
|
+
ev: text2("ev", { mode: "json" }).$type().notNull(),
|
|
45909
|
+
method: text2("method").notNull(),
|
|
45910
|
+
params: text2("params", { mode: "json" }),
|
|
45911
|
+
status: text2("status").$type().notNull(),
|
|
45912
|
+
answer: text2("answer").$type(),
|
|
45913
|
+
cancelled: integer2("cancelled", { mode: "boolean" }),
|
|
45914
|
+
result: text2("result", { mode: "json" }).$type(),
|
|
45915
|
+
createdAt: text2("created_at").notNull(),
|
|
45916
|
+
expiresAt: text2("expires_at")
|
|
45917
|
+
},
|
|
45918
|
+
(t) => [index("prompts_box_status_idx").on(t.boxId, t.status)]
|
|
45919
|
+
);
|
|
45920
|
+
var sqliteCreateJobs = sqliteTable(
|
|
45921
|
+
"create_jobs",
|
|
45922
|
+
{
|
|
45923
|
+
id: text2("id").primaryKey(),
|
|
45924
|
+
status: text2("status").$type().notNull(),
|
|
45925
|
+
request: text2("request", { mode: "json" }).$type().notNull(),
|
|
45926
|
+
result: text2("result", { mode: "json" }).$type(),
|
|
45927
|
+
claimedBy: text2("claimed_by"),
|
|
45928
|
+
createdAt: text2("created_at").notNull(),
|
|
45929
|
+
startedAt: text2("started_at"),
|
|
45930
|
+
finishedAt: text2("finished_at")
|
|
45931
|
+
},
|
|
45932
|
+
(t) => [index("create_jobs_status_idx").on(t.status, t.createdAt)]
|
|
45933
|
+
);
|
|
45934
|
+
var DEFAULT_SQLITE_STORE_PATH = (0, import_path49.join)(STATE_DIR, "hub", "store.db");
|
|
45935
|
+
var DEFAULT_CUSTODY_DIR = (0, import_path50.join)(STATE_DIR, "hub", "custody");
|
|
45936
|
+
|
|
45937
|
+
// ../relay/dist/chunk-TPGEMVLM.js
|
|
45938
|
+
var import_child_process4 = require("child_process");
|
|
45939
|
+
var import_fs14 = require("fs");
|
|
45940
|
+
var import_http3 = require("http");
|
|
45941
|
+
init_execa();
|
|
45942
|
+
var import_fs15 = require("fs");
|
|
45943
|
+
var import_promises68 = require("fs/promises");
|
|
45944
|
+
var import_os26 = require("os");
|
|
45945
|
+
var import_path51 = require("path");
|
|
45946
|
+
var import_url4 = require("url");
|
|
45947
|
+
init_dist();
|
|
45948
|
+
init_dist4();
|
|
45949
|
+
var import_crypto17 = require("crypto");
|
|
45950
|
+
var import_crypto18 = require("crypto");
|
|
45951
|
+
init_dist2();
|
|
45952
|
+
var import_path52 = require("path");
|
|
45953
|
+
init_dist2();
|
|
45954
|
+
var import_child_process5 = require("child_process");
|
|
45955
|
+
init_dist();
|
|
45956
|
+
init_dist4();
|
|
45957
|
+
var import_crypto19 = require("crypto");
|
|
45958
|
+
init_dist4();
|
|
45959
|
+
var import_crypto20 = require("crypto");
|
|
45960
|
+
var import_crypto21 = require("crypto");
|
|
45961
|
+
var import_child_process6 = require("child_process");
|
|
45962
|
+
var import_fs16 = require("fs");
|
|
45963
|
+
var import_promises69 = require("fs/promises");
|
|
45964
|
+
var import_os27 = require("os");
|
|
45965
|
+
var import_path53 = require("path");
|
|
45966
|
+
var import_promises70 = require("stream/promises");
|
|
45967
|
+
var import_crypto22 = require("crypto");
|
|
45968
|
+
var import_child_process7 = require("child_process");
|
|
45969
|
+
var import_fs17 = require("fs");
|
|
45970
|
+
var import_promises71 = require("fs/promises");
|
|
45971
|
+
var import_os28 = require("os");
|
|
45972
|
+
var import_path54 = require("path");
|
|
45973
|
+
var import_crypto23 = require("crypto");
|
|
45974
|
+
init_dist4();
|
|
45975
|
+
init_dist();
|
|
45976
|
+
var import_crypto24 = require("crypto");
|
|
45977
|
+
var import_promises72 = require("fs/promises");
|
|
45978
|
+
init_dist2();
|
|
45979
|
+
init_execa();
|
|
45980
|
+
init_dist4();
|
|
45981
|
+
init_dist2();
|
|
45982
|
+
init_dist4();
|
|
45983
|
+
init_dist2();
|
|
45984
|
+
init_dist4();
|
|
45985
|
+
init_dist4();
|
|
45986
|
+
init_dist();
|
|
45348
45987
|
var DEFAULT_TTL_MS = 12e4;
|
|
45349
45988
|
function hashRpcParams(params) {
|
|
45350
|
-
return (0,
|
|
45989
|
+
return (0, import_crypto17.createHash)("sha256").update(canonicalJson(params)).digest("hex");
|
|
45351
45990
|
}
|
|
45352
45991
|
function canonicalJson(v) {
|
|
45353
45992
|
if (v === null) return "null";
|
|
@@ -45371,7 +46010,7 @@ var HostInitiatedTokens = class {
|
|
|
45371
46010
|
* params (no current call sites use this).
|
|
45372
46011
|
*/
|
|
45373
46012
|
mint(boxId, method, paramsHash, ttlMs = DEFAULT_TTL_MS) {
|
|
45374
|
-
const token = (0,
|
|
46013
|
+
const token = (0, import_crypto17.randomBytes)(32).toString("hex");
|
|
45375
46014
|
this.store.set(token, { boxId, method, paramsHash, expiresAt: Date.now() + ttlMs });
|
|
45376
46015
|
return token;
|
|
45377
46016
|
}
|
|
@@ -45470,7 +46109,7 @@ function cpCacheKeyInput(source) {
|
|
|
45470
46109
|
return `rel:${rel}`;
|
|
45471
46110
|
}
|
|
45472
46111
|
function cpCacheKey(source) {
|
|
45473
|
-
return (0,
|
|
46112
|
+
return (0, import_crypto18.createHash)("sha256").update(cpCacheKeyInput(source)).digest("hex").slice(0, 32);
|
|
45474
46113
|
}
|
|
45475
46114
|
function cpCacheTarPath(prefix, source) {
|
|
45476
46115
|
return `${prefix}/${cpCacheKey(source)}.tar`;
|
|
@@ -45588,7 +46227,7 @@ var CREDENTIAL_ARGV_PATTERNS = [
|
|
|
45588
46227
|
function refuseCredentialArgv(name, args, bin) {
|
|
45589
46228
|
const joined = args.join(" ");
|
|
45590
46229
|
const candidates = [`${name} ${joined}`];
|
|
45591
|
-
const binName = bin ? (0,
|
|
46230
|
+
const binName = bin ? (0, import_path52.basename)(bin) : void 0;
|
|
45592
46231
|
if (binName && binName !== name) candidates.push(`${binName} ${joined}`);
|
|
45593
46232
|
for (const re of CREDENTIAL_ARGV_PATTERNS) {
|
|
45594
46233
|
if (candidates.some((c3) => re.test(c3))) {
|
|
@@ -45793,7 +46432,7 @@ var browserOpenBudget = new BrowserOpenBudget();
|
|
|
45793
46432
|
var OPEN_LINK_TTL_MS = 9e4;
|
|
45794
46433
|
async function offerBrowserOpen(deps, url) {
|
|
45795
46434
|
const budget = deps.budget ?? browserOpenBudget;
|
|
45796
|
-
const
|
|
46435
|
+
const open24 = deps.openHost ?? openOnHost;
|
|
45797
46436
|
const decision = budget.decide(deps.boxId, url, deps.autoApproveSafe);
|
|
45798
46437
|
if (decision.action === "drop") return "dropped";
|
|
45799
46438
|
if (decision.action === "open") budget.record(deps.boxId, url);
|
|
@@ -45808,7 +46447,7 @@ async function offerBrowserOpen(deps, url) {
|
|
|
45808
46447
|
};
|
|
45809
46448
|
if (decision.action === "open" && !deps.controlPlane && deps.subscribers.count(deps.boxId) === 0) {
|
|
45810
46449
|
deps.prompts.noteAutoApprove(deps.boxId, promptEvent, decision.reason);
|
|
45811
|
-
|
|
46450
|
+
open24(url);
|
|
45812
46451
|
return "opened-locally";
|
|
45813
46452
|
}
|
|
45814
46453
|
if (decision.action !== "open" && deps.prompts.consumeAutoApprove(deps.boxId, promptEvent)) {
|
|
@@ -45817,10 +46456,10 @@ async function offerBrowserOpen(deps, url) {
|
|
|
45817
46456
|
deps.log?.(`browser.open: auto-approved but nothing here can open it (control box): ${url}`);
|
|
45818
46457
|
return "unclaimed";
|
|
45819
46458
|
}
|
|
45820
|
-
|
|
46459
|
+
open24(url);
|
|
45821
46460
|
return "opened-locally";
|
|
45822
46461
|
}
|
|
45823
|
-
const ev = { id: (0,
|
|
46462
|
+
const ev = { id: (0, import_crypto19.randomUUID)(), ...promptEvent };
|
|
45824
46463
|
const settled = deps.prompts.add(deps.boxId, ev);
|
|
45825
46464
|
const timer = setTimeout(() => {
|
|
45826
46465
|
if (deps.prompts.resolve(ev.id, "n", true)) {
|
|
@@ -45842,7 +46481,7 @@ async function offerBrowserOpen(deps, url) {
|
|
|
45842
46481
|
deps.log?.(`browser.open: approved but no client opened it (control box): ${url}`);
|
|
45843
46482
|
return "unclaimed";
|
|
45844
46483
|
}
|
|
45845
|
-
|
|
46484
|
+
open24(url);
|
|
45846
46485
|
return "opened-after-answer";
|
|
45847
46486
|
}
|
|
45848
46487
|
var cloudBackendLoader;
|
|
@@ -45955,7 +46594,21 @@ async function executeCloudAction(action, deps) {
|
|
|
45955
46594
|
};
|
|
45956
46595
|
}
|
|
45957
46596
|
if (action.method === "git.push" || action.method === "git.fetch") {
|
|
45958
|
-
|
|
46597
|
+
const push = { hostInitiated: false };
|
|
46598
|
+
return runGitRpc(action, deps, push).then((result) => {
|
|
46599
|
+
if (action.method === "git.push" && result.exitCode === 0) {
|
|
46600
|
+
const hostOnly = Boolean(action.params?.hostOnly);
|
|
46601
|
+
void cloudTimelineContext(deps).then(
|
|
46602
|
+
(ctx) => ctx ? recordBoxGitPush(
|
|
46603
|
+
ctx,
|
|
46604
|
+
{ hostInitiated: push.hostInitiated, hostOnly },
|
|
46605
|
+
result,
|
|
46606
|
+
push.stat
|
|
46607
|
+
) : void 0
|
|
46608
|
+
);
|
|
46609
|
+
}
|
|
46610
|
+
return result;
|
|
46611
|
+
});
|
|
45959
46612
|
}
|
|
45960
46613
|
if (action.method === "cp.toHost" || action.method === "cp.fromHost") {
|
|
45961
46614
|
return runCpRpc(action, deps);
|
|
@@ -45970,7 +46623,16 @@ async function executeCloudAction(action, deps) {
|
|
|
45970
46623
|
return runBrowserOpenMirror(action, deps);
|
|
45971
46624
|
}
|
|
45972
46625
|
if (action.method === "gh.exec") {
|
|
45973
|
-
return runGhExecRpc(action, deps)
|
|
46626
|
+
return runGhExecRpc(action, deps).then((result) => {
|
|
46627
|
+
if (result.exitCode === 0) {
|
|
46628
|
+
const raw = action.params?.args;
|
|
46629
|
+
const args = Array.isArray(raw) ? raw.filter((a2) => typeof a2 === "string") : [];
|
|
46630
|
+
void cloudTimelineContext(deps).then(
|
|
46631
|
+
(ctx) => ctx ? recordBoxGhResult(ctx, args, result) : void 0
|
|
46632
|
+
);
|
|
46633
|
+
}
|
|
46634
|
+
return result;
|
|
46635
|
+
});
|
|
45974
46636
|
}
|
|
45975
46637
|
if (action.method.startsWith("tool.")) {
|
|
45976
46638
|
return runToolRpc(action, deps);
|
|
@@ -46190,6 +46852,20 @@ function cloudHandleOf(lookup) {
|
|
|
46190
46852
|
...lookup.sandboxClass ? { sandboxClass: lookup.sandboxClass } : {}
|
|
46191
46853
|
};
|
|
46192
46854
|
}
|
|
46855
|
+
async function cloudTimelineContext(deps) {
|
|
46856
|
+
try {
|
|
46857
|
+
const lookup = await lookupCloudBox(deps.boxId);
|
|
46858
|
+
return {
|
|
46859
|
+
boxId: deps.boxId,
|
|
46860
|
+
...deps.boxName ? { boxName: deps.boxName } : {},
|
|
46861
|
+
hostPath: lookup.workspacePath,
|
|
46862
|
+
...lookup.sanctionedBranch ? { branch: lookup.sanctionedBranch } : {},
|
|
46863
|
+
...deps.originUrl ? { originUrl: deps.originUrl } : {}
|
|
46864
|
+
};
|
|
46865
|
+
} catch {
|
|
46866
|
+
return null;
|
|
46867
|
+
}
|
|
46868
|
+
}
|
|
46193
46869
|
async function lookupCloudBox(boxId) {
|
|
46194
46870
|
const state = await readState();
|
|
46195
46871
|
const hit = findBox(boxId, state);
|
|
@@ -46439,7 +47115,7 @@ function httpsOriginForScratchPush(origin) {
|
|
|
46439
47115
|
}
|
|
46440
47116
|
}
|
|
46441
47117
|
async function resolveHostGitRepo(workspacePath, deps, remoteName) {
|
|
46442
|
-
if (workspacePath.length > 0 && (0,
|
|
47118
|
+
if (workspacePath.length > 0 && (0, import_fs15.existsSync)(workspacePath)) {
|
|
46443
47119
|
return {
|
|
46444
47120
|
dir: workspacePath,
|
|
46445
47121
|
remote: remoteName,
|
|
@@ -46454,20 +47130,20 @@ async function resolveHostGitRepo(workspacePath, deps, remoteName) {
|
|
|
46454
47130
|
);
|
|
46455
47131
|
}
|
|
46456
47132
|
const origin = httpsOriginForScratchPush(rawOrigin);
|
|
46457
|
-
const dir = await (0,
|
|
47133
|
+
const dir = await (0, import_promises68.mkdtemp)((0, import_path51.join)((0, import_os26.tmpdir)(), "agentbox-git-scratch-"));
|
|
46458
47134
|
const init = await execa("git", ["-C", dir, "init", "--quiet"], { reject: false });
|
|
46459
47135
|
if ((init.exitCode ?? 1) !== 0) {
|
|
46460
|
-
await (0,
|
|
47136
|
+
await (0, import_promises68.rm)(dir, { recursive: true, force: true });
|
|
46461
47137
|
throw new Error(`could not initialize a scratch git repo: ${init.stderr ?? ""}`);
|
|
46462
47138
|
}
|
|
46463
47139
|
return {
|
|
46464
47140
|
dir,
|
|
46465
47141
|
remote: origin,
|
|
46466
47142
|
scratch: true,
|
|
46467
|
-
cleanup: () => (0,
|
|
47143
|
+
cleanup: () => (0, import_promises68.rm)(dir, { recursive: true, force: true })
|
|
46468
47144
|
};
|
|
46469
47145
|
}
|
|
46470
|
-
async function runGitRpc(action, deps) {
|
|
47146
|
+
async function runGitRpc(action, deps, trace = { hostInitiated: false }) {
|
|
46471
47147
|
const params = action.params ?? {};
|
|
46472
47148
|
const lookup = await lookupCloudBox(deps.boxId);
|
|
46473
47149
|
const backend = await resolveCloudBackend(deps.backendName);
|
|
@@ -46493,7 +47169,7 @@ async function runGitRpc(action, deps) {
|
|
|
46493
47169
|
};
|
|
46494
47170
|
}
|
|
46495
47171
|
if (params.hostOnly) {
|
|
46496
|
-
if (lookup.workspacePath.length === 0 || !(0,
|
|
47172
|
+
if (lookup.workspacePath.length === 0 || !(0, import_fs15.existsSync)(lookup.workspacePath)) {
|
|
46497
47173
|
return {
|
|
46498
47174
|
exitCode: 64,
|
|
46499
47175
|
stdout: "",
|
|
@@ -46502,8 +47178,8 @@ async function runGitRpc(action, deps) {
|
|
|
46502
47178
|
};
|
|
46503
47179
|
}
|
|
46504
47180
|
const dest = resolveLandDest(branch, params.as);
|
|
46505
|
-
const stageSave = await (0,
|
|
46506
|
-
const hostBundleSave = (0,
|
|
47181
|
+
const stageSave = await (0, import_promises68.mkdtemp)((0, import_path51.join)((0, import_os26.tmpdir)(), "agentbox-git-save-"));
|
|
47182
|
+
const hostBundleSave = (0, import_path51.join)(stageSave, "op.bundle");
|
|
46507
47183
|
const remoteBundleSave = "/tmp/agentbox-rpc-save.bundle";
|
|
46508
47184
|
try {
|
|
46509
47185
|
const make = await backend.exec(
|
|
@@ -46538,7 +47214,7 @@ ${landed.stdout ?? ""}`,
|
|
|
46538
47214
|
stderr: landed.stderr ?? ""
|
|
46539
47215
|
};
|
|
46540
47216
|
} finally {
|
|
46541
|
-
await (0,
|
|
47217
|
+
await (0, import_promises68.rm)(stageSave, { recursive: true, force: true });
|
|
46542
47218
|
await backend.exec(handle, `rm -f ${shellQuote(remoteBundleSave)}`).catch(() => {
|
|
46543
47219
|
});
|
|
46544
47220
|
}
|
|
@@ -46566,6 +47242,7 @@ ${landed.stdout ?? ""}`,
|
|
|
46566
47242
|
"git.push",
|
|
46567
47243
|
incomingHashGit
|
|
46568
47244
|
) ?? false);
|
|
47245
|
+
trace.hostInitiated = hostInitiatedOk;
|
|
46569
47246
|
if (action.method === "git.push" && !bypassPushGate && tokenClaimedGit && !hostInitiatedOk) {
|
|
46570
47247
|
return {
|
|
46571
47248
|
exitCode: 10,
|
|
@@ -46634,8 +47311,8 @@ ${landed.stdout ?? ""}`,
|
|
|
46634
47311
|
`git.${action.method === "git.push" ? "push" : "fetch"}: no host checkout for box ${deps.boxId}; using a scratch repo against ${repo.remote}`
|
|
46635
47312
|
);
|
|
46636
47313
|
}
|
|
46637
|
-
const stage = await (0,
|
|
46638
|
-
const hostBundle = (0,
|
|
47314
|
+
const stage = await (0, import_promises68.mkdtemp)((0, import_path51.join)((0, import_os26.tmpdir)(), "agentbox-git-rpc-"));
|
|
47315
|
+
const hostBundle = (0, import_path51.join)(stage, "op.bundle");
|
|
46639
47316
|
const remoteBundle = "/tmp/agentbox-rpc.bundle";
|
|
46640
47317
|
try {
|
|
46641
47318
|
if (action.method === "git.push") {
|
|
@@ -46650,6 +47327,11 @@ ${landed.stdout ?? ""}`,
|
|
|
46650
47327
|
stderr: `bundle create failed: ${make.stderr || make.stdout}`
|
|
46651
47328
|
};
|
|
46652
47329
|
}
|
|
47330
|
+
if (!repo.scratch && !trace.hostInitiated) {
|
|
47331
|
+
const ref = pushedRef(branch, { remote: remoteName });
|
|
47332
|
+
const before = await readRefTip(repo.dir, ref);
|
|
47333
|
+
trace.stat = { repo: repo.dir, ref, branch, ...before ? { before } : {} };
|
|
47334
|
+
}
|
|
46653
47335
|
await backend.downloadFile(handle, remoteBundle, hostBundle);
|
|
46654
47336
|
const fetch2 = await execa(
|
|
46655
47337
|
"git",
|
|
@@ -46734,7 +47416,7 @@ relay: post-push in-box origin/upstream sync threw: ${err instanceof Error ? err
|
|
|
46734
47416
|
stderr: sandboxFetch.stderr
|
|
46735
47417
|
};
|
|
46736
47418
|
} finally {
|
|
46737
|
-
await (0,
|
|
47419
|
+
await (0, import_promises68.rm)(stage, { recursive: true, force: true });
|
|
46738
47420
|
await repo.cleanup().catch(() => {
|
|
46739
47421
|
});
|
|
46740
47422
|
await backend.exec(handle, `rm -f ${shellQuote(remoteBundle)}`).catch(() => {
|
|
@@ -46763,7 +47445,7 @@ var HostActionQueue = class {
|
|
|
46763
47445
|
* is open" semantics).
|
|
46764
47446
|
*/
|
|
46765
47447
|
enqueue(boxId, method, params) {
|
|
46766
|
-
const id = (0,
|
|
47448
|
+
const id = (0, import_crypto20.randomUUID)();
|
|
46767
47449
|
const action = {
|
|
46768
47450
|
id,
|
|
46769
47451
|
boxId,
|
|
@@ -46862,7 +47544,7 @@ var HostReachQueue = class {
|
|
|
46862
47544
|
* normal, expected state (a closed laptop), not an error condition.
|
|
46863
47545
|
*/
|
|
46864
47546
|
request(boxId, method, params, opts = {}) {
|
|
46865
|
-
const id = (0,
|
|
47547
|
+
const id = (0, import_crypto21.randomUUID)();
|
|
46866
47548
|
const action = {
|
|
46867
47549
|
id,
|
|
46868
47550
|
boxId,
|
|
@@ -47161,7 +47843,7 @@ async function serveCpFromCache(params, resolved, deps) {
|
|
|
47161
47843
|
}
|
|
47162
47844
|
let workDir;
|
|
47163
47845
|
try {
|
|
47164
|
-
const dir = await (0,
|
|
47846
|
+
const dir = await (0, import_promises69.mkdtemp)((0, import_path53.join)((0, import_os27.tmpdir)(), "agentbox-cp-serve-"));
|
|
47165
47847
|
workDir = dir;
|
|
47166
47848
|
const names = [];
|
|
47167
47849
|
for (const entry of lookup.entries) {
|
|
@@ -47169,13 +47851,13 @@ async function serveCpFromCache(params, resolved, deps) {
|
|
|
47169
47851
|
cpCacheTarPath(deps.cachePrefix, entry.sourcePath)
|
|
47170
47852
|
);
|
|
47171
47853
|
if (!found) return { exitCode: 69, stdout: "", stderr: "" };
|
|
47172
|
-
const tarPath = (0,
|
|
47173
|
-
await (0,
|
|
47854
|
+
const tarPath = (0, import_path53.join)(dir, `${names.length.toString()}.tar`);
|
|
47855
|
+
await (0, import_promises70.pipeline)(found.data, (0, import_fs16.createWriteStream)(tarPath));
|
|
47174
47856
|
await run22("tar", ["-xf", tarPath, "-C", dir], UNTAR_TIMEOUT_MS);
|
|
47175
|
-
await (0,
|
|
47176
|
-
names.push((0,
|
|
47857
|
+
await (0, import_promises69.rm)(tarPath, { force: true });
|
|
47858
|
+
names.push((0, import_path53.basename)(entry.sourcePath));
|
|
47177
47859
|
}
|
|
47178
|
-
const staged = names.map((n2) => (0,
|
|
47860
|
+
const staged = names.map((n2) => (0, import_path53.join)(dir, n2));
|
|
47179
47861
|
const absent = staged.filter((p) => !(0, import_fs16.existsSync)(p));
|
|
47180
47862
|
if (absent.length > 0) {
|
|
47181
47863
|
return {
|
|
@@ -47220,7 +47902,7 @@ ${age}
|
|
|
47220
47902
|
`
|
|
47221
47903
|
};
|
|
47222
47904
|
} finally {
|
|
47223
|
-
if (workDir) await (0,
|
|
47905
|
+
if (workDir) await (0, import_promises69.rm)(workDir, { recursive: true, force: true }).catch(() => {
|
|
47224
47906
|
});
|
|
47225
47907
|
}
|
|
47226
47908
|
}
|
|
@@ -47275,9 +47957,9 @@ async function parkCpOutbox(sources, dest, deps) {
|
|
|
47275
47957
|
if (!deps.custody || !deps.cliEntry) return null;
|
|
47276
47958
|
let workDir;
|
|
47277
47959
|
try {
|
|
47278
|
-
const dir = await (0,
|
|
47960
|
+
const dir = await (0, import_promises71.mkdtemp)((0, import_path54.join)((0, import_os28.tmpdir)(), "agentbox-cp-outbox-"));
|
|
47279
47961
|
workDir = dir;
|
|
47280
|
-
const stage = (0,
|
|
47962
|
+
const stage = (0, import_path54.join)(dir, "payload");
|
|
47281
47963
|
await run32("mkdir", ["-p", stage], TAR_TIMEOUT_MS2);
|
|
47282
47964
|
for (const src of sources) {
|
|
47283
47965
|
await runNode(
|
|
@@ -47286,16 +47968,16 @@ async function parkCpOutbox(sources, dest, deps) {
|
|
|
47286
47968
|
PULL_TIMEOUT_MS
|
|
47287
47969
|
);
|
|
47288
47970
|
}
|
|
47289
|
-
const names = await (0,
|
|
47971
|
+
const names = await (0, import_promises71.readdir)(stage);
|
|
47290
47972
|
if (names.length === 0) return null;
|
|
47291
|
-
const tarPath = (0,
|
|
47973
|
+
const tarPath = (0, import_path54.join)(dir, "outbox.tar");
|
|
47292
47974
|
await run32("tar", ["-cf", tarPath, "-C", stage, ...names], TAR_TIMEOUT_MS2);
|
|
47293
|
-
const info = await (0,
|
|
47975
|
+
const info = await (0, import_promises71.stat)(tarPath);
|
|
47294
47976
|
if (info.size > deps.maxBytes) {
|
|
47295
47977
|
log(`cp outbox: ${String(info.size)} bytes exceeds the ${String(deps.maxBytes)}-byte limit`);
|
|
47296
47978
|
return null;
|
|
47297
47979
|
}
|
|
47298
|
-
const id = (0,
|
|
47980
|
+
const id = (0, import_crypto22.randomUUID)();
|
|
47299
47981
|
const meta = {
|
|
47300
47982
|
id,
|
|
47301
47983
|
boxId: deps.boxId,
|
|
@@ -47323,7 +48005,7 @@ It will land them at ${dest} \u2014 behind the usual approval \u2014 the next ti
|
|
|
47323
48005
|
log(`cp outbox: could not park: ${err instanceof Error ? err.message : String(err)}`);
|
|
47324
48006
|
return null;
|
|
47325
48007
|
} finally {
|
|
47326
|
-
if (workDir) await (0,
|
|
48008
|
+
if (workDir) await (0, import_promises71.rm)(workDir, { recursive: true, force: true }).catch(() => {
|
|
47327
48009
|
});
|
|
47328
48010
|
}
|
|
47329
48011
|
}
|
|
@@ -47376,7 +48058,7 @@ var BoxNotices = class {
|
|
|
47376
48058
|
this.entries.delete(id);
|
|
47377
48059
|
}
|
|
47378
48060
|
}
|
|
47379
|
-
const ev = { id: (0,
|
|
48061
|
+
const ev = { id: (0, import_crypto23.randomUUID)(), kind, message };
|
|
47380
48062
|
const ttl = typeof ttlMs === "number" && ttlMs > 0 ? ttlMs : DEFAULT_NOTICE_TTL_MS;
|
|
47381
48063
|
const timer = setTimeout(() => {
|
|
47382
48064
|
if (this.entries.delete(ev.id)) {
|
|
@@ -47416,7 +48098,7 @@ function timingSafeEqualStr4(a2, b) {
|
|
|
47416
48098
|
const ab = Buffer.from(a2, "utf8");
|
|
47417
48099
|
const bb = Buffer.from(b, "utf8");
|
|
47418
48100
|
if (ab.length !== bb.length) return false;
|
|
47419
|
-
return (0,
|
|
48101
|
+
return (0, import_crypto24.timingSafeEqual)(ab, bb);
|
|
47420
48102
|
}
|
|
47421
48103
|
function adminGateAllows(isLoopback, bearer, adminToken) {
|
|
47422
48104
|
if (isLoopback) return true;
|
|
@@ -47430,7 +48112,7 @@ async function readCreateJobLog(id, offset) {
|
|
|
47430
48112
|
const path6 = queueLogPath(id);
|
|
47431
48113
|
let size;
|
|
47432
48114
|
try {
|
|
47433
|
-
size = (await (0,
|
|
48115
|
+
size = (await (0, import_promises72.stat)(path6)).size;
|
|
47434
48116
|
} catch {
|
|
47435
48117
|
return { lines: [], offset: from };
|
|
47436
48118
|
}
|
|
@@ -47438,7 +48120,7 @@ async function readCreateJobLog(id, offset) {
|
|
|
47438
48120
|
if (size <= start2) return { lines: [], offset: start2 };
|
|
47439
48121
|
const len = Math.min(size - start2, MAX_BYTES_PER_READ);
|
|
47440
48122
|
const buf = Buffer.alloc(len);
|
|
47441
|
-
const fh = await (0,
|
|
48123
|
+
const fh = await (0, import_promises72.open)(path6, "r");
|
|
47442
48124
|
try {
|
|
47443
48125
|
await fh.read(buf, 0, len, start2);
|
|
47444
48126
|
} finally {
|
|
@@ -48084,6 +48766,7 @@ data: {"ts":"${(/* @__PURE__ */ new Date()).toISOString()}"}
|
|
|
48084
48766
|
send(res, result2.exitCode === 0 ? 200 : 500, result2);
|
|
48085
48767
|
return;
|
|
48086
48768
|
}
|
|
48769
|
+
let pushHostInitiated = false;
|
|
48087
48770
|
if (body.method === "git.push") {
|
|
48088
48771
|
const hostOnlyParams = body.params;
|
|
48089
48772
|
if (hostOnlyParams?.hostOnly) {
|
|
@@ -48112,6 +48795,7 @@ data: {"ts":"${(/* @__PURE__ */ new Date()).toISOString()}"}
|
|
|
48112
48795
|
const tokenClaimed = typeof params?.hostInitiated === "string";
|
|
48113
48796
|
const incomingHash = hashRpcParams(params);
|
|
48114
48797
|
const hostInitiatedOk = !bypassPushGate && tokenClaimed && hostInitiatedTokens.consume(params?.hostInitiated, reg.boxId, "git.push", incomingHash);
|
|
48798
|
+
pushHostInitiated = hostInitiatedOk;
|
|
48115
48799
|
if (!bypassPushGate && tokenClaimed && !hostInitiatedOk) {
|
|
48116
48800
|
send(res, 500, {
|
|
48117
48801
|
exitCode: 10,
|
|
@@ -48142,11 +48826,29 @@ data: {"ts":"${(/* @__PURE__ */ new Date()).toISOString()}"}
|
|
|
48142
48826
|
}
|
|
48143
48827
|
}
|
|
48144
48828
|
}
|
|
48145
|
-
const
|
|
48146
|
-
|
|
48147
|
-
|
|
48148
|
-
|
|
48149
|
-
|
|
48829
|
+
const pushParams = body.params;
|
|
48830
|
+
const pushTree = body.method === "git.push" ? resolveWorktree(reg, pushParams?.path ?? "/workspace") : void 0;
|
|
48831
|
+
const pushBranch = pushTree ? pushTree.sanctionedBranch ?? pushTree.branch : void 0;
|
|
48832
|
+
const pushStat = pushTree && pushBranch && !pushHostInitiated ? {
|
|
48833
|
+
repo: pushTree.hostMainRepo,
|
|
48834
|
+
ref: pushedRef(pushBranch, { remote: resolveRemote(pushParams?.remote) }),
|
|
48835
|
+
branch: pushBranch
|
|
48836
|
+
} : void 0;
|
|
48837
|
+
const pushBefore = pushStat ? await readRefTip(pushStat.repo, pushStat.ref) : void 0;
|
|
48838
|
+
const result = await handleGitRpc(reg, body.method, pushParams);
|
|
48839
|
+
if (body.method === "git.push" && result.exitCode === 0 && pushTree) {
|
|
48840
|
+
void recordBoxGitPush(
|
|
48841
|
+
{
|
|
48842
|
+
boxId: reg.boxId,
|
|
48843
|
+
boxName: reg.name,
|
|
48844
|
+
hostPath: pushTree.hostMainRepo,
|
|
48845
|
+
...pushBranch ? { branch: pushBranch } : {}
|
|
48846
|
+
},
|
|
48847
|
+
{ hostInitiated: pushHostInitiated, hostOnly: Boolean(pushParams?.hostOnly) },
|
|
48848
|
+
result,
|
|
48849
|
+
pushStat ? { ...pushStat, ...pushBefore ? { before: pushBefore } : {} } : void 0
|
|
48850
|
+
);
|
|
48851
|
+
}
|
|
48150
48852
|
const status2 = result.exitCode === 0 ? 200 : 500;
|
|
48151
48853
|
send(res, status2, result);
|
|
48152
48854
|
return;
|
|
@@ -48307,13 +49009,28 @@ data: {"ts":"${(/* @__PURE__ */ new Date()).toISOString()}"}
|
|
|
48307
49009
|
return;
|
|
48308
49010
|
}
|
|
48309
49011
|
if (body.method === "gh.exec") {
|
|
49012
|
+
const ghParams = body.params;
|
|
48310
49013
|
const result = await handleGhExecRpc(
|
|
48311
49014
|
reg,
|
|
48312
|
-
|
|
49015
|
+
ghParams,
|
|
48313
49016
|
prompts,
|
|
48314
49017
|
subscribers,
|
|
48315
49018
|
hostInitiatedTokens
|
|
48316
49019
|
);
|
|
49020
|
+
const ghTree = result.exitCode === 0 ? resolveWorktree(reg, ghParams?.path ?? "/workspace") : void 0;
|
|
49021
|
+
if (ghTree) {
|
|
49022
|
+
void recordBoxGhResult(
|
|
49023
|
+
{
|
|
49024
|
+
boxId: reg.boxId,
|
|
49025
|
+
boxName: reg.name,
|
|
49026
|
+
hostPath: ghTree.hostMainRepo,
|
|
49027
|
+
branch: ghTree.sanctionedBranch ?? ghTree.branch,
|
|
49028
|
+
...reg.originUrl ? { originUrl: reg.originUrl } : {}
|
|
49029
|
+
},
|
|
49030
|
+
Array.isArray(ghParams?.args) ? ghParams.args.filter((a2) => typeof a2 === "string") : [],
|
|
49031
|
+
result
|
|
49032
|
+
);
|
|
49033
|
+
}
|
|
48317
49034
|
const status2 = result.exitCode === 0 ? 200 : 500;
|
|
48318
49035
|
send(res, status2, result);
|
|
48319
49036
|
return;
|
|
@@ -49129,7 +49846,7 @@ async function parkOutboundCp(args) {
|
|
|
49129
49846
|
async function boxWorkspaceExistsHere(boxId) {
|
|
49130
49847
|
try {
|
|
49131
49848
|
const path6 = await boxWorkspacePath(boxId);
|
|
49132
|
-
return typeof path6 === "string" && path6.length > 0 && (0,
|
|
49849
|
+
return typeof path6 === "string" && path6.length > 0 && (0, import_fs14.existsSync)(path6);
|
|
49133
49850
|
} catch {
|
|
49134
49851
|
return false;
|
|
49135
49852
|
}
|
|
@@ -49264,7 +49981,7 @@ function runHostCommand(argv, timeoutMs = GIT_RPC_TIMEOUT_MS, cwd) {
|
|
|
49264
49981
|
resolve9({ exitCode: 64, stdout: "", stderr: "empty command" });
|
|
49265
49982
|
return;
|
|
49266
49983
|
}
|
|
49267
|
-
const child = (0,
|
|
49984
|
+
const child = (0, import_child_process4.spawn)(cmd, rest, {
|
|
49268
49985
|
env: process.env,
|
|
49269
49986
|
stdio: ["ignore", "pipe", "pipe"],
|
|
49270
49987
|
// Default to the relay daemon's CWD when unset (legacy behaviour); callers
|
|
@@ -49498,7 +50215,7 @@ var import_node_child_process13 = require("child_process");
|
|
|
49498
50215
|
var import_node_crypto3 = require("crypto");
|
|
49499
50216
|
var import_node_events15 = require("events");
|
|
49500
50217
|
var import_node_fs10 = require("fs");
|
|
49501
|
-
var
|
|
50218
|
+
var import_promises74 = require("fs/promises");
|
|
49502
50219
|
var import_node_path11 = require("path");
|
|
49503
50220
|
|
|
49504
50221
|
// src/probe.ts
|
|
@@ -49684,7 +50401,7 @@ var RelayClient = class {
|
|
|
49684
50401
|
};
|
|
49685
50402
|
|
|
49686
50403
|
// src/web-proxy.ts
|
|
49687
|
-
var
|
|
50404
|
+
var import_promises73 = require("fs/promises");
|
|
49688
50405
|
var import_node_net4 = require("net");
|
|
49689
50406
|
var DEFAULT_LISTEN_PORT = 80;
|
|
49690
50407
|
var DEFAULT_LOG = "/var/log/agentbox/web-proxy.log";
|
|
@@ -49757,7 +50474,7 @@ var WebProxy = class {
|
|
|
49757
50474
|
}
|
|
49758
50475
|
async log(msg) {
|
|
49759
50476
|
try {
|
|
49760
|
-
await (0,
|
|
50477
|
+
await (0, import_promises73.appendFile)(this.logPath, `[${(/* @__PURE__ */ new Date()).toISOString()}] ${msg}
|
|
49761
50478
|
`);
|
|
49762
50479
|
} catch {
|
|
49763
50480
|
}
|
|
@@ -50162,7 +50879,7 @@ var TaskRunner = class extends import_node_events15.EventEmitter {
|
|
|
50162
50879
|
return await this.runCheck(ro.command, cwd) ? "check passed" : null;
|
|
50163
50880
|
}
|
|
50164
50881
|
try {
|
|
50165
|
-
const have = (await (0,
|
|
50882
|
+
const have = (await (0, import_promises74.readFile)(this.markerPath(), "utf8")).trim();
|
|
50166
50883
|
if (have === this.commandHash(cwd)) return "marker matches";
|
|
50167
50884
|
} catch {
|
|
50168
50885
|
}
|
|
@@ -50171,8 +50888,8 @@ var TaskRunner = class extends import_node_events15.EventEmitter {
|
|
|
50171
50888
|
async writeMarker(cwd) {
|
|
50172
50889
|
const marker = this.markerPath();
|
|
50173
50890
|
try {
|
|
50174
|
-
await (0,
|
|
50175
|
-
await (0,
|
|
50891
|
+
await (0, import_promises74.mkdir)((0, import_node_path11.join)(this.opts.stateDir, "tasks"), { recursive: true });
|
|
50892
|
+
await (0, import_promises74.writeFile)(marker, `${this.commandHash(cwd)}
|
|
50176
50893
|
`, "utf8");
|
|
50177
50894
|
} catch (err) {
|
|
50178
50895
|
this.appendEvent(
|
|
@@ -50356,7 +51073,7 @@ var Supervisor = class extends import_node_events15.EventEmitter {
|
|
|
50356
51073
|
this.webProxy.reconfigure(first ? first.port : null);
|
|
50357
51074
|
}
|
|
50358
51075
|
async init(cfg) {
|
|
50359
|
-
await (0,
|
|
51076
|
+
await (0, import_promises74.mkdir)(this.opts.logDir, { recursive: true });
|
|
50360
51077
|
this.resolvedStateDir = await this.ensureStateDir();
|
|
50361
51078
|
for (const t of cfg.tasks) this.addTaskUnit(t);
|
|
50362
51079
|
for (const s of cfg.services) this.addServiceUnit(s);
|
|
@@ -50716,7 +51433,7 @@ async function readLogFile(logDir, service, tail) {
|
|
|
50716
51433
|
const path6 = (0, import_node_path11.join)(logDir, `${service}.log`);
|
|
50717
51434
|
let text3;
|
|
50718
51435
|
try {
|
|
50719
|
-
text3 = await (0,
|
|
51436
|
+
text3 = await (0, import_promises74.readFile)(path6, "utf8");
|
|
50720
51437
|
} catch (err) {
|
|
50721
51438
|
if (err.code === "ENOENT") return [];
|
|
50722
51439
|
throw err;
|
|
@@ -50734,11 +51451,11 @@ async function readLogFile(logDir, service, tail) {
|
|
|
50734
51451
|
|
|
50735
51452
|
// src/socket.ts
|
|
50736
51453
|
var import_node_net5 = require("net");
|
|
50737
|
-
var
|
|
51454
|
+
var import_promises75 = require("fs/promises");
|
|
50738
51455
|
var import_node_path12 = require("path");
|
|
50739
51456
|
async function startServer(opts) {
|
|
50740
|
-
await (0,
|
|
50741
|
-
await (0,
|
|
51457
|
+
await (0, import_promises75.mkdir)((0, import_node_path12.dirname)(opts.socketPath), { recursive: true });
|
|
51458
|
+
await (0, import_promises75.unlink)(opts.socketPath).catch(() => {
|
|
50742
51459
|
});
|
|
50743
51460
|
const server = (0, import_node_net5.createServer)((sock) => {
|
|
50744
51461
|
handleConnection(sock, opts).catch((err) => {
|
|
@@ -50754,7 +51471,7 @@ async function startServer(opts) {
|
|
|
50754
51471
|
resolve9();
|
|
50755
51472
|
});
|
|
50756
51473
|
});
|
|
50757
|
-
await (0,
|
|
51474
|
+
await (0, import_promises75.chmod)(opts.socketPath, 432).catch(() => {
|
|
50758
51475
|
});
|
|
50759
51476
|
return server;
|
|
50760
51477
|
}
|
|
@@ -50935,7 +51652,7 @@ async function* createLineReader(sock) {
|
|
|
50935
51652
|
}
|
|
50936
51653
|
|
|
50937
51654
|
// src/tool-links.ts
|
|
50938
|
-
var
|
|
51655
|
+
var import_promises76 = require("fs/promises");
|
|
50939
51656
|
var import_node_os6 = require("os");
|
|
50940
51657
|
var import_node_path13 = require("path");
|
|
50941
51658
|
var TOOL_SHIM_PATH = "/usr/local/bin/agentbox-tool-shim";
|
|
@@ -50947,10 +51664,10 @@ async function syncToolLinks(names, opts = {}) {
|
|
|
50947
51664
|
const shim = opts.shim ?? TOOL_SHIM_PATH;
|
|
50948
51665
|
const wanted = new Set(names.filter((n2) => VALID_NAME.test(n2)));
|
|
50949
51666
|
const result = { added: [], removed: [], conflicts: [] };
|
|
50950
|
-
await (0,
|
|
51667
|
+
await (0, import_promises76.mkdir)(dir, { recursive: true });
|
|
50951
51668
|
let entries;
|
|
50952
51669
|
try {
|
|
50953
|
-
entries = await (0,
|
|
51670
|
+
entries = await (0, import_promises76.readdir)(dir);
|
|
50954
51671
|
} catch {
|
|
50955
51672
|
entries = [];
|
|
50956
51673
|
}
|
|
@@ -50959,20 +51676,20 @@ async function syncToolLinks(names, opts = {}) {
|
|
|
50959
51676
|
if (wanted.has(entry)) continue;
|
|
50960
51677
|
if (prunable && !prunable.has(entry)) continue;
|
|
50961
51678
|
if (await isOurLink((0, import_node_path13.join)(dir, entry), shim)) {
|
|
50962
|
-
await (0,
|
|
51679
|
+
await (0, import_promises76.unlink)((0, import_node_path13.join)(dir, entry)).catch(() => void 0);
|
|
50963
51680
|
result.removed.push(entry);
|
|
50964
51681
|
}
|
|
50965
51682
|
}
|
|
50966
51683
|
for (const name of wanted) {
|
|
50967
51684
|
const path6 = (0, import_node_path13.join)(dir, name);
|
|
50968
|
-
const existing = await (0,
|
|
51685
|
+
const existing = await (0, import_promises76.lstat)(path6).catch(() => null);
|
|
50969
51686
|
if (existing) {
|
|
50970
51687
|
if (await isOurLink(path6, shim)) continue;
|
|
50971
51688
|
result.conflicts.push(name);
|
|
50972
51689
|
continue;
|
|
50973
51690
|
}
|
|
50974
51691
|
try {
|
|
50975
|
-
await (0,
|
|
51692
|
+
await (0, import_promises76.symlink)(shim, path6);
|
|
50976
51693
|
result.added.push(name);
|
|
50977
51694
|
} catch {
|
|
50978
51695
|
result.conflicts.push(name);
|
|
@@ -50982,9 +51699,9 @@ async function syncToolLinks(names, opts = {}) {
|
|
|
50982
51699
|
}
|
|
50983
51700
|
async function isOurLink(path6, shim) {
|
|
50984
51701
|
try {
|
|
50985
|
-
const st = await (0,
|
|
51702
|
+
const st = await (0, import_promises76.lstat)(path6);
|
|
50986
51703
|
if (!st.isSymbolicLink()) return false;
|
|
50987
|
-
return await (0,
|
|
51704
|
+
return await (0, import_promises76.readlink)(path6) === shim;
|
|
50988
51705
|
} catch {
|
|
50989
51706
|
return false;
|
|
50990
51707
|
}
|
|
@@ -50995,7 +51712,7 @@ async function listToolLinks(opts = {}) {
|
|
|
50995
51712
|
const shim = opts.shim ?? TOOL_SHIM_PATH;
|
|
50996
51713
|
let entries;
|
|
50997
51714
|
try {
|
|
50998
|
-
entries = await (0,
|
|
51715
|
+
entries = await (0, import_promises76.readdir)(dir);
|
|
50999
51716
|
} catch {
|
|
51000
51717
|
return [];
|
|
51001
51718
|
}
|
|
@@ -51917,7 +52634,7 @@ var openCommand = new Command("open").description("Open a URL in the box's brows
|
|
|
51917
52634
|
});
|
|
51918
52635
|
|
|
51919
52636
|
// src/commands/render.ts
|
|
51920
|
-
var
|
|
52637
|
+
var import_promises77 = require("fs/promises");
|
|
51921
52638
|
function collect(value, prev) {
|
|
51922
52639
|
prev.push(value);
|
|
51923
52640
|
return prev;
|
|
@@ -51929,7 +52646,7 @@ var renderCommand = new Command("render").description(
|
|
|
51929
52646
|
"where named {{AGENTBOX_AUTO_SECRET:x}} secrets persist",
|
|
51930
52647
|
DEFAULT_STATE_DIR
|
|
51931
52648
|
).action(async (src, opts) => {
|
|
51932
|
-
const content = await (0,
|
|
52649
|
+
const content = await (0, import_promises77.readFile)(src, "utf8");
|
|
51933
52650
|
const rules = [];
|
|
51934
52651
|
if (opts.rules) {
|
|
51935
52652
|
const refs = opts.rules.split(",").map((s) => s.trim()).filter((s) => s.length > 0);
|
|
@@ -51953,9 +52670,9 @@ var renderCommand = new Command("render").description(
|
|
|
51953
52670
|
`)
|
|
51954
52671
|
});
|
|
51955
52672
|
if (opts.inPlace) {
|
|
51956
|
-
await (0,
|
|
52673
|
+
await (0, import_promises77.writeFile)(src, result, "utf8");
|
|
51957
52674
|
} else if (opts.out) {
|
|
51958
|
-
await (0,
|
|
52675
|
+
await (0, import_promises77.writeFile)(opts.out, result, "utf8");
|
|
51959
52676
|
} else {
|
|
51960
52677
|
process.stdout.write(result);
|
|
51961
52678
|
}
|
|
@@ -52055,10 +52772,10 @@ var logsCommand = new Command("logs").description("Print recent log lines for a
|
|
|
52055
52772
|
});
|
|
52056
52773
|
|
|
52057
52774
|
// src/commands/validate.ts
|
|
52058
|
-
var
|
|
52775
|
+
var import_promises78 = require("fs/promises");
|
|
52059
52776
|
var validateCommand = new Command("validate").description("Check agentbox.yaml for syntax and shape errors, without starting the daemon").argument("[path]", "path to agentbox.yaml", DEFAULT_CONFIG_PATH).action(async (path6) => {
|
|
52060
52777
|
try {
|
|
52061
|
-
await (0,
|
|
52778
|
+
await (0, import_promises78.stat)(path6);
|
|
52062
52779
|
} catch {
|
|
52063
52780
|
process.stderr.write(`agentbox-ctl: ${path6} not found
|
|
52064
52781
|
`);
|