@madarco/agentbox 0.29.1 → 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 +24 -0
- package/dist/{_cloud-attach-EUO2OL7W.js → _cloud-attach-7WVNYNJI.js} +6 -6
- package/dist/{chunk-2JHPGPLE.js → chunk-5I7IFACI.js} +2 -2
- package/dist/{chunk-AC3HU25W.js → chunk-5NVHJS7D.js} +2 -2
- package/dist/{chunk-PFEBKXFD.js → chunk-6UCHNX75.js} +19 -12
- package/dist/{chunk-PFEBKXFD.js.map → chunk-6UCHNX75.js.map} +1 -1
- package/dist/{chunk-UEEW5TW7.js → chunk-F77AZT2M.js} +2 -2
- package/dist/{chunk-UTOC2NHC.js → chunk-FCMBVJFQ.js} +2 -2
- package/dist/{chunk-73D2HKA3.js → chunk-HLBK5ZR6.js} +5 -5
- package/dist/{chunk-4KYP775X.js → chunk-JLVUNDUB.js} +26 -7
- package/dist/chunk-JLVUNDUB.js.map +1 -0
- package/dist/{chunk-BIKWXLX7.js → chunk-JTYWZJIU.js} +3 -3
- package/dist/{chunk-7LC5IG5K.js → chunk-LEVYTABB.js} +3 -3
- package/dist/{chunk-FEFLAITR.js → chunk-MS4NWRXN.js} +2 -2
- package/dist/{chunk-WJUKN4L4.js → chunk-N6EBPKTJ.js} +45 -3
- package/dist/chunk-N6EBPKTJ.js.map +1 -0
- package/dist/{chunk-4NUETVTR.js → chunk-OUOV4OM2.js} +7 -7
- package/dist/{chunk-I7BSBUPC.js → chunk-P5A6MT75.js} +7 -7
- package/dist/{chunk-FELVUIIM.js → chunk-RXH634SC.js} +2 -2
- package/dist/{chunk-QDU7YDME.js → chunk-SXXN7JOC.js} +18 -18
- package/dist/{chunk-B4YFG5TB.js → chunk-TDW2T3HR.js} +4 -4
- package/dist/{chunk-S32GHLVU.js → chunk-TPHSVKMX.js} +2 -2
- package/dist/{chunk-53OTEDBS.js → chunk-ZCHWZYIN.js} +3 -3
- package/dist/cloud-backends.js +3 -3
- package/dist/{control-plane-YQFX2ILX.js → control-plane-TOFT56CT.js} +10 -10
- package/dist/{cp-hub-upload-RMJ3XJ65.js → cp-hub-upload-OTBR5SL3.js} +2 -2
- package/dist/{deploy-hetzner-EECQ4JCM.js → deploy-hetzner-EE5CYX4N.js} +4 -4
- package/dist/{dist-Q4UDCSZQ.js → dist-7HSAWFRN.js} +3 -3
- package/dist/{dist-XUOHE22G.js → dist-BVZBXQ2Y.js} +4 -4
- package/dist/{dist-NFF2KEMB.js → dist-GMIBT6IK.js} +43 -19
- package/dist/{dist-NFF2KEMB.js.map → dist-GMIBT6IK.js.map} +1 -1
- package/dist/{dist-NTUHJOK3.js → dist-JSEXGLYK.js} +3 -3
- package/dist/{dist-TXFTYNNE.js → dist-RWFKW4IU.js} +2 -2
- package/dist/{dist-Z2TPC3EN.js → dist-XV77P3RW.js} +3 -3
- package/dist/{dist-E5EXDZG4.js → dist-Y2GCMA6N.js} +2 -2
- package/dist/{hub-3HPYOV5O.js → hub-53E6EFZB.js} +11 -11
- package/dist/{hub-docker-target-ZKAWXVPH.js → hub-docker-target-CS5XHSSA.js} +7 -7
- package/dist/index.js +47 -39
- package/dist/index.js.map +1 -1
- package/dist/{prepare-KIVDQRMN.js → prepare-VTLE7RCJ.js} +15 -15
- package/dist/{prepared-custody-EFSOOAIQ.js → prepared-custody-ATP6GQGW.js} +11 -11
- package/dist/{publish-credentials-F2A5OVCO.js → publish-credentials-NAWOHOLK.js} +3 -3
- package/dist/{registry-O3X2CDDU.js → registry-5CPAQ2KN.js} +3 -3
- package/dist/{remote-docker-share-QDCBM5UM.js → remote-docker-share-XBV76ZAZ.js} +4 -4
- package/dist/{tool-grant-push-6ISDIJKH.js → tool-grant-push-5GJYMC7C.js} +2 -2
- package/package.json +1 -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-BI4MPGQT.js → chunk-CTNPQ75B.js} +7 -7
- package/runtime/hub/apps/hub/{chunk-2WB3A5IN.js → chunk-DJPQLZ5Y.js} +1 -1
- package/runtime/hub/apps/hub/{chunk-RPPOFMPA.js → chunk-GUKVXSIY.js} +25 -6
- package/runtime/hub/apps/hub/{dist-F547YSBE.js → dist-2G5INR3G.js} +2 -2
- package/runtime/hub/apps/hub/{dist-YB3Y2XDK.js → dist-CIB4ZPJW.js} +85 -19
- package/runtime/hub/apps/hub/{dist-W5SGEJLA.js → dist-PI5ZAQGG.js} +1 -1
- package/runtime/hub/apps/hub/{dist-4F6XEJHK.js → dist-VDPNQEZ7.js} +2 -2
- package/runtime/hub/apps/hub/{dist-FEHV4PC7.js → dist-VZM32WR4.js} +1 -1
- package/runtime/hub/apps/hub/{dist-P7NT6VLK.js → dist-Y3LGOZ56.js} +1 -1
- package/runtime/hub/apps/hub/{dist-A3JOKKYG.js → dist-ZOJYJJ26.js} +1 -1
- package/runtime/hub/apps/hub/{hub-worker-I5QBLSRU.js → hub-worker-YQCQKCXS.js} +3 -3
- package/runtime/hub/apps/hub/server.js +8 -8
- package/runtime/hub/apps/hub/tsconfig.tsbuildinfo +1 -1
- package/dist/chunk-4KYP775X.js.map +0 -1
- package/dist/chunk-WJUKN4L4.js.map +0 -1
- /package/dist/{_cloud-attach-EUO2OL7W.js.map → _cloud-attach-7WVNYNJI.js.map} +0 -0
- /package/dist/{chunk-2JHPGPLE.js.map → chunk-5I7IFACI.js.map} +0 -0
- /package/dist/{chunk-AC3HU25W.js.map → chunk-5NVHJS7D.js.map} +0 -0
- /package/dist/{chunk-UEEW5TW7.js.map → chunk-F77AZT2M.js.map} +0 -0
- /package/dist/{chunk-UTOC2NHC.js.map → chunk-FCMBVJFQ.js.map} +0 -0
- /package/dist/{chunk-73D2HKA3.js.map → chunk-HLBK5ZR6.js.map} +0 -0
- /package/dist/{chunk-BIKWXLX7.js.map → chunk-JTYWZJIU.js.map} +0 -0
- /package/dist/{chunk-7LC5IG5K.js.map → chunk-LEVYTABB.js.map} +0 -0
- /package/dist/{chunk-FEFLAITR.js.map → chunk-MS4NWRXN.js.map} +0 -0
- /package/dist/{chunk-4NUETVTR.js.map → chunk-OUOV4OM2.js.map} +0 -0
- /package/dist/{chunk-I7BSBUPC.js.map → chunk-P5A6MT75.js.map} +0 -0
- /package/dist/{chunk-FELVUIIM.js.map → chunk-RXH634SC.js.map} +0 -0
- /package/dist/{chunk-QDU7YDME.js.map → chunk-SXXN7JOC.js.map} +0 -0
- /package/dist/{chunk-B4YFG5TB.js.map → chunk-TDW2T3HR.js.map} +0 -0
- /package/dist/{chunk-S32GHLVU.js.map → chunk-TPHSVKMX.js.map} +0 -0
- /package/dist/{chunk-53OTEDBS.js.map → chunk-ZCHWZYIN.js.map} +0 -0
- /package/dist/{control-plane-YQFX2ILX.js.map → control-plane-TOFT56CT.js.map} +0 -0
- /package/dist/{cp-hub-upload-RMJ3XJ65.js.map → cp-hub-upload-OTBR5SL3.js.map} +0 -0
- /package/dist/{deploy-hetzner-EECQ4JCM.js.map → deploy-hetzner-EE5CYX4N.js.map} +0 -0
- /package/dist/{dist-NTUHJOK3.js.map → dist-7HSAWFRN.js.map} +0 -0
- /package/dist/{dist-Q4UDCSZQ.js.map → dist-BVZBXQ2Y.js.map} +0 -0
- /package/dist/{dist-TXFTYNNE.js.map → dist-JSEXGLYK.js.map} +0 -0
- /package/dist/{dist-XUOHE22G.js.map → dist-RWFKW4IU.js.map} +0 -0
- /package/dist/{dist-Z2TPC3EN.js.map → dist-XV77P3RW.js.map} +0 -0
- /package/dist/{dist-E5EXDZG4.js.map → dist-Y2GCMA6N.js.map} +0 -0
- /package/dist/{hub-3HPYOV5O.js.map → hub-53E6EFZB.js.map} +0 -0
- /package/dist/{hub-docker-target-ZKAWXVPH.js.map → hub-docker-target-CS5XHSSA.js.map} +0 -0
- /package/dist/{prepare-KIVDQRMN.js.map → prepare-VTLE7RCJ.js.map} +0 -0
- /package/dist/{prepared-custody-EFSOOAIQ.js.map → prepared-custody-ATP6GQGW.js.map} +0 -0
- /package/dist/{publish-credentials-F2A5OVCO.js.map → publish-credentials-NAWOHOLK.js.map} +0 -0
- /package/dist/{registry-O3X2CDDU.js.map → registry-5CPAQ2KN.js.map} +0 -0
- /package/dist/{remote-docker-share-QDCBM5UM.js.map → remote-docker-share-XBV76ZAZ.js.map} +0 -0
- /package/dist/{tool-grant-push-6ISDIJKH.js.map → tool-grant-push-5GJYMC7C.js.map} +0 -0
- /package/runtime/hub/apps/hub/.next/static/{nDHi_1342DzyGDC14ocQo → 2P6VYtaUNxtdBvOVMolM-}/_buildManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{nDHi_1342DzyGDC14ocQo → 2P6VYtaUNxtdBvOVMolM-}/_clientMiddlewareManifest.js +0 -0
- /package/runtime/hub/apps/hub/.next/static/{nDHi_1342DzyGDC14ocQo → 2P6VYtaUNxtdBvOVMolM-}/_ssgManifest.js +0 -0
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
isShareablePreparedProvider,
|
|
4
4
|
localBakeBlocksAdoption,
|
|
5
5
|
resolveCustodyTarget
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SXXN7JOC.js";
|
|
7
7
|
import {
|
|
8
8
|
pullPreparedFromCustody,
|
|
9
9
|
pushPreparedToCustody,
|
|
10
10
|
writePreparedToCustodyStore
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JLVUNDUB.js";
|
|
12
12
|
import {
|
|
13
13
|
getRuntimeProviderNames,
|
|
14
14
|
loadProviderModule
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-P5A6MT75.js";
|
|
16
16
|
import {
|
|
17
17
|
readPreparedStateRaw
|
|
18
18
|
} from "./chunk-XENTK32L.js";
|
|
@@ -106,4 +106,4 @@ export {
|
|
|
106
106
|
adoptPreparedBases,
|
|
107
107
|
sharePreparedBase
|
|
108
108
|
};
|
|
109
|
-
//# sourceMappingURL=chunk-
|
|
109
|
+
//# sourceMappingURL=chunk-TDW2T3HR.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
renderInnerCommand,
|
|
9
9
|
resolveCloudCheckpoint,
|
|
10
10
|
writeCloudCheckpointManifest
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JLVUNDUB.js";
|
|
12
12
|
import {
|
|
13
13
|
UserFacingError,
|
|
14
14
|
claudeInstallFingerprint,
|
|
@@ -1676,4 +1676,4 @@ export {
|
|
|
1676
1676
|
vercelProvider,
|
|
1677
1677
|
providerModule
|
|
1678
1678
|
};
|
|
1679
|
-
//# sourceMappingURL=chunk-
|
|
1679
|
+
//# sourceMappingURL=chunk-TPHSVKMX.js.map
|
|
@@ -51,7 +51,7 @@ function reportHubError(err, url) {
|
|
|
51
51
|
process.exitCode = 1;
|
|
52
52
|
}
|
|
53
53
|
async function withHubClient(opts, fn) {
|
|
54
|
-
const { resolveHubApiTarget } = await import("./control-plane-
|
|
54
|
+
const { resolveHubApiTarget } = await import("./control-plane-TOFT56CT.js");
|
|
55
55
|
const target = await resolveHubApiTarget(opts.url, { preferLocal: opts.preferLocal });
|
|
56
56
|
if (!target) {
|
|
57
57
|
process.exitCode = 1;
|
|
@@ -114,7 +114,7 @@ async function runOpOnOtherHub(box, op, preferLocalOther) {
|
|
|
114
114
|
let owner;
|
|
115
115
|
let other;
|
|
116
116
|
try {
|
|
117
|
-
const { resolveHubApiTarget } = await import("./control-plane-
|
|
117
|
+
const { resolveHubApiTarget } = await import("./control-plane-TOFT56CT.js");
|
|
118
118
|
[owner, other] = await Promise.all([
|
|
119
119
|
resolveHubApiTarget(void 0, { quiet: true, preferLocal: !preferLocalOther }),
|
|
120
120
|
// Non-quiet so a stopped LOCAL retry hub is auto-started (it's a candidate owner).
|
|
@@ -150,4 +150,4 @@ export {
|
|
|
150
150
|
withOwningHub,
|
|
151
151
|
reportBoxNotOnAnyHub
|
|
152
152
|
};
|
|
153
|
-
//# sourceMappingURL=chunk-
|
|
153
|
+
//# sourceMappingURL=chunk-ZCHWZYIN.js.map
|
package/dist/cloud-backends.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
cloudBackendForProvider
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-RXH634SC.js";
|
|
5
|
+
import "./chunk-P5A6MT75.js";
|
|
6
6
|
import "./chunk-XENTK32L.js";
|
|
7
7
|
import "./chunk-7LNXTPEE.js";
|
|
8
8
|
import "./chunk-WJFZJZIM.js";
|
|
@@ -19,7 +19,7 @@ var cloudBackendLoader = {
|
|
|
19
19
|
// sandbox-docker → relay, so a static import here would load a second copy of
|
|
20
20
|
// the relay graph inside the relay process. This way it lands in its own lazy
|
|
21
21
|
// chunk, loaded only by a `download.*` action.
|
|
22
|
-
loadCloudCp: async () => import("./dist-
|
|
22
|
+
loadCloudCp: async () => import("./dist-RWFKW4IU.js")
|
|
23
23
|
};
|
|
24
24
|
export {
|
|
25
25
|
CLOUD_BACKEND_LOADER_ID,
|
|
@@ -12,21 +12,21 @@ import {
|
|
|
12
12
|
resolveHubApiClient,
|
|
13
13
|
resolveHubApiTarget,
|
|
14
14
|
syncAgentCredentialsIfChanged
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SXXN7JOC.js";
|
|
16
16
|
import "./chunk-PAWAGULH.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-ZCHWZYIN.js";
|
|
18
|
+
import "./chunk-JTYWZJIU.js";
|
|
19
|
+
import "./chunk-5I7IFACI.js";
|
|
20
20
|
import "./chunk-WHFCJBMO.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-LEVYTABB.js";
|
|
22
22
|
import "./chunk-5F34YIRI.js";
|
|
23
23
|
import "./chunk-6YSYQZRH.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-5NVHJS7D.js";
|
|
25
|
+
import "./chunk-TPHSVKMX.js";
|
|
26
|
+
import "./chunk-JLVUNDUB.js";
|
|
27
27
|
import "./chunk-I2DEYQLZ.js";
|
|
28
28
|
import "./chunk-THKVKVRF.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-P5A6MT75.js";
|
|
30
30
|
import "./chunk-CZPVVFCF.js";
|
|
31
31
|
import "./chunk-XENTK32L.js";
|
|
32
32
|
import "./chunk-7LNXTPEE.js";
|
|
@@ -48,4 +48,4 @@ export {
|
|
|
48
48
|
resolveHubApiTarget,
|
|
49
49
|
syncAgentCredentialsIfChanged
|
|
50
50
|
};
|
|
51
|
-
//# sourceMappingURL=control-plane-
|
|
51
|
+
//# sourceMappingURL=control-plane-TOFT56CT.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readGitOriginUrl
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JLVUNDUB.js";
|
|
5
5
|
import "./chunk-I2DEYQLZ.js";
|
|
6
6
|
import {
|
|
7
7
|
captureCpCacheEntry,
|
|
@@ -78,4 +78,4 @@ async function uploadToHubCache(hostSrcs, projectRoot) {
|
|
|
78
78
|
export {
|
|
79
79
|
uploadToHubCache
|
|
80
80
|
};
|
|
81
|
-
//# sourceMappingURL=cp-hub-upload-
|
|
81
|
+
//# sourceMappingURL=cp-hub-upload-OTBR5SL3.js.map
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
runHetznerDeploy,
|
|
9
9
|
runHetznerDestroy,
|
|
10
10
|
runHetznerUpdate
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-LEVYTABB.js";
|
|
12
|
+
import "./chunk-5NVHJS7D.js";
|
|
13
|
+
import "./chunk-JLVUNDUB.js";
|
|
14
14
|
import "./chunk-I2DEYQLZ.js";
|
|
15
15
|
import "./chunk-THKVKVRF.js";
|
|
16
16
|
import "./chunk-CZPVVFCF.js";
|
|
@@ -30,4 +30,4 @@ export {
|
|
|
30
30
|
runHetznerDestroy,
|
|
31
31
|
runHetznerUpdate
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=deploy-hetzner-
|
|
33
|
+
//# sourceMappingURL=deploy-hetzner-EE5CYX4N.js.map
|
|
@@ -21,8 +21,8 @@ import {
|
|
|
21
21
|
setRemoteHostBaker,
|
|
22
22
|
setRemoteHostSharer,
|
|
23
23
|
upsertHostAlias
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-MS4NWRXN.js";
|
|
25
|
+
import "./chunk-JLVUNDUB.js";
|
|
26
26
|
import "./chunk-I2DEYQLZ.js";
|
|
27
27
|
import "./chunk-THKVKVRF.js";
|
|
28
28
|
import "./chunk-CZPVVFCF.js";
|
|
@@ -55,4 +55,4 @@ export {
|
|
|
55
55
|
setRemoteHostSharer,
|
|
56
56
|
upsertHostAlias
|
|
57
57
|
};
|
|
58
|
-
//# sourceMappingURL=dist-
|
|
58
|
+
//# sourceMappingURL=dist-7HSAWFRN.js.map
|
|
@@ -48,9 +48,9 @@ import {
|
|
|
48
48
|
validateSizeChoice,
|
|
49
49
|
withDigitalOceanRetry,
|
|
50
50
|
writePreparedState
|
|
51
|
-
} from "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
51
|
+
} from "./chunk-JTYWZJIU.js";
|
|
52
|
+
import "./chunk-5NVHJS7D.js";
|
|
53
|
+
import "./chunk-JLVUNDUB.js";
|
|
54
54
|
import "./chunk-I2DEYQLZ.js";
|
|
55
55
|
import "./chunk-THKVKVRF.js";
|
|
56
56
|
import "./chunk-CZPVVFCF.js";
|
|
@@ -123,4 +123,4 @@ export {
|
|
|
123
123
|
withDigitalOceanRetry,
|
|
124
124
|
writePreparedState
|
|
125
125
|
};
|
|
126
|
-
//# sourceMappingURL=dist-
|
|
126
|
+
//# sourceMappingURL=dist-BVZBXQ2Y.js.map
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
setDaytonaCredentials,
|
|
18
18
|
waitForSnapshotActive,
|
|
19
19
|
writePreparedDaytonaState
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-N6EBPKTJ.js";
|
|
21
21
|
import {
|
|
22
22
|
cloudSnapshotName,
|
|
23
23
|
createCloudProvider,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
resolveCloudCheckpoint,
|
|
28
28
|
seedAgentStaticIntoCloudBox,
|
|
29
29
|
writeCloudCheckpointManifest
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-JLVUNDUB.js";
|
|
31
31
|
import "./chunk-I2DEYQLZ.js";
|
|
32
32
|
import "./chunk-THKVKVRF.js";
|
|
33
33
|
import "./chunk-CZPVVFCF.js";
|
|
@@ -218,14 +218,15 @@ async function bakeDaytonaVmBase(opts) {
|
|
|
218
218
|
}
|
|
219
219
|
const handle = { sandboxId: sandbox.id, sandboxClass: "linux-vm" };
|
|
220
220
|
try {
|
|
221
|
-
const
|
|
221
|
+
const asRoot = { user: "root" };
|
|
222
|
+
const wait = await opts.backend.exec(handle, buildDockerWaitCommand(), asRoot);
|
|
222
223
|
if (wait.exitCode !== 0) {
|
|
223
224
|
throw new Error(
|
|
224
225
|
"dockerd never came up in the VM base, so sudo cannot be repaired (the repair borrows root from the docker socket)."
|
|
225
226
|
);
|
|
226
227
|
}
|
|
227
228
|
log("repairing sudo (the VM rootfs conversion strips setuid bits)\u2026");
|
|
228
|
-
const repair = await opts.backend.exec(handle, buildSudoRepairCommand());
|
|
229
|
+
const repair = await opts.backend.exec(handle, buildSudoRepairCommand(), asRoot);
|
|
229
230
|
if (repair.exitCode !== 0) {
|
|
230
231
|
throw new Error(
|
|
231
232
|
`failed to restore sudo in the VM base (exit ${String(repair.exitCode)}): ${repair.stdout}${repair.stderr}`
|
|
@@ -233,7 +234,9 @@ async function bakeDaytonaVmBase(opts) {
|
|
|
233
234
|
}
|
|
234
235
|
imageEnv = await fetchImageEnv(imageRef) ?? [];
|
|
235
236
|
if (imageEnv.length > 0) {
|
|
236
|
-
log(
|
|
237
|
+
log(
|
|
238
|
+
`restoring the image's ${String(imageEnv.length)} env vars (the VM conversion drops them)\u2026`
|
|
239
|
+
);
|
|
237
240
|
const envFix = await opts.backend.exec(handle, buildEnvRestoreCommand(imageEnv));
|
|
238
241
|
if (envFix.exitCode !== 0) {
|
|
239
242
|
throw new Error(
|
|
@@ -275,21 +278,42 @@ function nonce() {
|
|
|
275
278
|
}
|
|
276
279
|
async function createVmBaseSnapshot(opts, name, imageRef, log) {
|
|
277
280
|
log(`creating linux-vm base image snapshot '${name}' from ${imageRef}\u2026`);
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
281
|
+
try {
|
|
282
|
+
await opts.client.snapshot.create(
|
|
283
|
+
{
|
|
284
|
+
name,
|
|
285
|
+
image: imageRef,
|
|
286
|
+
sandboxClass: SandboxClass.LINUX_VM,
|
|
287
|
+
regionId: opts.regionId,
|
|
288
|
+
// Always explicit: a snapshot with no `resources` gets Daytona's 1 vCPU /
|
|
289
|
+
// 1 GiB / 3 GiB default, and the box image does not fit in 3 GiB — the
|
|
290
|
+
// build dies mid-pull with a bare "internal error".
|
|
291
|
+
resources: opts.resources ?? { cpu: 2, memory: 4, disk: 8 }
|
|
292
|
+
},
|
|
293
|
+
{ onLogs: (c) => log(String(c).split("\n").filter(Boolean).join(" ")) }
|
|
294
|
+
);
|
|
295
|
+
} catch (err) {
|
|
296
|
+
if (isRegionNotFound(err)) {
|
|
297
|
+
throw new Error(vmRegionUnavailableMessage(opts.regionId));
|
|
298
|
+
}
|
|
299
|
+
throw err;
|
|
300
|
+
}
|
|
291
301
|
return name;
|
|
292
302
|
}
|
|
303
|
+
function isRegionNotFound(err) {
|
|
304
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
305
|
+
return /\bregion\b/i.test(msg) && /\bnot found\b/i.test(msg);
|
|
306
|
+
}
|
|
307
|
+
function vmRegionUnavailableMessage(regionId) {
|
|
308
|
+
return `your Daytona organization has no '${regionId}' region, and linux-vm boxes run only there.
|
|
309
|
+
A VM region is *dedicated* \u2014 it is not enabled for every account \u2014 so a key from an
|
|
310
|
+
organization with only the shared 'us'/'eu' regions cannot bake a Daytona base at all.
|
|
311
|
+
Check what yours has:
|
|
312
|
+
curl -H "Authorization: Bearer $DAYTONA_API_KEY" https://app.daytona.io/api/regions
|
|
313
|
+
Use an API key from an organization that has a VM region (or ask Daytona to enable one). If
|
|
314
|
+
Daytona has since added a VM region for your org, name it with
|
|
315
|
+
\`agentbox config set box.daytonaRegion <id>\`.`;
|
|
316
|
+
}
|
|
293
317
|
async function snapshotIsActive(client, name) {
|
|
294
318
|
try {
|
|
295
319
|
const snap = await client.snapshot.get(name);
|
|
@@ -745,4 +769,4 @@ export {
|
|
|
745
769
|
resolveDockerfileContext,
|
|
746
770
|
setDaytonaCredentials
|
|
747
771
|
};
|
|
748
|
-
//# sourceMappingURL=dist-
|
|
772
|
+
//# sourceMappingURL=dist-GMIBT6IK.js.map
|