@pugi/cli 0.1.0-beta.25 → 0.1.0-beta.26

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.
@@ -89,33 +89,21 @@ export function loadPugMascotAnsi() {
89
89
  // icon, clipboard, hyperlinks, color-palette change). Drop them
90
90
  // so a corrupted asset cannot rename the operator's terminal tab
91
91
  // or smuggle a hyperlink into the splash region.
92
- // 2. Drop ALL CSI ? <numbers and semicolons> [lh] (DEC private-mode
93
- // set / reset). The legitimate chafa output for a splash is
94
- // truecolor SGR (`CSI 38;2;R;G;B m`) plus cursor-positioning
95
- // no private-mode toggle ever appears там legitimately. A
96
- // permissive deny-all pattern covers every disruptive private
97
- // mode in one regex:
98
- // - cursor visibility (25)
99
- // - alt-screen buffer (47, 1047, 1048, 1049)
100
- // - mouse tracking (1000, 1001, 1002, 1003, 1004, 1005, 1006, 1015)
101
- // - bracketed paste (2004)
102
- // - focus reporting (1004)
103
- // - multi-mode forms (e.g. `CSI ? 47 ; 1049 h` — legal per
104
- // xterm ctlseqs but missed by the previous single-mode regex)
105
- // - any future private mode a corrupt asset might emit
106
- // Allowlisting the modes the splash needs is impossible because
107
- // the splash needs ZERO of them — chafa renders glyph-by-glyph,
108
- // not via private-mode toggles. A pure deny-all is strictly
109
- // safer than enumerating known-bad modes one-by-one.
92
+ // 2. Drop CSI ? <mode> [hl] for mouse-tracking and screen-buffer
93
+ // switch modes (1000, 1001, 1002, 1003, 1004, 1005, 1006, 1015,
94
+ // 1049, 47, 1047, 1048). These would either start swallowing
95
+ // mouse input or flip the terminal into the alternate screen.
110
96
  // 3. Drop CSI 6 n (cursor-position report). Would inject a fake
111
97
  // CPR into the operator's stdin stream.
112
98
  // 4. Drop CSI [23]J / CSI [23]K (full screen / line clear). A
113
99
  // chafa render uses cursor-positioning per row, not bulk
114
100
  // erases; bulk clears would wipe whatever the operator already
115
101
  // had on screen above the splash.
102
+ // The cursor-hide/show wrappers (CSI ? 25 [lh]) are handled by
103
+ // the same CSI-?-mode pattern as the mouse / alt-screen modes.
116
104
  const stripped = raw
117
105
  .replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)/g, '')
118
- .replace(/\x1b\[\?[0-9;]+[lh]/g, '')
106
+ .replace(/\x1b\[\?(?:25|47|1000|1001|1002|1003|1004|1005|1006|1015|1047|1048|1049)[lh]/g, '')
119
107
  .replace(/\x1b\[6n/g, '')
120
108
  .replace(/\x1b\[[23]?[JK]/g, '');
121
109
  if (stripped.trim().length === 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pugi/cli",
3
- "version": "0.1.0-beta.25",
3
+ "version": "0.1.0-beta.26",
4
4
  "description": "Pugi CLI - terminal-native software execution system",
5
5
  "homepage": "https://pugi.io",
6
6
  "repository": {
@@ -53,8 +53,8 @@
53
53
  "turndown": "^7.2.4",
54
54
  "undici": "^8.3.0",
55
55
  "zod": "^3.23.0",
56
- "@pugi/sdk": "0.1.0-beta.25",
57
- "@pugi/personas": "0.1.2"
56
+ "@pugi/personas": "0.1.2",
57
+ "@pugi/sdk": "0.1.0-beta.26"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/node": "^22.0.0",