@ai-ecoverse/slicc-kernel 1.100.3 → 1.100.4

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.
@@ -4767,7 +4767,7 @@ var KERNEL_VERSION, OS_RELEASE;
4767
4767
  var init_version = __esm({
4768
4768
  "src/version.ts"() {
4769
4769
  "use strict";
4770
- KERNEL_VERSION = true ? "1.100.3" : "0.0.0-dev";
4770
+ KERNEL_VERSION = true ? "1.100.4" : "0.0.0-dev";
4771
4771
  OS_RELEASE = "6.0.0-slicc";
4772
4772
  }
4773
4773
  });
package/dist/node.js CHANGED
@@ -11107,7 +11107,7 @@ var PATH_OPS = new Set(SYNC_FS_OPS);
11107
11107
  var EARLY_WHOLE_FILE = 64 * 1024;
11108
11108
 
11109
11109
  // src/version.ts
11110
- var KERNEL_VERSION = true ? "1.100.3" : "0.0.0-dev";
11110
+ var KERNEL_VERSION = true ? "1.100.4" : "0.0.0-dev";
11111
11111
  var OS_RELEASE = "6.0.0-slicc";
11112
11112
  function procVersion() {
11113
11113
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -13674,6 +13674,7 @@ var KernelTty = class {
13674
13674
  this.wake();
13675
13675
  }
13676
13676
  resize(cols, rows) {
13677
+ if (cols === this.cols && rows === this.rows) return;
13677
13678
  this.setSize(cols, rows);
13678
13679
  this.signal(SIG.WINCH);
13679
13680
  }
@@ -14048,6 +14049,9 @@ function terminalOf(ctx, fd) {
14048
14049
  }
14049
14050
  var json4 = (value) => ({ ok: true, kind: "json", json: value });
14050
14051
  var done3 = { ok: true, kind: "void" };
14052
+ function sizeKey(rows, cols) {
14053
+ return `${rows}x${cols}`;
14054
+ }
14051
14055
  function ptySyscall(req, ctx) {
14052
14056
  switch (req.op) {
14053
14057
  case "pty-open": {
@@ -14080,9 +14084,11 @@ function ptySyscall(req, ctx) {
14080
14084
  case "pty-packet":
14081
14085
  masterOf(ctx, req.fd).packet = req.on;
14082
14086
  return done3;
14083
- case "pty-winsz-set":
14084
- terminalOf(ctx, req.fd).resize(req.cols, req.rows);
14087
+ case "pty-winsz-set": {
14088
+ const tty = terminalOf(ctx, req.fd);
14089
+ if (ctx.sizesRead?.get(tty) !== sizeKey(req.rows, req.cols)) tty.resize(req.cols, req.rows);
14085
14090
  return done3;
14091
+ }
14086
14092
  }
14087
14093
  }
14088
14094
 
@@ -15626,6 +15632,7 @@ var WasmProcess = class {
15626
15632
  for (const listener of this.stateListeners) listener("continued", SIG.CONT);
15627
15633
  }
15628
15634
  blocks = /* @__PURE__ */ new WeakMap();
15635
+ sizesRead = /* @__PURE__ */ new WeakMap();
15629
15636
  async syscall(req, cancelled, block) {
15630
15637
  this.options.onSyscall?.(req);
15631
15638
  const started = performance.now();
@@ -15696,7 +15703,17 @@ var WasmProcess = class {
15696
15703
  const owner = this.options.owners ? this.ttyOwner() : void 0;
15697
15704
  const guard2 = this.guarded();
15698
15705
  const { outputFilter } = this.options;
15699
- const ctx = { pid: this.pid, fds: this.fds, ptys, jobs, guard: guard2, owner, outputFilter };
15706
+ const sizesRead = this.sizesRead;
15707
+ const ctx = {
15708
+ pid: this.pid,
15709
+ fds: this.fds,
15710
+ ptys,
15711
+ jobs,
15712
+ guard: guard2,
15713
+ owner,
15714
+ outputFilter,
15715
+ sizesRead
15716
+ };
15700
15717
  return ptySyscall(req, ctx);
15701
15718
  }
15702
15719
  return await this.procSyscall(req, cancelled);
@@ -16332,8 +16349,11 @@ var WasmProcess = class {
16332
16349
  case "tty-set":
16333
16350
  tty.tcsets(req.termios, req.flush === true);
16334
16351
  return { ok: true, kind: "void" };
16335
- case "tty-winsz":
16336
- return { ok: true, kind: "json", json: tty.winsize() };
16352
+ case "tty-winsz": {
16353
+ const size = tty.winsize();
16354
+ this.sizesRead.set(tty, sizeKey(...size));
16355
+ return { ok: true, kind: "json", json: size };
16356
+ }
16337
16357
  case "tty-pgrp-get":
16338
16358
  return { ok: true, kind: "json", json: jobs ? jobs.tcgetpgrp(tty, this.sid()) : this.pid };
16339
16359
  case "tty-pgrp-set":