@ai-ecoverse/slicc-kernel 1.130.0 → 1.130.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 +2 -2
- package/dist/kernel-worker.js +27 -6
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.js +88 -49
- package/dist/node-process-worker.js.map +3 -3
- package/dist/node.js +27 -6
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +88 -49
- package/dist/process-worker.js.map +3 -3
- package/dist/types/fs/changes.d.ts +1 -0
- package/dist/types/fs/remote.d.ts +1 -0
- package/dist/types/launcher.d.ts +1 -0
- package/dist/types/process/wasi/wasi-files.d.ts +1 -0
- package/package.json +1 -1
package/dist/node.js
CHANGED
|
@@ -4154,10 +4154,12 @@ var RemoteWatch = class {
|
|
|
4154
4154
|
quiet;
|
|
4155
4155
|
crowd;
|
|
4156
4156
|
told;
|
|
4157
|
+
counted = 0;
|
|
4157
4158
|
recount() {
|
|
4158
4159
|
const now = this.crowded();
|
|
4159
|
-
if (now === this.told) return;
|
|
4160
|
+
if (now === this.told && this.peers.size === this.counted) return;
|
|
4160
4161
|
this.told = now;
|
|
4162
|
+
this.counted = this.peers.size;
|
|
4161
4163
|
this.crowd?.(now);
|
|
4162
4164
|
}
|
|
4163
4165
|
constructor(name2, options = {}) {
|
|
@@ -7392,7 +7394,7 @@ function satisfies(version, range2) {
|
|
|
7392
7394
|
}
|
|
7393
7395
|
|
|
7394
7396
|
// src/version.ts
|
|
7395
|
-
var KERNEL_VERSION = true ? "1.130.
|
|
7397
|
+
var KERNEL_VERSION = true ? "1.130.1" : "0.0.0-dev";
|
|
7396
7398
|
var OS_RELEASE = "6.0.0-slicc";
|
|
7397
7399
|
function procVersion() {
|
|
7398
7400
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|
|
@@ -9427,6 +9429,9 @@ var FileChanges = class {
|
|
|
9427
9429
|
foreign(on) {
|
|
9428
9430
|
Atomics.store(this.view, FOREIGN, on ? 1 : 0);
|
|
9429
9431
|
}
|
|
9432
|
+
flush() {
|
|
9433
|
+
Atomics.add(this.view, GEN, RING_SIZE + 1);
|
|
9434
|
+
}
|
|
9430
9435
|
publish(...paths) {
|
|
9431
9436
|
for (const path of paths) {
|
|
9432
9437
|
const g = Atomics.add(this.view, GEN, 1) + 1 | 0;
|
|
@@ -26492,9 +26497,7 @@ var Launcher = class {
|
|
|
26492
26497
|
this.usersMode = usersMode(options.users);
|
|
26493
26498
|
this.memories = memoriesOf(options.wasmMemories);
|
|
26494
26499
|
this.rootFs = options.fs;
|
|
26495
|
-
|
|
26496
|
-
this.locks = kernelLocks(options.fs.rootName, peers);
|
|
26497
|
-
peers?.watch((crowded) => this.changes.foreign(crowded));
|
|
26500
|
+
this.locks = kernelLocks(options.fs.rootName, this.flushingPeers(options.fs));
|
|
26498
26501
|
this.dac = this.usersMode === "off" ? void 0 : new Dac(this.usersMode, options.onDenial);
|
|
26499
26502
|
if (this.dac) this.dac.tagOf = (pid) => this.tagOf(pid);
|
|
26500
26503
|
this.clipboard = new ClipboardBroker(
|
|
@@ -26580,7 +26583,10 @@ var Launcher = class {
|
|
|
26580
26583
|
this.nodes.keepsOnDisk = true;
|
|
26581
26584
|
this.openFiles.add(this.nodes);
|
|
26582
26585
|
options.fs.onPeer?.(() => this.flushOpen());
|
|
26583
|
-
options.fs.remoteChanges?.((change) =>
|
|
26586
|
+
options.fs.remoteChanges?.((change) => {
|
|
26587
|
+
this.changes.flush();
|
|
26588
|
+
this.rewritten(change.paths);
|
|
26589
|
+
});
|
|
26584
26590
|
const holders = [this.held, this.openFiles];
|
|
26585
26591
|
this.unlinked = new UnlinkedKeeper(
|
|
26586
26592
|
fs,
|
|
@@ -28350,6 +28356,21 @@ var Launcher = class {
|
|
|
28350
28356
|
this.writers ??= this.writerStack();
|
|
28351
28357
|
return this.writers;
|
|
28352
28358
|
}
|
|
28359
|
+
flushingPeers(fs) {
|
|
28360
|
+
const peers = fs.peers?.();
|
|
28361
|
+
if (!peers) return void 0;
|
|
28362
|
+
peers.watch((crowded) => {
|
|
28363
|
+
this.changes.flush();
|
|
28364
|
+
this.changes.foreign(crowded);
|
|
28365
|
+
});
|
|
28366
|
+
return {
|
|
28367
|
+
...peers,
|
|
28368
|
+
fresh: () => {
|
|
28369
|
+
this.changes.flush();
|
|
28370
|
+
peers.fresh?.();
|
|
28371
|
+
}
|
|
28372
|
+
};
|
|
28373
|
+
}
|
|
28353
28374
|
rewritten(paths) {
|
|
28354
28375
|
for (const nodes of this.openFiles) for (const path of paths) nodes.rewritten(path);
|
|
28355
28376
|
this.changes.publish(...paths);
|