@ai-ecoverse/slicc-kernel 1.131.0 → 1.132.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 -0
- package/dist/index.js.map +1 -1
- package/dist/kernel-worker.js +27 -9
- package/dist/kernel-worker.js.map +4 -4
- package/dist/meta.js +21 -0
- package/dist/meta.js.map +3 -3
- package/dist/node-process-worker.js +24 -8
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +21 -6
- package/dist/node.js.map +4 -4
- package/dist/process-worker.js +24 -8
- package/dist/process-worker.js.map +2 -2
- package/dist/types/fs/notice.d.ts +9 -0
- package/dist/types/fs/physical-path.d.ts +1 -0
- package/dist/types/fs/types.d.ts +1 -0
- package/dist/types/kernel/vfs-file.d.ts +1 -0
- package/dist/types/meta.d.ts +6 -0
- package/package.json +3 -2
package/dist/kernel-worker.js
CHANGED
|
@@ -350,6 +350,17 @@ async function openMeta(name2, factory) {
|
|
|
350
350
|
return new IndexedDbMeta(await openMetaDb(name2, factory));
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
+
// src/fs/notice.ts
|
|
354
|
+
function dirsChannel(metadata) {
|
|
355
|
+
return `slicc-kernel-dirs:${metadata}`;
|
|
356
|
+
}
|
|
357
|
+
function noticeOf(data) {
|
|
358
|
+
if (Array.isArray(data)) return { paths: data.filter((p) => typeof p === "string"), trees: [] };
|
|
359
|
+
const notice = data ?? {};
|
|
360
|
+
const strings = (list) => Array.isArray(list) ? list.filter((p) => typeof p === "string") : [];
|
|
361
|
+
return { paths: strings(notice.paths), trees: strings(notice.trees) };
|
|
362
|
+
}
|
|
363
|
+
|
|
353
364
|
// src/fs/types.ts
|
|
354
365
|
function rangedOps(fs) {
|
|
355
366
|
const { pread, pwrite, truncate } = fs;
|
|
@@ -1288,8 +1299,9 @@ var OpfsFs = class {
|
|
|
1288
1299
|
for (const path of [...c.paths, ...c.trees]) this.forget(path);
|
|
1289
1300
|
});
|
|
1290
1301
|
this.channel.onmessage = ({ data }) => {
|
|
1291
|
-
|
|
1292
|
-
|
|
1302
|
+
const { paths, trees } = noticeOf(data);
|
|
1303
|
+
for (const path of [...paths, ...trees]) this.forget(normalizePath(path));
|
|
1304
|
+
remote?.emit({ paths, trees });
|
|
1293
1305
|
};
|
|
1294
1306
|
this.channel.unref?.();
|
|
1295
1307
|
}
|
|
@@ -7022,7 +7034,7 @@ function satisfies(version, range2) {
|
|
|
7022
7034
|
}
|
|
7023
7035
|
|
|
7024
7036
|
// src/version.ts
|
|
7025
|
-
var KERNEL_VERSION = true ? "1.
|
|
7037
|
+
var KERNEL_VERSION = true ? "1.132.1" : "0.0.0-dev";
|
|
7026
7038
|
var OS_RELEASE = "6.0.0-slicc";
|
|
7027
7039
|
function procVersion() {
|
|
7028
7040
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|
|
@@ -20604,6 +20616,9 @@ var VfsNodes = class {
|
|
|
20604
20616
|
rewritten(path) {
|
|
20605
20617
|
this.byPath.get(path)?.reread();
|
|
20606
20618
|
}
|
|
20619
|
+
rewrittenUnder(tree2) {
|
|
20620
|
+
for (const [p, node] of this.byPath) if (within7(p, tree2)) node.reread();
|
|
20621
|
+
}
|
|
20607
20622
|
doubted(path) {
|
|
20608
20623
|
for (const [p, node] of this.byPath) if (within7(p, path)) node.doubted();
|
|
20609
20624
|
}
|
|
@@ -26790,7 +26805,7 @@ var Launcher = class {
|
|
|
26790
26805
|
options.fs.onPeer?.(() => this.flushOpen());
|
|
26791
26806
|
options.fs.remoteChanges?.((change) => {
|
|
26792
26807
|
this.changes.flush();
|
|
26793
|
-
this.rewritten(change.paths);
|
|
26808
|
+
this.rewritten(change.paths, change.trees);
|
|
26794
26809
|
});
|
|
26795
26810
|
const holders = [this.held, this.openFiles];
|
|
26796
26811
|
this.unlinked = new UnlinkedKeeper(
|
|
@@ -28576,8 +28591,11 @@ var Launcher = class {
|
|
|
28576
28591
|
}
|
|
28577
28592
|
};
|
|
28578
28593
|
}
|
|
28579
|
-
rewritten(paths) {
|
|
28580
|
-
for (const nodes of this.openFiles)
|
|
28594
|
+
rewritten(paths, trees = []) {
|
|
28595
|
+
for (const nodes of this.openFiles) {
|
|
28596
|
+
for (const path of paths) nodes.rewritten(path);
|
|
28597
|
+
for (const tree2 of trees) nodes.rewrittenUnder(tree2);
|
|
28598
|
+
}
|
|
28581
28599
|
this.changes.publish(...paths);
|
|
28582
28600
|
}
|
|
28583
28601
|
async flushOpen() {
|
|
@@ -29099,8 +29117,8 @@ function act2(session, req) {
|
|
|
29099
29117
|
else if (req.action === "signal") session.signal(signalNumber(req.signal));
|
|
29100
29118
|
else session.close();
|
|
29101
29119
|
}
|
|
29102
|
-
function
|
|
29103
|
-
return name2 === false ? void 0 :
|
|
29120
|
+
function dirsChannelOf(name2) {
|
|
29121
|
+
return name2 === false ? void 0 : dirsChannel(name2);
|
|
29104
29122
|
}
|
|
29105
29123
|
function caDb(req) {
|
|
29106
29124
|
const name2 = req.ca ?? (req.metadata ? `${req.metadata}-ca` : CA_DB);
|
|
@@ -29342,7 +29360,7 @@ function serveKernel(port, deps) {
|
|
|
29342
29360
|
const net = remotes(port, req);
|
|
29343
29361
|
({ transport: remote, uplink } = net);
|
|
29344
29362
|
const ranged2 = await inOpfs(deps, root);
|
|
29345
|
-
const fs = new OpfsFs(root, meta,
|
|
29363
|
+
const fs = new OpfsFs(root, meta, dirsChannelOf(name2), { ranged: ranged2 });
|
|
29346
29364
|
await fs.reconcile();
|
|
29347
29365
|
const started = new Launcher({
|
|
29348
29366
|
fs,
|