@ai-ecoverse/slicc-kernel 1.167.0 → 1.167.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 +1 -1
- package/dist/kernel-worker.js +10 -1
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.cjs +1 -1
- package/dist/node-process-worker.js +1 -1
- package/dist/node.js +10 -1
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1256,7 +1256,7 @@ The database is `slicc-kernel` (or the `metadata` option), schema version 1, wit
|
|
|
1256
1256
|
|
|
1257
1257
|
Not covered: hard links (OPFS cannot share contents between names; they work only within a mount whose driver offers `links`, such as `tmpfs`). File owners are stored only with `users: 'report'` or `'enforce'` (see [File owners](#file-owners)). With `users: 'off'`, an Emscripten process built against the kernel's credential calls (its glue imports `slicc_cred_js`, as homescoop's H1 builds do) sees every file as owned by its own effective uid and gid: root's 0 by default, a user's own ids when it runs as one, and the new ids after a `setuid`. Owner checks such as git's `safe.directory`, ssh's key checks and gnupg's home directory check then pass, as WASIX programs already see through their libc. An older program, whose libc says it is uid 1000 whoever runs it, sees every file as owned by 1000:1000 as before, so its own checks pass too. The kernel decides this once, when it loads the program. Emscripten also doesn't enforce permission bits, so a file runs whether or not its exec bit is set; the bits are what `ls`, `stat` and `test` report. With `users: 'off'` a file or directory with no permission bits at all shows as `0666` or `0777` to Emscripten programs; with owners on they see the real mode (`0`), and the kernel, not Emscripten's own checks, decides who may read, write or enter it (`cd` asks the kernel for `x` on the directory), so root still enters a `000` directory.
|
|
1258
1258
|
|
|
1259
|
-
Reads retry briefly when a concurrent write has invalidated the OPFS file snapshot (`NotReadableError`).
|
|
1259
|
+
Reads retry briefly when a concurrent write has invalidated the OPFS file snapshot (`NotReadableError`). A positioned read uses the snapshot the kernel's last look at the file took (below) when it is still current and covers the whole range, so a run of reads through a descriptor makes no `getFile` of its own beyond the one each window's look takes ([#1626](https://github.com/ai-ecoverse/slicc-kernel/issues/1626)). A read past the snapshot's end, an empty read, or a snapshot that can't be read any more takes a fresh one. In Chrome the snapshot holds no bytes of its own: it reads the file as it is now, so a write in place (a sync access handle) shows at once, and a file another writer replaced, truncated or removed fails the snapshot (`NotReadableError`, `NotFoundError`), which sends the read to a fresh one. Holding a snapshot blocks no other writer: a sync access handle, `createWritable`, `move` and `removeEntry` all go ahead.
|
|
1260
1260
|
|
|
1261
1261
|
At boot, a kernel drops sidecar records whose file is gone (and symlink records whose name became a real file or whose directory is gone), left behind by a tab that closed mid-change. It does this only when it is the only kernel on the origin (the watch channel's join handshake finds no other), and it drops a record only if it is still the one it found: another tab's live changes made while it looked, such as a placeholder tar replaces with a symlink, are kept. Up to 1.119.2, a tab that booted while another extracted symlinks with tar could drop some of them.
|
|
1262
1262
|
|
package/dist/kernel-worker.js
CHANGED
|
@@ -2556,6 +2556,15 @@ var OpfsFs = class {
|
|
|
2556
2556
|
}
|
|
2557
2557
|
async pread(path, offset, length2) {
|
|
2558
2558
|
return this.reading(path, async (handle) => {
|
|
2559
|
+
const seen = this.glanced(handle);
|
|
2560
|
+
if (seen && length2 > 0 && offset + length2 <= seen.size) {
|
|
2561
|
+
const bytes = await this.io(seen.slice(offset, offset + length2).arrayBuffer()).then(
|
|
2562
|
+
(buffer) => new Uint8Array(buffer),
|
|
2563
|
+
() => void 0
|
|
2564
|
+
);
|
|
2565
|
+
if (bytes?.length === length2) return bytes;
|
|
2566
|
+
this.glances.delete(handle);
|
|
2567
|
+
}
|
|
2559
2568
|
const file = await this.io(handle.getFile());
|
|
2560
2569
|
await this.refuseNode(path, file.size === 0);
|
|
2561
2570
|
return new Uint8Array(await file.slice(offset, offset + length2).arrayBuffer());
|
|
@@ -8468,7 +8477,7 @@ function satisfies(version, range2) {
|
|
|
8468
8477
|
}
|
|
8469
8478
|
|
|
8470
8479
|
// src/version.ts
|
|
8471
|
-
var KERNEL_VERSION = true ? "1.167.
|
|
8480
|
+
var KERNEL_VERSION = true ? "1.167.1" : "0.0.0-dev";
|
|
8472
8481
|
var OS_RELEASE = "6.0.0-slicc";
|
|
8473
8482
|
function procVersion() {
|
|
8474
8483
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|