@madarco/agentbox 0.19.0 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/dist/{_cloud-attach-YM2KOWHO.js → _cloud-attach-MH7NKIZY.js} +7 -5
  3. package/dist/{chunk-SPUUOEW2.js → chunk-3465NDRZ.js} +98 -9
  4. package/dist/chunk-3465NDRZ.js.map +1 -0
  5. package/dist/{chunk-JK5V4OLT.js → chunk-4ATVA3RM.js} +194 -34
  6. package/dist/chunk-4ATVA3RM.js.map +1 -0
  7. package/dist/{chunk-Y6PUCLOE.js → chunk-52LKNUY7.js} +5 -2
  8. package/dist/chunk-52LKNUY7.js.map +1 -0
  9. package/dist/{chunk-A5OFRJDI.js → chunk-5N7GA2X7.js} +133 -97
  10. package/dist/chunk-5N7GA2X7.js.map +1 -0
  11. package/dist/{dist-EKSNZHDY.js → dist-AJWL4WLW.js} +8 -2
  12. package/dist/{dist-VQSZVBT3.js → dist-CTTTHG6U.js} +5 -4
  13. package/dist/{dist-VQSZVBT3.js.map → dist-CTTTHG6U.js.map} +1 -1
  14. package/dist/{dist-U2BHTWG4.js → dist-G5PDFWKH.js} +10 -6
  15. package/dist/dist-G5PDFWKH.js.map +1 -0
  16. package/dist/{dist-FTCDWRAL.js → dist-LUEH7MER.js} +3 -3
  17. package/dist/dist-LUEH7MER.js.map +1 -0
  18. package/dist/{dist-PRDYMXCX.js → dist-T3JIYHCA.js} +3 -3
  19. package/dist/index.js +789 -291
  20. package/dist/index.js.map +1 -1
  21. package/package.json +6 -6
  22. package/runtime/docker/Dockerfile.box +13 -0
  23. package/runtime/docker/packages/ctl/dist/bin.cjs +122 -62
  24. package/runtime/docker/packages/sandbox-docker/scripts/claude-managed-settings.json +4 -4
  25. package/runtime/e2b/agentbox-dockerd-start +145 -0
  26. package/runtime/e2b/attach-helper.cjs +27 -3
  27. package/runtime/e2b/claude-managed-settings.json +4 -4
  28. package/runtime/e2b/ctl.cjs +122 -62
  29. package/runtime/e2b/scripts/build-template.sh +32 -5
  30. package/runtime/hetzner/claude-managed-settings.json +4 -4
  31. package/runtime/hetzner/ctl.cjs +122 -62
  32. package/runtime/hetzner/scripts/install-box.sh +9 -0
  33. package/runtime/relay/bin.cjs +6 -0
  34. package/runtime/vercel/claude-managed-settings.json +4 -4
  35. package/runtime/vercel/ctl.cjs +122 -62
  36. package/runtime/vercel/scripts/provision.sh +20 -0
  37. package/share/host-skills/agentbox/SKILL.md +2 -2
  38. package/share/host-skills/agentbox-info/SKILL.md +6 -6
  39. package/share/host-skills/codex/agentbox.md +2 -2
  40. package/share/host-skills/opencode/agentbox.md +2 -2
  41. package/dist/chunk-A5OFRJDI.js.map +0 -1
  42. package/dist/chunk-JK5V4OLT.js.map +0 -1
  43. package/dist/chunk-SPUUOEW2.js.map +0 -1
  44. package/dist/chunk-Y6PUCLOE.js.map +0 -1
  45. package/dist/dist-FTCDWRAL.js.map +0 -1
  46. package/dist/dist-U2BHTWG4.js.map +0 -1
  47. /package/dist/{_cloud-attach-YM2KOWHO.js.map → _cloud-attach-MH7NKIZY.js.map} +0 -0
  48. /package/dist/{dist-EKSNZHDY.js.map → dist-AJWL4WLW.js.map} +0 -0
  49. /package/dist/{dist-PRDYMXCX.js.map → dist-T3JIYHCA.js.map} +0 -0
@@ -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