@madarco/agentbox 0.7.0 → 0.9.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 (77) hide show
  1. package/dist/_cloud-attach-ZXBCNWJX.js +13 -0
  2. package/dist/{chunk-NW5NYTQM.js → chunk-BXQMIEHC.js} +459 -110
  3. package/dist/chunk-BXQMIEHC.js.map +1 -0
  4. package/dist/{chunk-UK72UQ5U.js → chunk-G3H2L3O2.js} +55 -4
  5. package/dist/chunk-G3H2L3O2.js.map +1 -0
  6. package/dist/{chunk-7KOEFGN2.js → chunk-GU5LW4B5.js} +385 -31
  7. package/dist/chunk-GU5LW4B5.js.map +1 -0
  8. package/dist/chunk-KL36BRN4.js +455 -0
  9. package/dist/chunk-KL36BRN4.js.map +1 -0
  10. package/dist/{chunk-V5KZGB5V.js → chunk-LEV3KICD.js} +18 -2
  11. package/dist/chunk-LEV3KICD.js.map +1 -0
  12. package/dist/chunk-MTVI44DW.js +662 -0
  13. package/dist/chunk-MTVI44DW.js.map +1 -0
  14. package/dist/{chunk-NAVL4R34.js → chunk-NCJP5MTN.js} +1281 -556
  15. package/dist/chunk-NCJP5MTN.js.map +1 -0
  16. package/dist/{cloud-poller-ZIWSADJB-JXFRJUEM.js → cloud-poller-SUNA6ZQC-2RG5WPRN.js} +2 -2
  17. package/dist/{dist-ETCFRVPA.js → dist-32EZBYG4.js} +50 -20
  18. package/dist/{dist-R67WMLCF.js → dist-CX5CGVEB.js} +120 -10
  19. package/dist/dist-CX5CGVEB.js.map +1 -0
  20. package/dist/{dist-QZGJIBT5.js → dist-GDHP34ZK.js} +141 -75
  21. package/dist/dist-GDHP34ZK.js.map +1 -0
  22. package/dist/dist-XML54CNB.js +849 -0
  23. package/dist/dist-XML54CNB.js.map +1 -0
  24. package/dist/index.js +3881 -867
  25. package/dist/index.js.map +1 -1
  26. package/dist/prepared-state-CL4CWXQA-H5THETIM.js +18 -0
  27. package/dist/prepared-state-CL4CWXQA-H5THETIM.js.map +1 -0
  28. package/package.json +7 -5
  29. package/runtime/daytona/custom-system-CLAUDE.md +39 -0
  30. package/runtime/docker/Dockerfile.box +22 -0
  31. package/runtime/docker/apps/cli/share/agentbox-setup/SKILL.md +1 -1
  32. package/runtime/docker/packages/ctl/dist/bin.cjs +1214 -98
  33. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-codex-hooks.json +66 -35
  34. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-vnc-start +15 -1
  35. package/runtime/docker/packages/sandbox-docker/scripts/claude-managed-settings.json +62 -1
  36. package/runtime/docker/packages/sandbox-docker/scripts/custom-system-CLAUDE.md +15 -4
  37. package/runtime/docker/packages/sandbox-docker/scripts/gh-shim +263 -0
  38. package/runtime/docker/packages/sandbox-docker/scripts/git-shim +131 -0
  39. package/runtime/docker/packages/sandbox-docker/scripts/opencode-agentbox-plugin.js +76 -0
  40. package/runtime/hetzner/agentbox-codex-hooks.json +66 -35
  41. package/runtime/hetzner/agentbox-setup-skill.md +1 -1
  42. package/runtime/hetzner/agentbox-vnc-start +15 -1
  43. package/runtime/hetzner/claude-managed-settings.json +62 -1
  44. package/runtime/hetzner/ctl.cjs +1214 -98
  45. package/runtime/hetzner/custom-system-CLAUDE.md +26 -14
  46. package/runtime/hetzner/gh-shim +263 -0
  47. package/runtime/hetzner/git-shim +131 -0
  48. package/runtime/hetzner/opencode-agentbox-plugin.js +76 -0
  49. package/runtime/hetzner/scripts/install-box.sh +11 -2
  50. package/runtime/relay/bin.cjs +1146 -63
  51. package/runtime/vercel/agentbox-checkpoint-cleanup +52 -0
  52. package/runtime/vercel/agentbox-codex-hooks.json +68 -0
  53. package/runtime/vercel/agentbox-open +28 -0
  54. package/runtime/vercel/agentbox-setup-skill.md +196 -0
  55. package/runtime/vercel/agentbox-vnc-start +91 -0
  56. package/runtime/vercel/claude-managed-settings.json +115 -0
  57. package/runtime/vercel/ctl.cjs +23466 -0
  58. package/runtime/vercel/custom-system-CLAUDE.md +50 -0
  59. package/runtime/vercel/gh-shim +263 -0
  60. package/runtime/vercel/git-shim +131 -0
  61. package/runtime/vercel/scripts/provision.sh +274 -0
  62. package/share/agentbox-setup/SKILL.md +1 -1
  63. package/share/host-skills/agentbox/SKILL.md +29 -0
  64. package/share/host-skills/agentbox-info/SKILL.md +211 -0
  65. package/share/host-skills/codex/agentbox.md +35 -0
  66. package/share/host-skills/opencode/agentbox.md +26 -0
  67. package/dist/_cloud-attach-DMVH6GWO.js +0 -12
  68. package/dist/chunk-7KOEFGN2.js.map +0 -1
  69. package/dist/chunk-NAVL4R34.js.map +0 -1
  70. package/dist/chunk-NW5NYTQM.js.map +0 -1
  71. package/dist/chunk-UK72UQ5U.js.map +0 -1
  72. package/dist/chunk-V5KZGB5V.js.map +0 -1
  73. package/dist/dist-QZGJIBT5.js.map +0 -1
  74. package/dist/dist-R67WMLCF.js.map +0 -1
  75. /package/dist/{_cloud-attach-DMVH6GWO.js.map → _cloud-attach-ZXBCNWJX.js.map} +0 -0
  76. /package/dist/{cloud-poller-ZIWSADJB-JXFRJUEM.js.map → cloud-poller-SUNA6ZQC-2RG5WPRN.js.map} +0 -0
  77. /package/dist/{dist-ETCFRVPA.js.map → dist-32EZBYG4.js.map} +0 -0
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ DOCKERFILE_PATH,
4
+ computeDockerContextFingerprint,
5
+ preparedMatches,
6
+ readPreparedDockerState,
7
+ resolveContextFiles,
8
+ writePreparedDockerState
9
+ } from "./chunk-KL36BRN4.js";
10
+ export {
11
+ DOCKERFILE_PATH,
12
+ computeDockerContextFingerprint,
13
+ preparedMatches,
14
+ readPreparedDockerState,
15
+ resolveContextFiles,
16
+ writePreparedDockerState
17
+ };
18
+ //# sourceMappingURL=prepared-state-CL4CWXQA-H5THETIM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madarco/agentbox",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Launch Claude Code, Codex, and other coding agents in isolated sandboxes",
5
5
  "license": "MIT",
