@ai-ecoverse/slicc-kernel 1.147.10 → 1.148.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
@@ -3305,7 +3305,7 @@ function satisfies(version, range2) {
3305
3305
  }
3306
3306
 
3307
3307
  // src/version.ts
3308
- var KERNEL_VERSION = true ? "1.147.10" : "0.0.0-dev";
3308
+ var KERNEL_VERSION = true ? "1.148.0" : "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
@@ -9489,6 +9489,7 @@ function statJson(s) {
9489
9489
  atimeMs: s.atime.getTime(),
9490
9490
  ctimeMs: s.ctime.getTime(),
9491
9491
  ino: s.ino,
9492
+ ...s.fid !== void 0 ? { fid: s.fid } : {},
9492
9493
  ...s.nlink !== void 0 ? { nlink: s.nlink } : {},
9493
9494
  ...s.dev !== void 0 ? { dev: s.dev } : {},
9494
9495
  ...s.readonly ? { readonly: true } : {},
@@ -23588,6 +23589,19 @@ var OpfsFs = class {
23588
23589
  for (const path of paths) this.forget(path);
23589
23590
  this.channel?.postMessage(paths);
23590
23591
  }
23592
+ async fileId(path) {
23593
+ const found = await this.locate(path, true);
23594
+ const [entry] = await this.meta.get([found.path]);
23595
+ if (entry?.fid !== void 0) return entry.fid;
23596
+ const fid = crypto.randomUUID();
23597
+ await this.meta.update(found.path, (now) => ({
23598
+ ...occupied(now),
23599
+ path: found.path,
23600
+ fid: now?.fid ?? fid
23601
+ }));
23602
+ const [stored] = await this.meta.get([found.path]);
23603
+ return stored?.fid ?? fid;
23604
+ }
23591
23605
  heldUnder = () => [];
23592
23606
  heldBy(held) {
23593
23607
  this.heldUnder = held;
@@ -24185,6 +24199,7 @@ var OpfsFs = class {
24185
24199
  atime: new Date(meta?.atimeMs ?? mtime),
24186
24200
  ctime: new Date(Math.max(touched ?? meta?.ctimeMs ?? mtime, modified)),
24187
24201
  ino: meta?.ino ?? inodeOf(path),
24202
+ ...meta?.fid !== void 0 ? { fid: meta.fid } : {},
24188
24203
  ...this.ranged && !directory ? { ranged: true } : {}
24189
24204
  };
24190
24205
  }
@@ -29178,7 +29193,9 @@ var Launcher = class {
29178
29193
  ];
29179
29194
  if (after.exeId === void 0) return gone;
29180
29195
  return this.reread(target, read).then(
29181
- (again) => id2().then((last) => [again, last]),
29196
+ (again) => id2().then(
29197
+ (last) => [again, last.exeId === after.exeId ? last : gone[1]]
29198
+ ),
29182
29199
  () => gone
29183
29200
  );
29184
29201
  }
@@ -29196,8 +29213,13 @@ var Launcher = class {
29196
29213
  if (target.abi !== "wasi" || (target.copy ?? target.glue) !== target.wasm) {
29197
29214
  return Promise.resolve({});
29198
29215
  }
29216
+ const assign = this.mounts.locate(target.wasm) === void 0 ? this.rootFs.fileId : void 0;
29199
29217
  return this.base.stat(target.wasm).then(
29200
- (st) => exeIdOf(fileIdentity(st.ino, st.mtime.getTime())),
29218
+ async (st) => {
29219
+ const fid = st.fid ?? await assign?.call(this.rootFs, target.wasm);
29220
+ if (fid === void 0) return exeIdOf(fileIdentity(st.ino, st.mtime.getTime()));
29221
+ return { exeId: `fid:${fid}:${st.mtime.getTime()}` };
29222
+ },
29201
29223
  () => ({})
29202
29224
  );
29203
29225
  }