@ai-ecoverse/slicc-kernel 1.156.0 → 1.157.0

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.
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.156.0" : "0.0.0-dev";
3591
+ var KERNEL_VERSION = true ? "1.157.0" : "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
@@ -2964,7 +2964,7 @@ var KERNEL_VERSION, OS_RELEASE;
2964
2964
  var init_version = __esm({
2965
2965
  "src/version.ts"() {
2966
2966
  "use strict";
2967
- KERNEL_VERSION = true ? "1.156.0" : "0.0.0-dev";
2967
+ KERNEL_VERSION = true ? "1.157.0" : "0.0.0-dev";
2968
2968
  OS_RELEASE = "6.0.0-slicc";
2969
2969
  }
2970
2970
  });
@@ -18658,6 +18658,14 @@ function measured(measure) {
18658
18658
  }
18659
18659
  return out;
18660
18660
  }
18661
+ function scriptRunner(run) {
18662
+ return (source, options = {}) => {
18663
+ if (typeof source !== "string") throw new TypeError("runScript needs a source string");
18664
+ const filename = options.filename ?? "[eval]";
18665
+ if (typeof filename !== "string") throw new TypeError("runScript needs a filename string");
18666
+ return run?.(source, filename);
18667
+ };
18668
+ }
18661
18669
  function hostExtras(o) {
18662
18670
  return {
18663
18671
  memory: () => measured(o.memory),
@@ -18743,7 +18751,8 @@ function createContext(o) {
18743
18751
  kill: killer({ self: o.pid, kernel, syncKernel, lane, writes, modes: terminal.modes }),
18744
18752
  cred: () => syncKernel.json({ op: "proc-cred" }),
18745
18753
  umask: (mask) => syncKernel.json(umaskRequest(mask)),
18746
- setcred: setcredOn(syncKernel)
18754
+ setcred: setcredOn(syncKernel),
18755
+ runScript: scriptRunner(o.runScript)
18747
18756
  };
18748
18757
  const io = { read: read2, send: writeAll, close: (fd) => ctx.close(fd) };
18749
18758
  const defaults = { env: o.env, cwd: o.cwd, signal: signalNumber };
@@ -19217,6 +19226,7 @@ async function runJs(init, port2, deps, thread) {
19217
19226
  thread: threadContext(port2, thread),
19218
19227
  memory: deps.memory,
19219
19228
  asyncContext: deps.asyncContext,
19229
+ runScript: deps.runScript,
19220
19230
  ...thread?.owned ? { owned: thread.owned } : {},
19221
19231
  held: init.held,
19222
19232
  failed: () => failedWith