@ai-ecoverse/slicc-kernel 1.85.0 → 1.85.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.
package/dist/node.js CHANGED
@@ -11508,7 +11508,7 @@ function ptySyscall(req, ctx) {
11508
11508
  const pair = ctx.ptys.get(req.n);
11509
11509
  ttyOpenable(ctx.guard, pair.slave);
11510
11510
  const slave = pair.openSlave();
11511
- const fd = ctx.fds.install(ctx.ttyFilter?.(slave) ?? slave, 3);
11511
+ const fd = ctx.fds.install(ctx.outputFilter?.(slave) ?? slave, 3);
11512
11512
  if (!req.noctty) ctx.jobs?.acquireTerminal(ctx.pid, pair.slave);
11513
11513
  return json4(fd);
11514
11514
  }
@@ -12674,8 +12674,8 @@ var WasmProcess = class {
12674
12674
  const { ptys, jobs } = this.options;
12675
12675
  const owner = this.options.owners ? this.ttyOwner() : void 0;
12676
12676
  const guard2 = this.guarded();
12677
- const { ttyFilter } = this.options;
12678
- const ctx = { pid: this.pid, fds: this.fds, ptys, jobs, guard: guard2, owner, ttyFilter };
12677
+ const { outputFilter } = this.options;
12678
+ const ctx = { pid: this.pid, fds: this.fds, ptys, jobs, guard: guard2, owner, outputFilter };
12679
12679
  return ptySyscall(req, ctx);
12680
12680
  }
12681
12681
  return await this.procSyscall(req, cancelled);
@@ -12852,7 +12852,7 @@ var WasmProcess = class {
12852
12852
  if (!tty) throw new KernelError("ENXIO");
12853
12853
  if (name2 !== void 0) ttyOpenable(this.guarded(), tty);
12854
12854
  const file = tty.file();
12855
- return this.fds.install(this.options.ttyFilter?.(file) ?? file, 3);
12855
+ return this.fds.install(this.options.outputFilter?.(file) ?? file, 3);
12856
12856
  }
12857
12857
  openSealed() {
12858
12858
  const broker = this.options.sealed;
@@ -12864,7 +12864,8 @@ var WasmProcess = class {
12864
12864
  if (!broker) throw new KernelError("ENOENT");
12865
12865
  const mode = flags2 & WRITE_ACCESS;
12866
12866
  const access2 = mode === 0 ? "read" : mode === 1 ? "write" : "both";
12867
- return this.fds.install(broker.open(access2, await this.clipboardStamp()), 3);
12867
+ const file = broker.open(access2, await this.clipboardStamp());
12868
+ return this.fds.install(this.options.outputFilter?.(file) ?? file, 3);
12868
12869
  }
12869
12870
  async clipboardStamp() {
12870
12871
  const shown = await this.options.identity?.();
@@ -13663,7 +13664,7 @@ function processOptions(opts, header4, hooks, created3) {
13663
13664
  ...inherited(opts),
13664
13665
  ...opts.owners ? { owners: true } : {},
13665
13666
  ...opts.sealed ? { sealed: opts.sealed } : {},
13666
- ...opts.ttyFilter ? { ttyFilter: opts.ttyFilter } : {},
13667
+ ...opts.outputFilter ? { outputFilter: opts.outputFilter } : {},
13667
13668
  ...opts.clipboard ? { clipboard: opts.clipboard, ...clipboardName(opts) } : {},
13668
13669
  ...opts.readonlyAt ? { readonlyAt: opts.readonlyAt } : {},
13669
13670
  ...opts.dac ? { guard: { dac: opts.dac, fs: opts.fs, created: created3 } } : {},
@@ -14665,7 +14666,7 @@ function scrubStdio(fds, scrubber) {
14665
14666
  const stdio = stdioFiles(fds);
14666
14667
  for (const fd of fds.numbers()) {
14667
14668
  const original = fds.get(fd);
14668
- if (!stdio.has(original) && !original.file.tty) continue;
14669
+ if (!stdio.has(original) && !original.file.tty && !original.file.clipboard) continue;
14669
14670
  const known = wrapped.get(original);
14670
14671
  const flags2 = fds.statusFlags(fd);
14671
14672
  const wrapper = known ? known.retain() : scrubbed(original.retain(), scrubber);
@@ -17847,7 +17848,7 @@ var Launcher = class {
17847
17848
  ...this.owners && req.program.abi === "wasi" ? { fresh: (path, umask) => this.freshModules.add(path, umask, pid) } : {},
17848
17849
  ...this.owners ? { owners: true } : {},
17849
17850
  sealed: this.sealed,
17850
- ...scrubs ? { ttyFilter: (file) => scrubbedAll(file, scrubs) } : {},
17851
+ ...scrubs ? { outputFilter: (file) => scrubbedAll(file, scrubs) } : {},
17851
17852
  clipboard: this.clipboard,
17852
17853
  ...this.dac ? { dac: this.dac } : {},
17853
17854
  program: req.program,