@madarco/agentbox 0.29.0 → 0.29.2
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 +46 -0
- package/dist/{_cloud-attach-HKRHYCY7.js → _cloud-attach-7WVNYNJI.js} +11 -11
- package/dist/{chunk-GWKGSXDC.js → chunk-5I7IFACI.js} +2 -2
- package/dist/{chunk-QU5BI2HC.js → chunk-5NVHJS7D.js} +4 -4
- package/dist/{chunk-6PIGTR4D.js → chunk-6UCHNX75.js} +22 -15
- package/dist/{chunk-6PIGTR4D.js.map → chunk-6UCHNX75.js.map} +1 -1
- package/dist/{chunk-VY54AX4T.js → chunk-6YSYQZRH.js} +3 -3
- package/dist/{chunk-DYETLPUT.js → chunk-A2TATHHJ.js} +2 -2
- package/dist/{chunk-CO2I3CQI.js → chunk-AUHYXXCA.js} +4 -4
- package/dist/{chunk-GWYD7YBK.js → chunk-CZPVVFCF.js} +5 -5
- package/dist/{chunk-BWE2I5QG.js → chunk-F4PPZ4SI.js} +2 -2
- package/dist/{chunk-VVNXQ4XS.js → chunk-F77AZT2M.js} +8 -8
- package/dist/{chunk-LHOKRCNF.js → chunk-FCMBVJFQ.js} +3 -3
- package/dist/{chunk-NGERWFSA.js → chunk-HLBK5ZR6.js} +14 -11
- package/dist/chunk-HLBK5ZR6.js.map +1 -0
- package/dist/{chunk-EPFXLXCW.js → chunk-I2DEYQLZ.js} +4 -4
- package/dist/{chunk-THUST2QK.js → chunk-JLVUNDUB.js} +28 -9
- package/dist/chunk-JLVUNDUB.js.map +1 -0
- package/dist/{chunk-DBXCFLAR.js → chunk-JTYWZJIU.js} +5 -5
- package/dist/{chunk-EFVTQ7YB.js → chunk-LEVYTABB.js} +4 -4
- package/dist/{chunk-RQURMAPA.js → chunk-MS4NWRXN.js} +5 -5
- package/dist/{chunk-WHJYOO5H.js → chunk-N6EBPKTJ.js} +46 -4
- package/dist/chunk-N6EBPKTJ.js.map +1 -0
- package/dist/{chunk-HP4L45LW.js → chunk-OUOV4OM2.js} +8 -8
- package/dist/{chunk-WGNI24H2.js → chunk-P5A6MT75.js} +9 -9
- package/dist/{chunk-7QU6XENE.js → chunk-PAWAGULH.js} +2 -2
- package/dist/{chunk-HO2ACZES.js → chunk-RXH634SC.js} +2 -2
- package/dist/{chunk-NAT2H7J4.js → chunk-SXXN7JOC.js} +46 -26
- package/dist/chunk-SXXN7JOC.js.map +1 -0
- package/dist/{chunk-RZCLRWNY.js → chunk-TDW2T3HR.js} +6 -6
- package/dist/{chunk-7Q6BG5AN.js → chunk-THKVKVRF.js} +3 -3
- package/dist/{chunk-3INUZQTR.js → chunk-TPHSVKMX.js} +3 -3
- package/dist/{chunk-HNWZO2XU.js → chunk-WDBDFLH3.js} +4 -4
- package/dist/{chunk-OKLEPEWZ.js → chunk-XENTK32L.js} +5 -2
- package/dist/chunk-XENTK32L.js.map +1 -0
- package/dist/{chunk-UPVP6YGJ.js → chunk-ZCHWZYIN.js} +3 -3
- package/dist/cloud-backends.js +4 -4
- package/dist/{control-plane-UKKYXHIQ.js → control-plane-TOFT56CT.js} +16 -16
- package/dist/{cp-hub-upload-BM2OLTOS.js → cp-hub-upload-OTBR5SL3.js} +6 -6
- package/dist/{custody-client-NPXJ46TB.js → custody-client-L4FEFW4C.js} +3 -3
- package/dist/{deploy-hetzner-Y3ILCDRF.js → deploy-hetzner-EE5CYX4N.js} +8 -8
- package/dist/{dist-5OGQ3CJQ.js → dist-3BKIPZR3.js} +3 -3
- package/dist/{dist-MUTFY7FA.js → dist-7HSAWFRN.js} +7 -7
- package/dist/{dist-A5ZEIVAW.js → dist-BVZBXQ2Y.js} +8 -8
- package/dist/{dist-ZNYS7CVF.js → dist-C5B6NGBO.js} +5 -5
- package/dist/{dist-EOGD7KD6.js → dist-GMIBT6IK.js} +47 -23
- package/dist/{dist-EOGD7KD6.js.map → dist-GMIBT6IK.js.map} +1 -1
- package/dist/{dist-7B3VCLZI.js → dist-JSEXGLYK.js} +7 -7
- package/dist/{dist-SMDXLPZO.js → dist-PTYASENV.js} +2 -2
- package/dist/{dist-VTLQKZ2E.js → dist-RWFKW4IU.js} +6 -6
- package/dist/{dist-ZJIJHCZB.js → dist-XV77P3RW.js} +7 -7
- package/dist/{dist-DOEGENNW.js → dist-Y2GCMA6N.js} +7 -7
- package/dist/{host-reach-drainer-ZJU2STQQ.js → host-reach-drainer-N4JSFUBY.js} +2 -2
- package/dist/hub-53E6EFZB.js +37 -0
- package/dist/{hub-adopt-OA336ZXZ.js → hub-adopt-NCCCMMXL.js} +6 -6
- package/dist/{hub-docker-target-JKFCABK4.js → hub-docker-target-CS5XHSSA.js} +11 -11
- package/dist/index.js +61 -53
- package/dist/index.js.map +1 -1
- package/dist/prepare-VTLE7RCJ.js +41 -0
- package/dist/prepared-custody-ATP6GQGW.js +36 -0
- package/dist/{prepared-state-LNQ7DYSU-AR5RMXAO.js → prepared-state-LNQ7DYSU-2YFSDOCV.js} +3 -3
- package/dist/{publish-credentials-3SQXX45P.js → publish-credentials-NAWOHOLK.js} +7 -7
- package/dist/{registry-AFKV3EO2.js → registry-5CPAQ2KN.js} +4 -4
- package/dist/{relay-QH6OEY2V.js → relay-3T57T4RI.js} +7 -7
- package/dist/{remote-docker-share-RMS6IB5X.js → remote-docker-share-XBV76ZAZ.js} +8 -8
- package/dist/{tool-grant-push-T6DRBY3W.js → tool-grant-push-5GJYMC7C.js} +3 -3
- package/package.json +1 -1
- package/runtime/_shared/ctl.cjs +4 -1
- package/runtime/digitalocean/ctl.cjs +4 -1
- package/runtime/docker/packages/ctl/dist/bin.cjs +4 -1
- package/runtime/e2b/ctl.cjs +4 -1
- package/runtime/hetzner/ctl.cjs +4 -1
- 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/middleware-build-manifest.js +3 -3
- package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
- package/runtime/hub/apps/hub/{chunk-3AD3MYNV.js → chunk-CTNPQ75B.js} +9 -9
- package/runtime/hub/apps/hub/{chunk-UQ5XNPOF.js → chunk-DJPQLZ5Y.js} +3 -3
- package/runtime/hub/apps/hub/{chunk-GBYD2ODL.js → chunk-G6FJR7TN.js} +4 -1
- package/runtime/hub/apps/hub/{chunk-WHGY7HOC.js → chunk-GUKVXSIY.js} +27 -8
- package/runtime/hub/apps/hub/{chunk-3ZDBZYOY.js → chunk-QGAP34GN.js} +4 -4
- package/runtime/hub/apps/hub/{chunk-H5SUXDZA.js → chunk-QWSP6WJ2.js} +3 -3
- package/runtime/hub/apps/hub/{dist-CMVSARW5.js → dist-2G5INR3G.js} +5 -5
- package/runtime/hub/apps/hub/{dist-R77W6WJ5.js → dist-CIB4ZPJW.js} +88 -22
- package/runtime/hub/apps/hub/{dist-37EKQ6RZ.js → dist-PI5ZAQGG.js} +4 -4
- package/runtime/hub/apps/hub/{dist-TH2JZYZY.js → dist-VDPNQEZ7.js} +5 -5
- package/runtime/hub/apps/hub/{dist-EOGGFZZS.js → dist-VZM32WR4.js} +4 -4
- package/runtime/hub/apps/hub/{dist-LJBHOO3K.js → dist-W2YXTEQN.js} +1 -1
- package/runtime/hub/apps/hub/{dist-Z2Y5F7AF.js → dist-Y3LGOZ56.js} +4 -4
- package/runtime/hub/apps/hub/{dist-XPRGHQH2.js → dist-ZOJYJJ26.js} +4 -4
- package/runtime/hub/apps/hub/{dist-EGXZRZH2.js → dist-ZTJMZLED.js} +3 -3
- package/runtime/hub/apps/hub/{hub-worker-DXVMUQWF.js → hub-worker-YQCQKCXS.js} +6 -6
- package/runtime/hub/apps/hub/{prepared-state-LNQ7DYSU-ABC2EQVI.js → prepared-state-LNQ7DYSU-4I7FNNNS.js} +2 -2
- package/runtime/hub/apps/hub/server.js +12 -12
- package/runtime/hub/apps/hub/tsconfig.tsbuildinfo +1 -1
- package/runtime/relay/bin.cjs +4 -1
- package/runtime/vercel/ctl.cjs +4 -1
- package/dist/chunk-NAT2H7J4.js.map +0 -1
- package/dist/chunk-NGERWFSA.js.map +0 -1
- package/dist/chunk-OKLEPEWZ.js.map +0 -1
- package/dist/chunk-THUST2QK.js.map +0 -1
- package/dist/chunk-WHJYOO5H.js.map +0 -1
- package/dist/hub-Q4VOF4WN.js +0 -37
- package/dist/prepare-GFWWKWGF.js +0 -41
- package/dist/prepared-custody-KU4PDVBT.js +0 -36
- /package/dist/{_cloud-attach-HKRHYCY7.js.map → _cloud-attach-7WVNYNJI.js.map} +0 -0
- /package/dist/{chunk-GWKGSXDC.js.map → chunk-5I7IFACI.js.map} +0 -0
- /package/dist/{chunk-QU5BI2HC.js.map → chunk-5NVHJS7D.js.map} +0 -0
- /package/dist/{chunk-VY54AX4T.js.map → chunk-6YSYQZRH.js.map} +0 -0
- /package/dist/{chunk-DYETLPUT.js.map → chunk-A2TATHHJ.js.map} +0 -0
- /package/dist/{chunk-CO2I3CQI.js.map → chunk-AUHYXXCA.js.map} +0 -0
- /package/dist/{chunk-GWYD7YBK.js.map → chunk-CZPVVFCF.js.map} +0 -0
- /package/dist/{chunk-BWE2I5QG.js.map → chunk-F4PPZ4SI.js.map} +0 -0
- /package/dist/{chunk-VVNXQ4XS.js.map → chunk-F77AZT2M.js.map} +0 -0
- /package/dist/{chunk-LHOKRCNF.js.map → chunk-FCMBVJFQ.js.map} +0 -0
- /package/dist/{chunk-EPFXLXCW.js.map → chunk-I2DEYQLZ.js.map} +0 -0
- /package/dist/{chunk-DBXCFLAR.js.map → chunk-JTYWZJIU.js.map} +0 -0
- /package/dist/{chunk-EFVTQ7YB.js.map → chunk-LEVYTABB.js.map} +0 -0
- /package/dist/{chunk-RQURMAPA.js.map → chunk-MS4NWRXN.js.map} +0 -0
- /package/dist/{chunk-HP4L45LW.js.map → chunk-OUOV4OM2.js.map} +0 -0
- /package/dist/{chunk-WGNI24H2.js.map → chunk-P5A6MT75.js.map} +0 -0
- /package/dist/{chunk-7QU6XENE.js.map → chunk-PAWAGULH.js.map} +0 -0
- /package/dist/{chunk-HO2ACZES.js.map → chunk-RXH634SC.js.map} +0 -0
- /package/dist/{chunk-RZCLRWNY.js.map → chunk-TDW2T3HR.js.map} +0 -0
- /package/dist/{chunk-7Q6BG5AN.js.map → chunk-THKVKVRF.js.map} +0 -0
- /package/dist/{chunk-3INUZQTR.js.map → chunk-TPHSVKMX.js.map} +0 -0
- /package/dist/{chunk-HNWZO2XU.js.map → chunk-WDBDFLH3.js.map} +0 -0
- /package/dist/{chunk-UPVP6YGJ.js.map → chunk-ZCHWZYIN.js.map} +0 -0
- /package/dist/{control-plane-UKKYXHIQ.js.map → control-plane-TOFT56CT.js.map} +0 -0
- /package/dist/{cp-hub-upload-BM2OLTOS.js.map → cp-hub-upload-OTBR5SL3.js.map} +0 -0
- /package/dist/{custody-client-NPXJ46TB.js.map → custody-client-L4FEFW4C.js.map} +0 -0
- /package/dist/{deploy-hetzner-Y3ILCDRF.js.map → deploy-hetzner-EE5CYX4N.js.map} +0 -0
- /package/dist/{dist-5OGQ3CJQ.js.map → dist-3BKIPZR3.js.map} +0 -0
- /package/dist/{dist-7B3VCLZI.js.map → dist-7HSAWFRN.js.map} +0 -0
- /package/dist/{dist-A5ZEIVAW.js.map → dist-BVZBXQ2Y.js.map} +0 -0
- /package/dist/{dist-MUTFY7FA.js.map → dist-C5B6NGBO.js.map} +0 -0
- /package/dist/{dist-SMDXLPZO.js.map → dist-JSEXGLYK.js.map} +0 -0
- /package/dist/{dist-VTLQKZ2E.js.map → dist-PTYASENV.js.map} +0 -0
- /package/dist/{dist-ZJIJHCZB.js.map → dist-RWFKW4IU.js.map} +0 -0
- /package/dist/{dist-ZNYS7CVF.js.map → dist-XV77P3RW.js.map} +0 -0
- /package/dist/{dist-DOEGENNW.js.map → dist-Y2GCMA6N.js.map} +0 -0
- /package/dist/{host-reach-drainer-ZJU2STQQ.js.map → host-reach-drainer-N4JSFUBY.js.map} +0 -0
- /package/dist/{hub-Q4VOF4WN.js.map → hub-53E6EFZB.js.map} +0 -0
- /package/dist/{hub-adopt-OA336ZXZ.js.map → hub-adopt-NCCCMMXL.js.map} +0 -0
- /package/dist/{hub-docker-target-JKFCABK4.js.map → hub-docker-target-CS5XHSSA.js.map} +0 -0
- /package/dist/{prepare-GFWWKWGF.js.map → prepare-VTLE7RCJ.js.map} +0 -0
- /package/dist/{prepared-custody-KU4PDVBT.js.map → prepared-custody-ATP6GQGW.js.map} +0 -0
- /package/dist/{prepared-state-LNQ7DYSU-AR5RMXAO.js.map → prepared-state-LNQ7DYSU-2YFSDOCV.js.map} +0 -0
- /package/dist/{publish-credentials-3SQXX45P.js.map → publish-credentials-NAWOHOLK.js.map} +0 -0
- /package/dist/{registry-AFKV3EO2.js.map → registry-5CPAQ2KN.js.map} +0 -0
- /package/dist/{relay-QH6OEY2V.js.map → relay-3T57T4RI.js.map} +0 -0
- /package/dist/{remote-docker-share-RMS6IB5X.js.map → remote-docker-share-XBV76ZAZ.js.map} +0 -0
- /package/dist/{tool-grant-push-T6DRBY3W.js.map → tool-grant-push-5GJYMC7C.js.map} +0 -0
- /package/runtime/hub/apps/hub/.next/static/{XIx10ozuCZRzwSsiCF_5t → 2P6VYtaUNxtdBvOVMolM-}/_buildManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{XIx10ozuCZRzwSsiCF_5t → 2P6VYtaUNxtdBvOVMolM-}/_clientMiddlewareManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{XIx10ozuCZRzwSsiCF_5t → 2P6VYtaUNxtdBvOVMolM-}/_ssgManifest.js +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
RELAY_CONTAINER_NAME,
|
|
5
5
|
RELAY_IMAGE_REF,
|
|
6
6
|
RELAY_NETWORK_NAME
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-THKVKVRF.js";
|
|
8
8
|
import {
|
|
9
9
|
DEFAULT_BOX_IMAGE,
|
|
10
10
|
computeDockerContextFingerprint,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
preparedMatches,
|
|
16
16
|
pullOrBuild,
|
|
17
17
|
readPreparedDockerState
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-CZPVVFCF.js";
|
|
19
19
|
import {
|
|
20
20
|
AmbiguousBoxError,
|
|
21
21
|
BOX_HOME,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
syncAgentboxSshConfig,
|
|
80
80
|
trustWorkspace,
|
|
81
81
|
writeClaudeMergedRegistries
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-XENTK32L.js";
|
|
83
83
|
import {
|
|
84
84
|
hashProjectPath,
|
|
85
85
|
loadEffectiveConfig,
|
|
@@ -8471,4 +8471,4 @@ export {
|
|
|
8471
8471
|
ensureBoxBrowser,
|
|
8472
8472
|
ensureBoxBrowserShowingApp
|
|
8473
8473
|
};
|
|
8474
|
-
//# sourceMappingURL=chunk-
|
|
8474
|
+
//# sourceMappingURL=chunk-I2DEYQLZ.js.map
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
readBoxStatus,
|
|
18
18
|
registerBoxWithRelay,
|
|
19
19
|
stopBoxPollerOnRelay
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-I2DEYQLZ.js";
|
|
21
21
|
import {
|
|
22
22
|
AGENT_SYNC_SPECS,
|
|
23
23
|
BOX_DYNAMIC_SYNC_MANIFEST,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
stageOpencodeStaticForUpload,
|
|
73
73
|
writeCredentialBackup,
|
|
74
74
|
writePreparedStateRaw
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-XENTK32L.js";
|
|
76
76
|
import {
|
|
77
77
|
hashProjectPath,
|
|
78
78
|
loadEffectiveConfig,
|
|
@@ -432,6 +432,9 @@ var AGENT_SPECS = [
|
|
|
432
432
|
stageCredentials: () => stageOpencodeCredentialsForUpload()
|
|
433
433
|
}
|
|
434
434
|
];
|
|
435
|
+
function cloudVolumesUsable(sandboxClass) {
|
|
436
|
+
return sandboxClass !== "linux-vm";
|
|
437
|
+
}
|
|
435
438
|
async function ensureAgentVolumesForCloud(backend, opts = {}) {
|
|
436
439
|
const log = opts.onLog ?? (() => {
|
|
437
440
|
});
|
|
@@ -513,7 +516,7 @@ async function refreshAgentCredentialsBackup(opts = {}) {
|
|
|
513
516
|
async function seedCredentialsOne(backend, handle, spec, opts) {
|
|
514
517
|
const log = opts.onLog ?? (() => {
|
|
515
518
|
});
|
|
516
|
-
const hasVolume = typeof backend.ensureVolume === "function";
|
|
519
|
+
const hasVolume = typeof backend.ensureVolume === "function" && cloudVolumesUsable(handle.sandboxClass);
|
|
517
520
|
if (hasVolume && !opts.force) {
|
|
518
521
|
const probe = await backend.exec(handle, `test -f ${spec.credentialsMountPath}/${SEED_MARKER}`);
|
|
519
522
|
if (probe.exitCode === 0) {
|
|
@@ -668,7 +671,10 @@ async function seedDynamicConfig(backend, handle, opts) {
|
|
|
668
671
|
try {
|
|
669
672
|
let boxManifest = null;
|
|
670
673
|
try {
|
|
671
|
-
const res = await backend.exec(
|
|
674
|
+
const res = await backend.exec(
|
|
675
|
+
handle,
|
|
676
|
+
`cat ${BOX_DYNAMIC_SYNC_MANIFEST} 2>/dev/null || true`
|
|
677
|
+
);
|
|
672
678
|
const out = res.stdout.trim();
|
|
673
679
|
if (res.exitCode === 0 && out.length > 0) {
|
|
674
680
|
boxManifest = JSON.parse(out);
|
|
@@ -697,7 +703,10 @@ async function seedDynamicConfig(backend, handle, opts) {
|
|
|
697
703
|
steps.push(
|
|
698
704
|
`rm -rf ${BOX_STAGE}`,
|
|
699
705
|
`mkdir -p ${BOX_STAGE}`,
|
|
700
|
-
|
|
706
|
+
// See claude-json-overlay: the host tarball carries the host's uid/gid,
|
|
707
|
+
// which a root extract would restore verbatim and `cp -a` below would
|
|
708
|
+
// then propagate into the box user's home.
|
|
709
|
+
`tar -xzf ${REMOTE_TAR} -C ${BOX_STAGE} --no-same-permissions --no-same-owner -m`,
|
|
701
710
|
`if [ -d ${BOX_STAGE}/workflows ]; then cp -a ${BOX_STAGE}/workflows/. ${BOX_WORKFLOWS_DIR}/; fi`,
|
|
702
711
|
`if [ -d ${BOX_STAGE}/memory ]; then cp -a ${BOX_STAGE}/memory/. ${BOX_MEMORY_DIR}/; fi`,
|
|
703
712
|
`rm -rf ${BOX_STAGE} ${REMOTE_TAR}`
|
|
@@ -764,7 +773,13 @@ async function seedClaudeJsonAtCreate(backend, handle, opts = {}) {
|
|
|
764
773
|
await backend.uploadFile(handle, staged.tarballPath, REMOTE_TAR2);
|
|
765
774
|
const extract = await backend.exec(
|
|
766
775
|
handle,
|
|
767
|
-
|
|
776
|
+
// `--no-same-owner --no-same-permissions -m`: the host tarball records the
|
|
777
|
+
// HOST's uid/gid and mode, and GNU tar restores both when it runs as root.
|
|
778
|
+
// That is how `/home/vscode/.claude` ended up owned by uid 501 (a macOS
|
|
779
|
+
// uid that means nothing in the box) mode 0700 — unreadable by the agent.
|
|
780
|
+
// Harmless when the extract already runs unprivileged; load-bearing when
|
|
781
|
+
// it doesn't.
|
|
782
|
+
`set -e; mkdir -p ${BOX_CLAUDE_DIR}; tar -xzf ${REMOTE_TAR2} -C ${BOX_CLAUDE_DIR} --no-same-permissions --no-same-owner -m; rm -f ${REMOTE_TAR2}`
|
|
768
783
|
);
|
|
769
784
|
if (extract.exitCode !== 0) {
|
|
770
785
|
log(
|
|
@@ -2862,7 +2877,7 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
2862
2877
|
onLog: log,
|
|
2863
2878
|
// Daytona's linux-vm class accepts volume mounts and never honors them
|
|
2864
2879
|
// (see ensureAgentVolumesForCloud) — take the per-create upload path.
|
|
2865
|
-
volumesUsable: sandboxClass
|
|
2880
|
+
volumesUsable: cloudVolumesUsable(sandboxClass)
|
|
2866
2881
|
});
|
|
2867
2882
|
const exposeServicePorts = await readExposedServicePorts(req.workspacePath);
|
|
2868
2883
|
const credentialSyncOff = (req.credentialSync ?? (await loadEffectiveConfig(req.projectRoot ?? req.workspacePath)).effective.box.credentialSync) === false;
|
|
@@ -3448,7 +3463,7 @@ function createCloudProvider(backend, opts = {}) {
|
|
|
3448
3463
|
}
|
|
3449
3464
|
const handle = handleFor(box);
|
|
3450
3465
|
const baseArgv = await backend.attachArgv(handle);
|
|
3451
|
-
const inner = renderInnerCommand(kind, opts2);
|
|
3466
|
+
const inner = wrapAttachAsUser(renderInnerCommand(kind, opts2), backend.attachRunAs?.(handle));
|
|
3452
3467
|
const viaStdin = backend.attachExecLacksTty === true && !opts2?.detached && kind !== "logs";
|
|
3453
3468
|
const scriptPath = viaStdin ? attachScriptPath(opts2?.sessionName ?? kind) : "";
|
|
3454
3469
|
if (viaStdin) {
|
|
@@ -3640,6 +3655,10 @@ function attachScriptPath(sessionName) {
|
|
|
3640
3655
|
const safe = sessionName.replace(/[^A-Za-z0-9._-]/g, "_").slice(0, 40) || "attach";
|
|
3641
3656
|
return `/tmp/agentbox-attach-${safe}.sh`;
|
|
3642
3657
|
}
|
|
3658
|
+
function wrapAttachAsUser(inner, user) {
|
|
3659
|
+
if (!user) return inner;
|
|
3660
|
+
return `exec sudo -n -u ${user} -H bash -lc ${shellSingle(inner)}`;
|
|
3661
|
+
}
|
|
3643
3662
|
function renderInnerCommand(kind, opts) {
|
|
3644
3663
|
const sessionName = opts?.sessionName ?? defaultSessionName(kind);
|
|
3645
3664
|
const fallback = opts?.command ?? defaultCommand(kind, opts);
|
|
@@ -4238,4 +4257,4 @@ export {
|
|
|
4238
4257
|
openWebAppOnVncScreen,
|
|
4239
4258
|
makeMockCloudBackend
|
|
4240
4259
|
};
|
|
4241
|
-
//# sourceMappingURL=chunk-
|
|
4260
|
+
//# sourceMappingURL=chunk-JLVUNDUB.js.map
|