@madarco/agentbox 0.20.1 → 0.21.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.
- package/CHANGELOG.md +73 -0
- package/dist/{_cloud-attach-MH7NKIZY.js → _cloud-attach-U3QJO7IF.js} +4 -4
- package/dist/{chunk-52LKNUY7.js → chunk-6JJIKCMY.js} +2 -2
- package/dist/{chunk-P6UT5XGE.js → chunk-DBMLOY3T.js} +11 -3
- package/dist/{chunk-P6UT5XGE.js.map → chunk-DBMLOY3T.js.map} +1 -1
- package/dist/{chunk-NXX3KQZ6.js → chunk-IXQTUXWV.js} +2 -2
- package/dist/{chunk-MODNW54N.js → chunk-KTEDFUKM.js} +2 -2
- package/dist/{chunk-4ATVA3RM.js → chunk-PX7G4PSI.js} +78 -23
- package/dist/chunk-PX7G4PSI.js.map +1 -0
- package/dist/{chunk-3465NDRZ.js → chunk-QKL7PCXQ.js} +127 -11
- package/dist/chunk-QKL7PCXQ.js.map +1 -0
- package/dist/{chunk-7K2A3NLE.js → chunk-X2DWS4KS.js} +14 -6
- package/dist/chunk-X2DWS4KS.js.map +1 -0
- package/dist/{chunk-5N7GA2X7.js → chunk-YZVFGFYQ.js} +263 -881
- package/dist/chunk-YZVFGFYQ.js.map +1 -0
- package/dist/{dist-G5PDFWKH.js → dist-FMA5Y25B.js} +5 -5
- package/dist/{dist-T3JIYHCA.js → dist-NWKOEWUJ.js} +120 -26
- package/dist/dist-NWKOEWUJ.js.map +1 -0
- package/dist/{dist-AJWL4WLW.js → dist-SAS4PIHA.js} +13 -3
- package/dist/{dist-CTTTHG6U.js → dist-U76JL6HI.js} +5 -5
- package/dist/{dist-LUEH7MER.js → dist-UVQJ2BZJ.js} +5 -5
- package/dist/index.js +1236 -561
- package/dist/index.js.map +1 -1
- package/dist/{prepared-state-MQHD3M5F-5ZMCNY43.js → prepared-state-MQHD3M5F-YYVVMTNJ.js} +2 -2
- package/package.json +6 -5
- package/runtime/daytona/custom-system-CLAUDE.md +13 -3
- package/runtime/docker/Dockerfile.box +44 -10
- package/runtime/docker/apps/cli/share/agentbox-setup/SKILL.md +6 -5
- package/runtime/docker/packages/ctl/dist/bin.cjs +324 -109
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-portless-trust +82 -0
- package/runtime/docker/packages/sandbox-docker/scripts/custom-system-CLAUDE.md +12 -3
- package/runtime/e2b/agentbox-setup-skill.md +6 -5
- package/runtime/e2b/ctl.cjs +324 -109
- package/runtime/e2b/custom-system-CLAUDE.md +12 -3
- package/runtime/e2b/scripts/build-template.sh +44 -2
- package/runtime/hetzner/agentbox-portless-trust +82 -0
- package/runtime/hetzner/agentbox-setup-skill.md +6 -5
- package/runtime/hetzner/ctl.cjs +324 -109
- package/runtime/hetzner/custom-system-CLAUDE.md +12 -3
- package/runtime/hetzner/scripts/install-box.sh +51 -7
- package/runtime/relay/bin.cjs +187 -43
- package/runtime/vercel/agentbox-setup-skill.md +6 -5
- package/runtime/vercel/ctl.cjs +324 -109
- package/runtime/vercel/custom-system-CLAUDE.md +12 -3
- package/runtime/vercel/scripts/provision.sh +44 -2
- package/share/agentbox-setup/SKILL.md +6 -5
- package/share/host-skills/agentbox/SKILL.md +14 -0
- package/share/host-skills/agentbox-info/SKILL.md +30 -1
- package/dist/chunk-3465NDRZ.js.map +0 -1
- package/dist/chunk-4ATVA3RM.js.map +0 -1
- package/dist/chunk-5N7GA2X7.js.map +0 -1
- package/dist/chunk-7K2A3NLE.js.map +0 -1
- package/dist/dist-T3JIYHCA.js.map +0 -1
- /package/dist/{_cloud-attach-MH7NKIZY.js.map → _cloud-attach-U3QJO7IF.js.map} +0 -0
- /package/dist/{chunk-52LKNUY7.js.map → chunk-6JJIKCMY.js.map} +0 -0
- /package/dist/{chunk-NXX3KQZ6.js.map → chunk-IXQTUXWV.js.map} +0 -0
- /package/dist/{chunk-MODNW54N.js.map → chunk-KTEDFUKM.js.map} +0 -0
- /package/dist/{dist-G5PDFWKH.js.map → dist-FMA5Y25B.js.map} +0 -0
- /package/dist/{dist-AJWL4WLW.js.map → dist-SAS4PIHA.js.map} +0 -0
- /package/dist/{dist-CTTTHG6U.js.map → dist-U76JL6HI.js.map} +0 -0
- /package/dist/{dist-LUEH7MER.js.map → dist-UVQJ2BZJ.js.map} +0 -0
- /package/dist/{prepared-state-MQHD3M5F-5ZMCNY43.js.map → prepared-state-MQHD3M5F-YYVVMTNJ.js.map} +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Trust a Portless self-signed CA *inside the box* so every in-box HTTPS client
|
|
3
|
+
# accepts the symmetric `https://<box>.localhost` URL.
|
|
4
|
+
#
|
|
5
|
+
# Why this exists: when the host Portless proxy runs in TLS mode, AgentBox
|
|
6
|
+
# serves the same `https://<box>.localhost` URL inside the box (Hetzner: an
|
|
7
|
+
# in-VPS mirror proxy with its own CA at /root/.portless/ca.pem; Docker: the
|
|
8
|
+
# host CA bind-mounted at /home/vscode/.portless/ca.pem). `portless proxy start`
|
|
9
|
+
# at best trusts the CA in the Linux *system* store — it does NOT populate the
|
|
10
|
+
# per-user NSS database that Chromium / Playwright-Chromium read on Linux, so
|
|
11
|
+
# the VNC browser window and Playwright fail with a cert error. We close that
|
|
12
|
+
# gap here by trusting the CA in BOTH the system store and the box user's NSS db.
|
|
13
|
+
#
|
|
14
|
+
# Usage: agentbox-portless-trust <ca-pem-path> [box-user]
|
|
15
|
+
# box-user defaults to `vscode` (the account that runs the agents / browser).
|
|
16
|
+
# Idempotent and best-effort: prints the installed system CA path on stdout
|
|
17
|
+
# (for NODE_EXTRA_CA_CERTS) and never exits non-zero — a trust failure must not
|
|
18
|
+
# break box create/resume.
|
|
19
|
+
|
|
20
|
+
set -uo pipefail
|
|
21
|
+
|
|
22
|
+
CA_SRC="${1:-}"
|
|
23
|
+
BOX_USER="${2:-vscode}"
|
|
24
|
+
SYS_CA_DST="/usr/local/share/ca-certificates/agentbox-portless-ca.crt"
|
|
25
|
+
NSS_NICK="agentbox-portless-ca"
|
|
26
|
+
|
|
27
|
+
warn() { echo "agentbox-portless-trust: $*" >&2; }
|
|
28
|
+
|
|
29
|
+
if [ -z "$CA_SRC" ] || [ ! -r "$CA_SRC" ]; then
|
|
30
|
+
warn "CA file '$CA_SRC' missing or unreadable — nothing to trust"
|
|
31
|
+
exit 0
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
# --- System store (curl / wget / system OpenSSL / Node via the bundle) --------
|
|
35
|
+
# Copy to a world-readable path first; the source may be root-only
|
|
36
|
+
# (/root/.portless/ca.pem) and NODE_EXTRA_CA_CERTS / NSS need to read it as the
|
|
37
|
+
# box user.
|
|
38
|
+
if install -m 0644 "$CA_SRC" "$SYS_CA_DST" 2>/dev/null; then
|
|
39
|
+
if command -v update-ca-certificates >/dev/null 2>&1; then
|
|
40
|
+
update-ca-certificates >/dev/null 2>&1 || warn "update-ca-certificates failed (system store may be stale)"
|
|
41
|
+
fi
|
|
42
|
+
else
|
|
43
|
+
warn "could not stage CA to $SYS_CA_DST"
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
# --- Box user's NSS DB (Chromium / Playwright-Chromium on Linux) --------------
|
|
47
|
+
# Chromium reads sql:\$HOME/.pki/nssdb for the user it runs as. certutil ships in
|
|
48
|
+
# libnss3-tools (baked into the box images).
|
|
49
|
+
if command -v certutil >/dev/null 2>&1; then
|
|
50
|
+
BOX_HOME="$(getent passwd "$BOX_USER" 2>/dev/null | cut -d: -f6)"
|
|
51
|
+
if [ -n "$BOX_HOME" ]; then
|
|
52
|
+
NSSDB="$BOX_HOME/.pki/nssdb"
|
|
53
|
+
# Run the NSS mutations as the box user so the db stays user-owned, even
|
|
54
|
+
# when this script runs as root (the common case: `exec --user root`).
|
|
55
|
+
if [ "$(id -un)" = "$BOX_USER" ]; then
|
|
56
|
+
run_as_user() { bash -c "$1"; }
|
|
57
|
+
else
|
|
58
|
+
run_as_user() { sudo -u "$BOX_USER" -H bash -c "$1"; }
|
|
59
|
+
fi
|
|
60
|
+
run_as_user "mkdir -p '$NSSDB'" 2>/dev/null || warn "could not create $NSSDB"
|
|
61
|
+
# Initialize an empty (password-less) db if none exists yet.
|
|
62
|
+
if [ ! -f "$NSSDB/cert9.db" ]; then
|
|
63
|
+
run_as_user "certutil -d sql:'$NSSDB' -N --empty-password" 2>/dev/null \
|
|
64
|
+
|| warn "certutil -N failed"
|
|
65
|
+
fi
|
|
66
|
+
# Delete-then-add keeps re-runs (resume) idempotent.
|
|
67
|
+
run_as_user "certutil -d sql:'$NSSDB' -D -n '$NSS_NICK'" 2>/dev/null || true
|
|
68
|
+
if run_as_user "certutil -d sql:'$NSSDB' -A -t 'C,,' -n '$NSS_NICK' -i '$SYS_CA_DST'" 2>/dev/null; then
|
|
69
|
+
:
|
|
70
|
+
else
|
|
71
|
+
warn "certutil -A failed — in-box Chromium may not trust the CA"
|
|
72
|
+
fi
|
|
73
|
+
else
|
|
74
|
+
warn "user '$BOX_USER' not found — skipping NSS trust"
|
|
75
|
+
fi
|
|
76
|
+
else
|
|
77
|
+
warn "certutil not found (libnss3-tools missing) — skipping NSS trust"
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
# Emit the system CA path for the caller to wire into NODE_EXTRA_CA_CERTS.
|
|
81
|
+
echo "$SYS_CA_DST"
|
|
82
|
+
exit 0
|
|
@@ -19,7 +19,11 @@ The wrapper already builds `git push <remote> <branch>` host-side from the
|
|
|
19
19
|
registered worktree; the `-- <args>` slot is for extra flags only (e.g.
|
|
20
20
|
`--force-with-lease`, `--tags`). Re-passing the remote or branch makes git
|
|
21
21
|
treat them as refspecs and fails with `refs/remotes/origin/HEAD cannot be
|
|
22
|
-
resolved to branch`.
|
|
22
|
+
resolved to branch`. To make the branch available on the host **without**
|
|
23
|
+
publishing it to the remote, add `--host-only` (e.g. `agentbox-ctl git push
|
|
24
|
+
--host-only`); it lands the branch in the host's local repo only. Add `--as
|
|
25
|
+
<branch>` to choose the host branch name (default: this box's branch), and
|
|
26
|
+
`--force` to allow a non-fast-forward overwrite.
|
|
23
27
|
|
|
24
28
|
For GitHub PR work, use `agentbox-ctl git pr <op> [args...]` — same model,
|
|
25
29
|
relay shells to host `gh`. Ops: `create`, `view`, `list`, `comment`,
|
|
@@ -28,11 +32,16 @@ read-only and run silently; everything else asks the user to confirm in
|
|
|
28
32
|
the host wrapper (deny → exit 10).
|
|
29
33
|
|
|
30
34
|
For ad-hoc file transfers between this box and the host, use
|
|
31
|
-
`agentbox-ctl cp toHost <boxPath
|
|
32
|
-
`agentbox-ctl cp fromHost <hostPath
|
|
35
|
+
`agentbox-ctl cp toHost <boxPath...> <hostPath>` and
|
|
36
|
+
`agentbox-ctl cp fromHost <hostPath...> <boxPath>` (both accept multiple paths; wildcards expand in your shell) or `agentbox-ctl download claude` / `download env` /
|
|
33
37
|
`download config`. They RPC to the host and
|
|
34
38
|
ask the user for confirmation on the wrapper that runs `agentbox claude`;
|
|
35
39
|
deny returns exit 10 (`denied by user`).
|
|
36
40
|
Don't put any timeout on the command, it will run forever and the user will be notified through multiple channels.
|
|
37
41
|
|
|
42
|
+
If an agentbox.yaml file is present, services and docker containers will be started automatically.
|
|
43
|
+
Check the status with `agentbox-ctl status`.
|
|
44
|
+
|
|
45
|
+
To view any web services, open the browser to https://<AGENTBOX_BOX_HOST>. The AGENTBOX_BOX_HOST env var is available in the box and the same url will work from the host as well via a local proxy.
|
|
46
|
+
|
|
38
47
|
Box identity: /etc/agentbox/box.env and the AGENTBOX_* env vars.
|
|
@@ -222,8 +222,9 @@ write back to the host):
|
|
|
222
222
|
`obj`, `packages`, `dist`, `.next`, `target`) are dropped by default; `exclude:`
|
|
223
223
|
is additive. Each carry entry is capped at `box.cpMaxBytes` (default 100 MiB
|
|
224
224
|
after excludes) — the same limit `agentbox cp` enforces.
|
|
225
|
-
- **`agentbox-ctl cp fromHost <hostPath
|
|
226
|
-
— for a one-off copy.
|
|
225
|
+
- **`agentbox-ctl cp fromHost <hostPath...> <boxPath>`** (ad-hoc, from inside the box)
|
|
226
|
+
— for a one-off copy. Takes several sources in one call (last path is the dest,
|
|
227
|
+
which must be a directory). Prompts the user on the host to approve.
|
|
227
228
|
|
|
228
229
|
**The per-copy size limit (important for large/legacy folders).** A single copy is
|
|
229
230
|
blocked above `box.cpMaxBytes` (default **100 MB**) *after* default excludes, so it
|
|
@@ -236,9 +237,9 @@ the biggest remaining folders/subfolders. To get under the limit, EITHER:
|
|
|
236
237
|
- pass `--yes` to copy the whole thing anyway (only when you really need it all).
|
|
237
238
|
|
|
238
239
|
Example: a 2.4 GB legacy folder is mostly `packages/` (NuGet) + `.git`; those are
|
|
239
|
-
excluded by default, and what's left can be
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
excluded by default, and what's left can be copied in one call by listing the
|
|
241
|
+
sub-folders into a destination directory:
|
|
242
|
+
`agentbox-ctl cp fromHost ../legacy/src ../legacy/Database /workspace/legacy/`.
|
|
242
243
|
|
|
243
244
|
## 7. Validate before handing off
|
|
244
245
|
|