muuuuse 2.3.2 → 2.3.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/runtime.js +27 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muuuuse",
3
- "version": "2.3.2",
3
+ "version": "2.3.3",
4
4
  "description": "🔌Muuuuse arms regular terminals in isolated pairs and can continue relay output into any other armed seat.",
5
5
  "type": "commonjs",
6
6
  "bin": {
package/src/runtime.js CHANGED
@@ -56,6 +56,32 @@ const CHILD_ENV_DROP_KEYS = [
56
56
  "CODEX_THREAD_ID",
57
57
  ];
58
58
 
59
+ function bestEffortEnableChildEcho(child) {
60
+ const ptsName = String(child?.ptsName || "").trim();
61
+ if (!ptsName || process.platform === "win32") {
62
+ return;
63
+ }
64
+
65
+ try {
66
+ execFileSync("stty", [
67
+ "-F",
68
+ ptsName,
69
+ "echo",
70
+ "icanon",
71
+ "isig",
72
+ "iexten",
73
+ "echoe",
74
+ "echok",
75
+ "echoke",
76
+ "echoctl",
77
+ ], {
78
+ stdio: "ignore",
79
+ });
80
+ } catch {
81
+ // Best effort only. The shell or child app may later change its own tty mode.
82
+ }
83
+ }
84
+
59
85
  function normalizeFlowMode(flowMode) {
60
86
  return String(flowMode || "").trim().toLowerCase() === "on" ? "on" : "off";
61
87
  }
@@ -874,6 +900,7 @@ class ArmedSeat {
874
900
  env: childEnv,
875
901
  name: childEnv.TERM,
876
902
  });
903
+ bestEffortEnableChildEcho(this.child);
877
904
 
878
905
  this.childPid = this.child.pid;
879
906
  this.writeMeta();