6
6
  "author": "Marco D'Alia",
@@ -42,6 +42,7 @@
42
42
  "dependencies": {
43
43
  "@clack/prompts": "^0.9.0",
44
44
  "@daytonaio/sdk": "^0.179.0",
45
+ "@vercel/sandbox": "^2.0.1",
45
46
  "@xterm/headless": "^5.5.0",
46
47
  "commander": "^12.1.0",
47
48
  "execa": "^9.5.2",
@@ -56,13 +57,14 @@
56
57
  "tsup": "^8.3.5",
57
58
  "typescript": "^5.7.2",
58
59
  "vitest": "^2.1.8",
60
+ "@agentbox/sandbox-core": "0.0.0",
59
61
  "@agentbox/core": "0.0.0",
60
- "@agentbox/config": "0.0.0",
61
- "@agentbox/ctl": "0.0.0",
62
62
  "@agentbox/relay": "0.0.0",
63
- "@agentbox/sandbox-cloud": "0.0.0",
64
- "@agentbox/sandbox-core": "0.0.0",
63
+ "@agentbox/ctl": "0.0.0",
64
+ "@agentbox/config": "0.0.0",
65
65
  "@agentbox/sandbox-daytona": "0.0.0",
66
+ "@agentbox/sandbox-vercel": "0.0.0",
67
+ "@agentbox/sandbox-cloud": "0.0.0",
66
68
  "@agentbox/sandbox-docker": "0.0.0",
67
69
  "@agentbox/sandbox-hetzner": "0.0.0"
68
70
  },
