@madarco/agentbox 0.25.1 → 0.26.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 (121) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +8 -7
  3. package/dist/{_cloud-attach-FGMI2ZHO.js → _cloud-attach-7WRQH6XZ.js} +5 -5
  4. package/dist/{chunk-5VNL6SHJ.js → chunk-7ZZAZPYX.js} +3 -3
  5. package/dist/{chunk-ZTSVY3YL.js → chunk-BA2VLJVU.js} +3 -3
  6. package/dist/{chunk-3BR63LCB.js → chunk-DJQMK4RN.js} +12 -4
  7. package/dist/chunk-DJQMK4RN.js.map +1 -0
  8. package/dist/{chunk-6GZK74GT.js → chunk-DQHMDDAT.js} +2 -2
  9. package/dist/{chunk-P5U6AP6K.js → chunk-I2OAJS3L.js} +40 -377
  10. package/dist/{chunk-P5U6AP6K.js.map → chunk-I2OAJS3L.js.map} +1 -1
  11. package/dist/{chunk-5F5SOSDY.js → chunk-JGZSA5ZI.js} +72 -23
  12. package/dist/chunk-JGZSA5ZI.js.map +1 -0
  13. package/dist/{chunk-67VF2QZC.js → chunk-K5KOLYIL.js} +3 -3
  14. package/dist/{chunk-4LS2TOF3.js → chunk-PK2QF4IR.js} +569 -195
  15. package/dist/chunk-PK2QF4IR.js.map +1 -0
  16. package/dist/{chunk-3PSRBK24.js → chunk-UIFL7F2G.js} +54 -37
  17. package/dist/chunk-UIFL7F2G.js.map +1 -0
  18. package/dist/{chunk-4DBLYT2F.js → chunk-ZY7M7MXH.js} +41 -16
  19. package/dist/chunk-ZY7M7MXH.js.map +1 -0
  20. package/dist/chunk-ZYKNSHOH.js +259 -0
  21. package/dist/chunk-ZYKNSHOH.js.map +1 -0
  22. package/dist/{dist-X7R2EMJL.js → dist-5IICYSR6.js} +42 -374
  23. package/dist/{dist-X7R2EMJL.js.map → dist-5IICYSR6.js.map} +1 -1
  24. package/dist/{dist-5G42NFOG.js → dist-AR5CHRSV.js} +86 -45
  25. package/dist/{dist-5G42NFOG.js.map → dist-AR5CHRSV.js.map} +1 -1
  26. package/dist/{dist-AZUD2LUA.js → dist-DTNYMBQ5.js} +12 -12
  27. package/dist/{dist-MEK44IS5.js → dist-K4LNH3EC.js} +6 -6
  28. package/dist/{dist-SN6ABGMD.js → dist-POVRY7HO.js} +8 -4
  29. package/dist/{dist-SBDYDH7H.js → dist-U2SVLJUQ.js} +4 -2
  30. package/dist/{dist-4I7XHDC3.js → dist-XYY6SIKG.js} +6 -6
  31. package/dist/dist-YA7EXBGG.js +809 -0
  32. package/dist/dist-YA7EXBGG.js.map +1 -0
  33. package/dist/index.js +962 -583
  34. package/dist/index.js.map +1 -1
  35. package/dist/{prepared-state-75DIZ55S-5UAKJX3L.js → prepared-state-75DIZ55S-W6NU3S3B.js} +2 -2
  36. package/package.json +5 -4
  37. package/runtime/_shared/ctl.cjs +83 -36
  38. package/runtime/digitalocean/ctl.cjs +83 -36
  39. package/runtime/docker/packages/ctl/dist/bin.cjs +83 -36
  40. package/runtime/e2b/ctl.cjs +83 -36
  41. package/runtime/hetzner/ctl.cjs +83 -36
  42. package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
  43. package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
  44. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js +1 -1
  45. package/runtime/hub/apps/hub/.next/server/app/(auth)/api/auth/[...all]/route.js.nft.json +1 -1
  46. package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
  47. package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
  48. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  49. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  50. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  51. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  52. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  53. package/runtime/hub/apps/hub/.next/server/chunks/0-fj_better-auth_dist_adapters_kysely-adapter_index_mjs_0btft52._.js +3 -0
  54. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1lmiq._.js +5 -5
  55. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0keu6we._.js +1 -1
  56. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1-9g0ae._.js +1 -1
  57. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1bqbkd5._.js +1 -1
  58. package/runtime/hub/apps/hub/.next/server/chunks/{[root-of-the-server]__19pc87s._.js → [root-of-the-server]__1k8g143._.js} +2 -2
  59. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qa4a0v._.js +1 -1
  60. package/runtime/hub/apps/hub/.next/server/chunks/_0760z6y._.js +4 -4
  61. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_0xy-j7z._.js +1 -1
  62. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_010858m.js +1 -1
  63. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_04zwxnx.js +1 -1
  64. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_06exuc7.js +1 -1
  65. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_0f2ldrt.js +1 -1
  66. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_0f2tzep.js +1 -1
  67. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_116nh32.js +1 -1
  68. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_11dyjcb.js +1 -1
  69. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_esm_build_templates_app-page_1_4knli.js +1 -1
  70. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__08-1wwu._.js +1 -1
  71. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0c9mbcn._.js +1 -1
  72. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0gdfxj4._.js +1 -1
  73. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0kc-hwp._.js +1 -1
  74. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__0lu73p6._.js +1 -1
  75. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__10bfmwi._.js +1 -1
  76. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__18qvdzb._.js +1 -1
  77. package/runtime/hub/apps/hub/.next/server/chunks/ssr/[root-of-the-server]__1l2urlw._.js +1 -1
  78. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ro6vh6._.js +1 -1
  79. package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
  80. package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
  81. package/runtime/hub/apps/hub/{auth-MVL4NCQC.js → auth-DC44GQZY.js} +2 -2
  82. package/runtime/hub/apps/hub/{auth-config-GRIXACTV.js → auth-config-LALRDYDO.js} +2 -2
  83. package/runtime/hub/apps/hub/{chunk-JLG5JJXD.js → chunk-3FJNKSNZ.js} +1 -1
  84. package/runtime/hub/apps/hub/{chunk-RSENJ2FT.js → chunk-4QY2VZCF.js} +502 -132
  85. package/runtime/hub/apps/hub/{chunk-23AU7VYS.js → chunk-BARD2DI6.js} +11 -3
  86. package/runtime/hub/apps/hub/{chunk-V3OMPMI3.js → chunk-QSMPSV5Z.js} +70 -21
  87. package/runtime/hub/apps/hub/{chunk-GARA7RQW.js → chunk-XZZXPEVV.js} +57 -36
  88. package/runtime/hub/apps/hub/{dist-WZKTIA2R.js → dist-3ENKQN5G.js} +35 -365
  89. package/runtime/hub/apps/hub/{dist-TP4SXMDY.js → dist-6VGJOQYK.js} +84 -43
  90. package/runtime/hub/apps/hub/{dist-JVU3QCLG.js → dist-AE6IV4FV.js} +4 -4
  91. package/runtime/hub/apps/hub/{dist-IZ2JCN5R.js → dist-EQV4L7KP.js} +3 -1
  92. package/runtime/hub/apps/hub/dist-NNBELNA7.js +1017 -0
  93. package/runtime/hub/apps/hub/{dist-DZGSA3US.js → dist-RJJ2SDYO.js} +4 -4
  94. package/runtime/hub/apps/hub/{dist-VWSHZIPN.js → dist-TU7D6UTB.js} +37 -366
  95. package/runtime/hub/apps/hub/{dist-YWY2DSSL.js → dist-WAZKGVYL.js} +7 -3
  96. package/runtime/hub/apps/hub/{hub-token-BJG6Q5II.js → hub-token-COBZGSLS.js} +2 -2
  97. package/runtime/hub/apps/hub/package.json +1 -0
  98. package/runtime/hub/apps/hub/{prepared-state-75DIZ55S-JDILR4OP.js → prepared-state-75DIZ55S-NYEDSU2U.js} +1 -1
  99. package/runtime/hub/apps/hub/server.js +20 -16
  100. package/runtime/relay/bin.cjs +57 -20
  101. package/runtime/vercel/ctl.cjs +83 -36
  102. package/dist/chunk-3BR63LCB.js.map +0 -1
  103. package/dist/chunk-3PSRBK24.js.map +0 -1
  104. package/dist/chunk-4DBLYT2F.js.map +0 -1
  105. package/dist/chunk-4LS2TOF3.js.map +0 -1
  106. package/dist/chunk-5F5SOSDY.js.map +0 -1
  107. package/runtime/hub/apps/hub/.next/server/chunks/0zhp_better-auth_dist_adapters_kysely-adapter_index_mjs_1rl4qnh._.js +0 -3
  108. /package/dist/{_cloud-attach-FGMI2ZHO.js.map → _cloud-attach-7WRQH6XZ.js.map} +0 -0
  109. /package/dist/{chunk-5VNL6SHJ.js.map → chunk-7ZZAZPYX.js.map} +0 -0
  110. /package/dist/{chunk-ZTSVY3YL.js.map → chunk-BA2VLJVU.js.map} +0 -0
  111. /package/dist/{chunk-6GZK74GT.js.map → chunk-DQHMDDAT.js.map} +0 -0
  112. /package/dist/{chunk-67VF2QZC.js.map → chunk-K5KOLYIL.js.map} +0 -0
  113. /package/dist/{dist-4I7XHDC3.js.map → dist-DTNYMBQ5.js.map} +0 -0
  114. /package/dist/{dist-MEK44IS5.js.map → dist-K4LNH3EC.js.map} +0 -0
  115. /package/dist/{dist-AZUD2LUA.js.map → dist-POVRY7HO.js.map} +0 -0
  116. /package/dist/{dist-SBDYDH7H.js.map → dist-U2SVLJUQ.js.map} +0 -0
  117. /package/dist/{dist-SN6ABGMD.js.map → dist-XYY6SIKG.js.map} +0 -0
  118. /package/dist/{prepared-state-75DIZ55S-5UAKJX3L.js.map → prepared-state-75DIZ55S-W6NU3S3B.js.map} +0 -0
  119. /package/runtime/hub/apps/hub/.next/static/{fo5EgsHa6PFLTBagfLiuM → mrhWWwzD3oh05le9SRnlA}/_buildManifest.js +0 -0
  120. /package/runtime/hub/apps/hub/.next/static/{fo5EgsHa6PFLTBagfLiuM → mrhWWwzD3oh05le9SRnlA}/_clientMiddlewareManifest.js +0 -0
  121. /package/runtime/hub/apps/hub/.next/static/{fo5EgsHa6PFLTBagfLiuM → mrhWWwzD3oh05le9SRnlA}/_ssgManifest.js +0 -0
