@themoltnet/sandbox-gondolin 0.5.2 → 0.6.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/dist/index.js +22 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -249,7 +249,7 @@ var GONDOLIN_BASE_EXECUTABLES = Object.freeze([
|
|
|
249
249
|
/** gh CLI version installed in every snapshot. */
|
|
250
250
|
var GH_VERSION = "2.74.0";
|
|
251
251
|
/** MoltNet CLI version — downloaded as a binary, no Node needed. */
|
|
252
|
-
var MOLTNET_CLI_VERSION = "3.
|
|
252
|
+
var MOLTNET_CLI_VERSION = "3.11.0";
|
|
253
253
|
/**
|
|
254
254
|
* Resolve guest architecture from host (Gondolin VMs match host arch).
|
|
255
255
|
*
|
|
@@ -727,6 +727,7 @@ function isReservedGuestEnvironmentName(name) {
|
|
|
727
727
|
return name.startsWith("MOLTNET_") || name.startsWith("GIT_CONFIG_") || RESERVED_GUEST_ENVIRONMENT_NAMES.has(name);
|
|
728
728
|
}
|
|
729
729
|
var GuestEnvironmentBoundaryError = class extends Error {
|
|
730
|
+
refusedNames;
|
|
730
731
|
constructor(refusedNames) {
|
|
731
732
|
super(`Guest credential boundary refuses runtime-controlled environment variables: ${refusedNames.join(", ")}. Remove them from the runtime profile; MoltNet operations use the trusted host-side Agent.`);
|
|
732
733
|
this.refusedNames = refusedNames;
|
|
@@ -734,6 +735,7 @@ var GuestEnvironmentBoundaryError = class extends Error {
|
|
|
734
735
|
}
|
|
735
736
|
};
|
|
736
737
|
var BrokeredHttpSecretBoundaryError = class extends Error {
|
|
738
|
+
issues;
|
|
737
739
|
constructor(issues) {
|
|
738
740
|
super("Brokered HTTP secret boundary refused the resolved bindings: " + issues.join("; "));
|
|
739
741
|
this.issues = issues;
|
|
@@ -1264,29 +1266,37 @@ async function resumeVm(config) {
|
|
|
1264
1266
|
"moltnet-service",
|
|
1265
1267
|
...service.command
|
|
1266
1268
|
], {
|
|
1267
|
-
stdout: "
|
|
1269
|
+
stdout: "pipe",
|
|
1268
1270
|
stderr: "pipe",
|
|
1269
1271
|
...service.env && { env: service.env },
|
|
1270
1272
|
signal: servicesAbort.signal
|
|
1271
1273
|
});
|
|
1272
1274
|
let stderr = "";
|
|
1275
|
+
const completion = Promise.resolve(handle).then((result) => ({
|
|
1276
|
+
kind: "completed",
|
|
1277
|
+
result
|
|
1278
|
+
}), (error) => ({
|
|
1279
|
+
kind: "failed",
|
|
1280
|
+
error
|
|
1281
|
+
}));
|
|
1273
1282
|
const exited = (async () => {
|
|
1274
1283
|
try {
|
|
1275
1284
|
if ("output" in handle && typeof handle.output === "function") {
|
|
1276
1285
|
for await (const chunk of handle.output()) if (chunk.stream === "stderr") stderr = stderrTail(stderr, chunk.data);
|
|
1277
1286
|
}
|
|
1278
|
-
const result = await handle;
|
|
1279
|
-
stderr = stderrTail(stderr, String(result.stderr ?? ""));
|
|
1280
|
-
return {
|
|
1281
|
-
exitCode: result.exitCode,
|
|
1282
|
-
stderr
|
|
1283
|
-
};
|
|
1284
1287
|
} catch (error) {
|
|
1285
|
-
|
|
1286
|
-
exitCode: void 0,
|
|
1287
|
-
stderr: stderrTail(stderr, String(error))
|
|
1288
|
-
};
|
|
1288
|
+
stderr = stderrTail(stderr, String(error));
|
|
1289
1289
|
}
|
|
1290
|
+
const outcome = await completion;
|
|
1291
|
+
if (outcome.kind === "failed") return {
|
|
1292
|
+
exitCode: void 0,
|
|
1293
|
+
stderr: stderrTail(stderr, String(outcome.error))
|
|
1294
|
+
};
|
|
1295
|
+
stderr = stderrTail(stderr, String(outcome.result.stderr ?? ""));
|
|
1296
|
+
return {
|
|
1297
|
+
exitCode: outcome.result.exitCode,
|
|
1298
|
+
stderr
|
|
1299
|
+
};
|
|
1290
1300
|
})();
|
|
1291
1301
|
serviceExits.set(service.id, exited.then((result) => {
|
|
1292
1302
|
serviceExitResults.set(service.id, result);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@themoltnet/sandbox-gondolin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
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",
|