@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.
- package/CHANGELOG.md +62 -0
- package/dist/{_cloud-attach-YM2KOWHO.js → _cloud-attach-THTN4CFZ.js} +7 -5
- package/dist/{chunk-A5OFRJDI.js → chunk-3VFY3N4A.js} +76 -22
- package/dist/chunk-3VFY3N4A.js.map +1 -0
- package/dist/{chunk-Y6PUCLOE.js → chunk-52LKNUY7.js} +5 -2
- package/dist/chunk-52LKNUY7.js.map +1 -0
- package/dist/{chunk-JK5V4OLT.js → chunk-7RWFYLF3.js} +194 -34
- package/dist/chunk-7RWFYLF3.js.map +1 -0
- package/dist/{chunk-SPUUOEW2.js → chunk-ZX6DTA4X.js} +5 -4
- package/dist/chunk-ZX6DTA4X.js.map +1 -0
- package/dist/{dist-EKSNZHDY.js → dist-3PLT2EK2.js} +6 -2
- package/dist/{dist-VQSZVBT3.js → dist-3WFNXXPE.js} +3 -3
- package/dist/{dist-U2BHTWG4.js → dist-7ELDXBAG.js} +6 -5
- package/dist/dist-7ELDXBAG.js.map +1 -0
- package/dist/{dist-PRDYMXCX.js → dist-C3YRC3PP.js} +3 -3
- package/dist/{dist-FTCDWRAL.js → dist-CZ6CRADC.js} +3 -3
- package/dist/index.js +789 -291
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/runtime/docker/packages/ctl/dist/bin.cjs +122 -62
- package/runtime/docker/packages/sandbox-docker/scripts/claude-managed-settings.json +4 -4
- package/runtime/e2b/agentbox-dockerd-start +145 -0
- package/runtime/e2b/attach-helper.cjs +23 -2
- package/runtime/e2b/claude-managed-settings.json +4 -4
- package/runtime/e2b/ctl.cjs +122 -62
- package/runtime/e2b/scripts/build-template.sh +22 -5
- package/runtime/hetzner/claude-managed-settings.json +4 -4
- package/runtime/hetzner/ctl.cjs +122 -62
- package/runtime/relay/bin.cjs +6 -0
- package/runtime/vercel/claude-managed-settings.json +4 -4
- package/runtime/vercel/ctl.cjs +122 -62
- package/share/host-skills/agentbox/SKILL.md +2 -2
- package/share/host-skills/agentbox-info/SKILL.md +6 -6
- package/share/host-skills/codex/agentbox.md +2 -2
- package/share/host-skills/opencode/agentbox.md +2 -2
- package/dist/chunk-A5OFRJDI.js.map +0 -1
- package/dist/chunk-JK5V4OLT.js.map +0 -1
- package/dist/chunk-SPUUOEW2.js.map +0 -1
- package/dist/chunk-Y6PUCLOE.js.map +0 -1
- package/dist/dist-U2BHTWG4.js.map +0 -1
- /package/dist/{_cloud-attach-YM2KOWHO.js.map → _cloud-attach-THTN4CFZ.js.map} +0 -0
- /package/dist/{dist-EKSNZHDY.js.map → dist-3PLT2EK2.js.map} +0 -0
- /package/dist/{dist-VQSZVBT3.js.map → dist-3WFNXXPE.js.map} +0 -0
- /package/dist/{dist-PRDYMXCX.js.map → dist-C3YRC3PP.js.map} +0 -0
- /package/dist/{dist-FTCDWRAL.js.map → dist-CZ6CRADC.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,68 @@ Entries are generated from the commit history with `/release-notes` and then
|
|
|
9
9
|
hand-reviewed — they describe what changed for someone using the `agentbox`
|
|
10
10
|
CLI, not the raw commits.
|
|
11
11
|
|
|
12
|
+
## [0.20.0] - 2026-06-24
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **Boxes resume your running agent across a restart.** When a box stops (or a
|
|
17
|
+
cloud box idle-pauses and resumes), `agentbox start` — and attaching to a
|
|
18
|
+
down box, and cloud idle-wake — now relaunches the agent resuming the *same*
|
|
19
|
+
conversation (`claude --resume`, `codex resume --last`) instead of opening a
|
|
20
|
+
fresh session, so background/`-i` work isn't lost. Verified on docker,
|
|
21
|
+
vercel, and hetzner. Requires a docker image rebuild / cloud re-`prepare`;
|
|
22
|
+
until then it no-ops.
|
|
23
|
+
- **Headless `agentbox claude login` for non-interactive use.** Sign in without
|
|
24
|
+
a TTY (CI, an orchestrating agent) via a two-call protocol:
|
|
25
|
+
`agentbox claude login --headless` prints the approval URL (and a greppable
|
|
26
|
+
`AGENTBOX_LOGIN_URL=` marker), then `agentbox claude login --code <CODE>`
|
|
27
|
+
completes it. Headless mode is auto-selected when stdin is not a TTY;
|
|
28
|
+
interactive login is unchanged.
|
|
29
|
+
- **E2B now runs docker-in-docker by default.** In-box docker is baked into the
|
|
30
|
+
E2B base template and `dockerd` auto-starts on create/resume — nested
|
|
31
|
+
containers work on E2B (full root + namespaces), matching the other cloud
|
|
32
|
+
providers. Re-`prepare --provider e2b` to pick it up.
|
|
33
|
+
- **Configurable E2B session timeout.** New `box.e2bTimeoutMs` config key
|
|
34
|
+
(default 45m, mirrors `box.vercelTimeoutMs`) records the box's real session
|
|
35
|
+
lifetime so the keepalive holds the box open precisely while the agent is
|
|
36
|
+
working.
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- **Non-interactive runs fail fast on a missing or expired Claude login.** The
|
|
41
|
+
`-i` queue preflight and TTY-less foreground runs now check credential
|
|
42
|
+
validity (expiry is consulted on cloud) and exit early with an
|
|
43
|
+
`agentbox claude login` hint, instead of creating a box whose agent silently
|
|
44
|
+
parks on its `/login` screen.
|
|
45
|
+
- **Herdr plugin is discoverable from the marketplace.** The `herdr-plugin.toml`
|
|
46
|
+
manifest moved to the repo root, so the install shorthand is now
|
|
47
|
+
`herdr plugin install madarco/agentbox`.
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- **Multi-line `-i` seed prompts survive on cloud.** A multi-paragraph seed
|
|
52
|
+
prompt passed to a detached cloud `-i` run was being split into one argument
|
|
53
|
+
per line, killing the agent at launch; prompts are now encoded so embedded
|
|
54
|
+
newlines are preserved.
|
|
55
|
+
- **`-i` fan-out reliably opens its Herdr terminal.** Concurrent box launches no
|
|
56
|
+
longer trip "herdr gave no pane id" — JSON-RPC replies are now matched by
|
|
57
|
+
request id (ignoring interleaved notifications), and pane ids with letters
|
|
58
|
+
(`:pA`, `:pB`, …) are accepted.
|
|
59
|
+
- **Cloud `-i` start failures surface instead of reporting done.** A detached
|
|
60
|
+
cloud session that fails to launch (transient SDK error, agent crash, stale
|
|
61
|
+
in-box credentials) is now marked failed with an actionable hint, rather than
|
|
62
|
+
silently writing `status: done` with no agent running.
|
|
63
|
+
- **`agentbox create --provider <cloud> -w ../repo`** now resolves a relative
|
|
64
|
+
workspace path to absolute, fixing the git seed that failed with "does not
|
|
65
|
+
appear to be a git repository".
|
|
66
|
+
- **E2B fixes:** the dashboard attach now forwards the provider env so the
|
|
67
|
+
attach helper gets its inner command (right pane no longer blank); the
|
|
68
|
+
create→attach pre-start no longer hangs the CLI on a blank screen.
|
|
69
|
+
- **Docker Claude config sync** no longer aborts (rsync exit 23) on nested
|
|
70
|
+
symlinked skill dirs that point outside the box, and a box whose shared-volume
|
|
71
|
+
login token was blanked by a failed in-box refresh now re-offers sign-in
|
|
72
|
+
before launch instead of booting into a login error.
|
|
73
|
+
|
|
12
74
|
## [0.19.0] - 2026-06-23
|
|
13
75
|
|
|
14
76
|
### Added
|
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
buildCloudAttachInnerCommand,
|
|
4
4
|
cloudAgentAttach,
|
|
5
|
-
cloudAgentStartDetached
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
cloudAgentStartDetached,
|
|
6
|
+
verifyDetachedSession
|
|
7
|
+
} from "./chunk-7RWFYLF3.js";
|
|
8
|
+
import "./chunk-3VFY3N4A.js";
|
|
8
9
|
import "./chunk-7K2A3NLE.js";
|
|
9
10
|
import "./chunk-G3H2L3O2.js";
|
|
10
11
|
import "./chunk-WJFZJZIM.js";
|
|
11
12
|
export {
|
|
12
13
|
buildCloudAttachInnerCommand,
|
|
13
14
|
cloudAgentAttach,
|
|
14
|
-
cloudAgentStartDetached
|
|
15
|
+
cloudAgentStartDetached,
|
|
16
|
+
verifyDetachedSession
|
|
15
17
|
};
|
|
16
|
-
//# sourceMappingURL=_cloud-attach-
|
|
18
|
+
//# sourceMappingURL=_cloud-attach-THTN4CFZ.js.map
|
|
@@ -968,6 +968,7 @@ var BUILT_IN_DEFAULTS = {
|
|
|
968
968
|
vercelVcpus: 2,
|
|
969
969
|
vercelTimeoutMs: 27e5,
|
|
970
970
|
vercelNetworkPolicy: "",
|
|
971
|
+
e2bTimeoutMs: 27e5,
|
|
971
972
|
cpMaxBytes: 100 * 1024 * 1024
|
|
972
973
|
},
|
|
973
974
|
checkpoint: {
|
|
@@ -1251,6 +1252,11 @@ var KEY_REGISTRY = [
|
|
|
1251
1252
|
type: "int",
|
|
1252
1253
|
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."
|
|
1253
1254
|
},
|
|
1255
|
+
{
|
|
1256
|
+
key: "box.e2bTimeoutMs",
|
|
1257
|
+
type: "int",
|
|
1258
|
+
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."
|
|
1259
|
+
},
|
|
1254
1260
|
{
|
|
1255
1261
|
key: "box.cpMaxBytes",
|
|
1256
1262
|
type: "int",
|
|
@@ -4617,6 +4623,41 @@ async function hostBackupHasCredentials(path = CREDENTIALS_BACKUP_FILE) {
|
|
|
4617
4623
|
return false;
|
|
4618
4624
|
}
|
|
4619
4625
|
}
|
|
4626
|
+
function parseVolumeClaudeCredentials(stdout) {
|
|
4627
|
+
return {
|
|
4628
|
+
present: /\bPRESENT=yes\b/.test(stdout),
|
|
4629
|
+
hasRefreshToken: /\bREFRESH=yes\b/.test(stdout)
|
|
4630
|
+
};
|
|
4631
|
+
}
|
|
4632
|
+
var VOLUME_CRED_PROBE_SCRIPT = `
|
|
4633
|
+
PRESENT=no
|
|
4634
|
+
REFRESH=no
|
|
4635
|
+
VOL=/dst/.credentials.json
|
|
4636
|
+
if [ -f "$VOL" ]; then
|
|
4637
|
+
PRESENT=yes
|
|
4638
|
+
if jq -e '(.claudeAiOauth.refreshToken // "") | length > 0' "$VOL" >/dev/null 2>&1; then REFRESH=yes; fi
|
|
4639
|
+
fi
|
|
4640
|
+
echo "PRESENT=$PRESENT REFRESH=$REFRESH"
|
|
4641
|
+
`;
|
|
4642
|
+
async function volumeClaudeCredentials(volume, image) {
|
|
4643
|
+
try {
|
|
4644
|
+
const { stdout } = await execa4("docker", [
|
|
4645
|
+
"run",
|
|
4646
|
+
"--rm",
|
|
4647
|
+
"--user",
|
|
4648
|
+
"0",
|
|
4649
|
+
"-v",
|
|
4650
|
+
`${volume}:/dst`,
|
|
4651
|
+
image,
|
|
4652
|
+
"sh",
|
|
4653
|
+
"-c",
|
|
4654
|
+
VOLUME_CRED_PROBE_SCRIPT
|
|
4655
|
+
]);
|
|
4656
|
+
return parseVolumeClaudeCredentials(stdout);
|
|
4657
|
+
} catch {
|
|
4658
|
+
return { present: false, hasRefreshToken: false };
|
|
4659
|
+
}
|
|
4660
|
+
}
|
|
4620
4661
|
function parseSyncResult(stdout) {
|
|
4621
4662
|
const volumeHasCredentials = /\bVOLREAL=yes\b/.test(stdout);
|
|
4622
4663
|
if (/\bEXTRACTED=yes\b/.test(stdout)) return { direction: "extracted", volumeHasCredentials };
|
|
@@ -5201,32 +5242,43 @@ async function findUnsyncableSymlinks(root, reachableRoots) {
|
|
|
5201
5242
|
})
|
|
5202
5243
|
);
|
|
5203
5244
|
const unsyncable = [];
|
|
5204
|
-
|
|
5205
|
-
|
|
5245
|
+
const onPath = /* @__PURE__ */ new Set();
|
|
5246
|
+
async function walk(realDir, virtualDir) {
|
|
5247
|
+
if (onPath.has(realDir)) return;
|
|
5248
|
+
onPath.add(realDir);
|
|
5206
5249
|
try {
|
|
5207
|
-
entries
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5250
|
+
let entries;
|
|
5251
|
+
try {
|
|
5252
|
+
entries = await readdir3(realDir, { withFileTypes: true });
|
|
5253
|
+
} catch {
|
|
5254
|
+
return;
|
|
5255
|
+
}
|
|
5256
|
+
for (const ent of entries) {
|
|
5257
|
+
const realFull = join4(realDir, ent.name);
|
|
5258
|
+
const virtualFull = virtualDir ? join4(virtualDir, ent.name) : ent.name;
|
|
5259
|
+
if (ent.isSymbolicLink()) {
|
|
5260
|
+
let real;
|
|
5261
|
+
try {
|
|
5262
|
+
real = await realpath2(realFull);
|
|
5263
|
+
} catch {
|
|
5264
|
+
unsyncable.push(virtualFull);
|
|
5265
|
+
continue;
|
|
5266
|
+
}
|
|
5267
|
+
if (!reachable.some((r) => isUnder(r, real))) {
|
|
5268
|
+
unsyncable.push(virtualFull);
|
|
5269
|
+
continue;
|
|
5270
|
+
}
|
|
5271
|
+
const st = await stat3(real).catch(() => null);
|
|
5272
|
+
if (st?.isDirectory()) await walk(real, virtualFull);
|
|
5273
|
+
} else if (ent.isDirectory()) {
|
|
5274
|
+
await walk(realFull, virtualFull);
|
|
5223
5275
|
}
|
|
5224
|
-
} else if (ent.isDirectory()) {
|
|
5225
|
-
await walk(full);
|
|
5226
5276
|
}
|
|
5277
|
+
} finally {
|
|
5278
|
+
onPath.delete(realDir);
|
|
5227
5279
|
}
|
|
5228
5280
|
}
|
|
5229
|
-
await walk(root);
|
|
5281
|
+
await walk(root, "");
|
|
5230
5282
|
return unsyncable;
|
|
5231
5283
|
}
|
|
5232
5284
|
async function ensureClaudeVolume(spec, opts) {
|
|
@@ -10632,6 +10684,8 @@ export {
|
|
|
10632
10684
|
extractCodexCredentials,
|
|
10633
10685
|
extractOpencodeCredentials,
|
|
10634
10686
|
hostBackupHasCredentials,
|
|
10687
|
+
parseVolumeClaudeCredentials,
|
|
10688
|
+
volumeClaudeCredentials,
|
|
10635
10689
|
parseSyncResult,
|
|
10636
10690
|
syncClaudeCredentials,
|
|
10637
10691
|
encodeClaudeProjectsKey,
|
|
@@ -10855,4 +10909,4 @@ smol-toml/dist/index.js:
|
|
|
10855
10909
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
10856
10910
|
*)
|
|
10857
10911
|
*/
|
|
10858
|
-
//# sourceMappingURL=chunk-
|
|
10912
|
+
//# sourceMappingURL=chunk-3VFY3N4A.js.map
|