@madarco/agentbox 0.23.5 → 0.24.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 +61 -0
- package/LICENSE +21 -0
- package/README.md +3 -2
- package/dist/{_cloud-attach-D4OQO5AJ.js → _cloud-attach-T6GPR6LJ.js} +5 -5
- package/dist/{chunk-KY32JO6J.js → chunk-5KHEH47T.js} +91 -79
- package/dist/chunk-5KHEH47T.js.map +1 -0
- package/dist/{chunk-YRTM3KNT.js → chunk-6U2S6QWD.js} +219 -18
- package/dist/chunk-6U2S6QWD.js.map +1 -0
- package/dist/{chunk-JYEZ6Q5M.js → chunk-DEDTPG2D.js} +874 -146
- package/dist/chunk-DEDTPG2D.js.map +1 -0
- package/dist/chunk-G3H2L3O2.js +0 -0
- package/dist/{chunk-JNY5GPIM.js → chunk-I654PBHA.js} +290 -330
- package/dist/chunk-I654PBHA.js.map +1 -0
- package/dist/{chunk-6KOQRSHH.js → chunk-K2EDQGZP.js} +18 -4
- package/dist/chunk-K2EDQGZP.js.map +1 -0
- package/dist/{chunk-KZWJMNLP.js → chunk-LC4E2EIZ.js} +3 -3
- package/dist/{chunk-KZWJMNLP.js.map → chunk-LC4E2EIZ.js.map} +1 -1
- package/dist/{chunk-DADOEMXP.js → chunk-NACA6AM7.js} +183 -49
- package/dist/chunk-NACA6AM7.js.map +1 -0
- package/dist/{chunk-FX32NZD4.js → chunk-RYQLFKCP.js} +20 -10
- package/dist/chunk-RYQLFKCP.js.map +1 -0
- package/dist/{chunk-QT3SHMLY.js → chunk-UIRBYL4G.js} +43 -12
- package/dist/chunk-UIRBYL4G.js.map +1 -0
- package/dist/chunk-WJFZJZIM.js +0 -0
- package/dist/chunk-WLHJZPFJ.js +845 -0
- package/dist/chunk-WLHJZPFJ.js.map +1 -0
- package/dist/cloud-poller-SUNA6ZQC-7M5LJHHE.js +0 -0
- package/dist/dist-3KIJ2KQ2.js +1437 -0
- package/dist/dist-3KIJ2KQ2.js.map +1 -0
- package/dist/{dist-564EDHFF.js → dist-7OUOHQPA.js} +196 -151
- package/dist/dist-7OUOHQPA.js.map +1 -0
- package/dist/{dist-CAT2TN75.js → dist-B7TNWGVG.js} +8 -4
- package/dist/{dist-UDQMBWYW.js → dist-KYV3LEHG.js} +10 -6
- package/dist/{dist-EAR4BLL2.js → dist-PHYCFYKH.js} +37 -17
- package/dist/dist-PHYCFYKH.js.map +1 -0
- package/dist/{dist-2BTJQUJS.js → dist-T5MXBZGP.js} +2 -2
- package/dist/{dist-O5Y4X4C5.js → dist-Z7KEPQC7.js} +6 -6
- package/dist/index.js +2560 -1108
- package/dist/index.js.map +1 -1
- package/dist/{prepared-state-BUO75YLZ-PW64VQMT.js → prepared-state-BUO75YLZ-RQRFFBJW.js} +2 -2
- package/package.json +28 -28
- package/runtime/_shared/agentbox-checkpoint-cleanup +0 -0
- package/runtime/_shared/agentbox-codex-hooks.json +1 -1
- 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 +468 -97
- package/runtime/_shared/gh-shim +0 -0
- package/runtime/_shared/git-shim +53 -3
- package/runtime/_shared/linear-shim +0 -0
- package/runtime/_shared/ntn-shim +0 -0
- package/runtime/daytona/custom-system-CLAUDE.md +1 -1
- package/runtime/digitalocean/agentbox-checkpoint-cleanup +55 -0
- package/runtime/digitalocean/agentbox-codex-hooks.json +68 -0
- package/runtime/digitalocean/agentbox-dockerd-start +145 -0
- package/runtime/digitalocean/agentbox-open +28 -0
- package/runtime/digitalocean/agentbox-portless-trust +82 -0
- package/runtime/digitalocean/agentbox-setup-skill.md +317 -0
- package/runtime/digitalocean/agentbox-vnc-start +102 -0
- package/runtime/digitalocean/claude-managed-settings.json +116 -0
- package/runtime/digitalocean/ctl.cjs +27852 -0
- package/runtime/digitalocean/custom-system-CLAUDE.md +39 -0
- package/runtime/digitalocean/gh-shim +344 -0
- package/runtime/digitalocean/git-shim +181 -0
- package/runtime/digitalocean/linear-shim +181 -0
- package/runtime/digitalocean/ntn-shim +95 -0
- package/runtime/digitalocean/opencode-agentbox-plugin.js +76 -0
- package/runtime/digitalocean/scripts/install-box.sh +462 -0
- package/runtime/docker/Dockerfile.box +5 -0
- package/runtime/docker/packages/ctl/dist/bin.cjs +468 -97
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-checkpoint-cleanup +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/agentbox-codex-hooks.json +1 -1
- 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/custom-system-CLAUDE.md +2 -1
- package/runtime/docker/packages/sandbox-docker/scripts/gh-shim +0 -0
- package/runtime/docker/packages/sandbox-docker/scripts/git-shim +53 -3
- 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-codex-hooks.json +1 -1
- 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 +468 -97
- package/runtime/e2b/custom-system-CLAUDE.md +6 -3
- package/runtime/e2b/gh-shim +0 -0
- package/runtime/e2b/git-shim +53 -3
- package/runtime/e2b/linear-shim +0 -0
- package/runtime/e2b/ntn-shim +0 -0
- package/runtime/e2b/scripts/build-template.sh +16 -0
- package/runtime/hetzner/agentbox-checkpoint-cleanup +0 -0
- package/runtime/hetzner/agentbox-codex-hooks.json +1 -1
- 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 +468 -97
- package/runtime/hetzner/custom-system-CLAUDE.md +1 -1
- package/runtime/hetzner/gh-shim +0 -0
- package/runtime/hetzner/git-shim +53 -3
- package/runtime/hetzner/linear-shim +0 -0
- package/runtime/hetzner/ntn-shim +0 -0
- package/runtime/hetzner/scripts/install-box.sh +5 -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/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- 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 +12 -12
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0keu6we._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1bqbkd5._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qa4a0v._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/_0760z6y._.js +8 -8
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ro6vh6._.js +1 -1
- package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_0b_hsjl._.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/.next/static/chunks/380qcmusmigzz.js +1 -0
- package/runtime/hub/apps/hub/{auth-675P3LQS.js → auth-Q447765C.js} +2 -2
- package/runtime/hub/apps/hub/{auth-config-AOBEKRZQ.js → auth-config-SIL635ZD.js} +2 -2
- package/runtime/hub/apps/hub/{chunk-FSEPYTQ6.js → chunk-3VE7AYVK.js} +594 -145
- package/runtime/hub/apps/hub/{chunk-EXQCBM5Q.js → chunk-64WEKO34.js} +42 -11
- package/runtime/hub/apps/hub/{chunk-56YQBVN2.js → chunk-DZPQB2JZ.js} +1 -1
- package/runtime/hub/apps/hub/{chunk-7M6FXZIO.js → chunk-FGBXEXUV.js} +350 -292
- package/runtime/hub/apps/hub/{chunk-Z7ZAL24C.js → chunk-YVELHPNY.js} +218 -17
- package/runtime/hub/apps/hub/{dist-EKQHCXWE.js → dist-33ZNVTC6.js} +183 -49
- package/runtime/hub/apps/hub/{dist-V4TJ44MT.js → dist-4SXAJBOC.js} +195 -150
- package/runtime/hub/apps/hub/{dist-QIXUPGPP.js → dist-EPJFN2J3.js} +116 -86
- package/runtime/hub/apps/hub/{dist-STQK5XM6.js → dist-GF5EBRNG.js} +1 -1
- package/runtime/hub/apps/hub/{dist-JGZ55OIJ.js → dist-UJVIROA4.js} +19 -5
- package/runtime/hub/apps/hub/dist-XULFTIMT.js +2212 -0
- package/runtime/hub/apps/hub/{dist-GGWYKXJE.js → dist-YM5J25H6.js} +7 -3
- package/runtime/hub/apps/hub/{hub-token-2BZFBBW3.js → hub-token-UITZEWVP.js} +2 -2
- package/runtime/hub/apps/hub/package.json +1 -0
- package/runtime/hub/apps/hub/{prepared-state-BUO75YLZ-UICXTY25.js → prepared-state-BUO75YLZ-O4GZMDRF.js} +1 -1
- package/runtime/hub/apps/hub/server.js +17 -15
- package/runtime/relay/bin.cjs +275 -59
- package/runtime/vercel/agentbox-checkpoint-cleanup +0 -0
- package/runtime/vercel/agentbox-codex-hooks.json +1 -1
- 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 +468 -97
- package/runtime/vercel/custom-system-CLAUDE.md +3 -2
- package/runtime/vercel/gh-shim +0 -0
- package/runtime/vercel/git-shim +53 -3
- package/runtime/vercel/linear-shim +0 -0
- package/runtime/vercel/ntn-shim +0 -0
- package/runtime/vercel/scripts/provision.sh +16 -0
- package/dist/chunk-6KOQRSHH.js.map +0 -1
- package/dist/chunk-DADOEMXP.js.map +0 -1
- package/dist/chunk-FX32NZD4.js.map +0 -1
- package/dist/chunk-JNY5GPIM.js.map +0 -1
- package/dist/chunk-JYEZ6Q5M.js.map +0 -1
- package/dist/chunk-KY32JO6J.js.map +0 -1
- package/dist/chunk-QT3SHMLY.js.map +0 -1
- package/dist/chunk-YRTM3KNT.js.map +0 -1
- package/dist/dist-564EDHFF.js.map +0 -1
- package/dist/dist-EAR4BLL2.js.map +0 -1
- package/runtime/hub/apps/hub/.next/static/chunks/0joh_xsiowfc4.js +0 -1
- /package/dist/{_cloud-attach-D4OQO5AJ.js.map → _cloud-attach-T6GPR6LJ.js.map} +0 -0
- /package/dist/{dist-2BTJQUJS.js.map → dist-B7TNWGVG.js.map} +0 -0
- /package/dist/{dist-CAT2TN75.js.map → dist-KYV3LEHG.js.map} +0 -0
- /package/dist/{dist-O5Y4X4C5.js.map → dist-T5MXBZGP.js.map} +0 -0
- /package/dist/{dist-UDQMBWYW.js.map → dist-Z7KEPQC7.js.map} +0 -0
- /package/dist/{prepared-state-BUO75YLZ-PW64VQMT.js.map → prepared-state-BUO75YLZ-RQRFFBJW.js.map} +0 -0
- /package/runtime/hub/apps/hub/.next/static/{lOi70Di6lcnEBsUUHKrQ5 → XtIjHGqvY4mQsOY2-m1Jy}/_buildManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{lOi70Di6lcnEBsUUHKrQ5 → XtIjHGqvY4mQsOY2-m1Jy}/_clientMiddlewareManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{lOi70Di6lcnEBsUUHKrQ5 → XtIjHGqvY4mQsOY2-m1Jy}/_ssgManifest.js +0 -0
|
@@ -22,14 +22,15 @@ import {
|
|
|
22
22
|
readBoxStatus,
|
|
23
23
|
registerBoxWithRelay,
|
|
24
24
|
syncClaudeCredentials
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-I654PBHA.js";
|
|
26
26
|
import {
|
|
27
27
|
hashProjectPath,
|
|
28
28
|
loadEffectiveConfig,
|
|
29
29
|
projectDirSegment,
|
|
30
30
|
sanitizeMnemonic
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-UIRBYL4G.js";
|
|
32
32
|
import {
|
|
33
|
+
AGENT_SYNC_SPECS,
|
|
33
34
|
BOX_DYNAMIC_SYNC_MANIFEST,
|
|
34
35
|
BOX_HOME,
|
|
35
36
|
BOX_MEMORY_DIR,
|
|
@@ -37,20 +38,26 @@ import {
|
|
|
37
38
|
DEFAULT_BOX_IMAGE,
|
|
38
39
|
SEED_MARKER,
|
|
39
40
|
SYNC_DRYRUN_ENV,
|
|
41
|
+
UserFacingError,
|
|
40
42
|
allocateProjectIndex,
|
|
41
43
|
buildHostSyncManifest,
|
|
42
44
|
computeSyncDelta,
|
|
45
|
+
describeInbound,
|
|
43
46
|
detectGitRepos,
|
|
44
47
|
dirnameUnix,
|
|
45
48
|
dryRunProviderSync,
|
|
46
49
|
extractCredentials,
|
|
47
50
|
generateBoxId,
|
|
48
51
|
hostClaudeBackupExpired,
|
|
52
|
+
isRealAgentCredential,
|
|
49
53
|
makeHostGitPorts,
|
|
50
54
|
makeSyncContext,
|
|
55
|
+
parseInboundSpec,
|
|
51
56
|
planCarryEntry,
|
|
57
|
+
pushCredentialToBox,
|
|
52
58
|
pushEnvFiles,
|
|
53
59
|
readCliStamp,
|
|
60
|
+
readCredentialBackup,
|
|
54
61
|
readPreparedStateRaw,
|
|
55
62
|
readState,
|
|
56
63
|
recordBox,
|
|
@@ -58,6 +65,7 @@ import {
|
|
|
58
65
|
renderCarryEntries,
|
|
59
66
|
resolveSyncTopology,
|
|
60
67
|
resyncWorkspace,
|
|
68
|
+
shouldAcceptCredentialUpdate,
|
|
61
69
|
stageClaudeCredentialsForUpload,
|
|
62
70
|
stageClaudeJsonOnlyForUpload,
|
|
63
71
|
stageClaudeStaticForUpload,
|
|
@@ -66,8 +74,9 @@ import {
|
|
|
66
74
|
stageDynamicSyncTarball,
|
|
67
75
|
stageOpencodeCredentialsForUpload,
|
|
68
76
|
stageOpencodeStateForUpload,
|
|
69
|
-
stageOpencodeStaticForUpload
|
|
70
|
-
|
|
77
|
+
stageOpencodeStaticForUpload,
|
|
78
|
+
writeCredentialBackup
|
|
79
|
+
} from "./chunk-DEDTPG2D.js";
|
|
71
80
|
|
|
72
81
|
// ../../packages/sandbox-cloud/dist/index.js
|
|
73
82
|
import { basename as basename2, resolve } from "path";
|
|
@@ -613,6 +622,44 @@ async function extractCloudAgentCredentials(backend, handle, opts = {}) {
|
|
|
613
622
|
const transport = createCloudSyncTransport({ backend, handle });
|
|
614
623
|
return extractCredentials(transport, { onLog: opts.onLog, backups: opts.backups });
|
|
615
624
|
}
|
|
625
|
+
async function reconcileAgentCredentials(backend, handle, opts = {}) {
|
|
626
|
+
return reconcileAgentCredentialsViaTransport(
|
|
627
|
+
createCloudSyncTransport({ backend, handle }),
|
|
628
|
+
opts
|
|
629
|
+
);
|
|
630
|
+
}
|
|
631
|
+
async function reconcileAgentCredentialsViaTransport(transport, opts = {}) {
|
|
632
|
+
const log = opts.onLog ?? (() => {
|
|
633
|
+
});
|
|
634
|
+
for (const spec of AGENT_SYNC_SPECS) {
|
|
635
|
+
const backupPath = opts.backups?.[spec.id];
|
|
636
|
+
try {
|
|
637
|
+
const hostText = await readCredentialBackup(spec.id, { backupPath });
|
|
638
|
+
const boxText = await transport.readText(spec.credential.boxAbsPath);
|
|
639
|
+
const hostReal = hostText !== null && isRealAgentCredential(spec.id, hostText);
|
|
640
|
+
const boxReal = boxText !== null && boxText.length > 0 && isRealAgentCredential(spec.id, boxText);
|
|
641
|
+
if (!hostReal && !boxReal) continue;
|
|
642
|
+
if (!hostReal && boxReal) {
|
|
643
|
+
await writeCredentialBackup(spec.id, boxText, { backupPath });
|
|
644
|
+
log(`captured ${spec.id} credential from box (no host backup)`);
|
|
645
|
+
continue;
|
|
646
|
+
}
|
|
647
|
+
if (boxReal && spec.credential.realShape === "claude-oauth" && shouldAcceptCredentialUpdate(spec.id, boxText, hostText).accept) {
|
|
648
|
+
await writeCredentialBackup(spec.id, boxText, { backupPath });
|
|
649
|
+
log(`captured newer ${spec.id} credential from box`);
|
|
650
|
+
continue;
|
|
651
|
+
}
|
|
652
|
+
if (!boxReal || shouldAcceptCredentialUpdate(spec.id, hostText, boxText).accept) {
|
|
653
|
+
await pushCredentialToBox(transport, spec.id, hostText);
|
|
654
|
+
log(`refreshed ${spec.id} credential in box from host backup`);
|
|
655
|
+
}
|
|
656
|
+
} catch (err) {
|
|
657
|
+
log(
|
|
658
|
+
`WARN: ${spec.id} credential reconcile failed (${err instanceof Error ? err.message : String(err)}) \u2014 skipping`
|
|
659
|
+
);
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
616
663
|
function sq(p) {
|
|
617
664
|
return `'${p.replace(/'/g, `'\\''`)}'`;
|
|
618
665
|
}
|
|
@@ -752,6 +799,73 @@ async function seedGitIdentity(backend, handle, opts = {}) {
|
|
|
752
799
|
}
|
|
753
800
|
log(`git: configured committer identity ${name} <${email}>`);
|
|
754
801
|
}
|
|
802
|
+
async function seedGitCredentials(backend, handle, opts = {}) {
|
|
803
|
+
const log = opts.onLog ?? (() => {
|
|
804
|
+
});
|
|
805
|
+
const host = await readHostOriginHost(opts.hostRepo);
|
|
806
|
+
const qHost = quoteShellArg(host);
|
|
807
|
+
const httpsKey = quoteShellArg(`url.https://${host}/.insteadOf`);
|
|
808
|
+
const sshKey = quoteShellArg(`url.git@${host}:.insteadOf`);
|
|
809
|
+
const tokenCfg = [
|
|
810
|
+
`git config --global credential.helper store`,
|
|
811
|
+
`git config --global --unset-all ${httpsKey} 2>/dev/null || true`,
|
|
812
|
+
`git config --global --add ${httpsKey} ${quoteShellArg(`git@${host}:`)}`,
|
|
813
|
+
`git config --global --add ${httpsKey} ${quoteShellArg(`ssh://git@${host}/`)}`
|
|
814
|
+
].join(" && ");
|
|
815
|
+
const sshCfg = [
|
|
816
|
+
`git config --global --replace-all ${sshKey} ${quoteShellArg(`https://${host}/`)}`,
|
|
817
|
+
`AGB_KEY=$(ls "$HOME"/.ssh/id_ed25519 "$HOME"/.ssh/id_rsa "$HOME"/.ssh/id_ecdsa 2>/dev/null | head -1)`,
|
|
818
|
+
`if [ -z "$AGB_KEY" ]; then AGB_KEY=$(find "$HOME/.ssh" -maxdepth 1 -type f ! -name '*.pub' ! -name 'config' ! -name 'known_hosts*' ! -name 'authorized_keys' 2>/dev/null | head -1); fi`,
|
|
819
|
+
`git config --global core.sshCommand "ssh\${AGB_KEY:+ -i $AGB_KEY} -o StrictHostKeyChecking=accept-new"`,
|
|
820
|
+
await buildSigningSnippet(opts.hostRepo)
|
|
821
|
+
].filter(Boolean).join("; ");
|
|
822
|
+
const script = [
|
|
823
|
+
// carry chowns to a fixed uid (1000); the box user is 1001/1002 elsewhere.
|
|
824
|
+
// Re-own so the box can read its own 0600 creds. Provider-agnostic.
|
|
825
|
+
`sudo -n chown -R "$(id -u):$(id -g)" "$HOME/.git-credentials" "$HOME/.ssh" 2>/dev/null || true`,
|
|
826
|
+
`chmod 600 "$HOME/.git-credentials" 2>/dev/null || true`,
|
|
827
|
+
`chmod 700 "$HOME/.ssh" 2>/dev/null || true`,
|
|
828
|
+
// Any copied key (default OR custom basename) must be 0600 for ssh.
|
|
829
|
+
`find "$HOME/.ssh" -maxdepth 1 -type f -exec chmod 600 {} + 2>/dev/null || true`,
|
|
830
|
+
`HOST=${qHost}`,
|
|
831
|
+
// Mode comes from the explicit marker the gate wrote (so a stray `carry:`
|
|
832
|
+
// ~/.git-credentials can't flip an SSH-mode box to HTTPS); fall back to file
|
|
833
|
+
// presence for boxes created before the marker existed. SSH mode accepts ANY
|
|
834
|
+
// private key (default OR a custom basename from an `IdentityFile`). Whatever
|
|
835
|
+
// the mode, the matching credential must actually be present — if not, the
|
|
836
|
+
// carry dropped it, so exit non-zero and fail the create rather than stamp a
|
|
837
|
+
// broken direct box.
|
|
838
|
+
`AGB_HAS_KEY() { find "$HOME/.ssh" -maxdepth 1 -type f ! -name '*.pub' ! -name 'config' ! -name 'known_hosts*' ! -name 'authorized_keys' 2>/dev/null | grep -q .; }`,
|
|
839
|
+
`MODE=$(cat "$HOME/.config/agentbox/git-direct-mode" 2>/dev/null)`,
|
|
840
|
+
`if [ -z "$MODE" ]; then if [ -f "$HOME/.git-credentials" ]; then MODE=token; elif AGB_HAS_KEY; then MODE=ssh; fi; fi`,
|
|
841
|
+
`if [ "$MODE" = token ] && [ -f "$HOME/.git-credentials" ]; then ${tokenCfg}; elif [ "$MODE" = ssh ] && AGB_HAS_KEY; then ${sshCfg}; else echo "agentbox: git.pushMode=direct but the chosen credential ($MODE) did not land in the box (carry upload failed?)" >&2; exit 3; fi`
|
|
842
|
+
].join("\n");
|
|
843
|
+
const r = await backend.exec(handle, bashScript(script));
|
|
844
|
+
if (r.exitCode !== 0) {
|
|
845
|
+
throw new Error(
|
|
846
|
+
`git.pushMode=direct: configuring box-held credentials failed (exit ${String(r.exitCode)}): ${(r.stderr || r.stdout).trim()}`
|
|
847
|
+
);
|
|
848
|
+
}
|
|
849
|
+
log("git: configured box-held credentials (direct push mode)");
|
|
850
|
+
}
|
|
851
|
+
async function buildSigningSnippet(hostRepo) {
|
|
852
|
+
const gpgsign = (await readHostGitConfig("commit.gpgsign", hostRepo))?.toLowerCase();
|
|
853
|
+
const format = (await readHostGitConfig("gpg.format", hostRepo))?.toLowerCase();
|
|
854
|
+
const signingKey = await readHostGitConfig("user.signingkey", hostRepo);
|
|
855
|
+
if (gpgsign !== "true" || !signingKey || format !== "ssh") return "";
|
|
856
|
+
const looksLikePath = signingKey.includes("/") && !signingKey.startsWith("key::");
|
|
857
|
+
const boxKey = looksLikePath ? `/home/vscode/.ssh/${signingKey.split("/").pop() ?? ""}` : signingKey;
|
|
858
|
+
const priv = looksLikePath ? `/home/vscode/.ssh/${(signingKey.split("/").pop() ?? "").replace(/\.pub$/, "")}` : boxKey;
|
|
859
|
+
return `git config --global gpg.format ssh && git config --global user.signingkey ${quoteShellArg(boxKey)} && if ssh-keygen -y -P '' -f ${quoteShellArg(priv)} >/dev/null 2>&1; then git config --global commit.gpgsign true; else git config --global --unset commit.gpgsign 2>/dev/null || true; echo "agentbox: signing key needs a passphrase \u2014 leaving commit signing OFF so in-box commits do not fail" >&2; fi`;
|
|
860
|
+
}
|
|
861
|
+
async function readHostOriginHost(hostRepo) {
|
|
862
|
+
const args = hostRepo ? ["-C", hostRepo, "remote", "get-url", "origin"] : ["remote", "get-url", "origin"];
|
|
863
|
+
const r = await execa3("git", args, { reject: false });
|
|
864
|
+
const url = r.exitCode === 0 ? (r.stdout ?? "").trim() : "";
|
|
865
|
+
const m = /^[a-z][a-z0-9+.-]*:\/\/(?:[^@/]+@)?([^/:]+)/i.exec(url) ?? /^(?:[^@/]+@)?([^/:]+):/i.exec(url);
|
|
866
|
+
const host = m?.[1];
|
|
867
|
+
return host && host.length > 0 ? host : "github.com";
|
|
868
|
+
}
|
|
755
869
|
async function readHostGitConfig(key, hostRepo) {
|
|
756
870
|
const args = hostRepo ? ["-C", hostRepo, "config", key] : ["config", key];
|
|
757
871
|
const r = await execa3("git", args, { reject: false });
|
|
@@ -818,7 +932,10 @@ async function uploadOneEntry(args) {
|
|
|
818
932
|
const localTar = join4(args.stageDir, `carry-${String(args.index)}.tar`);
|
|
819
933
|
const excludeArgs = isDir ? exclude.map((p) => `--exclude=${p}`) : [];
|
|
820
934
|
const tarArgs = isDir ? ["-C", entry.absSrc, "-cf", localTar, ...excludeArgs, "."] : ["-C", dirnameUnix(entry.absSrc), "-cf", localTar, fileBase];
|
|
821
|
-
const packed = await execa4("tar", tarArgs, {
|
|
935
|
+
const packed = await execa4("tar", tarArgs, {
|
|
936
|
+
reject: false,
|
|
937
|
+
env: { ...process.env, COPYFILE_DISABLE: "1" }
|
|
938
|
+
});
|
|
822
939
|
if (packed.exitCode !== 0) {
|
|
823
940
|
throw new Error(`tar pack failed: ${String(packed.stderr).slice(0, 300)}`);
|
|
824
941
|
}
|
|
@@ -1287,6 +1404,9 @@ function buildBootstrapEnv(args) {
|
|
|
1287
1404
|
if (lease) {
|
|
1288
1405
|
boxEnvFile.push(`AGENTBOX_GIT_LEASE=1`);
|
|
1289
1406
|
}
|
|
1407
|
+
if (pushMode === "direct") {
|
|
1408
|
+
boxEnvFile.push(`AGENTBOX_GIT_DIRECT=1`);
|
|
1409
|
+
}
|
|
1290
1410
|
return { env, boxEnvFile };
|
|
1291
1411
|
}
|
|
1292
1412
|
async function kickCloudBootstrap(args) {
|
|
@@ -1444,7 +1564,7 @@ function buildCarryOverSteps(opts) {
|
|
|
1444
1564
|
}
|
|
1445
1565
|
if (opts.hasUntracked) {
|
|
1446
1566
|
steps.push(
|
|
1447
|
-
opts.detectConflicts ? `if [ -f ${untracked} ]; then tar -tzf ${untracked} | while IFS= read -r p; do case "$p" in ''|*/) continue ;; esac; if [ -e ${wd}/"$p" ]; then echo "${OVERLAY_SKIP_MARKER}$p"; fi; done || true ; tar -C ${wd} --skip-old-files -xzf ${untracked} || true ; rm -f ${untracked} ; fi` : `if [ -f ${untracked} ]; then tar -C ${wd} -xzf ${untracked} && rm -f ${untracked} ; fi`
|
|
1567
|
+
opts.detectConflicts ? `if [ -f ${untracked} ]; then tar -tzf ${untracked} | while IFS= read -r p; do case "$p" in ''|*/) continue ;; esac; if [ -e ${wd}/"$p" ]; then echo "${OVERLAY_SKIP_MARKER}$p"; fi; done || true ; tar -C ${wd} --skip-old-files --no-same-owner -xzf ${untracked} || true ; rm -f ${untracked} ; fi` : `if [ -f ${untracked} ]; then tar -C ${wd} --no-same-owner -xzf ${untracked} && rm -f ${untracked} ; fi`
|
|
1448
1568
|
);
|
|
1449
1569
|
}
|
|
1450
1570
|
return steps;
|
|
@@ -1527,8 +1647,7 @@ async function seedFromGitClone(args) {
|
|
|
1527
1647
|
});
|
|
1528
1648
|
const gitDir = `${args.workspaceDir}/.git`;
|
|
1529
1649
|
const prepSteps = args.overlay ? [`$SUDO rm -rf ${quoteShellArgv([gitDir])}`] : [
|
|
1530
|
-
|
|
1531
|
-
`$SUDO mkdir -p ${quoteShellArgv([args.workspaceDir])}`,
|
|
1650
|
+
...wipeDirSteps(args.workspaceDir),
|
|
1532
1651
|
`$SUDO chown "$(id -un):$(id -gn)" ${quoteShellArgv([args.workspaceDir])}`
|
|
1533
1652
|
];
|
|
1534
1653
|
const checkoutSteps = args.overlay ? [
|
|
@@ -1553,7 +1672,12 @@ async function seedFromGitClone(args) {
|
|
|
1553
1672
|
// `/workspace/<rel>`, so the root clone is preserved). Overlay: rm only
|
|
1554
1673
|
// `<dir>/.git`, preserving the warm working tree.
|
|
1555
1674
|
...prepSteps,
|
|
1556
|
-
|
|
1675
|
+
// --no-same-owner (here and on every extraction in this file): clouds
|
|
1676
|
+
// whose exec user is root would otherwise preserve the HOST's numeric
|
|
1677
|
+
// uids from the tarball, and git then fails with "dubious ownership"
|
|
1678
|
+
// on /workspace/.git. Non-root extraction already behaves this way
|
|
1679
|
+
// (tar defaults to --no-same-owner unless root).
|
|
1680
|
+
`tar -C ${quoteShellArgv([args.workspaceDir])} --no-same-owner -xzf ${quoteShellArgv([remoteTar])}`,
|
|
1557
1681
|
setOrigin,
|
|
1558
1682
|
...checkoutSteps,
|
|
1559
1683
|
...carryOverSteps,
|
|
@@ -1674,7 +1798,7 @@ async function tryReseedRepoDelta(args) {
|
|
|
1674
1798
|
hasUntracked: untrackedSize > 0,
|
|
1675
1799
|
detectConflicts: true
|
|
1676
1800
|
});
|
|
1677
|
-
const lfsStep = deltaLfsSize > 0 ? `tar -C ${quoteShellArgv([`${args.workspaceDir}/.git`])} -xzf ${quoteShellArgv([REMOTE_DELTA_LFS])}` : ": # no delta lfs objects";
|
|
1801
|
+
const lfsStep = deltaLfsSize > 0 ? `tar -C ${quoteShellArgv([`${args.workspaceDir}/.git`])} --no-same-owner -xzf ${quoteShellArgv([REMOTE_DELTA_LFS])}` : ": # no delta lfs objects";
|
|
1678
1802
|
const SUDO = `if command -v sudo >/dev/null 2>&1; then SUDO='sudo -n'; else SUDO=''; fi`;
|
|
1679
1803
|
const script = [
|
|
1680
1804
|
`set -euo pipefail`,
|
|
@@ -1835,6 +1959,10 @@ async function readOriginUrl(hostRepo) {
|
|
|
1835
1959
|
const out = (r.stdout ?? "").trim();
|
|
1836
1960
|
return out.length > 0 ? out : null;
|
|
1837
1961
|
}
|
|
1962
|
+
function wipeDirSteps(dir) {
|
|
1963
|
+
const q = quoteShellArgv([dir]);
|
|
1964
|
+
return [`$SUDO mkdir -p ${q}`, `$SUDO find ${q} -mindepth 1 -maxdepth 1 -exec rm -rf {} +`];
|
|
1965
|
+
}
|
|
1838
1966
|
async function seedFromTar(args) {
|
|
1839
1967
|
const stage = await mkdtemp6(join7(tmpdir6(), "agentbox-tar-"));
|
|
1840
1968
|
const tarPath = join7(stage, "workspace.tar.gz");
|
|
@@ -1852,10 +1980,9 @@ async function seedFromTar(args) {
|
|
|
1852
1980
|
// (index-pack) fails with "Unable to read current working directory".
|
|
1853
1981
|
`cd /tmp`,
|
|
1854
1982
|
SUDO,
|
|
1855
|
-
|
|
1856
|
-
`$SUDO mkdir -p ${quoteShellArgv([args.workspaceDir])}`,
|
|
1983
|
+
...wipeDirSteps(args.workspaceDir),
|
|
1857
1984
|
`$SUDO chown "$(id -un):$(id -gn)" ${quoteShellArgv([args.workspaceDir])}`,
|
|
1858
|
-
`tar -C ${quoteShellArgv([args.workspaceDir])} -xzf ${quoteShellArgv([remoteTar])}`,
|
|
1985
|
+
`tar -C ${quoteShellArgv([args.workspaceDir])} --no-same-owner -xzf ${quoteShellArgv([remoteTar])}`,
|
|
1859
1986
|
`rm -f ${quoteShellArgv([remoteTar])}`
|
|
1860
1987
|
].join("\n");
|
|
1861
1988
|
const r = await args.backend.exec(args.handle, bashScript(script));
|
|
@@ -1952,7 +2079,7 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
1952
2079
|
if (!sandboxId) {
|
|
1953
2080
|
throw new Error(`cloud box ${box.name} has no sandboxId \u2014 record is malformed`);
|
|
1954
2081
|
}
|
|
1955
|
-
return { sandboxId };
|
|
2082
|
+
return { sandboxId, inbound: box.cloud?.inbound };
|
|
1956
2083
|
}
|
|
1957
2084
|
function mintBox(req) {
|
|
1958
2085
|
const id = generateBoxId();
|
|
@@ -2124,6 +2251,14 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2124
2251
|
} catch {
|
|
2125
2252
|
}
|
|
2126
2253
|
}
|
|
2254
|
+
try {
|
|
2255
|
+
const credentialSync = (await loadEffectiveConfig(box.workspacePath)).effective.box.credentialSync;
|
|
2256
|
+
if (credentialSync) {
|
|
2257
|
+
await reconcileAgentCredentials(backend, h, { onLog: () => {
|
|
2258
|
+
} });
|
|
2259
|
+
}
|
|
2260
|
+
} catch {
|
|
2261
|
+
}
|
|
2127
2262
|
return next;
|
|
2128
2263
|
}
|
|
2129
2264
|
return {
|
|
@@ -2134,15 +2269,17 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2134
2269
|
});
|
|
2135
2270
|
const { id, name, branch } = mintBox(req);
|
|
2136
2271
|
const image = opts.provisionImage ? await opts.provisionImage(req) : req.image ?? FALLBACK_IMAGE;
|
|
2137
|
-
const
|
|
2138
|
-
const vcpuOverride = req.providerOptions?.["vcpus"];
|
|
2139
|
-
const resources = typeof vcpuOverride === "number" && vcpuOverride > 0 ? { ...baseResources, cpu: vcpuOverride } : baseResources;
|
|
2272
|
+
const resources = opts.defaultResources ?? { cpu: 2, memory: 4, disk: 8 };
|
|
2140
2273
|
const timeoutOverride = req.providerOptions?.["timeoutMs"];
|
|
2141
2274
|
const timeoutMs = typeof timeoutOverride === "number" && timeoutOverride > 0 ? timeoutOverride : void 0;
|
|
2142
2275
|
const networkPolicyOpt = req.providerOptions?.["networkPolicy"];
|
|
2143
2276
|
const networkPolicy = typeof networkPolicyOpt === "string" && networkPolicyOpt.trim() !== "" ? networkPolicyOpt.trim() : void 0;
|
|
2144
2277
|
const sizeOpt = req.providerOptions?.["size"];
|
|
2145
2278
|
const size = typeof sizeOpt === "string" && sizeOpt.trim() !== "" ? sizeOpt.trim() : void 0;
|
|
2279
|
+
const locationOpt = req.providerOptions?.["location"];
|
|
2280
|
+
const location = typeof locationOpt === "string" && locationOpt.trim() !== "" ? locationOpt.trim() : void 0;
|
|
2281
|
+
const inboundOpt = req.providerOptions?.["inbound"];
|
|
2282
|
+
const inbound = typeof inboundOpt === "string" && inboundOpt.trim() !== "" ? inboundOpt.trim() : void 0;
|
|
2146
2283
|
const relayToken = generateRelayToken();
|
|
2147
2284
|
const bridgeToken = generateRelayToken();
|
|
2148
2285
|
try {
|
|
@@ -2172,10 +2309,13 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2172
2309
|
}
|
|
2173
2310
|
const agentVolumes = await ensureAgentVolumesForCloud(backend, { onLog: log });
|
|
2174
2311
|
const exposeServicePorts = await readExposedServicePorts(req.workspacePath);
|
|
2312
|
+
const credentialSyncOff = (req.credentialSync ?? (await loadEffectiveConfig(req.projectRoot ?? req.workspacePath)).effective.box.credentialSync) === false;
|
|
2175
2313
|
const provisionEnv = {
|
|
2176
2314
|
AGENTBOX_BOX_ID: id,
|
|
2177
2315
|
AGENTBOX_BOX_NAME: name,
|
|
2178
2316
|
AGENTBOX_BOX_KIND: "cloud",
|
|
2317
|
+
// Absent = enabled; the ctl credential watcher only checks for '0'.
|
|
2318
|
+
...credentialSyncOff ? { AGENTBOX_CREDENTIAL_SYNC: "0" } : {},
|
|
2179
2319
|
// In-sandbox relay is on the box's loopback at the in-box port.
|
|
2180
2320
|
// 8788 is distinct from the host relay's 8787 so a nested agentbox
|
|
2181
2321
|
// run inside the box can claim :8787 without colliding.
|
|
@@ -2194,6 +2334,8 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2194
2334
|
snapshot,
|
|
2195
2335
|
resources,
|
|
2196
2336
|
size,
|
|
2337
|
+
location,
|
|
2338
|
+
inbound,
|
|
2197
2339
|
timeoutMs,
|
|
2198
2340
|
exposePorts: exposeServicePorts,
|
|
2199
2341
|
networkPolicy,
|
|
@@ -2223,6 +2365,14 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2223
2365
|
throw err;
|
|
2224
2366
|
}
|
|
2225
2367
|
}
|
|
2368
|
+
if (handle.resources) {
|
|
2369
|
+
const r = handle.resources;
|
|
2370
|
+
const parts = [];
|
|
2371
|
+
if (typeof r.cpu === "number") parts.push(`${String(r.cpu)} vCPU`);
|
|
2372
|
+
if (typeof r.memory === "number") parts.push(`${String(r.memory)} GB RAM`);
|
|
2373
|
+
if (typeof r.disk === "number") parts.push(`${String(r.disk)} GB disk`);
|
|
2374
|
+
if (parts.length > 0) log(`provisioned ${parts.join(" / ")}`);
|
|
2375
|
+
}
|
|
2226
2376
|
const inBoxClone = req.inBoxClone ? {
|
|
2227
2377
|
authedUrl: req.inBoxClone.authedUrl,
|
|
2228
2378
|
originUrl: req.inBoxClone.originUrl,
|
|
@@ -2279,6 +2429,12 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2279
2429
|
carrySummary = { count: result.applied.length, entries: result.applied };
|
|
2280
2430
|
}
|
|
2281
2431
|
}
|
|
2432
|
+
if (req.gitPushMode === "direct") {
|
|
2433
|
+
await seedGitCredentials(backend, handle, {
|
|
2434
|
+
hostRepo: req.workspacePath,
|
|
2435
|
+
onLog: log
|
|
2436
|
+
});
|
|
2437
|
+
}
|
|
2282
2438
|
const vncEnabled = req.vnc?.enabled !== false;
|
|
2283
2439
|
const vncPassword = vncEnabled ? generateVncPassword() : void 0;
|
|
2284
2440
|
const wp = backend.webProxyPort ?? CLOUD_WEB_PROXY_PORT;
|
|
@@ -2472,6 +2628,12 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2472
2628
|
snapshotRef: resolvedCheckpointRef,
|
|
2473
2629
|
lastState: "running",
|
|
2474
2630
|
sessionTimeoutMs: timeoutMs,
|
|
2631
|
+
// Real resources the backend reported (Hetzner: the plan's actual
|
|
2632
|
+
// cores/memory/disk). Absent → readers fall back to defaultResources.
|
|
2633
|
+
resources: handle.resources,
|
|
2634
|
+
// Inbound-access policy the backend applied to the per-box firewall
|
|
2635
|
+
// (VPS providers). Persisted so drift re-syncs preserve the whitelist.
|
|
2636
|
+
inbound: handle.inbound,
|
|
2475
2637
|
// Only host-seeded boxes share a fork base with the host, so only
|
|
2476
2638
|
// they can be resynced back to the host tip on session start (7.5).
|
|
2477
2639
|
// inBoxClone / plane boxes clone from a leased URL — left unset.
|
|
@@ -2517,6 +2679,42 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2517
2679
|
async repairReachability(box) {
|
|
2518
2680
|
return await backend.repairReachability?.(handleFor(box)) ?? { changed: false };
|
|
2519
2681
|
},
|
|
2682
|
+
async setInbound(box, spec, onLog) {
|
|
2683
|
+
if (!backend.setInbound) {
|
|
2684
|
+
throw new UserFacingError(
|
|
2685
|
+
`inbound access control isn't supported for provider '${providerName}' \u2014 it has no per-box firewall (only hetzner / digitalocean do).`
|
|
2686
|
+
);
|
|
2687
|
+
}
|
|
2688
|
+
const policy = parseInboundSpec(spec);
|
|
2689
|
+
const { sources } = await backend.setInbound(handleFor(box), policy);
|
|
2690
|
+
onLog?.(`${describeInbound(policy)} -> ${sources.join(", ")}`);
|
|
2691
|
+
const cloud = box.cloud;
|
|
2692
|
+
if (cloud) await recordBox({ ...box, cloud: { ...cloud, inbound: policy } });
|
|
2693
|
+
return policy;
|
|
2694
|
+
},
|
|
2695
|
+
async enableDirectGit(box, entries, opts2) {
|
|
2696
|
+
const onLog = opts2?.onLog;
|
|
2697
|
+
const handle = handleFor(box);
|
|
2698
|
+
const ctx = makeSyncContext({
|
|
2699
|
+
boxName: box.name,
|
|
2700
|
+
boxId: box.id,
|
|
2701
|
+
provider: "cloud",
|
|
2702
|
+
hostWorkspace: box.workspacePath,
|
|
2703
|
+
boxWorkspace: CLOUD_WORKSPACE_DIR,
|
|
2704
|
+
onLog
|
|
2705
|
+
});
|
|
2706
|
+
await makeCloudSync(backend, handle).applyCarry(ctx, entries);
|
|
2707
|
+
await seedGitCredentials(backend, handle, { hostRepo: opts2?.hostRepo, onLog });
|
|
2708
|
+
const flip = 'if ! sudo -n grep -q "^AGENTBOX_GIT_DIRECT=" /etc/agentbox/box.env 2>/dev/null; then echo AGENTBOX_GIT_DIRECT=1 | sudo -n tee -a /etc/agentbox/box.env >/dev/null; fi';
|
|
2709
|
+
const r = await backend.exec(handle, bashScript(flip));
|
|
2710
|
+
if (r.exitCode !== 0) {
|
|
2711
|
+
throw new Error(
|
|
2712
|
+
`enableDirectGit: failed to set AGENTBOX_GIT_DIRECT in box env: ${r.stderr || r.stdout || `exit ${String(r.exitCode)}`}`
|
|
2713
|
+
);
|
|
2714
|
+
}
|
|
2715
|
+
const cloud = box.cloud;
|
|
2716
|
+
if (cloud) await recordBox({ ...box, cloud: { ...cloud, gitPushMode: "direct" } });
|
|
2717
|
+
},
|
|
2520
2718
|
async pause(box) {
|
|
2521
2719
|
await backend.pause(handleFor(box));
|
|
2522
2720
|
await persistLastState(box, "paused");
|
|
@@ -2670,6 +2868,9 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2670
2868
|
sync(box) {
|
|
2671
2869
|
return makeCloudSync(backend, handleFor(box));
|
|
2672
2870
|
},
|
|
2871
|
+
syncTransport(box) {
|
|
2872
|
+
return createCloudSyncTransport({ backend, handle: handleFor(box) });
|
|
2873
|
+
},
|
|
2673
2874
|
// Session-start live-box resync (Phase 7.5): merge the host's current state
|
|
2674
2875
|
// back into the box, box-wins on conflict. Gated on `hostSeeded` so
|
|
2675
2876
|
// inBoxClone / plane boxes (no host fork base) are left untouched. The box
|
|
@@ -2871,4 +3072,4 @@ export {
|
|
|
2871
3072
|
renderInnerCommand,
|
|
2872
3073
|
openWebAppOnVncScreen
|
|
2873
3074
|
};
|
|
2874
|
-
//# sourceMappingURL=chunk-
|
|
3075
|
+
//# sourceMappingURL=chunk-6U2S6QWD.js.map
|