@@ -0,0 +1,39 @@
1
+ # AgentBox sandbox (daytona provider)
2
+
3
+ You are running inside an AgentBox sandbox: a Daytona Cloud sandbox
4
+ provisioned just for this box, with docker-in-docker available (run `docker`
5
+ directly, no sudo). Your user is `vscode` and you can use passwordless
6
+ **sudo** to run commands as root. The whole sandbox is yours — the user's
7
+ host filesystem is not visible from here and nothing is bind-mounted.
8
+
9
+ You can save the current filesystem state to be reused by future boxes by
10
+ running `agentbox-ctl checkpoint --set-default`. This doesn't need to be confirmed by the user.
11
+
12
+ `/workspace` is a normal git checkout seeded from the host repo at create
13
+ time (via a `git bundle`). Because there is no host bind-mount, plain `git`
14
+ inside the box only affects this box-local repo — commits do **not** appear
15
+ in the user's host `git log` until you hand them off. For any operation that
16
+ must reach the host repo or its remotes (push, fetch, pull, picking up
17
+ host-side changes), use `agentbox-ctl git push|fetch|pull -- <args>` — it
18
+ RPCs to the host, which runs git with the real SSH agent and writes back into
19
+ the host's worktree state. The wrapper already builds `git push <remote>
20
+ <branch>` host-side from the registered worktree; the `-- <args>` slot is for
21
+ extra flags only (e.g. `--force-with-lease`, `--tags`). Re-passing the remote
22
+ or branch makes git treat them as refspecs and fails with
23
+ `refs/remotes/origin/HEAD cannot be resolved to branch`.
24
+
25
+ For GitHub PR work, use `agentbox-ctl git pr <op> [args...]` — same model,
26
+ relay shells to host `gh`. Ops: `create`, `view`, `list`, `comment`,
27
+ `review`, `merge`, `close`, `reopen`, `checkout`. `view` / `list` are
28
+ read-only and run silently; everything else asks the user to confirm in
29
+ the host wrapper (deny → exit 10).
30
+
31
+ For ad-hoc file transfers between this box and the host, use
32
+ `agentbox-ctl cp toHost <boxPath> <hostPath>` and
33
+ `agentbox-ctl cp fromHost <hostPath> <boxPath>` or `agentbox-ctl download claude` / `download env` /
34
+ `download config`. They RPC to the host and
35
+ ask the user for confirmation on the wrapper that runs `agentbox claude`;
36
+ deny returns exit 10 (`denied by user`).
37
+ Don't put any timeout on the command, it will run forever and the user will be notified through multiple channels.
38
+
39
+ Box identity: /etc/agentbox/box.env and the AGENTBOX_* env vars.
@@ -141,6 +141,19 @@ RUN apt-get update \
141
141
  COPY packages/ctl/dist/bin.cjs /usr/local/bin/agentbox-ctl
142
142
  RUN chmod +x /usr/local/bin/agentbox-ctl
143
143
 
144
+ # `gh` + `git` shims: route a strict subset of upstream subcommands through
145
+ # the host relay (via agentbox-ctl) so the host's authenticated `gh` / git
146
+ # creds stay on the host — the in-box agent never sees a token. The shims
147
+ # also light up Claude Code's branch-linked-to-PR badge (Claude Code calls
148
+ # `gh pr view --json …` on refresh). See packages/sandbox-docker/scripts/
149
+ # {gh,git}-shim and docs/plans/gh-and-git-shims-host-only.md. PATH ordering
150
+ # (line 50 above) puts /usr/local/bin ahead of /usr/bin, so the shim wins;
151
+ # the git shim execs /usr/bin/git directly for everything outside its tiny
152
+ # network-op whitelist (push/pull/fetch/clone).
153
+ COPY packages/sandbox-docker/scripts/gh-shim /usr/local/bin/gh
154
+ COPY packages/sandbox-docker/scripts/git-shim /usr/local/bin/git
155
+ RUN chmod +x /usr/local/bin/gh /usr/local/bin/git
156
+
144
157
  # Setup guide for the first-run wizard. This baked copy is the single source
145
158
  # of the /agentbox-setup skill: seedSetupSkillIntoVolume()
146
159
  # (packages/sandbox-docker/src/claude.ts) copies it into the box's
@@ -421,6 +434,15 @@ RUN chmod 0644 /etc/claude-code/managed-settings.json
421
434
  COPY packages/sandbox-docker/scripts/agentbox-codex-hooks.json /usr/local/share/agentbox/codex-hooks.json
422
435
  RUN chmod 0644 /usr/local/share/agentbox/codex-hooks.json
423
436
 
437
+ # OpenCode activity-reporting plugin. Unlike Claude's managed-settings hooks,
438
+ # OpenCode has no native hooks system — its only extension surface is a plugin
439
+ # loaded from $OPENCODE_CONFIG_DIR/plugins/*.js. The plugin subscribes to
440
+ # OpenCode's event bus and shells `agentbox-ctl opencode-state` on each
441
+ # lifecycle transition. Staged in the image; copied into the OpenCode config
442
+ # volume by seedOpencodePlugin() at create/start time. See packages/sandbox-docker/src/opencode.ts.
443
+ COPY packages/sandbox-docker/scripts/opencode-agentbox-plugin.js /usr/local/share/agentbox/opencode-agentbox-plugin.js
444
+ RUN chmod 0644 /usr/local/share/agentbox/opencode-agentbox-plugin.js
445
+
424
446
  # /etc/agentbox/ holds runtime-injected box.env (written by `agentbox create`
425
447
  # via docker exec). Pre-created here so the writable layer starts with the
426
448
  # right perms; the file itself appears at create time.
@@ -14,7 +14,7 @@ Run `agentbox checkpoint --set-default` (similar to `docker commit`) to save any
14
14
 
15
15
  Some special folders:
16
16
 
17
- - **Host main repo's `.git/`** — If the box bind-mounted RW at its identical absolute host path. In-box commits land on the host's branch refs (visible to `git log` on the host immediately); the box itself carries no SSH/git creds, so `git push` goes through the host relay (`agentbox-ctl git push`). The host's **working tree is never written to** — only refs/objects under `.git/`.
17
+ - **Host main repo's `.git/`** — If the box bind-mounted RW at its identical absolute host path. In-box commits land on the host's branch refs (visible to `git log` on the host immediately); the box itself carries no SSH/git creds, so `git push` goes through the host relay (`agentbox-ctl git push`). The host's **working tree is never written to** — only refs/objects under `.git/`. GitHub PR ops (`agentbox-ctl git pr create|view|list|comment|review|merge|close|reopen|checkout`) flow the same way through host `gh`; write ops require host confirmation (deny → exit 10), `merge` and `checkout` have additional opt-in guards.
18
18
  - **`~/.claude`** — and similar home folders for coding agents are seeded from the host's `~/.claude` on each create so auth, skills, and plugins persist without leaking the host's home dir.
19
19
  - **`agentbox.yaml`** — read by `agentbox-ctl` from `/workspace`. Tasks and services declared here are what the supervisor will run.
20
20