@madarco/agentbox 0.24.6 → 0.25.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.
- package/CHANGELOG.md +69 -0
- package/LICENSE +21 -0
- package/README.md +4 -0
- package/dist/{_cloud-attach-ESCPOKG5.js → _cloud-attach-FGMI2ZHO.js} +5 -5
- package/dist/{chunk-4HPLS5HJ.js → chunk-3BR63LCB.js} +110 -9
- package/dist/chunk-3BR63LCB.js.map +1 -0
- package/dist/{chunk-OSPM4Q5V.js → chunk-3PSRBK24.js} +6 -6
- package/dist/chunk-3PSRBK24.js.map +1 -0
- package/dist/{chunk-CE3S7UDQ.js → chunk-4DBLYT2F.js} +44 -12
- package/dist/chunk-4DBLYT2F.js.map +1 -0
- package/dist/{chunk-3MDYQROX.js → chunk-4LS2TOF3.js} +17 -13
- package/dist/chunk-4LS2TOF3.js.map +1 -0
- package/dist/{chunk-H6A4BQMG.js → chunk-5F5SOSDY.js} +40 -1
- package/dist/chunk-5F5SOSDY.js.map +1 -0
- package/dist/{chunk-LJMGHFLZ.js → chunk-5VNL6SHJ.js} +3 -3
- package/dist/{chunk-7DPDUZ7L.js → chunk-67VF2QZC.js} +194 -56
- package/dist/chunk-67VF2QZC.js.map +1 -0
- package/dist/{chunk-RFRWS5CD.js → chunk-6GZK74GT.js} +2 -2
- package/dist/chunk-G3H2L3O2.js +0 -0
- package/dist/{chunk-5JDOTQTM.js → chunk-P5U6AP6K.js} +4 -4
- package/dist/chunk-WJFZJZIM.js +0 -0
- package/dist/{chunk-QHISF6O6.js → chunk-ZTSVY3YL.js} +3 -3
- package/dist/cloud-poller-SUNA6ZQC-7M5LJHHE.js +0 -0
- package/dist/{dist-VFPT5TDH.js → dist-4I7XHDC3.js} +6 -6
- package/dist/dist-5G42NFOG.js +677 -0
- package/dist/dist-5G42NFOG.js.map +1 -0
- package/dist/{dist-TRKHS6I7.js → dist-AZUD2LUA.js} +6 -6
- package/dist/{dist-FGXCG4JY.js → dist-MEK44IS5.js} +6 -6
- package/dist/{dist-HPPHBZTO.js → dist-SBDYDH7H.js} +8 -2
- package/dist/{dist-NOUPH5E6.js → dist-SN6ABGMD.js} +4 -4
- package/dist/{dist-3M53BF4E.js → dist-X7R2EMJL.js} +6 -6
- package/dist/index.js +114 -38
- package/dist/index.js.map +1 -1
- package/dist/{prepared-state-BUO75YLZ-46W2PAHH.js → prepared-state-75DIZ55S-5UAKJX3L.js} +2 -2
- package/package.json +29 -30
- package/runtime/_shared/agentbox-checkpoint-cleanup +0 -0
- package/runtime/_shared/agentbox-dockerd-start +0 -0
- package/runtime/_shared/agentbox-open +0 -0
- package/runtime/_shared/agentbox-portless-trust +0 -0
- package/runtime/_shared/agentbox-vnc-start +0 -0
- package/runtime/_shared/ctl.cjs +31 -4
- package/runtime/_shared/gh-shim +0 -0
- package/runtime/_shared/git-shim +0 -0
- package/runtime/_shared/linear-shim +0 -0
- package/runtime/_shared/ntn-shim +0 -0
- package/runtime/digitalocean/agentbox-checkpoint-cleanup +0 -0
- package/runtime/digitalocean/agentbox-dockerd-start +0 -0
- package/runtime/digitalocean/agentbox-open +0 -0
- package/runtime/digitalocean/agentbox-portless-trust +0 -0
- package/runtime/digitalocean/agentbox-vnc-start +0 -0
- package/runtime/digitalocean/ctl.cjs +31 -4
- package/runtime/digitalocean/gh-shim +0 -0
- package/runtime/digitalocean/git-shim +0 -0
- package/runtime/digitalocean/linear-shim +0 -0
- package/runtime/digitalocean/ntn-shim +0 -0
- package/runtime/digitalocean/scripts/install-box.sh +0 -0
- package/runtime/docker/packages/ctl/dist/bin.cjs +31 -4
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-checkpoint-cleanup +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-dockerd-start +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-open +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-portless-trust +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-sshd-start +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-vnc-start +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/chromium-resolver +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/gh-shim +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/git-shim +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/linear-shim +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/ntn-shim +0 -0
- package/runtime/e2b/agentbox-checkpoint-cleanup +0 -0
- package/runtime/e2b/agentbox-dockerd-start +0 -0
- package/runtime/e2b/agentbox-open +0 -0
- package/runtime/e2b/agentbox-vnc-start +0 -0
- package/runtime/e2b/ctl.cjs +31 -4
- package/runtime/e2b/gh-shim +0 -0
- package/runtime/e2b/git-shim +0 -0
- package/runtime/e2b/linear-shim +0 -0
- package/runtime/e2b/ntn-shim +0 -0
- package/runtime/e2b/scripts/build-template.sh +0 -0
- package/runtime/hetzner/agentbox-checkpoint-cleanup +0 -0
- package/runtime/hetzner/agentbox-dockerd-start +0 -0
- package/runtime/hetzner/agentbox-open +0 -0
- package/runtime/hetzner/agentbox-portless-trust +0 -0
- package/runtime/hetzner/agentbox-vnc-start +0 -0
- package/runtime/hetzner/ctl.cjs +31 -4
- package/runtime/hetzner/gh-shim +0 -0
- package/runtime/hetzner/git-shim +0 -0
- package/runtime/hetzner/linear-shim +0 -0
- package/runtime/hetzner/ntn-shim +0 -0
- package/runtime/hetzner/scripts/install-box.sh +0 -0
- package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
- package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
- package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1lmiq._.js +6 -6
- package/runtime/hub/apps/hub/.next/server/chunks/_0760z6y._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ro6vh6._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
- package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
- package/runtime/hub/apps/hub/{auth-HY5K55Y5.js → auth-MVL4NCQC.js} +3 -3
- package/runtime/hub/apps/hub/{auth-config-MNW2XGKK.js → auth-config-GRIXACTV.js} +3 -3
- package/runtime/hub/apps/hub/{chunk-5KMJIVZC.js → chunk-23AU7VYS.js} +111 -10
- package/runtime/hub/apps/hub/{chunk-OF242BLD.js → chunk-CKBHQ7OI.js} +1 -1
- package/runtime/hub/apps/hub/{chunk-DNR2YM2G.js → chunk-GARA7RQW.js} +58 -10
- package/runtime/hub/apps/hub/{chunk-PROXBLRJ.js → chunk-JLG5JJXD.js} +1 -1
- package/runtime/hub/apps/hub/{chunk-TZFWAJVB.js → chunk-OG4KH2FZ.js} +5 -0
- package/runtime/hub/apps/hub/chunk-QYJ37CUJ.js +62140 -0
- package/runtime/hub/apps/hub/{chunk-EY6HEDTK.js → chunk-RSENJ2FT.js} +17 -13
- package/runtime/hub/apps/hub/{chunk-EFW34I43.js → chunk-UDZ3VXRF.js} +1 -1
- package/runtime/hub/apps/hub/{chunk-TRUQCO4U.js → chunk-V3OMPMI3.js} +40 -1
- package/runtime/hub/apps/hub/{cloud-poller-SUNA6ZQC-VSKVMYHL.js → cloud-poller-SUNA6ZQC-YAWTNA2W.js} +1 -1
- package/runtime/hub/apps/hub/{dist-KV5ESR24.js → dist-DZGSA3US.js} +7 -7
- package/runtime/hub/apps/hub/{dist-NTKPAYA3.js → dist-IZ2JCN5R.js} +8 -2
- package/runtime/hub/apps/hub/{dist-M73U3ZDH.js → dist-JVU3QCLG.js} +7 -7
- package/runtime/hub/apps/hub/{dist-3DCKZYID.js → dist-TP4SXMDY.js} +596 -113
- package/runtime/hub/apps/hub/{dist-YCRESLWD.js → dist-VWSHZIPN.js} +7 -7
- package/runtime/hub/apps/hub/{dist-SX2NXGI6.js → dist-WZKTIA2R.js} +7 -7
- package/runtime/hub/apps/hub/{dist-RSWTJWRN.js → dist-YWY2DSSL.js} +5 -5
- package/runtime/hub/apps/hub/esm-VGBJAFLR.js +79 -0
- package/runtime/hub/apps/hub/{execa-4DLVNM6E.js → execa-AFY4ZODY.js} +2 -2
- package/runtime/hub/apps/hub/{hub-token-QKQWV2I6.js → hub-token-BJG6Q5II.js} +3 -3
- package/runtime/hub/apps/hub/{prepared-state-BUO75YLZ-KR4YLKDC.js → prepared-state-75DIZ55S-JDILR4OP.js} +3 -3
- package/runtime/hub/apps/hub/server.js +19 -19
- package/runtime/relay/bin.cjs +177 -42
- package/runtime/vercel/agentbox-checkpoint-cleanup +0 -0
- package/runtime/vercel/agentbox-dockerd-start +0 -0
- package/runtime/vercel/agentbox-open +0 -0
- package/runtime/vercel/agentbox-vnc-start +0 -0
- package/runtime/vercel/ctl.cjs +31 -4
- package/runtime/vercel/gh-shim +0 -0
- package/runtime/vercel/git-shim +0 -0
- package/runtime/vercel/linear-shim +0 -0
- package/runtime/vercel/ntn-shim +0 -0
- package/runtime/vercel/scripts/provision.sh +0 -0
- package/dist/chunk-3MDYQROX.js.map +0 -1
- package/dist/chunk-4HPLS5HJ.js.map +0 -1
- package/dist/chunk-7DPDUZ7L.js.map +0 -1
- package/dist/chunk-CE3S7UDQ.js.map +0 -1
- package/dist/chunk-H6A4BQMG.js.map +0 -1
- package/dist/chunk-OSPM4Q5V.js.map +0 -1
- package/dist/dist-2N3XHMBQ.js +0 -322
- package/dist/dist-2N3XHMBQ.js.map +0 -1
- /package/dist/{_cloud-attach-ESCPOKG5.js.map → _cloud-attach-FGMI2ZHO.js.map} +0 -0
- /package/dist/{chunk-LJMGHFLZ.js.map → chunk-5VNL6SHJ.js.map} +0 -0
- /package/dist/{chunk-RFRWS5CD.js.map → chunk-6GZK74GT.js.map} +0 -0
- /package/dist/{chunk-5JDOTQTM.js.map → chunk-P5U6AP6K.js.map} +0 -0
- /package/dist/{chunk-QHISF6O6.js.map → chunk-ZTSVY3YL.js.map} +0 -0
- /package/dist/{dist-HPPHBZTO.js.map → dist-4I7XHDC3.js.map} +0 -0
- /package/dist/{dist-NOUPH5E6.js.map → dist-AZUD2LUA.js.map} +0 -0
- /package/dist/{dist-FGXCG4JY.js.map → dist-MEK44IS5.js.map} +0 -0
- /package/dist/{dist-TRKHS6I7.js.map → dist-SBDYDH7H.js.map} +0 -0
- /package/dist/{dist-VFPT5TDH.js.map → dist-SN6ABGMD.js.map} +0 -0
- /package/dist/{dist-3M53BF4E.js.map → dist-X7R2EMJL.js.map} +0 -0
- /package/dist/{prepared-state-BUO75YLZ-46W2PAHH.js.map → prepared-state-75DIZ55S-5UAKJX3L.js.map} +0 -0
- /package/runtime/hub/apps/hub/.next/static/{2LDXStEUVHS2oK1ID_Uvo → fo5EgsHa6PFLTBagfLiuM}/_buildManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{2LDXStEUVHS2oK1ID_Uvo → fo5EgsHa6PFLTBagfLiuM}/_clientMiddlewareManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{2LDXStEUVHS2oK1ID_Uvo → fo5EgsHa6PFLTBagfLiuM}/_ssgManifest.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,75 @@ 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.25.1] - 2026-07-13
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- `box.claudeInstall: npm` now pulls the prebuilt box image instead of building
|
|
17
|
+
it locally every time. The pull was hard-disabled for npm mode, from back when
|
|
18
|
+
only the native image was published — most visible as the throwaway container
|
|
19
|
+
behind `claude` sign-in baking from scratch. 0.25.0 started publishing the npm
|
|
20
|
+
image; this actually uses it.
|
|
21
|
+
|
|
22
|
+
## [0.25.0] - 2026-07-13
|
|
23
|
+
|
|
24
|
+
### Breaking
|
|
25
|
+
|
|
26
|
+
- Daytona boxes now default to the `linux-vm` sandbox class, which Daytona runs
|
|
27
|
+
in **`us-east-1` only** — so new boxes are pinned to US-East. Set
|
|
28
|
+
`box.daytonaClass: container` to keep the old behavior and your choice of
|
|
29
|
+
region. Existing container base snapshots keep working (a box boots the class
|
|
30
|
+
its base was baked as); run `agentbox prepare --provider daytona --force` to
|
|
31
|
+
move to a VM base.
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- **Daytona `linux-vm` sandbox class** (`box.daytonaClass`, default `linux-vm`).
|
|
36
|
+
`agentbox pause` is now a true VM freeze — CPU and memory are preserved, so
|
|
37
|
+
running processes and tmux sessions survive `unpause`. Checkpoints work
|
|
38
|
+
(~2 s capture; the old endpoint 404'd), and the base bake drops from ~7 min to
|
|
39
|
+
~66 s. New keys: `box.daytonaRegion`, `box.daytonaTimeoutMs`,
|
|
40
|
+
`box.daytonaVmBaseImage`.
|
|
41
|
+
- Idle Daytona boxes now pause themselves after `box.daytonaTimeoutMs` (25 min).
|
|
42
|
+
The host enforces this: Daytona's own idle timer is reset by any request to the
|
|
43
|
+
sandbox — including AgentBox's own polling — so it never fired, and idle boxes
|
|
44
|
+
billed indefinitely.
|
|
45
|
+
- The box image is published for `box.claudeInstall: npm` too, so npm-mode users
|
|
46
|
+
get a pull hit instead of a silent local image build — and can use `linux-vm`
|
|
47
|
+
boxes, which can only boot from a published image.
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- Daytona attach honors `attach.openIn` (`split`/`tab`/`window`) like every other
|
|
52
|
+
provider, instead of always taking over the current terminal.
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
|
|
56
|
+
- `agentbox pause` on a container-class Daytona box failed outright with
|
|
57
|
+
`Sandbox is not stopped`.
|
|
58
|
+
- `agentbox shell` against a paused cloud box now resumes it first, rather than
|
|
59
|
+
failing — both the interactive and the one-shot `-- cmd` forms, on every cloud
|
|
60
|
+
provider.
|
|
61
|
+
- `agentbox daytona claude` (and `codex`/`opencode`, queued `-i` jobs, and the
|
|
62
|
+
dashboard) now boot from the base snapshot `prepare` baked. They read the
|
|
63
|
+
generic `box.image` instead of the per-provider key, so they ignored it — a
|
|
64
|
+
silent ~7-min rebuild per create, and on `linux-vm` a hard failure.
|
|
65
|
+
- Daytona interactive attach dropped instantly into "box rebooting —
|
|
66
|
+
reconnecting…" on a perfectly healthy box.
|
|
67
|
+
- `agentbox screen` on a `linux-vm` box opened the VNC desktop but no browser:
|
|
68
|
+
the image's environment (`DISPLAY`, …) is dropped by the VM conversion, and is
|
|
69
|
+
now restored.
|
|
70
|
+
- `agentbox prepare --provider daytona` no longer dies when it has to fall back
|
|
71
|
+
to a container base, and `create` no longer demands a VM base that the fallback
|
|
72
|
+
never produced.
|
|
73
|
+
- The box image is republished whenever its content changes. The publish workflow
|
|
74
|
+
filtered on paths that missed most of the image's real inputs, so an image
|
|
75
|
+
could silently go unpublished — which on Daytona quietly downgraded a VM box to
|
|
76
|
+
a container.
|
|
77
|
+
- `@madarco/agentbox-provider-sdk` 2.3.0: `CloudBackend` gains `timeoutModel` and
|
|
78
|
+
`attachExecLacksTty`, `AttachSpec` gains `initialInput`, and the box record
|
|
79
|
+
carries `sandboxClass`. Additive only.
|
|
80
|
+
|
|
12
81
|
## [0.24.6] - 2026-07-12
|
|
13
82
|
|
|
14
83
|
### Fixed
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Marco D'Alia
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -199,6 +199,10 @@ pnpm --filter @madarco/agentbox-provider-sdk pack:test
|
|
|
199
199
|
|
|
200
200
|
Full guide: [Build a provider](https://agent-box.sh/docs/build-a-provider) (and the authoring reference [`docs/provider-plugins.md`](https://github.com/madarco/agentbox/blob/main/docs/provider-plugins.md)). Reference packages: [`examples/agentbox-provider-sample`](https://github.com/madarco/agentbox/blob/main/examples/agentbox-provider-sample) (stub) and [`examples/agentbox-provider-example`](https://github.com/madarco/agentbox/blob/main/examples/agentbox-provider-example) (a real, Vercel-backed provider).
|
|
201
201
|
|
|
202
|
+
# Contributing
|
|
203
|
+
|
|
204
|
+
Bug reports, docs fixes, and provider work are welcome — see [CONTRIBUTING.md](https://github.com/madarco/agentbox/blob/main/CONTRIBUTING.md). First-time contributors sign a one-line [CLA](https://github.com/madarco/agentbox/blob/main/.github/CLA.md) on their first pull request. Security issues go through [SECURITY.md](https://github.com/madarco/agentbox/blob/main/SECURITY.md), not a public issue.
|
|
205
|
+
|
|
202
206
|
# Author
|
|
203
207
|
|
|
204
208
|
[Marco D'Alia](https://www.madarco.net) - [@madarco](https://x.com/madarco) - [Linkedin](https://www.linkedin.com/in/marcodalia/)
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
cloudAgentAttach,
|
|
5
5
|
cloudAgentStartDetached,
|
|
6
6
|
verifyDetachedSession
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-4DBLYT2F.js";
|
|
8
|
+
import "./chunk-3PSRBK24.js";
|
|
9
|
+
import "./chunk-5F5SOSDY.js";
|
|
10
|
+
import "./chunk-4LS2TOF3.js";
|
|
11
11
|
import "./chunk-G3H2L3O2.js";
|
|
12
12
|
import "./chunk-WJFZJZIM.js";
|
|
13
13
|
export {
|
|
@@ -16,4 +16,4 @@ export {
|
|
|
16
16
|
cloudAgentStartDetached,
|
|
17
17
|
verifyDetachedSession
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=_cloud-attach-
|
|
19
|
+
//# sourceMappingURL=_cloud-attach-FGMI2ZHO.js.map
|
|
@@ -22,13 +22,13 @@ import {
|
|
|
22
22
|
readBoxStatus,
|
|
23
23
|
registerBoxWithRelay,
|
|
24
24
|
syncClaudeCredentials
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-3PSRBK24.js";
|
|
26
26
|
import {
|
|
27
27
|
hashProjectPath,
|
|
28
28
|
loadEffectiveConfig,
|
|
29
29
|
projectDirSegment,
|
|
30
30
|
sanitizeMnemonic
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-5F5SOSDY.js";
|
|
32
32
|
import {
|
|
33
33
|
AGENT_SYNC_SPECS,
|
|
34
34
|
BOX_DYNAMIC_SYNC_MANIFEST,
|
|
@@ -66,6 +66,7 @@ import {
|
|
|
66
66
|
resolveSyncTopology,
|
|
67
67
|
resyncWorkspace,
|
|
68
68
|
shouldAcceptCredentialUpdate,
|
|
69
|
+
stageAllAgentStatic,
|
|
69
70
|
stageClaudeCredentialsForUpload,
|
|
70
71
|
stageClaudeJsonOnlyForUpload,
|
|
71
72
|
stageClaudeStaticForUpload,
|
|
@@ -76,7 +77,7 @@ import {
|
|
|
76
77
|
stageOpencodeStateForUpload,
|
|
77
78
|
stageOpencodeStaticForUpload,
|
|
78
79
|
writeCredentialBackup
|
|
79
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-4LS2TOF3.js";
|
|
80
81
|
|
|
81
82
|
// ../../packages/sandbox-cloud/dist/index.js
|
|
82
83
|
import { basename as basename2, resolve } from "path";
|
|
@@ -417,6 +418,12 @@ async function ensureAgentVolumesForCloud(backend, opts = {}) {
|
|
|
417
418
|
const log = opts.onLog ?? (() => {
|
|
418
419
|
});
|
|
419
420
|
const allAgents = AGENT_SPECS.map((s) => s.kind);
|
|
421
|
+
if (opts.volumesUsable === false) {
|
|
422
|
+
log(
|
|
423
|
+
`cloud backend '${backend.name}' cannot mount volumes for this sandbox class \u2014 agent credentials seeded per-create only`
|
|
424
|
+
);
|
|
425
|
+
return { mounts: [], env: buildForwardedEnv(allAgents), agents: allAgents };
|
|
426
|
+
}
|
|
420
427
|
if (typeof backend.ensureVolume !== "function") {
|
|
421
428
|
log(
|
|
422
429
|
`cloud backend '${backend.name}' has no volume primitive \u2014 agent credentials seeded per-create only`
|
|
@@ -2079,7 +2086,11 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2079
2086
|
if (!sandboxId) {
|
|
2080
2087
|
throw new Error(`cloud box ${box.name} has no sandboxId \u2014 record is malformed`);
|
|
2081
2088
|
}
|
|
2082
|
-
return {
|
|
2089
|
+
return {
|
|
2090
|
+
sandboxId,
|
|
2091
|
+
inbound: box.cloud?.inbound,
|
|
2092
|
+
sandboxClass: box.cloud?.sandboxClass
|
|
2093
|
+
};
|
|
2083
2094
|
}
|
|
2084
2095
|
function mintBox(req) {
|
|
2085
2096
|
const id = generateBoxId();
|
|
@@ -2271,7 +2282,7 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2271
2282
|
const image = opts.provisionImage ? await opts.provisionImage(req) : req.image ?? FALLBACK_IMAGE;
|
|
2272
2283
|
const resources = opts.defaultResources ?? { cpu: 2, memory: 4, disk: 8 };
|
|
2273
2284
|
const timeoutOverride = req.providerOptions?.["timeoutMs"];
|
|
2274
|
-
const timeoutMs = typeof timeoutOverride === "number" && timeoutOverride
|
|
2285
|
+
const timeoutMs = typeof timeoutOverride === "number" && timeoutOverride >= 0 ? timeoutOverride : void 0;
|
|
2275
2286
|
const networkPolicyOpt = req.providerOptions?.["networkPolicy"];
|
|
2276
2287
|
const networkPolicy = typeof networkPolicyOpt === "string" && networkPolicyOpt.trim() !== "" ? networkPolicyOpt.trim() : void 0;
|
|
2277
2288
|
const sizeOpt = req.providerOptions?.["size"];
|
|
@@ -2282,6 +2293,8 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2282
2293
|
const inbound = typeof inboundOpt === "string" && inboundOpt.trim() !== "" ? inboundOpt.trim() : void 0;
|
|
2283
2294
|
const projectOpt = req.providerOptions?.["project"];
|
|
2284
2295
|
const project = typeof projectOpt === "string" && projectOpt.trim() !== "" ? projectOpt.trim() : void 0;
|
|
2296
|
+
const classOpt = req.providerOptions?.["sandboxClass"];
|
|
2297
|
+
const sandboxClass = typeof classOpt === "string" && classOpt.trim() !== "" ? classOpt.trim() : void 0;
|
|
2285
2298
|
const relayToken = generateRelayToken();
|
|
2286
2299
|
const bridgeToken = generateRelayToken();
|
|
2287
2300
|
try {
|
|
@@ -2309,7 +2322,12 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2309
2322
|
);
|
|
2310
2323
|
}
|
|
2311
2324
|
}
|
|
2312
|
-
const agentVolumes = await ensureAgentVolumesForCloud(backend, {
|
|
2325
|
+
const agentVolumes = await ensureAgentVolumesForCloud(backend, {
|
|
2326
|
+
onLog: log,
|
|
2327
|
+
// Daytona's linux-vm class accepts volume mounts and never honors them
|
|
2328
|
+
// (see ensureAgentVolumesForCloud) — take the per-create upload path.
|
|
2329
|
+
volumesUsable: sandboxClass !== "linux-vm"
|
|
2330
|
+
});
|
|
2313
2331
|
const exposeServicePorts = await readExposedServicePorts(req.workspacePath);
|
|
2314
2332
|
const credentialSyncOff = (req.credentialSync ?? (await loadEffectiveConfig(req.projectRoot ?? req.workspacePath)).effective.box.credentialSync) === false;
|
|
2315
2333
|
const provisionEnv = {
|
|
@@ -2339,6 +2357,7 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2339
2357
|
location,
|
|
2340
2358
|
project,
|
|
2341
2359
|
inbound,
|
|
2360
|
+
sandboxClass,
|
|
2342
2361
|
timeoutMs,
|
|
2343
2362
|
exposePorts: exposeServicePorts,
|
|
2344
2363
|
networkPolicy,
|
|
@@ -2637,6 +2656,10 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2637
2656
|
// Inbound-access policy the backend applied to the per-box firewall
|
|
2638
2657
|
// (VPS providers). Persisted so drift re-syncs preserve the whitelist.
|
|
2639
2658
|
inbound: handle.inbound,
|
|
2659
|
+
// Daytona sandbox class, read back from the class of the snapshot the
|
|
2660
|
+
// box actually booted from (not from config, which can disagree).
|
|
2661
|
+
// pause() branches on it: a VM pauses, a container archives.
|
|
2662
|
+
sandboxClass: handle.sandboxClass,
|
|
2640
2663
|
// Only host-seeded boxes share a fork base with the host, so only
|
|
2641
2664
|
// they can be resynced back to the host tip on session start (7.5).
|
|
2642
2665
|
// inBoxClone / plane boxes clone from a leased URL — left unset.
|
|
@@ -2814,12 +2837,28 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2814
2837
|
const handle = handleFor(box);
|
|
2815
2838
|
const baseArgv = await backend.attachArgv(handle);
|
|
2816
2839
|
const inner = renderInnerCommand(kind, opts2);
|
|
2817
|
-
const
|
|
2840
|
+
const viaStdin = backend.attachExecLacksTty === true && !opts2?.detached && kind !== "logs";
|
|
2841
|
+
const scriptPath = viaStdin ? attachScriptPath(opts2?.sessionName ?? kind) : "";
|
|
2842
|
+
if (viaStdin) {
|
|
2843
|
+
const b64 = Buffer.from(inner, "utf8").toString("base64");
|
|
2844
|
+
await backend.exec(
|
|
2845
|
+
handle,
|
|
2846
|
+
`printf %s '${b64}' | base64 -d > ${scriptPath} && chmod 700 ${scriptPath}`
|
|
2847
|
+
);
|
|
2848
|
+
}
|
|
2849
|
+
const argv = opts2?.detached ? [...baseArgv.slice(1), inner] : viaStdin ? [...baseArgv.slice(1)] : [...baseArgv.slice(1), "-t", inner];
|
|
2818
2850
|
const fullArgv = [baseArgv[0], ...argv];
|
|
2819
2851
|
const cleanup = backend.revokeAttachToken ? async () => {
|
|
2820
2852
|
await backend.revokeAttachToken(handle, baseArgv);
|
|
2821
2853
|
} : void 0;
|
|
2822
|
-
return {
|
|
2854
|
+
return {
|
|
2855
|
+
argv: fullArgv,
|
|
2856
|
+
// `exec` so the script replaces the login shell: the user never lands
|
|
2857
|
+
// back on a prompt when they detach from tmux.
|
|
2858
|
+
...viaStdin ? { initialInput: `exec bash ${scriptPath}
|
|
2859
|
+
` } : {},
|
|
2860
|
+
cleanup
|
|
2861
|
+
};
|
|
2823
2862
|
},
|
|
2824
2863
|
async uploadPath(box, hostSrcs, boxDst, exclude) {
|
|
2825
2864
|
return uploadToCloudBox(backend, handleFor(box), hostSrcs, boxDst, exclude);
|
|
@@ -2985,6 +3024,10 @@ function hostTermForCloud() {
|
|
|
2985
3024
|
const t = process.env["TERM"];
|
|
2986
3025
|
return t && /^[A-Za-z0-9][A-Za-z0-9._+-]*$/.test(t) ? t : "xterm-256color";
|
|
2987
3026
|
}
|
|
3027
|
+
function attachScriptPath(sessionName) {
|
|
3028
|
+
const safe = sessionName.replace(/[^A-Za-z0-9._-]/g, "_").slice(0, 40) || "attach";
|
|
3029
|
+
return `/tmp/agentbox-attach-${safe}.sh`;
|
|
3030
|
+
}
|
|
2988
3031
|
function renderInnerCommand(kind, opts) {
|
|
2989
3032
|
const sessionName = opts?.sessionName ?? defaultSessionName(kind);
|
|
2990
3033
|
const fallback = opts?.command ?? defaultCommand(kind, opts);
|
|
@@ -3036,6 +3079,62 @@ function defaultCommand(kind, opts) {
|
|
|
3036
3079
|
function shellSingle(s) {
|
|
3037
3080
|
return "'" + s.replace(/'/g, "'\\''") + "'";
|
|
3038
3081
|
}
|
|
3082
|
+
function remoteTarFor(kind) {
|
|
3083
|
+
return `/tmp/agentbox-seed-${kind}.tar.gz`;
|
|
3084
|
+
}
|
|
3085
|
+
var REMOTE_CLAUDE_MD = "/tmp/agentbox-custom-CLAUDE.md";
|
|
3086
|
+
function buildAgentStaticSeedCommands(usable, opts = {}) {
|
|
3087
|
+
const cmds = [];
|
|
3088
|
+
if (opts.claudeMdOverlay) {
|
|
3089
|
+
cmds.push(
|
|
3090
|
+
`sudo -n mkdir -p /etc/claude-code && sudo -n install -m 0644 ${REMOTE_CLAUDE_MD} /etc/claude-code/CLAUDE.md && rm -f ${REMOTE_CLAUDE_MD}`
|
|
3091
|
+
);
|
|
3092
|
+
}
|
|
3093
|
+
for (const s of usable) {
|
|
3094
|
+
cmds.push(
|
|
3095
|
+
`mkdir -p ${s.extractDir} && tar -xzf ${remoteTarFor(s.kind)} -C ${s.extractDir} --no-same-permissions --no-same-owner -m && rm -f ${remoteTarFor(s.kind)}`
|
|
3096
|
+
);
|
|
3097
|
+
}
|
|
3098
|
+
if (usable.length > 0) {
|
|
3099
|
+
cmds.push(
|
|
3100
|
+
"sudo -n chown -R vscode:vscode /home/vscode/.claude /home/vscode/.codex /home/vscode/.local && ( [ -d /home/vscode/.agents ] && sudo -n chown -R vscode:vscode /home/vscode/.agents || true )"
|
|
3101
|
+
);
|
|
3102
|
+
}
|
|
3103
|
+
return cmds;
|
|
3104
|
+
}
|
|
3105
|
+
async function seedAgentStaticIntoCloudBox(backend, handle, opts = {}) {
|
|
3106
|
+
const log = opts.onLog ?? (() => {
|
|
3107
|
+
});
|
|
3108
|
+
const stages = await stageAllAgentStatic({ hostWorkspace: opts.hostWorkspace });
|
|
3109
|
+
try {
|
|
3110
|
+
for (const s of stages) {
|
|
3111
|
+
for (const w of s.staged.warnings) log(w);
|
|
3112
|
+
}
|
|
3113
|
+
const usable = stages.filter((s) => s.staged.tarballPath !== null);
|
|
3114
|
+
if (opts.claudeMdOverlay) {
|
|
3115
|
+
await backend.uploadFile(handle, opts.claudeMdOverlay, REMOTE_CLAUDE_MD);
|
|
3116
|
+
}
|
|
3117
|
+
for (const s of usable) {
|
|
3118
|
+
await backend.uploadFile(handle, s.staged.tarballPath, remoteTarFor(s.kind));
|
|
3119
|
+
}
|
|
3120
|
+
const cmds = buildAgentStaticSeedCommands(usable, {
|
|
3121
|
+
claudeMdOverlay: Boolean(opts.claudeMdOverlay)
|
|
3122
|
+
});
|
|
3123
|
+
for (const cmd of cmds) {
|
|
3124
|
+
const r = await backend.exec(handle, cmd);
|
|
3125
|
+
if (r.exitCode !== 0) {
|
|
3126
|
+
throw new Error(
|
|
3127
|
+
`agent-static seed failed (exit ${String(r.exitCode)}): ${cmd}
|
|
3128
|
+
${r.stdout}${r.stderr}`
|
|
3129
|
+
);
|
|
3130
|
+
}
|
|
3131
|
+
}
|
|
3132
|
+
log(`seeded agent static config: ${usable.map((s) => s.kind).join(", ") || "(none)"}`);
|
|
3133
|
+
return { seeded: usable.map((s) => s.kind) };
|
|
3134
|
+
} finally {
|
|
3135
|
+
await Promise.all(stages.map((s) => s.staged.cleanup()));
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3039
3138
|
async function openWebAppOnVncScreen(box, provider) {
|
|
3040
3139
|
const persisted = await readBoxStatus(box);
|
|
3041
3140
|
const hasWebService = persisted?.services.some((s) => s.expose) ?? false;
|
|
@@ -3061,6 +3160,7 @@ export {
|
|
|
3061
3160
|
ensureAgentVolumesForCloud,
|
|
3062
3161
|
seedAgentVolumesIfFresh,
|
|
3063
3162
|
agentSpecsForCloud,
|
|
3163
|
+
cloudSnapshotName,
|
|
3064
3164
|
listCloudBackendDirs,
|
|
3065
3165
|
listCloudCheckpoints,
|
|
3066
3166
|
listAllCloudCheckpoints,
|
|
@@ -3073,6 +3173,7 @@ export {
|
|
|
3073
3173
|
createCloudProvider,
|
|
3074
3174
|
hostTermForCloud,
|
|
3075
3175
|
renderInnerCommand,
|
|
3176
|
+
seedAgentStaticIntoCloudBox,
|
|
3076
3177
|
openWebAppOnVncScreen
|
|
3077
3178
|
};
|
|
3078
|
-
//# sourceMappingURL=chunk-
|
|
3179
|
+
//# sourceMappingURL=chunk-3BR63LCB.js.map
|