@ai-ecoverse/slicc-kernel 1.84.1 → 1.85.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/README.md +2 -2
- package/dist/kernel-worker.js +9 -8
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.js +14 -5
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +9 -8
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +14 -5
- package/dist/process-worker.js.map +2 -2
- package/package.json +1 -1
package/dist/process-worker.js
CHANGED
|
@@ -11569,6 +11569,7 @@ function* lookup(abs) {
|
|
|
11569
11569
|
if (DEVICES2.includes(name2)) return { kind: "device" };
|
|
11570
11570
|
if (name2 === "tty") return { kind: "tty" };
|
|
11571
11571
|
if (name2 === "clipboard") return { kind: "clipboard" };
|
|
11572
|
+
if (name2 === "sealed") return { kind: "sealed" };
|
|
11572
11573
|
const std = STDIO3.indexOf(name2);
|
|
11573
11574
|
if (std >= 0) return { kind: "link", target: `${SELF_FD}/${std}`, fd: std };
|
|
11574
11575
|
if (name2 === "fd") return { kind: "link", target: SELF_FD };
|
|
@@ -11612,8 +11613,7 @@ function* fdStat(fd, path) {
|
|
|
11612
11613
|
return yield* pathStat(file.path);
|
|
11613
11614
|
}
|
|
11614
11615
|
if (info.terminal) return yield* terminalStat(info.terminal);
|
|
11615
|
-
if (
|
|
11616
|
-
return nodeStat(CHAR | 438);
|
|
11616
|
+
if (CHAR_KINDS.has(info.kind)) return nodeStat(CHAR | 438);
|
|
11617
11617
|
if (info.kind === "socket") return nodeStat(49663);
|
|
11618
11618
|
return nodeStat(4480);
|
|
11619
11619
|
}
|
|
@@ -11623,7 +11623,7 @@ function* fdTarget(fd, path) {
|
|
|
11623
11623
|
if (info.kind === "file") return (yield { op: "fd-vfs-stat", fd }).path;
|
|
11624
11624
|
if (info.terminal) return info.terminal;
|
|
11625
11625
|
if (info.meta && "device" in info.meta) return `/dev/${info.meta.device}`;
|
|
11626
|
-
if (info.kind === "clipboard") return
|
|
11626
|
+
if (info.kind === "clipboard" || info.kind === "sealed") return `/dev/${info.kind}`;
|
|
11627
11627
|
return `${info.kind === "socket" ? "socket" : "pipe"}:[${fd}]`;
|
|
11628
11628
|
}
|
|
11629
11629
|
function linkStat(target) {
|
|
@@ -11637,6 +11637,7 @@ function* devStat(abs, follow2) {
|
|
|
11637
11637
|
case "device":
|
|
11638
11638
|
case "tty":
|
|
11639
11639
|
case "clipboard":
|
|
11640
|
+
case "sealed":
|
|
11640
11641
|
return nodeStat(CHAR | 438);
|
|
11641
11642
|
case "terminal":
|
|
11642
11643
|
return yield* terminalStat(node.name);
|
|
@@ -11671,7 +11672,7 @@ function* devReaddir(abs) {
|
|
|
11671
11672
|
if (node.kind !== "dir") throw new JsCallError("ENOTDIR", abs);
|
|
11672
11673
|
const names = yield { op: "fd-tty-names" };
|
|
11673
11674
|
const ttys = names.filter((n) => /^\/dev\/tty\d+$/.test(n)).map((n) => n.slice(5));
|
|
11674
|
-
return [...DEVICES2, "clipboard", "tty", "fd", ...STDIO3, ...ttys].sort();
|
|
11675
|
+
return [...DEVICES2, "clipboard", "sealed", "tty", "fd", ...STDIO3, ...ttys].sort();
|
|
11675
11676
|
}
|
|
11676
11677
|
function* aliasOf(fd, abs, o) {
|
|
11677
11678
|
const info = yield* fdInfo(fd, abs);
|
|
@@ -11705,6 +11706,8 @@ function* opened(abs, o) {
|
|
|
11705
11706
|
const flags = write2 ? o.read === true ? 2 : 1 : 0;
|
|
11706
11707
|
return { fd: yield { op: "fd-open-clipboard", flags }, file: false };
|
|
11707
11708
|
}
|
|
11709
|
+
case "sealed":
|
|
11710
|
+
return { fd: yield { op: "fd-open-sealed" }, file: false };
|
|
11708
11711
|
case "terminal": {
|
|
11709
11712
|
const req = node.pts === void 0 ? { op: "fd-open-tty", name: node.name } : { op: "pty-slave-open", n: node.pts, noctty: true };
|
|
11710
11713
|
return { fd: yield req, file: false };
|
|
@@ -11869,7 +11872,7 @@ function readWholeSync(file) {
|
|
|
11869
11872
|
file.close();
|
|
11870
11873
|
}
|
|
11871
11874
|
}
|
|
11872
|
-
var DEV_READ_MAX, DEVICES2, STDIO3, SELF_FD, S_IFMT2, DIR, LINK, CHAR, BORN;
|
|
11875
|
+
var DEV_READ_MAX, DEVICES2, STDIO3, SELF_FD, S_IFMT2, DIR, LINK, CHAR, BORN, CHAR_KINDS;
|
|
11873
11876
|
var init_js_dev = __esm({
|
|
11874
11877
|
"src/process/js/js-dev.ts"() {
|
|
11875
11878
|
"use strict";
|
|
@@ -11885,6 +11888,12 @@ var init_js_dev = __esm({
|
|
|
11885
11888
|
LINK = 40960;
|
|
11886
11889
|
CHAR = 8192;
|
|
11887
11890
|
BORN = Date.now();
|
|
11891
|
+
CHAR_KINDS = /* @__PURE__ */ new Set([
|
|
11892
|
+
"device",
|
|
11893
|
+
"tty",
|
|
11894
|
+
"clipboard",
|
|
11895
|
+
"sealed"
|
|
11896
|
+
]);
|
|
11888
11897
|
}
|
|
11889
11898
|
});
|
|
11890
11899
|
|