@ai-ecoverse/slicc-kernel 1.136.0 → 1.136.2

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.
@@ -6699,7 +6699,7 @@ var KERNEL_VERSION, OS_RELEASE;
6699
6699
  var init_version = __esm({
6700
6700
  "src/version.ts"() {
6701
6701
  "use strict";
6702
- KERNEL_VERSION = true ? "1.136.0" : "0.0.0-dev";
6702
+ KERNEL_VERSION = true ? "1.136.2" : "0.0.0-dev";
6703
6703
  OS_RELEASE = "6.0.0-slicc";
6704
6704
  }
6705
6705
  });
package/dist/node.js CHANGED
@@ -7486,7 +7486,7 @@ function satisfies(version, range2) {
7486
7486
  }
7487
7487
 
7488
7488
  // src/version.ts
7489
- var KERNEL_VERSION = true ? "1.136.0" : "0.0.0-dev";
7489
+ var KERNEL_VERSION = true ? "1.136.2" : "0.0.0-dev";
7490
7490
  var OS_RELEASE = "6.0.0-slicc";
7491
7491
  function procVersion() {
7492
7492
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -19956,7 +19956,20 @@ var KEY_PARSE_RANGES = [
19956
19956
  [-28671, -24576],
19957
19957
  [-127, -96]
19958
19958
  ];
19959
- var keyParse = (code) => code !== -15360 && KEY_PARSE_RANGES.some(([lo, hi]) => code >= lo && code <= hi);
19959
+ var BEFORE_DECRYPT = /* @__PURE__ */ new Set([
19960
+ -15360,
19961
+ -15488,
19962
+ -16256,
19963
+ -14720,
19964
+ -4480,
19965
+ -4608,
19966
+ -4736,
19967
+ -5120,
19968
+ -24704,
19969
+ -24960,
19970
+ -106
19971
+ ]);
19972
+ var keyParse = (code) => !BEFORE_DECRYPT.has(code) && KEY_PARSE_RANGES.some(([lo, hi]) => code >= lo && code <= hi);
19960
19973
  function keyRefused(err, locked) {
19961
19974
  const raw2 = err instanceof TlsError ? err.code : 0;
19962
19975
  const code = locked && keyParse(raw2) ? -15232 : raw2;
@@ -27795,11 +27808,12 @@ var Launcher = class {
27795
27808
  asked: named
27796
27809
  };
27797
27810
  }
27798
- async plan(file, argv, cwd, scope, argv0) {
27811
+ async plan(file, argv, cwd, scope, argv0, catalogOnly = false) {
27799
27812
  const found = await this.resolve(file, argv[0] ?? file, cwd, scope);
27800
27813
  const named = typeof argv0 === "string" && found && !found.fixed;
27801
27814
  const direct = named ? { ...found, argv0 } : found;
27802
27815
  if (direct) return { target: direct, args: [...direct.prefix ?? [], ...argv.slice(1)] };
27816
+ if (catalogOnly && !await this.scriptCommand(file, cwd, scope)) return void 0;
27803
27817
  const script = await this.interpreted(file, argv, cwd, scope);
27804
27818
  return script && { ...script, script: true };
27805
27819
  }
@@ -27838,16 +27852,12 @@ var Launcher = class {
27838
27852
  }
27839
27853
  async planOrSearch(req, ctx) {
27840
27854
  const bare = !req.file.includes("/") && !COMMAND2.test(req.file);
27841
- try {
27842
- return await this.planOne(req, ctx);
27843
- } catch (err) {
27844
- const code = codeOf8(err);
27845
- const searched = bare && req.search !== false && (code === "ENOENT" || code === "ENOEXEC");
27846
- if (!searched || await this.commandAt(req.file, ctx.scope)) throw err;
27855
+ if (bare && req.search !== false && !await this.commandAt(req.file, ctx.scope)) {
27847
27856
  const found = await this.onPath(req, ctx);
27848
27857
  if (found) return found;
27849
- throw err;
27858
+ throw new SpawnError("ENOENT");
27850
27859
  }
27860
+ return this.planOne(req, ctx, bare && req.search !== false);
27851
27861
  }
27852
27862
  async onPath(req, ctx) {
27853
27863
  const path = req.env.PATH;
@@ -27866,15 +27876,15 @@ var Launcher = class {
27866
27876
  if (denied2) throw new SpawnError("EACCES");
27867
27877
  return void 0;
27868
27878
  }
27869
- async planOne(req, { ppid, cred, scope }) {
27879
+ async planOne(req, { ppid, cred, scope }, catalogOnly = false) {
27870
27880
  const refused3 = (err) => {
27871
27881
  throw codeOf8(err) === "EACCES" ? new SpawnError("EACCES") : err;
27872
27882
  };
27873
27883
  const file = await this.execFile(req.file, req.cwd, this.execGuard(cred, ppid)).catch(refused3);
27874
- const planned = await this.plan(file, req.argv, req.cwd, scope, req.argv0);
27884
+ const planned = await this.plan(file, req.argv, req.cwd, scope, req.argv0, catalogOnly);
27875
27885
  await this.mayExec(cred, { ...req, file, pid: ppid }, planned).catch(refused3);
27876
27886
  if (planned) return planned;
27877
- throw new SpawnError(await this.unrunnable(file, req.cwd, scope));
27887
+ throw new SpawnError(catalogOnly ? "ENOENT" : await this.unrunnable(file, req.cwd, scope));
27878
27888
  }
27879
27889
  async enterable(g, cwd) {
27880
27890
  if (!g) return;