@ai-ecoverse/slicc-kernel 1.46.1 → 1.47.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.
@@ -2159,9 +2159,9 @@ function trackCloseOnExec(Fs) {
2159
2159
  if (typeof Fs.dupStream === "function") {
2160
2160
  const dupStream = Fs.dupStream.bind(Fs);
2161
2161
  Fs.dupStream = (stream, fd) => {
2162
- const copy = dupStream(stream, fd);
2163
- setCloseOnExec(copy, false);
2164
- return copy;
2162
+ const copy2 = dupStream(stream, fd);
2163
+ setCloseOnExec(copy2, false);
2164
+ return copy2;
2165
2165
  };
2166
2166
  }
2167
2167
  if (typeof Fs.open === "function") {
@@ -2184,9 +2184,9 @@ function cloexecFcntl(fcntl, deps) {
2184
2184
  const mark = marker(deps);
2185
2185
  return (fd, cmd, varargs) => {
2186
2186
  if (cmd === F_DUPFD_CLOEXEC) {
2187
- const copy = fcntl(fd, F_DUPFD, varargs);
2188
- if (copy >= 0) mark(copy, true);
2189
- return copy;
2187
+ const copy2 = fcntl(fd, F_DUPFD, varargs);
2188
+ if (copy2 >= 0) mark(copy2, true);
2189
+ return copy2;
2190
2190
  }
2191
2191
  if (cmd === F_GETFL) {
2192
2192
  const flags = fcntl(fd, cmd, varargs);
@@ -2596,9 +2596,9 @@ function useDevFd(Fs) {
2596
2596
  Fs.open = (path, flags, mode) => {
2597
2597
  const fd = fdOf(path);
2598
2598
  if (fd === void 0) return open(path, flags, mode);
2599
- const copy = Fs.dupStream(target(fd), -1);
2600
- setCloseOnExec(copy, typeof flags === "number" && (flags & O_CLOEXEC) !== 0);
2601
- return copy;
2599
+ const copy2 = Fs.dupStream(target(fd), -1);
2600
+ setCloseOnExec(copy2, typeof flags === "number" && (flags & O_CLOEXEC) !== 0);
2601
+ return copy2;
2602
2602
  };
2603
2603
  const { stat, fstat } = Fs;
2604
2604
  if (typeof stat !== "function" || typeof fstat !== "function") return;
@@ -3126,7 +3126,14 @@ function createProcessKernel(deps) {
3126
3126
  getpgid: (pid) => number(call2({ op: "proc-getpgid", pid }, "getpgid")),
3127
3127
  getsid: (pid) => number(call2({ op: "proc-getsid", pid }, "getsid")),
3128
3128
  cred: () => credOf(call2({ op: "proc-cred" }, "cred")),
3129
- setcred: (change) => credOf(call2({ op: "proc-setcred", change }, "setcred")),
3129
+ setcred(change) {
3130
+ const cred = credOf(call2({ op: "proc-setcred", change }, "setcred"));
3131
+ if (typeof cred === "object" && deps.owner) {
3132
+ deps.owner.uid = cred.euid;
3133
+ deps.owner.gid = cred.egid;
3134
+ }
3135
+ return cred;
3136
+ },
3130
3137
  tcgetpgrp(fd) {
3131
3138
  const kfd = Fs.getStream(fd)?.sliccKernelFd;
3132
3139
  if (kfd === void 0) return -wasiErrno("ENOTTY");
@@ -3280,6 +3287,13 @@ var init_process_signals = __esm({
3280
3287
  this.quieted--;
3281
3288
  }
3282
3289
  }
3290
+ interrupt() {
3291
+ const header = this.header;
3292
+ const pending = Atomics.load(header, SAB_I_SIGNALS) | Atomics.load(header, SAB_I_TIMERS) | Atomics.load(header, SAB_I_KILLED);
3293
+ if (pending === 0) return false;
3294
+ this.deliver();
3295
+ return true;
3296
+ }
3283
3297
  deliver() {
3284
3298
  if (this.quieted > 0) return;
3285
3299
  const killed = Atomics.load(this.header, SAB_I_KILLED);
@@ -3798,20 +3812,19 @@ var init_procfs = __esm({
3798
3812
  });
3799
3813
 
3800
3814
  // src/process/realm-user.ts
3801
- function ownByRealmUser(Fs) {
3815
+ function ownByCaller(Fs, cred) {
3816
+ const owner = { uid: cred?.euid ?? 0, gid: cred?.egid ?? 0 };
3802
3817
  const { stat, fstat } = Fs;
3803
- const owned = (attr2) => ({ ...attr2, uid: REALM_UID, gid: REALM_GID });
3818
+ const owned = (attr2) => ({ ...attr2, uid: owner.uid, gid: owner.gid });
3804
3819
  if (typeof stat === "function") {
3805
3820
  Fs.stat = (path, dontFollow) => owned(stat.call(Fs, path, dontFollow));
3806
3821
  }
3807
3822
  if (typeof fstat === "function") Fs.fstat = (fd) => owned(fstat.call(Fs, fd));
3823
+ return owner;
3808
3824
  }
3809
- var REALM_UID, REALM_GID;
3810
3825
  var init_realm_user = __esm({
3811
3826
  "src/process/realm-user.ts"() {
3812
3827
  "use strict";
3813
- REALM_UID = 1e3;
3814
- REALM_GID = 1e3;
3815
3828
  }
3816
3829
  });
3817
3830
 
@@ -4165,7 +4178,6 @@ async function runWasmProcess(init, port2, deps = {}) {
4165
4178
  memory: () => memory,
4166
4179
  memalign: () => exports?.emscripten_builtin_memalign
4167
4180
  });
4168
- ownByRealmUser(running.FS);
4169
4181
  const livePath = (s) => liveNodePath(s.node);
4170
4182
  running.sliccKernel = createProcessKernel({
4171
4183
  transport,
@@ -4180,7 +4192,8 @@ async function runWasmProcess(init, port2, deps = {}) {
4180
4192
  deliveries: () => signals.deliveries(),
4181
4193
  describeFork: () => describeForFork(running.FS, sys, streams, livePath),
4182
4194
  inherit: (actions) => describeInherited(running.FS, sys, streams, livePath, actions),
4183
- stdioPromoter: () => vfsPromoter(running.FS, sys, streams, livePath)
4195
+ stdioPromoter: () => vfsPromoter(running.FS, sys, streams, livePath),
4196
+ owner: ownByCaller(running.FS, init.cred)
4184
4197
  });
4185
4198
  running.sliccKernel.http = createHttpKernel(transport);
4186
4199
  running.sliccKernel.hostname = hostnameOf(init.env);
@@ -5539,6 +5552,7 @@ var init_wasi_host = __esm({
5539
5552
  onRaise;
5540
5553
  muted;
5541
5554
  signals;
5555
+ interrupted;
5542
5556
  listening;
5543
5557
  o;
5544
5558
  constructor(o) {
@@ -6644,7 +6658,7 @@ var init_wasi_module = __esm({
6644
6658
  });
6645
6659
 
6646
6660
  // src/process/wasi/wasi-signals.ts
6647
- var DELIVERED_MASK, STOP_DEFAULTS, LIBC_DEFAULT_EXIT, SA_RESTART, DISPOSITION_IGNORE, DISPOSITION_HANDLER, withBit, WASIX_LIBC_DEFAULT_LINE, WasiSignals;
6661
+ var DELIVERED_MASK, KERNEL_DEFAULTS, LIBC_DEFAULT_EXIT, SA_RESTART, DISPOSITION_IGNORE, DISPOSITION_HANDLER, withBit, WASIX_LIBC_DEFAULT_LINE, WasiSignals;
6648
6662
  var init_wasi_signals = __esm({
6649
6663
  "src/process/wasi/wasi-signals.ts"() {
6650
6664
  "use strict";
@@ -6652,7 +6666,7 @@ var init_wasi_signals = __esm({
6652
6666
  init_wasi_abi();
6653
6667
  init_wasi_host();
6654
6668
  DELIVERED_MASK = Object.values(SIG).filter((sig) => sig !== SIG.KILL && sig !== SIG.STOP).reduce((m, sig) => m | sigbit(sig), 0);
6655
- STOP_DEFAULTS = sigbit(SIG.TSTP) | sigbit(SIG.TTIN) | sigbit(SIG.TTOU);
6669
+ KERNEL_DEFAULTS = [SIG.TSTP, SIG.TTIN, SIG.TTOU, SIG.CHLD, SIG.CONT, SIG.URG, SIG.WINCH].map(sigbit).reduce((m, bit) => m | bit, 0);
6656
6670
  LIBC_DEFAULT_EXIT = 127;
6657
6671
  SA_RESTART = 268435456;
6658
6672
  DISPOSITION_IGNORE = 1;
@@ -6724,7 +6738,7 @@ var init_wasi_signals = __esm({
6724
6738
  return { caught, ignored: this.ignoring, restart: this.restarting, defaults };
6725
6739
  }
6726
6740
  if (!this.handler()) return null;
6727
- return { caught: DELIVERED_MASK & ~this.uncaught & ~STOP_DEFAULTS, ignored: 0, restart: 0 };
6741
+ return { caught: DELIVERED_MASK & ~this.uncaught & ~KERNEL_DEFAULTS, ignored: 0, restart: 0 };
6728
6742
  }
6729
6743
  raise(sig) {
6730
6744
  const handler = this.handler();
@@ -7545,6 +7559,16 @@ var init_wasix_sockets = __esm({
7545
7559
  });
7546
7560
 
7547
7561
  // src/process/wasi/wasix-host.ts
7562
+ function futexWait(view, index2, expected, ms, interrupted) {
7563
+ const deadline = performance.now() + ms;
7564
+ for (; ; ) {
7565
+ const slice = interrupted ? Math.min(FUTEX_SLICE_MS, ms) : ms;
7566
+ if (Atomics.wait(view, index2, expected, slice) !== "timed-out") return true;
7567
+ if (interrupted?.()) return true;
7568
+ ms = deadline - performance.now();
7569
+ if (ms <= 0) return false;
7570
+ }
7571
+ }
7548
7572
  function posixSignal(sig) {
7549
7573
  const posix = wasixSignal(sig);
7550
7574
  if (posix === void 0) throw new WasiError("EINVAL");
@@ -7553,7 +7577,7 @@ function posixSignal(sig) {
7553
7577
  function nsToMs(ns) {
7554
7578
  return Math.ceil(Number(ns) / 1e6);
7555
7579
  }
7556
- var FDFLAGSEXT_CLOEXEC, SPAWN_OP_SIZE, SPAWN_OPS, RIGHTS_FD_WRITE, ICANON, ECHO, WasixHost;
7580
+ var FDFLAGSEXT_CLOEXEC, SPAWN_OP_SIZE, SPAWN_OPS, RIGHTS_FD_WRITE, ICANON, ECHO, FUTEX_SLICE_MS, WasixHost;
7557
7581
  var init_wasix_host = __esm({
7558
7582
  "src/process/wasi/wasix-host.ts"() {
7559
7583
  "use strict";
@@ -7570,6 +7594,7 @@ var init_wasix_host = __esm({
7570
7594
  RIGHTS_FD_WRITE = 1n << 6n;
7571
7595
  ICANON = 2;
7572
7596
  ECHO = 8;
7597
+ FUTEX_SLICE_MS = 50;
7573
7598
  WasixHost = class _WasixHost {
7574
7599
  process;
7575
7600
  threads;
@@ -7856,7 +7881,7 @@ var init_wasix_host = __esm({
7856
7881
  if (!(this.threads?.known(tid) ?? tid === MAIN_TID)) throw new WasiError("ESRCH");
7857
7882
  const posix = posixSignal(sig);
7858
7883
  if (host.onRaise?.(posix)) return;
7859
- host.o.kernel.call({ op: "proc-kill", pid: host.o.pid, sig: posix });
7884
+ host.o.kernel.call({ op: "thread-kill", tid, sig: posix });
7860
7885
  },
7861
7886
  thread_spawn_v2: (startPtr, tidPtr) => {
7862
7887
  if (!this.threads) return E.NOTSUP;
@@ -7871,7 +7896,7 @@ var init_wasix_host = __esm({
7871
7896
  const ms = timed ? Number(v.getBigUint64(timeoutPtr + 8, true)) / 1e6 : Number.POSITIVE_INFINITY;
7872
7897
  v.setUint8(
7873
7898
  wokenPtr,
7874
- Atomics.wait(i32(), ptr >> 2, expected | 0, ms) === "timed-out" ? 0 : 1
7899
+ futexWait(i32(), ptr >> 2, expected | 0, ms, host.interrupted) ? 1 : 0
7875
7900
  );
7876
7901
  },
7877
7902
  futex_wake: (ptr, wokenPtr) => {
@@ -8092,20 +8117,20 @@ function newImportedMemory(spec) {
8092
8117
  });
8093
8118
  }
8094
8119
  }
8095
- function createImportedMemory(spec, copy) {
8120
+ function createImportedMemory(spec, copy2) {
8096
8121
  if (!spec) return void 0;
8097
8122
  const memory = newImportedMemory(spec);
8098
- if (copy) fillMemory(memory, copy);
8123
+ if (copy2) fillMemory(memory, copy2);
8099
8124
  return memory;
8100
8125
  }
8101
8126
  function restoreExportedMemory(instance, imported, init) {
8102
8127
  if (imported || !init.fork?.wasi) return;
8103
8128
  fillMemory(instance.exports.memory, init.fork.memory);
8104
8129
  }
8105
- function fillMemory(memory, copy) {
8106
- const pages2 = copy.byteLength / 65536 - memory.buffer.byteLength / 65536;
8130
+ function fillMemory(memory, copy2) {
8131
+ const pages2 = copy2.byteLength / 65536 - memory.buffer.byteLength / 65536;
8107
8132
  if (pages2 > 0) memory.grow(pages2);
8108
- new Uint8Array(memory.buffer).set(copy);
8133
+ new Uint8Array(memory.buffer).set(copy2);
8109
8134
  }
8110
8135
  function sizeOf(main) {
8111
8136
  return () => main.memory?.buffer.byteLength ?? 0;
@@ -8115,11 +8140,12 @@ function memoryOf(instance, imported) {
8115
8140
  }
8116
8141
  function kernelOf(init, port2, hooks = { masks: () => null, raise: () => {
8117
8142
  } }, memory) {
8118
- const transport = new SignalGate(
8143
+ const gate = new SignalGate(
8119
8144
  createSyncSabTransport(init.sab, port2, memory ? { memory } : {}),
8120
8145
  new Int32Array(init.sab, 0, SAB_HEADER_I32),
8121
8146
  hooks
8122
- ).transport();
8147
+ );
8148
+ const transport = gate.transport();
8123
8149
  const sys = kernelSys(transport);
8124
8150
  const call2 = (req) => {
8125
8151
  const r = transport.call(req, Number.POSITIVE_INFINITY, req.op);
@@ -8128,7 +8154,7 @@ function kernelOf(init, port2, hooks = { masks: () => null, raise: () => {
8128
8154
  };
8129
8155
  const say = (text) => sys.write(2, new TextEncoder().encode(`${init.argv0}: ${text}
8130
8156
  `));
8131
- return { transport, sys, call: call2, say };
8157
+ return { transport, sys, call: call2, say, gate };
8132
8158
  }
8133
8159
  function traced(stats, tag, table) {
8134
8160
  return stats ? stats.wrap(tag, table) : table;
@@ -8243,16 +8269,19 @@ function descriptors(init, fork, threads) {
8243
8269
  async function runWasiProcess(init, port2) {
8244
8270
  captureBacktraces(init.env);
8245
8271
  const signals = new WasiSignals(
8246
- (sig) => {
8247
- call2({ op: "proc-kill", pid: init.pid, sig });
8248
- if (defaultAction(sig) === "terminate") throw new WasiExit(128 + sig);
8249
- },
8272
+ takeDefault((req) => call2(req), init.pid),
8250
8273
  (code2) => {
8251
8274
  throw new WasiExit(code2);
8252
8275
  }
8253
8276
  );
8254
8277
  const main = {};
8255
- const { transport, sys, call: kernelCall, say } = kernelOf(init, port2, signals, sizeOf(main));
8278
+ const {
8279
+ transport,
8280
+ sys,
8281
+ call: kernelCall,
8282
+ say,
8283
+ gate
8284
+ } = kernelOf(init, port2, signals, sizeOf(main));
8256
8285
  const id = identify(transport, init);
8257
8286
  const stats = init.env.SLICC_WASI_STATS === "1" ? new WasiStats() : void 0;
8258
8287
  const call2 = stats ? timedCalls(stats, kernelCall) : kernelCall;
@@ -8300,6 +8329,7 @@ async function runWasiProcess(init, port2) {
8300
8329
  if (importsSigactionHook(module)) signals.useHook();
8301
8330
  if (fork?.signals) signals.restore(fork.signals);
8302
8331
  host.signals = signals;
8332
+ host.interrupted = () => gate.interrupt();
8303
8333
  host.onRaise = (sig) => signals.raised(sig);
8304
8334
  host.muted = (fd, data) => signals.muted(fd, data);
8305
8335
  const exports = instance.exports;
@@ -8350,8 +8380,12 @@ function captureBacktraces(env) {
8350
8380
  }
8351
8381
  async function runWasiThread(init, port2) {
8352
8382
  captureBacktraces(init.env);
8353
- const { transport, sys, call: call2, say } = kernelOf(init, port2);
8354
8383
  const { thread } = init;
8384
+ const { transport, sys, call: call2, say, gate } = kernelOf(init, port2, {
8385
+ masks: () => null,
8386
+ raise: (sig) => signals.raise(sig)
8387
+ });
8388
+ const signals = new WasiSignals(takeDefault(call2, init.pid));
8355
8389
  const threads = new WasiThreads(port2, thread.memory, threadCap(init.env), thread.tid, thread.ids);
8356
8390
  threads.received = thread.modules;
8357
8391
  const id = identify(transport, init);
@@ -8372,6 +8406,10 @@ async function runWasiThread(init, port2) {
8372
8406
  foreign: init.program.foreign,
8373
8407
  ...program ? { program } : {}
8374
8408
  });
8409
+ signals.bind(instance.exports);
8410
+ signals.register(SIGNAL_CALLBACK);
8411
+ host.interrupted = () => gate.interrupt();
8412
+ host.onRaise = (sig) => signals.raised(sig);
8375
8413
  const start2 = instance.exports.wasi_thread_start;
8376
8414
  try {
8377
8415
  start2(thread.tid, thread.arg);
@@ -8396,7 +8434,7 @@ async function runWasiThread(init, port2) {
8396
8434
  throw e;
8397
8435
  }
8398
8436
  }
8399
- var TRAPPED, PREVIEW1, WASIX, SLICC, SLICC_FS, RESERVED2, importsSigactionHook, noErrno, FALLBACK_MAXIMUM_PAGES, LinkSync, DL_GEN, BACKTRACE_FRAMES;
8437
+ var TRAPPED, PREVIEW1, WASIX, SLICC, SIGNAL_CALLBACK, takeDefault, SLICC_FS, RESERVED2, importsSigactionHook, noErrno, FALLBACK_MAXIMUM_PAGES, LinkSync, DL_GEN, BACKTRACE_FRAMES;
8400
8438
  var init_wasi_runtime = __esm({
8401
8439
  "src/process/wasi/wasi-runtime.ts"() {
8402
8440
  "use strict";
@@ -8423,6 +8461,11 @@ var init_wasi_runtime = __esm({
8423
8461
  PREVIEW1 = "wasi_snapshot_preview1";
8424
8462
  WASIX = "wasix_32v1";
8425
8463
  SLICC = "slicc";
8464
+ SIGNAL_CALLBACK = "__wasm_signal";
8465
+ takeDefault = (call2, pid) => (sig) => {
8466
+ call2({ op: "proc-kill", pid, sig });
8467
+ if (defaultAction(sig) === "terminate") throw new WasiExit(128 + sig);
8468
+ };
8426
8469
  SLICC_FS = "slicc_fs";
8427
8470
  RESERVED2 = RESERVED_NAMESPACES;
8428
8471
  importsSigactionHook = (module) => WebAssembly.Module.imports(module).some((i) => i.module === SLICC && i.name === "sigaction_set");
@@ -9503,6 +9546,77 @@ var init_js_sync = __esm({
9503
9546
  }
9504
9547
  });
9505
9548
 
9549
+ // src/process/js/js-tty.ts
9550
+ function copy(termios) {
9551
+ return { ...termios, c_cc: [...termios.c_cc] };
9552
+ }
9553
+ function rawOf(termios) {
9554
+ const raw = copy(termios);
9555
+ raw.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
9556
+ raw.c_oflag |= ONLCR;
9557
+ raw.c_cflag |= CS8;
9558
+ raw.c_lflag &= ~(ECHO2 | ICANON2 | IEXTEN | ISIG);
9559
+ raw.c_cc[VMIN] = 1;
9560
+ raw.c_cc[VTIME] = 0;
9561
+ return raw;
9562
+ }
9563
+ function ttyOps(kernel) {
9564
+ const saved = /* @__PURE__ */ new Map();
9565
+ const getAttr = async (fd) => await kernel.json({ op: "tty-get", fd });
9566
+ const setAttr = async (fd, termios) => {
9567
+ await kernel.call({ op: "tty-set", fd, termios: copy(termios) });
9568
+ };
9569
+ const tty = {
9570
+ getAttr,
9571
+ setAttr,
9572
+ async setRaw(fd, raw) {
9573
+ if (!raw) {
9574
+ const original = saved.get(fd);
9575
+ saved.delete(fd);
9576
+ if (original) await setAttr(fd, original);
9577
+ return;
9578
+ }
9579
+ const current = await getAttr(fd);
9580
+ if (!saved.has(fd)) saved.set(fd, current);
9581
+ await setAttr(fd, rawOf(current));
9582
+ },
9583
+ async size(fd) {
9584
+ const [rows, columns] = await kernel.json({ op: "tty-winsz", fd });
9585
+ return { columns, rows };
9586
+ },
9587
+ foreground: async (fd) => await kernel.json({ op: "tty-pgrp-get", fd }),
9588
+ async setForeground(fd, pgrp) {
9589
+ await kernel.call({ op: "tty-pgrp-set", fd, pgrp });
9590
+ }
9591
+ };
9592
+ const restore = async () => {
9593
+ for (const [fd, original] of [...saved]) {
9594
+ saved.delete(fd);
9595
+ await setAttr(fd, original).catch(() => void 0);
9596
+ }
9597
+ };
9598
+ return { tty, restore };
9599
+ }
9600
+ var BRKINT, INPCK, ISTRIP, ICRNL, IXON, ONLCR, CS8, ISIG, ICANON2, ECHO2, IEXTEN, VTIME, VMIN;
9601
+ var init_js_tty = __esm({
9602
+ "src/process/js/js-tty.ts"() {
9603
+ "use strict";
9604
+ BRKINT = 2;
9605
+ INPCK = 16;
9606
+ ISTRIP = 32;
9607
+ ICRNL = 256;
9608
+ IXON = 1024;
9609
+ ONLCR = 4;
9610
+ CS8 = 48;
9611
+ ISIG = 1;
9612
+ ICANON2 = 2;
9613
+ ECHO2 = 8;
9614
+ IEXTEN = 32768;
9615
+ VTIME = 5;
9616
+ VMIN = 6;
9617
+ }
9618
+ });
9619
+
9506
9620
  // src/process/js/js-websocket.ts
9507
9621
  function failed3(err) {
9508
9622
  return new TypeError("websocket failed", { cause: err });
@@ -9775,6 +9889,7 @@ function createContext(o) {
9775
9889
  infos,
9776
9890
  handles
9777
9891
  });
9892
+ const terminal = ttyOps(kernel);
9778
9893
  const io = { read, send: writeAll, close: (fd) => ctx.close(fd) };
9779
9894
  const children = childOps(kernel, io, { env: o.env, cwd: o.cwd, signal: signalNumber });
9780
9895
  const ctx = {
@@ -9823,14 +9938,16 @@ function createContext(o) {
9823
9938
  ...children,
9824
9939
  net: netOps(kernel, io),
9825
9940
  websocket: websocketOp(kernel),
9941
+ tty: terminal.tty,
9826
9942
  exit
9827
9943
  };
9828
9944
  const drain2 = async () => {
9829
9945
  for (; ; ) {
9830
9946
  await Promise.all([...pending]);
9831
9947
  await new Promise((resolve2) => setTimeout(resolve2, 0));
9832
- if (pending.size === 0) return;
9948
+ if (pending.size === 0) break;
9833
9949
  }
9950
+ await terminal.restore();
9834
9951
  };
9835
9952
  return { ctx, drain: drain2 };
9836
9953
  }
@@ -9961,6 +10078,7 @@ var init_js_context = __esm({
9961
10078
  init_js_kernel();
9962
10079
  init_js_net();
9963
10080
  init_js_sync();
10081
+ init_js_tty();
9964
10082
  init_js_websocket();
9965
10083
  JsExit = class extends Error {
9966
10084
  status;