@madarco/agentbox 0.19.0 → 0.20.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 (45) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/dist/{_cloud-attach-YM2KOWHO.js → _cloud-attach-THTN4CFZ.js} +7 -5
  3. package/dist/{chunk-A5OFRJDI.js → chunk-3VFY3N4A.js} +76 -22
  4. package/dist/chunk-3VFY3N4A.js.map +1 -0
  5. package/dist/{chunk-Y6PUCLOE.js → chunk-52LKNUY7.js} +5 -2
  6. package/dist/chunk-52LKNUY7.js.map +1 -0
  7. package/dist/{chunk-JK5V4OLT.js → chunk-7RWFYLF3.js} +194 -34
  8. package/dist/chunk-7RWFYLF3.js.map +1 -0
  9. package/dist/{chunk-SPUUOEW2.js → chunk-ZX6DTA4X.js} +5 -4
  10. package/dist/chunk-ZX6DTA4X.js.map +1 -0
  11. package/dist/{dist-EKSNZHDY.js → dist-3PLT2EK2.js} +6 -2
  12. package/dist/{dist-VQSZVBT3.js → dist-3WFNXXPE.js} +3 -3
  13. package/dist/{dist-U2BHTWG4.js → dist-7ELDXBAG.js} +6 -5
  14. package/dist/dist-7ELDXBAG.js.map +1 -0
  15. package/dist/{dist-PRDYMXCX.js → dist-C3YRC3PP.js} +3 -3
  16. package/dist/{dist-FTCDWRAL.js → dist-CZ6CRADC.js} +3 -3
  17. package/dist/index.js +789 -291
  18. package/dist/index.js.map +1 -1
  19. package/package.json +2 -2
  20. package/runtime/docker/packages/ctl/dist/bin.cjs +122 -62
  21. package/runtime/docker/packages/sandbox-docker/scripts/claude-managed-settings.json +4 -4
  22. package/runtime/e2b/agentbox-dockerd-start +145 -0
  23. package/runtime/e2b/attach-helper.cjs +23 -2
  24. package/runtime/e2b/claude-managed-settings.json +4 -4
  25. package/runtime/e2b/ctl.cjs +122 -62
  26. package/runtime/e2b/scripts/build-template.sh +22 -5
  27. package/runtime/hetzner/claude-managed-settings.json +4 -4
  28. package/runtime/hetzner/ctl.cjs +122 -62
  29. package/runtime/relay/bin.cjs +6 -0
  30. package/runtime/vercel/claude-managed-settings.json +4 -4
  31. package/runtime/vercel/ctl.cjs +122 -62
  32. package/share/host-skills/agentbox/SKILL.md +2 -2
  33. package/share/host-skills/agentbox-info/SKILL.md +6 -6
  34. package/share/host-skills/codex/agentbox.md +2 -2
  35. package/share/host-skills/opencode/agentbox.md +2 -2
  36. package/dist/chunk-A5OFRJDI.js.map +0 -1
  37. package/dist/chunk-JK5V4OLT.js.map +0 -1
  38. package/dist/chunk-SPUUOEW2.js.map +0 -1
  39. package/dist/chunk-Y6PUCLOE.js.map +0 -1
  40. package/dist/dist-U2BHTWG4.js.map +0 -1
  41. /package/dist/{_cloud-attach-YM2KOWHO.js.map → _cloud-attach-THTN4CFZ.js.map} +0 -0
  42. /package/dist/{dist-EKSNZHDY.js.map → dist-3PLT2EK2.js.map} +0 -0
  43. /package/dist/{dist-VQSZVBT3.js.map → dist-3WFNXXPE.js.map} +0 -0
  44. /package/dist/{dist-PRDYMXCX.js.map → dist-C3YRC3PP.js.map} +0 -0
  45. /package/dist/{dist-FTCDWRAL.js.map → dist-CZ6CRADC.js.map} +0 -0
@@ -11388,14 +11388,55 @@ var claudeSessionCommand = new Command("claude-session").description("Report whe
11388
11388
  }
11389
11389
  });
11390
11390
 
11391
+ // src/session-pointer.ts
11392
+ var import_node_fs2 = require("fs");
11393
+ var import_node_os = require("os");
11394
+ var import_node_path = require("path");
11395
+ var SESSION_POINTER_DIR = (0, import_node_path.join)((0, import_node_os.homedir)(), ".local", "state", "agentbox");
11396
+ var CLAUDE_SESSION_POINTER = (0, import_node_path.join)(SESSION_POINTER_DIR, "claude-session");
11397
+ var CODEX_ACTIVE_MARKER = (0, import_node_path.join)(SESSION_POINTER_DIR, "codex-active");
11398
+ function writePointer(path6, content) {
11399
+ try {
11400
+ (0, import_node_fs2.mkdirSync)((0, import_node_path.dirname)(path6), { recursive: true });
11401
+ (0, import_node_fs2.writeFileSync)(path6, content, "utf8");
11402
+ } catch {
11403
+ }
11404
+ }
11405
+ function recordClaudeSessionId(id) {
11406
+ if (!/^[0-9a-fA-F][0-9a-fA-F-]{7,}$/.test(id)) return;
11407
+ writePointer(CLAUDE_SESSION_POINTER, `${id}
11408
+ `);
11409
+ }
11410
+ function markCodexActive() {
11411
+ writePointer(CODEX_ACTIVE_MARKER, `${(/* @__PURE__ */ new Date()).toISOString()}
11412
+ `);
11413
+ }
11414
+ function clearPointer(path6) {
11415
+ try {
11416
+ (0, import_node_fs2.rmSync)(path6, { force: true });
11417
+ } catch {
11418
+ }
11419
+ }
11420
+ function clearClaudeSessionPointer() {
11421
+ clearPointer(CLAUDE_SESSION_POINTER);
11422
+ }
11423
+ function clearCodexMarker() {
11424
+ clearPointer(CODEX_ACTIVE_MARKER);
11425
+ }
11426
+
11391
11427
  // src/commands/claude-state.ts
