@ai-ecoverse/slicc-kernel 1.196.36 → 1.196.38

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.
@@ -9440,7 +9440,7 @@ var init_version = __esm({
9440
9440
  "src/version.ts"() {
9441
9441
  "use strict";
9442
9442
  init_captured_globals();
9443
- KERNEL_VERSION = true ? "1.196.36" : "0.0.0-dev";
9443
+ KERNEL_VERSION = true ? "1.196.38" : "0.0.0-dev";
9444
9444
  OS_RELEASE = "6.0.0-slicc";
9445
9445
  }
9446
9446
  });
@@ -9439,7 +9439,7 @@ var init_version = __esm({
9439
9439
  "src/version.ts"() {
9440
9440
  "use strict";
9441
9441
  init_captured_globals();
9442
- KERNEL_VERSION = true ? "1.196.36" : "0.0.0-dev";
9442
+ KERNEL_VERSION = true ? "1.196.38" : "0.0.0-dev";
9443
9443
  OS_RELEASE = "6.0.0-slicc";
9444
9444
  }
9445
9445
  });
package/dist/node.js CHANGED
@@ -4396,23 +4396,23 @@ var KernelSide = class {
4396
4396
  ...cwds ? { cwds } : {}
4397
4397
  };
4398
4398
  }
4399
- applyWords(words3) {
4400
- if (!words3 || typeof words3.n !== "number" || words3.n <= this.words) return;
4401
- this.words = words3.n;
4402
- while (this.history.length > 0 && (this.history[0]?.seq ?? 0) <= words3.seen) {
4399
+ applyWords(words2) {
4400
+ if (!words2 || typeof words2.n !== "number" || words2.n <= this.words) return;
4401
+ this.words = words2.n;
4402
+ while (this.history.length > 0 && (this.history[0]?.seq ?? 0) <= words2.seen) {
4403
4403
  this.history.shift();
4404
4404
  }
4405
- let signals = words3.signals | this.raised.signals;
4406
- let timers = words3.timers | this.raised.timers;
4405
+ let signals = words2.signals | this.raised.signals;
4406
+ let timers = words2.timers | this.raised.timers;
4407
4407
  for (const entry of this.history) {
4408
4408
  signals |= entry.signals;
4409
4409
  timers |= entry.timers;
4410
4410
  }
4411
4411
  Atomics.store(this.header, SAB_I_SIGNALS, signals);
4412
4412
  Atomics.store(this.header, SAB_I_TIMERS, timers);
4413
- storeBlocked(this.header, words3.blocked);
4414
- Atomics.store(this.header, SAB_I_MEMORY, words3.memory);
4415
- Atomics.store(this.clock, CLOCK_IDLE, BigInt(words3.idle));
4413
+ storeBlocked(this.header, words2.blocked);
4414
+ Atomics.store(this.header, SAB_I_MEMORY, words2.memory);
4415
+ Atomics.store(this.clock, CLOCK_IDLE, BigInt(words2.idle));
4416
4416
  }
4417
4417
  keep(bytes) {
4418
4418
  const id2 = ++this.nextPart;
@@ -7819,7 +7819,7 @@ function satisfies(version, range2) {
7819
7819
  }
7820
7820
 
7821
7821
  // src/version.ts
7822
- var KERNEL_VERSION = true ? "1.196.36" : "0.0.0-dev";
7822
+ var KERNEL_VERSION = true ? "1.196.38" : "0.0.0-dev";
7823
7823
  var OS_RELEASE = "6.0.0-slicc";
7824
7824
  function procVersion() {
7825
7825
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -7968,12 +7968,22 @@ async function withPackagePaths(fs, pkg, command, provenance) {
7968
7968
  if (!command.env) return command;
7969
7969
  const env = {};
7970
7970
  const envPaths = /* @__PURE__ */ new Set();
7971
+ const missingEnv = {};
7971
7972
  for (const [key, value2] of Object.entries(command.env)) {
7972
7973
  const path = !value2.startsWith("/") && value2.includes("/") && inside(pkg, value2);
7973
- if (path && provenance) envPaths.add(path);
7974
- env[key] = path && await fs.exists(path) ? path : value2;
7974
+ const present4 = path && await fs.exists(path);
7975
+ if (path && provenance) {
7976
+ envPaths.add(path);
7977
+ if (!present4) missingEnv[key] = { pkg, value: value2 };
7978
+ }
7979
+ env[key] = present4 ? path : value2;
7975
7980
  }
7976
- return { ...command, env, ...envPaths.size ? { envPaths: [...envPaths] } : {} };
7981
+ return {
7982
+ ...command,
7983
+ env,
7984
+ ...envPaths.size ? { envPaths: [...envPaths] } : {},
7985
+ ...Object.keys(missingEnv).length ? { missingEnv } : {}
7986
+ };
7977
7987
  }
7978
7988
  async function packages(fs, modules) {
7979
7989
  const names2 = await fs.readdir(modules).catch(() => []);
@@ -8754,27 +8764,27 @@ function hashId(text) {
8754
8764
  return hex4(a) + hex4(b);
8755
8765
  }
8756
8766
  function split(text, count3) {
8757
- const words3 = [];
8767
+ const words2 = [];
8758
8768
  let rest2 = text;
8759
8769
  for (let i = 0; i < count3; i++) {
8760
8770
  const match = /^(\S+)\s+/.exec(rest2);
8761
8771
  if (!match) return void 0;
8762
- words3.push(match[1]);
8772
+ words2.push(match[1]);
8763
8773
  rest2 = rest2.slice(match[0].length);
8764
8774
  }
8765
- return [words3, rest2.trim()];
8775
+ return [words2, rest2.trim()];
8766
8776
  }
8767
8777
  function jobOf(content, pending, ctx, env) {
8768
8778
  const fields2 = content.startsWith("@") ? 1 : 5;
8769
8779
  const parts2 = split(content, fields2 + (ctx.system ? 1 : 0));
8770
8780
  if (!parts2 || parts2[1] === "") throw new Error("no command");
8771
- const [words3, command] = parts2;
8772
- const schedule = words3.slice(0, fields2).join(" ");
8781
+ const [words2, command] = parts2;
8782
+ const schedule = words2.slice(0, fields2).join(" ");
8773
8783
  const when = parseWhen(schedule);
8774
8784
  const zone = env.CRON_TZ;
8775
8785
  if (zone && !when.reboot && canonicalZone(zone) === void 0)
8776
8786
  throw new Error(`CRON_TZ: unknown time zone "${zone}"`);
8777
- const user = ctx.system ? words3[fields2] : void 0;
8787
+ const user = ctx.system ? words2[fields2] : void 0;
8778
8788
  if (user !== void 0 && !USER_NAME.test(user)) throw new Error(`bad user name ${user}`);
8779
8789
  if (pending !== void 0 && !JOB_NAME.test(pending))
8780
8790
  throw new Error(`bad job name "${pending}"`);
@@ -19537,21 +19547,21 @@ function unescaped2(double) {
19537
19547
  }
19538
19548
  function splitWords(text) {
19539
19549
  const piece = /'([^']*)'|"((?:[^"\\]|\\[\s\S])*)"|\\([\s\S])|([^\s'"\\]+)|(\s+)/y;
19540
- const words3 = [];
19550
+ const words2 = [];
19541
19551
  let word;
19542
19552
  while (piece.lastIndex < text.length) {
19543
19553
  const m = piece.exec(text);
19544
19554
  if (!m) return void 0;
19545
19555
  const [, single, double, escaped, plain3, space] = m;
19546
19556
  if (space !== void 0) {
19547
- if (word !== void 0) words3.push(word);
19557
+ if (word !== void 0) words2.push(word);
19548
19558
  word = void 0;
19549
19559
  continue;
19550
19560
  }
19551
19561
  word = (word ?? "") + (single ?? (double !== void 0 ? unescaped2(double) : escaped ?? plain3));
19552
19562
  }
19553
- if (word !== void 0) words3.push(word);
19554
- return words3;
19563
+ if (word !== void 0) words2.push(word);
19564
+ return words2;
19555
19565
  }
19556
19566
  function shellQuote(word) {
19557
19567
  return PLAIN.test(word) ? word : `'${word.replaceAll("'", `'\\''`)}'`;
@@ -19574,14 +19584,14 @@ function addPlain(word, plain3) {
19574
19584
  }
19575
19585
  function splitPatterns(text) {
19576
19586
  const piece = /'([^']*)'|"((?:[^"\\]|\\[\s\S])*)"|\\([\s\S])|([^\s'"\\]+)|(\s+)/y;
19577
- const words3 = [];
19587
+ const words2 = [];
19578
19588
  let word;
19579
19589
  while (piece.lastIndex < text.length) {
19580
19590
  const m = piece.exec(text);
19581
19591
  if (!m) return void 0;
19582
19592
  const [, single, double, escaped, plain3, space] = m;
19583
19593
  if (space !== void 0) {
19584
- if (word !== void 0) words3.push(word);
19594
+ if (word !== void 0) words2.push(word);
19585
19595
  word = void 0;
19586
19596
  continue;
19587
19597
  }
@@ -19589,8 +19599,8 @@ function splitPatterns(text) {
19589
19599
  if (plain3 !== void 0) addPlain(word, plain3);
19590
19600
  else addPart(word, single ?? (double !== void 0 ? unescaped2(double) : escaped));
19591
19601
  }
19592
- if (word !== void 0) words3.push(word);
19593
- return words3;
19602
+ if (word !== void 0) words2.push(word);
19603
+ return words2;
19594
19604
  }
19595
19605
  var literal = (pattern) => pattern.map((p) => p ?? "*").join("");
19596
19606
  var isAny = (pattern) => pattern?.length === 1 && pattern[0] === null;
@@ -19666,14 +19676,14 @@ function whoError(who) {
19666
19676
  return `expected a user name, %group or ALL first, not ${shown(who)}`;
19667
19677
  }
19668
19678
  function cwdOf(word) {
19669
- const words3 = splitWords(word);
19670
- const path = words3?.length === 1 ? words3[0] : "";
19679
+ const words2 = splitWords(word);
19680
+ const path = words2?.length === 1 ? words2[0] : "";
19671
19681
  return path.startsWith("/") ? normalizePath(path) : "";
19672
19682
  }
19673
19683
  function commandOf2(text, after) {
19674
- const words3 = splitPatterns(text);
19675
- if (words3 === void 0) return "a quote in the command is not closed, or it ends in a \\";
19676
- const [first, ...args] = words3;
19684
+ const words2 = splitPatterns(text);
19685
+ if (words2 === void 0) return "a quote in the command is not closed, or it ends in a \\";
19686
+ const [first, ...args] = words2;
19677
19687
  const path = first ? literal(first) : "";
19678
19688
  if (path === "") return `expected a command after ${after}`;
19679
19689
  if (!path.startsWith("/")) return `expected an absolute command path, not ${shown(path)}`;
@@ -19856,14 +19866,14 @@ function legacyApproval(line, file, rule2) {
19856
19866
  const stdin = rule2.stdin === void 0 ? "" : "Stdin none ";
19857
19867
  const prefix = `NOPASSWD ${rule2.who} (${rule2.target}) ${cwd}${stdin}Cmnd `;
19858
19868
  if (!line.startsWith(prefix)) return rule2;
19859
- const words3 = line.slice(prefix.length).trimEnd();
19869
+ const words2 = line.slice(prefix.length).trimEnd();
19860
19870
  if (cmnd.args === void 0) {
19861
- if (words3 !== quote(cmnd.path)) return rule2;
19871
+ if (words2 !== quote(cmnd.path)) return rule2;
19862
19872
  return { ...rule2, cmnd: { ...cmnd, args: [] }, ...stdin ? {} : { sha256: {} } };
19863
19873
  }
19864
19874
  if (cmnd.args.some((arg) => arg.includes(null))) return rule2;
19865
- const current = rule2.cwd !== void 0 && words3 === formatCommand(cmnd, quote);
19866
- const earliest = !stdin && words3 === [cmnd.path, ...cmnd.args.map(literal)].map(quote).join(" ");
19875
+ const current = rule2.cwd !== void 0 && words2 === formatCommand(cmnd, quote);
19876
+ const earliest = !stdin && words2 === [cmnd.path, ...cmnd.args.map(literal)].map(quote).join(" ");
19867
19877
  return current || earliest ? { ...rule2, sha256: {} } : rule2;
19868
19878
  }
19869
19879
  function kernelLine(m, line, file) {
@@ -21391,8 +21401,8 @@ ${lines3}
21391
21401
  const st = await fs.lstat(path).catch(() => void 0);
21392
21402
  if (st && !await this.trusted(path)) return false;
21393
21403
  const old = st ? await fs.readFile(path) : "";
21394
- const words3 = recordedCommand(argv);
21395
- const line = `NOPASSWD ${self.name} (${target.name}) Cwd ${quoteWord(cwd)} Stdin none ${sha256Text(bound3, routeSha256, chainSha256)}Cmnd ${words3}
21404
+ const words2 = recordedCommand(argv);
21405
+ const line = `NOPASSWD ${self.name} (${target.name}) Cwd ${quoteWord(cwd)} Stdin none ${sha256Text(bound3, routeSha256, chainSha256)}Cmnd ${words2}
21396
21406
  `;
21397
21407
  const text = old === "" || old.endsWith("\n") ? `${old}${line}` : `${old}
21398
21408
  ${line}`;
@@ -22699,8 +22709,8 @@ function ipv6(host) {
22699
22709
  const head = groups(halves[0]);
22700
22710
  const back = halves.length === 2 ? groups(halves[1]) : [];
22701
22711
  if (![...head, ...back].every((g) => /^[0-9A-Fa-f]{1,4}$/.test(g))) return void 0;
22702
- const words3 = [...head, ...back].map((g) => Number.parseInt(g, 16));
22703
- const missing7 = 8 - words3.length - tail2.length;
22712
+ const words2 = [...head, ...back].map((g) => Number.parseInt(g, 16));
22713
+ const missing7 = 8 - words2.length - tail2.length;
22704
22714
  if (halves.length === 2 ? missing7 < 1 : missing7 !== 0) return void 0;
22705
22715
  const all = [
22706
22716
  ...head.map((g) => Number.parseInt(g, 16)),
@@ -28871,21 +28881,26 @@ var PATH_FLAGS = PATH_ONLY | 65536 | 131072;
28871
28881
  var KEYBOARD = /* @__PURE__ */ new Set([SIG.INT, SIG.QUIT, SIG.TSTP]);
28872
28882
  var STUCK_ESCAPES = /* @__PURE__ */ new Set([SIG.INT, SIG.TERM, SIG.QUIT, SIG.HUP]);
28873
28883
  var DEFAULT_UMASK2 = 18;
28874
- function words2(value2) {
28875
- if (!Array.isArray(value2) || !value2.every((w) => typeof w === "string")) {
28876
- throw new KernelError("EINVAL");
28877
- }
28878
- return [...value2];
28879
- }
28880
- var SUDO_ENV_MAX = 4096;
28881
- var SUDO_ENV_BYTES = 1024 * 1024;
28882
- function sudoVariables(value2, term) {
28884
+ var SUDO_VECTOR_MAX = 4096;
28885
+ var SUDO_INPUT_BYTES = 1024 * 1024;
28886
+ function budgetAfterArgs(args) {
28887
+ if (!Array.isArray(args)) throw new KernelError("EINVAL");
28888
+ if (args.length > SUDO_VECTOR_MAX) return -1;
28889
+ let remaining = SUDO_INPUT_BYTES;
28890
+ for (const word of args) {
28891
+ if (typeof word !== "string") throw new KernelError("EINVAL");
28892
+ if (word.length + 1 > remaining) return -1;
28893
+ remaining -= storedSize(word) + 1;
28894
+ if (remaining < 0) return -1;
28895
+ }
28896
+ return remaining;
28897
+ }
28898
+ function sudoVariables(value2, term, budget) {
28883
28899
  const input = typeof value2 === "object" && value2 !== null ? value2 : {};
28884
28900
  const env = /* @__PURE__ */ Object.create(null);
28885
28901
  let count3 = 0;
28886
- let budget = SUDO_ENV_BYTES;
28887
28902
  const fits = (name2, text) => {
28888
- if (++count3 > SUDO_ENV_MAX || name2.length + text.length + 2 > budget) return false;
28903
+ if (++count3 > SUDO_VECTOR_MAX || name2.length + text.length + 2 > budget) return false;
28889
28904
  budget -= storedSize(name2) + storedSize(text) + 2;
28890
28905
  return budget >= 0;
28891
28906
  };
@@ -30934,14 +30949,15 @@ var WasmProcess = class _WasmProcess {
30934
30949
  async sudo(req, cancelled) {
30935
30950
  const { sudo } = this.options;
30936
30951
  if (!sudo) throw new KernelError("ENOSYS");
30937
- const args = words2(req.args);
30952
+ const budget = budgetAfterArgs(req.args);
30953
+ if (budget < 0) return { errno: "E2BIG", error: "sudo: the submitted arguments are too large" };
30938
30954
  const term = typeof req.term === "string" ? req.term : void 0;
30939
- const submitted = sudoVariables(req.env, term);
30955
+ const submitted = sudoVariables(req.env, term, budget);
30940
30956
  if (submitted === void 0)
30941
30957
  return { errno: "E2BIG", error: "sudo: the submitted environment is too large" };
30942
30958
  const call = {
30943
30959
  op: "proc-sudo",
30944
- args,
30960
+ args: [...req.args],
30945
30961
  cwd: typeof req.cwd === "string" && req.cwd.startsWith("/") ? req.cwd : "/",
30946
30962
  ...term !== void 0 ? { term } : {},
30947
30963
  env: submitted
@@ -39280,38 +39296,40 @@ function appendedRoots(given) {
39280
39296
  }
39281
39297
  return [...roots];
39282
39298
  }
39283
- function plainEnv(words3) {
39284
- const next3 = words3[1];
39285
- if (baseName3(words3[0] ?? "") !== "env" || next3 === void 0) return false;
39299
+ function plainEnv(words2) {
39300
+ const next3 = words2[1];
39301
+ if (baseName3(words2[0] ?? "") !== "env" || next3 === void 0) return false;
39286
39302
  return next3 === "-S" || !next3.startsWith("-") && !next3.includes("=");
39287
39303
  }
39288
- function shebangCommand(words3) {
39289
- if (!plainEnv(words3)) {
39290
- const arg2 = words3.slice(1).join(" ");
39291
- return { interp: words3[0], args: arg2 ? [arg2] : [] };
39304
+ function shebangCommand(words2) {
39305
+ if (!plainEnv(words2)) {
39306
+ const arg2 = words2.slice(1).join(" ");
39307
+ return { interp: words2[0], args: arg2 ? [arg2] : [] };
39292
39308
  }
39293
- const split3 = words3[1] === "-S";
39294
- const [interp, ...rest2] = words3.slice(split3 ? 2 : 1);
39309
+ const split3 = words2[1] === "-S";
39310
+ const [interp, ...rest2] = words2.slice(split3 ? 2 : 1);
39295
39311
  const arg = rest2.join(" ");
39296
39312
  return { interp, args: split3 ? rest2 : arg ? [arg] : [] };
39297
39313
  }
39298
39314
  function interpreter(head) {
39299
- const words3 = shebang(head);
39300
- if (!words3) return "node";
39301
- if (baseName3(words3[0]) === "env") words3.shift();
39302
- if (words3[0] === "-S") words3.shift();
39303
- return baseName3(words3[0] ?? "");
39315
+ const words2 = shebang(head);
39316
+ if (!words2) return "node";
39317
+ if (baseName3(words2[0]) === "env") words2.shift();
39318
+ if (words2[0] === "-S") words2.shift();
39319
+ return baseName3(words2[0] ?? "");
39304
39320
  }
39305
39321
  function expandDefaults(defaults2, env) {
39306
39322
  const out = {};
39307
- for (const [key, value2] of Object.entries(defaults2 ?? {})) {
39323
+ for (const [key, entry] of Object.entries(defaults2 ?? {})) {
39308
39324
  let missing7 = false;
39325
+ const value2 = typeof entry === "string" ? entry : entry.value;
39309
39326
  const expanded = value2.replace(ENV_REFERENCE, (_, name2) => {
39310
39327
  const set3 = Object.hasOwn(env, name2) ? env[name2] : void 0;
39311
39328
  if (set3 === void 0) missing7 = true;
39312
39329
  return set3 ?? "";
39313
39330
  });
39314
- if (!missing7) out[key] = expanded;
39331
+ if (missing7) continue;
39332
+ out[key] = typeof entry !== "string" && !expanded.startsWith("/") ? `${entry.pkg}/${expanded.replace(/^\.\//, "")}` : expanded;
39315
39333
  }
39316
39334
  return out;
39317
39335
  }
@@ -39325,7 +39343,7 @@ function targetOf(command, reads) {
39325
39343
  argv0: command.argv0,
39326
39344
  ...command.argv0Fixed ? { fixed: true } : {},
39327
39345
  ...command.args ? { prefix: command.args } : {},
39328
- ...command.env ? { env: command.env } : {},
39346
+ ...command.env ? { env: { ...command.env, ...command.missingEnv } } : {},
39329
39347
  ...command.unset ? { unset: command.unset } : {},
39330
39348
  ...command.imports ? { imports: command.imports } : {},
39331
39349
  ...command.preopenRoot ? { preopenRoot: true } : {},
@@ -39353,7 +39371,7 @@ function withScriptEnv(target, command) {
39353
39371
  if (!command) return target;
39354
39372
  return {
39355
39373
  ...target,
39356
- env: { ...target.env, ...command.env },
39374
+ env: { ...target.env, ...command.env, ...command.missingEnv },
39357
39375
  unset: [
39358
39376
  ...(target.unset ?? []).filter((key) => !Object.hasOwn(command.env ?? {}, key)),
39359
39377
  ...command.unset ?? []
@@ -40238,13 +40256,13 @@ var Launcher = class {
40238
40256
  const named = byPath ? { [script]: this.fs.resolvePath(cwd, file) } : {};
40239
40257
  const head = await this.head(script, who.reads);
40240
40258
  if (!head) return void 0;
40241
- const words3 = await this.interpreterWords(head, script, { ...who, argv: [...argv, file] });
40242
- if (!words3) return void 0;
40243
- const { interp, args } = shebangCommand(words3.words);
40244
- const passed = [...args, command ? script : file, ...words3.kept, ...argv.slice(1)];
40259
+ const words2 = await this.interpreterWords(head, script, { ...who, argv: [...argv, file] });
40260
+ if (!words2) return void 0;
40261
+ const { interp, args } = shebangCommand(words2.words);
40262
+ const passed = [...args, command ? script : file, ...words2.kept, ...argv.slice(1)];
40245
40263
  if (!interp) return void 0;
40246
40264
  who.reads?.operandsFromEnd.set(passed.length - args.length, script);
40247
- who.reads?.interpreters.push([script, ...words3.words, String(words3.kept.length)]);
40265
+ who.reads?.interpreters.push([script, ...words2.words, String(words2.kept.length)]);
40248
40266
  const entry = await this.interpreterFile(interp, cwd, reader, who.pid, who.relative);
40249
40267
  if (!entry) return void 0;
40250
40268
  const { file: walked2, parentHops } = entry;
@@ -40263,7 +40281,7 @@ var Launcher = class {
40263
40281
  const via = [interp, ...inner?.via ?? []];
40264
40282
  const sources = [script, ...inner?.sources ?? []];
40265
40283
  const bins = [...command?.bin ? [script] : [], ...inner?.bins ?? []];
40266
- const chain2 = [...words3.binfmts, ...inner?.binfmts ?? []];
40284
+ const chain2 = [...words2.binfmts, ...inner?.binfmts ?? []];
40267
40285
  return inner && {
40268
40286
  ...inner,
40269
40287
  target: withScriptEnv(inner.target, command),
@@ -40283,7 +40301,7 @@ var Launcher = class {
40283
40301
  walkedVia: [walked2],
40284
40302
  sources: [script],
40285
40303
  ...command?.bin ? { bins: [script] } : {},
40286
- ...words3.binfmts.length > 0 ? { binfmts: words3.binfmts } : {},
40304
+ ...words2.binfmts.length > 0 ? { binfmts: words2.binfmts } : {},
40287
40305
  asked: named
40288
40306
  };
40289
40307
  }
@@ -44124,16 +44142,16 @@ function placeOf(address2) {
44124
44142
  const kind = isIP3(plain3);
44125
44143
  if (kind === 4) return ipv4Place(plain3);
44126
44144
  if (kind !== 6) return void 0;
44127
- const words3 = hextets2(plain3);
44128
- const embedded2 = words3.slice(0, 5).every((w) => w === 0) && (words3[5] === 65535 || words3[5] === 0);
44129
- if (embedded2 && (words3[5] === 65535 || words3[6] !== 0)) return ipv4Place(ipv4Of(words3));
44130
- if (words3.slice(0, 7).every((w) => w === 0) && (words3[7] ?? 0) <= 1) return "loopback";
44131
- if (((words3[0] ?? 0) & 65472) === 65152) return "link-local";
44132
- if (words3.join(":") === METADATA_V6) return "link-local";
44145
+ const words2 = hextets2(plain3);
44146
+ const embedded2 = words2.slice(0, 5).every((w) => w === 0) && (words2[5] === 65535 || words2[5] === 0);
44147
+ if (embedded2 && (words2[5] === 65535 || words2[6] !== 0)) return ipv4Place(ipv4Of(words2));
44148
+ if (words2.slice(0, 7).every((w) => w === 0) && (words2[7] ?? 0) <= 1) return "loopback";
44149
+ if (((words2[0] ?? 0) & 65472) === 65152) return "link-local";
44150
+ if (words2.join(":") === METADATA_V6) return "link-local";
44133
44151
  return void 0;
44134
44152
  }
44135
- function ipv4Of(words3) {
44136
- const [high = 0, low = 0] = words3.slice(6);
44153
+ function ipv4Of(words2) {
44154
+ const [high = 0, low = 0] = words2.slice(6);
44137
44155
  return [high >> 8, high & 255, low >> 8, low & 255].join(".");
44138
44156
  }
44139
44157
  function hextets2(address2) {
@@ -45015,11 +45033,11 @@ function createAsyncTransport(link2, options = {}) {
45015
45033
  const mirrors = new Mirrors();
45016
45034
  const caller = new Caller(link2, options.maxMessageBytes ?? Number.POSITIVE_INFINITY);
45017
45035
  const started = Promise.withResolvers();
45018
- let words3 = 0;
45036
+ let words2 = 0;
45019
45037
  let lastCall = 0;
45020
45038
  let initialised = false;
45021
45039
  let closedBy;
45022
- const current = () => mirrors.words(++words3, options.memory?.());
45040
+ const current = () => mirrors.words(++words2, options.memory?.());
45023
45041
  const begin = async (init) => {
45024
45042
  mirrors.start(init.mirror);
45025
45043
  if (options.maxMessageBytes === void 0 && init.maxMessageBytes !== void 0) {
@@ -45078,15 +45096,15 @@ function createAsyncTransport(link2, options = {}) {
45078
45096
  });
45079
45097
  };
45080
45098
  const issue = async (asked, given, ms, label) => {
45081
- const words4 = current();
45082
- lastCall = words4.n;
45099
+ const words3 = current();
45100
+ lastCall = words3.n;
45083
45101
  const body = caller.staging(asked);
45084
45102
  if (!body) {
45085
45103
  const { req: req2, transfer } = caller.exact(asked, given);
45086
- return send2({ type: ASYNC_SYSCALL, req: req2, words: words4 }, transfer, ms, label);
45104
+ return send2({ type: ASYNC_SYSCALL, req: req2, words: words3 }, transfer, ms, label);
45087
45105
  }
45088
45106
  const { req, staged: staged2 } = await caller.staged(asked, body, ms, label);
45089
- return send2({ type: ASYNC_SYSCALL, req, words: words4, staged: staged2 }, [], ms, label);
45107
+ return send2({ type: ASYNC_SYSCALL, req, words: words3, staged: staged2 }, [], ms, label);
45090
45108
  };
45091
45109
  return {
45092
45110
  init: started.promise,