@ai-ecoverse/slicc-kernel 1.143.6 → 1.144.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 +6 -5
- package/dist/driver-worker.js +5 -1
- package/dist/driver-worker.js.map +2 -2
- package/dist/index.js +5 -1
- package/dist/index.js.map +2 -2
- package/dist/kernel-worker.js +2933 -2776
- package/dist/kernel-worker.js.map +4 -4
- package/dist/node-driver-worker.js +5 -1
- package/dist/node-driver-worker.js.map +2 -2
- package/dist/node-process-worker.js +35 -18
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +25589 -25428
- package/dist/node.js.map +4 -4
- package/dist/process-worker.js +35 -18
- package/dist/process-worker.js.map +2 -2
- package/dist/types/client/attach.d.ts +3 -0
- package/dist/types/client/protocol.d.ts +3 -0
- package/dist/types/client/serve-client.d.ts +1 -1
- package/dist/types/cron/crontab.d.ts +13 -1
- package/dist/types/cron/service.d.ts +2 -0
- package/dist/types/fs/dac.d.ts +2 -0
- package/dist/types/kernel/clipboard.d.ts +3 -2
- package/dist/types/kernel/proc-info.d.ts +1 -0
- package/dist/types/kernel/process.d.ts +1 -1
- package/dist/types/kernel/sealed.d.ts +8 -3
- package/dist/types/launcher.d.ts +10 -1
- package/dist/types/process/wasi/wasi-fds.d.ts +3 -1
- package/dist/types/realm/sync-fs-wire.d.ts +1 -0
- package/dist/types/sudo.d.ts +2 -1
- package/package.json +5 -5
package/dist/process-worker.js
CHANGED
|
@@ -1461,7 +1461,8 @@ function createSyncFsSabBridge(transport, opts = {}) {
|
|
|
1461
1461
|
const mode = (held2 ? 1 : 0) | (open ? 2 : 0);
|
|
1462
1462
|
if (mode === 3) {
|
|
1463
1463
|
const at = seen.gen !== void 0 ? { gen: seen.gen } : {};
|
|
1464
|
-
|
|
1464
|
+
const link = seen.nofollow ? { nofollow: true } : {};
|
|
1465
|
+
return json2({ op: "hold", path, mode: mode | want, ...at, ...link }, path);
|
|
1465
1466
|
}
|
|
1466
1467
|
run({ op: "hold", path, mode, ...handle !== void 0 ? { handle } : {} }, path);
|
|
1467
1468
|
return void 0;
|
|
@@ -2913,7 +2914,7 @@ var KERNEL_VERSION, OS_RELEASE;
|
|
|
2913
2914
|
var init_version = __esm({
|
|
2914
2915
|
"src/version.ts"() {
|
|
2915
2916
|
"use strict";
|
|
2916
|
-
KERNEL_VERSION = true ? "1.
|
|
2917
|
+
KERNEL_VERSION = true ? "1.144.1" : "0.0.0-dev";
|
|
2917
2918
|
OS_RELEASE = "6.0.0-slicc";
|
|
2918
2919
|
}
|
|
2919
2920
|
});
|
|
@@ -5726,7 +5727,7 @@ function pidStatus(info) {
|
|
|
5726
5727
|
"TracerPid: 0",
|
|
5727
5728
|
`Uid: ${ids(c.ruid, c.euid, c.suid)}`,
|
|
5728
5729
|
`Gid: ${ids(c.rgid, c.egid, c.sgid)}`,
|
|
5729
|
-
...info.tag !== void 0 ? [
|
|
5730
|
+
...(info.tags ?? (info.tag !== void 0 ? [info.tag] : [])).map(tagLine),
|
|
5730
5731
|
"FDSize: 64",
|
|
5731
5732
|
`VmSize: ${Math.ceil(info.memory / KIB)} kB`,
|
|
5732
5733
|
`VmRSS: ${Math.ceil(info.memory / KIB)} kB`,
|
|
@@ -9493,23 +9494,21 @@ var init_wasi_fds = __esm({
|
|
|
9493
9494
|
const flags = want === 6 ? O_RDWR5 : want === 2 ? O_WRONLY5 : 0;
|
|
9494
9495
|
return openDevice2.call(this.kernel.sys, flags);
|
|
9495
9496
|
}
|
|
9496
|
-
open(path, oflags, rights, fdflags, mode) {
|
|
9497
|
+
open(path, oflags, rights, fdflags, mode, nofollow = false) {
|
|
9497
9498
|
this.made = void 0;
|
|
9498
9499
|
this.created = false;
|
|
9500
|
+
this.nofollow = nofollow;
|
|
9499
9501
|
const exclusive = (oflags & OFLAGS.CREAT) !== 0 && (oflags & OFLAGS.EXCL) !== 0;
|
|
9500
|
-
|
|
9501
|
-
|
|
9502
|
-
if (device2) return this.install({ type: "device", device: device2 });
|
|
9503
|
-
const kernelDevice = this.openKernelDevice(path, oflags, fdflags, rights);
|
|
9504
|
-
if (kernelDevice !== void 0) return kernelDevice;
|
|
9505
|
-
const alias = stdioAlias(path);
|
|
9506
|
-
if (alias !== void 0) return this.reopen(alias);
|
|
9502
|
+
const special = this.openSpecial(path, oflags, rights, fdflags, exclusive);
|
|
9503
|
+
if (special !== void 0) return special;
|
|
9507
9504
|
const outside = this.escaped(path, oflags, rights);
|
|
9508
9505
|
if (outside !== void 0) return this.open(outside, oflags, rights, fdflags, mode);
|
|
9509
9506
|
if (exclusive && !(oflags & OFLAGS.DIRECTORY) && this.madeAtOnce(path, mode)) {
|
|
9510
9507
|
return this.regular(path, void 0, oflags, rights, fdflags, mode, true);
|
|
9511
9508
|
}
|
|
9512
|
-
if (exclusive && this.isLink(path))
|
|
9509
|
+
if ((exclusive || nofollow) && this.isLink(path)) {
|
|
9510
|
+
throw new WasiError(exclusive ? "EEXIST" : "ELOOP");
|
|
9511
|
+
}
|
|
9513
9512
|
const s = this.statOrMissing(path);
|
|
9514
9513
|
if (exclusive && s) throw new WasiError("EEXIST");
|
|
9515
9514
|
if (s?.escape !== void 0) {
|
|
@@ -9528,6 +9527,18 @@ var init_wasi_fds = __esm({
|
|
|
9528
9527
|
refuseWrite(s, oflags, rights);
|
|
9529
9528
|
return this.regular(path, s, oflags, rights, fdflags, mode);
|
|
9530
9529
|
}
|
|
9530
|
+
nofollow = false;
|
|
9531
|
+
openSpecial(path, oflags, rights, fdflags, exclusive) {
|
|
9532
|
+
if (exclusive && namedDevice(path)) throw new WasiError("EEXIST");
|
|
9533
|
+
const device2 = deviceOf(path);
|
|
9534
|
+
if (device2) return this.install({ type: "device", device: device2 });
|
|
9535
|
+
const kernelDevice = this.openKernelDevice(path, oflags, fdflags, rights);
|
|
9536
|
+
if (kernelDevice !== void 0) return kernelDevice;
|
|
9537
|
+
const alias = stdioAlias(path);
|
|
9538
|
+
if (alias === void 0) return void 0;
|
|
9539
|
+
if (this.nofollow) throw new WasiError("ELOOP");
|
|
9540
|
+
return this.reopen(alias);
|
|
9541
|
+
}
|
|
9531
9542
|
escaped(path, oflags, rights) {
|
|
9532
9543
|
const outside = this.fs.escape?.(path);
|
|
9533
9544
|
if (outside === void 0) return void 0;
|
|
@@ -9597,7 +9608,8 @@ var init_wasi_fds = __esm({
|
|
|
9597
9608
|
const ranged = st.ranged ? st.size : void 0;
|
|
9598
9609
|
const asked = (want & 4 ? HOLD_READ : 0) | (want & 2 ? HOLD_WRITE : 0) | (made ? HOLD_CREATED : 0);
|
|
9599
9610
|
const handle = this.fs.hold?.(path, true, true, void 0, this.fs.owners ? asked : 0, {
|
|
9600
|
-
gen: st.gen
|
|
9611
|
+
gen: st.gen,
|
|
9612
|
+
...this.nofollow ? { nofollow: true } : {}
|
|
9601
9613
|
});
|
|
9602
9614
|
const io = handle !== void 0 && this.fs.pinned ? this.fs.pinned(handle) : this.fs;
|
|
9603
9615
|
const view = this.fs.changes;
|
|
@@ -11323,7 +11335,7 @@ var init_wasi_host = __esm({
|
|
|
11323
11335
|
if (alias && !alias.stdio) this.openFd(alias.fd);
|
|
11324
11336
|
const path = alias && !alias.stdio ? `/dev/fd/${alias.fd}` : asked;
|
|
11325
11337
|
if (deviceOf(path)) this.interrupted?.();
|
|
11326
|
-
mem.view().setUint32(out, fds.open(path, oflags, rights, fdflags), true);
|
|
11338
|
+
mem.view().setUint32(out, fds.open(path, oflags, rights, fdflags, void 0, !follow3), true);
|
|
11327
11339
|
if (fds.created) this.created(path, 438);
|
|
11328
11340
|
} catch (err) {
|
|
11329
11341
|
if (err.code !== "ENOENT") throw err;
|
|
@@ -11331,7 +11343,7 @@ var init_wasi_host = __esm({
|
|
|
11331
11343
|
const joined2 = raw.startsWith("/") ? raw : `${fds.dir(dirfd).path}/${raw}`;
|
|
11332
11344
|
const resolved2 = this.resolveForDev(joined2, follow3);
|
|
11333
11345
|
if (!resolved2) throw err;
|
|
11334
|
-
mem.view().setUint32(out, fds.open(resolved2, oflags, rights, fdflags), true);
|
|
11346
|
+
mem.view().setUint32(out, fds.open(resolved2, oflags, rights, fdflags, void 0, !follow3), true);
|
|
11335
11347
|
}
|
|
11336
11348
|
},
|
|
11337
11349
|
path_filestat_get: (dirfd, lookup2, p, l, out) => {
|
|
@@ -12282,13 +12294,18 @@ function importsContext({
|
|
|
12282
12294
|
open(path, o = {}) {
|
|
12283
12295
|
const abs = host.fds.resolve(3, path);
|
|
12284
12296
|
const fresh = o.create === true && o.exclusive === true && owners && fs.create !== void 0;
|
|
12285
|
-
if (!fresh && o.nofollow && fs.exists(abs) && fs.lstat(abs).isSymbolicLink)
|
|
12286
|
-
throw new WasiError("ELOOP");
|
|
12287
12297
|
const existed = !fresh && fs.exists(abs);
|
|
12288
12298
|
const oflags = (o.create ? OFLAGS.CREAT : 0) | (o.exclusive ? OFLAGS.EXCL : 0) | (o.truncate ? OFLAGS.TRUNC : 0) | (o.directory ? OFLAGS.DIRECTORY : 0);
|
|
12289
12299
|
const rights = (o.write ? RIGHTS.FD_WRITE : 0n) | (o.read || !o.write ? RIGHTS.FD_READ : 0n);
|
|
12290
12300
|
const flags = o.append ? FDFLAGS.APPEND : 0;
|
|
12291
|
-
const fd = host.fds.open(
|
|
12301
|
+
const fd = host.fds.open(
|
|
12302
|
+
abs,
|
|
12303
|
+
oflags,
|
|
12304
|
+
rights,
|
|
12305
|
+
flags,
|
|
12306
|
+
fresh ? o.mode : void 0,
|
|
12307
|
+
o.nofollow === true
|
|
12308
|
+
);
|
|
12292
12309
|
if (o.mode !== void 0 && !existed && !fresh) fs.chmod(abs, o.mode);
|
|
12293
12310
|
return fd;
|
|
12294
12311
|
},
|