@ai-ecoverse/slicc-kernel 1.121.0 → 1.121.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/dist/node.js CHANGED
@@ -4109,7 +4109,7 @@ var RemoteWatch = class {
4109
4109
  return this.union.size > 0;
4110
4110
  }
4111
4111
  wrote(path) {
4112
- if (!this.union.has(path)) return;
4112
+ if (!this.union.has(path) && !this.crowded()) return;
4113
4113
  this.channel.postMessage({ changed: [path] });
4114
4114
  const now = Date.now();
4115
4115
  if (now - this.pruned < PRUNE_EVERY_MS) return;
@@ -4358,7 +4358,7 @@ var OpfsFs = class {
4358
4358
  }
4359
4359
  committed(target) {
4360
4360
  this.fileTimes.delete(target);
4361
- if (this.remote?.watched()) this.remote.wrote(target);
4361
+ if (this.remote?.watched() || this.remote?.crowded()) this.remote.wrote(target);
4362
4362
  }
4363
4363
  counted = [];
4364
4364
  async stamp(path, cached = false) {
@@ -6776,7 +6776,7 @@ function satisfies(version, range2) {
6776
6776
  }
6777
6777
 
6778
6778
  // src/version.ts
6779
- var KERNEL_VERSION = true ? "1.121.0" : "0.0.0-dev";
6779
+ var KERNEL_VERSION = true ? "1.121.1" : "0.0.0-dev";
6780
6780
  var OS_RELEASE = "6.0.0-slicc";
6781
6781
  function procVersion() {
6782
6782
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -17310,6 +17310,9 @@ var VfsNodes = class {
17310
17310
  this.byPath.set(path, node);
17311
17311
  this.kept.delete(node);
17312
17312
  }
17313
+ rewritten(path) {
17314
+ this.byPath.get(path)?.reread();
17315
+ }
17313
17316
  async flush(path) {
17314
17317
  for (const [p, node] of this.byPath) if (within7(p, path)) await node.serial(() => node.flush());
17315
17318
  }
@@ -23670,6 +23673,7 @@ var Launcher = class {
23670
23673
  this.nodes.keepsOnDisk = true;
23671
23674
  this.openFiles.add(this.nodes);
23672
23675
  options.fs.onPeer?.(() => this.flushOpen());
23676
+ options.fs.remoteChanges?.((change) => this.rewritten(change.paths));
23673
23677
  const holders = [this.held, this.openFiles];
23674
23678
  this.unlinked = new UnlinkedKeeper(
23675
23679
  fs,
@@ -25330,6 +25334,10 @@ var Launcher = class {
25330
25334
  this.writers ??= this.writerStack();
25331
25335
  return this.writers;
25332
25336
  }
25337
+ rewritten(paths) {
25338
+ for (const nodes of this.openFiles) for (const path of paths) nodes.rewritten(path);
25339
+ this.changes.publish(...paths);
25340
+ }
25333
25341
  async flushOpen() {
25334
25342
  for (const nodes of this.openFiles) await nodes.flush("/").catch(() => void 0);
25335
25343
  }