@ai-ecoverse/slicc-kernel 1.84.0 → 1.85.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/README.md +2 -2
- package/dist/index.js.map +1 -1
- package/dist/kernel-worker.js +123 -7
- package/dist/kernel-worker.js.map +3 -3
- package/dist/node-process-worker.js +14 -5
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +75 -7
- package/dist/node.js.map +3 -3
- package/dist/process-worker.js +14 -5
- package/dist/process-worker.js.map +2 -2
- package/package.json +1 -1
|
@@ -4303,6 +4303,7 @@ function* lookup(abs) {
|
|
|
4303
4303
|
if (DEVICES.includes(name2)) return { kind: "device" };
|
|
4304
4304
|
if (name2 === "tty") return { kind: "tty" };
|
|
4305
4305
|
if (name2 === "clipboard") return { kind: "clipboard" };
|
|
4306
|
+
if (name2 === "sealed") return { kind: "sealed" };
|
|
4306
4307
|
const std = STDIO3.indexOf(name2);
|
|
4307
4308
|
if (std >= 0) return { kind: "link", target: `${SELF_FD}/${std}`, fd: std };
|
|
4308
4309
|
if (name2 === "fd") return { kind: "link", target: SELF_FD };
|
|
@@ -4346,8 +4347,7 @@ function* fdStat(fd, path) {
|
|
|
4346
4347
|
return yield* pathStat(file.path);
|
|
4347
4348
|
}
|
|
4348
4349
|
if (info.terminal) return yield* terminalStat(info.terminal);
|
|
4349
|
-
if (
|
|
4350
|
-
return nodeStat(CHAR | 438);
|
|
4350
|
+
if (CHAR_KINDS.has(info.kind)) return nodeStat(CHAR | 438);
|
|
4351
4351
|
if (info.kind === "socket") return nodeStat(49663);
|
|
4352
4352
|
return nodeStat(4480);
|
|
4353
4353
|
}
|
|
@@ -4357,7 +4357,7 @@ function* fdTarget(fd, path) {
|
|
|
4357
4357
|
if (info.kind === "file") return (yield { op: "fd-vfs-stat", fd }).path;
|
|
4358
4358
|
if (info.terminal) return info.terminal;
|
|
4359
4359
|
if (info.meta && "device" in info.meta) return `/dev/${info.meta.device}`;
|
|
4360
|
-
if (info.kind === "clipboard") return
|
|
4360
|
+
if (info.kind === "clipboard" || info.kind === "sealed") return `/dev/${info.kind}`;
|
|
4361
4361
|
return `${info.kind === "socket" ? "socket" : "pipe"}:[${fd}]`;
|
|
4362
4362
|
}
|
|
4363
4363
|
function linkStat(target) {
|
|
@@ -4371,6 +4371,7 @@ function* devStat(abs, follow2) {
|
|
|
4371
4371
|
case "device":
|
|
4372
4372
|
case "tty":
|
|
4373
4373
|
case "clipboard":
|
|
4374
|
+
case "sealed":
|
|
4374
4375
|
return nodeStat(CHAR | 438);
|
|
4375
4376
|
case "terminal":
|
|
4376
4377
|
return yield* terminalStat(node.name);
|
|
@@ -4405,7 +4406,7 @@ function* devReaddir(abs) {
|
|
|
4405
4406
|
if (node.kind !== "dir") throw new JsCallError("ENOTDIR", abs);
|
|
4406
4407
|
const names = yield { op: "fd-tty-names" };
|
|
4407
4408
|
const ttys = names.filter((n) => /^\/dev\/tty\d+$/.test(n)).map((n) => n.slice(5));
|
|
4408
|
-
return [...DEVICES, "clipboard", "tty", "fd", ...STDIO3, ...ttys].sort();
|
|
4409
|
+
return [...DEVICES, "clipboard", "sealed", "tty", "fd", ...STDIO3, ...ttys].sort();
|
|
4409
4410
|
}
|
|
4410
4411
|
function* aliasOf(fd, abs, o) {
|
|
4411
4412
|
const info = yield* fdInfo(fd, abs);
|
|
@@ -4439,6 +4440,8 @@ function* opened(abs, o) {
|
|
|
4439
4440
|
const flags = write2 ? o.read === true ? 2 : 1 : 0;
|
|
4440
4441
|
return { fd: yield { op: "fd-open-clipboard", flags }, file: false };
|
|
4441
4442
|
}
|
|
4443
|
+
case "sealed":
|
|
4444
|
+
return { fd: yield { op: "fd-open-sealed" }, file: false };
|
|
4442
4445
|
case "terminal": {
|
|
4443
4446
|
const req = node.pts === void 0 ? { op: "fd-open-tty", name: node.name } : { op: "pty-slave-open", n: node.pts, noctty: true };
|
|
4444
4447
|
return { fd: yield req, file: false };
|
|
@@ -4603,7 +4606,7 @@ function readWholeSync(file) {
|
|
|
4603
4606
|
file.close();
|
|
4604
4607
|
}
|
|
4605
4608
|
}
|
|
4606
|
-
var DEV_READ_MAX, DEVICES, STDIO3, SELF_FD, S_IFMT, DIR, LINK, CHAR, BORN;
|
|
4609
|
+
var DEV_READ_MAX, DEVICES, STDIO3, SELF_FD, S_IFMT, DIR, LINK, CHAR, BORN, CHAR_KINDS;
|
|
4607
4610
|
var init_js_dev = __esm({
|
|
4608
4611
|
"src/process/js/js-dev.ts"() {
|
|
4609
4612
|
"use strict";
|
|
@@ -4619,6 +4622,12 @@ var init_js_dev = __esm({
|
|
|
4619
4622
|
LINK = 40960;
|
|
4620
4623
|
CHAR = 8192;
|
|
4621
4624
|
BORN = Date.now();
|
|
4625
|
+
CHAR_KINDS = /* @__PURE__ */ new Set([
|
|
4626
|
+
"device",
|
|
4627
|
+
"tty",
|
|
4628
|
+
"clipboard",
|
|
4629
|
+
"sealed"
|
|
4630
|
+
]);
|
|
4622
4631
|
}
|
|
4623
4632
|
});
|
|
4624
4633
|
|