@madarco/agentbox 0.24.5 → 0.25.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 +70 -0
- package/LICENSE +21 -0
- package/README.md +4 -0
- package/dist/{_cloud-attach-ESCPOKG5.js → _cloud-attach-W2CFNXKO.js} +5 -5
- package/dist/{chunk-RFRWS5CD.js → chunk-4UNSBU5R.js} +2 -2
- package/dist/{chunk-H6A4BQMG.js → chunk-5F5SOSDY.js} +40 -1
- package/dist/chunk-5F5SOSDY.js.map +1 -0
- package/dist/{chunk-7DPDUZ7L.js → chunk-7C5MOA4Z.js} +194 -56
- package/dist/chunk-7C5MOA4Z.js.map +1 -0
- package/dist/{chunk-LJMGHFLZ.js → chunk-7PRLM3PH.js} +3 -3
- package/dist/chunk-G3H2L3O2.js +0 -0
- package/dist/{chunk-4HPLS5HJ.js → chunk-GHFIKSBJ.js} +110 -9
- package/dist/chunk-GHFIKSBJ.js.map +1 -0
- package/dist/{chunk-5JDOTQTM.js → chunk-LCZOQTIX.js} +4 -4
- package/dist/{chunk-QHISF6O6.js → chunk-LU3WAHTU.js} +3 -3
- package/dist/{chunk-CE3S7UDQ.js → chunk-NH3W6HUZ.js} +44 -12
- package/dist/chunk-NH3W6HUZ.js.map +1 -0
- package/dist/{chunk-OSPM4Q5V.js → chunk-VZC5J44U.js} +5 -5
- package/dist/chunk-VZC5J44U.js.map +1 -0
- package/dist/chunk-WJFZJZIM.js +0 -0
- package/dist/{chunk-3MDYQROX.js → chunk-Y3OPQWAQ.js} +11 -11
- package/dist/chunk-Y3OPQWAQ.js.map +1 -0
- package/dist/cloud-poller-SUNA6ZQC-7M5LJHHE.js +0 -0
- package/dist/{dist-TRKHS6I7.js → dist-3V5SLNK4.js} +6 -6
- package/dist/{dist-NOUPH5E6.js → dist-BIDAC4H4.js} +4 -4
- package/dist/{dist-VFPT5TDH.js → dist-I5OBPLP2.js} +6 -6
- package/dist/{dist-3M53BF4E.js → dist-IGQNVIV3.js} +6 -6
- package/dist/dist-KL73Z37T.js +677 -0
- package/dist/dist-KL73Z37T.js.map +1 -0
- package/dist/{dist-HPPHBZTO.js → dist-SBDYDH7H.js} +8 -2
- package/dist/{dist-FGXCG4JY.js → dist-UB3PYSCG.js} +6 -6
- package/dist/index.js +146 -54
- package/dist/index.js.map +1 -1
- package/dist/{prepared-state-BUO75YLZ-46W2PAHH.js → prepared-state-OBM2F7CU-DY7TZV4R.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-OF242BLD.js → chunk-CKBHQ7OI.js} +1 -1
- package/runtime/hub/apps/hub/{chunk-PROXBLRJ.js → chunk-JLG5JJXD.js} +1 -1
- package/runtime/hub/apps/hub/{chunk-EY6HEDTK.js → chunk-LNHPLR3L.js} +11 -11
- package/runtime/hub/apps/hub/{chunk-DNR2YM2G.js → chunk-MA73PTOR.js} +57 -9
- package/runtime/hub/apps/hub/{chunk-TZFWAJVB.js → chunk-OG4KH2FZ.js} +5 -0
- package/runtime/hub/apps/hub/{chunk-5KMJIVZC.js → chunk-QBJOF5D3.js} +111 -10
- package/runtime/hub/apps/hub/chunk-QYJ37CUJ.js +62140 -0
- 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-YCRESLWD.js → dist-26KVXHXV.js} +7 -7
- package/runtime/hub/apps/hub/{dist-SX2NXGI6.js → dist-7LB4D4ZQ.js} +7 -7
- package/runtime/hub/apps/hub/{dist-M73U3ZDH.js → dist-ERQDDSOY.js} +7 -7
- package/runtime/hub/apps/hub/{dist-NTKPAYA3.js → dist-IZ2JCN5R.js} +8 -2
- package/runtime/hub/apps/hub/{dist-3DCKZYID.js → dist-SIQJD72C.js} +596 -113
- package/runtime/hub/apps/hub/{dist-RSWTJWRN.js → dist-YZJA4WRV.js} +5 -5
- package/runtime/hub/apps/hub/{dist-KV5ESR24.js → dist-ZVY2FWG6.js} +7 -7
- 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-OBM2F7CU-ZEYFNYFI.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-W2CFNXKO.js.map} +0 -0
- /package/dist/{chunk-RFRWS5CD.js.map → chunk-4UNSBU5R.js.map} +0 -0
- /package/dist/{chunk-LJMGHFLZ.js.map → chunk-7PRLM3PH.js.map} +0 -0
- /package/dist/{chunk-5JDOTQTM.js.map → chunk-LCZOQTIX.js.map} +0 -0
- /package/dist/{chunk-QHISF6O6.js.map → chunk-LU3WAHTU.js.map} +0 -0
- /package/dist/{dist-HPPHBZTO.js.map → dist-3V5SLNK4.js.map} +0 -0
- /package/dist/{dist-NOUPH5E6.js.map → dist-BIDAC4H4.js.map} +0 -0
- /package/dist/{dist-TRKHS6I7.js.map → dist-I5OBPLP2.js.map} +0 -0
- /package/dist/{dist-3M53BF4E.js.map → dist-IGQNVIV3.js.map} +0 -0
- /package/dist/{dist-VFPT5TDH.js.map → dist-SBDYDH7H.js.map} +0 -0
- /package/dist/{dist-FGXCG4JY.js.map → dist-UB3PYSCG.js.map} +0 -0
- /package/dist/{prepared-state-BUO75YLZ-46W2PAHH.js.map → prepared-state-OBM2F7CU-DY7TZV4R.js.map} +0 -0
- /package/runtime/hub/apps/hub/.next/static/{43_nml7FKErUxJXpspAhb → c82uDoByt-dPQUHilRojD}/_buildManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{43_nml7FKErUxJXpspAhb → c82uDoByt-dPQUHilRojD}/_clientMiddlewareManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{43_nml7FKErUxJXpspAhb → c82uDoByt-dPQUHilRojD}/_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-4UNSBU5R.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-7PRLM3PH.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-NH3W6HUZ.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-7C5MOA4Z.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-LCZOQTIX.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-LU3WAHTU.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-GHFIKSBJ.js";
|
|
117
117
|
import {
|
|
118
118
|
ALL_CONNECTORS,
|
|
119
119
|
BOX_STATUS_EVENT,
|
|
@@ -221,7 +221,6 @@ import {
|
|
|
221
221
|
registerBoxWithRelay,
|
|
222
222
|
rehydrateRelayRegistry,
|
|
223
223
|
removeCheckpoint,
|
|
224
|
-
removeImage,
|
|
225
224
|
renderPortsTable,
|
|
226
225
|
renderStatusTable,
|
|
227
226
|
renderTaskTable,
|
|
@@ -264,7 +263,7 @@ import {
|
|
|
264
263
|
waitForTmuxPaneContent,
|
|
265
264
|
warmUpClaudeCredentials,
|
|
266
265
|
writeJob
|
|
267
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-VZC5J44U.js";
|
|
268
267
|
import {
|
|
269
268
|
BUILT_IN_DEFAULTS,
|
|
270
269
|
CLOUD_PROVIDER_NAMES,
|
|
@@ -287,10 +286,11 @@ import {
|
|
|
287
286
|
registerProject,
|
|
288
287
|
resolveBoxImage,
|
|
289
288
|
resolveBoxSize,
|
|
289
|
+
resolveDaytonaClass,
|
|
290
290
|
resolveDefaultCheckpoint,
|
|
291
291
|
setConfigValue,
|
|
292
292
|
unsetConfigValue
|
|
293
|
-
} from "./chunk-
|
|
293
|
+
} from "./chunk-5F5SOSDY.js";
|
|
294
294
|
import {
|
|
295
295
|
AmbiguousBoxError,
|
|
296
296
|
BoxNotFoundError,
|
|
@@ -321,6 +321,7 @@ import {
|
|
|
321
321
|
ensureCloudSshAlias,
|
|
322
322
|
ensureImage,
|
|
323
323
|
errSummary,
|
|
324
|
+
evaluateDockerBaseFreshness,
|
|
324
325
|
firstLine,
|
|
325
326
|
generateBoxId,
|
|
326
327
|
hasUnmanagedHostConflict,
|
|
@@ -368,7 +369,7 @@ import {
|
|
|
368
369
|
toSyncKind,
|
|
369
370
|
transportSettingsTarget,
|
|
370
371
|
upsertClaudeSshConfig
|
|
371
|
-
} from "./chunk-
|
|
372
|
+
} from "./chunk-Y3OPQWAQ.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.0" : "0.0.0-dev";
|
|
381
|
+
var AGENTBOX_COMMIT = true ? "efc97e118" : "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
|
|
|
@@ -3879,7 +3886,10 @@ async function evaluateCheckpoint(provider, projectRoot, ref) {
|
|
|
3879
3886
|
return evaluateCloudCheckpoint(provider, projectRoot, ref);
|
|
3880
3887
|
}
|
|
3881
3888
|
async function evaluateBaseFreshness(provider, claudeInstall) {
|
|
3882
|
-
if (provider === "docker")
|
|
3889
|
+
if (provider === "docker") {
|
|
3890
|
+
const { evaluateDockerBaseFreshness: evaluateDockerBaseFreshness2 } = await import("./dist-BIDAC4H4.js");
|
|
3891
|
+
return await evaluateDockerBaseFreshness2({ claudeInstall });
|
|
3892
|
+
}
|
|
3883
3893
|
const stored = currentCloudBaseFingerprint(provider);
|
|
3884
3894
|
if (!stored) return { state: "unprepared" };
|
|
3885
3895
|
const current = await currentCloudBaseFingerprintLive(provider, claudeInstall).catch(() => void 0);
|
|
@@ -4138,7 +4148,7 @@ async function renderDocker(status) {
|
|
|
4138
4148
|
}
|
|
4139
4149
|
async function daytonaStatus() {
|
|
4140
4150
|
try {
|
|
4141
|
-
const mod = await import("./dist-
|
|
4151
|
+
const mod = await import("./dist-KL73Z37T.js");
|
|
4142
4152
|
return await mod.getDaytonaStatus();
|
|
4143
4153
|
} catch (err) {
|
|
4144
4154
|
return {
|
|
@@ -4149,7 +4159,7 @@ async function daytonaStatus() {
|
|
|
4149
4159
|
}
|
|
4150
4160
|
async function e2bStatus() {
|
|
4151
4161
|
try {
|
|
4152
|
-
const mod = await import("./dist-
|
|
4162
|
+
const mod = await import("./dist-UB3PYSCG.js");
|
|
4153
4163
|
const cred = mod.readE2bCredStatus();
|
|
4154
4164
|
if (cred.auth === "none") {
|
|
4155
4165
|
return { configured: false, reason: "not configured \u2014 run `agentbox e2b login`" };
|
|
@@ -4247,6 +4257,10 @@ async function showStatus(opts) {
|
|
|
4247
4257
|
}
|
|
4248
4258
|
process.stdout.write(lines.join("\n") + "\n");
|
|
4249
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
|
+
}
|
|
4250
4264
|
async function runPrepare(providerName, opts = {}) {
|
|
4251
4265
|
if (!isKnownProvider(providerName)) {
|
|
4252
4266
|
process.stderr.write(
|
|
@@ -4267,10 +4281,11 @@ async function runPrepare(providerName, opts = {}) {
|
|
|
4267
4281
|
}
|
|
4268
4282
|
const cwd = opts.cwd ?? process.cwd();
|
|
4269
4283
|
const cfg = await loadEffectiveConfig(cwd).catch(() => null);
|
|
4270
|
-
const registry = providerName === "docker" ? cfg?.effective.box.imageRegistry : void 0;
|
|
4284
|
+
const registry = providerName === "docker" || providerName === "daytona" ? cfg?.effective.box.imageRegistry : void 0;
|
|
4271
4285
|
const claudeInstall = opts.claudeInstall ?? cfg?.effective.box.claudeInstall ?? "native";
|
|
4272
|
-
const
|
|
4273
|
-
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);
|
|
4274
4289
|
const size = opts.size?.trim() || (cfg ? resolveBoxSize(cfg.effective, providerName) : "") || void 0;
|
|
4275
4290
|
const sp = spinner4();
|
|
4276
4291
|
sp.start(`preparing ${providerName}\u2026`);
|
|
@@ -4284,6 +4299,8 @@ async function runPrepare(providerName, opts = {}) {
|
|
|
4284
4299
|
claudeInstall,
|
|
4285
4300
|
location,
|
|
4286
4301
|
size,
|
|
4302
|
+
sandboxClass,
|
|
4303
|
+
vmBaseImage,
|
|
4287
4304
|
onLog: (line) => sp.message(line.slice(0, 80))
|
|
4288
4305
|
});
|
|
4289
4306
|
if (result.snapshotName !== void 0) {
|
|
@@ -5380,7 +5397,13 @@ var claudeCommand = new Command5("claude").description("Create a sandboxed box a
|
|
|
5380
5397
|
workspacePath: opts.workspace,
|
|
5381
5398
|
name: opts.name,
|
|
5382
5399
|
checkpointRef: effectiveCheckpointRef,
|
|
5383
|
-
|
|
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),
|
|
5384
5407
|
withPlaywright,
|
|
5385
5408
|
withEnv: cfg.effective.box.withEnv,
|
|
5386
5409
|
envFilesToImport: wiz.envFilesToImport,
|
|
@@ -5453,7 +5476,7 @@ var claudeCommand = new Command5("claude").description("Create a sandboxed box a
|
|
|
5453
5476
|
fromBranch,
|
|
5454
5477
|
useBranch,
|
|
5455
5478
|
resyncOnStart: opts.resync,
|
|
5456
|
-
image: cfg.effective
|
|
5479
|
+
image: resolveBoxImage(cfg.effective, providerName),
|
|
5457
5480
|
claudeConfig: { isolate: cfg.effective.box.isolateClaudeConfig },
|
|
5458
5481
|
claudeEnv: resolved.env,
|
|
5459
5482
|
withPlaywright,
|
|
@@ -6429,7 +6452,7 @@ var codexCommand = new Command6("codex").description("Create a sandboxed box and
|
|
|
6429
6452
|
workspacePath: opts.workspace,
|
|
6430
6453
|
name: opts.name,
|
|
6431
6454
|
checkpointRef,
|
|
6432
|
-
image: cfg.effective
|
|
6455
|
+
image: resolveBoxImage(cfg.effective, providerName),
|
|
6433
6456
|
withPlaywright,
|
|
6434
6457
|
withEnv: cfg.effective.box.withEnv,
|
|
6435
6458
|
carry: carryEntries,
|
|
@@ -6497,7 +6520,7 @@ var codexCommand = new Command6("codex").description("Create a sandboxed box and
|
|
|
6497
6520
|
fromBranch,
|
|
6498
6521
|
useBranch,
|
|
6499
6522
|
resyncOnStart: opts.resync,
|
|
6500
|
-
image: cfg.effective
|
|
6523
|
+
image: resolveBoxImage(cfg.effective, providerName),
|
|
6501
6524
|
codexConfig: { isolate: cfg.effective.box.isolateCodexConfig },
|
|
6502
6525
|
withPlaywright,
|
|
6503
6526
|
withEnv: cfg.effective.box.withEnv,
|
|
@@ -7266,7 +7289,7 @@ var opencodeCommand = new Command7("opencode").description("Create a sandboxed b
|
|
|
7266
7289
|
workspacePath: opts.workspace,
|
|
7267
7290
|
name: opts.name,
|
|
7268
7291
|
checkpointRef,
|
|
7269
|
-
image: cfg.effective
|
|
7292
|
+
image: resolveBoxImage(cfg.effective, providerName),
|
|
7270
7293
|
withPlaywright,
|
|
7271
7294
|
withEnv: cfg.effective.box.withEnv,
|
|
7272
7295
|
carry: carryEntries,
|
|
@@ -7318,7 +7341,7 @@ var opencodeCommand = new Command7("opencode").description("Create a sandboxed b
|
|
|
7318
7341
|
fromBranch,
|
|
7319
7342
|
useBranch,
|
|
7320
7343
|
resyncOnStart: opts.resync,
|
|
7321
|
-
image: cfg.effective
|
|
7344
|
+
image: resolveBoxImage(cfg.effective, providerName),
|
|
7322
7345
|
opencodeConfig: { isolate: cfg.effective.box.isolateOpencodeConfig },
|
|
7323
7346
|
withPlaywright,
|
|
7324
7347
|
withEnv: cfg.effective.box.withEnv,
|
|
@@ -7790,7 +7813,7 @@ var createSub = new Command9("create").description("Capture a box state as a pro
|
|
|
7790
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(
|
|
7791
7814
|
"--replace",
|
|
7792
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)"
|
|
7793
|
-
).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) => {
|
|
7794
7817
|
try {
|
|
7795
7818
|
const box = await resolveBoxOrExit(idOrName);
|
|
7796
7819
|
const providerName = box.provider ?? "docker";
|
|
@@ -8099,9 +8122,10 @@ async function runCloudCheckpointCreate(box, opts) {
|
|
|
8099
8122
|
if (!provider.checkpoint) {
|
|
8100
8123
|
throw new Error(`provider '${box.provider ?? "docker"}' doesn't support checkpoints`);
|
|
8101
8124
|
}
|
|
8102
|
-
|
|
8125
|
+
const providerName = box.provider ?? "docker";
|
|
8126
|
+
if ((providerName === "vercel" || providerName === "daytona") && !opts.yes && process.stdin.isTTY) {
|
|
8103
8127
|
const ok = await confirm({
|
|
8104
|
-
message:
|
|
8128
|
+
message: `Create checkpoint? The ${providerName} box will stop and reboot.`,
|
|
8105
8129
|
initialValue: false
|
|
8106
8130
|
});
|
|
8107
8131
|
if (!ok) {
|
|
@@ -9410,7 +9434,7 @@ var createCommand = new Command14("create").description(
|
|
|
9410
9434
|
}
|
|
9411
9435
|
outro7("done");
|
|
9412
9436
|
if (attachClaudeAfter) {
|
|
9413
|
-
const { cloudAgentAttach: cloudAgentAttach2 } = await import("./_cloud-attach-
|
|
9437
|
+
const { cloudAgentAttach: cloudAgentAttach2 } = await import("./_cloud-attach-W2CFNXKO.js");
|
|
9414
9438
|
await cloudAgentAttach2({
|
|
9415
9439
|
box: result.record,
|
|
9416
9440
|
binary: "claude",
|
|
@@ -9749,6 +9773,8 @@ function bgSpec(c) {
|
|
|
9749
9773
|
}
|
|
9750
9774
|
var MOUSE_ENABLE_SEQ = "\x1B[?1000h\x1B[?1002h\x1B[?1006h";
|
|
9751
9775
|
var MOUSE_MODES = [1e3, 1002, 1003, 1005, 1006, 1015];
|
|
9776
|
+
var INITIAL_INPUT_SETTLE_MS = 400;
|
|
9777
|
+
var INITIAL_INPUT_DEADLINE_MS = 3e3;
|
|
9752
9778
|
var MOUSE_DISABLE_SEQ = MOUSE_MODES.map((n) => `\x1B[?${String(n)}l`).join("");
|
|
9753
9779
|
var EXT_KEYS_ENABLE_SEQ = "\x1B[>4;1m";
|
|
9754
9780
|
var EXT_KEYS_DISABLE_SEQ = "\x1B[>4m";
|
|
@@ -9785,10 +9811,15 @@ var PtySession = class {
|
|
|
9785
9811
|
pty;
|
|
9786
9812
|
cleanup;
|
|
9787
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;
|
|
9788
9819
|
// Reused per cell read — valid only until the next cell() call (the renderer
|
|
9789
9820
|
// consumes it synchronously within composeRow).
|
|
9790
9821
|
out = { ...BLANK };
|
|
9791
|
-
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) {
|
|
9792
9823
|
this.boxId = boxId;
|
|
9793
9824
|
this.keepAlive = keepAlive;
|
|
9794
9825
|
this.mode = mode;
|
|
@@ -9813,6 +9844,7 @@ var PtySession = class {
|
|
|
9813
9844
|
this.term.write(d, () => {
|
|
9814
9845
|
if (this.active) onRenderable();
|
|
9815
9846
|
});
|
|
9847
|
+
this.armInitialInput();
|
|
9816
9848
|
});
|
|
9817
9849
|
this.term.onData((d) => {
|
|
9818
9850
|
if (!this.disposed) this.pty.write(d);
|
|
@@ -9820,6 +9852,36 @@ var PtySession = class {
|
|
|
9820
9852
|
this.pty.onExit(() => {
|
|
9821
9853
|
if (!this.disposed) onExit(this.boxId);
|
|
9822
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);
|
|
9823
9885
|
}
|
|
9824
9886
|
write(bytes) {
|
|
9825
9887
|
if (!this.disposed) this.pty.write(bytes.toString("utf8"));
|
|
@@ -10302,7 +10364,8 @@ var Compositor = class {
|
|
|
10302
10364
|
() => this.scheduleRender(),
|
|
10303
10365
|
(id) => this.onSessionExit(id),
|
|
10304
10366
|
target.cleanup,
|
|
10305
|
-
target.env
|
|
10367
|
+
target.env,
|
|
10368
|
+
target.initialInput
|
|
10306
10369
|
);
|
|
10307
10370
|
if (keepAlive) {
|
|
10308
10371
|
const prev = this.liveSessions.get(boxId);
|
|
@@ -11090,6 +11153,7 @@ var dashboardCommand = new Command15("dashboard").description("Box list + the se
|
|
|
11090
11153
|
command: spec.argv[0],
|
|
11091
11154
|
args: spec.argv.slice(1),
|
|
11092
11155
|
...spec.env ? { env: spec.env } : {},
|
|
11156
|
+
...spec.initialInput ? { initialInput: spec.initialInput } : {},
|
|
11093
11157
|
...spec.cleanup ? { cleanup: spec.cleanup } : {},
|
|
11094
11158
|
mode: which,
|
|
11095
11159
|
...providerSupportsKeepAlive(record.provider) ? { keepAlive: true } : {}
|
|
@@ -11196,7 +11260,7 @@ var dashboardCommand = new Command15("dashboard").description("Box list + the se
|
|
|
11196
11260
|
workspacePath: project.root,
|
|
11197
11261
|
useSnapshot: cfg.effective.box.hostSnapshot ?? true,
|
|
11198
11262
|
checkpointRef,
|
|
11199
|
-
image: cfg.effective
|
|
11263
|
+
image: resolveBoxImage(cfg.effective, "docker"),
|
|
11200
11264
|
claudeConfig: { isolate: cfg.effective.box.isolateClaudeConfig },
|
|
11201
11265
|
claudeEnv: auth.env,
|
|
11202
11266
|
// Pass the agent's config so createBox mounts + syncs its volume
|
|
@@ -13353,7 +13417,6 @@ function resolveClaudeInstall() {
|
|
|
13353
13417
|
return claudeInstallOnce;
|
|
13354
13418
|
}
|
|
13355
13419
|
async function baseFreshnessRow(name) {
|
|
13356
|
-
if (name === "docker") return null;
|
|
13357
13420
|
const status = await evaluateBaseFreshness(name, await resolveClaudeInstall()).catch(() => null);
|
|
13358
13421
|
if (!status) return null;
|
|
13359
13422
|
switch (status.state) {
|
|
@@ -14477,16 +14540,30 @@ pass \`agentbox install --skills-only --force\` to overwrite`
|
|
|
14477
14540
|
const providerGroup = await runProviderChecks(providerName);
|
|
14478
14541
|
process.stdout.write(" " + formatCompact([sysGroup, providerGroup]) + "\n");
|
|
14479
14542
|
if (process.platform === "darwin") {
|
|
14480
|
-
const
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
|
|
14487
|
-
|
|
14488
|
-
|
|
14489
|
-
|
|
14543
|
+
const installedVersion = trayInstalled() ? await readInstalledTrayVersion() : void 0;
|
|
14544
|
+
const latestVersion = trayInstalled() ? readUpdateState().remoteCheck?.trayLatestVersion ?? await fetchTrayLatestVersion() : void 0;
|
|
14545
|
+
const behind = installedVersion !== void 0 && latestVersion !== void 0 && isNewer(latestVersion, installedVersion);
|
|
14546
|
+
let action = "install";
|
|
14547
|
+
if (trayInstalled()) action = behind ? "update" : "none";
|
|
14548
|
+
if (action === "none") {
|
|
14549
|
+
prompt_exports.log.info(
|
|
14550
|
+
`Menu-bar app: already installed${installedVersion ? ` (${installedVersion})` : ""}`
|
|
14551
|
+
);
|
|
14552
|
+
} else {
|
|
14553
|
+
const message = action === "update" ? `Update the AgentBox menu-bar app (${installedVersion ?? "?"} \u2192 ${latestVersion ?? "?"})?` : "Install the AgentBox menu-bar app?";
|
|
14554
|
+
const wantTray = opts.yes ? true : await confirm({ message, initialValue: true });
|
|
14555
|
+
if (wantTray === true) {
|
|
14556
|
+
const sp2 = (0, prompt_exports.spinner)();
|
|
14557
|
+
sp2.start(action === "update" ? "Updating menu-bar app" : "Downloading menu-bar app");
|
|
14558
|
+
try {
|
|
14559
|
+
const res = await installTray({ quiet: true });
|
|
14560
|
+
sp2.stop(
|
|
14561
|
+
res.ran ? `Menu-bar app: ${action === "update" ? "updated" : "installed"}` : `Menu-bar app: skipped (${res.reason ?? ""})`
|
|
14562
|
+
);
|
|
14563
|
+
} catch (err) {
|
|
14564
|
+
sp2.stop(`Menu-bar app: failed`);
|
|
14565
|
+
prompt_exports.log.warn(err instanceof Error ? err.message : String(err));
|
|
14566
|
+
}
|
|
14490
14567
|
}
|
|
14491
14568
|
}
|
|
14492
14569
|
}
|
|
@@ -15894,8 +15971,12 @@ var pauseCommand = new Command41("pause").description(
|
|
|
15894
15971
|
`);
|
|
15895
15972
|
} else {
|
|
15896
15973
|
await (await providerForBox(box)).pause(box);
|
|
15897
|
-
|
|
15898
|
-
|
|
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
|
+
);
|
|
15899
15980
|
}
|
|
15900
15981
|
} catch (err) {
|
|
15901
15982
|
handleLifecycleError(err);
|
|
@@ -17365,7 +17446,7 @@ var unsetUrlSub = new Command48("unset-url").description("Stop using a control p
|
|
|
17365
17446
|
});
|
|
17366
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) => {
|
|
17367
17448
|
try {
|
|
17368
|
-
const { loadEffectiveConfig: loadEffectiveConfig2 } = await import("./dist-
|
|
17449
|
+
const { loadEffectiveConfig: loadEffectiveConfig2 } = await import("./dist-SBDYDH7H.js");
|
|
17369
17450
|
const cfg = await loadEffectiveConfig2(process.cwd());
|
|
17370
17451
|
const url = (opts.url ?? cfg.effective.relay.controlPlaneUrl ?? "").replace(/\/$/, "");
|
|
17371
17452
|
if (!url) {
|
|
@@ -17702,7 +17783,7 @@ async function runDockerJob(job, log67, onBoxCreated) {
|
|
|
17702
17783
|
fromBranch: opts.fromBranch,
|
|
17703
17784
|
useSnapshot,
|
|
17704
17785
|
checkpointRef,
|
|
17705
|
-
image: cfg.effective
|
|
17786
|
+
image: resolveBoxImage(cfg.effective, providerName),
|
|
17706
17787
|
claudeConfig: !job.noAgent && job.agent === "claude-code" ? { isolate: cfg.effective.box.isolateClaudeConfig } : void 0,
|
|
17707
17788
|
codexConfig: !job.noAgent && job.agent === "codex" ? { isolate: cfg.effective.box.isolateCodexConfig } : void 0,
|
|
17708
17789
|
opencodeConfig: !job.noAgent && job.agent === "opencode" ? { isolate: cfg.effective.box.isolateOpencodeConfig } : void 0,
|
|
@@ -17824,7 +17905,7 @@ async function runCloudJob(job, log67, onBoxCreated) {
|
|
|
17824
17905
|
// `--branch` accepts branch/tag names but not SHAs; absent → HEAD.
|
|
17825
17906
|
fromBranch: opts.fromBranch,
|
|
17826
17907
|
checkpointRef,
|
|
17827
|
-
image: cfg.effective
|
|
17908
|
+
image: resolveBoxImage(cfg.effective, providerName),
|
|
17828
17909
|
withPlaywright,
|
|
17829
17910
|
withEnv: cfg.effective.box.withEnv,
|
|
17830
17911
|
vnc: { enabled: cfg.effective.box.vnc },
|
|
@@ -18081,12 +18162,12 @@ async function runPostUpdateRefresh(opts = {}) {
|
|
|
18081
18162
|
}
|
|
18082
18163
|
}
|
|
18083
18164
|
try {
|
|
18084
|
-
const
|
|
18165
|
+
const freshness = await evaluateDockerBaseFreshness();
|
|
18085
18166
|
say(
|
|
18086
|
-
|
|
18167
|
+
freshness.state === "fresh" ? `box image ${DEFAULT_BOX_IMAGE} already current (build context unchanged)` : freshness.state === "stale" ? `box image ${DEFAULT_BOX_IMAGE}: build context changed \u2014 rebuilds on next create` : freshness.state === "unprepared" ? `box image ${DEFAULT_BOX_IMAGE} not present \u2014 pulled on next create` : `box image ${DEFAULT_BOX_IMAGE}: freshness unknown \u2014 left alone`
|
|
18087
18168
|
);
|
|
18088
18169
|
} catch (err) {
|
|
18089
|
-
warn("box image
|
|
18170
|
+
warn("box image check", err);
|
|
18090
18171
|
}
|
|
18091
18172
|
try {
|
|
18092
18173
|
const hub = await getHubStatus();
|
|
@@ -18709,7 +18790,7 @@ var servicesCommand = new Command56("services").description("List and restart a
|
|
|
18709
18790
|
|
|
18710
18791
|
// src/commands/shell.ts
|
|
18711
18792
|
import { spawnSync as spawnSync8 } from "child_process";
|
|
18712
|
-
import { log as log61 } from "@clack/prompts";
|
|
18793
|
+
import { log as log61, spinner as spinner14 } from "@clack/prompts";
|
|
18713
18794
|
import { Command as Command57 } from "commander";
|
|
18714
18795
|
|
|
18715
18796
|
// src/commands/_provider-guard.ts
|
|
@@ -18894,7 +18975,7 @@ var shellCommand = new Command57("shell").description(
|
|
|
18894
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"
|
|
18895
18976
|
).option("--json", "with --ssh-config: emit the connection details as JSON").action(async (idOrName, cmd, opts) => {
|
|
18896
18977
|
try {
|
|
18897
|
-
|
|
18978
|
+
let { box, shifted } = await resolveBoxOrShift(idOrName);
|
|
18898
18979
|
const effectiveCmd = shifted && idOrName ? [idOrName, ...cmd] : cmd;
|
|
18899
18980
|
if (opts.sshConfig) {
|
|
18900
18981
|
await runSshConfig(box, opts);
|
|
@@ -18909,6 +18990,16 @@ var shellCommand = new Command57("shell").description(
|
|
|
18909
18990
|
if ((box.provider ?? "docker") !== "docker") {
|
|
18910
18991
|
const provider = await providerForBox(box);
|
|
18911
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
|
+
}
|
|
18912
19003
|
if (oneShot) {
|
|
18913
19004
|
const argv2 = oneShotBashArgv(effectiveCmd, login);
|
|
18914
19005
|
const r = await provider.exec(box, argv2, { user });
|
|
@@ -18934,6 +19025,7 @@ var shellCommand = new Command57("shell").description(
|
|
|
18934
19025
|
command: spec.argv[0],
|
|
18935
19026
|
dockerArgv: spec.argv.slice(1),
|
|
18936
19027
|
env: spec.env,
|
|
19028
|
+
initialInput: spec.initialInput,
|
|
18937
19029
|
relayBaseUrl: RELAY_HOST_URL5,
|
|
18938
19030
|
boxId: box.id,
|
|
18939
19031
|
boxName: box.name,
|
|
@@ -19789,7 +19881,7 @@ async function reportLatest() {
|
|
|
19789
19881
|
}
|
|
19790
19882
|
}
|
|
19791
19883
|
var updateCommand = new Command63("self-update").description(
|
|
19792
|
-
"Update agentbox: self-update via npm/pnpm (unless run via npx), refresh the host skills,
|
|
19884
|
+
"Update agentbox: self-update via npm/pnpm (unless run via npx), refresh the host skills, re-check the box image (rebuilt on the next create only if its build context changed), reload the relay/hub, and update the menu-bar app"
|
|
19793
19885
|
).option("-y, --yes", "skip the confirmation prompt").option("--dry-run", "show what would happen, don't change anything").option("--skip-self", "skip the package self-update; only refresh the skills + image + relay + app").option("--skip-skills", "skip refreshing the host skill files in ~/.claude, ~/.codex, ~/.config/opencode").action(async (opts) => {
|
|
19794
19886
|
try {
|
|
19795
19887
|
const method = detectExecutionMethod({
|