@ai-ecoverse/slicc-kernel 1.147.8 → 1.147.9

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
@@ -3305,7 +3305,7 @@ function satisfies(version, range2) {
3305
3305
  }
3306
3306
 
3307
3307
  // src/version.ts
3308
- var KERNEL_VERSION = true ? "1.147.8" : "0.0.0-dev";
3308
+ var KERNEL_VERSION = true ? "1.147.9" : "0.0.0-dev";
3309
3309
  var OS_RELEASE = "6.0.0-slicc";
3310
3310
  function procVersion() {
3311
3311
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -23586,6 +23586,19 @@ var OpfsFs = class {
23586
23586
  for (const path of paths) this.forget(path);
23587
23587
  this.channel?.postMessage(paths);
23588
23588
  }
23589
+ heldUnder = () => [];
23590
+ heldBy(held) {
23591
+ this.heldUnder = held;
23592
+ }
23593
+ async pinHeld(dir) {
23594
+ const held = this.heldUnder(dir);
23595
+ if (held.length === 0) return;
23596
+ const known = await this.meta.get(held);
23597
+ const bare = held.filter((_, i) => known[i]?.ino === void 0);
23598
+ for (const p of bare) {
23599
+ await this.meta.update(p, (entry) => ({ ...occupied(entry), path: p, ino: inodeOf(p) }));
23600
+ }
23601
+ }
23589
23602
  remoteChanges(listener) {
23590
23603
  return this.remote?.listen(listener) ?? (() => {
23591
23604
  });
@@ -24716,6 +24729,7 @@ var OpfsFs = class {
24716
24729
  if (targetStat?.isDirectory && (await this.readdir(destination)).length > 0) {
24717
24730
  throw fsError("ENOTEMPTY", to);
24718
24731
  }
24732
+ if (sourceStat.isDirectory) await this.pinHeld(source.path);
24719
24733
  const now = Date.now();
24720
24734
  const moving = await this.movedOwner(source);
24721
24735
  const carry = (entry2) => ({
@@ -28334,6 +28348,9 @@ var Launcher = class {
28334
28348
  this.watchers.heard("rename", change.trees ?? []);
28335
28349
  });
28336
28350
  const holders = [this.held, this.openFiles];
28351
+ options.fs.heldBy?.(
28352
+ (dir) => holders.flatMap((set3) => [...set3].flatMap((holder) => [...holder.held()])).filter((p) => p.startsWith(`${dir}/`) && this.mounts.locate(p) === void 0)
28353
+ );
28337
28354
  this.unlinked = new UnlinkedKeeper(
28338
28355
  fs,
28339
28356
  { [Symbol.iterator]: () => holders.flatMap((set3) => [...set3]).values() },