@madarco/agentbox 0.24.6 → 0.25.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 +69 -0
- package/LICENSE +21 -0
- package/README.md +4 -0
- package/dist/{_cloud-attach-ESCPOKG5.js → _cloud-attach-FGMI2ZHO.js} +5 -5
- package/dist/{chunk-4HPLS5HJ.js → chunk-3BR63LCB.js} +110 -9
- package/dist/chunk-3BR63LCB.js.map +1 -0
- package/dist/{chunk-OSPM4Q5V.js → chunk-3PSRBK24.js} +6 -6
- package/dist/chunk-3PSRBK24.js.map +1 -0
- package/dist/{chunk-CE3S7UDQ.js → chunk-4DBLYT2F.js} +44 -12
- package/dist/chunk-4DBLYT2F.js.map +1 -0
- package/dist/{chunk-3MDYQROX.js → chunk-4LS2TOF3.js} +17 -13
- package/dist/chunk-4LS2TOF3.js.map +1 -0
- package/dist/{chunk-H6A4BQMG.js → chunk-5F5SOSDY.js} +40 -1
- package/dist/chunk-5F5SOSDY.js.map +1 -0
- package/dist/{chunk-LJMGHFLZ.js → chunk-5VNL6SHJ.js} +3 -3
- package/dist/{chunk-7DPDUZ7L.js → chunk-67VF2QZC.js} +194 -56
- package/dist/chunk-67VF2QZC.js.map +1 -0
- package/dist/{chunk-RFRWS5CD.js → chunk-6GZK74GT.js} +2 -2
- package/dist/chunk-G3H2L3O2.js +0 -0
- package/dist/{chunk-5JDOTQTM.js → chunk-P5U6AP6K.js} +4 -4
- package/dist/chunk-WJFZJZIM.js +0 -0
- package/dist/{chunk-QHISF6O6.js → chunk-ZTSVY3YL.js} +3 -3
- package/dist/cloud-poller-SUNA6ZQC-7M5LJHHE.js +0 -0
- package/dist/{dist-VFPT5TDH.js → dist-4I7XHDC3.js} +6 -6
- package/dist/dist-5G42NFOG.js +677 -0
- package/dist/dist-5G42NFOG.js.map +1 -0
- package/dist/{dist-TRKHS6I7.js → dist-AZUD2LUA.js} +6 -6
- package/dist/{dist-FGXCG4JY.js → dist-MEK44IS5.js} +6 -6
- package/dist/{dist-HPPHBZTO.js → dist-SBDYDH7H.js} +8 -2
- package/dist/{dist-NOUPH5E6.js → dist-SN6ABGMD.js} +4 -4
- package/dist/{dist-3M53BF4E.js → dist-X7R2EMJL.js} +6 -6
- package/dist/index.js +114 -38
- package/dist/index.js.map +1 -1
- package/dist/{prepared-state-BUO75YLZ-46W2PAHH.js → prepared-state-75DIZ55S-5UAKJX3L.js} +2 -2
- package/package.json +29 -30
- 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 +31 -4
- 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/digitalocean/agentbox-checkpoint-cleanup +0 -0
- package/runtime/digitalocean/agentbox-dockerd-start +0 -0
- package/runtime/digitalocean/agentbox-open +0 -0
- package/runtime/digitalocean/agentbox-portless-trust +0 -0
- package/runtime/digitalocean/agentbox-vnc-start +0 -0
- package/runtime/digitalocean/ctl.cjs +31 -4
- package/runtime/digitalocean/gh-shim +0 -0
- package/runtime/digitalocean/git-shim +0 -0
- package/runtime/digitalocean/linear-shim +0 -0
- package/runtime/digitalocean/ntn-shim +0 -0
- package/runtime/digitalocean/scripts/install-box.sh +0 -0
- package/runtime/docker/packages/ctl/dist/bin.cjs +31 -4
- 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 +0 -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 +31 -4
- 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 +31 -4
- 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/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/chunks/[root-of-the-server]__0d1lmiq._.js +6 -6
- package/runtime/hub/apps/hub/.next/server/chunks/_0760z6y._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ro6vh6._.js +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/{auth-HY5K55Y5.js → auth-MVL4NCQC.js} +3 -3
- package/runtime/hub/apps/hub/{auth-config-MNW2XGKK.js → auth-config-GRIXACTV.js} +3 -3
- package/runtime/hub/apps/hub/{chunk-5KMJIVZC.js → chunk-23AU7VYS.js} +111 -10
- package/runtime/hub/apps/hub/{chunk-OF242BLD.js → chunk-CKBHQ7OI.js} +1 -1
- package/runtime/hub/apps/hub/{chunk-DNR2YM2G.js → chunk-GARA7RQW.js} +58 -10
- package/runtime/hub/apps/hub/{chunk-PROXBLRJ.js → chunk-JLG5JJXD.js} +1 -1
- package/runtime/hub/apps/hub/{chunk-TZFWAJVB.js → chunk-OG4KH2FZ.js} +5 -0
- package/runtime/hub/apps/hub/chunk-QYJ37CUJ.js +62140 -0
- package/runtime/hub/apps/hub/{chunk-EY6HEDTK.js → chunk-RSENJ2FT.js} +17 -13
- package/runtime/hub/apps/hub/{chunk-EFW34I43.js → chunk-UDZ3VXRF.js} +1 -1
- package/runtime/hub/apps/hub/{chunk-TRUQCO4U.js → chunk-V3OMPMI3.js} +40 -1
- package/runtime/hub/apps/hub/{cloud-poller-SUNA6ZQC-VSKVMYHL.js → cloud-poller-SUNA6ZQC-YAWTNA2W.js} +1 -1
- package/runtime/hub/apps/hub/{dist-KV5ESR24.js → dist-DZGSA3US.js} +7 -7
- package/runtime/hub/apps/hub/{dist-NTKPAYA3.js → dist-IZ2JCN5R.js} +8 -2
- package/runtime/hub/apps/hub/{dist-M73U3ZDH.js → dist-JVU3QCLG.js} +7 -7
- package/runtime/hub/apps/hub/{dist-3DCKZYID.js → dist-TP4SXMDY.js} +596 -113
- package/runtime/hub/apps/hub/{dist-YCRESLWD.js → dist-VWSHZIPN.js} +7 -7
- package/runtime/hub/apps/hub/{dist-SX2NXGI6.js → dist-WZKTIA2R.js} +7 -7
- package/runtime/hub/apps/hub/{dist-RSWTJWRN.js → dist-YWY2DSSL.js} +5 -5
- package/runtime/hub/apps/hub/esm-VGBJAFLR.js +79 -0
- package/runtime/hub/apps/hub/{execa-4DLVNM6E.js → execa-AFY4ZODY.js} +2 -2
- package/runtime/hub/apps/hub/{hub-token-QKQWV2I6.js → hub-token-BJG6Q5II.js} +3 -3
- package/runtime/hub/apps/hub/{prepared-state-BUO75YLZ-KR4YLKDC.js → prepared-state-75DIZ55S-JDILR4OP.js} +3 -3
- package/runtime/hub/apps/hub/server.js +19 -19
- package/runtime/relay/bin.cjs +177 -42
- 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 +31 -4
- 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/dist/chunk-3MDYQROX.js.map +0 -1
- package/dist/chunk-4HPLS5HJ.js.map +0 -1
- package/dist/chunk-7DPDUZ7L.js.map +0 -1
- package/dist/chunk-CE3S7UDQ.js.map +0 -1
- package/dist/chunk-H6A4BQMG.js.map +0 -1
- package/dist/chunk-OSPM4Q5V.js.map +0 -1
- package/dist/dist-2N3XHMBQ.js +0 -322
- package/dist/dist-2N3XHMBQ.js.map +0 -1
- /package/dist/{_cloud-attach-ESCPOKG5.js.map → _cloud-attach-FGMI2ZHO.js.map} +0 -0
- /package/dist/{chunk-LJMGHFLZ.js.map → chunk-5VNL6SHJ.js.map} +0 -0
- /package/dist/{chunk-RFRWS5CD.js.map → chunk-6GZK74GT.js.map} +0 -0
- /package/dist/{chunk-5JDOTQTM.js.map → chunk-P5U6AP6K.js.map} +0 -0
- /package/dist/{chunk-QHISF6O6.js.map → chunk-ZTSVY3YL.js.map} +0 -0
- /package/dist/{dist-HPPHBZTO.js.map → dist-4I7XHDC3.js.map} +0 -0
- /package/dist/{dist-NOUPH5E6.js.map → dist-AZUD2LUA.js.map} +0 -0
- /package/dist/{dist-FGXCG4JY.js.map → dist-MEK44IS5.js.map} +0 -0
- /package/dist/{dist-TRKHS6I7.js.map → dist-SBDYDH7H.js.map} +0 -0
- /package/dist/{dist-VFPT5TDH.js.map → dist-SN6ABGMD.js.map} +0 -0
- /package/dist/{dist-3M53BF4E.js.map → dist-X7R2EMJL.js.map} +0 -0
- /package/dist/{prepared-state-BUO75YLZ-46W2PAHH.js.map → prepared-state-75DIZ55S-5UAKJX3L.js.map} +0 -0
- /package/runtime/hub/apps/hub/.next/static/{2LDXStEUVHS2oK1ID_Uvo → fo5EgsHa6PFLTBagfLiuM}/_buildManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{2LDXStEUVHS2oK1ID_Uvo → fo5EgsHa6PFLTBagfLiuM}/_clientMiddlewareManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{2LDXStEUVHS2oK1ID_Uvo → fo5EgsHa6PFLTBagfLiuM}/_ssgManifest.js +0 -0
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
readE2bCredStatus,
|
|
6
6
|
readPreparedState as readPreparedState3,
|
|
7
7
|
secretsPath as secretsPath4
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6GZK74GT.js";
|
|
9
9
|
import {
|
|
10
10
|
detectEgressIp as detectEgressIp2,
|
|
11
11
|
ensureDigitalOceanCredentials,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
readPreparedState as readPreparedState4,
|
|
18
18
|
secretsPath as secretsPath5,
|
|
19
19
|
syncFirewallSource as syncFirewallSource2
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5VNL6SHJ.js";
|
|
21
21
|
import {
|
|
22
22
|
ADVANCED_HINT_GROUPS,
|
|
23
23
|
ALERT_BAND_ROWS,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
subscribePrompts,
|
|
62
62
|
uploadImageFileToBox,
|
|
63
63
|
withFirewallRepair
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-4DBLYT2F.js";
|
|
65
65
|
import {
|
|
66
66
|
daytonaBackend,
|
|
67
67
|
ensureDaytonaCredentials,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
readDaytonaCredStatus,
|
|
70
70
|
readPreparedDaytonaState,
|
|
71
71
|
secretsPath
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-67VF2QZC.js";
|
|
73
73
|
import {
|
|
74
74
|
deployControlPlaneToHetzner,
|
|
75
75
|
detectEgressIp,
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
readPreparedState,
|
|
82
82
|
secretsPath as secretsPath2,
|
|
83
83
|
syncFirewallSource
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-P5U6AP6K.js";
|
|
85
85
|
import {
|
|
86
86
|
createGitDeployment,
|
|
87
87
|
createGitProject,
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
resolveVercelApiAuth,
|
|
101
101
|
secretsPath as secretsPath3,
|
|
102
102
|
upsertProjectEnv
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-ZTSVY3YL.js";
|
|
104
104
|
import {
|
|
105
105
|
agentSpecsForCloud,
|
|
106
106
|
baseFreshnessFromFingerprints,
|
|
@@ -113,7 +113,7 @@ import {
|
|
|
113
113
|
probeCloudCheckpoint,
|
|
114
114
|
resolveCloudCheckpoint,
|
|
115
115
|
seedAgentVolumesIfFresh
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-3BR63LCB.js";
|
|
117
117
|
import {
|
|
118
118
|
ALL_CONNECTORS,
|
|
119
119
|
BOX_STATUS_EVENT,
|
|
@@ -263,7 +263,7 @@ import {
|
|
|
263
263
|
waitForTmuxPaneContent,
|
|
264
264
|
warmUpClaudeCredentials,
|
|
265
265
|
writeJob
|
|
266
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-3PSRBK24.js";
|
|
267
267
|
import {
|
|
268
268
|
BUILT_IN_DEFAULTS,
|
|
269
269
|
CLOUD_PROVIDER_NAMES,
|
|
@@ -286,10 +286,11 @@ import {
|
|
|
286
286
|
registerProject,
|
|
287
287
|
resolveBoxImage,
|
|
288
288
|
resolveBoxSize,
|
|
289
|
+
resolveDaytonaClass,
|
|
289
290
|
resolveDefaultCheckpoint,
|
|
290
291
|
setConfigValue,
|
|
291
292
|
unsetConfigValue
|
|
292
|
-
} from "./chunk-
|
|
293
|
+
} from "./chunk-5F5SOSDY.js";
|
|
293
294
|
import {
|
|
294
295
|
AmbiguousBoxError,
|
|
295
296
|
BoxNotFoundError,
|
|
@@ -368,7 +369,7 @@ import {
|
|
|
368
369
|
toSyncKind,
|
|
369
370
|
transportSettingsTarget,
|
|
370
371
|
upsertClaudeSshConfig
|
|
371
|
-
} from "./chunk-
|
|
372
|
+
} from "./chunk-4LS2TOF3.js";
|
|
372
373
|
import "./chunk-G3H2L3O2.js";
|
|
373
374
|
import {
|
|
374
375
|
__export,
|
|
@@ -376,8 +377,8 @@ import {
|
|
|
376
377
|
} from "./chunk-WJFZJZIM.js";
|
|
377
378
|
|
|
378
379
|
// src/version.ts
|
|
379
|
-
var AGENTBOX_VERSION = true ? "0.
|
|
380
|
-
var AGENTBOX_COMMIT = true ? "
|
|
380
|
+
var AGENTBOX_VERSION = true ? "0.25.1" : "0.0.0-dev";
|
|
381
|
+
var AGENTBOX_COMMIT = true ? "e7696959f" : "dev";
|
|
381
382
|
|
|
382
383
|
// src/index.ts
|
|
383
384
|
import { existsSync as _existsSync } from "fs";
|
|
@@ -1902,6 +1903,12 @@ function cloudSizingProviderOptions(providerName, cfg, flags = {}) {
|
|
|
1902
1903
|
if (providerName === "e2b") {
|
|
1903
1904
|
out.timeoutMs = cfg.box.e2bTimeoutMs;
|
|
1904
1905
|
}
|
|
1906
|
+
if (providerName === "daytona") {
|
|
1907
|
+
out.timeoutMs = cfg.box.daytonaTimeoutMs;
|
|
1908
|
+
out.sandboxClass = resolveDaytonaClass(cfg);
|
|
1909
|
+
const region = (cfg.box.daytonaRegion ?? "").trim();
|
|
1910
|
+
if (region.length > 0) out.location = region;
|
|
1911
|
+
}
|
|
1905
1912
|
return out;
|
|
1906
1913
|
}
|
|
1907
1914
|
|
|
@@ -3880,7 +3887,7 @@ async function evaluateCheckpoint(provider, projectRoot, ref) {
|
|
|
3880
3887
|
}
|
|
3881
3888
|
async function evaluateBaseFreshness(provider, claudeInstall) {
|
|
3882
3889
|
if (provider === "docker") {
|
|
3883
|
-
const { evaluateDockerBaseFreshness: evaluateDockerBaseFreshness2 } = await import("./dist-
|
|
3890
|
+
const { evaluateDockerBaseFreshness: evaluateDockerBaseFreshness2 } = await import("./dist-SN6ABGMD.js");
|
|
3884
3891
|
return await evaluateDockerBaseFreshness2({ claudeInstall });
|
|
3885
3892
|
}
|
|
3886
3893
|
const stored = currentCloudBaseFingerprint(provider);
|
|
@@ -4141,7 +4148,7 @@ async function renderDocker(status) {
|
|
|
4141
4148
|
}
|
|
4142
4149
|
async function daytonaStatus() {
|
|
4143
4150
|
try {
|
|
4144
|
-
const mod = await import("./dist-
|
|
4151
|
+
const mod = await import("./dist-5G42NFOG.js");
|
|
4145
4152
|
return await mod.getDaytonaStatus();
|
|
4146
4153
|
} catch (err) {
|
|
4147
4154
|
return {
|
|
@@ -4152,7 +4159,7 @@ async function daytonaStatus() {
|
|
|
4152
4159
|
}
|
|
4153
4160
|
async function e2bStatus() {
|
|
4154
4161
|
try {
|
|
4155
|
-
const mod = await import("./dist-
|
|
4162
|
+
const mod = await import("./dist-MEK44IS5.js");
|
|
4156
4163
|
const cred = mod.readE2bCredStatus();
|
|
4157
4164
|
if (cred.auth === "none") {
|
|
4158
4165
|
return { configured: false, reason: "not configured \u2014 run `agentbox e2b login`" };
|
|
@@ -4250,6 +4257,10 @@ async function showStatus(opts) {
|
|
|
4250
4257
|
}
|
|
4251
4258
|
process.stdout.write(lines.join("\n") + "\n");
|
|
4252
4259
|
}
|
|
4260
|
+
function resolvePrepareLocation(providerName, cliLocation, effective) {
|
|
4261
|
+
const configured = providerName === "hetzner" ? effective?.box.hetznerLocation : providerName === "digitalocean" ? effective?.box.digitaloceanRegion : providerName === "daytona" ? effective?.box.daytonaRegion : void 0;
|
|
4262
|
+
return cliLocation?.trim() || configured || void 0;
|
|
4263
|
+
}
|
|
4253
4264
|
async function runPrepare(providerName, opts = {}) {
|
|
4254
4265
|
if (!isKnownProvider(providerName)) {
|
|
4255
4266
|
process.stderr.write(
|
|
@@ -4270,10 +4281,11 @@ async function runPrepare(providerName, opts = {}) {
|
|
|
4270
4281
|
}
|
|
4271
4282
|
const cwd = opts.cwd ?? process.cwd();
|
|
4272
4283
|
const cfg = await loadEffectiveConfig(cwd).catch(() => null);
|
|
4273
|
-
const registry = providerName === "docker" ? cfg?.effective.box.imageRegistry : void 0;
|
|
4284
|
+
const registry = providerName === "docker" || providerName === "daytona" ? cfg?.effective.box.imageRegistry : void 0;
|
|
4274
4285
|
const claudeInstall = opts.claudeInstall ?? cfg?.effective.box.claudeInstall ?? "native";
|
|
4275
|
-
const
|
|
4276
|
-
const
|
|
4286
|
+
const sandboxClass = providerName === "daytona" && cfg ? resolveDaytonaClass(cfg.effective) : void 0;
|
|
4287
|
+
const vmBaseImage = providerName === "daytona" ? cfg?.effective.box.daytonaVmBaseImage || void 0 : void 0;
|
|
4288
|
+
const location = resolvePrepareLocation(providerName, opts.location, cfg?.effective);
|
|
4277
4289
|
const size = opts.size?.trim() || (cfg ? resolveBoxSize(cfg.effective, providerName) : "") || void 0;
|
|
4278
4290
|
const sp = spinner4();
|
|
4279
4291
|
sp.start(`preparing ${providerName}\u2026`);
|
|
@@ -4287,6 +4299,8 @@ async function runPrepare(providerName, opts = {}) {
|
|
|
4287
4299
|
claudeInstall,
|
|
4288
4300
|
location,
|
|
4289
4301
|
size,
|
|
4302
|
+
sandboxClass,
|
|
4303
|
+
vmBaseImage,
|
|
4290
4304
|
onLog: (line) => sp.message(line.slice(0, 80))
|
|
4291
4305
|
});
|
|
4292
4306
|
if (result.snapshotName !== void 0) {
|
|
@@ -5383,7 +5397,13 @@ var claudeCommand = new Command5("claude").description("Create a sandboxed box a
|
|
|
5383
5397
|
workspacePath: opts.workspace,
|
|
5384
5398
|
name: opts.name,
|
|
5385
5399
|
checkpointRef: effectiveCheckpointRef,
|
|
5386
|
-
|
|
5400
|
+
// `resolveBoxImage`, not the bare `box.image`: `agentbox prepare` pins
|
|
5401
|
+
// its baked base into the PER-PROVIDER key (`box.imageDaytona`, …), and
|
|
5402
|
+
// only this resolver reads it. Passing the generic key handed the
|
|
5403
|
+
// provider the default sentinel instead of the snapshot — so a daytona
|
|
5404
|
+
// box ignored the base that had just been baked for it (and, on the
|
|
5405
|
+
// linux-vm class, failed outright: a VM can only boot from a snapshot).
|
|
5406
|
+
image: resolveBoxImage(cfg.effective, providerName),
|
|
5387
5407
|
withPlaywright,
|
|
5388
5408
|
withEnv: cfg.effective.box.withEnv,
|
|
5389
5409
|
envFilesToImport: wiz.envFilesToImport,
|
|
@@ -5456,7 +5476,7 @@ var claudeCommand = new Command5("claude").description("Create a sandboxed box a
|
|
|
5456
5476
|
fromBranch,
|
|
5457
5477
|
useBranch,
|
|
5458
5478
|
resyncOnStart: opts.resync,
|
|
5459
|
-
image: cfg.effective
|
|
5479
|
+
image: resolveBoxImage(cfg.effective, providerName),
|
|
5460
5480
|
claudeConfig: { isolate: cfg.effective.box.isolateClaudeConfig },
|
|
5461
5481
|
claudeEnv: resolved.env,
|
|
5462
5482
|
withPlaywright,
|
|
@@ -6432,7 +6452,7 @@ var codexCommand = new Command6("codex").description("Create a sandboxed box and
|
|
|
6432
6452
|
workspacePath: opts.workspace,
|
|
6433
6453
|
name: opts.name,
|
|
6434
6454
|
checkpointRef,
|
|
6435
|
-
image: cfg.effective
|
|
6455
|
+
image: resolveBoxImage(cfg.effective, providerName),
|
|
6436
6456
|
withPlaywright,
|
|
6437
6457
|
withEnv: cfg.effective.box.withEnv,
|
|
6438
6458
|
carry: carryEntries,
|
|
@@ -6500,7 +6520,7 @@ var codexCommand = new Command6("codex").description("Create a sandboxed box and
|
|
|
6500
6520
|
fromBranch,
|
|
6501
6521
|
useBranch,
|
|
6502
6522
|
resyncOnStart: opts.resync,
|
|
6503
|
-
image: cfg.effective
|
|
6523
|
+
image: resolveBoxImage(cfg.effective, providerName),
|
|
6504
6524
|
codexConfig: { isolate: cfg.effective.box.isolateCodexConfig },
|
|
6505
6525
|
withPlaywright,
|
|
6506
6526
|
withEnv: cfg.effective.box.withEnv,
|
|
@@ -7269,7 +7289,7 @@ var opencodeCommand = new Command7("opencode").description("Create a sandboxed b
|
|
|
7269
7289
|
workspacePath: opts.workspace,
|
|
7270
7290
|
name: opts.name,
|
|
7271
7291
|
checkpointRef,
|
|
7272
|
-
image: cfg.effective
|
|
7292
|
+
image: resolveBoxImage(cfg.effective, providerName),
|
|
7273
7293
|
withPlaywright,
|
|
7274
7294
|
withEnv: cfg.effective.box.withEnv,
|
|
7275
7295
|
carry: carryEntries,
|
|
@@ -7321,7 +7341,7 @@ var opencodeCommand = new Command7("opencode").description("Create a sandboxed b
|
|
|
7321
7341
|
fromBranch,
|
|
7322
7342
|
useBranch,
|
|
7323
7343
|
resyncOnStart: opts.resync,
|
|
7324
|
-
image: cfg.effective
|
|
7344
|
+
image: resolveBoxImage(cfg.effective, providerName),
|
|
7325
7345
|
opencodeConfig: { isolate: cfg.effective.box.isolateOpencodeConfig },
|
|
7326
7346
|
withPlaywright,
|
|
7327
7347
|
withEnv: cfg.effective.box.withEnv,
|
|
@@ -7793,7 +7813,7 @@ var createSub = new Command9("create").description("Capture a box state as a pro
|
|
|
7793
7813
|
).option("--name <name>", "checkpoint name (default: <box-name>-<next>)").option("--merged", "flatten lower+upper into one tree instead of a layered delta").option("--set-default", "mark this checkpoint as the project default for new boxes").option(
|
|
7794
7814
|
"--replace",
|
|
7795
7815
|
"if a checkpoint with the same name exists, rm it first (idempotent recapture; safe to retry when the previous run's stdout was lost)"
|
|
7796
|
-
).option("-y, --yes", 'skip the vercel "box will reboot" confirmation prompt').action(async (idOrName, opts) => {
|
|
7816
|
+
).option("-y, --yes", 'skip the vercel/daytona "box will reboot" confirmation prompt').action(async (idOrName, opts) => {
|
|
7797
7817
|
try {
|
|
7798
7818
|
const box = await resolveBoxOrExit(idOrName);
|
|
7799
7819
|
const providerName = box.provider ?? "docker";
|
|
@@ -8102,9 +8122,10 @@ async function runCloudCheckpointCreate(box, opts) {
|
|
|
8102
8122
|
if (!provider.checkpoint) {
|
|
8103
8123
|
throw new Error(`provider '${box.provider ?? "docker"}' doesn't support checkpoints`);
|
|
8104
8124
|
}
|
|
8105
|
-
|
|
8125
|
+
const providerName = box.provider ?? "docker";
|
|
8126
|
+
if ((providerName === "vercel" || providerName === "daytona") && !opts.yes && process.stdin.isTTY) {
|
|
8106
8127
|
const ok = await confirm({
|
|
8107
|
-
message:
|
|
8128
|
+
message: `Create checkpoint? The ${providerName} box will stop and reboot.`,
|
|
8108
8129
|
initialValue: false
|
|
8109
8130
|
});
|
|
8110
8131
|
if (!ok) {
|
|
@@ -9413,7 +9434,7 @@ var createCommand = new Command14("create").description(
|
|
|
9413
9434
|
}
|
|
9414
9435
|
outro7("done");
|
|
9415
9436
|
if (attachClaudeAfter) {
|
|
9416
|
-
const { cloudAgentAttach: cloudAgentAttach2 } = await import("./_cloud-attach-
|
|
9437
|
+
const { cloudAgentAttach: cloudAgentAttach2 } = await import("./_cloud-attach-FGMI2ZHO.js");
|
|
9417
9438
|
await cloudAgentAttach2({
|
|
9418
9439
|
box: result.record,
|
|
9419
9440
|
binary: "claude",
|
|
@@ -9752,6 +9773,8 @@ function bgSpec(c) {
|
|
|
9752
9773
|
}
|
|
9753
9774
|
var MOUSE_ENABLE_SEQ = "\x1B[?1000h\x1B[?1002h\x1B[?1006h";
|
|
9754
9775
|
var MOUSE_MODES = [1e3, 1002, 1003, 1005, 1006, 1015];
|
|
9776
|
+
var INITIAL_INPUT_SETTLE_MS = 400;
|
|
9777
|
+
var INITIAL_INPUT_DEADLINE_MS = 3e3;
|
|
9755
9778
|
var MOUSE_DISABLE_SEQ = MOUSE_MODES.map((n) => `\x1B[?${String(n)}l`).join("");
|
|
9756
9779
|
var EXT_KEYS_ENABLE_SEQ = "\x1B[>4;1m";
|
|
9757
9780
|
var EXT_KEYS_DISABLE_SEQ = "\x1B[>4m";
|
|
@@ -9788,10 +9811,15 @@ var PtySession = class {
|
|
|
9788
9811
|
pty;
|
|
9789
9812
|
cleanup;
|
|
9790
9813
|
disposed = false;
|
|
9814
|
+
/** Staged command for transports that can't take one as an argument — see `armInitialInput`. */
|
|
9815
|
+
initialInput;
|
|
9816
|
+
initialInputArmed = false;
|
|
9817
|
+
initialInputSent = false;
|
|
9818
|
+
initialInputDeadline;
|
|
9791
9819
|
// Reused per cell read — valid only until the next cell() call (the renderer
|
|
9792
9820
|
// consumes it synchronously within composeRow).
|
|
9793
9821
|
out = { ...BLANK };
|
|
9794
|
-
constructor(spawn12, TerminalClass, boxId, keepAlive, mode, command, args, cols, rows, onRenderable, onExit, cleanup, env) {
|
|
9822
|
+
constructor(spawn12, TerminalClass, boxId, keepAlive, mode, command, args, cols, rows, onRenderable, onExit, cleanup, env, initialInput) {
|
|
9795
9823
|
this.boxId = boxId;
|
|
9796
9824
|
this.keepAlive = keepAlive;
|
|
9797
9825
|
this.mode = mode;
|
|
@@ -9816,6 +9844,7 @@ var PtySession = class {
|
|
|
9816
9844
|
this.term.write(d, () => {
|
|
9817
9845
|
if (this.active) onRenderable();
|
|
9818
9846
|
});
|
|
9847
|
+
this.armInitialInput();
|
|
9819
9848
|
});
|
|
9820
9849
|
this.term.onData((d) => {
|
|
9821
9850
|
if (!this.disposed) this.pty.write(d);
|
|
@@ -9823,6 +9852,36 @@ var PtySession = class {
|
|
|
9823
9852
|
this.pty.onExit(() => {
|
|
9824
9853
|
if (!this.disposed) onExit(this.boxId);
|
|
9825
9854
|
});
|
|
9855
|
+
this.initialInput = initialInput;
|
|
9856
|
+
if (initialInput) {
|
|
9857
|
+
this.initialInputDeadline = setTimeout(
|
|
9858
|
+
() => this.sendInitialInput(),
|
|
9859
|
+
INITIAL_INPUT_DEADLINE_MS
|
|
9860
|
+
);
|
|
9861
|
+
this.initialInputDeadline.unref?.();
|
|
9862
|
+
}
|
|
9863
|
+
}
|
|
9864
|
+
/**
|
|
9865
|
+
* Type the staged command once the remote shell is at a prompt.
|
|
9866
|
+
*
|
|
9867
|
+
* Writing at spawn loses the race: the bytes reach the shell while it's still
|
|
9868
|
+
* starting, its line editor hasn't taken over the tty yet, and the trailing
|
|
9869
|
+
* newline is swallowed — leaving the command on a `>` continuation prompt
|
|
9870
|
+
* instead of running. So we wait for the shell's first output plus a short
|
|
9871
|
+
* settle. Mirrors `runWrappedAttach`; the two paths must agree, or a daytona
|
|
9872
|
+
* box that attaches from the CLI fails from the dashboard.
|
|
9873
|
+
*/
|
|
9874
|
+
armInitialInput() {
|
|
9875
|
+
if (!this.initialInput || this.initialInputSent || this.initialInputArmed) return;
|
|
9876
|
+
this.initialInputArmed = true;
|
|
9877
|
+
const t = setTimeout(() => this.sendInitialInput(), INITIAL_INPUT_SETTLE_MS);
|
|
9878
|
+
t.unref?.();
|
|
9879
|
+
}
|
|
9880
|
+
sendInitialInput() {
|
|
9881
|
+
if (!this.initialInput || this.initialInputSent || this.disposed) return;
|
|
9882
|
+
this.initialInputSent = true;
|
|
9883
|
+
if (this.initialInputDeadline) clearTimeout(this.initialInputDeadline);
|
|
9884
|
+
this.pty.write(this.initialInput);
|
|
9826
9885
|
}
|
|
9827
9886
|
write(bytes) {
|
|
9828
9887
|
if (!this.disposed) this.pty.write(bytes.toString("utf8"));
|
|
@@ -10305,7 +10364,8 @@ var Compositor = class {
|
|
|
10305
10364
|
() => this.scheduleRender(),
|
|
10306
10365
|
(id) => this.onSessionExit(id),
|
|
10307
10366
|
target.cleanup,
|
|
10308
|
-
target.env
|
|
10367
|
+
target.env,
|
|
10368
|
+
target.initialInput
|
|
10309
10369
|
);
|
|
10310
10370
|
if (keepAlive) {
|
|
10311
10371
|
const prev = this.liveSessions.get(boxId);
|
|
@@ -11093,6 +11153,7 @@ var dashboardCommand = new Command15("dashboard").description("Box list + the se
|
|
|
11093
11153
|
command: spec.argv[0],
|
|
11094
11154
|
args: spec.argv.slice(1),
|
|
11095
11155
|
...spec.env ? { env: spec.env } : {},
|
|
11156
|
+
...spec.initialInput ? { initialInput: spec.initialInput } : {},
|
|
11096
11157
|
...spec.cleanup ? { cleanup: spec.cleanup } : {},
|
|
11097
11158
|
mode: which,
|
|
11098
11159
|
...providerSupportsKeepAlive(record.provider) ? { keepAlive: true } : {}
|
|
@@ -11199,7 +11260,7 @@ var dashboardCommand = new Command15("dashboard").description("Box list + the se
|
|
|
11199
11260
|
workspacePath: project.root,
|
|
11200
11261
|
useSnapshot: cfg.effective.box.hostSnapshot ?? true,
|
|
11201
11262
|
checkpointRef,
|
|
11202
|
-
image: cfg.effective
|
|
11263
|
+
image: resolveBoxImage(cfg.effective, "docker"),
|
|
11203
11264
|
claudeConfig: { isolate: cfg.effective.box.isolateClaudeConfig },
|
|
11204
11265
|
claudeEnv: auth.env,
|
|
11205
11266
|
// Pass the agent's config so createBox mounts + syncs its volume
|
|
@@ -15910,8 +15971,12 @@ var pauseCommand = new Command41("pause").description(
|
|
|
15910
15971
|
`);
|
|
15911
15972
|
} else {
|
|
15912
15973
|
await (await providerForBox(box)).pause(box);
|
|
15913
|
-
|
|
15914
|
-
|
|
15974
|
+
const frozen = box.cloud?.sandboxClass === "linux-vm";
|
|
15975
|
+
process.stdout.write(
|
|
15976
|
+
frozen ? `paused ${box.name} (${box.provider} VM frozen \u2014 memory and running processes preserved)
|
|
15977
|
+
` : `paused ${box.name} (${box.provider} sandbox archived)
|
|
15978
|
+
`
|
|
15979
|
+
);
|
|
15915
15980
|
}
|
|
15916
15981
|
} catch (err) {
|
|
15917
15982
|
handleLifecycleError(err);
|
|
@@ -17381,7 +17446,7 @@ var unsetUrlSub = new Command48("unset-url").description("Stop using a control p
|
|
|
17381
17446
|
});
|
|
17382
17447
|
var statusSub4 = new Command48("status").description("Check whether the configured control plane is reachable").option("--url <url>", "override the control-plane URL (default: relay.controlPlaneUrl)").option("--json", "emit JSON").action(async (opts) => {
|
|
17383
17448
|
try {
|
|
17384
|
-
const { loadEffectiveConfig: loadEffectiveConfig2 } = await import("./dist-
|
|
17449
|
+
const { loadEffectiveConfig: loadEffectiveConfig2 } = await import("./dist-SBDYDH7H.js");
|
|
17385
17450
|
const cfg = await loadEffectiveConfig2(process.cwd());
|
|
17386
17451
|
const url = (opts.url ?? cfg.effective.relay.controlPlaneUrl ?? "").replace(/\/$/, "");
|
|
17387
17452
|
if (!url) {
|
|
@@ -17718,7 +17783,7 @@ async function runDockerJob(job, log67, onBoxCreated) {
|
|
|
17718
17783
|
fromBranch: opts.fromBranch,
|
|
17719
17784
|
useSnapshot,
|
|
17720
17785
|
checkpointRef,
|
|
17721
|
-
image: cfg.effective
|
|
17786
|
+
image: resolveBoxImage(cfg.effective, providerName),
|
|
17722
17787
|
claudeConfig: !job.noAgent && job.agent === "claude-code" ? { isolate: cfg.effective.box.isolateClaudeConfig } : void 0,
|
|
17723
17788
|
codexConfig: !job.noAgent && job.agent === "codex" ? { isolate: cfg.effective.box.isolateCodexConfig } : void 0,
|
|
17724
17789
|
opencodeConfig: !job.noAgent && job.agent === "opencode" ? { isolate: cfg.effective.box.isolateOpencodeConfig } : void 0,
|
|
@@ -17840,7 +17905,7 @@ async function runCloudJob(job, log67, onBoxCreated) {
|
|
|
17840
17905
|
// `--branch` accepts branch/tag names but not SHAs; absent → HEAD.
|
|
17841
17906
|
fromBranch: opts.fromBranch,
|
|
17842
17907
|
checkpointRef,
|
|
17843
|
-
image: cfg.effective
|
|
17908
|
+
image: resolveBoxImage(cfg.effective, providerName),
|
|
17844
17909
|
withPlaywright,
|
|
17845
17910
|
withEnv: cfg.effective.box.withEnv,
|
|
17846
17911
|
vnc: { enabled: cfg.effective.box.vnc },
|
|
@@ -18725,7 +18790,7 @@ var servicesCommand = new Command56("services").description("List and restart a
|
|
|
18725
18790
|
|
|
18726
18791
|
// src/commands/shell.ts
|
|
18727
18792
|
import { spawnSync as spawnSync8 } from "child_process";
|
|
18728
|
-
import { log as log61 } from "@clack/prompts";
|
|
18793
|
+
import { log as log61, spinner as spinner14 } from "@clack/prompts";
|
|
18729
18794
|
import { Command as Command57 } from "commander";
|
|
18730
18795
|
|
|
18731
18796
|
// src/commands/_provider-guard.ts
|
|
@@ -18910,7 +18975,7 @@ var shellCommand = new Command57("shell").description(
|
|
|
18910
18975
|
"write a ~/.ssh/config alias for this box (Hetzner cloud boxes) and print connection details for Codex / Claude desktop, instead of opening a shell"
|
|
18911
18976
|
).option("--json", "with --ssh-config: emit the connection details as JSON").action(async (idOrName, cmd, opts) => {
|
|
18912
18977
|
try {
|
|
18913
|
-
|
|
18978
|
+
let { box, shifted } = await resolveBoxOrShift(idOrName);
|
|
18914
18979
|
const effectiveCmd = shifted && idOrName ? [idOrName, ...cmd] : cmd;
|
|
18915
18980
|
if (opts.sshConfig) {
|
|
18916
18981
|
await runSshConfig(box, opts);
|
|
@@ -18925,6 +18990,16 @@ var shellCommand = new Command57("shell").description(
|
|
|
18925
18990
|
if ((box.provider ?? "docker") !== "docker") {
|
|
18926
18991
|
const provider = await providerForBox(box);
|
|
18927
18992
|
const oneShot = effectiveCmd.length > 0;
|
|
18993
|
+
const state = await provider.probeState(box);
|
|
18994
|
+
if (state === "missing") {
|
|
18995
|
+
throw new Error(`cloud sandbox for ${box.name} is missing; was it destroyed?`);
|
|
18996
|
+
}
|
|
18997
|
+
if (state !== "running") {
|
|
18998
|
+
const s = spinner14();
|
|
18999
|
+
s.start(state === "paused" ? "resuming box" : "starting box");
|
|
19000
|
+
box = await provider.start(box);
|
|
19001
|
+
s.stop("box running");
|
|
19002
|
+
}
|
|
18928
19003
|
if (oneShot) {
|
|
18929
19004
|
const argv2 = oneShotBashArgv(effectiveCmd, login);
|
|
18930
19005
|
const r = await provider.exec(box, argv2, { user });
|
|
@@ -18950,6 +19025,7 @@ var shellCommand = new Command57("shell").description(
|
|
|
18950
19025
|
command: spec.argv[0],
|
|
18951
19026
|
dockerArgv: spec.argv.slice(1),
|
|
18952
19027
|
env: spec.env,
|
|
19028
|
+
initialInput: spec.initialInput,
|
|
18953
19029
|
relayBaseUrl: RELAY_HOST_URL5,
|
|
18954
19030
|
boxId: box.id,
|
|
18955
19031
|
boxName: box.name,
|