@ai-ecoverse/slicc-kernel 1.172.1 → 1.173.0
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 +12 -5
- package/dist/index.js +37 -5
- package/dist/index.js.map +3 -3
- package/dist/kernel-worker.js +443 -190
- package/dist/kernel-worker.js.map +4 -4
- package/dist/meta.js +204 -27
- package/dist/meta.js.map +4 -4
- package/dist/node-process-worker.cjs +3 -1
- package/dist/node-process-worker.cjs.map +2 -2
- package/dist/node-process-worker.js +3 -1
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +18 -3
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +3 -1
- package/dist/process-worker.js.map +2 -2
- package/dist/types/fs/meta-reads.d.ts +41 -0
- package/dist/types/fs/meta.d.ts +12 -1
- package/dist/types/fs/opfs.d.ts +2 -1
- package/dist/types/fs/portable.d.ts +11 -0
- package/dist/types/fs/roots.d.ts +1 -1
- package/dist/types/fs/types.d.ts +4 -0
- package/dist/types/fs/watch.d.ts +3 -0
- package/dist/types/kernel/proc-info.d.ts +4 -0
- package/dist/types/mount/media.d.ts +3 -1
- package/dist/types/serve.d.ts +6 -4
- package/package.json +4 -4
package/dist/node.js
CHANGED
|
@@ -3702,7 +3702,7 @@ function satisfies(version, range2) {
|
|
|
3702
3702
|
}
|
|
3703
3703
|
|
|
3704
3704
|
// src/version.ts
|
|
3705
|
-
var KERNEL_VERSION = true ? "1.
|
|
3705
|
+
var KERNEL_VERSION = true ? "1.173.0" : "0.0.0-dev";
|
|
3706
3706
|
var OS_RELEASE = "6.0.0-slicc";
|
|
3707
3707
|
function procVersion() {
|
|
3708
3708
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|
|
@@ -7842,6 +7842,7 @@ var FsWatchers = class {
|
|
|
7842
7842
|
const watcher = {
|
|
7843
7843
|
paths: paths.map(normalizePath),
|
|
7844
7844
|
recursive: options.recursive === true,
|
|
7845
|
+
peers: options.peers === true,
|
|
7845
7846
|
notify,
|
|
7846
7847
|
pending: /* @__PURE__ */ new Set(),
|
|
7847
7848
|
scheduled: false
|
|
@@ -7963,10 +7964,16 @@ var FsWatchers = class {
|
|
|
7963
7964
|
this.report(paths);
|
|
7964
7965
|
this.emit("change", paths);
|
|
7965
7966
|
}
|
|
7967
|
+
peerChanged(paths) {
|
|
7968
|
+
if (paths.length > 0) this.notify(paths, true);
|
|
7969
|
+
}
|
|
7966
7970
|
report(paths, notify = true) {
|
|
7967
7971
|
for (const tap of this.taps) tap(paths);
|
|
7968
|
-
if (
|
|
7972
|
+
if (notify) this.notify(paths);
|
|
7973
|
+
}
|
|
7974
|
+
notify(paths, peer = false) {
|
|
7969
7975
|
for (const watcher of this.watchers) {
|
|
7976
|
+
if (peer && !watcher.peers) continue;
|
|
7970
7977
|
for (const path of paths) {
|
|
7971
7978
|
const changed = normalizePath(path);
|
|
7972
7979
|
if (touches(watcher, changed)) watcher.pending.add(changed);
|
|
@@ -12376,6 +12383,8 @@ var SYS_TREE = {
|
|
|
12376
12383
|
slicc_opfs_calls: (listing) => `${listing.opfsCalls ?? 0}
|
|
12377
12384
|
`,
|
|
12378
12385
|
slicc_opfs_ops: (listing) => `${listing.opfsOps ?? 0}
|
|
12386
|
+
`,
|
|
12387
|
+
slicc_meta_transactions: ({ meta }) => `${meta?.reads ?? 0} ${meta?.writes ?? 0}
|
|
12379
12388
|
`,
|
|
12380
12389
|
slicc_cwd_checks: (listing) => `${listing.cwdChecks ?? 0}
|
|
12381
12390
|
`,
|
|
@@ -26355,6 +26364,7 @@ function sidecar(meta) {
|
|
|
26355
26364
|
};
|
|
26356
26365
|
if (meta.absent) ops.absent = meta.absent.bind(meta);
|
|
26357
26366
|
if (meta.forgetTrees) ops.forgetTrees = meta.forgetTrees.bind(meta);
|
|
26367
|
+
if (meta.transactions) ops.transactions = meta.transactions.bind(meta);
|
|
26358
26368
|
const { removeFile } = meta;
|
|
26359
26369
|
if (removeFile)
|
|
26360
26370
|
ops.removeFile = (path) => removeFile.call(meta, path).catch((err) => {
|
|
@@ -26921,6 +26931,9 @@ var OpfsFs = class {
|
|
|
26921
26931
|
opfsOps() {
|
|
26922
26932
|
return this.calls + this.others;
|
|
26923
26933
|
}
|
|
26934
|
+
metaTransactions() {
|
|
26935
|
+
return this.meta.transactions?.();
|
|
26936
|
+
}
|
|
26924
26937
|
io(request) {
|
|
26925
26938
|
this.others++;
|
|
26926
26939
|
return request;
|
|
@@ -31767,6 +31780,7 @@ var Launcher = class {
|
|
|
31767
31780
|
this.rewritten(change.paths, change.trees);
|
|
31768
31781
|
this.watchers.heard(change.content ? "change" : "rename", change.paths);
|
|
31769
31782
|
this.watchers.heard("rename", change.trees ?? []);
|
|
31783
|
+
this.watchers.peerChanged([...change.paths, ...change.trees ?? []]);
|
|
31770
31784
|
if (change.outside && this.catalogChanged([...change.paths, ...change.trees ?? []])) {
|
|
31771
31785
|
this.resetCatalogs();
|
|
31772
31786
|
}
|
|
@@ -32721,6 +32735,7 @@ var Launcher = class {
|
|
|
32721
32735
|
fsCalls: servedFsCalls(),
|
|
32722
32736
|
opfsCalls: this.rootFs.opfsCalls?.() ?? 0,
|
|
32723
32737
|
opfsOps: this.rootFs.opfsOps?.() ?? 0,
|
|
32738
|
+
meta: this.rootFs.metaTransactions?.(),
|
|
32724
32739
|
cwdChecks: this.cwds.checks,
|
|
32725
32740
|
renameAcks: this.rootFs.renameWaits?.(),
|
|
32726
32741
|
swaps: this.swaps.counts(),
|
|
@@ -34774,7 +34789,7 @@ async function watchOp(l, req, watches, send2, g) {
|
|
|
34774
34789
|
}
|
|
34775
34790
|
if (g) for (const path of req.paths) await readable(g, "watch", l.fs.resolvePath("/", path));
|
|
34776
34791
|
const notify = visibleTo2(g, (change) => send2({ watch: req.id, change }));
|
|
34777
|
-
const unwatch = l.watchers.watch(req.paths, { recursive: req.recursive }, notify);
|
|
34792
|
+
const unwatch = l.watchers.watch(req.paths, { recursive: req.recursive, peers: true }, notify);
|
|
34778
34793
|
watches.set(req.id, unwatch);
|
|
34779
34794
|
return { result: req.id };
|
|
34780
34795
|
}
|