@ai-ecoverse/slicc-kernel 1.158.0 → 1.158.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.
@@ -8112,7 +8112,7 @@ function satisfies(version, range2) {
8112
8112
  }
8113
8113
 
8114
8114
  // src/version.ts
8115
- var KERNEL_VERSION = true ? "1.158.0" : "0.0.0-dev";
8115
+ var KERNEL_VERSION = true ? "1.158.1" : "0.0.0-dev";
8116
8116
  var OS_RELEASE = "6.0.0-slicc";
8117
8117
  function procVersion() {
8118
8118
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -12022,6 +12022,7 @@ function replyStream(reply) {
12022
12022
  }
12023
12023
  });
12024
12024
  }
12025
+ var HELD_MAX = 16;
12025
12026
  var Throttle = class {
12026
12027
  window = 0;
12027
12028
  count = 0;
@@ -12037,7 +12038,8 @@ var Throttle = class {
12037
12038
  var EmbedderChannel = class {
12038
12039
  access;
12039
12040
  owner;
12040
- caller;
12041
+ current;
12042
+ held = [];
12041
12043
  broker;
12042
12044
  header = new Uint8Array(0);
12043
12045
  body;
@@ -12053,12 +12055,24 @@ var EmbedderChannel = class {
12053
12055
  constructor(broker, access2, caller) {
12054
12056
  this.broker = broker;
12055
12057
  this.access = access2;
12056
- this.caller = caller;
12058
+ this.current = caller;
12057
12059
  this.owner = caller.pid;
12058
12060
  }
12059
12061
  get dispatched() {
12060
12062
  return this.body !== void 0;
12061
12063
  }
12064
+ get caller() {
12065
+ return this.current;
12066
+ }
12067
+ set caller(caller) {
12068
+ this.current = caller;
12069
+ const held = this.held;
12070
+ this.held = [];
12071
+ for (const line of held) this.tell(line);
12072
+ }
12073
+ tell(line) {
12074
+ if (!this.current.progress(line) && this.held.length < HELD_MAX) this.held.push(line);
12075
+ }
12062
12076
  fail(err) {
12063
12077
  this.failure ??= embedderFailure(err);
12064
12078
  return this.failure;
@@ -12075,7 +12089,7 @@ var EmbedderChannel = class {
12075
12089
  this.body = body;
12076
12090
  const prefix = this.caller.name;
12077
12091
  const progress = (line) => {
12078
- if (this.throttle.allow(Date.now())) this.caller.progress(`${prefix}: ${lineOf2(line)}`);
12092
+ if (this.throttle.allow(Date.now())) this.tell(`${prefix}: ${lineOf2(line)}`);
12079
12093
  };
12080
12094
  const asked = Promise.resolve().then(
12081
12095
  () => hook.handle({
@@ -25277,7 +25291,11 @@ var WasmProcess = class {
25277
25291
  client: session.client,
25278
25292
  tags: this.options.embedder?.tagsOf(this.pid),
25279
25293
  name: name2,
25280
- progress: (line) => void this.complainLine(line),
25294
+ progress: (line) => {
25295
+ if (!this.fds.has(2)) return false;
25296
+ void this.complainLine(line);
25297
+ return true;
25298
+ },
25281
25299
  closing: () => AbortSignal.any([this.interrupt.signal, this.gone.signal])
25282
25300
  };
25283
25301
  }
@@ -27987,7 +28005,7 @@ function enableDnsStub(net, stub) {
27987
28005
 
27988
28006
  // src/kernel/net/redirect-hops.ts
27989
28007
  var HELD_MS = 3e4;
27990
- var HELD_MAX = 64;
28008
+ var HELD_MAX2 = 64;
27991
28009
  var HELD_PER_OWNER = 8;
27992
28010
  var MATCHED = ["range", "if-none-match", "if-modified-since", "if-range", "accept-encoding"];
27993
28011
  var KERNEL = -1;
@@ -28033,7 +28051,7 @@ function replayingHops(inner, heldMs = HELD_MS) {
28033
28051
  drop(key);
28034
28052
  const mine = [...held.keys()].filter((k) => held.get(k)?.owner === chain2.owner);
28035
28053
  if (mine.length >= HELD_PER_OWNER) drop(mine[0]);
28036
- if (held.size >= HELD_MAX) drop(held.keys().next().value);
28054
+ if (held.size >= HELD_MAX2) drop(held.keys().next().value);
28037
28055
  const timer = setTimeout(() => drop(key), heldMs);
28038
28056
  timer.unref?.();
28039
28057
  held.set(key, { ...chain2, timer });