@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.
@@ -7245,7 +7245,7 @@ var KERNEL_VERSION, OS_RELEASE;
7245
7245
  var init_version = __esm({
7246
7246
  "src/version.ts"() {
7247
7247
  "use strict";
7248
- KERNEL_VERSION = true ? "1.158.0" : "0.0.0-dev";
7248
+ KERNEL_VERSION = true ? "1.158.1" : "0.0.0-dev";
7249
7249
  OS_RELEASE = "6.0.0-slicc";
7250
7250
  }
7251
7251
  });
package/dist/node.js CHANGED
@@ -3588,7 +3588,7 @@ function satisfies(version, range2) {
3588
3588
  }
3589
3589
 
3590
3590
  // src/version.ts
3591
- var KERNEL_VERSION = true ? "1.158.0" : "0.0.0-dev";
3591
+ var KERNEL_VERSION = true ? "1.158.1" : "0.0.0-dev";
3592
3592
  var OS_RELEASE = "6.0.0-slicc";
3593
3593
  function procVersion() {
3594
3594
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -8068,6 +8068,7 @@ function replyStream(reply) {
8068
8068
  }
8069
8069
  });
8070
8070
  }
8071
+ var HELD_MAX = 16;
8071
8072
  var Throttle = class {
8072
8073
  window = 0;
8073
8074
  count = 0;
@@ -8083,7 +8084,8 @@ var Throttle = class {
8083
8084
  var EmbedderChannel = class {
8084
8085
  access;
8085
8086
  owner;
8086
- caller;
8087
+ current;
8088
+ held = [];
8087
8089
  broker;
8088
8090
  header = new Uint8Array(0);
8089
8091
  body;
@@ -8099,12 +8101,24 @@ var EmbedderChannel = class {
8099
8101
  constructor(broker, access2, caller) {
8100
8102
  this.broker = broker;
8101
8103
  this.access = access2;
8102
- this.caller = caller;
8104
+ this.current = caller;
8103
8105
  this.owner = caller.pid;
8104
8106
  }
8105
8107
  get dispatched() {
8106
8108
  return this.body !== void 0;
8107
8109
  }
8110
+ get caller() {
8111
+ return this.current;
8112
+ }
8113
+ set caller(caller) {
8114
+ this.current = caller;
8115
+ const held = this.held;
8116
+ this.held = [];
8117
+ for (const line of held) this.tell(line);
8118
+ }
8119
+ tell(line) {
8120
+ if (!this.current.progress(line) && this.held.length < HELD_MAX) this.held.push(line);
8121
+ }
8108
8122
  fail(err) {
8109
8123
  this.failure ??= embedderFailure(err);
8110
8124
  return this.failure;
@@ -8121,7 +8135,7 @@ var EmbedderChannel = class {
8121
8135
  this.body = body;
8122
8136
  const prefix = this.caller.name;
8123
8137
  const progress = (line) => {
8124
- if (this.throttle.allow(Date.now())) this.caller.progress(`${prefix}: ${lineOf2(line)}`);
8138
+ if (this.throttle.allow(Date.now())) this.tell(`${prefix}: ${lineOf2(line)}`);
8125
8139
  };
8126
8140
  const asked = Promise.resolve().then(
8127
8141
  () => hook.handle({
@@ -21193,7 +21207,11 @@ var WasmProcess = class {
21193
21207
  client: session.client,
21194
21208
  tags: this.options.embedder?.tagsOf(this.pid),
21195
21209
  name: name2,
21196
- progress: (line) => void this.complainLine(line),
21210
+ progress: (line) => {
21211
+ if (!this.fds.has(2)) return false;
21212
+ void this.complainLine(line);
21213
+ return true;
21214
+ },
21197
21215
  closing: () => AbortSignal.any([this.interrupt.signal, this.gone.signal])
21198
21216
  };
21199
21217
  }
@@ -24168,7 +24186,7 @@ function enableDnsStub(net, stub) {
24168
24186
 
24169
24187
  // src/kernel/net/redirect-hops.ts
24170
24188
  var HELD_MS = 3e4;
24171
- var HELD_MAX = 64;
24189
+ var HELD_MAX2 = 64;
24172
24190
  var HELD_PER_OWNER = 8;
24173
24191
  var MATCHED = ["range", "if-none-match", "if-modified-since", "if-range", "accept-encoding"];
24174
24192
  var KERNEL = -1;
@@ -24214,7 +24232,7 @@ function replayingHops(inner, heldMs = HELD_MS) {
24214
24232
  drop(key);
24215
24233
  const mine = [...held.keys()].filter((k) => held.get(k)?.owner === chain2.owner);
24216
24234
  if (mine.length >= HELD_PER_OWNER) drop(mine[0]);
24217
- if (held.size >= HELD_MAX) drop(held.keys().next().value);
24235
+ if (held.size >= HELD_MAX2) drop(held.keys().next().value);
24218
24236
  const timer = setTimeout(() => drop(key), heldMs);
24219
24237
  timer.unref?.();
24220
24238
  held.set(key, { ...chain2, timer });