@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
@@ -10873,13 +10873,13 @@ function isConnectionLevelError(err) {
10873
10873
  const msg = err instanceof Error ? err.message : String(err);
10874
10874
  return /\b(ECONNREFUSED|ENOTFOUND|EHOSTUNREACH|ECONNRESET|EPIPE)\b/.test(msg);
10875
10875
  }
10876
- var import_node_http, import_node_https, import_promises19, BACKOFF_BASE_MS, BACKOFF_MAX_MS, REQUEST_TIMEOUT_MS, FAST_REQUEST_TIMEOUT_MS, FAST_MODE_DECAY_POLLS, STOPPED_TICK_MS, CONNECTION_LEVEL_CODES, CloudBoxPoller, CloudBoxPollers;
10876
+ var import_node_http, import_node_https, import_promises20, BACKOFF_BASE_MS, BACKOFF_MAX_MS, REQUEST_TIMEOUT_MS, FAST_REQUEST_TIMEOUT_MS, FAST_MODE_DECAY_POLLS, STOPPED_TICK_MS, CONNECTION_LEVEL_CODES, CloudBoxPoller, CloudBoxPollers;
10877
10877
  var init_cloud_poller = __esm({
10878
10878
  "src/cloud-poller.ts"() {
10879
10879
  "use strict";
10880
10880
  import_node_http = require("http");
10881
10881
  import_node_https = require("https");
10882
- import_promises19 = require("timers/promises");
10882
+ import_promises20 = require("timers/promises");
10883
10883
  BACKOFF_BASE_MS = 1500;
10884
10884
  BACKOFF_MAX_MS = 3e4;
10885
10885
  REQUEST_TIMEOUT_MS = 25e3;
@@ -11033,12 +11033,12 @@ var init_cloud_poller = __esm({
11033
11033
  if (this.currentBackoffMs === 0 && this.fastModePolls > 0) {
11034
11034
  this.fastModePolls -= 1;
11035
11035
  }
11036
- if (this.currentBackoffMs === 0) await (0, import_promises19.setTimeout)(STOPPED_TICK_MS);
11036
+ if (this.currentBackoffMs === 0) await (0, import_promises20.setTimeout)(STOPPED_TICK_MS);
11037
11037
  }
11038
11038
  }
11039
11039
  async backoff() {
11040
11040
  this.currentBackoffMs = this.currentBackoffMs === 0 ? BACKOFF_BASE_MS : Math.min(this.currentBackoffMs * 2, BACKOFF_MAX_MS);
11041
- await (0, import_promises19.setTimeout)(this.currentBackoffMs);
11041
+ await (0, import_promises20.setTimeout)(this.currentBackoffMs);
11042
11042
  }
11043
11043
  async tryRecoverPreviewUrl() {
11044
11044
  if (!this.deps.recoverPreviewUrl) return;
@@ -17958,7 +17958,7 @@ var {
17958
17958
  } = getIpcExport();
17959
17959
 
17960
17960
  // src/host-actions.ts
17961
- var import_promises17 = require("fs/promises");
17961
+ var import_promises18 = require("fs/promises");
17962
17962
  var import_node_os4 = require("os");
17963
17963
  var import_node_path6 = require("path");
17964
17964
  var import_node_url3 = require("url");
@@ -18083,15 +18083,59 @@ function sanitizeGitArgs(args) {
18083
18083
  var import_promises13 = require("fs/promises");
18084
18084
  var import_os2 = require("os");
18085
18085
  var import_path3 = require("path");
18086
+ var import_promises14 = require("timers/promises");
18086
18087
  var import_fs = require("fs");
18087
18088
  var import_os3 = require("os");
18088
18089
  var import_path4 = require("path");
18089
18090
  var import_path5 = require("path");
18090
- var import_promises14 = require("fs/promises");
18091
+ var import_promises15 = require("fs/promises");
18091
18092
  var import_path6 = require("path");
18092
18093
  var STATE_DIR = (0, import_path3.join)((0, import_os2.homedir)(), ".agentbox");
18093
18094
  var STATE_FILE = (0, import_path3.join)(STATE_DIR, "state.json");
18094
18095
  var EMPTY = { version: 1, boxes: [] };
18096
+ var LOCK_STALE_MS = 15e3;
18097
+ var LOCK_ACQUIRE_TIMEOUT_MS = 2e4;
18098
+ var LOCK_RETRY_MS = 25;
18099
+ async function withStateLock(path6, fn) {
18100
+ const lockPath = `${path6}.lock`;
18101
+ await (0, import_promises13.mkdir)((0, import_path3.dirname)(path6), { recursive: true });
18102
+ const deadline = Date.now() + LOCK_ACQUIRE_TIMEOUT_MS;
18103
+ let held = false;
18104
+ while (!held) {
18105
+ try {
18106
+ const fh = await (0, import_promises13.open)(lockPath, "wx");
18107
+ await fh.writeFile(`${String(process.pid)}
18108
+ `);
18109
+ await fh.close();
18110
+ held = true;
18111
+ } catch (err) {
18112
+ if (err.code !== "EEXIST") throw err;
18113
+ try {
18114
+ const st = await (0, import_promises13.stat)(lockPath);
18115
+ if (Date.now() - st.mtimeMs > LOCK_STALE_MS) {
18116
+ await (0, import_promises13.rm)(lockPath, { force: true });
18117
+ continue;
18118
+ }
18119
+ } catch {
18120
+ continue;
18121
+ }
18122
+ if (Date.now() >= deadline) break;
18123
+ await (0, import_promises14.setTimeout)(LOCK_RETRY_MS);
18124
+ }
18125
+ }
18126
+ try {
18127
+ return await fn();
18128
+ } finally {
18129
+ if (held) await (0, import_promises13.rm)(lockPath, { force: true }).catch(() => {
18130
+ });
18131
+ }
18132
+ }
18133
+ async function mutateState(mutator, path6 = STATE_FILE) {
18134
+ await withStateLock(path6, async () => {
18135
+ const state = await readState(path6);
18136
+ await writeState(mutator(state), path6);
18137
+ });
18138
+ }
18095
18139
  async function readState(path6 = STATE_FILE) {
18096
18140
  try {
18097
18141
  const raw = await (0, import_promises13.readFile)(path6, "utf8");
@@ -18115,6 +18159,22 @@ async function readState(path6 = STATE_FILE) {
18115
18159
  throw err;
18116
18160
  }
18117
18161
  }
18162
+ async function writeState(state, path6 = STATE_FILE) {
18163
+ await (0, import_promises13.mkdir)((0, import_path3.dirname)(path6), { recursive: true });
18164
+ const tmp = `${path6}.tmp.${String(process.pid)}.${String(Date.now())}`;
18165
+ await (0, import_promises13.writeFile)(tmp, JSON.stringify(state, null, 2) + "\n", "utf8");
18166
+ await (0, import_promises13.rename)(tmp, path6);
18167
+ }
18168
+ async function recordBox(box, path6 = STATE_FILE) {
18169
+ const toWrite = (box.provider ?? "docker") === "docker" && !box.docker ? { ...box, docker: projectDockerFields(box) } : box;
18170
+ await mutateState(
18171
+ (state) => ({
18172
+ version: 1,
18173
+ boxes: [...state.boxes.filter((b) => b.id !== toWrite.id), toWrite]
18174
+ }),
18175
+ path6
18176
+ );
18177
+ }
18118
18178
  function projectDockerFields(box) {
18119
18179
  return {
18120
18180
  container: box.container,
@@ -18433,17 +18493,17 @@ function shouldAcceptCredentialUpdate(agent, incoming, existing) {
18433
18493
  }
18434
18494
  async function writeCredentialBackup(agent, content, opts = {}) {
18435
18495
  const path6 = opts.backupPath ?? resolveAgentSpec(agent).credential.hostBackup;
18436
- await (0, import_promises14.mkdir)((0, import_path6.dirname)(path6), { recursive: true });
18496
+ await (0, import_promises15.mkdir)((0, import_path6.dirname)(path6), { recursive: true });
18437
18497
  const tmp = `${path6}.tmp-${String(process.pid)}`;
18438
- await (0, import_promises14.writeFile)(tmp, content, { mode: 384 });
18439
- await (0, import_promises14.rename)(tmp, path6);
18440
- await (0, import_promises14.chmod)(path6, 384).catch(() => {
18498
+ await (0, import_promises15.writeFile)(tmp, content, { mode: 384 });
18499
+ await (0, import_promises15.rename)(tmp, path6);
18500
+ await (0, import_promises15.chmod)(path6, 384).catch(() => {
18441
18501
  });
18442
18502
  }
18443
18503
  async function readCredentialBackup(agent, opts = {}) {
18444
18504
  const path6 = opts.backupPath ?? resolveAgentSpec(agent).credential.hostBackup;
18445
18505
  try {
18446
- return await (0, import_promises14.readFile)(path6, "utf8");
18506
+ return await (0, import_promises15.readFile)(path6, "utf8");
18447
18507
  } catch {
18448
18508
  return null;
18449
18509
  }
@@ -18855,10 +18915,10 @@ var import_node_child_process7 = require("child_process");
18855
18915
  // ../config/dist/index.js
18856
18916
  var import_yaml = __toESM(require_dist(), 1);
18857
18917
  var import_crypto = require("crypto");
18858
- var import_promises15 = require("fs/promises");
18918
+ var import_promises16 = require("fs/promises");
18859
18919
  var import_os4 = require("os");
18860
18920
  var import_path7 = require("path");
18861
- var import_promises16 = require("fs/promises");
18921
+ var import_promises17 = require("fs/promises");
18862
18922
  var import_yaml2 = __toESM(require_dist(), 1);
18863
18923
  var import_path8 = require("path");
18864
18924
  var import_yaml3 = __toESM(require_dist(), 1);
@@ -18978,6 +19038,13 @@ var BUILT_IN_DEFAULTS = {
18978
19038
  pidsLimit: 0,
18979
19039
  disk: "",
18980
19040
  bundleDepth: void 0,
19041
+ daytonaClass: "linux-vm",
19042
+ // Empty = derive from the class: linux-vm implies us-east-1 (the only
19043
+ // region with VM runners), container keeps Daytona's own default.
19044
+ daytonaRegion: "",
19045
+ daytonaTimeoutMs: 15e5,
19046
+ // Empty = the fingerprint-tagged image CI publishes to GHCR.
19047
+ daytonaVmBaseImage: "",
18981
19048
  hetznerLocation: "nbg1",
18982
19049
  digitaloceanRegion: "nyc3",
18983
19050
  // Empty = leave boxes in the account's default project (DigitalOcean's own
@@ -19223,6 +19290,26 @@ var KEY_REGISTRY = [
19223
19290
  type: "int",
19224
19291
  description: "Cap git bundle history shipped to cloud sandboxes (daytona, hetzner). 0 = full history. Unset = adaptive default (last 200 commits; re-bundle at 100 if the bundle exceeds 20 MB). Ignored for docker (which bind-mounts .git/)."
19225
19292
  },
19293
+ {
19294
+ key: "box.daytonaClass",
19295
+ type: "string",
19296
+ description: "Daytona sandbox class for new --provider daytona boxes: `linux-vm` (default) or `container`. `linux-vm` gives real pause/resume (CPU + memory frozen, running processes survive) and a much faster base bake, but runs only in `us-east-1` \u2014 the sole region with VM runners. Choose `container` to stay in a shared region (e.g. `eu`). Changing this needs a re-bake: `agentbox prepare --provider daytona --force`. Daytona-only."
19297
+ },
19298
+ {
19299
+ key: "box.daytonaRegion",
19300
+ type: "string",
19301
+ description: "Daytona region new --provider daytona boxes are created in (e.g. `us`, `eu`, `us-east-1`). Empty (the default) derives it from `box.daytonaClass`: `linux-vm` implies `us-east-1`, `container` uses the account default. Only `us-east-1` has linux-vm runners, so pairing `linux-vm` with another region fails at create. Daytona-only."
19302
+ },
19303
+ {
19304
+ key: "box.daytonaTimeoutMs",
19305
+ type: "int",
19306
+ description: "Idle timeout (ms) a new --provider daytona box is created with, after which Daytona auto-stops it. The host keepalive loop pushes this forward while the agent is working, so only genuinely idle boxes lapse. Default 1500000 (25 min). 0 disables auto-stop entirely. Unlike vercel/e2b (absolute session TTLs) this is an *inactivity* window. Daytona-only."
19307
+ },
19308
+ {
19309
+ key: "box.daytonaVmBaseImage",
19310
+ type: "string",
19311
+ description: "Registry image the daytona `linux-vm` base snapshot is baked from. Empty (the default) uses the fingerprint-tagged box image CI publishes (`ghcr.io/madarco/agentbox/box:sha-<context-sha>`). Daytona can only build a VM snapshot from a prebuilt image, never a Dockerfile, so a build context with no published image (a locally modified `Dockerfile.box`) has nothing to boot and falls back to the container class -- set this to bake a VM from your own published image instead. Must be amd64 and carry an explicit tag or digest. Daytona-only."
19312
+ },
19226
19313
  {
19227
19314
  key: "box.hetznerLocation",
19228
19315
  type: "string",
@@ -19632,14 +19719,14 @@ async function findProjectRoot(cwd) {
19632
19719
  async function canonicalize(p) {
19633
19720
  const abs = (0, import_path7.resolve)(p);
19634
19721
  try {
19635
- return await (0, import_promises15.realpath)(abs);
19722
+ return await (0, import_promises16.realpath)(abs);
19636
19723
  } catch {
19637
19724
  return abs;
19638
19725
  }
19639
19726
  }
19640
19727
  async function fileExists(p) {
19641
19728
  try {
19642
- const st = await (0, import_promises15.stat)(p);
19729
+ const st = await (0, import_promises16.stat)(p);
19643
19730
  return st.isFile();
19644
19731
  } catch {
19645
19732
  return false;
@@ -19667,7 +19754,7 @@ function workspaceConfigFile(workspacePath) {
19667
19754
  async function loadOptionalUserConfig(path6) {
19668
19755
  let text;
19669
19756
  try {
19670
- text = await (0, import_promises16.readFile)(path6, "utf8");
19757
+ text = await (0, import_promises17.readFile)(path6, "utf8");
19671
19758
  } catch (err) {
19672
19759
  if (err.code === "ENOENT") return {};
19673
19760
  throw err;
@@ -19678,7 +19765,7 @@ async function loadProjectAgentboxDefaults(workspacePath) {
19678
19765
  const path6 = workspaceConfigFile(workspacePath);
19679
19766
  let text;
19680
19767
  try {
19681
- text = await (0, import_promises16.readFile)(path6, "utf8");
19768
+ text = await (0, import_promises17.readFile)(path6, "utf8");
19682
19769
  } catch (err) {
19683
19770
  if (err.code === "ENOENT") return {};
19684
19771
  throw err;
@@ -21040,7 +21127,7 @@ async function runGitRpc(action, deps) {
21040
21127
  }
21041
21128
  if (params.hostOnly) {
21042
21129
  const dest = resolveLandDest(branch, params.as);
21043
- const stageSave = await (0, import_promises17.mkdtemp)((0, import_node_path6.join)((0, import_node_os4.tmpdir)(), "agentbox-git-save-"));
21130
+ const stageSave = await (0, import_promises18.mkdtemp)((0, import_node_path6.join)((0, import_node_os4.tmpdir)(), "agentbox-git-save-"));
21044
21131
  const hostBundleSave = (0, import_node_path6.join)(stageSave, "op.bundle");
21045
21132
  const remoteBundleSave = "/tmp/agentbox-rpc-save.bundle";
21046
21133
  try {
@@ -21072,7 +21159,7 @@ ${landed.stdout ?? ""}`,
21072
21159
  stderr: landed.stderr ?? ""
21073
21160
  };
21074
21161
  } finally {
21075
- await (0, import_promises17.rm)(stageSave, { recursive: true, force: true });
21162
+ await (0, import_promises18.rm)(stageSave, { recursive: true, force: true });
21076
21163
  await backend.exec(handle, `rm -f ${shellQuote(remoteBundleSave)}`).catch(() => {
21077
21164
  });
21078
21165
  }
@@ -21151,7 +21238,7 @@ ${landed.stdout ?? ""}`,
21151
21238
  }
21152
21239
  }
21153
21240
  }
21154
- const stage = await (0, import_promises17.mkdtemp)((0, import_node_path6.join)((0, import_node_os4.tmpdir)(), "agentbox-git-rpc-"));
21241
+ const stage = await (0, import_promises18.mkdtemp)((0, import_node_path6.join)((0, import_node_os4.tmpdir)(), "agentbox-git-rpc-"));
21155
21242
  const hostBundle = (0, import_node_path6.join)(stage, "op.bundle");
21156
21243
  const remoteBundle = "/tmp/agentbox-rpc.bundle";
21157
21244
  try {
@@ -21253,7 +21340,7 @@ relay: post-push in-box origin/upstream sync threw: ${err instanceof Error ? err
21253
21340
  stderr: sandboxFetch.stderr
21254
21341
  };
21255
21342
  } finally {
21256
- await (0, import_promises17.rm)(stage, { recursive: true, force: true });
21343
+ await (0, import_promises18.rm)(stage, { recursive: true, force: true });
21257
21344
  await backend.exec(handle, `rm -f ${shellQuote(remoteBundle)}`).catch(() => {
21258
21345
  });
21259
21346
  }
@@ -21818,7 +21905,7 @@ async function defaultRunPropagate(agent, sourceBoxId) {
21818
21905
  }
21819
21906
 
21820
21907
  // src/status-store.ts
21821
- var import_promises18 = require("fs/promises");
21908
+ var import_promises19 = require("fs/promises");
21822
21909
  var import_node_os5 = require("os");
21823
21910
  var import_node_path7 = require("path");
21824
21911
  function sanitizeMnemonic2(raw) {
@@ -21854,11 +21941,11 @@ var BoxStatusStore = class {
21854
21941
  const target = boxStatusPathFor(boxId, name, projectIndex);
21855
21942
  const tmp = `${target}.${String(process.pid)}.tmp`;
21856
21943
  try {
21857
- await (0, import_promises18.mkdir)(boxRunDirFor(boxId, name, projectIndex), { recursive: true });
21858
- await (0, import_promises18.writeFile)(tmp, JSON.stringify(status), "utf8");
21859
- await (0, import_promises18.rename)(tmp, target);
21944
+ await (0, import_promises19.mkdir)(boxRunDirFor(boxId, name, projectIndex), { recursive: true });
21945
+ await (0, import_promises19.writeFile)(tmp, JSON.stringify(status), "utf8");
21946
+ await (0, import_promises19.rename)(tmp, target);
21860
21947
  } catch {
21861
- await (0, import_promises18.rm)(tmp, { force: true }).catch(() => {
21948
+ await (0, import_promises19.rm)(tmp, { force: true }).catch(() => {
21862
21949
  });
21863
21950
  }
21864
21951
  }
@@ -23357,22 +23444,22 @@ async function startRelayServer(opts) {
23357
23444
 
23358
23445
  // src/autopause.ts
23359
23446
  var import_node_child_process10 = require("child_process");
23360
- var import_promises22 = require("fs/promises");
23447
+ var import_promises23 = require("fs/promises");
23361
23448
 
23362
23449
  // src/queue.ts
23363
23450
  var import_node_child_process9 = require("child_process");
23364
23451
  var import_node_crypto7 = require("crypto");
23365
- var import_promises20 = require("fs/promises");
23452
+ var import_promises21 = require("fs/promises");
23366
23453
  var import_node_fs6 = require("fs");
23367
23454
  var import_node_path8 = require("path");
23368
- var import_promises21 = require("timers/promises");
23455
+ var import_promises22 = require("timers/promises");
23369
23456
  var QUEUE_DIR = (0, import_node_path8.join)(STATE_DIR, "queue");
23370
23457
  var PREPARE_MAX_CONCURRENT = 1;
23371
23458
  async function loadQueueConfig() {
23372
23459
  const d = BUILT_IN_DEFAULTS.queue;
23373
23460
  let global3 = {};
23374
23461
  try {
23375
- global3 = parseUserConfig(await (0, import_promises20.readFile)(GLOBAL_CONFIG_FILE, "utf8"), GLOBAL_CONFIG_FILE);
23462
+ global3 = parseUserConfig(await (0, import_promises21.readFile)(GLOBAL_CONFIG_FILE, "utf8"), GLOBAL_CONFIG_FILE);
23376
23463
  } catch {
23377
23464
  }
23378
23465
  const q = global3.queue ?? {};
@@ -23384,15 +23471,15 @@ async function loadQueueConfig() {
23384
23471
  };
23385
23472
  }
23386
23473
  async function writeJob(job) {
23387
- await (0, import_promises20.mkdir)(QUEUE_DIR, { recursive: true });
23474
+ await (0, import_promises21.mkdir)(QUEUE_DIR, { recursive: true });
23388
23475
  const final = (0, import_node_path8.join)(QUEUE_DIR, `${job.id}.json`);
23389
23476
  const tmp = `${final}.tmp.${String(process.pid)}.${String(Date.now())}`;
23390
- await (0, import_promises20.writeFile)(tmp, JSON.stringify(job, null, 2) + "\n", "utf8");
23391
- await (0, import_promises20.rename)(tmp, final);
23477
+ await (0, import_promises21.writeFile)(tmp, JSON.stringify(job, null, 2) + "\n", "utf8");
23478
+ await (0, import_promises21.rename)(tmp, final);
23392
23479
  }
23393
23480
  async function readJob(id) {
23394
23481
  try {
23395
- const raw = await (0, import_promises20.readFile)((0, import_node_path8.join)(QUEUE_DIR, `${id}.json`), "utf8");
23482
+ const raw = await (0, import_promises21.readFile)((0, import_node_path8.join)(QUEUE_DIR, `${id}.json`), "utf8");
23396
23483
  return JSON.parse(raw);
23397
23484
  } catch (err) {
23398
23485
  if (err.code === "ENOENT") return null;
@@ -23401,7 +23488,7 @@ async function readJob(id) {
23401
23488
  }
23402
23489
  async function deleteJob(id) {
23403
23490
  try {
23404
- await (0, import_promises20.unlink)((0, import_node_path8.join)(QUEUE_DIR, `${id}.json`));
23491
+ await (0, import_promises21.unlink)((0, import_node_path8.join)(QUEUE_DIR, `${id}.json`));
23405
23492
  } catch (err) {
23406
23493
  if (err.code !== "ENOENT") throw err;
23407
23494
  }
@@ -23409,7 +23496,7 @@ async function deleteJob(id) {
23409
23496
  async function loadQueue() {
23410
23497
  let entries;
23411
23498
  try {
23412
- entries = await (0, import_promises20.readdir)(QUEUE_DIR);
23499
+ entries = await (0, import_promises21.readdir)(QUEUE_DIR);
23413
23500
  } catch (err) {
23414
23501
  if (err.code === "ENOENT") return [];
23415
23502
  throw err;
@@ -23418,7 +23505,7 @@ async function loadQueue() {
23418
23505
  for (const name of entries) {
23419
23506
  if (!name.endsWith(".json")) continue;
23420
23507
  try {
23421
- const raw = await (0, import_promises20.readFile)((0, import_node_path8.join)(QUEUE_DIR, name), "utf8");
23508
+ const raw = await (0, import_promises21.readFile)((0, import_node_path8.join)(QUEUE_DIR, name), "utf8");
23422
23509
  out.push(JSON.parse(raw));
23423
23510
  } catch {
23424
23511
  }
@@ -23829,7 +23916,7 @@ async function defaultSpawnWorker(job) {
23829
23916
  `AGENTBOX_CLI_ENTRY not set or missing (${String(entry)}); cannot spawn queue worker`
23830
23917
  );
23831
23918
  }
23832
- await (0, import_promises20.mkdir)((0, import_node_path8.join)(STATE_DIR, "logs"), { recursive: true });
23919
+ await (0, import_promises21.mkdir)((0, import_node_path8.join)(STATE_DIR, "logs"), { recursive: true });
23833
23920
  const fd = (0, import_node_fs6.openSync)(job.logPath, "a");
23834
23921
  const command = job.kind === "prepare" ? "_run-queued-prepare" : "_run-queued-job";
23835
23922
  const child = (0, import_node_child_process9.spawn)(process.execPath, [entry, command, job.id], {
@@ -23866,7 +23953,7 @@ async function loadAutopauseConfig() {
23866
23953
  const d = BUILT_IN_DEFAULTS.autopause;
23867
23954
  let global3 = {};
23868
23955
  try {
23869
- global3 = parseUserConfig(await (0, import_promises22.readFile)(GLOBAL_CONFIG_FILE, "utf8"), GLOBAL_CONFIG_FILE);
23956
+ global3 = parseUserConfig(await (0, import_promises23.readFile)(GLOBAL_CONFIG_FILE, "utf8"), GLOBAL_CONFIG_FILE);
23870
23957
  } catch {
23871
23958
  }
23872
23959
  const a2 = global3.autopause ?? {};
@@ -24054,7 +24141,7 @@ async function pauseContainer(name) {
24054
24141
  }
24055
24142
 
24056
24143
  // src/cloud-keepalive.ts
24057
- var import_promises23 = require("fs/promises");
24144
+ var import_promises24 = require("fs/promises");
24058
24145
  function selectBoxesToRenew(entries, windowMs, now) {
24059
24146
  const out = [];
24060
24147
  for (const e of entries) {
@@ -24071,6 +24158,10 @@ function selectBoxesToRenew(entries, windowMs, now) {
24071
24158
  }
24072
24159
  return out;
24073
24160
  }
24161
+ function shouldIdlePause(e, idleWindowMs, now) {
24162
+ if (e.agentState !== "idle" || e.lastActivityMs == null) return false;
24163
+ return now - e.lastActivityMs >= idleWindowMs;
24164
+ }
24074
24165
  function coarseKeepaliveState(s) {
24075
24166
  switch (s) {
24076
24167
  case "working":
@@ -24091,12 +24182,14 @@ function startCloudKeepaliveLoop(deps) {
24091
24182
  const loadConfig = deps.loadConfig ?? loadAutopauseConfig;
24092
24183
  const resolveBackend = deps.resolveBackend ?? resolveCloudBackend;
24093
24184
  const lookupBox = deps.lookupBox ?? defaultLookupBox;
24185
+ const persistPaused = deps.persistPaused ?? defaultPersistPaused;
24094
24186
  const fallbackCreateTimeoutMs = deps.fallbackCreateTimeoutMs ?? defaultFallbackCreateTimeoutMs;
24095
24187
  const nowFn = deps.now ?? Date.now;
24096
24188
  const intervalMs = deps.intervalMs ?? DEFAULT_INTERVAL_MS3;
24097
24189
  const { registry, statusStore, log } = deps;
24098
24190
  const tracked = /* @__PURE__ */ new Map();
24099
24191
  const backoffUntil = /* @__PURE__ */ new Map();
24192
+ const idlePaused = /* @__PURE__ */ new Map();
24100
24193
  const backendCache = /* @__PURE__ */ new Map();
24101
24194
  let ticking = false;
24102
24195
  let stopped = false;
@@ -24137,6 +24230,7 @@ function startCloudKeepaliveLoop(deps) {
24137
24230
  }
24138
24231
  for (const id of [...tracked.keys()]) if (!live.has(id)) tracked.delete(id);
24139
24232
  for (const id of [...backoffUntil.keys()]) if (!live.has(id)) backoffUntil.delete(id);
24233
+ for (const id of [...idlePaused.keys()]) if (!live.has(id)) idlePaused.delete(id);
24140
24234
  const decisions = selectBoxesToRenew(entries, windowMs, now);
24141
24235
  for (const d of decisions) {
24142
24236
  const until = backoffUntil.get(d.boxId);
@@ -24166,6 +24260,39 @@ function startCloudKeepaliveLoop(deps) {
24166
24260
  log(`cloud-keepalive: renew box ${d.boxId} (${d.backend}) failed: ${msg}`);
24167
24261
  }
24168
24262
  }
24263
+ for (const e of entries) {
24264
+ const boxId = e.boxId;
24265
+ if (e.agentState !== "idle") continue;
24266
+ const backend = await resolveCached(e.backend);
24267
+ if (backend?.timeoutModel !== "inactivity") continue;
24268
+ if (typeof backend.pause !== "function") continue;
24269
+ if (idlePaused.get(boxId) === e.lastActivityMs) continue;
24270
+ const until = backoffUntil.get(boxId);
24271
+ if (until != null && now < until) continue;
24272
+ const lookup = await lookupBox(boxId);
24273
+ if (!lookup) continue;
24274
+ const idleWindowMs = lookup.createTimeoutMs ?? await fallbackCreateTimeoutMs(e.backend);
24275
+ if (idleWindowMs <= 0) continue;
24276
+ if (!shouldIdlePause(e, idleWindowMs, now)) continue;
24277
+ try {
24278
+ await backend.pause({
24279
+ sandboxId: lookup.sandboxId,
24280
+ ...lookup.sandboxClass ? { sandboxClass: lookup.sandboxClass } : {}
24281
+ });
24282
+ idlePaused.set(boxId, e.lastActivityMs);
24283
+ backoffUntil.delete(boxId);
24284
+ await persistPaused(boxId).catch(() => {
24285
+ });
24286
+ const mins = e.lastActivityMs != null ? Math.round((now - e.lastActivityMs) / 6e4) : null;
24287
+ log(
24288
+ `cloud-keepalive: paused idle box ${boxId} (${e.backend})` + (mins != null ? ` after ~${String(mins)}m idle` : "") + ` \u2014 ${e.backend}'s own idle timer never fires while we poll it`
24289
+ );
24290
+ } catch (err) {
24291
+ backoffUntil.set(boxId, now + FAILURE_BACKOFF_MS);
24292
+ const msg = err instanceof Error ? err.message : String(err);
24293
+ log(`cloud-keepalive: pause idle box ${boxId} (${e.backend}) failed: ${msg}`);
24294
+ }
24295
+ }
24169
24296
  } catch (err) {
24170
24297
  const msg = err instanceof Error ? err.message : String(err);
24171
24298
  log(`cloud-keepalive: tick error: ${msg}`);
@@ -24198,19 +24325,27 @@ async function defaultLookupBox(boxId) {
24198
24325
  if (hit.kind !== "ok") return null;
24199
24326
  const sandboxId = hit.box.cloud?.sandboxId;
24200
24327
  if (!sandboxId) return null;
24328
+ const sandboxClass = hit.box.cloud?.sandboxClass;
24201
24329
  return {
24202
24330
  sandboxId,
24203
24331
  createdAtMs: toEpoch2(hit.box.createdAt),
24204
- createTimeoutMs: hit.box.cloud?.sessionTimeoutMs ?? null
24332
+ createTimeoutMs: hit.box.cloud?.sessionTimeoutMs ?? null,
24333
+ ...sandboxClass ? { sandboxClass } : {}
24205
24334
  };
24206
24335
  }
24336
+ async function defaultPersistPaused(boxId) {
24337
+ const state = await readState();
24338
+ const hit = findBox(boxId, state);
24339
+ if (hit.kind !== "ok" || !hit.box.cloud) return;
24340
+ await recordBox({ ...hit.box, cloud: { ...hit.box.cloud, lastState: "paused" } });
24341
+ }
24207
24342
  async function defaultFallbackCreateTimeoutMs(backend) {
24208
24343
  const generic = 45 * 6e4;
24209
24344
  if (backend !== "vercel") return generic;
24210
24345
  const fallback = BUILT_IN_DEFAULTS.box.vercelTimeoutMs;
24211
24346
  try {
24212
24347
  const global3 = parseUserConfig(
24213
- await (0, import_promises23.readFile)(GLOBAL_CONFIG_FILE, "utf8"),
24348
+ await (0, import_promises24.readFile)(GLOBAL_CONFIG_FILE, "utf8"),
24214
24349
  GLOBAL_CONFIG_FILE
24215
24350
  );
24216
24351
  const v = global3.box?.vercelTimeoutMs;
File without changes
File without changes
File without changes
File without changes
@@ -12871,7 +12871,7 @@ function sanitizeGitArgs(args) {
12871
12871
  return Array.isArray(args) ? args.filter((a2) => typeof a2 === "string") : [];
12872
12872
  }
12873
12873
 
12874
- // ../relay/dist/chunk-UZUBCJOP.js
12874
+ // ../relay/dist/chunk-MWEABU6N.js
12875
12875
  var import_child_process = require("child_process");
12876
12876
  var import_http2 = require("http");
12877
12877
 
@@ -19650,7 +19650,7 @@ var {
19650
19650
  getCancelSignal: getCancelSignal2
19651
19651
  } = getIpcExport();
19652
19652
 
19653
- // ../relay/dist/chunk-UZUBCJOP.js
19653
+ // ../relay/dist/chunk-MWEABU6N.js
19654
19654
  var import_promises20 = require("fs/promises");
19655
19655
  var import_os6 = require("os");
19656
19656
  var import_path10 = require("path");
@@ -20036,7 +20036,7 @@ var CODEX_STATIC_EXCLUDES = resolveAgentSpec("codex").staticPaths[0]?.exclude ??
20036
20036
  var CODEX_STATIC_INCLUDES = resolveAgentSpec("codex").staticPaths[0]?.include ?? [];
20037
20037
  var OPENCODE_DATA_EXCLUDES = resolveAgentSpec("opencode").staticPaths[0]?.exclude ?? [];
20038
20038
 
20039
- // ../relay/dist/chunk-UZUBCJOP.js
20039
+ // ../relay/dist/chunk-MWEABU6N.js
20040
20040
  var import_child_process2 = require("child_process");
20041
20041
  var import_crypto5 = require("crypto");
20042
20042
  var import_child_process3 = require("child_process");
@@ -20167,6 +20167,13 @@ var BUILT_IN_DEFAULTS = {
20167
20167
  pidsLimit: 0,
20168
20168
  disk: "",
20169
20169
  bundleDepth: void 0,
20170
+ daytonaClass: "linux-vm",
20171
+ // Empty = derive from the class: linux-vm implies us-east-1 (the only
20172
+ // region with VM runners), container keeps Daytona's own default.
20173
+ daytonaRegion: "",
20174
+ daytonaTimeoutMs: 15e5,
20175
+ // Empty = the fingerprint-tagged image CI publishes to GHCR.
20176
+ daytonaVmBaseImage: "",
20170
20177
  hetznerLocation: "nbg1",
20171
20178
  digitaloceanRegion: "nyc3",
20172
20179
  // Empty = leave boxes in the account's default project (DigitalOcean's own
@@ -20412,6 +20419,26 @@ var KEY_REGISTRY = [
20412
20419
  type: "int",
20413
20420
  description: "Cap git bundle history shipped to cloud sandboxes (daytona, hetzner). 0 = full history. Unset = adaptive default (last 200 commits; re-bundle at 100 if the bundle exceeds 20 MB). Ignored for docker (which bind-mounts .git/)."
20414
20421
  },
20422
+ {
20423
+ key: "box.daytonaClass",
20424
+ type: "string",
20425
+ description: "Daytona sandbox class for new --provider daytona boxes: `linux-vm` (default) or `container`. `linux-vm` gives real pause/resume (CPU + memory frozen, running processes survive) and a much faster base bake, but runs only in `us-east-1` \u2014 the sole region with VM runners. Choose `container` to stay in a shared region (e.g. `eu`). Changing this needs a re-bake: `agentbox prepare --provider daytona --force`. Daytona-only."
20426
+ },
20427
+ {
20428
+ key: "box.daytonaRegion",
20429
+ type: "string",
20430
+ description: "Daytona region new --provider daytona boxes are created in (e.g. `us`, `eu`, `us-east-1`). Empty (the default) derives it from `box.daytonaClass`: `linux-vm` implies `us-east-1`, `container` uses the account default. Only `us-east-1` has linux-vm runners, so pairing `linux-vm` with another region fails at create. Daytona-only."
20431
+ },
20432
+ {
20433
+ key: "box.daytonaTimeoutMs",
20434
+ type: "int",
20435
+ description: "Idle timeout (ms) a new --provider daytona box is created with, after which Daytona auto-stops it. The host keepalive loop pushes this forward while the agent is working, so only genuinely idle boxes lapse. Default 1500000 (25 min). 0 disables auto-stop entirely. Unlike vercel/e2b (absolute session TTLs) this is an *inactivity* window. Daytona-only."
20436
+ },
20437
+ {
20438
+ key: "box.daytonaVmBaseImage",
20439
+ type: "string",
20440
+ description: "Registry image the daytona `linux-vm` base snapshot is baked from. Empty (the default) uses the fingerprint-tagged box image CI publishes (`ghcr.io/madarco/agentbox/box:sha-<context-sha>`). Daytona can only build a VM snapshot from a prebuilt image, never a Dockerfile, so a build context with no published image (a locally modified `Dockerfile.box`) has nothing to boot and falls back to the container class -- set this to bake a VM from your own published image instead. Must be amd64 and carry an explicit tag or digest. Daytona-only."
20441
+ },
20415
20442
  {
20416
20443
  key: "box.hetznerLocation",
20417
20444
  type: "string",
@@ -21246,7 +21273,7 @@ function getConnector(service) {
21246
21273
  return null;
21247
21274
  }
21248
21275
 
21249
- // ../relay/dist/chunk-UZUBCJOP.js
21276
+ // ../relay/dist/chunk-MWEABU6N.js
21250
21277
  var import_crypto6 = require("crypto");
21251
21278
  var import_crypto7 = require("crypto");
21252
21279
  var import_path11 = require("path");
File without changes
File without changes
File without changes
File without changes
File without changes