@madarco/agentbox 0.22.1 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +93 -0
- package/dist/{_cloud-attach-YH2SU75S.js → _cloud-attach-RFPLNACE.js} +5 -5
- package/dist/{chunk-GGWVTWJM.js → chunk-6OQENOJZ.js} +16 -13
- package/dist/chunk-6OQENOJZ.js.map +1 -0
- package/dist/{chunk-ALEYDWAO.js → chunk-CKC3CP7Y.js} +494 -148
- package/dist/chunk-CKC3CP7Y.js.map +1 -0
- package/dist/{chunk-O67ZESNL.js → chunk-ERMU7RMK.js} +43 -58
- package/dist/{chunk-O67ZESNL.js.map → chunk-ERMU7RMK.js.map} +1 -1
- package/dist/chunk-G3H2L3O2.js +0 -0
- package/dist/{chunk-KBVD2UUQ.js → chunk-JXDSSSXS.js} +3 -3
- package/dist/{chunk-CDEJ2GQK.js → chunk-L5SOSNQI.js} +4 -4
- package/dist/{chunk-W2FLHB54.js → chunk-Q626V2YX.js} +2 -2
- package/dist/{chunk-YZXXBHWG.js → chunk-QGL734YX.js} +170 -53
- package/dist/chunk-QGL734YX.js.map +1 -0
- package/dist/{chunk-VBSRJG53.js → chunk-QT3SHMLY.js} +9 -1
- package/dist/chunk-QT3SHMLY.js.map +1 -0
- package/dist/{chunk-O2NDZQHN.js → chunk-QVWGQJV6.js} +2 -2
- package/dist/chunk-WJFZJZIM.js +0 -0
- package/dist/cloud-poller-SUNA6ZQC-7M5LJHHE.js +0 -0
- package/dist/{dist-QBXEP4VY.js → dist-2BTJQUJS.js} +2 -2
- package/dist/{dist-UR2DB2HT.js → dist-GEHCZJCS.js} +6 -6
- package/dist/{dist-LJHS4PTC.js → dist-GJCIKH2C.js} +6 -6
- package/dist/{dist-EJXUKIR7.js → dist-JFUUDAI3.js} +18 -4
- package/dist/{dist-QNV4H6NN.js → dist-W5476E2U.js} +6 -6
- package/dist/{dist-YECTRVGD.js → dist-Z3GSHEFO.js} +8 -7
- package/dist/index.js +1339 -782
- package/dist/index.js.map +1 -1
- package/dist/{prepared-state-5FIGV4BE-BMUK63FD.js → prepared-state-LW2PKTEQ-5YMKG7UN.js} +2 -2
- package/package.json +28 -27
- package/runtime/_shared/agentbox-checkpoint-cleanup +0 -0
- package/runtime/_shared/agentbox-dockerd-start +0 -0
- package/runtime/_shared/agentbox-open +0 -0
- package/runtime/_shared/agentbox-portless-trust +0 -0
- package/runtime/_shared/agentbox-vnc-start +0 -0
- package/runtime/_shared/ctl.cjs +13 -1
- package/runtime/_shared/gh-shim +0 -0
- package/runtime/_shared/git-shim +0 -0
- package/runtime/_shared/linear-shim +0 -0
- package/runtime/_shared/ntn-shim +0 -0
- package/runtime/docker/Dockerfile.box +12 -0
- package/runtime/docker/packages/ctl/dist/bin.cjs +13 -1
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-checkpoint-cleanup +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-dockerd-start +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-open +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-portless-trust +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-sshd-start +44 -0
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-vnc-start +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/chromium-resolver +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/gh-shim +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/git-shim +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/linear-shim +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/ntn-shim +0 -0
- package/runtime/e2b/agentbox-checkpoint-cleanup +0 -0
- package/runtime/e2b/agentbox-dockerd-start +0 -0
- package/runtime/e2b/agentbox-open +0 -0
- package/runtime/e2b/agentbox-vnc-start +0 -0
- package/runtime/e2b/ctl.cjs +13 -1
- package/runtime/e2b/gh-shim +0 -0
- package/runtime/e2b/git-shim +0 -0
- package/runtime/e2b/linear-shim +0 -0
- package/runtime/e2b/ntn-shim +0 -0
- package/runtime/e2b/scripts/build-template.sh +0 -0
- package/runtime/hetzner/agentbox-checkpoint-cleanup +0 -0
- package/runtime/hetzner/agentbox-dockerd-start +0 -0
- package/runtime/hetzner/agentbox-open +0 -0
- package/runtime/hetzner/agentbox-portless-trust +0 -0
- package/runtime/hetzner/agentbox-vnc-start +0 -0
- package/runtime/hetzner/ctl.cjs +13 -1
- package/runtime/hetzner/gh-shim +0 -0
- package/runtime/hetzner/git-shim +0 -0
- package/runtime/hetzner/linear-shim +0 -0
- package/runtime/hetzner/ntn-shim +0 -0
- package/runtime/hetzner/scripts/install-box.sh +0 -0
- package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
- package/runtime/hub/apps/hub/.next/app-path-routes-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
- package/runtime/hub/apps/hub/.next/routes-manifest.json +22 -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/boxes/[id]/open/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/open/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route_client-reference-manifest.js +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route/app-paths-manifest.json +3 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route/build-manifest.json +9 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route/server-reference-manifest.json +4 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js +8 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js.map +5 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route.js.nft.json +1 -0
- package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/open-targets/route_client-reference-manifest.js +3 -0
- 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/server-reference-manifest.json +12 -0
- 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)/page/server-reference-manifest.json +12 -0
- 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/server-reference-manifest.json +12 -0
- 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_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 +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/0m4a_kysely_dist_095p8vu._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/0ssw__next-internal_server_app_(dashboard)_api_v1_open-targets_route_actions_1z-vd4m.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_boxes_[id]_open_route_actions_1agwl8h.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_boxes_[id]_rename_route_actions_0mf3a9p.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1lmiq._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0keu6we._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0ql4fjo._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0szd4sh._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0vs8fma._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0w9ud8u._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0yhb0gc._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-0flwc._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1a50b07._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1bqbkd5._.js +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1dn_3i1._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1hqla7-._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1js2jdv._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1nepkp-._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1q5bqse._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qa4a0v._.js +2 -2
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1thipug._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1v9om6g._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_06f2faq._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_0760z6y._.js +14 -14
- package/runtime/hub/apps/hub/.next/server/chunks/_0f3molr._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/_0lgs9kd._.js +3 -0
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/044u_hub__next-internal_server_app_(dashboard)_projects_[id]_page_actions_15f56np.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/_09gdzmo._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ozyjt1._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ro6vh6._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0tgpglr._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/_1laion6._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_0b_hsjl._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_boxes_[id]_page_actions_0k7kgn2.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_page_actions_1t3u0xy.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_[id]_page_tsx_1-j_972._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_components_box-table_tsx_0a9pyn_._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_components_1z1p98f._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/functions-config-manifest.json +3 -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/server/server-reference-manifest.js +1 -1
- package/runtime/hub/apps/hub/.next/server/server-reference-manifest.json +24 -0
- package/runtime/hub/apps/hub/.next/static/chunks/1py5tlz57h7ra.js +1 -0
- package/runtime/hub/apps/hub/.next/static/chunks/{3y2c7woqhtx9s.js → 23fswvjrabu89.js} +1 -1
- package/runtime/hub/apps/hub/.next/static/chunks/2xc1sm79a6tsb.js +1 -0
- package/runtime/hub/apps/hub/.next/static/chunks/3nedwutnzpdis.css +3 -0
- package/runtime/hub/apps/hub/.next/static/chunks/3p86ecqhr_7yy.js +1 -0
- package/runtime/hub/apps/hub/.next/static/chunks/3qof5hg87qf5n.js +1 -0
- package/runtime/hub/apps/hub/{auth-YBXDRLHG.js → auth-675P3LQS.js} +2 -2
- package/runtime/hub/apps/hub/{auth-config-LJGI76HI.js → auth-config-AOBEKRZQ.js} +2 -2
- package/runtime/hub/apps/hub/{chunk-OBKLTPIR.js → chunk-56YQBVN2.js} +1 -1
- package/runtime/hub/apps/hub/{chunk-JDA7BPPN.js → chunk-6HD4PARX.js} +9 -9
- package/runtime/hub/apps/hub/{chunk-AKLBSCSZ.js → chunk-EXQCBM5Q.js} +8 -0
- package/runtime/hub/apps/hub/{chunk-V5KGFHCF.js → chunk-JQFB2CNA.js} +132 -16
- package/runtime/hub/apps/hub/{chunk-LJG4CEGS.js → chunk-K6RA5GJI.js} +412 -117
- package/runtime/hub/apps/hub/{dist-ELOY2IUE.js → dist-3HR4RIPE.js} +17 -3
- package/runtime/hub/apps/hub/{dist-GGM4BUKM.js → dist-7GNKBKFV.js} +29 -42
- package/runtime/hub/apps/hub/{dist-BF54UNHK.js → dist-JWVTVHBT.js} +4 -4
- package/runtime/hub/apps/hub/{dist-CM4YAQLI.js → dist-OUNL2TCW.js} +4 -4
- package/runtime/hub/apps/hub/{dist-IENF7YOD.js → dist-STQK5XM6.js} +1 -1
- package/runtime/hub/apps/hub/{dist-FDBOJ74K.js → dist-TOHA4OA5.js} +4 -4
- package/runtime/hub/apps/hub/{hub-token-EW32VDIU.js → hub-token-2BZFBBW3.js} +2 -2
- package/runtime/hub/apps/hub/{prepared-state-5FIGV4BE-FIXKBF5A.js → prepared-state-LW2PKTEQ-7BCXARGA.js} +1 -1
- package/runtime/hub/apps/hub/server.js +153 -31
- package/runtime/relay/bin.cjs +13 -1
- package/runtime/vercel/agentbox-checkpoint-cleanup +0 -0
- package/runtime/vercel/agentbox-dockerd-start +0 -0
- package/runtime/vercel/agentbox-open +0 -0
- package/runtime/vercel/agentbox-vnc-start +0 -0
- package/runtime/vercel/ctl.cjs +13 -1
- package/runtime/vercel/gh-shim +0 -0
- package/runtime/vercel/git-shim +0 -0
- package/runtime/vercel/linear-shim +0 -0
- package/runtime/vercel/ntn-shim +0 -0
- package/runtime/vercel/scripts/provision.sh +0 -0
- package/LICENSE +0 -21
- package/dist/chunk-ALEYDWAO.js.map +0 -1
- package/dist/chunk-GGWVTWJM.js.map +0 -1
- package/dist/chunk-VBSRJG53.js.map +0 -1
- package/dist/chunk-YZXXBHWG.js.map +0 -1
- package/runtime/hub/apps/hub/.next/static/chunks/0dx4alyqu7cq1.css +0 -3
- package/runtime/hub/apps/hub/.next/static/chunks/0lq354ziiwxxl.js +0 -1
- package/runtime/hub/apps/hub/.next/static/chunks/11vmjdy3390ik.js +0 -1
- package/runtime/hub/apps/hub/.next/static/chunks/1svigjdfotduh.js +0 -1
- package/runtime/hub/apps/hub/.next/static/chunks/2d5e6t-5j4etp.js +0 -1
- /package/dist/{_cloud-attach-YH2SU75S.js.map → _cloud-attach-RFPLNACE.js.map} +0 -0
- /package/dist/{chunk-KBVD2UUQ.js.map → chunk-JXDSSSXS.js.map} +0 -0
- /package/dist/{chunk-CDEJ2GQK.js.map → chunk-L5SOSNQI.js.map} +0 -0
- /package/dist/{chunk-W2FLHB54.js.map → chunk-Q626V2YX.js.map} +0 -0
- /package/dist/{chunk-O2NDZQHN.js.map → chunk-QVWGQJV6.js.map} +0 -0
- /package/dist/{dist-EJXUKIR7.js.map → dist-2BTJQUJS.js.map} +0 -0
- /package/dist/{dist-UR2DB2HT.js.map → dist-GEHCZJCS.js.map} +0 -0
- /package/dist/{dist-LJHS4PTC.js.map → dist-GJCIKH2C.js.map} +0 -0
- /package/dist/{dist-QBXEP4VY.js.map → dist-JFUUDAI3.js.map} +0 -0
- /package/dist/{dist-QNV4H6NN.js.map → dist-W5476E2U.js.map} +0 -0
- /package/dist/{dist-YECTRVGD.js.map → dist-Z3GSHEFO.js.map} +0 -0
- /package/dist/{prepared-state-5FIGV4BE-BMUK63FD.js.map → prepared-state-LW2PKTEQ-5YMKG7UN.js.map} +0 -0
- /package/runtime/hub/apps/hub/.next/static/{TpPTWVdZDxqrPlONtJcR5 → 6WtaFwavHBpin3eT7-HjR}/_buildManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{TpPTWVdZDxqrPlONtJcR5 → 6WtaFwavHBpin3eT7-HjR}/_clientMiddlewareManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{TpPTWVdZDxqrPlONtJcR5 → 6WtaFwavHBpin3eT7-HjR}/_ssgManifest.js +0 -0
|
@@ -38,6 +38,7 @@ import {
|
|
|
38
38
|
SHARED_VSCODE_EXTENSIONS_VOLUME,
|
|
39
39
|
SHELL_SESSION_PREFIX,
|
|
40
40
|
SNAPSHOTS_ROOT,
|
|
41
|
+
SSH_CONTAINER_PORT,
|
|
41
42
|
TERM_FALLBACK_SNIPPET,
|
|
42
43
|
VNC_CONTAINER_PORT,
|
|
43
44
|
WORKTREE_ROOT,
|
|
@@ -122,10 +123,12 @@ import {
|
|
|
122
123
|
ideProfile,
|
|
123
124
|
ideServerVolumeName,
|
|
124
125
|
inspectBox,
|
|
126
|
+
installAuthorizedKey,
|
|
125
127
|
installPortless,
|
|
126
128
|
isShellSessionName,
|
|
127
129
|
killShellSession,
|
|
128
130
|
launchDockerdDaemon,
|
|
131
|
+
launchSshdDaemon,
|
|
129
132
|
launchVncDaemon,
|
|
130
133
|
listAllCheckpointImages,
|
|
131
134
|
listAllCheckpoints,
|
|
@@ -161,6 +164,7 @@ import {
|
|
|
161
164
|
pullToHost,
|
|
162
165
|
readBoxStatus,
|
|
163
166
|
rebuildPluginNativeDeps,
|
|
167
|
+
refreshBoxSshd,
|
|
164
168
|
refreshExport,
|
|
165
169
|
registerBoxWithRelay,
|
|
166
170
|
rehydrateRelayRegistry,
|
|
@@ -191,6 +195,7 @@ import {
|
|
|
191
195
|
seedWorkspaceFromDir,
|
|
192
196
|
setEngineOverride,
|
|
193
197
|
setRelayNotice,
|
|
198
|
+
setUpBoxSshd,
|
|
194
199
|
shellLabel,
|
|
195
200
|
shellSessionInfo,
|
|
196
201
|
shellSessionName,
|
|
@@ -217,8 +222,7 @@ import {
|
|
|
217
222
|
vscodeServerVolumeName,
|
|
218
223
|
waitForTmuxPaneContent,
|
|
219
224
|
warmUpClaudeCredentials
|
|
220
|
-
} from "./chunk-
|
|
221
|
-
import "./chunk-AKLBSCSZ.js";
|
|
225
|
+
} from "./chunk-JQFB2CNA.js";
|
|
222
226
|
import "./chunk-3LAHFDJF.js";
|
|
223
227
|
import {
|
|
224
228
|
AmbiguousBoxError,
|
|
@@ -237,11 +241,13 @@ import {
|
|
|
237
241
|
autoPickProjectBox,
|
|
238
242
|
buildHostEnvFindArgs,
|
|
239
243
|
buildHostSyncManifest,
|
|
244
|
+
classifyDockerBaseFreshness,
|
|
240
245
|
computeDockerContextFingerprint,
|
|
241
246
|
computeSyncDelta,
|
|
242
247
|
detectGitRepos,
|
|
243
248
|
encodeClaudeProjectsKey,
|
|
244
249
|
ensureImage,
|
|
250
|
+
evaluateDockerBaseFreshness,
|
|
245
251
|
findBox,
|
|
246
252
|
hostBackupHasCredentials,
|
|
247
253
|
hostClaudeBackupExpired,
|
|
@@ -265,8 +271,9 @@ import {
|
|
|
265
271
|
stageDynamicSyncTarball,
|
|
266
272
|
tagImage,
|
|
267
273
|
writePreparedDockerState
|
|
268
|
-
} from "./chunk-
|
|
274
|
+
} from "./chunk-K6RA5GJI.js";
|
|
269
275
|
import "./chunk-EFW34I43.js";
|
|
276
|
+
import "./chunk-EXQCBM5Q.js";
|
|
270
277
|
import "./chunk-TZFWAJVB.js";
|
|
271
278
|
export {
|
|
272
279
|
AmbiguousBoxError,
|
|
@@ -317,6 +324,7 @@ export {
|
|
|
317
324
|
SHARED_VSCODE_EXTENSIONS_VOLUME,
|
|
318
325
|
SHELL_SESSION_PREFIX,
|
|
319
326
|
SNAPSHOTS_ROOT,
|
|
327
|
+
SSH_CONTAINER_PORT,
|
|
320
328
|
STATE_DIR,
|
|
321
329
|
STATE_FILE,
|
|
322
330
|
TERM_FALLBACK_SNIPPET,
|
|
@@ -358,6 +366,7 @@ export {
|
|
|
358
366
|
buildVscodeMounts,
|
|
359
367
|
carrySourceHash,
|
|
360
368
|
checkpointImageTag,
|
|
369
|
+
classifyDockerBaseFreshness,
|
|
361
370
|
claudeSessionInfo,
|
|
362
371
|
clearRelayNotice,
|
|
363
372
|
codexSessionInfo,
|
|
@@ -394,6 +403,7 @@ export {
|
|
|
394
403
|
ensureOpencodeVolume,
|
|
395
404
|
ensureRelay,
|
|
396
405
|
ensureVscodeVolumes,
|
|
406
|
+
evaluateDockerBaseFreshness,
|
|
397
407
|
execInBox,
|
|
398
408
|
extractCodexCredentials,
|
|
399
409
|
extractOpencodeCredentials,
|
|
@@ -417,11 +427,13 @@ export {
|
|
|
417
427
|
imageExists,
|
|
418
428
|
imageInfo,
|
|
419
429
|
inspectBox,
|
|
430
|
+
installAuthorizedKey,
|
|
420
431
|
installPortless,
|
|
421
432
|
isRealAgentCredential,
|
|
422
433
|
isShellSessionName,
|
|
423
434
|
killShellSession,
|
|
424
435
|
launchDockerdDaemon,
|
|
436
|
+
launchSshdDaemon,
|
|
425
437
|
launchVncDaemon,
|
|
426
438
|
listAllCheckpointImages,
|
|
427
439
|
listAllCheckpoints,
|
|
@@ -465,6 +477,7 @@ export {
|
|
|
465
477
|
rebuildPluginNativeDeps,
|
|
466
478
|
recordBox,
|
|
467
479
|
recordLastAgent,
|
|
480
|
+
refreshBoxSshd,
|
|
468
481
|
refreshExport,
|
|
469
482
|
registerBoxWithRelay,
|
|
470
483
|
registryRefForSha,
|
|
@@ -501,6 +514,7 @@ export {
|
|
|
501
514
|
seedWorkspaceFromDir,
|
|
502
515
|
setEngineOverride,
|
|
503
516
|
setRelayNotice,
|
|
517
|
+
setUpBoxSshd,
|
|
504
518
|
shellLabel,
|
|
505
519
|
shellSessionInfo,
|
|
506
520
|
shellSessionName,
|
|
@@ -12,12 +12,11 @@ import {
|
|
|
12
12
|
} from "./chunk-OF242BLD.js";
|
|
13
13
|
import {
|
|
14
14
|
createCloudProvider
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6HD4PARX.js";
|
|
16
16
|
import {
|
|
17
17
|
detectPortless,
|
|
18
18
|
portlessDoctorRow
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-AKLBSCSZ.js";
|
|
19
|
+
} from "./chunk-JQFB2CNA.js";
|
|
21
20
|
import "./chunk-3LAHFDJF.js";
|
|
22
21
|
import {
|
|
23
22
|
UserFacingError,
|
|
@@ -25,6 +24,7 @@ import {
|
|
|
25
24
|
computeContextSha256,
|
|
26
25
|
errSummary,
|
|
27
26
|
hostOpenCommand,
|
|
27
|
+
mintSshKey,
|
|
28
28
|
preparedStatePathFor,
|
|
29
29
|
readCliStamp,
|
|
30
30
|
readPreparedStateRaw,
|
|
@@ -34,10 +34,11 @@ import {
|
|
|
34
34
|
stageOpencodeStaticForUpload,
|
|
35
35
|
writeManagedSecrets,
|
|
36
36
|
writePreparedStateRaw
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-K6RA5GJI.js";
|
|
38
38
|
import {
|
|
39
39
|
execa
|
|
40
40
|
} from "./chunk-EFW34I43.js";
|
|
41
|
+
import "./chunk-EXQCBM5Q.js";
|
|
41
42
|
import "./chunk-TZFWAJVB.js";
|
|
42
43
|
|
|
43
44
|
// ../../packages/sandbox-hetzner/dist/chunk-3ZWBEZND.js
|
|
@@ -787,20 +788,19 @@ async function currentHetznerBaseFingerprintLive(claudeInstall = "native") {
|
|
|
787
788
|
|
|
788
789
|
// ../../packages/sandbox-hetzner/dist/index.js
|
|
789
790
|
import { existsSync as existsSync22 } from "fs";
|
|
790
|
-
import { rm as rm2, rename, mkdir as
|
|
791
|
-
import { join as
|
|
791
|
+
import { rm as rm2, rename, mkdir as mkdir2 } from "fs/promises";
|
|
792
|
+
import { join as join3 } from "path";
|
|
792
793
|
import { resolve as resolvePath } from "path";
|
|
793
|
-
import { join
|
|
794
|
-
import {
|
|
795
|
-
import { dirname as dirname2, join, resolve as resolve4 } from "path";
|
|
794
|
+
import { join } from "path";
|
|
795
|
+
import { dirname as dirname2, resolve as resolve4 } from "path";
|
|
796
796
|
import { existsSync as existsSync3 } from "fs";
|
|
797
|
-
import { mkdir
|
|
797
|
+
import { mkdir, rm } from "fs/promises";
|
|
798
798
|
import { createServer } from "net";
|
|
799
799
|
import { homedir as homedir3 } from "os";
|
|
800
|
-
import { dirname as dirname22, join as
|
|
801
|
-
import { mkdir as
|
|
800
|
+
import { dirname as dirname22, join as join2, resolve as resolve22 } from "path";
|
|
801
|
+
import { mkdir as mkdir3, rm as rm3, writeFile } from "fs/promises";
|
|
802
802
|
import { homedir as homedir22, tmpdir } from "os";
|
|
803
|
-
import { join as
|
|
803
|
+
import { join as join4 } from "path";
|
|
804
804
|
function generatePrepareCloudInit(opts) {
|
|
805
805
|
const pubkey = opts.sshPubkey.trim();
|
|
806
806
|
return [
|
|
@@ -916,19 +916,6 @@ async function pollUntil(label, check, opts = {}) {
|
|
|
916
916
|
interval = Math.min(interval * 2, max);
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
|
-
async function mintSshKey(targetDir, comment) {
|
|
920
|
-
const dir = resolve4(targetDir);
|
|
921
|
-
const priv = join(dir, "id_ed25519");
|
|
922
|
-
const pub = `${priv}.pub`;
|
|
923
|
-
await mkdir(dir, { recursive: true, mode: 448 });
|
|
924
|
-
await execa(
|
|
925
|
-
"ssh-keygen",
|
|
926
|
-
["-t", "ed25519", "-N", "", "-C", comment, "-f", priv, "-q"],
|
|
927
|
-
{ stdio: "pipe" }
|
|
928
|
-
);
|
|
929
|
-
const publicKey = (await readFile(pub, "utf8")).trim();
|
|
930
|
-
return { dir, privatePath: priv, publicPath: pub, publicKey };
|
|
931
|
-
}
|
|
932
919
|
async function mintPrepareKey() {
|
|
933
920
|
const root = resolve4(homedirOrCwd(), ".agentbox", "hetzner", `prepare-${Date.now().toString(36)}`);
|
|
934
921
|
const key = await mintSshKey(root, `agentbox-prepare-${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`);
|
|
@@ -1132,7 +1119,7 @@ async function prepareHetzner(opts = {}) {
|
|
|
1132
1119
|
host: ip,
|
|
1133
1120
|
user: "root",
|
|
1134
1121
|
identity: key.privatePath,
|
|
1135
|
-
knownHosts:
|
|
1122
|
+
knownHosts: join(key.dir, "known_hosts")
|
|
1136
1123
|
};
|
|
1137
1124
|
const up = await waitForSsh(sshTarget, PREPARE_SSH_DEADLINE_MS);
|
|
1138
1125
|
if (!up) {
|
|
@@ -1325,9 +1312,9 @@ var SshTunnelManager = class {
|
|
|
1325
1312
|
*/
|
|
1326
1313
|
async open(opts) {
|
|
1327
1314
|
const boxSshDir = opts.boxSshDir ?? defaultBoxSshDir(opts.boxId);
|
|
1328
|
-
await
|
|
1329
|
-
const controlPath =
|
|
1330
|
-
const knownHosts =
|
|
1315
|
+
await mkdir(boxSshDir, { recursive: true, mode: 448 });
|
|
1316
|
+
const controlPath = join2(boxSshDir, "control.sock");
|
|
1317
|
+
const knownHosts = join2(boxSshDir, "known_hosts");
|
|
1331
1318
|
const user = opts.vpsUser ?? "vscode";
|
|
1332
1319
|
const tunnel = {
|
|
1333
1320
|
controlPath,
|
|
@@ -1501,7 +1488,7 @@ var SshTunnelManager = class {
|
|
|
1501
1488
|
registerExisting(boxId, opts) {
|
|
1502
1489
|
const boxSshDir = opts.boxSshDir ?? defaultBoxSshDir(opts.boxId);
|
|
1503
1490
|
this.boxes.set(boxId, {
|
|
1504
|
-
controlPath:
|
|
1491
|
+
controlPath: join2(boxSshDir, "control.sock"),
|
|
1505
1492
|
vpsHost: opts.vpsHost,
|
|
1506
1493
|
vpsUser: opts.vpsUser ?? "vscode",
|
|
1507
1494
|
identity: opts.identity,
|
|
@@ -1624,12 +1611,12 @@ function perBoxDir(sandboxId) {
|
|
|
1624
1611
|
}
|
|
1625
1612
|
async function ensurePerBoxState(sandboxId) {
|
|
1626
1613
|
const dir = perBoxDir(sandboxId);
|
|
1627
|
-
const sshDir =
|
|
1628
|
-
await
|
|
1614
|
+
const sshDir = join3(dir, "ssh");
|
|
1615
|
+
await mkdir2(sshDir, { recursive: true, mode: 448 });
|
|
1629
1616
|
return {
|
|
1630
1617
|
dir,
|
|
1631
|
-
identity:
|
|
1632
|
-
knownHosts:
|
|
1618
|
+
identity: join3(sshDir, "id_ed25519"),
|
|
1619
|
+
knownHosts: join3(sshDir, "known_hosts")
|
|
1633
1620
|
};
|
|
1634
1621
|
}
|
|
1635
1622
|
function bashScript(s) {
|
|
@@ -2147,9 +2134,9 @@ async function deployControlPlaneToHetzner(opts) {
|
|
|
2147
2134
|
labels: { "agentbox.managed": "true", "agentbox.role": "control-plane" }
|
|
2148
2135
|
})
|
|
2149
2136
|
);
|
|
2150
|
-
const keyDir =
|
|
2137
|
+
const keyDir = join4(homedir22(), ".agentbox", "control-plane", "ssh", stamp);
|
|
2151
2138
|
const key = await mintSshKey(keyDir, `agentbox-control-plane-${stamp}`);
|
|
2152
|
-
const knownHosts =
|
|
2139
|
+
const knownHosts = join4(keyDir, "known_hosts");
|
|
2153
2140
|
log(`provisioning ${opts.serverType ?? "cx23"} VPS (cloning ${repoUrl}@${repoRef})\u2026`);
|
|
2154
2141
|
const { server } = await withHetznerRetry(
|
|
2155
2142
|
{ method: "createServer", retryOnAmbiguous: false, attemptTimeoutMs: 12e4 },
|
|
@@ -2178,12 +2165,12 @@ async function deployControlPlaneToHetzner(opts) {
|
|
|
2178
2165
|
if (cloned.exitCode !== 0) {
|
|
2179
2166
|
throw new Error("repo clone did not complete on the VPS (cloud-init failed)");
|
|
2180
2167
|
}
|
|
2181
|
-
const staging =
|
|
2182
|
-
await
|
|
2168
|
+
const staging = join4(tmpdir(), `agentbox-cp-deploy-${stamp}`);
|
|
2169
|
+
await mkdir3(staging, { recursive: true });
|
|
2183
2170
|
try {
|
|
2184
|
-
const envLocal =
|
|
2185
|
-
const caddyLocal =
|
|
2186
|
-
const composeLocal =
|
|
2171
|
+
const envLocal = join4(staging, "control-plane.env");
|
|
2172
|
+
const caddyLocal = join4(staging, "Caddyfile");
|
|
2173
|
+
const composeLocal = join4(staging, "docker-compose.caddy.yml");
|
|
2187
2174
|
await writeFile(envLocal, opts.envContent, { mode: 384 });
|
|
2188
2175
|
await writeFile(caddyLocal, caddyfile(domain));
|
|
2189
2176
|
await writeFile(composeLocal, CADDY_COMPOSE);
|
|
@@ -18,9 +18,8 @@ import {
|
|
|
18
18
|
renderInnerCommand,
|
|
19
19
|
resolveCloudCheckpoint,
|
|
20
20
|
writeCloudCheckpointManifest
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-AKLBSCSZ.js";
|
|
21
|
+
} from "./chunk-6HD4PARX.js";
|
|
22
|
+
import "./chunk-JQFB2CNA.js";
|
|
24
23
|
import "./chunk-3LAHFDJF.js";
|
|
25
24
|
import {
|
|
26
25
|
UserFacingError,
|
|
@@ -35,8 +34,9 @@ import {
|
|
|
35
34
|
stageAllAgentStatic,
|
|
36
35
|
writeManagedSecrets,
|
|
37
36
|
writePreparedStateRaw
|
|
38
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-K6RA5GJI.js";
|
|
39
38
|
import "./chunk-EFW34I43.js";
|
|
39
|
+
import "./chunk-EXQCBM5Q.js";
|
|
40
40
|
import "./chunk-TZFWAJVB.js";
|
|
41
41
|
|
|
42
42
|
// ../../packages/sandbox-e2b/dist/chunk-4FOXSEPX.js
|
|
@@ -21,9 +21,8 @@ import {
|
|
|
21
21
|
renderInnerCommand,
|
|
22
22
|
resolveCloudCheckpoint,
|
|
23
23
|
writeCloudCheckpointManifest
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-AKLBSCSZ.js";
|
|
24
|
+
} from "./chunk-6HD4PARX.js";
|
|
25
|
+
import "./chunk-JQFB2CNA.js";
|
|
27
26
|
import "./chunk-3LAHFDJF.js";
|
|
28
27
|
import {
|
|
29
28
|
UserFacingError,
|
|
@@ -40,10 +39,11 @@ import {
|
|
|
40
39
|
stageOpencodeStaticForUpload,
|
|
41
40
|
writeManagedSecrets,
|
|
42
41
|
writePreparedStateRaw
|
|
43
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-K6RA5GJI.js";
|
|
44
43
|
import {
|
|
45
44
|
execa
|
|
46
45
|
} from "./chunk-EFW34I43.js";
|
|
46
|
+
import "./chunk-EXQCBM5Q.js";
|
|
47
47
|
import "./chunk-TZFWAJVB.js";
|
|
48
48
|
|
|
49
49
|
// ../../packages/sandbox-vercel/dist/chunk-6SDDZRAG.js
|
|
@@ -13,9 +13,8 @@ import {
|
|
|
13
13
|
} from "./chunk-OF242BLD.js";
|
|
14
14
|
import {
|
|
15
15
|
createCloudProvider
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-AKLBSCSZ.js";
|
|
16
|
+
} from "./chunk-6HD4PARX.js";
|
|
17
|
+
import "./chunk-JQFB2CNA.js";
|
|
19
18
|
import "./chunk-3LAHFDJF.js";
|
|
20
19
|
import {
|
|
21
20
|
DOCKER_CONTEXT_FILE_MAP,
|
|
@@ -29,8 +28,9 @@ import {
|
|
|
29
28
|
stageAllAgentStatic,
|
|
30
29
|
writeManagedSecrets,
|
|
31
30
|
writePreparedStateRaw
|
|
32
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-K6RA5GJI.js";
|
|
33
32
|
import "./chunk-EFW34I43.js";
|
|
33
|
+
import "./chunk-EXQCBM5Q.js";
|
|
34
34
|
import "./chunk-TZFWAJVB.js";
|
|
35
35
|
|
|
36
36
|
// ../../packages/sandbox-daytona/dist/chunk-6WHCUMQO.js
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; import { fileURLToPath as __f } from 'node:url'; import { dirname as __d } from 'node:path'; const require = __cr(import.meta.url); const __filename = __f(import.meta.url); const __dirname = __d(__filename);
|
|
2
2
|
import {
|
|
3
3
|
AUTH_TOKEN_PATH
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-56YQBVN2.js";
|
|
5
|
+
import "./chunk-EXQCBM5Q.js";
|
|
6
6
|
import "./chunk-TZFWAJVB.js";
|
|
7
7
|
|
|
8
8
|
// lib/hub-token.ts
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; import { fileURLToPath as __f } from 'node:url'; import { dirname as __d } from 'node:path'; const require = __cr(import.meta.url); const __filename = __f(import.meta.url); const __dirname = __d(__filename);
|
|
2
|
+
import {
|
|
3
|
+
hubProfile
|
|
4
|
+
} from "./chunk-56YQBVN2.js";
|
|
2
5
|
import {
|
|
3
6
|
baseFreshnessFromFingerprints,
|
|
4
7
|
currentCloudBaseFingerprint
|
|
5
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6HD4PARX.js";
|
|
6
9
|
import {
|
|
7
10
|
enqueuePrepareJob,
|
|
8
11
|
enqueueQueueJob,
|
|
@@ -14,22 +17,11 @@ import {
|
|
|
14
17
|
readJob,
|
|
15
18
|
startRelayDaemon,
|
|
16
19
|
writeQueueLoginCode
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import {
|
|
19
|
-
PROVIDER_NAMES,
|
|
20
|
-
findProjectRoot,
|
|
21
|
-
hashProjectPath,
|
|
22
|
-
isProviderKind,
|
|
23
|
-
listProjectsConfigured,
|
|
24
|
-
loadEffectiveConfig,
|
|
25
|
-
providerMeta,
|
|
26
|
-
registerProject,
|
|
27
|
-
resolveDefaultCheckpoint,
|
|
28
|
-
unregisterProject
|
|
29
|
-
} from "./chunk-AKLBSCSZ.js";
|
|
20
|
+
} from "./chunk-JQFB2CNA.js";
|
|
30
21
|
import "./chunk-3LAHFDJF.js";
|
|
31
22
|
import {
|
|
32
23
|
BOX_WORKSPACE,
|
|
24
|
+
autoWriteSshConfig,
|
|
33
25
|
boxGitCheckout,
|
|
34
26
|
boxGitNewBranch,
|
|
35
27
|
boxGitPull,
|
|
@@ -41,9 +33,23 @@ import {
|
|
|
41
33
|
normalizeLastAgent,
|
|
42
34
|
readPreparedStateRaw,
|
|
43
35
|
readState,
|
|
44
|
-
secretsEnvPath
|
|
45
|
-
|
|
36
|
+
secretsEnvPath,
|
|
37
|
+
setBoxDisplayName,
|
|
38
|
+
syncAgentboxSshConfig
|
|
39
|
+
} from "./chunk-K6RA5GJI.js";
|
|
46
40
|
import "./chunk-EFW34I43.js";
|
|
41
|
+
import {
|
|
42
|
+
PROVIDER_NAMES,
|
|
43
|
+
findProjectRoot,
|
|
44
|
+
hashProjectPath,
|
|
45
|
+
isProviderKind,
|
|
46
|
+
listProjectsConfigured,
|
|
47
|
+
loadEffectiveConfig,
|
|
48
|
+
providerMeta,
|
|
49
|
+
registerProject,
|
|
50
|
+
resolveDefaultCheckpoint,
|
|
51
|
+
unregisterProject
|
|
52
|
+
} from "./chunk-EXQCBM5Q.js";
|
|
47
53
|
import "./chunk-TZFWAJVB.js";
|
|
48
54
|
|
|
49
55
|
// server.ts
|
|
@@ -59,12 +65,13 @@ import os from "node:os";
|
|
|
59
65
|
import path from "node:path";
|
|
60
66
|
import { promisify } from "node:util";
|
|
61
67
|
var execFileAsync = promisify(execFile);
|
|
68
|
+
var DISPLAY_NAME_MAX = 60;
|
|
62
69
|
var IMPORTERS = {
|
|
63
|
-
docker: () => import("./dist-
|
|
64
|
-
daytona: () => import("./dist-
|
|
65
|
-
hetzner: () => import("./dist-
|
|
66
|
-
vercel: () => import("./dist-
|
|
67
|
-
e2b: () => import("./dist-
|
|
70
|
+
docker: () => import("./dist-3HR4RIPE.js"),
|
|
71
|
+
daytona: () => import("./dist-TOHA4OA5.js"),
|
|
72
|
+
hetzner: () => import("./dist-7GNKBKFV.js"),
|
|
73
|
+
vercel: () => import("./dist-OUNL2TCW.js"),
|
|
74
|
+
e2b: () => import("./dist-JWVTVHBT.js")
|
|
68
75
|
};
|
|
69
76
|
var prepareEnqueueChain = /* @__PURE__ */ new Map();
|
|
70
77
|
async function providerForBox(box) {
|
|
@@ -105,18 +112,34 @@ function mapBox(b) {
|
|
|
105
112
|
projectId: hashProjectPath(root),
|
|
106
113
|
repo: path.basename(root),
|
|
107
114
|
branch: b.gitWorktrees?.[0]?.branch ?? b.cloud?.workspaceBranch ?? "",
|
|
108
|
-
|
|
115
|
+
// A user-set display label (via rename) wins over the live agent session
|
|
116
|
+
// title as the box's primary label; else fall back to the session title, then name.
|
|
117
|
+
task: b.displayName?.trim() || b.claudeSessionTitle || b.codexSessionTitle || b.opencodeSessionTitle || b.name,
|
|
118
|
+
displayName: b.displayName?.trim() || null,
|
|
109
119
|
// Normalize the frozen wire spelling ('claude-code') to the UI label ('claude').
|
|
110
120
|
agent: normalizeLastAgent(b.lastAgent) ?? "claude",
|
|
111
121
|
status,
|
|
112
122
|
createdAt,
|
|
113
123
|
lastActivity: createdAt,
|
|
114
124
|
host: hostLabel(b),
|
|
125
|
+
provider: b.provider ?? "docker",
|
|
115
126
|
commits: null,
|
|
116
127
|
filesTouched: null,
|
|
117
128
|
error: status === "error" ? b.claudeSessionTitle ?? "Agent reported an error" : null,
|
|
118
129
|
webUrl: eps.find((e) => e.kind === "web")?.url ?? null,
|
|
119
|
-
vncUrl: eps.find((e) => e.kind === "vnc")?.url ?? null
|
|
130
|
+
vncUrl: eps.find((e) => e.kind === "vnc")?.url ?? null,
|
|
131
|
+
// Raw host-side fields for native clients (tray) — see Box for semantics.
|
|
132
|
+
state: b.state,
|
|
133
|
+
name: b.name,
|
|
134
|
+
projectRoot: root,
|
|
135
|
+
projectIndex: b.projectIndex,
|
|
136
|
+
vncEnabled: b.vncEnabled ?? false,
|
|
137
|
+
gitWorktrees: b.gitWorktrees?.map((w) => ({ kind: w.kind, branch: w.branch })),
|
|
138
|
+
claudeSessionTitle: b.claudeSessionTitle,
|
|
139
|
+
codexSessionTitle: b.codexSessionTitle,
|
|
140
|
+
opencodeSessionTitle: b.opencodeSessionTitle,
|
|
141
|
+
claudeActivity: b.claudeActivity,
|
|
142
|
+
codexActivity: b.codexActivity
|
|
120
143
|
};
|
|
121
144
|
}
|
|
122
145
|
async function hostBranchOf(repo) {
|
|
@@ -221,9 +244,14 @@ function mapJobToBox(job, status) {
|
|
|
221
244
|
createdAt,
|
|
222
245
|
lastActivity: createdAt,
|
|
223
246
|
host: job.providerName === "docker" ? "local \xB7 docker" : job.providerName,
|
|
247
|
+
provider: job.providerName ?? "docker",
|
|
224
248
|
commits: null,
|
|
225
249
|
filesTouched: null,
|
|
226
|
-
error: status === "error" ? job.reason ?? "create failed" : null
|
|
250
|
+
error: status === "error" ? job.reason ?? "create failed" : null,
|
|
251
|
+
// Raw host-side fields so native clients can group/label the synthetic row.
|
|
252
|
+
// `state` is deliberately absent — that's the synthetic-box marker.
|
|
253
|
+
name: job.boxName,
|
|
254
|
+
projectRoot: root
|
|
227
255
|
};
|
|
228
256
|
}
|
|
229
257
|
function isProviderConfigured(id) {
|
|
@@ -307,7 +335,14 @@ function listProviders(jobs) {
|
|
|
307
335
|
var FRESHNESS_TTL_MS = 6e4;
|
|
308
336
|
var freshnessCache = /* @__PURE__ */ new Map();
|
|
309
337
|
async function providerBaseFreshness(id, claudeInstall) {
|
|
310
|
-
if (id === "docker")
|
|
338
|
+
if (id === "docker") {
|
|
339
|
+
try {
|
|
340
|
+
const { evaluateDockerBaseFreshness } = await import("./dist-3HR4RIPE.js");
|
|
341
|
+
return await evaluateDockerBaseFreshness({ claudeInstall });
|
|
342
|
+
} catch {
|
|
343
|
+
return { state: "unknown" };
|
|
344
|
+
}
|
|
345
|
+
}
|
|
311
346
|
const stored = currentCloudBaseFingerprint(id);
|
|
312
347
|
const cached = freshnessCache.get(id);
|
|
313
348
|
let live;
|
|
@@ -333,7 +368,7 @@ async function listProvidersWithFreshness(base) {
|
|
|
333
368
|
}
|
|
334
369
|
return Promise.all(
|
|
335
370
|
base.map(async (p) => {
|
|
336
|
-
if (!isProviderKind(p.id)
|
|
371
|
+
if (!isProviderKind(p.id)) return p;
|
|
337
372
|
const fresh = await providerBaseFreshness(p.id, claudeInstall);
|
|
338
373
|
return {
|
|
339
374
|
...p,
|
|
@@ -457,6 +492,19 @@ async function runLifecycle(id, op) {
|
|
|
457
492
|
}
|
|
458
493
|
}
|
|
459
494
|
var errMsg = (err) => err instanceof Error ? err.message : String(err);
|
|
495
|
+
async function hubWriteSshConfig(box, provider) {
|
|
496
|
+
try {
|
|
497
|
+
const cfg = await loadEffectiveConfig(box.workspacePath);
|
|
498
|
+
await autoWriteSshConfig(
|
|
499
|
+
box,
|
|
500
|
+
provider,
|
|
501
|
+
cfg.effective.ssh.autoConfig,
|
|
502
|
+
(m) => console.warn(`[hub] ${m}`)
|
|
503
|
+
);
|
|
504
|
+
} catch (err) {
|
|
505
|
+
console.warn(`[hub] ssh-config write for ${box.name} failed: ${errMsg(err)}`);
|
|
506
|
+
}
|
|
507
|
+
}
|
|
460
508
|
async function resolveBoxProvider(id) {
|
|
461
509
|
const { boxes } = await readState();
|
|
462
510
|
const box = boxes.find((b) => b.id === id);
|
|
@@ -546,6 +594,34 @@ function parseGitStatus(out) {
|
|
|
546
594
|
}
|
|
547
595
|
return { ok: true, branch: branch === "(detached)" ? void 0 : branch, dirty, ahead, behind };
|
|
548
596
|
}
|
|
597
|
+
function canOpenInHostApps() {
|
|
598
|
+
return hubProfile() === "localhost" && process.platform === "darwin";
|
|
599
|
+
}
|
|
600
|
+
function cleanCliError(e) {
|
|
601
|
+
const raw = e.stdout?.trim() || e.stderr?.trim() || e.message || "command failed";
|
|
602
|
+
const cleaned = raw.replace(/[\u0000-\u001f]+/g, "\n").replace(/\[[0-9;]*m/g, "").split("\n").map((line) => line.replace(/^[^\p{L}\p{N}'"(]+/u, "").trim()).filter((line) => line.length > 0).join(" ");
|
|
603
|
+
return cleaned || "command failed";
|
|
604
|
+
}
|
|
605
|
+
var OPEN_TARGETS_TTL_MS = 6e4;
|
|
606
|
+
var openTargetsCache = null;
|
|
607
|
+
async function probeOpenTargets() {
|
|
608
|
+
const now = Date.now();
|
|
609
|
+
if (openTargetsCache && now - openTargetsCache.at < OPEN_TARGETS_TTL_MS) {
|
|
610
|
+
return openTargetsCache.value;
|
|
611
|
+
}
|
|
612
|
+
const entry = process.env["AGENTBOX_CLI_ENTRY"];
|
|
613
|
+
if (!entry) return null;
|
|
614
|
+
try {
|
|
615
|
+
const { stdout } = await execFileAsync(process.execPath, [entry, "open", "--targets", "--json"], {
|
|
616
|
+
timeout: 1e4
|
|
617
|
+
});
|
|
618
|
+
const value = JSON.parse(stdout);
|
|
619
|
+
openTargetsCache = { at: now, value };
|
|
620
|
+
return value;
|
|
621
|
+
} catch {
|
|
622
|
+
return null;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
549
625
|
function createHubBackend(handle) {
|
|
550
626
|
return {
|
|
551
627
|
// authMode is layered on by source.ts (an env-derived concern), so the host
|
|
@@ -573,10 +649,38 @@ function createHubBackend(handle) {
|
|
|
573
649
|
async providersWithFreshness() {
|
|
574
650
|
return listProvidersWithFreshness(listProviders(await loadQueue()));
|
|
575
651
|
},
|
|
652
|
+
start: (id) => runLifecycle(id, async (box, provider) => {
|
|
653
|
+
const state = await provider.probeState(box);
|
|
654
|
+
if (state === "running") return;
|
|
655
|
+
if (state === "paused") await provider.resume(box);
|
|
656
|
+
else await provider.start(box);
|
|
657
|
+
await hubWriteSshConfig(box, provider);
|
|
658
|
+
}),
|
|
576
659
|
pause: (id) => runLifecycle(id, (box, provider) => provider.pause(box)),
|
|
577
|
-
resume: (id) => runLifecycle(id, (box, provider) =>
|
|
660
|
+
resume: (id) => runLifecycle(id, async (box, provider) => {
|
|
661
|
+
await provider.resume(box);
|
|
662
|
+
await hubWriteSshConfig(box, provider);
|
|
663
|
+
}),
|
|
578
664
|
stop: (id) => runLifecycle(id, (box, provider) => provider.stop(box)),
|
|
579
|
-
destroy: (id) => runLifecycle(id, (box, provider) =>
|
|
665
|
+
destroy: (id) => runLifecycle(id, async (box, provider) => {
|
|
666
|
+
await provider.destroy(box);
|
|
667
|
+
await syncAgentboxSshConfig().catch(() => {
|
|
668
|
+
});
|
|
669
|
+
}),
|
|
670
|
+
async rename(id, displayName) {
|
|
671
|
+
try {
|
|
672
|
+
if (displayName.trim().length > DISPLAY_NAME_MAX) {
|
|
673
|
+
return { ok: false, error: `name too long (max ${DISPLAY_NAME_MAX} chars)` };
|
|
674
|
+
}
|
|
675
|
+
const { boxes } = await readState();
|
|
676
|
+
const box = boxes.find((b) => b.id === id);
|
|
677
|
+
if (!box) return { ok: false, error: `box ${id} not found` };
|
|
678
|
+
await setBoxDisplayName(id, displayName);
|
|
679
|
+
return { ok: true };
|
|
680
|
+
} catch (err) {
|
|
681
|
+
return { ok: false, error: errMsg(err) };
|
|
682
|
+
}
|
|
683
|
+
},
|
|
580
684
|
// Mirror POST /admin/prompts/answer's block branch, in-process: resolving
|
|
581
685
|
// the entry fulfills the Promise the /rpc handler is awaiting (box unblocks),
|
|
582
686
|
// and the broadcast clears any attached-terminal footer.
|
|
@@ -770,6 +874,24 @@ function createHubBackend(handle) {
|
|
|
770
874
|
} catch (err) {
|
|
771
875
|
return { ok: false, error: errMsg(err) };
|
|
772
876
|
}
|
|
877
|
+
},
|
|
878
|
+
async openTargets() {
|
|
879
|
+
if (!canOpenInHostApps()) return { supported: false, targets: null };
|
|
880
|
+
return { supported: true, targets: await probeOpenTargets() };
|
|
881
|
+
},
|
|
882
|
+
async openIn(id, app) {
|
|
883
|
+
if (!canOpenInHostApps()) {
|
|
884
|
+
return { ok: false, error: "open-in actions require a local hub running on macOS" };
|
|
885
|
+
}
|
|
886
|
+
const entry = process.env["AGENTBOX_CLI_ENTRY"];
|
|
887
|
+
if (!entry) return { ok: false, error: "hub is missing AGENTBOX_CLI_ENTRY; cannot launch host apps" };
|
|
888
|
+
try {
|
|
889
|
+
await execFileAsync(process.execPath, [entry, "open", id, "--in", app], { timeout: 2e4 });
|
|
890
|
+
return { ok: true };
|
|
891
|
+
} catch (err) {
|
|
892
|
+
const e = err;
|
|
893
|
+
return { ok: false, error: cleanCliError(e) };
|
|
894
|
+
}
|
|
773
895
|
}
|
|
774
896
|
};
|
|
775
897
|
}
|
|
@@ -781,9 +903,9 @@ var host = process.env.AGENTBOX_HUB_HOST ?? "127.0.0.1";
|
|
|
781
903
|
process.env.AGENTBOX_HUB_PROFILE ??= host === "127.0.0.1" ? "localhost" : "hetzner";
|
|
782
904
|
if (host !== "127.0.0.1") process.env.AGENTBOX_HUB_AUTH ??= "on";
|
|
783
905
|
async function main() {
|
|
784
|
-
const { authMode } = await import("./auth-config-
|
|
906
|
+
const { authMode } = await import("./auth-config-AOBEKRZQ.js");
|
|
785
907
|
if (process.env.AGENTBOX_HUB_PROFILE === "localhost" && process.env.AGENTBOX_HUB_AUTH !== "off") {
|
|
786
|
-
const { ensureHubToken } = await import("./hub-token-
|
|
908
|
+
const { ensureHubToken } = await import("./hub-token-2BZFBBW3.js");
|
|
787
909
|
process.env.AGENTBOX_HUB_TOKEN = await ensureHubToken();
|
|
788
910
|
}
|
|
789
911
|
const dir = import.meta.dirname;
|
|
@@ -813,7 +935,7 @@ async function main() {
|
|
|
813
935
|
globalThis.__AGENTBOX_HUB_NOTIFIER = daemon.handle.hubNotifier;
|
|
814
936
|
const mode = authMode();
|
|
815
937
|
if (mode === "password") {
|
|
816
|
-
const { ensureAuthReady } = await import("./auth-
|
|
938
|
+
const { ensureAuthReady } = await import("./auth-675P3LQS.js");
|
|
817
939
|
await ensureAuthReady();
|
|
818
940
|
process.stdout.write("agentbox-hub: auth ready\n");
|
|
819
941
|
}
|