@madarco/agentbox 0.29.1 → 0.29.2
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 +24 -0
- package/dist/{_cloud-attach-EUO2OL7W.js → _cloud-attach-7WVNYNJI.js} +6 -6
- package/dist/{chunk-2JHPGPLE.js → chunk-5I7IFACI.js} +2 -2
- package/dist/{chunk-AC3HU25W.js → chunk-5NVHJS7D.js} +2 -2
- package/dist/{chunk-PFEBKXFD.js → chunk-6UCHNX75.js} +19 -12
- package/dist/{chunk-PFEBKXFD.js.map → chunk-6UCHNX75.js.map} +1 -1
- package/dist/{chunk-UEEW5TW7.js → chunk-F77AZT2M.js} +2 -2
- package/dist/{chunk-UTOC2NHC.js → chunk-FCMBVJFQ.js} +2 -2
- package/dist/{chunk-73D2HKA3.js → chunk-HLBK5ZR6.js} +5 -5
- package/dist/{chunk-4KYP775X.js → chunk-JLVUNDUB.js} +26 -7
- package/dist/chunk-JLVUNDUB.js.map +1 -0
- package/dist/{chunk-BIKWXLX7.js → chunk-JTYWZJIU.js} +3 -3
- package/dist/{chunk-7LC5IG5K.js → chunk-LEVYTABB.js} +3 -3
- package/dist/{chunk-FEFLAITR.js → chunk-MS4NWRXN.js} +2 -2
- package/dist/{chunk-WJUKN4L4.js → chunk-N6EBPKTJ.js} +45 -3
- package/dist/chunk-N6EBPKTJ.js.map +1 -0
- package/dist/{chunk-4NUETVTR.js → chunk-OUOV4OM2.js} +7 -7
- package/dist/{chunk-I7BSBUPC.js → chunk-P5A6MT75.js} +7 -7
- package/dist/{chunk-FELVUIIM.js → chunk-RXH634SC.js} +2 -2
- package/dist/{chunk-QDU7YDME.js → chunk-SXXN7JOC.js} +18 -18
- package/dist/{chunk-B4YFG5TB.js → chunk-TDW2T3HR.js} +4 -4
- package/dist/{chunk-S32GHLVU.js → chunk-TPHSVKMX.js} +2 -2
- package/dist/{chunk-53OTEDBS.js → chunk-ZCHWZYIN.js} +3 -3
- package/dist/cloud-backends.js +3 -3
- package/dist/{control-plane-YQFX2ILX.js → control-plane-TOFT56CT.js} +10 -10
- package/dist/{cp-hub-upload-RMJ3XJ65.js → cp-hub-upload-OTBR5SL3.js} +2 -2
- package/dist/{deploy-hetzner-EECQ4JCM.js → deploy-hetzner-EE5CYX4N.js} +4 -4
- package/dist/{dist-Q4UDCSZQ.js → dist-7HSAWFRN.js} +3 -3
- package/dist/{dist-XUOHE22G.js → dist-BVZBXQ2Y.js} +4 -4
- package/dist/{dist-NFF2KEMB.js → dist-GMIBT6IK.js} +43 -19
- package/dist/{dist-NFF2KEMB.js.map → dist-GMIBT6IK.js.map} +1 -1
- package/dist/{dist-NTUHJOK3.js → dist-JSEXGLYK.js} +3 -3
- package/dist/{dist-TXFTYNNE.js → dist-RWFKW4IU.js} +2 -2
- package/dist/{dist-Z2TPC3EN.js → dist-XV77P3RW.js} +3 -3
- package/dist/{dist-E5EXDZG4.js → dist-Y2GCMA6N.js} +2 -2
- package/dist/{hub-3HPYOV5O.js → hub-53E6EFZB.js} +11 -11
- package/dist/{hub-docker-target-ZKAWXVPH.js → hub-docker-target-CS5XHSSA.js} +7 -7
- package/dist/index.js +47 -39
- package/dist/index.js.map +1 -1
- package/dist/{prepare-KIVDQRMN.js → prepare-VTLE7RCJ.js} +15 -15
- package/dist/{prepared-custody-EFSOOAIQ.js → prepared-custody-ATP6GQGW.js} +11 -11
- package/dist/{publish-credentials-F2A5OVCO.js → publish-credentials-NAWOHOLK.js} +3 -3
- package/dist/{registry-O3X2CDDU.js → registry-5CPAQ2KN.js} +3 -3
- package/dist/{remote-docker-share-QDCBM5UM.js → remote-docker-share-XBV76ZAZ.js} +4 -4
- package/dist/{tool-grant-push-6ISDIJKH.js → tool-grant-push-5GJYMC7C.js} +2 -2
- package/package.json +1 -1
- package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
- package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
- 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/middleware-build-manifest.js +3 -3
- package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
- package/runtime/hub/apps/hub/{chunk-BI4MPGQT.js → chunk-CTNPQ75B.js} +7 -7
- package/runtime/hub/apps/hub/{chunk-2WB3A5IN.js → chunk-DJPQLZ5Y.js} +1 -1
- package/runtime/hub/apps/hub/{chunk-RPPOFMPA.js → chunk-GUKVXSIY.js} +25 -6
- package/runtime/hub/apps/hub/{dist-F547YSBE.js → dist-2G5INR3G.js} +2 -2
- package/runtime/hub/apps/hub/{dist-YB3Y2XDK.js → dist-CIB4ZPJW.js} +85 -19
- package/runtime/hub/apps/hub/{dist-W5SGEJLA.js → dist-PI5ZAQGG.js} +1 -1
- package/runtime/hub/apps/hub/{dist-4F6XEJHK.js → dist-VDPNQEZ7.js} +2 -2
- package/runtime/hub/apps/hub/{dist-FEHV4PC7.js → dist-VZM32WR4.js} +1 -1
- package/runtime/hub/apps/hub/{dist-P7NT6VLK.js → dist-Y3LGOZ56.js} +1 -1
- package/runtime/hub/apps/hub/{dist-A3JOKKYG.js → dist-ZOJYJJ26.js} +1 -1
- package/runtime/hub/apps/hub/{hub-worker-I5QBLSRU.js → hub-worker-YQCQKCXS.js} +3 -3
- package/runtime/hub/apps/hub/server.js +8 -8
- package/runtime/hub/apps/hub/tsconfig.tsbuildinfo +1 -1
- package/dist/chunk-4KYP775X.js.map +0 -1
- package/dist/chunk-WJUKN4L4.js.map +0 -1
- /package/dist/{_cloud-attach-EUO2OL7W.js.map → _cloud-attach-7WVNYNJI.js.map} +0 -0
- /package/dist/{chunk-2JHPGPLE.js.map → chunk-5I7IFACI.js.map} +0 -0
- /package/dist/{chunk-AC3HU25W.js.map → chunk-5NVHJS7D.js.map} +0 -0
- /package/dist/{chunk-UEEW5TW7.js.map → chunk-F77AZT2M.js.map} +0 -0
- /package/dist/{chunk-UTOC2NHC.js.map → chunk-FCMBVJFQ.js.map} +0 -0
- /package/dist/{chunk-73D2HKA3.js.map → chunk-HLBK5ZR6.js.map} +0 -0
- /package/dist/{chunk-BIKWXLX7.js.map → chunk-JTYWZJIU.js.map} +0 -0
- /package/dist/{chunk-7LC5IG5K.js.map → chunk-LEVYTABB.js.map} +0 -0
- /package/dist/{chunk-FEFLAITR.js.map → chunk-MS4NWRXN.js.map} +0 -0
- /package/dist/{chunk-4NUETVTR.js.map → chunk-OUOV4OM2.js.map} +0 -0
- /package/dist/{chunk-I7BSBUPC.js.map → chunk-P5A6MT75.js.map} +0 -0
- /package/dist/{chunk-FELVUIIM.js.map → chunk-RXH634SC.js.map} +0 -0
- /package/dist/{chunk-QDU7YDME.js.map → chunk-SXXN7JOC.js.map} +0 -0
- /package/dist/{chunk-B4YFG5TB.js.map → chunk-TDW2T3HR.js.map} +0 -0
- /package/dist/{chunk-S32GHLVU.js.map → chunk-TPHSVKMX.js.map} +0 -0
- /package/dist/{chunk-53OTEDBS.js.map → chunk-ZCHWZYIN.js.map} +0 -0
- /package/dist/{control-plane-YQFX2ILX.js.map → control-plane-TOFT56CT.js.map} +0 -0
- /package/dist/{cp-hub-upload-RMJ3XJ65.js.map → cp-hub-upload-OTBR5SL3.js.map} +0 -0
- /package/dist/{deploy-hetzner-EECQ4JCM.js.map → deploy-hetzner-EE5CYX4N.js.map} +0 -0
- /package/dist/{dist-NTUHJOK3.js.map → dist-7HSAWFRN.js.map} +0 -0
- /package/dist/{dist-Q4UDCSZQ.js.map → dist-BVZBXQ2Y.js.map} +0 -0
- /package/dist/{dist-TXFTYNNE.js.map → dist-JSEXGLYK.js.map} +0 -0
- /package/dist/{dist-XUOHE22G.js.map → dist-RWFKW4IU.js.map} +0 -0
- /package/dist/{dist-Z2TPC3EN.js.map → dist-XV77P3RW.js.map} +0 -0
- /package/dist/{dist-E5EXDZG4.js.map → dist-Y2GCMA6N.js.map} +0 -0
- /package/dist/{hub-3HPYOV5O.js.map → hub-53E6EFZB.js.map} +0 -0
- /package/dist/{hub-docker-target-ZKAWXVPH.js.map → hub-docker-target-CS5XHSSA.js.map} +0 -0
- /package/dist/{prepare-KIVDQRMN.js.map → prepare-VTLE7RCJ.js.map} +0 -0
- /package/dist/{prepared-custody-EFSOOAIQ.js.map → prepared-custody-ATP6GQGW.js.map} +0 -0
- /package/dist/{publish-credentials-F2A5OVCO.js.map → publish-credentials-NAWOHOLK.js.map} +0 -0
- /package/dist/{registry-O3X2CDDU.js.map → registry-5CPAQ2KN.js.map} +0 -0
- /package/dist/{remote-docker-share-QDCBM5UM.js.map → remote-docker-share-XBV76ZAZ.js.map} +0 -0
- /package/dist/{tool-grant-push-6ISDIJKH.js.map → tool-grant-push-5GJYMC7C.js.map} +0 -0
- /package/runtime/hub/apps/hub/.next/static/{nDHi_1342DzyGDC14ocQo → 2P6VYtaUNxtdBvOVMolM-}/_buildManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{nDHi_1342DzyGDC14ocQo → 2P6VYtaUNxtdBvOVMolM-}/_clientMiddlewareManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{nDHi_1342DzyGDC14ocQo → 2P6VYtaUNxtdBvOVMolM-}/_ssgManifest.js +0 -0
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
resolveCloudCheckpoint,
|
|
21
21
|
seedAgentStaticIntoCloudBox,
|
|
22
22
|
writeCloudCheckpointManifest
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-GUKVXSIY.js";
|
|
24
24
|
import "./chunk-QWSP6WJ2.js";
|
|
25
25
|
import "./chunk-6AVSKCZJ.js";
|
|
26
26
|
import "./chunk-F2JI4GMX.js";
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
import "./chunk-EFW34I43.js";
|
|
52
52
|
import "./chunk-TZFWAJVB.js";
|
|
53
53
|
|
|
54
|
-
// ../../packages/sandbox-daytona/dist/chunk-
|
|
54
|
+
// ../../packages/sandbox-daytona/dist/chunk-QFW67CHZ.js
|
|
55
55
|
import { existsSync } from "fs";
|
|
56
56
|
import { dirname, resolve } from "path";
|
|
57
57
|
import { fileURLToPath } from "url";
|
|
@@ -376,6 +376,31 @@ function retry(method, fn, opts = {}) {
|
|
|
376
376
|
var DEFAULT_BOX_IMAGE_REF = "agentbox/box:dev";
|
|
377
377
|
var DAYTONA_DEFAULT_RESOURCES = { cpu: 2, memory: 4, disk: 8 };
|
|
378
378
|
var clients = /* @__PURE__ */ new Map();
|
|
379
|
+
var BOX_USER = "vscode";
|
|
380
|
+
function shq(s) {
|
|
381
|
+
return `'${s.replace(/'/g, `'\\''`)}'`;
|
|
382
|
+
}
|
|
383
|
+
function buildDaytonaExec(cmd, h, opts) {
|
|
384
|
+
const user = opts?.user ?? BOX_USER;
|
|
385
|
+
const isVm = h.sandboxClass !== "container";
|
|
386
|
+
if (!isVm || user === "root") {
|
|
387
|
+
return {
|
|
388
|
+
cmd,
|
|
389
|
+
...opts?.cwd ? { cwd: opts.cwd } : {},
|
|
390
|
+
...opts?.env ? { env: opts.env } : {}
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
const prelude = [];
|
|
394
|
+
if (opts?.cwd) prelude.push(`cd ${shq(opts.cwd)}`);
|
|
395
|
+
for (const [k, v2] of Object.entries(opts?.env ?? {})) {
|
|
396
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(k)) {
|
|
397
|
+
throw new Error(`daytona exec: invalid env var name ${JSON.stringify(k)}`);
|
|
398
|
+
}
|
|
399
|
+
prelude.push(`export ${k}=${shq(v2)}`);
|
|
400
|
+
}
|
|
401
|
+
const inner = [...prelude, cmd].join("\n");
|
|
402
|
+
return { cmd: `sudo -n -u ${user} -H bash -lc ${shq(inner)}` };
|
|
403
|
+
}
|
|
379
404
|
function getClient(target = "") {
|
|
380
405
|
const cached = clients.get(target);
|
|
381
406
|
if (cached) return cached;
|
|
@@ -657,6 +682,16 @@ Run \`agentbox prepare --provider daytona\` to bake one, or set \`agentbox confi
|
|
|
657
682
|
* `CloudBackend.attachExecLacksTty`.
|
|
658
683
|
*/
|
|
659
684
|
attachExecLacksTty: true,
|
|
685
|
+
/**
|
|
686
|
+
* See `CloudBackend.attachRunAs`. The SSH gateway authenticates with an
|
|
687
|
+
* opaque token and offers no unix user, so a `linux-vm` session lands as root
|
|
688
|
+
* — the class that has no image metadata to say otherwise. Drop it to the box
|
|
689
|
+
* user so the tmux server, the agent and the ctl client are all `vscode`,
|
|
690
|
+
* matching what `exec` now does. `container` already lands there.
|
|
691
|
+
*/
|
|
692
|
+
attachRunAs(h) {
|
|
693
|
+
return h.sandboxClass === "container" ? void 0 : BOX_USER;
|
|
694
|
+
},
|
|
660
695
|
/**
|
|
661
696
|
* Hold off Daytona's auto-stop while the in-box agent is working.
|
|
662
697
|
*
|
|
@@ -705,11 +740,12 @@ Run \`agentbox prepare --provider daytona\` to bake one, or set \`agentbox confi
|
|
|
705
740
|
});
|
|
706
741
|
},
|
|
707
742
|
async exec(h, cmd, opts) {
|
|
743
|
+
const plan = buildDaytonaExec(cmd, h, opts);
|
|
708
744
|
return retry(
|
|
709
745
|
"exec",
|
|
710
746
|
async () => {
|
|
711
747
|
const sb = await getSandbox(h.sandboxId);
|
|
712
|
-
const r = await sb.process.executeCommand(cmd,
|
|
748
|
+
const r = await sb.process.executeCommand(plan.cmd, plan.cwd, plan.env);
|
|
713
749
|
return { exitCode: r.exitCode, stdout: r.result, stderr: "" };
|
|
714
750
|
},
|
|
715
751
|
{ attemptTimeoutMs: opts?.attemptTimeoutMs ?? 12e4, noRetry: opts?.noRetry }
|
|
@@ -721,6 +757,12 @@ Run \`agentbox prepare --provider daytona\` to bake one, or set \`agentbox confi
|
|
|
721
757
|
async () => {
|
|
722
758
|
const sb = await getSandbox(h.sandboxId);
|
|
723
759
|
await sb.fs.uploadFile(localPath, remotePath);
|
|
760
|
+
if (h.sandboxClass !== "container") {
|
|
761
|
+
try {
|
|
762
|
+
await sb.process.executeCommand(`chown ${BOX_USER}: ${shq(remotePath)}`);
|
|
763
|
+
} catch {
|
|
764
|
+
}
|
|
765
|
+
}
|
|
724
766
|
},
|
|
725
767
|
{ attemptTimeoutMs: 3e5 }
|
|
726
768
|
);
|
|
@@ -1165,14 +1207,15 @@ async function bakeDaytonaVmBase(opts) {
|
|
|
1165
1207
|
}
|
|
1166
1208
|
const handle = { sandboxId: sandbox.id, sandboxClass: "linux-vm" };
|
|
1167
1209
|
try {
|
|
1168
|
-
const
|
|
1210
|
+
const asRoot = { user: "root" };
|
|
1211
|
+
const wait = await opts.backend.exec(handle, buildDockerWaitCommand(), asRoot);
|
|
1169
1212
|
if (wait.exitCode !== 0) {
|
|
1170
1213
|
throw new Error(
|
|
1171
1214
|
"dockerd never came up in the VM base, so sudo cannot be repaired (the repair borrows root from the docker socket)."
|
|
1172
1215
|
);
|
|
1173
1216
|
}
|
|
1174
1217
|
log("repairing sudo (the VM rootfs conversion strips setuid bits)\u2026");
|
|
1175
|
-
const repair = await opts.backend.exec(handle, buildSudoRepairCommand());
|
|
1218
|
+
const repair = await opts.backend.exec(handle, buildSudoRepairCommand(), asRoot);
|
|
1176
1219
|
if (repair.exitCode !== 0) {
|
|
1177
1220
|
throw new Error(
|
|
1178
1221
|
`failed to restore sudo in the VM base (exit ${String(repair.exitCode)}): ${repair.stdout}${repair.stderr}`
|
|
@@ -1180,7 +1223,9 @@ async function bakeDaytonaVmBase(opts) {
|
|
|
1180
1223
|
}
|
|
1181
1224
|
imageEnv = await fetchImageEnv(imageRef) ?? [];
|
|
1182
1225
|
if (imageEnv.length > 0) {
|
|
1183
|
-
log(
|
|
1226
|
+
log(
|
|
1227
|
+
`restoring the image's ${String(imageEnv.length)} env vars (the VM conversion drops them)\u2026`
|
|
1228
|
+
);
|
|
1184
1229
|
const envFix = await opts.backend.exec(handle, buildEnvRestoreCommand(imageEnv));
|
|
1185
1230
|
if (envFix.exitCode !== 0) {
|
|
1186
1231
|
throw new Error(
|
|
@@ -1222,21 +1267,42 @@ function nonce() {
|
|
|
1222
1267
|
}
|
|
1223
1268
|
async function createVmBaseSnapshot(opts, name, imageRef, log) {
|
|
1224
1269
|
log(`creating linux-vm base image snapshot '${name}' from ${imageRef}\u2026`);
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1270
|
+
try {
|
|
1271
|
+
await opts.client.snapshot.create(
|
|
1272
|
+
{
|
|
1273
|
+
name,
|
|
1274
|
+
image: imageRef,
|
|
1275
|
+
sandboxClass: SandboxClass.LINUX_VM,
|
|
1276
|
+
regionId: opts.regionId,
|
|
1277
|
+
// Always explicit: a snapshot with no `resources` gets Daytona's 1 vCPU /
|
|
1278
|
+
// 1 GiB / 3 GiB default, and the box image does not fit in 3 GiB — the
|
|
1279
|
+
// build dies mid-pull with a bare "internal error".
|
|
1280
|
+
resources: opts.resources ?? { cpu: 2, memory: 4, disk: 8 }
|
|
1281
|
+
},
|
|
1282
|
+
{ onLogs: (c) => log(String(c).split("\n").filter(Boolean).join(" ")) }
|
|
1283
|
+
);
|
|
1284
|
+
} catch (err) {
|
|
1285
|
+
if (isRegionNotFound(err)) {
|
|
1286
|
+
throw new Error(vmRegionUnavailableMessage(opts.regionId));
|
|
1287
|
+
}
|
|
1288
|
+
throw err;
|
|
1289
|
+
}
|
|
1238
1290
|
return name;
|
|
1239
1291
|
}
|
|
1292
|
+
function isRegionNotFound(err) {
|
|
1293
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1294
|
+
return /\bregion\b/i.test(msg) && /\bnot found\b/i.test(msg);
|
|
1295
|
+
}
|
|
1296
|
+
function vmRegionUnavailableMessage(regionId) {
|
|
1297
|
+
return `your Daytona organization has no '${regionId}' region, and linux-vm boxes run only there.
|
|
1298
|
+
A VM region is *dedicated* \u2014 it is not enabled for every account \u2014 so a key from an
|
|
1299
|
+
organization with only the shared 'us'/'eu' regions cannot bake a Daytona base at all.
|
|
1300
|
+
Check what yours has:
|
|
1301
|
+
curl -H "Authorization: Bearer $DAYTONA_API_KEY" https://app.daytona.io/api/regions
|
|
1302
|
+
Use an API key from an organization that has a VM region (or ask Daytona to enable one). If
|
|
1303
|
+
Daytona has since added a VM region for your org, name it with
|
|
1304
|
+
\`agentbox config set box.daytonaRegion <id>\`.`;
|
|
1305
|
+
}
|
|
1240
1306
|
async function snapshotIsActive(client, name) {
|
|
1241
1307
|
try {
|
|
1242
1308
|
const snap = await client.snapshot.get(name);
|
|
@@ -48,9 +48,9 @@ import {
|
|
|
48
48
|
validateServerChoice,
|
|
49
49
|
withHetznerRetry,
|
|
50
50
|
writePreparedState
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-DJPQLZ5Y.js";
|
|
52
52
|
import "./chunk-OF242BLD.js";
|
|
53
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-GUKVXSIY.js";
|
|
54
54
|
import "./chunk-QWSP6WJ2.js";
|
|
55
55
|
import "./chunk-6AVSKCZJ.js";
|
|
56
56
|
import "./chunk-F2JI4GMX.js";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
hydratePreparedFromCustody,
|
|
4
4
|
isRuntimeProviderName,
|
|
5
5
|
loadProviderModuleByName
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CTNPQ75B.js";
|
|
7
7
|
import {
|
|
8
8
|
applyProjectSeed,
|
|
9
9
|
startDetachedCloudAgent
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GUKVXSIY.js";
|
|
11
11
|
import {
|
|
12
12
|
FsCustodyStore,
|
|
13
13
|
GitHubAppLeaser,
|
|
@@ -187,7 +187,7 @@ function makeHubCreateBox(opts) {
|
|
|
187
187
|
const { name: providerName, remoteHost } = parseProviderSpec(provider);
|
|
188
188
|
if (!isRuntimeProviderName(providerName)) throw new Error(`unknown provider ${provider}`);
|
|
189
189
|
if (remoteHost) {
|
|
190
|
-
const rd = await import("./dist-
|
|
190
|
+
const rd = await import("./dist-PI5ZAQGG.js");
|
|
191
191
|
if (!rd.getHostAlias(remoteHost)) {
|
|
192
192
|
throw new Error(
|
|
193
193
|
`unknown remote-docker host '${remoteHost}' on this hub \u2014 share it from the machine that owns it (\`agentbox remote-docker share ${remoteHost}\`)`
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
isRuntimeProviderName,
|
|
9
9
|
loadProviderModuleByName,
|
|
10
10
|
registrationProjectKey
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CTNPQ75B.js";
|
|
12
12
|
import {
|
|
13
13
|
baseFreshnessFromFingerprints,
|
|
14
14
|
currentCloudBaseFingerprint,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
listCloudCheckpoints,
|
|
18
18
|
openWebAppOnVncScreen,
|
|
19
19
|
resolveCloudCheckpoint
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-GUKVXSIY.js";
|
|
21
21
|
import {
|
|
22
22
|
FsCustodyStore,
|
|
23
23
|
clearRelayNotice,
|
|
@@ -758,7 +758,7 @@ async function providerBakeDiff(id) {
|
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
760
|
async function loadRemoteDockerHostViews() {
|
|
761
|
-
const rd = await import("./dist-
|
|
761
|
+
const rd = await import("./dist-PI5ZAQGG.js");
|
|
762
762
|
const prepared = rd.readPreparedState();
|
|
763
763
|
const cfg = await loadEffectiveConfig(os2.homedir());
|
|
764
764
|
const dflt = (cfg.effective.box.remoteDockerHost || "").trim();
|
|
@@ -1596,7 +1596,7 @@ function createHubBackend(handle) {
|
|
|
1596
1596
|
const spec = parseProviderSpec(provider);
|
|
1597
1597
|
if (spec.remoteHost) {
|
|
1598
1598
|
const alias = spec.remoteHost;
|
|
1599
|
-
const rd = await import("./dist-
|
|
1599
|
+
const rd = await import("./dist-PI5ZAQGG.js");
|
|
1600
1600
|
if (!rd.getHostAlias(alias)) {
|
|
1601
1601
|
return {
|
|
1602
1602
|
ok: false,
|
|
@@ -2191,7 +2191,7 @@ function createHubBackend(handle) {
|
|
|
2191
2191
|
},
|
|
2192
2192
|
async addRemoteDockerHost(alias, ssh, opts) {
|
|
2193
2193
|
try {
|
|
2194
|
-
const rd = await import("./dist-
|
|
2194
|
+
const rd = await import("./dist-PI5ZAQGG.js");
|
|
2195
2195
|
const trimmedSsh = ssh.trim();
|
|
2196
2196
|
if (!rd.isValidAlias(alias)) {
|
|
2197
2197
|
return {
|
|
@@ -2240,7 +2240,7 @@ function createHubBackend(handle) {
|
|
|
2240
2240
|
},
|
|
2241
2241
|
async removeRemoteDockerHost(alias) {
|
|
2242
2242
|
try {
|
|
2243
|
-
const rd = await import("./dist-
|
|
2243
|
+
const rd = await import("./dist-PI5ZAQGG.js");
|
|
2244
2244
|
rd.removeHostAlias(alias);
|
|
2245
2245
|
rd.removePreparedHost(alias);
|
|
2246
2246
|
const cfg = await loadEffectiveConfig(os2.homedir());
|
|
@@ -2258,7 +2258,7 @@ function createHubBackend(handle) {
|
|
|
2258
2258
|
},
|
|
2259
2259
|
async bakeRemoteDockerHost(alias) {
|
|
2260
2260
|
try {
|
|
2261
|
-
const rd = await import("./dist-
|
|
2261
|
+
const rd = await import("./dist-PI5ZAQGG.js");
|
|
2262
2262
|
if (!rd.getHostAlias(alias)) return { ok: false, error: `no such host alias ${alias}` };
|
|
2263
2263
|
const spec = `docker:${alias}`;
|
|
2264
2264
|
const existing = (await loadQueue()).find(
|
|
@@ -2586,7 +2586,7 @@ async function main() {
|
|
|
2586
2586
|
}
|
|
2587
2587
|
let worker;
|
|
2588
2588
|
if (process.env.AGENTBOX_HUB_WORKER === "on") {
|
|
2589
|
-
const { startHubWorker } = await import("./hub-worker-
|
|
2589
|
+
const { startHubWorker } = await import("./hub-worker-YQCQKCXS.js");
|
|
2590
2590
|
worker = startHubWorker({
|
|
2591
2591
|
store: daemon.handle.store,
|
|
2592
2592
|
log: (line) => process.stdout.write(`agentbox-hub-worker: ${line}
|