@ai-ecoverse/slicc-kernel 1.148.0 → 1.148.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.
@@ -7185,7 +7185,7 @@ var KERNEL_VERSION, OS_RELEASE;
7185
7185
  var init_version = __esm({
7186
7186
  "src/version.ts"() {
7187
7187
  "use strict";
7188
- KERNEL_VERSION = true ? "1.148.0" : "0.0.0-dev";
7188
+ KERNEL_VERSION = true ? "1.148.1" : "0.0.0-dev";
7189
7189
  OS_RELEASE = "6.0.0-slicc";
7190
7190
  }
7191
7191
  });
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.148.0" : "0.0.0-dev";
3308
+ var KERNEL_VERSION = true ? "1.148.1" : "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
@@ -21791,6 +21791,9 @@ var RemoteWatch = class {
21791
21791
  await new Promise((resolve2) => setTimeout(resolve2, ANNOUNCE_POLL_MS));
21792
21792
  }
21793
21793
  }
21794
+ legacy() {
21795
+ return [...this.peers].filter((peer) => !this.ackers.has(peer));
21796
+ }
21794
21797
  crowded() {
21795
21798
  return !this.settled || this.peers.size > 0;
21796
21799
  }
@@ -21798,7 +21801,7 @@ var RemoteWatch = class {
21798
21801
  return `${this.name}:${tab}`;
21799
21802
  }
21800
21803
  receive(data) {
21801
- const sender = data.hello ?? data.here;
21804
+ const sender = data.hello ?? data.here ?? (data.paths !== void 0 ? data.tab : void 0);
21802
21805
  if (sender !== void 0 && data.renames) this.ackers.add(sender);
21803
21806
  if (data.hello !== void 0) this.greeted(data.hello);
21804
21807
  if (data.renaming !== void 0 && data.tab !== void 0) this.heard(data);
@@ -21905,7 +21908,7 @@ var RemoteWatch = class {
21905
21908
  announce(paths) {
21906
21909
  this.mine = [...paths];
21907
21910
  const seq2 = ++this.seq;
21908
- this.channel.postMessage({ tab: this.tab, paths: this.mine, seq: seq2 });
21911
+ this.channel.postMessage({ tab: this.tab, paths: this.mine, seq: seq2, renames: true });
21909
21912
  return this.acks(seq2, this.peers);
21910
21913
  }
21911
21914
  renamingTree(rename, cap = RENAME_ACK_MAX_MS) {
@@ -24837,6 +24840,17 @@ var OpfsFs = class {
24837
24840
  }
24838
24841
  async admitted(locks, lock, from, to, place, hooks) {
24839
24842
  const remote = this.remote;
24843
+ const older = remote?.legacy() ?? [];
24844
+ if (older.length > 0) {
24845
+ this.ackBusy++;
24846
+ if (!this.warnedLegacy) {
24847
+ this.warnedLegacy = true;
24848
+ console.warn(
24849
+ `slicc-kernel: renaming ${from} to ${to} gave up (EBUSY): a tab running an older slicc-kernel shares this root and can't be waited for; reload it to rename directories (#1309)`
24850
+ );
24851
+ }
24852
+ throw fsError("EBUSY", from);
24853
+ }
24840
24854
  if (remote && !this.shared() && !await remote.joinedAll(RENAME_ACK_MAX_MS)) {
24841
24855
  this.ackBusy++;
24842
24856
  console.warn(
@@ -24887,6 +24901,7 @@ var OpfsFs = class {
24887
24901
  await run2;
24888
24902
  }
24889
24903
  renameAcks = 0;
24904
+ warnedLegacy = false;
24890
24905
  ackBusy = 0;
24891
24906
  ackMs = [];
24892
24907
  ownLocks = /* @__PURE__ */ new Set();