@madarco/agentbox 0.24.6 → 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.
Files changed (161) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/LICENSE +21 -0
  3. package/README.md +4 -0
  4. package/dist/{_cloud-attach-ESCPOKG5.js → _cloud-attach-W2CFNXKO.js} +5 -5
  5. package/dist/{chunk-RFRWS5CD.js → chunk-4UNSBU5R.js} +2 -2
  6. package/dist/{chunk-H6A4BQMG.js → chunk-5F5SOSDY.js} +40 -1
  7. package/dist/chunk-5F5SOSDY.js.map +1 -0
  8. package/dist/{chunk-7DPDUZ7L.js → chunk-7C5MOA4Z.js} +194 -56
  9. package/dist/chunk-7C5MOA4Z.js.map +1 -0
  10. package/dist/{chunk-LJMGHFLZ.js → chunk-7PRLM3PH.js} +3 -3
  11. package/dist/chunk-G3H2L3O2.js +0 -0
  12. package/dist/{chunk-4HPLS5HJ.js → chunk-GHFIKSBJ.js} +110 -9
  13. package/dist/chunk-GHFIKSBJ.js.map +1 -0
  14. package/dist/{chunk-5JDOTQTM.js → chunk-LCZOQTIX.js} +4 -4
  15. package/dist/{chunk-QHISF6O6.js → chunk-LU3WAHTU.js} +3 -3
  16. package/dist/{chunk-CE3S7UDQ.js → chunk-NH3W6HUZ.js} +44 -12
  17. package/dist/chunk-NH3W6HUZ.js.map +1 -0
  18. package/dist/{chunk-OSPM4Q5V.js → chunk-VZC5J44U.js} +5 -5
  19. package/dist/chunk-VZC5J44U.js.map +1 -0
  20. package/dist/chunk-WJFZJZIM.js +0 -0
  21. package/dist/{chunk-3MDYQROX.js → chunk-Y3OPQWAQ.js} +11 -11
  22. package/dist/chunk-Y3OPQWAQ.js.map +1 -0
  23. package/dist/cloud-poller-SUNA6ZQC-7M5LJHHE.js +0 -0
  24. package/dist/{dist-TRKHS6I7.js → dist-3V5SLNK4.js} +6 -6
  25. package/dist/{dist-NOUPH5E6.js → dist-BIDAC4H4.js} +4 -4
  26. package/dist/{dist-VFPT5TDH.js → dist-I5OBPLP2.js} +6 -6
  27. package/dist/{dist-3M53BF4E.js → dist-IGQNVIV3.js} +6 -6
  28. package/dist/dist-KL73Z37T.js +677 -0
  29. package/dist/dist-KL73Z37T.js.map +1 -0
  30. package/dist/{dist-HPPHBZTO.js → dist-SBDYDH7H.js} +8 -2
  31. package/dist/{dist-FGXCG4JY.js → dist-UB3PYSCG.js} +6 -6
  32. package/dist/index.js +114 -38
  33. package/dist/index.js.map +1 -1
  34. package/dist/{prepared-state-BUO75YLZ-46W2PAHH.js → prepared-state-OBM2F7CU-DY7TZV4R.js} +2 -2
  35. package/package.json +29 -30
  36. package/runtime/_shared/agentbox-checkpoint-cleanup +0 -0
  37. package/runtime/_shared/agentbox-dockerd-start +0 -0
  38. package/runtime/_shared/agentbox-open +0 -0
  39. package/runtime/_shared/agentbox-portless-trust +0 -0
  40. package/runtime/_shared/agentbox-vnc-start +0 -0
  41. package/runtime/_shared/ctl.cjs +31 -4
  42. package/runtime/_shared/gh-shim +0 -0
  43. package/runtime/_shared/git-shim +0 -0
  44. package/runtime/_shared/linear-shim +0 -0
  45. package/runtime/_shared/ntn-shim +0 -0
  46. package/runtime/digitalocean/agentbox-checkpoint-cleanup +0 -0
  47. package/runtime/digitalocean/agentbox-dockerd-start +0 -0
  48. package/runtime/digitalocean/agentbox-open +0 -0
  49. package/runtime/digitalocean/agentbox-portless-trust +0 -0
  50. package/runtime/digitalocean/agentbox-vnc-start +0 -0
  51. package/runtime/digitalocean/ctl.cjs +31 -4
  52. package/runtime/digitalocean/gh-shim +0 -0
  53. package/runtime/digitalocean/git-shim +0 -0
  54. package/runtime/digitalocean/linear-shim +0 -0
  55. package/runtime/digitalocean/ntn-shim +0 -0
  56. package/runtime/digitalocean/scripts/install-box.sh +0 -0
  57. package/runtime/docker/packages/ctl/dist/bin.cjs +31 -4
  58. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-checkpoint-cleanup +0 -0
  59. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-dockerd-start +0 -0
  60. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-open +0 -0
  61. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-portless-trust +0 -0
  62. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-sshd-start +0 -0
  63. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-vnc-start +0 -0
  64. package/runtime/docker/packages/sandbox-docker/scripts/chromium-resolver +0 -0
  65. package/runtime/docker/packages/sandbox-docker/scripts/gh-shim +0 -0
  66. package/runtime/docker/packages/sandbox-docker/scripts/git-shim +0 -0
  67. package/runtime/docker/packages/sandbox-docker/scripts/linear-shim +0 -0
  68. package/runtime/docker/packages/sandbox-docker/scripts/ntn-shim +0 -0
  69. package/runtime/e2b/agentbox-checkpoint-cleanup +0 -0
  70. package/runtime/e2b/agentbox-dockerd-start +0 -0
  71. package/runtime/e2b/agentbox-open +0 -0
  72. package/runtime/e2b/agentbox-vnc-start +0 -0
  73. package/runtime/e2b/ctl.cjs +31 -4
  74. package/runtime/e2b/gh-shim +0 -0
  75. package/runtime/e2b/git-shim +0 -0
  76. package/runtime/e2b/linear-shim +0 -0
  77. package/runtime/e2b/ntn-shim +0 -0
  78. package/runtime/e2b/scripts/build-template.sh +0 -0
  79. package/runtime/hetzner/agentbox-checkpoint-cleanup +0 -0
  80. package/runtime/hetzner/agentbox-dockerd-start +0 -0
  81. package/runtime/hetzner/agentbox-open +0 -0
  82. package/runtime/hetzner/agentbox-portless-trust +0 -0
  83. package/runtime/hetzner/agentbox-vnc-start +0 -0
  84. package/runtime/hetzner/ctl.cjs +31 -4
  85. package/runtime/hetzner/gh-shim +0 -0
  86. package/runtime/hetzner/git-shim +0 -0
  87. package/runtime/hetzner/linear-shim +0 -0
  88. package/runtime/hetzner/ntn-shim +0 -0
  89. package/runtime/hetzner/scripts/install-box.sh +0 -0
  90. package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
  91. package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
  92. package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
  93. package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
  94. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  95. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  96. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  97. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  98. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  99. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1lmiq._.js +6 -6
  100. package/runtime/hub/apps/hub/.next/server/chunks/_0760z6y._.js +1 -1
  101. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ro6vh6._.js +1 -1
  102. package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
  103. package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
  104. package/runtime/hub/apps/hub/{auth-HY5K55Y5.js → auth-MVL4NCQC.js} +3 -3
  105. package/runtime/hub/apps/hub/{auth-config-MNW2XGKK.js → auth-config-GRIXACTV.js} +3 -3
  106. package/runtime/hub/apps/hub/{chunk-OF242BLD.js → chunk-CKBHQ7OI.js} +1 -1
  107. package/runtime/hub/apps/hub/{chunk-PROXBLRJ.js → chunk-JLG5JJXD.js} +1 -1
  108. package/runtime/hub/apps/hub/{chunk-EY6HEDTK.js → chunk-LNHPLR3L.js} +11 -11
  109. package/runtime/hub/apps/hub/{chunk-DNR2YM2G.js → chunk-MA73PTOR.js} +57 -9
  110. package/runtime/hub/apps/hub/{chunk-TZFWAJVB.js → chunk-OG4KH2FZ.js} +5 -0
  111. package/runtime/hub/apps/hub/{chunk-5KMJIVZC.js → chunk-QBJOF5D3.js} +111 -10
  112. package/runtime/hub/apps/hub/chunk-QYJ37CUJ.js +62140 -0
  113. package/runtime/hub/apps/hub/{chunk-EFW34I43.js → chunk-UDZ3VXRF.js} +1 -1
  114. package/runtime/hub/apps/hub/{chunk-TRUQCO4U.js → chunk-V3OMPMI3.js} +40 -1
  115. package/runtime/hub/apps/hub/{cloud-poller-SUNA6ZQC-VSKVMYHL.js → cloud-poller-SUNA6ZQC-YAWTNA2W.js} +1 -1
  116. package/runtime/hub/apps/hub/{dist-YCRESLWD.js → dist-26KVXHXV.js} +7 -7
  117. package/runtime/hub/apps/hub/{dist-SX2NXGI6.js → dist-7LB4D4ZQ.js} +7 -7
  118. package/runtime/hub/apps/hub/{dist-M73U3ZDH.js → dist-ERQDDSOY.js} +7 -7
  119. package/runtime/hub/apps/hub/{dist-NTKPAYA3.js → dist-IZ2JCN5R.js} +8 -2
  120. package/runtime/hub/apps/hub/{dist-3DCKZYID.js → dist-SIQJD72C.js} +596 -113
  121. package/runtime/hub/apps/hub/{dist-RSWTJWRN.js → dist-YZJA4WRV.js} +5 -5
  122. package/runtime/hub/apps/hub/{dist-KV5ESR24.js → dist-ZVY2FWG6.js} +7 -7
  123. package/runtime/hub/apps/hub/esm-VGBJAFLR.js +79 -0
  124. package/runtime/hub/apps/hub/{execa-4DLVNM6E.js → execa-AFY4ZODY.js} +2 -2
  125. package/runtime/hub/apps/hub/{hub-token-QKQWV2I6.js → hub-token-BJG6Q5II.js} +3 -3
  126. package/runtime/hub/apps/hub/{prepared-state-BUO75YLZ-KR4YLKDC.js → prepared-state-OBM2F7CU-ZEYFNYFI.js} +3 -3
  127. package/runtime/hub/apps/hub/server.js +19 -19
  128. package/runtime/relay/bin.cjs +177 -42
  129. package/runtime/vercel/agentbox-checkpoint-cleanup +0 -0
  130. package/runtime/vercel/agentbox-dockerd-start +0 -0
  131. package/runtime/vercel/agentbox-open +0 -0
  132. package/runtime/vercel/agentbox-vnc-start +0 -0
  133. package/runtime/vercel/ctl.cjs +31 -4
  134. package/runtime/vercel/gh-shim +0 -0
  135. package/runtime/vercel/git-shim +0 -0
  136. package/runtime/vercel/linear-shim +0 -0
  137. package/runtime/vercel/ntn-shim +0 -0
  138. package/runtime/vercel/scripts/provision.sh +0 -0
  139. package/dist/chunk-3MDYQROX.js.map +0 -1
  140. package/dist/chunk-4HPLS5HJ.js.map +0 -1
  141. package/dist/chunk-7DPDUZ7L.js.map +0 -1
  142. package/dist/chunk-CE3S7UDQ.js.map +0 -1
  143. package/dist/chunk-H6A4BQMG.js.map +0 -1
  144. package/dist/chunk-OSPM4Q5V.js.map +0 -1
  145. package/dist/dist-2N3XHMBQ.js +0 -322
  146. package/dist/dist-2N3XHMBQ.js.map +0 -1
  147. /package/dist/{_cloud-attach-ESCPOKG5.js.map → _cloud-attach-W2CFNXKO.js.map} +0 -0
  148. /package/dist/{chunk-RFRWS5CD.js.map → chunk-4UNSBU5R.js.map} +0 -0
  149. /package/dist/{chunk-LJMGHFLZ.js.map → chunk-7PRLM3PH.js.map} +0 -0
  150. /package/dist/{chunk-5JDOTQTM.js.map → chunk-LCZOQTIX.js.map} +0 -0
  151. /package/dist/{chunk-QHISF6O6.js.map → chunk-LU3WAHTU.js.map} +0 -0
  152. /package/dist/{dist-HPPHBZTO.js.map → dist-3V5SLNK4.js.map} +0 -0
  153. /package/dist/{dist-NOUPH5E6.js.map → dist-BIDAC4H4.js.map} +0 -0
  154. /package/dist/{dist-TRKHS6I7.js.map → dist-I5OBPLP2.js.map} +0 -0
  155. /package/dist/{dist-3M53BF4E.js.map → dist-IGQNVIV3.js.map} +0 -0
  156. /package/dist/{dist-VFPT5TDH.js.map → dist-SBDYDH7H.js.map} +0 -0
  157. /package/dist/{dist-FGXCG4JY.js.map → dist-UB3PYSCG.js.map} +0 -0
  158. /package/dist/{prepared-state-BUO75YLZ-46W2PAHH.js.map → prepared-state-OBM2F7CU-DY7TZV4R.js.map} +0 -0
  159. /package/runtime/hub/apps/hub/.next/static/{2LDXStEUVHS2oK1ID_Uvo → c82uDoByt-dPQUHilRojD}/_buildManifest.js +0 -0
  160. /package/runtime/hub/apps/hub/.next/static/{2LDXStEUVHS2oK1ID_Uvo → c82uDoByt-dPQUHilRojD}/_clientMiddlewareManifest.js +0 -0
  161. /package/runtime/hub/apps/hub/.next/static/{2LDXStEUVHS2oK1ID_Uvo → 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-RFRWS5CD.js";
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-LJMGHFLZ.js";
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-CE3S7UDQ.js";
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-7DPDUZ7L.js";
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-5JDOTQTM.js";
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-QHISF6O6.js";
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-4HPLS5HJ.js";
116
+ } from "./chunk-GHFIKSBJ.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-OSPM4Q5V.js";
266
+ } from "./chunk-VZC5J44U.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-H6A4BQMG.js";
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-3MDYQROX.js";
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.24.6" : "0.0.0-dev";
380
- var AGENTBOX_COMMIT = true ? "59e7ce5e4" : "dev";
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
 
