@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/node.js
CHANGED
|
@@ -6735,7 +6735,7 @@ function satisfies(version, range2) {
|
|
|
6735
6735
|
}
|
|
6736
6736
|
|
|
6737
6737
|
// src/version.ts
|
|
6738
|
-
var KERNEL_VERSION = true ? "1.
|
|
6738
|
+
var KERNEL_VERSION = true ? "1.118.1" : "0.0.0-dev";
|
|
6739
6739
|
var OS_RELEASE = "6.0.0-slicc";
|
|
6740
6740
|
function procVersion() {
|
|
6741
6741
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|
|
@@ -9916,7 +9916,7 @@ var FifoTable = class {
|
|
|
9916
9916
|
};
|
|
9917
9917
|
|
|
9918
9918
|
// src/mount/protocol.ts
|
|
9919
|
-
var DRIVER_PROTOCOL = [1,
|
|
9919
|
+
var DRIVER_PROTOCOL = [1, 3];
|
|
9920
9920
|
function driverVersionError(theirs) {
|
|
9921
9921
|
const major = Array.isArray(theirs) ? theirs[0] : void 0;
|
|
9922
9922
|
if (major === DRIVER_PROTOCOL[0]) return void 0;
|
|
@@ -10228,11 +10228,12 @@ function inodeless(mount, attr2) {
|
|
|
10228
10228
|
}
|
|
10229
10229
|
function statOf(attr2, path, mount) {
|
|
10230
10230
|
const mtime = new Date(attr2.mtime);
|
|
10231
|
-
const fallback = attr2.kind === "directory" ? 16877 : attr2.kind === "symlink" ? 41471 : 33188;
|
|
10231
|
+
const fallback = attr2.kind === "directory" ? 16877 : attr2.kind === "symlink" ? 41471 : attr2.kind === "fifo" ? 4516 : 33188;
|
|
10232
10232
|
return {
|
|
10233
10233
|
isFile: attr2.kind === "file",
|
|
10234
10234
|
isDirectory: attr2.kind === "directory",
|
|
10235
10235
|
isSymbolicLink: attr2.kind === "symlink",
|
|
10236
|
+
...attr2.kind === "fifo" ? { isFifo: true } : {},
|
|
10236
10237
|
size: attr2.size,
|
|
10237
10238
|
mode: attr2.mode ?? fallback,
|
|
10238
10239
|
mtime,
|
|
@@ -10775,7 +10776,7 @@ var MountFs = class _MountFs {
|
|
|
10775
10776
|
}
|
|
10776
10777
|
const { mount, rel: rel2 } = found;
|
|
10777
10778
|
this.writable(mount, real);
|
|
10778
|
-
if (owner?.fifo)
|
|
10779
|
+
if (owner?.fifo) return this.mkfifo(found, real, owner);
|
|
10779
10780
|
const bytes = typeof content === "string" ? new TextEncoder().encode(content) : content;
|
|
10780
10781
|
if (mount.maxFile > 0 && bytes.length > mount.maxFile) {
|
|
10781
10782
|
throw errnoError(
|
|
@@ -10792,6 +10793,18 @@ var MountFs = class _MountFs {
|
|
|
10792
10793
|
}
|
|
10793
10794
|
}
|
|
10794
10795
|
}
|
|
10796
|
+
async mkfifo(found, real, owner) {
|
|
10797
|
+
const { mount, rel: rel2 } = found;
|
|
10798
|
+
if (!mount.caps.fifos) throw errnoError("EPERM", `${real}: this mount has no FIFOs`);
|
|
10799
|
+
const made2 = await this.driverOwner(found, real, owner, false);
|
|
10800
|
+
await this.table.commit(real);
|
|
10801
|
+
this.table.forget(mount, real);
|
|
10802
|
+
try {
|
|
10803
|
+
await mount.conn.call({ op: "mkfifo", path: rel2, ...made2 });
|
|
10804
|
+
} finally {
|
|
10805
|
+
this.table.forget(mount, real);
|
|
10806
|
+
}
|
|
10807
|
+
}
|
|
10795
10808
|
async writeWhole(mount, real, rel2, bytes, owner) {
|
|
10796
10809
|
await this.table.commit(real);
|
|
10797
10810
|
this.table.forget(mount, real);
|
|
@@ -18686,7 +18699,8 @@ var WasmProcess = class {
|
|
|
18686
18699
|
...file.read && !file.write ? { access: "read" } : {},
|
|
18687
18700
|
...file.write && !file.read ? { access: "write" } : {},
|
|
18688
18701
|
...file.tty?.name ? { name: file.tty.name } : file.pty ? { name: "/dev/ptmx" } : {},
|
|
18689
|
-
...terminal ? { terminal } : {}
|
|
18702
|
+
...terminal ? { terminal } : {},
|
|
18703
|
+
...file.fifo !== void 0 ? { fifo: file.fifo } : {}
|
|
18690
18704
|
};
|
|
18691
18705
|
}
|
|
18692
18706
|
ttySyscall(req) {
|
|
@@ -20821,6 +20835,9 @@ async function dispatch(h, req) {
|
|
|
20821
20835
|
case "link":
|
|
20822
20836
|
if (!h.link) throw fsError2("EPERM", "this file system has no hard links");
|
|
20823
20837
|
return h.link(req.from, req.to);
|
|
20838
|
+
case "mkfifo":
|
|
20839
|
+
if (!h.mkfifo) throw fsError2("EPERM", "this file system has no FIFOs");
|
|
20840
|
+
return ownerOf2(req) ? h.mkfifo(req.path, ownerOf2(req)) : h.mkfifo(req.path);
|
|
20824
20841
|
case "symlink":
|
|
20825
20842
|
if (!h.symlink) throw fsError2("EPERM", "this file system has no symlinks");
|
|
20826
20843
|
return ownerOf2(req) ? h.symlink(req.target, req.path, ownerOf2(req)) : h.symlink(req.target, req.path);
|
|
@@ -22062,7 +22079,7 @@ function owned3(node, change) {
|
|
|
22062
22079
|
function attr(node) {
|
|
22063
22080
|
return {
|
|
22064
22081
|
kind: node.kind,
|
|
22065
|
-
size: node.kind === "file" ? node.data.size : node.kind === "symlink" ? node.target.length : 4096,
|
|
22082
|
+
size: node.kind === "file" ? node.data.size : node.kind === "symlink" ? node.target.length : node.kind === "fifo" ? 0 : 4096,
|
|
22066
22083
|
mtime: node.mtime,
|
|
22067
22084
|
atime: node.atime,
|
|
22068
22085
|
mode: node.mode,
|
|
@@ -22111,6 +22128,7 @@ function tmpfs() {
|
|
|
22111
22128
|
const existing = dir.children.get(name2);
|
|
22112
22129
|
if (existing && flags2.exclusive) throw fsError2("EEXIST", path);
|
|
22113
22130
|
if (existing?.kind === "directory" && flags2.write) throw fsError2("EISDIR", path);
|
|
22131
|
+
if (existing?.kind === "fifo") throw fsError2("ENXIO", path);
|
|
22114
22132
|
if (existing) return existing;
|
|
22115
22133
|
if (!flags2.create) throw fsError2("ENOENT", path);
|
|
22116
22134
|
const node = make("file", 33188, dir, flags2.owner);
|
|
@@ -22155,6 +22173,11 @@ function tmpfs() {
|
|
|
22155
22173
|
handle(fh);
|
|
22156
22174
|
handles.delete(fh);
|
|
22157
22175
|
},
|
|
22176
|
+
async mkfifo(path, owner) {
|
|
22177
|
+
const { dir, name: name2 } = parent(path);
|
|
22178
|
+
if (dir.children.has(name2)) throw fsError2("EEXIST", path);
|
|
22179
|
+
place(dir, name2, make("fifo", 4516, dir, owner));
|
|
22180
|
+
},
|
|
22158
22181
|
async mkdir(path, owner) {
|
|
22159
22182
|
const { dir, name: name2 } = parent(path);
|
|
22160
22183
|
if (dir.children.has(name2)) throw fsError2("EEXIST", path);
|
|
@@ -24532,6 +24555,7 @@ var Launcher = class {
|
|
|
24532
24555
|
{
|
|
24533
24556
|
symlinks: true,
|
|
24534
24557
|
links: true,
|
|
24558
|
+
fifos: true,
|
|
24535
24559
|
chmod: true,
|
|
24536
24560
|
owners: true,
|
|
24537
24561
|
linkTimes: true,
|