@ai-ecoverse/slicc-kernel 1.163.0 → 1.164.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/dist/node.js CHANGED
@@ -3677,7 +3677,7 @@ function satisfies(version, range2) {
3677
3677
  }
3678
3678
 
3679
3679
  // src/version.ts
3680
- var KERNEL_VERSION = true ? "1.163.0" : "0.0.0-dev";
3680
+ var KERNEL_VERSION = true ? "1.164.0" : "0.0.0-dev";
3681
3681
  var OS_RELEASE = "6.0.0-slicc";
3682
3682
  function procVersion() {
3683
3683
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -9070,6 +9070,11 @@ var HeldSet = class extends Set {
9070
9070
  async bindIds(id2) {
9071
9071
  for (const holds2 of [...this]) await holds2.bindIds(id2);
9072
9072
  }
9073
+ heldIds() {
9074
+ const out = /* @__PURE__ */ new Map();
9075
+ for (const holds2 of this) for (const [path, fid] of holds2.heldIds()) out.set(path, fid);
9076
+ return [...out];
9077
+ }
9073
9078
  delete(holds2) {
9074
9079
  const removed = super.delete(holds2);
9075
9080
  for (const path of /* @__PURE__ */ new Set([...holds2.keys(), ...holds2.opens.keys()])) this.idle(path);
@@ -9136,6 +9141,14 @@ var HeldPaths = class extends Map {
9136
9141
  this.bound.set(handle, { ...bound3, fid });
9137
9142
  }
9138
9143
  }
9144
+ heldIds() {
9145
+ const out = [];
9146
+ for (const [handle, key] of this.handles) {
9147
+ if (this.keptHandles.has(handle)) continue;
9148
+ out.push([key, this.bound.get(handle)?.fid]);
9149
+ }
9150
+ return out;
9151
+ }
9139
9152
  trust(handle, doubt) {
9140
9153
  if (this.doubted.get(handle) === doubt) this.doubted.delete(handle);
9141
9154
  }
@@ -32611,6 +32624,10 @@ var Launcher = class {
32611
32624
  for (const [holds2, ids] of keeping) holds2.keepBound(ids, path, file);
32612
32625
  void this.rootFs.announceHolds?.([], [path, hidden], false);
32613
32626
  }
32627
+ announceHeld() {
32628
+ const held = this.held.heldIds().filter(([path]) => this.mounts.locate(path) === void 0);
32629
+ return held.length === 0 ? void 0 : this.rootFs.announceHolds?.(held, [], false);
32630
+ }
32614
32631
  rootFileId(path) {
32615
32632
  return this.mounts.locate(path) === void 0 ? this.rootFs.bindId?.(path) : void 0;
32616
32633
  }
@@ -32621,7 +32638,7 @@ var Launcher = class {
32621
32638
  this.changes.flush();
32622
32639
  this.changes.foreign(crowded);
32623
32640
  if (crowded) {
32624
- void this.held?.bindIds((path) => this.rootFileId(path));
32641
+ void this.held?.bindIds((path) => this.rootFileId(path)).then(() => this.announceHeld());
32625
32642
  for (const nodes of this.openFiles) nodes.shared();
32626
32643
  }
32627
32644
  });