@@ -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-NOUPH5E6.js");
3890
+ const { evaluateDockerBaseFreshness: evaluateDockerBaseFreshness2 } = await import("./dist-BIDAC4H4.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-2N3XHMBQ.js");
4151
+ const mod = await import("./dist-KL73Z37T.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-FGXCG4JY.js");
4162
+ const mod = await import("./dist-UB3PYSCG.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 configuredLocation = providerName === "hetzner" ? cfg?.effective.box.hetznerLocation : providerName === "digitalocean" ? cfg?.effective.box.digitaloceanRegion : void 0;
4276
- const location = opts.location?.trim() || configuredLocation || void 0;
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
- image: cfg.effective.box.image,
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.box.image,
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.box.image,
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.box.image,
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.box.image,
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.box.image,
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
- if ((box.provider ?? "docker") === "vercel" && !opts.yes && process.stdin.isTTY) {
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: "Create checkpoint? The vercel box will stop and reboot.",
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-ESCPOKG5.js");
9437
+ const { cloudAgentAttach: cloudAgentAttach2 } = await import("./_cloud-attach-W2CFNXKO.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.box.image,
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
- process.stdout.write(`paused ${box.name} (${box.provider} sandbox archived)
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-HPPHBZTO.js");
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.box.image,
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.box.image,
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
- const { box, shifted } = await resolveBoxOrShift(idOrName);
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,