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

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 (34) hide show
  1. package/dist/core/auto-update/channels.js +122 -0
  2. package/dist/core/auto-update/checker.js +241 -0
  3. package/dist/core/auto-update/state.js +235 -0
  4. package/dist/core/engine/compaction-hook.js +154 -0
  5. package/dist/core/engine/native-pugi.js +67 -3
  6. package/dist/core/engine/tool-bridge.js +123 -3
  7. package/dist/core/hooks/events.js +44 -0
  8. package/dist/core/hooks/index.js +15 -0
  9. package/dist/core/hooks/registry.js +213 -0
  10. package/dist/core/hooks/runner.js +236 -0
  11. package/dist/core/init/scaffold.js +195 -0
  12. package/dist/core/lsp/cache.js +105 -0
  13. package/dist/core/lsp/language-detect.js +66 -0
  14. package/dist/core/lsp/post-edit-diagnostics.js +171 -0
  15. package/dist/core/repl/codebase-survey.js +308 -0
  16. package/dist/core/repl/init-interview.js +457 -0
  17. package/dist/core/repl/onboarding-state.js +297 -0
  18. package/dist/core/repl/session.js +84 -0
  19. package/dist/core/repl/slash-commands.js +25 -0
  20. package/dist/core/repo-map/build.js +125 -0
  21. package/dist/core/repo-map/cache.js +185 -0
  22. package/dist/core/repo-map/extractor.js +254 -0
  23. package/dist/core/repo-map/formatter.js +145 -0
  24. package/dist/core/repo-map/scanner.js +211 -0
  25. package/dist/core/session.js +44 -0
  26. package/dist/core/settings.js +9 -0
  27. package/dist/runtime/cli.js +170 -0
  28. package/dist/runtime/commands/hooks.js +184 -0
  29. package/dist/runtime/commands/lsp.js +25 -23
  30. package/dist/runtime/commands/repo-map.js +95 -0
  31. package/dist/runtime/commands/update.js +289 -0
  32. package/dist/runtime/version.js +1 -1
  33. package/dist/tui/repl-splash-mascot.js +19 -7
  34. package/package.json +3 -3
@@ -89,21 +89,33 @@ 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 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.
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.
96
110
  // 3. Drop CSI 6 n (cursor-position report). Would inject a fake
97
111
  // CPR into the operator's stdin stream.
98
112
  // 4. Drop CSI [23]J / CSI [23]K (full screen / line clear). A
99
113
  // chafa render uses cursor-positioning per row, not bulk
100
114
  // erases; bulk clears would wipe whatever the operator already
101
115
  // 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.
104
116
  const stripped = raw
105
117
  .replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)/g, '')
106
- .replace(/\x1b\[\?(?:25|47|1000|1001|1002|1003|1004|1005|1006|1015|1047|1048|1049)[lh]/g, '')
118
+ .replace(/\x1b\[\?[0-9;]+[lh]/g, '')
107
119
  .replace(/\x1b\[6n/g, '')
108
120
  .replace(/\x1b\[[23]?[JK]/g, '');
109
121
  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.23",
3
+ "version": "0.1.0-beta.25",
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/personas": "0.1.2",
57
- "@pugi/sdk": "0.1.0-beta.23"
56
+ "@pugi/sdk": "0.1.0-beta.25",
57
+ "@pugi/personas": "0.1.2"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/node": "^22.0.0",