@@ -0,0 +1,809 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ CONTAINER_USER,
4
+ containerNameFor,
5
+ dockerExecArgv,
6
+ dockerOnRemote,
7
+ dockerOnRemoteOrThrow,
8
+ ensureTunnel,
9
+ loginShell,
10
+ makeSandboxId,
11
+ parseRemoteTarget,
12
+ parseSandboxId,
13
+ pipeFileFromContainer,
14
+ pipeFileIntoContainer,
15
+ probeRemoteEngine,
16
+ readPreparedState,
17
+ recordPreparedHost,
18
+ refreshTunnel,
19
+ tunnels
20
+ } from "./chunk-ZYKNSHOH.js";
21
+ import {
22
+ CLOUD_VNC_PORT,
23
+ CLOUD_WEB_PROXY_PORT,
24
+ bashScript,
25
+ createCloudProvider,
26
+ currentCloudBaseFingerprint,
27
+ hostTermForCloud,
28
+ listCloudCheckpoints,
29
+ quoteShellArg,
30
+ quoteShellArgv,
31
+ removeCloudCheckpointDir,
32
+ renderInnerCommand,
33
+ resolveCloudCheckpoint,
34
+ writeCloudCheckpointManifest
35
+ } from "./chunk-DJQMK4RN.js";
36
+ import {
37
+ detectPortless,
38
+ portlessDoctorRow
39
+ } from "./chunk-UIFL7F2G.js";
40
+ import {
41
+ hashProjectPath,
42
+ loadEffectiveConfig,
43
+ sanitizeMnemonic
44
+ } from "./chunk-JGZSA5ZI.js";
45
+ import {
46
+ BOX_IMAGE_REGISTRY,
47
+ BUILD_CONTEXT_DIR,
48
+ claudeInstallFingerprint,
49
+ computeDockerContextFingerprint,
50
+ defaultBoxSshDir,
51
+ errSummary,
52
+ mintSshKey,
53
+ readCliStamp,
54
+ readState,
55
+ registryRefForSha,
56
+ sshDestination,
57
+ sshExec,
58
+ sshOptArgs
59
+ } from "./chunk-PK2QF4IR.js";
60
+ import "./chunk-G3H2L3O2.js";
61
+ import "./chunk-WJFZJZIM.js";
62
+
63
+ // ../../packages/sandbox-remote-docker/dist/index.js
64
+ import { basename } from "path";
65
+ import { createReadStream as createReadStream2, createWriteStream } from "fs";
66
+ import { mkdir } from "fs/promises";
67
+ import { dirname } from "path";
68
+ import { createReadStream } from "fs";
69
+ import { rm } from "fs/promises";
70
+ import { tmpdir } from "os";
71
+ import { join } from "path";
72
+ import { execa } from "execa";
73
+ function remoteImageRef(contextSha256) {
74
+ return `agentbox/box:${contextSha256.slice(0, 16)}`;
75
+ }
76
+ async function currentContextSha(claudeInstall) {
77
+ const fp = await computeDockerContextFingerprint({});
78
+ if (!fp) return null;
79
+ return claudeInstall ? claudeInstallFingerprint(fp.contextSha256, claudeInstall) : fp.contextSha256;
80
+ }
81
+ async function ensureRemoteImage(target, opts = {}) {
82
+ const log = opts.onLog ?? (() => {
83
+ });
84
+ if (opts.imageRef && opts.imageRef.trim().length > 0) {
85
+ const ref2 = opts.imageRef.trim();
86
+ const probe = await dockerOnRemote(target, ["image", "inspect", ref2]);
87
+ if (probe.exitCode !== 0) {
88
+ throw new Error(
89
+ `remote-docker: box.imageRemoteDocker pins "${ref2}", which is not present on the remote engine. Build/pull it there, or unset the key to let AgentBox manage the image.`
90
+ );
91
+ }
92
+ return { ref: ref2, source: "pinned" };
93
+ }
94
+ const sha = await currentContextSha(opts.claudeInstall);
95
+ if (!sha) {
96
+ throw new Error(
97
+ "remote-docker: cannot resolve the box build context (a dev tree needs `pnpm -w build` first)"
98
+ );
99
+ }
100
+ const ref = remoteImageRef(sha);
101
+ if (!opts.force) {
102
+ const probe = await dockerOnRemote(target, ["image", "inspect", ref]);
103
+ if (probe.exitCode === 0) {
104
+ log(`[image] ${ref} already present on the remote`);
105
+ return { ref, source: "present", contextSha256: sha };
106
+ }
107
+ }
108
+ const registry = opts.registry ?? BOX_IMAGE_REGISTRY;
109
+ if (opts.allowPull !== false && registry) {
110
+ const remote = registryRefForSha(sha, registry);
111
+ log(`[image] pulling ${remote} on the remote engine`);
112
+ const pull = await dockerOnRemote(target, ["pull", remote], {
113
+ timeoutMs: 9e5,
114
+ onLine: (l) => log(`[image] ${l}`)
115
+ });
116
+ if (pull.exitCode === 0) {
117
+ await dockerOnRemote(target, ["tag", remote, ref]);
118
+ log(`[image] pulled ${remote} -> ${ref}`);
119
+ return { ref, source: "pulled", contextSha256: sha };
120
+ }
121
+ log("[image] registry miss \u2014 building on the remote from the local context");
122
+ }
123
+ await buildOnRemote(target, ref, opts);
124
+ return { ref, source: "built", contextSha256: sha };
125
+ }
126
+ async function buildOnRemote(target, ref, opts) {
127
+ const log = opts.onLog ?? (() => {
128
+ });
129
+ const tarPath = join(tmpdir(), `agentbox-box-ctx-${String(process.pid)}.tar`);
130
+ try {
131
+ await execa("tar", ["-C", BUILD_CONTEXT_DIR, "-cf", tarPath, "."], {
132
+ env: { ...process.env, COPYFILE_DISABLE: "1" }
133
+ });
134
+ const buildArgs = ["build", "-t", ref, "-f", "Dockerfile.box"];
135
+ if (opts.claudeInstall) {
136
+ buildArgs.push("--build-arg", `AGENTBOX_CLAUDE_INSTALL=${opts.claudeInstall}`);
137
+ }
138
+ buildArgs.push("-");
139
+ log(`[image] building ${ref} on the remote (streaming the build context)`);
140
+ const res = await execa(
141
+ "ssh",
142
+ [
143
+ ...sshOptArgs(target),
144
+ sshDestination(target),
145
+ loginShell(`docker ${quoteShellArgv(buildArgs)}`)
146
+ ],
147
+ { reject: false, input: createReadStream(tarPath), stdout: "pipe", stderr: "pipe" }
148
+ );
149
+ const out = `${typeof res.stdout === "string" ? res.stdout : ""}${typeof res.stderr === "string" ? res.stderr : ""}`;
150
+ for (const line of out.split(/\r?\n/)) {
151
+ if (line.trim().length > 0) log(`[image] ${line}`);
152
+ }
153
+ if (res.exitCode !== 0) {
154
+ throw new Error(
155
+ `remote-docker: remote \`docker build\` failed (exit ${String(res.exitCode)}). See the build output above.`
156
+ );
157
+ }
158
+ log(`[image] built ${ref}`);
159
+ } finally {
160
+ await rm(tarPath, { force: true });
161
+ }
162
+ }
163
+ var BACKEND_NAME = "remote-docker";
164
+ var SNAPSHOT_SEP = "#";
165
+ function makeSnapshotName(host, imageRef) {
166
+ return `${host}${SNAPSHOT_SEP}${imageRef}`;
167
+ }
168
+ function parseSnapshotName(snapshotName) {
169
+ const sep = snapshotName.indexOf(SNAPSHOT_SEP);
170
+ if (sep <= 0 || sep === snapshotName.length - 1) {
171
+ throw new Error(
172
+ `remote-docker: malformed snapshot name "${snapshotName}" \u2014 expected "<ssh-destination>#<image-ref>"`
173
+ );
174
+ }
175
+ return {
176
+ host: snapshotName.slice(0, sep),
177
+ imageRef: snapshotName.slice(sep + 1)
178
+ };
179
+ }
180
+ function snapshotTunnelId(host) {
181
+ return `engine:${host}`;
182
+ }
183
+ var BRIDGE_PORT = 8788;
184
+ var SSH_PORT = 22;
185
+ function portsToPublish(exposePorts) {
186
+ const base = [CLOUD_WEB_PROXY_PORT, CLOUD_VNC_PORT, BRIDGE_PORT, SSH_PORT];
187
+ return [.../* @__PURE__ */ new Set([...base, ...exposePorts ?? []])];
188
+ }
189
+ async function remoteIsNested(target) {
190
+ const res = await sshExec(target, "test -f /etc/agentbox/box.env");
191
+ return res.exitCode === 0;
192
+ }
193
+ async function ctxFor(h) {
194
+ const { target: remote, container } = parseSandboxId(h.sandboxId);
195
+ const target = await ensureTunnel(h.sandboxId, remote);
196
+ return { target, remote, container };
197
+ }
198
+ function mapDockerState(status) {
199
+ switch (status.trim()) {
200
+ case "running":
201
+ return "running";
202
+ case "paused":
203
+ return "paused";
204
+ case "created":
205
+ case "exited":
206
+ case "dead":
207
+ case "restarting":
208
+ case "removing":
209
+ return "stopped";
210
+ default:
211
+ return "missing";
212
+ }
213
+ }
214
+ function parseDockerPort(stdout) {
215
+ for (const line of stdout.split(/\r?\n/)) {
216
+ const m = /:(\d+)\s*$/.exec(line.trim());
217
+ if (m?.[1]) {
218
+ const port = Number.parseInt(m[1], 10);
219
+ if (Number.isFinite(port) && port > 0) return port;
220
+ }
221
+ }
222
+ return null;
223
+ }
224
+ function parseSize(size) {
225
+ if (!size) return {};
226
+ const m = /^(\d+)(?:-(\d+))?$/.exec(size.trim());
227
+ if (!m?.[1]) return {};
228
+ const cpu = Number.parseInt(m[1], 10);
229
+ const memory = m[2] ? Number.parseInt(m[2], 10) : void 0;
230
+ return { cpu, ...memory !== void 0 ? { memory } : {} };
231
+ }
232
+ function buildRunArgv(opts) {
233
+ const argv = [
234
+ "run",
235
+ "-d",
236
+ "--name",
237
+ opts.container,
238
+ "--hostname",
239
+ opts.container,
240
+ // The in-box dockerd needs these: SYS_ADMIN to `mount -t overlay` for
241
+ // overlay2, NET_ADMIN for its bridge + iptables NAT, /dev/fuse +
242
+ // apparmor:unconfined for the fuse-overlayfs fallback, seccomp:unconfined
243
+ // because the default profile blocks syscalls nested containers need, and a
244
+ // private cgroup namespace so runc can create its own slice. Same set as
245
+ // the local docker provider; we still avoid --privileged.
246
+ "--cap-add=SYS_ADMIN",
247
+ "--cap-add=NET_ADMIN",
248
+ "--device=/dev/fuse",
249
+ "--security-opt=apparmor:unconfined",
250
+ "--security-opt=seccomp=unconfined",
251
+ "--cgroupns=private"
252
+ ];
253
+ if (opts.nestedEngine) {
254
+ argv.push("--user", "0");
255
+ }
256
+ if (opts.cpu) argv.push("--cpus", String(opts.cpu));
257
+ if (opts.memory) argv.push("--memory", `${String(opts.memory)}g`);
258
+ argv.push("-v", `${opts.dockerVolume}:/var/lib/docker`);
259
+ for (const port of opts.ports) {
260
+ argv.push("-p", `127.0.0.1:0:${String(port)}`);
261
+ }
262
+ for (const [k, v] of Object.entries(opts.env)) {
263
+ argv.push("-e", `${k}=${v}`);
264
+ }
265
+ argv.push(opts.image, "sleep", "infinity");
266
+ return argv;
267
+ }
268
+ var remoteDockerBackend = {
269
+ name: BACKEND_NAME,
270
+ async provision(req) {
271
+ const log = req.onLog ?? (() => {
272
+ });
273
+ const spec = (req.host ?? "").trim();
274
+ if (!spec) {
275
+ throw new Error(
276
+ "remote-docker: no SSH destination. Use `agentbox docker:<host> \u2026`, `--remote-host <host>`, or set `box.remoteDockerHost`."
277
+ );
278
+ }
279
+ const remote = parseRemoteTarget(spec);
280
+ const container = containerNameFor(req.name);
281
+ const sandboxId = makeSandboxId(remote.spec, container);
282
+ const target = await ensureTunnel(sandboxId, remote);
283
+ let image;
284
+ if (req.snapshot) {
285
+ const snap = parseSnapshotName(req.snapshot);
286
+ if (snap.host !== remote.spec) {
287
+ throw new Error(
288
+ `snapshot expired or deleted: it was captured on ${snap.host}, not ${remote.spec} (a remote-docker checkpoint is local to its engine)`
289
+ );
290
+ }
291
+ image = snap.imageRef;
292
+ const probe = await dockerOnRemote(target, ["image", "inspect", image]);
293
+ if (probe.exitCode !== 0) {
294
+ throw new Error(`snapshot expired or deleted: ${image} is not on ${remote.spec}`);
295
+ }
296
+ } else {
297
+ const ensured = await ensureRemoteImage(target, {
298
+ imageRef: req.image && req.image !== "agentbox/box:dev" ? req.image : void 0,
299
+ onLog: log
300
+ });
301
+ image = ensured.ref;
302
+ }
303
+ const { cpu, memory } = parseSize(req.size);
304
+ const dockerVolume = `agentbox-docker-${container}`;
305
+ await dockerOnRemoteOrThrow(target, ["volume", "create", dockerVolume]);
306
+ const nestedEngine = await remoteIsNested(target);
307
+ if (nestedEngine) {
308
+ log("[provision] remote engine is itself an AgentBox box \u2014 running the box init as root");
309
+ }
310
+ const argv = buildRunArgv({
311
+ container,
312
+ image,
313
+ env: req.env ?? {},
314
+ ports: portsToPublish(req.exposePorts),
315
+ dockerVolume,
316
+ nestedEngine,
317
+ ...cpu !== void 0 ? { cpu } : {},
318
+ ...memory !== void 0 ? { memory } : {}
319
+ });
320
+ log(`[provision] docker run ${container} on ${remote.spec}`);
321
+ await dockerOnRemoteOrThrow(target, argv, { timeoutMs: 3e5 });
322
+ return {
323
+ sandboxId,
324
+ resources: {
325
+ ...cpu !== void 0 ? { cpu } : {},
326
+ ...memory !== void 0 ? { memory } : {}
327
+ }
328
+ };
329
+ },
330
+ async get(sandboxId) {
331
+ let ctx;
332
+ try {
333
+ ctx = await ctxFor({ sandboxId });
334
+ } catch {
335
+ return null;
336
+ }
337
+ const res = await dockerOnRemote(ctx.target, [
338
+ "inspect",
339
+ "-f",
340
+ "{{.State.Status}}",
341
+ ctx.container
342
+ ]);
343
+ return res.exitCode === 0 ? { sandboxId } : null;
344
+ },
345
+ /**
346
+ * Every other cloud can ask its API "what sandboxes exist?". Here there is no
347
+ * API and no registry of engines — a machine only becomes ours by being named
348
+ * in a box record or in `box.remoteDockerHost`. So enumeration means: work out
349
+ * which engines we have ever used, and ask each of them. An engine that has
350
+ * gone away is skipped rather than fatal, since prune must still report on the
351
+ * ones that answer.
352
+ */
353
+ async list() {
354
+ const hosts = await knownHosts();
355
+ const out = [];
356
+ for (const host of hosts) {
357
+ try {
358
+ out.push(...await listOnHost(host));
359
+ } catch {
360
+ }
361
+ }
362
+ return out;
363
+ },
364
+ async start(h) {
365
+ const ctx = await ctxFor(h);
366
+ await dockerOnRemoteOrThrow(ctx.target, ["start", ctx.container], { timeoutMs: 12e4 });
367
+ },
368
+ async stop(h) {
369
+ const ctx = await ctxFor(h);
370
+ await dockerOnRemoteOrThrow(ctx.target, ["stop", ctx.container], { timeoutMs: 12e4 });
371
+ },
372
+ /**
373
+ * A true freeze (SIGSTOP-equivalent via the freezer cgroup), not cold storage:
374
+ * the container keeps its memory and its published ports, so resume is instant
375
+ * and the forwarded ports stay valid.
376
+ */
377
+ async pause(h) {
378
+ const ctx = await ctxFor(h);
379
+ const state = await currentState(ctx);
380
+ if (state !== "running") return;
381
+ await dockerOnRemoteOrThrow(ctx.target, ["pause", ctx.container]);
382
+ },
383
+ async resume(h) {
384
+ const ctx = await ctxFor(h);
385
+ const state = await currentState(ctx);
386
+ if (state === "paused") {
387
+ await dockerOnRemoteOrThrow(ctx.target, ["unpause", ctx.container]);
388
+ return;
389
+ }
390
+ if (state !== "running") {
391
+ await dockerOnRemoteOrThrow(ctx.target, ["start", ctx.container], { timeoutMs: 12e4 });
392
+ }
393
+ },
394
+ async destroy(h) {
395
+ const ctx = await ctxFor(h);
396
+ await dockerOnRemote(ctx.target, ["rm", "-f", ctx.container], { timeoutMs: 12e4 });
397
+ await dockerOnRemote(ctx.target, ["volume", "rm", "-f", `agentbox-docker-${ctx.container}`]);
398
+ await tunnels.close(h.sandboxId);
399
+ },
400
+ async state(h) {
401
+ let ctx;
402
+ try {
403
+ ctx = await ctxFor(h);
404
+ } catch {
405
+ return "missing";
406
+ }
407
+ return currentState(ctx);
408
+ },
409
+ async exec(h, cmd, opts = {}) {
410
+ const ctx = await ctxFor(h);
411
+ const argv = dockerExecArgv(ctx.container, cmd, {
412
+ user: opts.user ?? CONTAINER_USER,
413
+ ...opts.cwd ? { cwd: opts.cwd } : {},
414
+ ...opts.env ? { env: opts.env } : {}
415
+ });
416
+ const res = await dockerOnRemote(ctx.target, argv, {
417
+ timeoutMs: opts.attemptTimeoutMs ?? 3e5
418
+ });
419
+ return { exitCode: res.exitCode, stdout: res.stdout, stderr: res.stderr };
420
+ },
421
+ async uploadFile(h, localPath, remotePath) {
422
+ const ctx = await ctxFor(h);
423
+ await dockerOnRemote(
424
+ ctx.target,
425
+ dockerExecArgv(ctx.container, bashScript(`mkdir -p ${shellDir(remotePath)}`), {
426
+ user: "root"
427
+ })
428
+ );
429
+ await pipeFileIntoContainer(ctx.target, ctx.container, createReadStream2(localPath), remotePath);
430
+ },
431
+ async downloadFile(h, remotePath, localPath) {
432
+ const ctx = await ctxFor(h);
433
+ await mkdir(dirname(localPath), { recursive: true });
434
+ await pipeFileFromContainer(
435
+ ctx.target,
436
+ ctx.container,
437
+ remotePath,
438
+ createWriteStream(localPath)
439
+ );
440
+ },
441
+ async listFiles(h, remoteDir) {
442
+ const ctx = await ctxFor(h);
443
+ const res = await dockerOnRemote(
444
+ ctx.target,
445
+ dockerExecArgv(
446
+ ctx.container,
447
+ `find ${quote(remoteDir)} -mindepth 1 -maxdepth 1 -printf '%f\\t%y\\n'`
448
+ )
449
+ );
450
+ if (res.exitCode !== 0) return [];
451
+ const out = [];
452
+ for (const line of res.stdout.split(/\r?\n/)) {
453
+ const [name, kind] = line.split(" ");
454
+ if (name) out.push({ name, isDir: kind === "d" });
455
+ }
456
+ return out;
457
+ },
458
+ /**
459
+ * The container's port is published on the REMOTE's loopback; we forward that
460
+ * to a free local port over the box's ControlMaster. So the URL is always
461
+ * `http://127.0.0.1:<local>` — reachable from the host browser and from the
462
+ * host relay's poller alike.
463
+ */
464
+ async previewUrl(h, port) {
465
+ const ctx = await ctxFor(h);
466
+ const remotePort = await publishedPort(ctx, port);
467
+ const localPort = await tunnels.forward(h.sandboxId, remotePort);
468
+ return { url: `http://127.0.0.1:${String(localPort)}` };
469
+ },
470
+ /** SSH is already the auth gate, so a "signed" URL is just the tunneled one. */
471
+ async signedPreviewUrl(h, port) {
472
+ return remoteDockerBackend.previewUrl(h, port);
473
+ },
474
+ /**
475
+ * The poller calls this when the local port stops answering — typically a
476
+ * ControlMaster that died across a host sleep/wake. Re-open the master AND
477
+ * re-read `docker port`: a container restart reassigns the remote's ephemeral
478
+ * port, so a forward to the old one would connect to nothing.
479
+ */
480
+ async refreshPreviewUrl(h, port) {
481
+ const { target: remote } = parseSandboxId(h.sandboxId);
482
+ await refreshTunnel(h.sandboxId, remote);
483
+ return remoteDockerBackend.previewUrl(h, port);
484
+ },
485
+ async createSnapshot(h, snapshotName) {
486
+ const ctx = await ctxFor(h);
487
+ const snap = parseSnapshotName(snapshotName);
488
+ await dockerOnRemoteOrThrow(ctx.target, ["commit", ctx.container, snap.imageRef], {
489
+ timeoutMs: 6e5
490
+ });
491
+ },
492
+ async deleteSnapshot(snapshotName) {
493
+ const snap = parseSnapshotName(snapshotName);
494
+ try {
495
+ const target = await ensureTunnel(snapshotTunnelId(snap.host), parseRemoteTarget(snap.host));
496
+ await dockerOnRemote(target, ["image", "rm", "-f", snap.imageRef]);
497
+ } catch {
498
+ }
499
+ },
500
+ async snapshotExists(snapshotName) {
501
+ let snap;
502
+ try {
503
+ snap = parseSnapshotName(snapshotName);
504
+ } catch {
505
+ return false;
506
+ }
507
+ try {
508
+ const target = await ensureTunnel(snapshotTunnelId(snap.host), parseRemoteTarget(snap.host));
509
+ const res = await dockerOnRemote(target, ["image", "inspect", snap.imageRef]);
510
+ return res.exitCode === 0;
511
+ } catch {
512
+ return false;
513
+ }
514
+ }
515
+ };
516
+ async function knownHosts() {
517
+ const hosts = /* @__PURE__ */ new Set();
518
+ try {
519
+ const state = await readState();
520
+ for (const box of state.boxes) {
521
+ if (box.provider !== BACKEND_NAME || !box.cloud?.sandboxId) continue;
522
+ try {
523
+ hosts.add(parseSandboxId(box.cloud.sandboxId).target.spec);
524
+ } catch {
525
+ }
526
+ }
527
+ } catch {
528
+ }
529
+ try {
530
+ const cfg = await loadEffectiveConfig(process.cwd());
531
+ const dflt = (cfg.effective.box.remoteDockerHost || "").trim();
532
+ if (dflt) hosts.add(dflt);
533
+ } catch {
534
+ }
535
+ return [...hosts];
536
+ }
537
+ async function listOnHost(spec) {
538
+ const remote = parseRemoteTarget(spec);
539
+ const target = await ensureTunnel(`list:${remote.spec}`, remote);
540
+ const res = await dockerOnRemote(target, [
541
+ "ps",
542
+ "-a",
543
+ "--filter",
544
+ "name=agentbox-",
545
+ "--format",
546
+ "{{.Names}} {{.State}} {{.CreatedAt}}"
547
+ ]);
548
+ if (res.exitCode !== 0) return [];
549
+ const out = [];
550
+ for (const line of res.stdout.split(/\r?\n/)) {
551
+ const [name, state, createdAt] = line.split(" ");
552
+ if (!name) continue;
553
+ out.push({
554
+ sandboxId: makeSandboxId(remote.spec, name),
555
+ name,
556
+ ...createdAt ? { createdAt } : {},
557
+ state: mapDockerState(state ?? "")
558
+ });
559
+ }
560
+ return out;
561
+ }
562
+ async function currentState(ctx) {
563
+ const res = await dockerOnRemote(ctx.target, [
564
+ "inspect",
565
+ "-f",
566
+ "{{.State.Status}}",
567
+ ctx.container
568
+ ]);
569
+ if (res.exitCode !== 0) return "missing";
570
+ return mapDockerState(res.stdout);
571
+ }
572
+ async function publishedPort(ctx, containerPort) {
573
+ const res = await dockerOnRemote(ctx.target, ["port", ctx.container, String(containerPort)]);
574
+ const port = res.exitCode === 0 ? parseDockerPort(res.stdout) : null;
575
+ if (port === null) {
576
+ throw new Error(
577
+ `remote-docker: container port ${String(containerPort)} is not published on ${ctx.container}. Docker port mappings are fixed at create \u2014 a service exposed after the box was made is only reachable through the :80 WebProxy until the box is recreated.`
578
+ );
579
+ }
580
+ return port;
581
+ }
582
+ function shellDir(path) {
583
+ const slash = path.lastIndexOf("/");
584
+ return quote(slash > 0 ? path.slice(0, slash) : "/");
585
+ }
586
+ function quote(s) {
587
+ return `'${s.replace(/'/g, "'\\''")}'`;
588
+ }
589
+ var CONTAINER_USER2 = "vscode";
590
+ async function buildRemoteDockerAttach(box, kind, opts = {}) {
591
+ const sandboxId = box.cloud?.sandboxId;
592
+ if (!sandboxId) {
593
+ throw new Error(`remote-docker box ${box.name} has no sandboxId \u2014 record is malformed`);
594
+ }
595
+ const { target: remote, container } = parseSandboxId(sandboxId);
596
+ const target = await ensureTunnel(sandboxId, remote);
597
+ const inner = renderInnerCommand(kind, opts);
598
+ const dockerArgv = [
599
+ "exec",
600
+ // `detached` only creates the session, so it needs no TTY — and asking for
601
+ // one would make docker fail when the CLI runs it without a terminal.
602
+ ...opts.detached ? ["-i"] : ["-it"],
603
+ "-u",
604
+ opts.user ?? CONTAINER_USER2,
605
+ "-e",
606
+ `TERM=${hostTermForCloud()}`,
607
+ container,
608
+ "bash",
609
+ "-lc",
610
+ inner
611
+ ];
612
+ const remoteCommand = `docker ${quoteShellArgv(dockerArgv)}`;
613
+ const argv = [
614
+ "ssh",
615
+ ...sshOptArgs(target),
616
+ // -t forces TTY allocation through ssh; without it tmux and readline break.
617
+ ...opts.detached ? [] : ["-t"],
618
+ sshDestination(target),
619
+ // One argv element: ssh hands the string to the remote login shell, which
620
+ // re-parses it — so the docker argv is quoted, not concatenated.
621
+ remoteCommand
622
+ ];
623
+ return { argv };
624
+ }
625
+ var SSH_CONTAINER_PORT = 22;
626
+ async function resolveBoxSshTarget(box) {
627
+ const sandboxId = box.cloud?.sandboxId;
628
+ if (!sandboxId) return null;
629
+ const { target: remote, container } = parseSandboxId(sandboxId);
630
+ const conn = await ensureTunnel(sandboxId, remote);
631
+ const key = await mintSshKey(
632
+ defaultBoxSshDir(sandboxId, "remote-docker"),
633
+ `agentbox-${box.name}`
634
+ );
635
+ const install = [
636
+ `install -d -m 700 -o ${CONTAINER_USER} -g ${CONTAINER_USER} /home/${CONTAINER_USER}/.ssh`,
637
+ `touch /home/${CONTAINER_USER}/.ssh/authorized_keys`,
638
+ `grep -qF ${quoteShellArg(key.publicKey)} /home/${CONTAINER_USER}/.ssh/authorized_keys || echo ${quoteShellArg(key.publicKey)} >> /home/${CONTAINER_USER}/.ssh/authorized_keys`,
639
+ `chown -R ${CONTAINER_USER}:${CONTAINER_USER} /home/${CONTAINER_USER}/.ssh`,
640
+ `chmod 600 /home/${CONTAINER_USER}/.ssh/authorized_keys`
641
+ ].join(" && ");
642
+ const installRes = await dockerOnRemote(
643
+ conn,
644
+ dockerExecArgv(container, bashScript(install), { user: "root" })
645
+ );
646
+ if (installRes.exitCode !== 0) return null;
647
+ await dockerOnRemote(
648
+ conn,
649
+ dockerExecArgv(container, bashScript("/usr/local/bin/agentbox-sshd-start"), {
650
+ user: "root"
651
+ }),
652
+ { timeoutMs: 6e4 }
653
+ );
654
+ const portRes = await dockerOnRemote(conn, ["port", container, String(SSH_CONTAINER_PORT)]);
655
+ const port = portRes.exitCode === 0 ? parseDockerPort(portRes.stdout) : null;
656
+ if (port === null) return null;
657
+ return {
658
+ // Resolved on the jump host, not here.
659
+ host: "127.0.0.1",
660
+ port,
661
+ user: CONTAINER_USER,
662
+ identityFile: key.privatePath,
663
+ proxyJump: remote.spec
664
+ };
665
+ }
666
+ async function prepareRemoteDocker(opts) {
667
+ const log = opts.onLog ?? (() => {
668
+ });
669
+ const spec = (opts.host ?? "").trim();
670
+ if (!spec) {
671
+ throw new Error(
672
+ "remote-docker: prepare needs an SSH destination \u2014 `agentbox prepare --provider docker:<host>`, or set `box.remoteDockerHost`."
673
+ );
674
+ }
675
+ const remote = parseRemoteTarget(spec);
676
+ const target = await ensureTunnel(`engine:${remote.spec}`, remote);
677
+ log(`[prepare] ensuring the box image on ${remote.spec}`);
678
+ const res = await ensureRemoteImage(target, {
679
+ ...opts.claudeInstall ? { claudeInstall: opts.claudeInstall } : {},
680
+ ...opts.registry !== void 0 ? { registry: opts.registry } : {},
681
+ ...opts.allowPull !== void 0 ? { allowPull: opts.allowPull } : {},
682
+ ...opts.force ? { force: true } : {},
683
+ onLog: log
684
+ });
685
+ if (res.contextSha256) {
686
+ recordPreparedHost(remote.spec, { imageRef: res.ref, contextSha256: res.contextSha256 });
687
+ }
688
+ log(`[prepare] ${remote.spec} ready \u2014 ${res.ref} (${res.source})`);
689
+ return {};
690
+ }
691
+ async function doctorChecks() {
692
+ try {
693
+ const cfg = await loadEffectiveConfig(process.cwd());
694
+ const host = (cfg.effective.box.remoteDockerHost || "").trim();
695
+ if (!host) {
696
+ return [
697
+ {
698
+ label: "remote engine",
699
+ status: "warn",
700
+ detail: "no default SSH destination set",
701
+ hint: "`agentbox config set box.remoteDockerHost <user@host>` (or use `agentbox docker:<host> \u2026`)"
702
+ }
703
+ ];
704
+ }
705
+ const probe = await probeRemoteEngine(host);
706
+ const engineRes = probe.ok ? {
707
+ label: "remote engine",
708
+ status: "ok",
709
+ detail: `${host} \u2014 docker ${probe.version} (${probe.os}/${probe.arch})`
710
+ } : {
711
+ label: "remote engine",
712
+ status: "fail",
713
+ detail: probe.error,
714
+ hint: `check that \`ssh ${host} true\` works and docker is installed there`
715
+ };
716
+ const prepared = readPreparedState();
717
+ const baked = prepared?.hosts[host];
718
+ const imageRes = baked ? {
719
+ label: "box image",
720
+ status: "ok",
721
+ detail: `${baked.imageRef} (${baked.cliVersion ?? "\u2014"})`
722
+ } : {
723
+ label: "box image",
724
+ status: "warn",
725
+ detail: "not baked on this host yet",
726
+ hint: `\`agentbox prepare --provider docker:${host}\` (otherwise the first create bakes it)`
727
+ };
728
+ const portlessRes = portlessDoctorRow(await detectPortless());
729
+ return [engineRes, imageRes, portlessRes];
730
+ } catch (err) {
731
+ return [{ label: "remote engine", status: "warn", detail: errSummary(err) }];
732
+ }
733
+ }
734
+ var cloudProvider = createCloudProvider(remoteDockerBackend, {
735
+ // Empty on purpose. The cloud default (2 cpu / 4 GB) would silently cap a box
736
+ // on a 32-core workstation; a remote engine is the user's own machine, so a
737
+ // box is unlimited unless `--size` says otherwise — the same deal the local
738
+ // docker provider offers.
739
+ defaultResources: {},
740
+ launchDockerd: true
741
+ });
742
+ function checkpointImageRef(projectRoot, name) {
743
+ const mnemonic = sanitizeMnemonic(basename(projectRoot));
744
+ return `agentbox-ckpt-${hashProjectPath(projectRoot)}_${mnemonic}:${name}`;
745
+ }
746
+ var remoteDockerCheckpoint = {
747
+ async create(box, name) {
748
+ if (!box.projectRoot) {
749
+ throw new Error(
750
+ "checkpoint requires the box to have a project root (run `agentbox checkpoint` from inside the project)"
751
+ );
752
+ }
753
+ const sandboxId = box.cloud?.sandboxId;
754
+ if (!sandboxId) {
755
+ throw new Error(`remote-docker box ${box.name} has no sandboxId \u2014 record is malformed`);
756
+ }
757
+ const { target } = parseSandboxId(sandboxId);
758
+ const snapshotName = makeSnapshotName(target.spec, checkpointImageRef(box.projectRoot, name));
759
+ await remoteDockerBackend.createSnapshot?.({ sandboxId }, snapshotName);
760
+ const info = await writeCloudCheckpointManifest(box.projectRoot, BACKEND_NAME, name, {
761
+ snapshotName,
762
+ sourceBoxId: box.id,
763
+ sourceBoxName: box.name,
764
+ baseProvider: BACKEND_NAME,
765
+ baseFingerprint: currentCloudBaseFingerprint(BACKEND_NAME),
766
+ cliVersion: readCliStamp().cliVersion
767
+ });
768
+ return { ref: info.name };
769
+ },
770
+ async list(projectRoot) {
771
+ const entries = await listCloudCheckpoints(projectRoot, BACKEND_NAME);
772
+ return entries.map((e) => ({ ref: e.name, createdAt: e.manifest.createdAt }));
773
+ },
774
+ async remove(projectRoot, ref) {
775
+ const entry = await resolveCloudCheckpoint(projectRoot, BACKEND_NAME, ref);
776
+ if (!entry) return;
777
+ await remoteDockerBackend.deleteSnapshot?.(entry.manifest.snapshotName);
778
+ await removeCloudCheckpointDir(projectRoot, BACKEND_NAME, ref);
779
+ }
780
+ };
781
+ var remoteDockerProvider = {
782
+ ...cloudProvider,
783
+ buildAttach: buildRemoteDockerAttach,
784
+ // The box's own sshd, reached by jumping through the engine — see box-ssh.ts.
785
+ // Supplying this is what lets `open` / `code` / `connect` treat a remote-docker
786
+ // box like any other SSH-capable box, without the scaffold having to guess a
787
+ // target out of an attach argv that points at the engine rather than the box.
788
+ sshTarget: resolveBoxSshTarget,
789
+ checkpoint: remoteDockerCheckpoint,
790
+ prepare: prepareRemoteDocker,
791
+ baseFingerprint: async (claudeInstall) => await currentContextSha(claudeInstall) ?? void 0
792
+ };
793
+ var providerModule = {
794
+ provider: remoteDockerProvider,
795
+ backend: remoteDockerBackend,
796
+ currentBaseFingerprintLive: async (claudeInstall) => await currentContextSha(claudeInstall) ?? void 0,
797
+ doctorChecks
798
+ };
799
+ export {
800
+ BACKEND_NAME,
801
+ listOnHost,
802
+ parseRemoteTarget,
803
+ parseSandboxId,
804
+ probeRemoteEngine,
805
+ providerModule,
806
+ remoteDockerBackend,
807
+ remoteDockerProvider
808
+ };
809
+ //# sourceMappingURL=dist-YA7EXBGG.js.map