@ai-ecoverse/slicc-kernel 1.117.5 → 1.118.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 +5 -4
- package/dist/driver-worker.js +4 -1
- package/dist/driver-worker.js.map +2 -2
- package/dist/driver.js +4 -1
- package/dist/driver.js.map +2 -2
- package/dist/index.js.map +2 -2
- package/dist/kernel-worker.js +30 -6
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-driver-worker.js +4 -1
- package/dist/node-driver-worker.js.map +2 -2
- package/dist/node-process-worker.js +5 -1
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +30 -6
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +5 -1
- package/dist/process-worker.js.map +2 -2
- package/dist/types/kernel/process.d.ts +1 -0
- package/dist/types/mount/driver.d.ts +1 -0
- package/dist/types/mount/fsa.d.ts +1 -1
- package/dist/types/mount/medium.d.ts +1 -1
- package/dist/types/mount/protocol.d.ts +5 -1
- package/package.json +1 -1
package/dist/kernel-worker.js
CHANGED
|
@@ -6364,7 +6364,7 @@ function satisfies(version, range2) {
|
|
|
6364
6364
|
}
|
|
6365
6365
|
|
|
6366
6366
|
// src/version.ts
|
|
6367
|
-
var KERNEL_VERSION = true ? "1.
|
|
6367
|
+
var KERNEL_VERSION = true ? "1.118.1" : "0.0.0-dev";
|
|
6368
6368
|
var OS_RELEASE = "6.0.0-slicc";
|
|
6369
6369
|
function procVersion() {
|
|
6370
6370
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|
|
@@ -9820,7 +9820,7 @@ var FifoTable = class {
|
|
|
9820
9820
|
};
|
|
9821
9821
|
|
|
9822
9822
|
// src/mount/protocol.ts
|
|
9823
|
-
var DRIVER_PROTOCOL = [1,
|
|
9823
|
+
var DRIVER_PROTOCOL = [1, 3];
|
|
9824
9824
|
function driverVersionError(theirs) {
|
|
9825
9825
|
const major = Array.isArray(theirs) ? theirs[0] : void 0;
|
|
9826
9826
|
if (major === DRIVER_PROTOCOL[0]) return void 0;
|
|
@@ -10132,11 +10132,12 @@ function inodeless(mount, attr2) {
|
|
|
10132
10132
|
}
|
|
10133
10133
|
function statOf(attr2, path, mount) {
|
|
10134
10134
|
const mtime = new Date(attr2.mtime);
|
|
10135
|
-
const fallback = attr2.kind === "directory" ? 16877 : attr2.kind === "symlink" ? 41471 : 33188;
|
|
10135
|
+
const fallback = attr2.kind === "directory" ? 16877 : attr2.kind === "symlink" ? 41471 : attr2.kind === "fifo" ? 4516 : 33188;
|
|
10136
10136
|
return {
|
|
10137
10137
|
isFile: attr2.kind === "file",
|
|
10138
10138
|
isDirectory: attr2.kind === "directory",
|
|
10139
10139
|
isSymbolicLink: attr2.kind === "symlink",
|
|
10140
|
+
...attr2.kind === "fifo" ? { isFifo: true } : {},
|
|
10140
10141
|
size: attr2.size,
|
|
10141
10142
|
mode: attr2.mode ?? fallback,
|
|
10142
10143
|
mtime,
|
|
@@ -10679,7 +10680,7 @@ var MountFs = class _MountFs {
|
|
|
10679
10680
|
}
|
|
10680
10681
|
const { mount, rel: rel2 } = found;
|
|
10681
10682
|
this.writable(mount, real);
|
|
10682
|
-
if (owner?.fifo)
|
|
10683
|
+
if (owner?.fifo) return this.mkfifo(found, real, owner);
|
|
10683
10684
|
const bytes = typeof content === "string" ? new TextEncoder().encode(content) : content;
|
|
10684
10685
|
if (mount.maxFile > 0 && bytes.length > mount.maxFile) {
|
|
10685
10686
|
throw errnoError(
|
|
@@ -10696,6 +10697,18 @@ var MountFs = class _MountFs {
|
|
|
10696
10697
|
}
|
|
10697
10698
|
}
|
|
10698
10699
|
}
|
|
10700
|
+
async mkfifo(found, real, owner) {
|
|
10701
|
+
const { mount, rel: rel2 } = found;
|
|
10702
|
+
if (!mount.caps.fifos) throw errnoError("EPERM", `${real}: this mount has no FIFOs`);
|
|
10703
|
+
const made2 = await this.driverOwner(found, real, owner, false);
|
|
10704
|
+
await this.table.commit(real);
|
|
10705
|
+
this.table.forget(mount, real);
|
|
10706
|
+
try {
|
|
10707
|
+
await mount.conn.call({ op: "mkfifo", path: rel2, ...made2 });
|
|
10708
|
+
} finally {
|
|
10709
|
+
this.table.forget(mount, real);
|
|
10710
|
+
}
|
|
10711
|
+
}
|
|
10699
10712
|
async writeWhole(mount, real, rel2, bytes, owner) {
|
|
10700
10713
|
await this.table.commit(real);
|
|
10701
10714
|
this.table.forget(mount, real);
|
|
@@ -18748,7 +18761,8 @@ var WasmProcess = class {
|
|
|
18748
18761
|
...file.read && !file.write ? { access: "read" } : {},
|
|
18749
18762
|
...file.write && !file.read ? { access: "write" } : {},
|
|
18750
18763
|
...file.tty?.name ? { name: file.tty.name } : file.pty ? { name: "/dev/ptmx" } : {},
|
|
18751
|
-
...terminal ? { terminal } : {}
|
|
18764
|
+
...terminal ? { terminal } : {},
|
|
18765
|
+
...file.fifo !== void 0 ? { fifo: file.fifo } : {}
|
|
18752
18766
|
};
|
|
18753
18767
|
}
|
|
18754
18768
|
ttySyscall(req) {
|
|
@@ -20883,6 +20897,9 @@ async function dispatch(h, req) {
|
|
|
20883
20897
|
case "link":
|
|
20884
20898
|
if (!h.link) throw fsError2("EPERM", "this file system has no hard links");
|
|
20885
20899
|
return h.link(req.from, req.to);
|
|
20900
|
+
case "mkfifo":
|
|
20901
|
+
if (!h.mkfifo) throw fsError2("EPERM", "this file system has no FIFOs");
|
|
20902
|
+
return ownerOf2(req) ? h.mkfifo(req.path, ownerOf2(req)) : h.mkfifo(req.path);
|
|
20886
20903
|
case "symlink":
|
|
20887
20904
|
if (!h.symlink) throw fsError2("EPERM", "this file system has no symlinks");
|
|
20888
20905
|
return ownerOf2(req) ? h.symlink(req.target, req.path, ownerOf2(req)) : h.symlink(req.target, req.path);
|
|
@@ -22052,7 +22069,7 @@ function owned3(node, change) {
|
|
|
22052
22069
|
function attr(node) {
|
|
22053
22070
|
return {
|
|
22054
22071
|
kind: node.kind,
|
|
22055
|
-
size: node.kind === "file" ? node.data.size : node.kind === "symlink" ? node.target.length : 4096,
|
|
22072
|
+
size: node.kind === "file" ? node.data.size : node.kind === "symlink" ? node.target.length : node.kind === "fifo" ? 0 : 4096,
|
|
22056
22073
|
mtime: node.mtime,
|
|
22057
22074
|
atime: node.atime,
|
|
22058
22075
|
mode: node.mode,
|
|
@@ -22101,6 +22118,7 @@ function tmpfs() {
|
|
|
22101
22118
|
const existing = dir.children.get(name2);
|
|
22102
22119
|
if (existing && flags2.exclusive) throw fsError2("EEXIST", path);
|
|
22103
22120
|
if (existing?.kind === "directory" && flags2.write) throw fsError2("EISDIR", path);
|
|
22121
|
+
if (existing?.kind === "fifo") throw fsError2("ENXIO", path);
|
|
22104
22122
|
if (existing) return existing;
|
|
22105
22123
|
if (!flags2.create) throw fsError2("ENOENT", path);
|
|
22106
22124
|
const node = make("file", 33188, dir, flags2.owner);
|
|
@@ -22145,6 +22163,11 @@ function tmpfs() {
|
|
|
22145
22163
|
handle(fh);
|
|
22146
22164
|
handles.delete(fh);
|
|
22147
22165
|
},
|
|
22166
|
+
async mkfifo(path, owner) {
|
|
22167
|
+
const { dir, name: name2 } = parent(path);
|
|
22168
|
+
if (dir.children.has(name2)) throw fsError2("EEXIST", path);
|
|
22169
|
+
place(dir, name2, make("fifo", 4516, dir, owner));
|
|
22170
|
+
},
|
|
22148
22171
|
async mkdir(path, owner) {
|
|
22149
22172
|
const { dir, name: name2 } = parent(path);
|
|
22150
22173
|
if (dir.children.has(name2)) throw fsError2("EEXIST", path);
|
|
@@ -24526,6 +24549,7 @@ var Launcher = class {
|
|
|
24526
24549
|
{
|
|
24527
24550
|
symlinks: true,
|
|
24528
24551
|
links: true,
|
|
24552
|
+
fifos: true,
|
|
24529
24553
|
chmod: true,
|
|
24530
24554
|
owners: true,
|
|
24531
24555
|
linkTimes: true,
|