@themoltnet/sandbox-gondolin 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +12 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -291,12 +291,24 @@ function getCacheDir() {
|
|
|
291
291
|
const base = process.env.XDG_CACHE_HOME ?? path.join(process.env.HOME ?? "/tmp", ".cache");
|
|
292
292
|
return path.join(base, "moltnet", "gondolin");
|
|
293
293
|
}
|
|
294
|
+
/**
|
|
295
|
+
* The VM backend the snapshot will be built with. Gondolin checkpoints
|
|
296
|
+
* record `compatibleVmm` and refuse to resume under a backend the build
|
|
297
|
+
* did not produce assets for, so the backend MUST be part of the cache
|
|
298
|
+
* key: a qemu-built snapshot resumed under `GONDOLIN_VMM=krun` (the
|
|
299
|
+
* signed bundle's default) would otherwise fail every run until the
|
|
300
|
+
* cache is wiped by hand.
|
|
301
|
+
*/
|
|
302
|
+
function resolveSnapshotVmm(env = process.env) {
|
|
303
|
+
return env.GONDOLIN_VMM?.trim().toLowerCase() === "krun" ? "krun" : "qemu";
|
|
304
|
+
}
|
|
294
305
|
function computeConfigHash(config) {
|
|
295
306
|
const h = createHash("sha256");
|
|
296
307
|
h.update(JSON.stringify({
|
|
297
308
|
baseAlpine: BASE_ALPINE_PACKAGES,
|
|
298
309
|
ghVersion: GH_VERSION,
|
|
299
310
|
cliVersion: MOLTNET_CLI_VERSION,
|
|
311
|
+
vmm: resolveSnapshotVmm(),
|
|
300
312
|
config
|
|
301
313
|
}));
|
|
302
314
|
return h.digest("hex").slice(0, 12);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@themoltnet/sandbox-gondolin",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Gondolin microVM sandbox lifecycle for MoltNet runtimes: checkpoint resume, egress policy, VFS shadowing, guest credential boundary, host-brokered secrets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"moltnet",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
},
|
|
34
34
|
"nx": {
|
|
35
35
|
"tags": [
|
|
36
|
-
"type:
|
|
36
|
+
"type:sandbox",
|
|
37
37
|
"scope:agent",
|
|
38
|
-
"platform:
|
|
38
|
+
"platform:server"
|
|
39
39
|
],
|
|
40
40
|
"targets": {
|
|
41
41
|
"test-ci": {
|