@ai-ecoverse/slicc-kernel 1.140.6 → 1.141.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.
@@ -7128,7 +7128,7 @@ function satisfies(version, range2) {
7128
7128
  }
7129
7129
 
7130
7130
  // src/version.ts
7131
- var KERNEL_VERSION = true ? "1.140.6" : "0.0.0-dev";
7131
+ var KERNEL_VERSION = true ? "1.141.1" : "0.0.0-dev";
7132
7132
  var OS_RELEASE = "6.0.0-slicc";
7133
7133
  function procVersion() {
7134
7134
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -8444,6 +8444,8 @@ var CronService = class {
8444
8444
  }
8445
8445
  }
8446
8446
  async pass() {
8447
+ if (this.wake.signal.aborted) this.wake = new AbortController();
8448
+ const wake = this.wake;
8447
8449
  let until;
8448
8450
  try {
8449
8451
  until = await this.tick();
@@ -8452,8 +8454,7 @@ var CronService = class {
8452
8454
  until = this.clock.now() + WAKE_MS;
8453
8455
  }
8454
8456
  if (this.stopping.signal.aborted) return;
8455
- if (this.wake.signal.aborted) this.wake = new AbortController();
8456
- await this.clock.sleep(until, this.wake.signal);
8457
+ await this.clock.sleep(until, wake.signal);
8457
8458
  }
8458
8459
  async provision() {
8459
8460
  const { fs, owners } = this.host;
@@ -20103,8 +20104,9 @@ var SessionWriter = class {
20103
20104
  return this.proven;
20104
20105
  }
20105
20106
  async mayTouch() {
20106
- if (this.s.verified) return true;
20107
- return (await this.proof("pg"))?.anchor !== void 0;
20107
+ if (this.s.verified) return { touch: true };
20108
+ const proof = await this.proof("pg");
20109
+ return { touch: proof?.anchor !== void 0, binding: proof?.binding };
20108
20110
  }
20109
20111
  async prove(protocol) {
20110
20112
  const s = this.s;
@@ -20118,10 +20120,13 @@ var SessionWriter = class {
20118
20120
  exit: s.exit
20119
20121
  });
20120
20122
  const anchor = found ? await s.anchoring(found) : void 0;
20121
- if (anchor) return { anchor };
20123
+ if (anchor) return this.anchored(anchor);
20122
20124
  }
20123
20125
  return s.verified ? {} : void 0;
20124
20126
  }
20127
+ async anchored(anchor) {
20128
+ return { anchor, binding: await this.s.anchoredBinding?.() };
20129
+ }
20125
20130
  async ask(protocol, position, extra) {
20126
20131
  const s = this.s;
20127
20132
  const proof = await this.proof(protocol);
@@ -20338,7 +20343,11 @@ function sealedConn(conn, s) {
20338
20343
  for (; ; ) {
20339
20344
  const bytes = await conn.read();
20340
20345
  if (!bytes) return bytes;
20341
- if (writer?.sawPg && pg.touch === void 0) pg.touch = await writer.mayTouch();
20346
+ if (writer?.sawPg && pg.touch === void 0) {
20347
+ const may = await writer.mayTouch();
20348
+ pg.touch = may.touch;
20349
+ pg.binding ??= may.binding;
20350
+ }
20342
20351
  const out = writer?.sawPg ? pg.filter(bytes) : bytes;
20343
20352
  if (pg.failed) {
20344
20353
  conn.close();
@@ -20589,7 +20598,8 @@ function anchoringOf(seal, info, servername) {
20589
20598
  const engine = seal.engine;
20590
20599
  if (!engine?.chainVerify || isIP2(servername) || info.peerCertificates.length === 0) return {};
20591
20600
  return {
20592
- anchoring: (found) => anchorFor(engine, info.peerCertificates, servername, found)
20601
+ anchoring: (found) => anchorFor(engine, info.peerCertificates, servername, found),
20602
+ anchoredBinding: () => endPointBinding(info.peerCertificates[0])
20593
20603
  };
20594
20604
  }
20595
20605
  function sealing(seal, raw2, info, servername) {