11392
- var claudeStateCommand = new Command("claude-state").description("Report Claude activity state to the box supervisor (used by hooks)").argument("<state>", `one of: ${CLAUDE_ACTIVITY_STATES.join(", ")}`).option("--socket <path>", "unix socket path", DEFAULT_SOCKET_PATH).option("--payload-stdin", "parse Claude Code's hook JSON from stdin (PreToolUse plan/question)").option("--clear-pending", "force-clear a sticky end-plan/question state (PostToolUse cleanup)").action(async (state, opts) => {
11428
+ var claudeStateCommand = new Command("claude-state").description("Report Claude activity state to the box supervisor (used by hooks)").argument("<state>", `one of: ${CLAUDE_ACTIVITY_STATES.join(", ")}`).option("--socket <path>", "unix socket path", DEFAULT_SOCKET_PATH).option("--payload-stdin", "parse Claude Code's hook JSON from stdin (PreToolUse plan/question)").option("--clear-pending", "force-clear a sticky end-plan/question state (PostToolUse cleanup)").option("--capture-session", "record the hook's session_id to the box's session pointer").option("--clear-session", "drop the box's session pointer (SessionEnd)").action(async (state, opts) => {
11393
11429
  try {
11394
11430
  if (!CLAUDE_ACTIVITY_STATES.includes(state)) {
11395
11431
  process.exit(0);
11396
11432
  }
11433
+ if (opts.clearSession) clearClaudeSessionPointer();
11397
11434
  const typedState = state;
11398
- const extracted = opts.payloadStdin ? await extractPayload(typedState, await readStdinJson()) : void 0;
11435
+ const raw = opts.payloadStdin || opts.captureSession ? await readStdinJson() : null;
11436
+ if (opts.captureSession && typeof raw?.session_id === "string") {
11437
+ recordClaudeSessionId(raw.session_id);
11438
+ }
11439
+ const extracted = opts.payloadStdin ? extractPayload(typedState, raw) : void 0;
11399
11440
  const payload = { ...extracted ?? {} };
11400
11441
  if (opts.clearPending) payload.clearPending = true;
11401
11442
  const hasField = payload.plan !== void 0 || payload.question !== void 0 || payload.clearPending !== void 0;
@@ -11669,6 +11710,7 @@ var BUILT_IN_DEFAULTS = {
11669
11710
  vercelVcpus: 2,
11670
11711
  vercelTimeoutMs: 27e5,
11671
11712
  vercelNetworkPolicy: "",
11713
+ e2bTimeoutMs: 27e5,
11672
11714
  cpMaxBytes: 100 * 1024 * 1024
11673
11715
  },
11674
11716
  checkpoint: {
@@ -11952,6 +11994,11 @@ var KEY_REGISTRY = [
11952
11994
  type: "int",
11953
11995
  description: "Max session length (ms) for new --provider vercel boxes before the VM auto-snapshots; persistent mode auto-resumes on the next call. Default 2700000 (45 min, the Hobby ceiling). Vercel-only."
11954
11996
  },
11997
+ {
11998
+ key: "box.e2bTimeoutMs",
11999
+ type: "int",
12000
+ description: "Session timeout (ms) a new --provider e2b box is created with, before E2B auto-pauses it on inactivity. The host keepalive loop pushes this forward while the agent is working. Default 2700000 (45 min); the Hobby tier caps total session at ~1 h regardless. E2B-only."
12001
+ },
11955
12002
  {
11956
12003
  key: "box.cpMaxBytes",
11957
12004
  type: "int",
@@ -13306,13 +13353,13 @@ var handleCommand = (filePath, rawArguments, rawOptions) => {
13306
13353
  };
13307
13354
 
13308
13355
  // ../../node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/arguments/options.js
13309
- var import_node_path5 = __toESM(require("path"), 1);
13356
+ var import_node_path6 = __toESM(require("path"), 1);
13310
13357
  var import_node_process8 = __toESM(require("process"), 1);
13311
13358
  var import_cross_spawn = __toESM(require_cross_spawn(), 1);
13312
13359
 
13313
13360
  // ../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
13314
13361
  var import_node_process5 = __toESM(require("process"), 1);
13315
- var import_node_path2 = __toESM(require("path"), 1);
13362
+ var import_node_path3 = __toESM(require("path"), 1);
13316
13363
 
13317
13364
  // ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
13318
13365
  function pathKey(options = {}) {
@@ -13329,7 +13376,7 @@ function pathKey(options = {}) {
13329
13376
  // ../../node_modules/.pnpm/unicorn-magic@0.3.0/node_modules/unicorn-magic/node.js
13330
13377
  var import_node_util4 = require("util");
13331
13378
  var import_node_child_process3 = require("child_process");
13332
- var import_node_path = __toESM(require("path"), 1);
13379
+ var import_node_path2 = __toESM(require("path"), 1);
13333
13380
  var import_node_url2 = require("url");
13334
13381
  var execFileOriginal = (0, import_node_util4.promisify)(import_node_child_process3.execFile);
13335
13382
  function toPath(urlOrPath) {
@@ -13338,12 +13385,12 @@ function toPath(urlOrPath) {
13338
13385
  function traversePathUp(startPath) {
13339
13386
  return {
13340
13387
  *[Symbol.iterator]() {
13341
- let currentPath = import_node_path.default.resolve(toPath(startPath));
13388
+ let currentPath = import_node_path2.default.resolve(toPath(startPath));
13342
13389
  let previousPath;
13343
13390
  while (previousPath !== currentPath) {
13344
13391
  yield currentPath;
13345
13392
  previousPath = currentPath;
13346
- currentPath = import_node_path.default.resolve(currentPath, "..");
13393
+ currentPath = import_node_path2.default.resolve(currentPath, "..");
13347
13394
  }
13348
13395
  }
13349
13396
  };
@@ -13358,27 +13405,27 @@ var npmRunPath = ({
13358
13405
  execPath: execPath2 = import_node_process5.default.execPath,
13359
13406
  addExecPath = true
13360
13407
  } = {}) => {
13361
- const cwdPath = import_node_path2.default.resolve(toPath(cwd));
13408
+ const cwdPath = import_node_path3.default.resolve(toPath(cwd));
13362
13409
  const result = [];
13363
- const pathParts = pathOption.split(import_node_path2.default.delimiter);
13410
+ const pathParts = pathOption.split(import_node_path3.default.delimiter);
13364
13411
  if (preferLocal) {
13365
13412
  applyPreferLocal(result, pathParts, cwdPath);
13366
13413
  }
13367
13414
  if (addExecPath) {
13368
13415
  applyExecPath(result, pathParts, execPath2, cwdPath);
13369
13416
  }
13370
- return pathOption === "" || pathOption === import_node_path2.default.delimiter ? `${result.join(import_node_path2.default.delimiter)}${pathOption}` : [...result, pathOption].join(import_node_path2.default.delimiter);
13417
+ return pathOption === "" || pathOption === import_node_path3.default.delimiter ? `${result.join(import_node_path3.default.delimiter)}${pathOption}` : [...result, pathOption].join(import_node_path3.default.delimiter);
13371
13418
  };
13372
13419
  var applyPreferLocal = (result, pathParts, cwdPath) => {
13373
13420
  for (const directory of traversePathUp(cwdPath)) {
13374
- const pathPart = import_node_path2.default.join(directory, "node_modules/.bin");
13421
+ const pathPart = import_node_path3.default.join(directory, "node_modules/.bin");
13375
13422
  if (!pathParts.includes(pathPart)) {
13376
13423
  result.push(pathPart);
13377
13424
  }
13378
13425
  }
13379
13426
  };
13380
13427
  var applyExecPath = (result, pathParts, execPath2, cwdPath) => {
13381
- const pathPart = import_node_path2.default.resolve(cwdPath, toPath(execPath2), "..");
13428
+ const pathPart = import_node_path3.default.resolve(cwdPath, toPath(execPath2), "..");
13382
13429
  if (!pathParts.includes(pathPart)) {
13383
13430
  result.push(pathPart);
13384
13431
  }
@@ -13427,10 +13474,10 @@ var ExecaSyncError = class extends Error {
13427
13474
  setErrorName(ExecaSyncError, ExecaSyncError.name);
13428
13475
 
13429
13476
  // ../../node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/terminate/signal.js
13430
- var import_node_os3 = require("os");
13477
+ var import_node_os4 = require("os");
13431
13478
 
13432
13479
  // ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/main.js
13433
- var import_node_os2 = require("os");
13480
+ var import_node_os3 = require("os");
13434
13481
 
13435
13482
  // ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/realtime.js
13436
13483
  var getRealtimeSignals = () => {
@@ -13448,7 +13495,7 @@ var SIGRTMIN = 34;
13448
13495
  var SIGRTMAX = 64;
13449
13496
 
13450
13497
  // ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/signals.js
13451
- var import_node_os = require("os");
13498
+ var import_node_os2 = require("os");
13452
13499
 
13453
13500
  // ../../node_modules/.pnpm/human-signals@8.0.1/node_modules/human-signals/build/src/core.js
13454
13501
  var SIGNALS = [
@@ -13739,7 +13786,7 @@ var normalizeSignal = ({
13739
13786
  }) => {
13740
13787
  const {
13741
13788
  signals: { [name]: constantSignal }
13742
- } = import_node_os.constants;
13789
+ } = import_node_os2.constants;
13743
13790
  const supported = constantSignal !== void 0;
13744
13791
  const number = supported ? constantSignal : defaultNumber;
13745
13792
  return { name, number, description, supported, action, forced, standard };
@@ -13788,7 +13835,7 @@ var getSignalByNumber = (number, signals2) => {
13788
13835
  };
13789
13836
  };
13790
13837
  var findSignalByNumber = (number, signals2) => {
13791
- const signal = signals2.find(({ name }) => import_node_os2.constants.signals[name] === number);
13838
+ const signal = signals2.find(({ name }) => import_node_os3.constants.signals[name] === number);
13792
13839
  if (signal !== void 0) {
13793
13840
  return signal;
13794
13841
  }
@@ -13822,13 +13869,13 @@ var normalizeSignalInteger = (signalInteger, optionName) => {
13822
13869
  throw new TypeError(`Invalid ${optionName} ${signalInteger}: this signal integer does not exist.
13823
13870
  ${getAvailableSignals()}`);
13824
13871
  };
13825
- var getSignalsIntegerToName = () => new Map(Object.entries(import_node_os3.constants.signals).reverse().map(([signalName, signalInteger]) => [signalInteger, signalName]));
13872
+ var getSignalsIntegerToName = () => new Map(Object.entries(import_node_os4.constants.signals).reverse().map(([signalName, signalInteger]) => [signalInteger, signalName]));
13826
13873
  var signalsIntegerToName = getSignalsIntegerToName();
13827
13874
  var normalizeSignalName = (signalName, optionName) => {
13828
- if (signalName in import_node_os3.constants.signals) {
13875
+ if (signalName in import_node_os4.constants.signals) {
13829
13876
  return signalName;
13830
13877
  }
13831
- if (signalName.toUpperCase() in import_node_os3.constants.signals) {
13878
+ if (signalName.toUpperCase() in import_node_os4.constants.signals) {
13832
13879
  throw new TypeError(`Invalid ${optionName} '${signalName}': please rename it to '${signalName.toUpperCase()}'.`);
13833
13880
  }
13834
13881
  throw new TypeError(`Invalid ${optionName} '${signalName}': this signal name does not exist.
@@ -13836,8 +13883,8 @@ ${getAvailableSignals()}`);
13836
13883
  };
13837
13884
  var getAvailableSignals = () => `Available signal names: ${getAvailableSignalNames()}.
13838
13885
  Available signal numbers: ${getAvailableSignalIntegers()}.`;
13839
- var getAvailableSignalNames = () => Object.keys(import_node_os3.constants.signals).sort().map((signalName) => `'${signalName}'`).join(", ");
13840
- var getAvailableSignalIntegers = () => [...new Set(Object.values(import_node_os3.constants.signals).sort((signalInteger, signalIntegerTwo) => signalInteger - signalIntegerTwo))].join(", ");
13886
+ var getAvailableSignalNames = () => Object.keys(import_node_os4.constants.signals).sort().map((signalName) => `'${signalName}'`).join(", ");
13887
+ var getAvailableSignalIntegers = () => [...new Set(Object.values(import_node_os4.constants.signals).sort((signalInteger, signalIntegerTwo) => signalInteger - signalIntegerTwo))].join(", ");
13841
13888
  var getSignalDescription = (signal) => signalsByName[signal].description;
13842
13889
 
13843
13890
  // ../../node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/terminate/kill.js
@@ -14533,7 +14580,7 @@ var killAfterTimeout = async (subprocess, timeout, context, { signal }) => {
14533
14580
 
14534
14581
  // ../../node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/methods/node.js
14535
14582
  var import_node_process6 = require("process");
14536
- var import_node_path3 = __toESM(require("path"), 1);
14583
+ var import_node_path4 = __toESM(require("path"), 1);
14537
14584
  var mapNode = ({ options }) => {
14538
14585
  if (options.node === false) {
14539
14586
  throw new TypeError('The "node" option cannot be false with `execaNode()`.');
@@ -14552,7 +14599,7 @@ var handleNodeOption = (file, commandArguments, {
14552
14599
  throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');
14553
14600
  }
14554
14601
  const normalizedNodePath = safeNormalizeFileUrl(nodePath, 'The "nodePath" option');
14555
- const resolvedNodePath = import_node_path3.default.resolve(cwd, normalizedNodePath);
14602
+ const resolvedNodePath = import_node_path4.default.resolve(cwd, normalizedNodePath);
14556
14603
  const newOptions = {
14557
14604
  ...options,
14558
14605
  nodePath: resolvedNodePath,
@@ -14562,7 +14609,7 @@ var handleNodeOption = (file, commandArguments, {
14562
14609
  if (!shouldHandleNode) {
14563
14610
  return [file, commandArguments, newOptions];
14564
14611
  }
14565
- if (import_node_path3.default.basename(file, ".exe") === "node") {
14612
+ if (import_node_path4.default.basename(file, ".exe") === "node") {
14566
14613
  throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');
14567
14614
  }
14568
14615
  return [
@@ -14651,12 +14698,12 @@ var ENCODING_ALIASES = {
14651
14698
  var serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encoding}"` : String(encoding);
14652
14699
 
14653
14700
  // ../../node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/arguments/cwd.js
14654
- var import_node_fs2 = require("fs");
14655
- var import_node_path4 = __toESM(require("path"), 1);
14701
+ var import_node_fs3 = require("fs");
14702
+ var import_node_path5 = __toESM(require("path"), 1);
14656
14703
  var import_node_process7 = __toESM(require("process"), 1);
14657
14704
  var normalizeCwd = (cwd = getDefaultCwd()) => {
14658
14705
  const cwdString = safeNormalizeFileUrl(cwd, 'The "cwd" option');
14659
- return import_node_path4.default.resolve(cwdString);
14706
+ return import_node_path5.default.resolve(cwdString);
14660
14707
  };
14661
14708
  var getDefaultCwd = () => {
14662
14709
  try {
@@ -14673,7 +14720,7 @@ var fixCwdError = (originalMessage, cwd) => {
14673
14720
  }
14674
14721
  let cwdStat;
14675
14722
  try {
14676
- cwdStat = (0, import_node_fs2.statSync)(cwd);
14723
+ cwdStat = (0, import_node_fs3.statSync)(cwd);
14677
14724
  } catch (error) {
14678
14725
  return `The "cwd" option is invalid: ${cwd}.
14679
14726
  ${error.message}
@@ -14703,7 +14750,7 @@ var normalizeOptions = (filePath, rawArguments, rawOptions) => {
14703
14750
  options.killSignal = normalizeKillSignal(options.killSignal);
14704
14751
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
14705
14752
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
14706
- if (import_node_process8.default.platform === "win32" && import_node_path5.default.basename(file, ".exe") === "cmd") {
14753
+ if (import_node_process8.default.platform === "win32" && import_node_path6.default.basename(file, ".exe") === "cmd") {
14707
14754
  commandArguments.unshift("/q");
14708
14755
  }
14709
14756
  return { file, commandArguments, options };
@@ -15678,7 +15725,7 @@ var handleResult = (result, verboseInfo, { reject }) => {
15678
15725
  };
15679
15726
 
15680
15727
  // ../../node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/stdio/handle-sync.js
15681
- var import_node_fs4 = require("fs");
15728
+ var import_node_fs5 = require("fs");
15682
15729
 
15683
15730
  // ../../node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/stdio/type.js
15684
15731
  var getStdioItemType = (value, optionName) => {
@@ -16008,7 +16055,7 @@ var normalizeStdioSync = (stdioArray, buffer, verboseInfo) => stdioArray.map((st
16008
16055
  var isOutputPipeOnly = (stdioOption) => stdioOption === "pipe" || Array.isArray(stdioOption) && stdioOption.every((item) => item === "pipe");
16009
16056
 
16010
16057
  // ../../node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/stdio/native.js
16011
- var import_node_fs3 = require("fs");
16058
+ var import_node_fs4 = require("fs");
16012
16059
  var import_node_tty2 = __toESM(require("tty"), 1);
16013
16060
  var handleNativeStream = ({ stdioItem, stdioItem: { type }, isStdioArray, fdNumber, direction, isSync }) => {
16014
16061
  if (!isStdioArray || type !== "native") {
@@ -16042,7 +16089,7 @@ var getTargetFd = ({ value, optionName, fdNumber, direction }) => {
16042
16089
  if (import_node_tty2.default.isatty(targetFdNumber)) {
16043
16090
  throw new TypeError(`The \`${optionName}: ${serializeOptionValue(value)}\` option is invalid: it cannot be a TTY with synchronous methods.`);
16044
16091
  }
16045
- return { type: "uint8Array", value: bufferToUint8Array((0, import_node_fs3.readFileSync)(targetFdNumber)), optionName };
16092
+ return { type: "uint8Array", value: bufferToUint8Array((0, import_node_fs4.readFileSync)(targetFdNumber)), optionName };
16046
16093
  };
16047
16094
  var getTargetFdNumber = (value, fdNumber) => {
16048
16095
  if (value === "inherit") {
@@ -16375,8 +16422,8 @@ var addProperties = {
16375
16422
  var addPropertiesSync = {
16376
16423
  input: {
16377
16424
  ...addProperties,
16378
- fileUrl: ({ value }) => ({ contents: [bufferToUint8Array((0, import_node_fs4.readFileSync)(value))] }),
16379
- filePath: ({ value: { file } }) => ({ contents: [bufferToUint8Array((0, import_node_fs4.readFileSync)(file))] }),
16425
+ fileUrl: ({ value }) => ({ contents: [bufferToUint8Array((0, import_node_fs5.readFileSync)(value))] }),
16426
+ filePath: ({ value: { file } }) => ({ contents: [bufferToUint8Array((0, import_node_fs5.readFileSync)(file))] }),
16380
16427
  fileNumber: forbiddenIfSync,
16381
16428
  iterable: ({ value }) => ({ contents: [...value] }),
16382
16429
  string: ({ value }) => ({ contents: [value] }),
@@ -16722,7 +16769,7 @@ var validateSerializable = (newContents) => {
16722
16769
  };
16723
16770
 
16724
16771
  // ../../node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/io/output-sync.js
16725
- var import_node_fs5 = require("fs");
16772
+ var import_node_fs6 = require("fs");
16726
16773
 
16727
16774
  // ../../node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/verbose/output.js
16728
16775
  var shouldLogOutput = ({ stdioItems, encoding, verboseInfo, fdNumber }) => fdNumber !== "all" && isFullVerbose(verboseInfo, fdNumber) && !BINARY_ENCODINGS.has(encoding) && fdUsesVerbose(fdNumber) && (stdioItems.some(({ type, value }) => type === "native" && PIPED_STDIO_VALUES.has(value)) || stdioItems.every(({ type }) => TRANSFORM_TYPES.has(type)));
@@ -16846,10 +16893,10 @@ var writeToFiles = (serializedResult, stdioItems, outputFiles) => {
16846
16893
  for (const { path: path6, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
16847
16894
  const pathString = typeof path6 === "string" ? path6 : path6.toString();
16848
16895
  if (append || outputFiles.has(pathString)) {
16849
- (0, import_node_fs5.appendFileSync)(path6, serializedResult);
16896
+ (0, import_node_fs6.appendFileSync)(path6, serializedResult);
16850
16897
  } else {
16851
16898
  outputFiles.add(pathString);
16852
- (0, import_node_fs5.writeFileSync)(path6, serializedResult);
16899
+ (0, import_node_fs6.writeFileSync)(path6, serializedResult);
16853
16900
  }
16854
16901
  }
16855
16902
  };
@@ -17293,7 +17340,7 @@ var duplex = () => new import_node_stream2.Duplex({ read() {
17293
17340
  var handleDummyPromise = async (error, verboseInfo, options) => handleResult(error, verboseInfo, options);
17294
17341
 
17295
17342
  // ../../node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/stdio/handle-async.js
17296
- var import_node_fs6 = require("fs");
17343
+ var import_node_fs7 = require("fs");
17297
17344
  var import_node_buffer3 = require("buffer");
17298
17345
  var import_node_stream3 = require("stream");
17299
17346
  var handleStdioAsync = (options, verboseInfo) => handleStdio(addPropertiesAsync, options, verboseInfo, false);
@@ -17317,8 +17364,8 @@ var addProperties2 = {
17317
17364
  var addPropertiesAsync = {
17318
17365
  input: {
17319
17366
  ...addProperties2,
17320
- fileUrl: ({ value }) => ({ stream: (0, import_node_fs6.createReadStream)(value) }),
17321
- filePath: ({ value: { file } }) => ({ stream: (0, import_node_fs6.createReadStream)(file) }),
17367
+ fileUrl: ({ value }) => ({ stream: (0, import_node_fs7.createReadStream)(value) }),
17368
+ filePath: ({ value: { file } }) => ({ stream: (0, import_node_fs7.createReadStream)(file) }),
17322
17369
  webStream: ({ value }) => ({ stream: import_node_stream3.Readable.fromWeb(value) }),
17323
17370
  iterable: ({ value }) => ({ stream: import_node_stream3.Readable.from(value) }),
17324
17371
  asyncIterable: ({ value }) => ({ stream: import_node_stream3.Readable.from(value) }),
@@ -17327,8 +17374,8 @@ var addPropertiesAsync = {
17327
17374
  },
17328
17375
  output: {
17329
17376
  ...addProperties2,
17330
- fileUrl: ({ value }) => ({ stream: (0, import_node_fs6.createWriteStream)(value) }),
17331
- filePath: ({ value: { file, append } }) => ({ stream: (0, import_node_fs6.createWriteStream)(file, append ? { flags: "a" } : {}) }),
17377
+ fileUrl: ({ value }) => ({ stream: (0, import_node_fs7.createWriteStream)(value) }),
17378
+ filePath: ({ value: { file, append } }) => ({ stream: (0, import_node_fs7.createWriteStream)(file, append ? { flags: "a" } : {}) }),
17332
17379
  webStream: ({ value }) => ({ stream: import_node_stream3.Writable.fromWeb(value) }),
17333
17380
  iterable: forbiddenIfAsync,
17334
17381
  asyncIterable: forbiddenIfAsync,
@@ -23142,21 +23189,21 @@ function defaultCapturePane2(sessionName) {
23142
23189
  var import_node_child_process9 = require("child_process");
23143
23190
  var import_node_crypto = require("crypto");
23144
23191
  var import_node_events15 = require("events");
23145
- var import_node_fs7 = require("fs");
23192
+ var import_node_fs8 = require("fs");
23146
23193
  var import_promises22 = require("fs/promises");
23147
- var import_node_path7 = require("path");
23194
+ var import_node_path8 = require("path");
23148
23195
 
23149
23196
  // src/state-dir.ts
23150
23197
  var import_promises20 = require("fs/promises");
23151
- var import_node_path6 = require("path");
23198
+ var import_node_path7 = require("path");
23152
23199
  async function resolveWritableStateDir(want = DEFAULT_STATE_DIR, logDir = DEFAULT_LOG_DIR, ensureSubdir = "tasks", onNotice) {
23153
23200
  try {
23154
- await (0, import_promises20.mkdir)((0, import_node_path6.join)(want, ensureSubdir), { recursive: true });
23201
+ await (0, import_promises20.mkdir)((0, import_node_path7.join)(want, ensureSubdir), { recursive: true });
23155
23202
  return want;
23156
23203
  } catch {
23157
- const fallback = (0, import_node_path6.join)(logDir, "state");
23204
+ const fallback = (0, import_node_path7.join)(logDir, "state");
23158
23205
  try {
23159
- await (0, import_promises20.mkdir)((0, import_node_path6.join)(fallback, ensureSubdir), { recursive: true });
23206
+ await (0, import_promises20.mkdir)((0, import_node_path7.join)(fallback, ensureSubdir), { recursive: true });
23160
23207
  onNotice?.(`${want} not writable, using ${fallback}`);
23161
23208
  return fallback;
23162
23209
  } catch {
@@ -23415,7 +23462,7 @@ var Ring = class {
23415
23462
  };
23416
23463
  function resolveCwd(unitCwd, baseCwd) {
23417
23464
  if (!unitCwd) return baseCwd;
23418
- return unitCwd.startsWith("/") ? unitCwd : (0, import_node_path7.join)(baseCwd, unitCwd);
23465
+ return unitCwd.startsWith("/") ? unitCwd : (0, import_node_path8.join)(baseCwd, unitCwd);
23419
23466
  }
23420
23467
  function spawnArgs(cmd) {
23421
23468
  if (typeof cmd === "string") return { bin: "bash", args: ["-c", cmd] };
@@ -23537,7 +23584,7 @@ var ServiceRunner = class extends import_node_events15.EventEmitter {
23537
23584
  const spec = this.spec;
23538
23585
  const cwd = resolveCwd(spec.cwd, this.opts.cwd);
23539
23586
  if (!this.logStream) {
23540
- this.logStream = (0, import_node_fs7.createWriteStream)((0, import_node_path7.join)(this.opts.logDir, `${spec.name}.log`), {
23587
+ this.logStream = (0, import_node_fs8.createWriteStream)((0, import_node_path8.join)(this.opts.logDir, `${spec.name}.log`), {
23541
23588
  flags: "a"
23542
23589
  });
23543
23590
  this.logStream.on("error", (err) => {
@@ -23741,7 +23788,7 @@ var TaskRunner = class extends import_node_events15.EventEmitter {
23741
23788
  }
23742
23789
  ensureLogStream() {
23743
23790
  if (this.logStream) return;
23744
- this.logStream = (0, import_node_fs7.createWriteStream)((0, import_node_path7.join)(this.opts.logDir, `${this.spec.name}.log`), {
23791
+ this.logStream = (0, import_node_fs8.createWriteStream)((0, import_node_path8.join)(this.opts.logDir, `${this.spec.name}.log`), {
23745
23792
  flags: "a"
23746
23793
  });
23747
23794
  this.logStream.on("error", (err) => {
@@ -23754,7 +23801,7 @@ var TaskRunner = class extends import_node_events15.EventEmitter {
23754
23801
  return (0, import_node_crypto.createHash)("sha256").update(payload).digest("hex");
23755
23802
  }
23756
23803
  markerPath() {
23757
- return (0, import_node_path7.join)(this.opts.stateDir, "tasks", this.spec.name);
23804
+ return (0, import_node_path8.join)(this.opts.stateDir, "tasks", this.spec.name);
23758
23805
  }
23759
23806
  /** Run the `run_once.check` probe. Resolves true when it exits 0. */
23760
23807
  runCheck(command, cwd) {
@@ -23802,7 +23849,7 @@ var TaskRunner = class extends import_node_events15.EventEmitter {
23802
23849
  async writeMarker(cwd) {
23803
23850
  const marker = this.markerPath();
23804
23851
  try {
23805
- await (0, import_promises22.mkdir)((0, import_node_path7.join)(this.opts.stateDir, "tasks"), { recursive: true });
23852
+ await (0, import_promises22.mkdir)((0, import_node_path8.join)(this.opts.stateDir, "tasks"), { recursive: true });
23806
23853
  await (0, import_promises22.writeFile)(marker, `${this.commandHash(cwd)}
23807
23854
  `, "utf8");
23808
23855
  } catch (err) {
@@ -24330,7 +24377,7 @@ function normalizeTask(t) {
24330
24377
  };
24331
24378
  }
24332
24379
  async function readLogFile(logDir, service, tail) {
24333
- const path6 = (0, import_node_path7.join)(logDir, `${service}.log`);
24380
+ const path6 = (0, import_node_path8.join)(logDir, `${service}.log`);
24334
24381
  let text;
24335
24382
  try {
24336
24383
  text = await (0, import_promises22.readFile)(path6, "utf8");
@@ -24352,14 +24399,14 @@ async function readLogFile(logDir, service, tail) {
24352
24399
  // src/socket.ts
24353
24400
  var import_node_net4 = require("net");
24354
24401
  var import_promises23 = require("fs/promises");
24355
- var import_node_path8 = require("path");
24402
+ var import_node_path9 = require("path");
24356
24403
 
24357
24404
  // src/status-reporter.ts
24358
24405
  var import_node_child_process11 = require("child_process");
24359
24406
 
24360
24407
  // src/tmux.ts
24361
24408
  var import_node_child_process10 = require("child_process");
24362
- var import_node_os4 = require("os");
24409
+ var import_node_os5 = require("os");
24363
24410
  var MAX_TITLE_LEN = 120;
24364
24411
  function sanitizePaneTitle(raw, ctx) {
24365
24412
  const t = raw.trim();
@@ -24404,7 +24451,7 @@ async function probeAgentSession(sessionName) {
24404
24451
  sessionName,
24405
24452
  "#{pane_title}"
24406
24453
  ]);
24407
- const title = pt.exitCode === 0 ? sanitizePaneTitle(pt.stdout, { hostname: (0, import_node_os4.hostname)(), sessionName }) : null;
24454
+ const title = pt.exitCode === 0 ? sanitizePaneTitle(pt.stdout, { hostname: (0, import_node_os5.hostname)(), sessionName }) : null;
24408
24455
  return { running: true, sessionName, startedAt, title };
24409
24456
  }
24410
24457
 
@@ -24420,6 +24467,11 @@ var StatusReporter = class {
24420
24467
  claudeUpdatedAt = null;
24421
24468
  claudePlan;
24422
24469
  claudeQuestion;
24470
+ codexMarked = false;
24471
+ // Last-seen tmux liveness per agent, for the running→stopped edge that clears
24472
+ // the session pointer/marker (see snapshot()).
24473
+ lastClaudeRunning = false;
24474
+ lastCodexRunning = false;
24423
24475
  codexState = "unknown";
24424
24476
  codexUpdatedAt = null;
24425
24477
  opencodeState = "unknown";
@@ -24489,6 +24541,10 @@ var StatusReporter = class {
24489
24541
  setCodexState(state) {
24490
24542
  this.codexState = state;
24491
24543
  this.codexUpdatedAt = (/* @__PURE__ */ new Date()).toISOString();
24544
+ if (!this.codexMarked) {
24545
+ this.codexMarked = true;
24546
+ markCodexActive();
24547
+ }
24492
24548
  this.schedulePush();
24493
24549
  }
24494
24550
  setOpencodeState(state) {
@@ -24536,6 +24592,10 @@ var StatusReporter = class {
24536
24592
  const claudeSession2 = await probeAgentSession(this.sessionName);
24537
24593
  const codexSession = await probeAgentSession(DEFAULT_CODEX_SESSION_NAME);
24538
24594
  const opencodeSession = await probeAgentSession(DEFAULT_OPENCODE_SESSION_NAME);
24595
+ if (this.lastClaudeRunning && !claudeSession2.running) clearClaudeSessionPointer();
24596
+ if (this.lastCodexRunning && !codexSession.running) clearCodexMarker();
24597
+ this.lastClaudeRunning = claudeSession2.running;
24598
+ this.lastCodexRunning = codexSession.running;
24539
24599
  const status2 = {
24540
24600
  schema: BOX_STATUS_SCHEMA,
24541
24601
  boxId: this.boxId,
@@ -24614,7 +24674,7 @@ async function discoverListeningPorts() {
24614
24674
 
24615
24675
  // src/socket.ts
24616
24676
  async function startServer(opts) {
24617
- await (0, import_promises23.mkdir)((0, import_node_path8.dirname)(opts.socketPath), { recursive: true });
24677
+ await (0, import_promises23.mkdir)((0, import_node_path9.dirname)(opts.socketPath), { recursive: true });
24618
24678
  await (0, import_promises23.unlink)(opts.socketPath).catch(() => {
24619
24679
  });
24620
24680
  const server = (0, import_node_net4.createServer)((sock) => {
@@ -25387,7 +25447,7 @@ var import_promises25 = require("fs/promises");
25387
25447
  // src/secret.ts
25388
25448
  var import_node_crypto2 = require("crypto");
25389
25449
  var import_promises24 = require("fs/promises");
25390
- var import_node_path9 = require("path");
25450
+ var import_node_path10 = require("path");
25391
25451
  var SECRET_RE = /\{\{\s*AGENTBOX_AUTO_SECRET(?::([A-Za-z0-9_-]+))?\s*\}\}/g;
25392
25452
  var SECRET_BYTES = 32;
25393
25453
  function generateSecret() {
@@ -25406,7 +25466,7 @@ async function resolveAutoSecrets(content, opts = {}) {
25406
25466
  "secrets",
25407
25467
  (msg) => opts.onLog?.(msg)
25408
25468
  );
25409
- const dir = (0, import_node_path9.join)(base, "secrets");
25469
+ const dir = (0, import_node_path10.join)(base, "secrets");
25410
25470
  for (const name of names) named.set(name, await loadOrCreateSecret(dir, name, opts.onLog));
25411
25471
  }
25412
25472
  return content.replace(
@@ -25415,7 +25475,7 @@ async function resolveAutoSecrets(content, opts = {}) {
25415
25475
  );
25416
25476
  }
25417
25477
  async function loadOrCreateSecret(dir, name, onLog) {
25418
- const file = (0, import_node_path9.join)(dir, name);
25478
+ const file = (0, import_node_path10.join)(dir, name);
25419
25479
  try {
25420
25480
  const existing = (await (0, import_promises24.readFile)(file, "utf8")).trim();
25421
25481
  if (existing.length > 0) return existing;
@@ -12,8 +12,8 @@ Fork the current Claude Code session into a fresh AgentBox box.
12
12
 
13
13
  1. **Resolve the provider flag from `$ARGUMENTS`:**
14
14
  - empty → no flag (uses the default docker provider)
15
- - `docker` | `daytona` | `hetzner` | `vercel` → pass `--provider $ARGUMENTS`
16
- - anything else → stop and tell the user the valid values are `docker`, `daytona`, `hetzner`, `vercel`
15
+ - `docker` | `daytona` | `hetzner` | `vercel` | `e2b` → pass `--provider $ARGUMENTS`
16
+ - anything else → stop and tell the user the valid values are `docker`, `daytona`, `hetzner`, `vercel`, `e2b`
17
17
 
18
18
  2. **Detect an active plan (optional `--plan`).** If this session was just working on a Claude Code plan, carry it into the box so the fork resumes in plan mode.
19
19
  - **If you know the plan file path** for this session (plan mode writes it to `~/.claude/plans/<slug>.md`, and you have it from the plan you just produced in this conversation), use that path.
@@ -13,7 +13,7 @@ If you find yourself *inside* a box (`/workspace` exists and `AGENTBOX_RELAY_URL
13
13
 
14
14
  ## What AgentBox is, in one paragraph
15
15
 
16
- AgentBox spins up one isolated sandbox per agent run — a local Docker container (default), a Hetzner VPS (`--provider hetzner`), a Vercel Sandbox (`--provider vercel`), or a Daytona cloud sandbox (`--provider daytona`, partial support). Each box has its own `/workspace`, but the host's `.git/` is shared, so commits made inside the box land on the host immediately. The agent inside the box has **no host credentials** — `git push`, opening URLs in the host browser, capturing checkpoints, and all other host-side operations flow through a small host process called the **relay** that runs alongside the CLI.
16
+ AgentBox spins up one isolated sandbox per agent run — a local Docker container (default), a Hetzner VPS (`--provider hetzner`), a Vercel Sandbox (`--provider vercel`), an E2B microVM (`--provider e2b`), or a Daytona cloud sandbox (`--provider daytona`, partial support). Each box has its own `/workspace`, but the host's `.git/` is shared, so commits made inside the box land on the host immediately. The agent inside the box has **no host credentials** — `git push`, opening URLs in the host browser, capturing checkpoints, and all other host-side operations flow through a small host process called the **relay** that runs alongside the CLI.
17
17
 
18
18
  ## The two starting commands
19
19
 
@@ -28,7 +28,7 @@ agentbox create --provider hetzner # cloud VPS (requires `agentbox prepare --
28
28
  agentbox create --attach # drop into a shell inside the box after create
29
29
  ```
30
30
 
31
- Useful flags: `-n <name>` (friendly box name), `--provider docker|daytona|hetzner|vercel`, `--attach`, `-w <path>` (workspace to mount; defaults to `cwd`), `--snapshot <ref>` (start from a checkpoint).
31
+ Useful flags: `-n <name>` (friendly box name), `--provider docker|daytona|hetzner|vercel|e2b`, `--attach`, `-w <path>` (workspace to mount; defaults to `cwd`), `--snapshot <ref>` (start from a checkpoint).
32
32
 
33
33
  Non-docker providers require a one-time `agentbox prepare --provider <name>` to bake the base image / snapshot.
34
34
 
@@ -66,13 +66,13 @@ agentbox dashboard # TUI with status + leader-key actions
66
66
  agentbox claude attach <name|n> # reattach to a specific box
67
67
  ```
68
68
 
69
- `-i` works on every provider — pass `--provider daytona|hetzner|vercel` (or set `box.provider`) and the queued job creates a cloud box and pre-starts the seeded agent session detached, same as docker. The host must have valid agent credentials. Extra args after `--` are forwarded to the in-box agent (e.g. `agentbox claude -i "<prompt>" --provider vercel -- --permission-mode=plan`).
69
+ `-i` works on every provider — pass `--provider daytona|hetzner|vercel|e2b` (or set `box.provider`) and the queued job creates a cloud box and pre-starts the seeded agent session detached, same as docker. The host must have valid agent credentials. Extra args after `--` are forwarded to the in-box agent (e.g. `agentbox claude -i "<prompt>" --provider vercel -- --permission-mode=plan`).
70
70
 
71
71
  `-i` honors the project's `carry:` block: the carry gate runs on the host when you submit (it prompts there, since you're at the terminal), and the approved files ride the queued job and land in the box at create time. Auto-approve non-interactively with `--carry-yes` (or `AGENTBOX_CARRY_YES=1`); skip with `--carry skip` (or `AGENTBOX_CARRY=skip`).
72
72
 
73
73
  ## Forking the current session into a box
74
74
 
75
- From host Claude, run the **`/agentbox`** slash command (optional arg: `docker` | `daytona` | `hetzner`) to snapshot the *current* Claude Code session into a brand-new box that resumes it. With tmux or iTerm it opens in a new terminal tab; otherwise it starts in the background. The host session is unaffected — you get two parallel timelines. The underlying CLI is `agentbox fork` (`agentbox fork --help`); `/agentbox` requires `agentbox install` to have been run once. This is distinct from `-i`, which seeds a *new* prompt rather than resuming the live conversation. Fork **sends** the project's `carry:` block by default (the host is trusted; the box is the untrusted side, so host→box copy is safe) — opt out with `agentbox fork --carry skip`.
75
+ From host Claude, run the **`/agentbox`** slash command (optional arg: `docker` | `daytona` | `hetzner` | `vercel` | `e2b`) to snapshot the *current* Claude Code session into a brand-new box that resumes it. With tmux or iTerm it opens in a new terminal tab; otherwise it starts in the background. The host session is unaffected — you get two parallel timelines. The underlying CLI is `agentbox fork` (`agentbox fork --help`); `/agentbox` requires `agentbox install` to have been run once. This is distinct from `-i`, which seeds a *new* prompt rather than resuming the live conversation. Fork **sends** the project's `carry:` block by default (the host is trusted; the box is the untrusted side, so host→box copy is safe) — opt out with `agentbox fork --carry skip`.
76
76
 
77
77
  ## Driving one agent from another (`drive`, `agent`, `queue wait-for`)
78
78
 
@@ -80,7 +80,7 @@ When *you* are the host-side agent and want to orchestrate other agents running
80
80
 
81
81
  ### `agentbox drive <box>` — terminal driving
82
82
 
83
- Targets the running tmux session inside a box (auto-picks the agent session: `claude` → `codex` → `opencode` → the only running session; override with `--session <name>`). Provider-uniform — works the same on docker / daytona / hetzner / vercel.
83
+ Targets the running tmux session inside a box (auto-picks the agent session: `claude` → `codex` → `opencode` → the only running session; override with `--session <name>`). Provider-uniform — works the same on docker / daytona / hetzner / vercel / e2b.
84
84
 
85
85
  ```sh
86
86
  agentbox drive snapshot 1 # print rendered TUI as plain text
@@ -225,7 +225,7 @@ If a PR op appears to hang, tell the user to check the dashboard footer for the
225
225
  | `agentbox url [n\|name]` | Open the box's web app URL (`<box-name>.localhost` via Portless) in the host browser. |
226
226
  | `agentbox screen [n\|name]` | Open the box's **own** Chromium via VNC — useful for OAuth flows the agent inside the box initiates. |
227
227
  | `agentbox code [n\|name]` | Open VS Code / Cursor pointed at the box. |
228
- | `agentbox prepare --provider <name>` | One-time base image / snapshot build for `daytona` or `hetzner` or `vercel`. With no `--provider`, prints status across all providers. |
228
+ | `agentbox prepare --provider <name>` | One-time base image / snapshot build for `daytona`, `hetzner`, `vercel`, or `e2b` (e2b builds the base from a Dockerfile via `Template.build()`). With no `--provider`, prints status across all providers. |
229
229
  | `agentbox prune --provider <name>` | Clean up orphan boxes / images / snapshots for a provider (docker + daytona supported; hetzner pending). |
230
230
  | `agentbox cp <src> <dst>` | Copy a file/dir host↔box (`box:/path` prefix picks direction). Heavy dirs (`.git`, `node_modules`, build output) are dropped by default; add `--exclude=<glob\|name>` or `--no-default-excludes`. Uploads over `box.cpMaxBytes` (100 MB, post-exclude) are **blocked** with a size breakdown — trim with `--exclude`, copy heavy folders one at a time, or pass `--yes`. |
231
231
 
@@ -6,7 +6,7 @@ argument-hint: [provider]
6
6
 
7
7
  Fork the current Codex session into a fresh AgentBox box running Codex.
8
8
 
9
- Optional provider argument: `$ARGUMENTS` (docker | daytona | hetzner; default docker).
9
+ Optional provider argument: `$ARGUMENTS` (docker | daytona | hetzner | vercel | e2b; default docker).
10
10
 
11
11
  ## Steps
12
12
 
@@ -30,7 +30,7 @@ Optional provider argument: `$ARGUMENTS` (docker | daytona | hetzner; default do
30
30
 
31
31
  If both print nothing, stop and tell the user no Codex session was found for this machine.
32
32
 
33
- 3. **Resolve the provider flag from `$ARGUMENTS`:** empty → none; `docker` | `daytona` | `hetzner` → `--provider $ARGUMENTS`; anything else → stop and report the valid values.
33
+ 3. **Resolve the provider flag from `$ARGUMENTS`:** empty → none; `docker` | `daytona` | `hetzner` | `vercel` | `e2b` → `--provider $ARGUMENTS`; anything else → stop and report the valid values.
34
34
 
35
35
  4. **Fork.** Run, via your shell tool:
36
36
 
@@ -5,7 +5,7 @@ description: Spawn a parallel AgentBox box running OpenCode for this project (op
5
5
 
6
6
  Spawn a new AgentBox box running OpenCode for the current project, in a new terminal tab.
7
7
 
8
- Optional provider argument: `$ARGUMENTS` (docker | daytona | hetzner; default docker).
8
+ Optional provider argument: `$ARGUMENTS` (docker | daytona | hetzner | vercel | e2b; default docker).
9
9
 
10
10
  **Note:** resuming an OpenCode session into a box isn't supported yet (sessions live in a shared SQLite DB), so this starts a **fresh** OpenCode session in the box — it does not carry the current conversation.
11
11
 
@@ -15,7 +15,7 @@ Optional provider argument: `$ARGUMENTS` (docker | daytona | hetzner; default do
15
15
  - If `AGENTBOX_RELAY_URL` is set in the environment, you are running *inside* a box — not supported; stop and tell the user.
16
16
  - If `which agentbox` fails, tell the user to install AgentBox (`npm -g install @madarco/agentbox`) and stop.
17
17
 
18
- 2. **Resolve the provider flag from `$ARGUMENTS`:** empty → none; `docker` | `daytona` | `hetzner` → `--provider $ARGUMENTS`; anything else → stop and report the valid values.
18
+ 2. **Resolve the provider flag from `$ARGUMENTS`:** empty → none; `docker` | `daytona` | `hetzner` | `vercel` | `e2b` → `--provider $ARGUMENTS`; anything else → stop and report the valid values.
19
19
 
20
20
  3. **Fork.** Run, via your shell tool:
21
21