@ai-ecoverse/slicc-kernel 1.64.1 → 1.64.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/README.md +2 -1
- package/dist/driver-worker.js +87 -4
- package/dist/driver-worker.js.map +3 -3
- package/dist/kernel-worker.js +4 -2
- package/dist/kernel-worker.js.map +3 -3
- package/dist/node-process-worker.js +39 -8
- package/dist/node-process-worker.js.map +3 -3
- package/dist/node.js +4 -2
- package/dist/node.js.map +3 -3
- package/dist/process-worker.js +130 -83
- package/dist/process-worker.js.map +4 -4
- package/package.json +1 -1
|
@@ -82,9 +82,21 @@ var init_lockdown = __esm({
|
|
|
82
82
|
"SharedWorker",
|
|
83
83
|
"BroadcastChannel",
|
|
84
84
|
"postMessage",
|
|
85
|
-
"close"
|
|
85
|
+
"close",
|
|
86
|
+
"webkitRequestFileSystem",
|
|
87
|
+
"webkitRequestFileSystemSync",
|
|
88
|
+
"webkitResolveLocalFileSystemURL",
|
|
89
|
+
"webkitResolveLocalFileSystemSyncURL"
|
|
90
|
+
];
|
|
91
|
+
BLOCKED_NAVIGATOR = [
|
|
92
|
+
"storage",
|
|
93
|
+
"storageBuckets",
|
|
94
|
+
"locks",
|
|
95
|
+
"serviceWorker",
|
|
96
|
+
"usb",
|
|
97
|
+
"hid",
|
|
98
|
+
"serial"
|
|
86
99
|
];
|
|
87
|
-
BLOCKED_NAVIGATOR = ["storage", "locks", "serviceWorker"];
|
|
88
100
|
OPEN_SLOTS = ["fetch", "WebSocket"];
|
|
89
101
|
}
|
|
90
102
|
});
|
|
@@ -7597,7 +7609,7 @@ function useDevFd(Fs) {
|
|
|
7597
7609
|
};
|
|
7598
7610
|
}
|
|
7599
7611
|
function mountTable(mounts = []) {
|
|
7600
|
-
const root =
|
|
7612
|
+
const root = pinnedRoot ?? rootKind();
|
|
7601
7613
|
const lines = [`${root} / ${root} rw 0 0`, "devfs /dev devfs rw 0 0", "proc /proc proc rw 0 0"];
|
|
7602
7614
|
for (const m of mounts) {
|
|
7603
7615
|
const options = Object.entries(m.options).map(([k, v]) => v === "" ? k : `${k}=${v}`);
|
|
@@ -7703,7 +7715,7 @@ function linuxDevices(Fs) {
|
|
|
7703
7715
|
}
|
|
7704
7716
|
}
|
|
7705
7717
|
}
|
|
7706
|
-
var O_CLOEXEC, FD_CLOEXEC, F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_DUPFD_CLOEXEC, tracked, IMPORT_NAMES, EBADF, AT_SYMLINK_NOFOLLOW2, EMSCRIPTEN_EPERM, O_PATH, UTIME_NOW, UTIME_OMIT, PROT_WRITE, MAP_PRIVATE, MAP_TYPE, O_WRONLY4, MAP_ALIGN, DIR_MODE, LINK_MODE, CHAR_DEVICE, O_ACCMODE2, O_CREAT2, field, NAME, AT_FDCWD, AT_EACCESS2, DEVICE_MODES;
|
|
7718
|
+
var O_CLOEXEC, FD_CLOEXEC, F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_DUPFD_CLOEXEC, tracked, IMPORT_NAMES, EBADF, AT_SYMLINK_NOFOLLOW2, EMSCRIPTEN_EPERM, O_PATH, UTIME_NOW, UTIME_OMIT, PROT_WRITE, MAP_PRIVATE, MAP_TYPE, O_WRONLY4, MAP_ALIGN, DIR_MODE, LINK_MODE, CHAR_DEVICE, O_ACCMODE2, O_CREAT2, field, pinnedRoot, rootKind, NAME, AT_FDCWD, AT_EACCESS2, DEVICE_MODES;
|
|
7707
7719
|
var init_process_fds = __esm({
|
|
7708
7720
|
"src/process/process-fds.ts"() {
|
|
7709
7721
|
"use strict";
|
|
@@ -7745,6 +7757,7 @@ var init_process_fds = __esm({
|
|
|
7745
7757
|
O_ACCMODE2 = 3;
|
|
7746
7758
|
O_CREAT2 = 64;
|
|
7747
7759
|
field = (text) => (text || "none").replace(/[\s\\]/g, (c) => `\\${c.charCodeAt(0).toString(8).padStart(3, "0")}`);
|
|
7760
|
+
rootKind = () => globalThis.navigator?.storage ? "opfs" : "memory";
|
|
7748
7761
|
NAME = /^[a-z_][a-z0-9_-]*$/i;
|
|
7749
7762
|
AT_FDCWD = -100;
|
|
7750
7763
|
AT_EACCESS2 = 512;
|
|
@@ -12491,6 +12504,7 @@ init_protocol();
|
|
|
12491
12504
|
init_process_runtime();
|
|
12492
12505
|
var loadWasi = () => Promise.resolve().then(() => (init_wasi_runtime(), wasi_runtime_exports));
|
|
12493
12506
|
var loadJs = () => Promise.resolve().then(() => (init_js_runtime(), js_runtime_exports));
|
|
12507
|
+
var NOT_RUNNABLE2 = 126;
|
|
12494
12508
|
function started(init, port3, run, wasi, js) {
|
|
12495
12509
|
if (init.program?.abi === "js") {
|
|
12496
12510
|
const jsInit = init;
|
|
@@ -12500,18 +12514,35 @@ function started(init, port3, run, wasi, js) {
|
|
|
12500
12514
|
if (wasmInit.program?.abi === "wasi") return wasi().then((m) => m.runWasiProcess(wasmInit, port3));
|
|
12501
12515
|
return run(wasmInit, port3);
|
|
12502
12516
|
}
|
|
12503
|
-
function processEntry(port3, run = runWasmProcess, wasi = loadWasi, js = loadJs) {
|
|
12504
|
-
|
|
12517
|
+
function processEntry(port3, run = runWasmProcess, wasi = loadWasi, js = loadJs, seal = () => {
|
|
12518
|
+
}) {
|
|
12519
|
+
const failed5 = (err, code2) => port3.postMessage({
|
|
12505
12520
|
type: WASM_PROCESS_ERROR,
|
|
12506
|
-
message: err instanceof Error ? err.stack ?? err.message : String(err)
|
|
12521
|
+
message: err instanceof Error ? err.stack ?? err.message : String(err),
|
|
12522
|
+
...code2 === void 0 ? {} : { code: code2 }
|
|
12507
12523
|
});
|
|
12524
|
+
let refused2;
|
|
12525
|
+
const sealOnce = () => {
|
|
12526
|
+
if (refused2 === void 0) {
|
|
12527
|
+
try {
|
|
12528
|
+
seal();
|
|
12529
|
+
refused2 = null;
|
|
12530
|
+
} catch (error) {
|
|
12531
|
+
refused2 = { error };
|
|
12532
|
+
}
|
|
12533
|
+
}
|
|
12534
|
+
return refused2;
|
|
12535
|
+
};
|
|
12508
12536
|
return (data) => {
|
|
12509
12537
|
const type = data?.type;
|
|
12538
|
+
if (type !== WASM_THREAD_INIT && type !== WASM_PROCESS_INIT) return;
|
|
12539
|
+
const refusal2 = sealOnce();
|
|
12510
12540
|
if (type === WASM_THREAD_INIT) {
|
|
12541
|
+
if (refusal2) return failed5(refusal2.error);
|
|
12511
12542
|
wasi().then((m) => m.runWasiThread(data, port3)).catch(failed5);
|
|
12512
12543
|
return;
|
|
12513
12544
|
}
|
|
12514
|
-
if (
|
|
12545
|
+
if (refusal2) return failed5(refusal2.error, NOT_RUNNABLE2);
|
|
12515
12546
|
started(data, port3, run, wasi, js).then(
|
|
12516
12547
|
(code2) => port3.postMessage({ type: WASM_PROCESS_EXIT, code: code2 }),
|
|
12517
12548
|
failed5
|