@denizokcu/haze 1.7.12 → 1.8.0

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 (178) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +30 -6
  3. package/SECURITY.md +1 -1
  4. package/bin/haze.js +47 -19
  5. package/dist/buildInfo.json +3 -3
  6. package/dist/cli/chat/BusyBar.d.ts +1 -2
  7. package/dist/cli/chat/ChatHeader.d.ts +6 -0
  8. package/dist/cli/chat/ChatHeader.js +11 -0
  9. package/dist/cli/chat/ChatScreen.d.ts +16 -0
  10. package/dist/cli/chat/ChatScreen.js +399 -0
  11. package/dist/cli/chat/ChatScreenView.d.ts +68 -0
  12. package/dist/cli/chat/ChatScreenView.js +47 -0
  13. package/dist/cli/chat/LiveTail.d.ts +11 -0
  14. package/dist/cli/chat/LiveTail.js +26 -0
  15. package/dist/cli/chat/TaskBar.d.ts +3 -2
  16. package/dist/cli/chat/TaskBar.js +4 -0
  17. package/dist/cli/chat/agentTurnRunner.d.ts +12 -0
  18. package/dist/cli/chat/agentTurnRunner.js +177 -0
  19. package/dist/cli/chat/busyIndicator.js +9 -5
  20. package/dist/cli/chat/chatMetrics.d.ts +7 -0
  21. package/dist/cli/chat/chatMetrics.js +15 -1
  22. package/dist/cli/chat/chatViewModel.d.ts +85 -0
  23. package/dist/cli/chat/chatViewModel.js +66 -0
  24. package/dist/cli/chat/fileMentionSuggestions.d.ts +0 -14
  25. package/dist/cli/chat/fileMentionSuggestions.js +4 -21
  26. package/dist/cli/chat/liveTheme.d.ts +11 -0
  27. package/dist/cli/chat/liveTheme.js +26 -0
  28. package/dist/cli/chat/messageFinalize.d.ts +4 -0
  29. package/dist/cli/chat/messageFinalize.js +8 -0
  30. package/dist/cli/chat/messages.js +1 -1
  31. package/dist/cli/chat/pickerOpeners.d.ts +23 -0
  32. package/dist/cli/chat/pickerOpeners.js +36 -0
  33. package/dist/cli/chat/promptSessionState.d.ts +11 -0
  34. package/dist/cli/chat/promptSessionState.js +39 -0
  35. package/dist/cli/chat/renderMetrics.d.ts +8 -0
  36. package/dist/cli/chat/renderMetrics.js +14 -0
  37. package/dist/cli/chat/resizeGuard.d.ts +11 -0
  38. package/dist/cli/chat/resizeGuard.js +25 -0
  39. package/dist/cli/chat/screenDeps.d.ts +116 -0
  40. package/dist/cli/chat/screenDeps.js +1 -0
  41. package/dist/cli/chat/sessionLifecycle.d.ts +2 -0
  42. package/dist/cli/chat/sessionLifecycle.js +4 -1
  43. package/dist/cli/chat/settingsSelection.d.ts +33 -0
  44. package/dist/cli/chat/settingsSelection.js +46 -0
  45. package/dist/cli/chat/skillNotices.d.ts +18 -0
  46. package/dist/cli/chat/skillNotices.js +26 -0
  47. package/dist/cli/chat/startupInfo.js +1 -1
  48. package/dist/cli/chat/submitPipeline.d.ts +8 -0
  49. package/dist/cli/chat/submitPipeline.js +141 -0
  50. package/dist/cli/chat/terminalControl.js +1 -1
  51. package/dist/cli/chat/toolSummaries.d.ts +29 -0
  52. package/dist/cli/chat/toolSummaries.js +268 -0
  53. package/dist/cli/chat/turnState.d.ts +8 -0
  54. package/dist/cli/chat/turnState.js +1 -0
  55. package/dist/cli/chat/userCommandFlow.d.ts +21 -0
  56. package/dist/cli/chat/userCommandFlow.js +66 -0
  57. package/dist/cli/chat/userCommandRunner.d.ts +14 -0
  58. package/dist/cli/chat/userCommandRunner.js +56 -0
  59. package/dist/cli/chat/wizard/providerHandlers.js +19 -2
  60. package/dist/cli/chat/wizardTrail.d.ts +22 -0
  61. package/dist/cli/chat/wizardTrail.js +55 -0
  62. package/dist/cli/commands/chat.d.ts +1 -13
  63. package/dist/cli/commands/chat.js +10 -798
  64. package/dist/cli/commands/commandHelp.js +7 -5
  65. package/dist/cli/commands/commandSuggest.d.ts +2 -0
  66. package/dist/cli/commands/commandSuggest.js +35 -0
  67. package/dist/cli/commands/commands.js +10 -3
  68. package/dist/cli/commands/formatters.d.ts +1 -23
  69. package/dist/cli/commands/formatters.js +3 -252
  70. package/dist/cli/commands/modelCommand.js +11 -7
  71. package/dist/cli/commands/reasoningCommand.js +3 -3
  72. package/dist/cli/commands/runCommand.js +6 -2
  73. package/dist/cli/commands/streaming/attemptLifecycle.js +1 -0
  74. package/dist/cli/commands/streaming/attemptOutcome.js +7 -2
  75. package/dist/cli/commands/streaming/attemptSetup.d.ts +1 -0
  76. package/dist/cli/commands/streaming/attemptSetup.js +26 -2
  77. package/dist/cli/commands/streaming/goalCheckpoint.d.ts +1 -1
  78. package/dist/cli/commands/streaming/stepProjection.d.ts +59 -0
  79. package/dist/cli/commands/streaming/stepProjection.js +54 -0
  80. package/dist/cli/commands/streaming/streamLoop.js +31 -23
  81. package/dist/cli/commands/streaming/toolGroupRenderer.js +1 -1
  82. package/dist/cli/commands/streaming/toolPartHandlers.js +1 -1
  83. package/dist/cli/commands/streaming.d.ts +3 -1
  84. package/dist/cli/commands/wizardFlow.d.ts +2 -0
  85. package/dist/cli/commands/wizardFlow.js +3 -0
  86. package/dist/cli/index.js +8 -4
  87. package/dist/cli/terminalTitle.js +9 -3
  88. package/dist/config/contextFiles.d.ts +2 -5
  89. package/dist/config/contextFiles.js +1 -1
  90. package/dist/config/inputHistory.js +2 -2
  91. package/dist/config/providerAuth.js +2 -2
  92. package/dist/config/providerModelFacts.js +5 -0
  93. package/dist/config/providerPresets.js +1 -1
  94. package/dist/config/settings.d.ts +7 -0
  95. package/dist/config/settings.js +9 -2
  96. package/dist/config/updateCheck.js +2 -2
  97. package/dist/core/agent/completionController.d.ts +1 -1
  98. package/dist/core/agent/contextBudget.d.ts +1 -1
  99. package/dist/core/agent/goalPolicy.js +8 -2
  100. package/dist/core/agent/overflow.js +5 -0
  101. package/dist/core/agent/toolCapabilities.js +14 -0
  102. package/dist/core/agent/userCommands.d.ts +53 -0
  103. package/dist/core/agent/userCommands.js +116 -0
  104. package/dist/core/agent/workState.d.ts +3 -1
  105. package/dist/core/agent/workState.js +57 -26
  106. package/dist/core/contextFileTypes.d.ts +12 -0
  107. package/dist/core/contextFileTypes.js +1 -0
  108. package/dist/core/graph/buildGraph.js +1 -1
  109. package/dist/core/graph/store.js +1 -1
  110. package/dist/core/limits.d.ts +2 -0
  111. package/dist/core/limits.js +2 -0
  112. package/dist/core/log/llmLog.js +2 -2
  113. package/dist/{config → core/persistence}/privateStorage.js +1 -1
  114. package/dist/core/process/runBoundedProcess.d.ts +7 -4
  115. package/dist/core/process/runBoundedProcess.js +10 -5
  116. package/dist/core/safety/redaction.d.ts +2 -0
  117. package/dist/core/safety/redaction.js +26 -5
  118. package/dist/core/safety/secretPaths.js +12 -3
  119. package/dist/core/safety/urlGuard.js +2 -0
  120. package/dist/core/session/sessionStore.d.ts +8 -1
  121. package/dist/core/session/sessionStore.js +15 -4
  122. package/dist/core/shellOutput/reducers/validation.d.ts +1 -1
  123. package/dist/core/shellOutput/types.d.ts +1 -1
  124. package/dist/{llm → core}/toolResultTypes.d.ts +1 -1
  125. package/dist/core/validation/outputParser.d.ts +1 -1
  126. package/dist/llm/hazeTools.js +2 -0
  127. package/dist/llm/lsp/pool.js +1 -1
  128. package/dist/llm/lsp/workspaceEdit.d.ts +1 -1
  129. package/dist/llm/requestContext.d.ts +3 -0
  130. package/dist/llm/requestContext.js +20 -8
  131. package/dist/llm/systemPrompt.js +10 -3
  132. package/dist/llm/toolGroups.d.ts +534 -0
  133. package/dist/llm/toolGroups.js +57 -0
  134. package/dist/llm/tools/editMatch.d.ts +1 -1
  135. package/dist/llm/tools/failures.d.ts +1 -1
  136. package/dist/llm/tools/fileToolShared.d.ts +1 -1
  137. package/dist/llm/tools/fileToolShared.js +1 -1
  138. package/dist/llm/tools/fileTools.js +1 -1
  139. package/dist/llm/tools/gitTools.d.ts +12 -0
  140. package/dist/llm/tools/gitTools.js +527 -0
  141. package/dist/llm/tools/readRecovery.d.ts +1 -1
  142. package/dist/llm/tools/replaceInFiles.d.ts +1 -1
  143. package/dist/llm/tools/replaceInFiles.js +1 -1
  144. package/dist/llm/tools/taskTool.js +4 -1
  145. package/dist/llm/tools/toolContext.js +5 -2
  146. package/dist/llm/tools/toolContextState.d.ts +1 -1
  147. package/dist/llm/tools/workspaceFile.d.ts +2 -2
  148. package/dist/llm/tools/workspaceFile.js +10 -5
  149. package/dist/skills/SkillRegistry.js +1 -1
  150. package/dist/skills/builder/SkillBuilder.js +1 -1
  151. package/dist/skills/plugins/installer.js +1 -1
  152. package/dist/skills/plugins/runtime.js +1 -1
  153. package/dist/ui/components/MarkdownText.d.ts +14 -0
  154. package/dist/ui/components/MarkdownText.js +77 -12
  155. package/dist/ui/components/NativeIndicators.js +5 -1
  156. package/dist/ui/components/StreamingMarkdownText.d.ts +3 -1
  157. package/dist/ui/components/StreamingMarkdownText.js +39 -11
  158. package/dist/ui/components/TextInput.d.ts +1 -2
  159. package/dist/ui/components/TextInput.js +79 -9
  160. package/dist/ui/components/WizardChoices.d.ts +1 -2
  161. package/dist/ui/components/useInputSuggestions.d.ts +1 -1
  162. package/dist/ui/components/useInputSuggestions.js +1 -1
  163. package/dist/ui/mentionDetection.d.ts +20 -0
  164. package/dist/ui/mentionDetection.js +24 -0
  165. package/dist/ui/terminalColors.d.ts +4 -4
  166. package/dist/ui/terminalColors.js +23 -6
  167. package/dist/ui/terminalSanitize.js +8 -3
  168. package/dist/ui/textGeometry.d.ts +2 -0
  169. package/dist/ui/textGeometry.js +6 -0
  170. package/dist/ui/themes/registry.js +33 -33
  171. package/dist/utils/openPath.js +7 -0
  172. package/package.json +13 -13
  173. /package/dist/{llm/tools → core/ignore}/gitIgnore.d.ts +0 -0
  174. /package/dist/{llm/tools → core/ignore}/gitIgnore.js +0 -0
  175. /package/dist/{config → core}/paths.d.ts +0 -0
  176. /package/dist/{config → core}/paths.js +0 -0
  177. /package/dist/{config → core/persistence}/privateStorage.d.ts +0 -0
  178. /package/dist/{llm → core}/toolResultTypes.js +0 -0
@@ -48,7 +48,12 @@ export function stripTerminalControlSequences(text) {
48
48
  index += 1 + consumeStringSequence(text, index + 1);
49
49
  continue;
50
50
  }
51
- if ((code >= 0x80 && code <= 0x9f) || (code < 0x20 && code !== 0x09 && code !== 0x0a)) {
51
+ // C0/C1 controls except \t/\n, plus DEL (0x7F), zero-width no-break space
52
+ // (U+FEFF), and the bidi override/isolate controls (U+202A–U+202E,
53
+ // U+2066–U+2069) that can visually reorder untrusted quoted text (SEC-08/FE-17).
54
+ if ((code >= 0x80 && code <= 0x9f) || code === 0x7f || code === 0xfeff
55
+ || (code >= 0x202a && code <= 0x202e) || (code >= 0x2066 && code <= 0x2069)
56
+ || (code < 0x20 && code !== 0x09 && code !== 0x0a)) {
52
57
  index += 1;
53
58
  continue;
54
59
  }
@@ -65,8 +70,8 @@ function consumeEscape(text, index) {
65
70
  return 1; // trailing lone ESC: drop it
66
71
  if (next === 0x5b)
67
72
  return 2 + consumeCsi(text, index + 2); // ESC [ → CSI
68
- if (next === 0x5d || next === 0x50 || next === 0x5e || next === 0x5f) {
69
- // ESC ]/P/^/_ → OSC/DCS/PM/APC string sequence.
73
+ if (next === 0x5d || next === 0x50 || next === 0x58 || next === 0x5e || next === 0x5f) {
74
+ // ESC ]/P/X/^/_ → OSC/DCS/SOS/PM/APC string sequence (X = SOS, SEC-08).
70
75
  return 2 + consumeStringSequence(text, index + 2);
71
76
  }
72
77
  if (next >= 0x20 && next <= 0x2f) {
@@ -6,6 +6,8 @@ export declare function graphemes(text: string): {
6
6
  }[];
7
7
  export declare function previousBoundary(text: string, cursor: number): number;
8
8
  export declare function nextBoundary(text: string, cursor: number): number;
9
+ /** Start offset of the word before `cursor` (readline Ctrl+W semantics): skip trailing whitespace, then the word. */
10
+ export declare function previousWordBoundary(text: string, cursor: number): number;
9
11
  /** UTF-16 offsets stay distinct from terminal-cell columns. */
10
12
  export declare function offsetAtColumn(text: string, column: number): number;
11
13
  export declare function clipCells(text: string, width: number): string;
@@ -9,6 +9,12 @@ export function previousBoundary(text, cursor) {
9
9
  export function nextBoundary(text, cursor) {
10
10
  return graphemes(text).find(part => part.end > cursor)?.end ?? text.length;
11
11
  }
12
+ /** Start offset of the word before `cursor` (readline Ctrl+W semantics): skip trailing whitespace, then the word. */
13
+ export function previousWordBoundary(text, cursor) {
14
+ const before = text.slice(0, cursor);
15
+ const word = /\S+\s*$/.exec(before);
16
+ return word ? word.index : /\s+$/.exec(before)?.index ?? 0;
17
+ }
12
18
  /** UTF-16 offsets stay distinct from terminal-cell columns. */
13
19
  export function offsetAtColumn(text, column) {
14
20
  let cells = 0;
@@ -35,18 +35,18 @@ const light = {
35
35
  roles: {
36
36
  // Pure white terminal background; layered surfaces stay slightly off-white.
37
37
  background: '#ffffff',
38
- accent: '#a78bfa',
38
+ accent: '#7c3aed', // darkened from #a78bfa for WCAG >= 3:1 on white (FE-15)
39
39
  accentDim: '#c4b5fd',
40
40
  border: '#6b7280',
41
41
  info: '#3b82f6',
42
42
  muted: '#6b7280',
43
43
  foreground: '#1e293b',
44
- command: '#f59e0b',
45
- success: '#10b981',
44
+ command: '#0e7490', // darkened from #f59e0b (FE-15)
45
+ success: '#059669', // darkened from #10b981 (FE-15)
46
46
  successBg: '#f0fdf4',
47
47
  danger: '#ef4444',
48
48
  dangerBg: '#fef2f2',
49
- warning: '#f59e0b',
49
+ warning: '#b45309', // darkened from #f59e0b so warning/codeBg also passes (FE-15)
50
50
  surfaceBg: '#f8fafc',
51
51
  codeBg: '#f1f5f9',
52
52
  },
@@ -69,9 +69,9 @@ const robbyrussell = {
69
69
  foreground: 'default',
70
70
  command: 'cyan',
71
71
  success: 'green',
72
- successBg: '22',
72
+ successBg: '16', // black: keeps the source fg (green) at WCAG >= 3:1 on the diff surface (FE-15)
73
73
  danger: 'red',
74
- dangerBg: '52',
74
+ dangerBg: '16', // black: keeps the source fg (red) at WCAG >= 3:1 on the diff surface (FE-15)
75
75
  warning: 'yellow',
76
76
  surfaceBg: '234',
77
77
  codeBg: '234',
@@ -90,13 +90,13 @@ const afMagic = {
90
90
  accentDim: '61',
91
91
  border: '237',
92
92
  info: '75',
93
- muted: '237',
93
+ muted: '245', // lightened from 237 for WCAG >= 3:1 on the canvas (FE-15)
94
94
  foreground: '251',
95
95
  command: '32',
96
96
  success: '78',
97
- successBg: '22',
97
+ successBg: '16', // black: keeps the source fg (green) at WCAG >= 3:1 on the diff surface (FE-15)
98
98
  danger: 'red',
99
- dangerBg: '52',
99
+ dangerBg: '16', // black: keeps the source fg (red) at WCAG >= 3:1 on the diff surface (FE-15)
100
100
  warning: '214',
101
101
  surfaceBg: '234',
102
102
  codeBg: '234',
@@ -134,9 +134,9 @@ const agnoster = {
134
134
  foreground: 'default',
135
135
  command: 'blue',
136
136
  success: 'green',
137
- successBg: '22',
137
+ successBg: '16', // black: keeps the source fg (green) at WCAG >= 3:1 on the diff surface (FE-15)
138
138
  danger: 'red',
139
- dangerBg: '52',
139
+ dangerBg: '16', // black: keeps the source fg (red) at WCAG >= 3:1 on the diff surface (FE-15)
140
140
  warning: 'yellow',
141
141
  surfaceBg: '#073642', // base02
142
142
  codeBg: '#073642', // base02
@@ -162,9 +162,9 @@ const bira = {
162
162
  foreground: 'default',
163
163
  command: 'blue',
164
164
  success: 'green',
165
- successBg: '22',
165
+ successBg: '16', // black: keeps the source fg (green) at WCAG >= 3:1 on the diff surface (FE-15)
166
166
  danger: 'red',
167
- dangerBg: '52',
167
+ dangerBg: '16', // black: keeps the source fg (red) at WCAG >= 3:1 on the diff surface (FE-15)
168
168
  warning: 'yellow',
169
169
  surfaceBg: '234',
170
170
  codeBg: '234',
@@ -190,9 +190,9 @@ const bureau = {
190
190
  foreground: 'default',
191
191
  command: 'white',
192
192
  success: 'green',
193
- successBg: '22',
193
+ successBg: '16', // black: keeps the source fg (green) at WCAG >= 3:1 on the diff surface (FE-15)
194
194
  danger: 'red',
195
- dangerBg: '52',
195
+ dangerBg: '16', // black: keeps the source fg (red) at WCAG >= 3:1 on the diff surface (FE-15)
196
196
  warning: 'yellow',
197
197
  surfaceBg: '234',
198
198
  codeBg: '235',
@@ -217,9 +217,9 @@ const clean = {
217
217
  foreground: 'default',
218
218
  command: 'blue',
219
219
  success: 'green',
220
- successBg: '22',
220
+ successBg: '16', // black: keeps the source fg (green) at WCAG >= 3:1 on the diff surface (FE-15)
221
221
  danger: 'red',
222
- dangerBg: '52',
222
+ dangerBg: '16', // black: keeps the source fg (red) at WCAG >= 3:1 on the diff surface (FE-15)
223
223
  warning: 'yellow',
224
224
  surfaceBg: '234',
225
225
  codeBg: '234',
@@ -241,9 +241,9 @@ const cloud = {
241
241
  foreground: 'default',
242
242
  command: 'green',
243
243
  success: 'green',
244
- successBg: '22',
244
+ successBg: '16', // black: keeps the source fg (green) at WCAG >= 3:1 on the diff surface (FE-15)
245
245
  danger: 'red',
246
- dangerBg: '52',
246
+ dangerBg: '16', // black: keeps the source fg (red) at WCAG >= 3:1 on the diff surface (FE-15)
247
247
  warning: 'yellow',
248
248
  surfaceBg: '234',
249
249
  codeBg: '234',
@@ -261,7 +261,7 @@ const dst = {
261
261
  roles: {
262
262
  // Classic dark-terminal canvas, one step under the xterm-256 234 surfaces.
263
263
  background: '#121212',
264
- accent: 'magenta',
264
+ accent: '201', // bright magenta: source 'magenta' fails WCAG >= 3:1 on the canvas (FE-15)
265
265
  accentDim: 'magenta',
266
266
  border: '236',
267
267
  info: 'green',
@@ -269,9 +269,9 @@ const dst = {
269
269
  foreground: 'default',
270
270
  command: 'blue',
271
271
  success: 'green',
272
- successBg: '22',
272
+ successBg: '16', // black: keeps the source fg (green) at WCAG >= 3:1 on the diff surface (FE-15)
273
273
  danger: 'red',
274
- dangerBg: '52',
274
+ dangerBg: '16', // black: keeps the source fg (red) at WCAG >= 3:1 on the diff surface (FE-15)
275
275
  warning: 'yellow',
276
276
  surfaceBg: '234',
277
277
  codeBg: '234',
@@ -294,9 +294,9 @@ const fishy = {
294
294
  foreground: 'default',
295
295
  command: 'green',
296
296
  success: 'green',
297
- successBg: '22',
297
+ successBg: '16', // black: keeps the source fg (green) at WCAG >= 3:1 on the diff surface (FE-15)
298
298
  danger: 'red',
299
- dangerBg: '52',
299
+ dangerBg: '16', // black: keeps the source fg (red) at WCAG >= 3:1 on the diff surface (FE-15)
300
300
  warning: 'yellow',
301
301
  surfaceBg: '234',
302
302
  codeBg: '235',
@@ -323,9 +323,9 @@ const steeef = {
323
323
  foreground: 'default',
324
324
  command: '118',
325
325
  success: '118',
326
- successBg: '22',
326
+ successBg: '16', // black: keeps the source fg (green) at WCAG >= 3:1 on the diff surface (FE-15)
327
327
  danger: '161',
328
- dangerBg: '52',
328
+ dangerBg: '16', // black: keeps the source fg (red) at WCAG >= 3:1 on the diff surface (FE-15)
329
329
  warning: '166',
330
330
  surfaceBg: '234',
331
331
  codeBg: '235',
@@ -363,16 +363,16 @@ const solarizedDark = {
363
363
  accentDim: '#6c71c4', // violet
364
364
  border: '#586e75', // base01 — chrome structure
365
365
  info: 'cyan',
366
- muted: '#586e75', // base01 — dark-mode comments
366
+ muted: '#657b83', // base00 — base01 fails WCAG >= 3:1 on base03 (FE-15)
367
367
  foreground: 'default',
368
368
  command: 'yellow',
369
369
  success: 'green',
370
370
  successBg: '#073642', // base02
371
371
  danger: 'red',
372
- dangerBg: '#073642', // base02
372
+ dangerBg: '#002b36', // base03 — red on base02 fails WCAG >= 3:1 (FE-15)
373
373
  warning: '#cb4b16', // orange
374
374
  surfaceBg: '#073642', // base02
375
- codeBg: '#073642', // base02
375
+ codeBg: '#002b36', // base03 — orange on base02 fails WCAG >= 3:1 (FE-15)
376
376
  },
377
377
  };
378
378
  /**
@@ -402,11 +402,11 @@ const solarizedLight = {
402
402
  accent: 'blue',
403
403
  accentDim: '#6c71c4', // violet
404
404
  border: '#93a1a1', // base1 — chrome structure on light
405
- info: 'cyan',
406
- muted: '#93a1a1', // base1 — light-mode comments
405
+ info: '#6c71c4', // violet — cyan fails WCAG >= 3:1 on base3 (FE-15)
406
+ muted: '#586e75', // base01 — base1 fails WCAG >= 3:1 on base3 (FE-15)
407
407
  foreground: 'default',
408
- command: 'yellow',
409
- success: 'green',
408
+ command: '#d33682', // magenta — yellow fails WCAG >= 3:1 on base3 (FE-15)
409
+ success: '28', // dark green — solarized green fails WCAG >= 3:1 on base3 (FE-15)
410
410
  successBg: '#eee8d5', // base2
411
411
  danger: 'red',
412
412
  dangerBg: '#eee8d5', // base2
@@ -5,6 +5,13 @@ export function openPath(target, onError) {
5
5
  // the empty string is the start command's title argument; without it, start
6
6
  // would treat a quoted URL as the window title.
7
7
  const command = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'cmd' : 'xdg-open';
8
+ // SEC-10: `cmd /c start` re-parses its command line, so cmd metacharacters in
9
+ // the target would be interpreted. No current caller passes one, but refuse
10
+ // them defensively on win32 instead of spawning a re-parse.
11
+ if (process.platform === 'win32' && /[\r\n"&|^<>]/.test(target)) {
12
+ onError?.(new Error(`Refusing to open a target containing cmd.exe metacharacters: ${target}`));
13
+ return Promise.resolve(false);
14
+ }
8
15
  const args = process.platform === 'win32' ? ['/c', 'start', '', target] : [target];
9
16
  return new Promise(resolve => {
10
17
  const child = spawn(command, args, { stdio: 'ignore', detached: true, windowsHide: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@denizokcu/haze",
3
- "version": "1.7.12",
3
+ "version": "1.8.0",
4
4
  "description": "A minimal LLM harness for your terminal.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -38,7 +38,7 @@
38
38
  "start": "node dist/cli/index.js",
39
39
  "test": "vitest run",
40
40
  "test:watch": "vitest",
41
- "lint": "eslint src/",
41
+ "lint": "eslint src/ bin/ scripts/",
42
42
  "lint:fix": "eslint src/ --fix",
43
43
  "lint:knip": "knip",
44
44
  "typecheck": "tsc --noEmit",
@@ -51,19 +51,19 @@
51
51
  "eval:native": "node scripts/run-native-evals.mjs"
52
52
  },
53
53
  "dependencies": {
54
- "@ai-sdk/mcp": "^2.0.102",
55
- "@ai-sdk/openai": "4.0.122",
54
+ "@ai-sdk/mcp": "^2.0.104",
55
+ "@ai-sdk/openai": "4.0.123",
56
56
  "@ai-sdk/openai-compatible": "3.0.94",
57
57
  "@inkjs/ui": "2.0.0",
58
58
  "@openrouter/ai-sdk-provider": "^3.1.0",
59
59
  "@vscode/ripgrep": "1.18.0",
60
- "ai": "7.0.178",
60
+ "ai": "7.0.181",
61
61
  "commander": "15.1.0",
62
62
  "defuddle": "^0.19.13",
63
63
  "highlight.js": "^11.12.0",
64
- "ignore": "^7.0.16",
64
+ "ignore": "^7.0.17",
65
65
  "ink": "8.0.0",
66
- "marked": "18.2.1",
66
+ "marked": "18.3.0",
67
67
  "react": "19.3.1",
68
68
  "string-width": "9.0.0",
69
69
  "web-tree-sitter": "^0.27.2",
@@ -73,19 +73,19 @@
73
73
  },
74
74
  "devDependencies": {
75
75
  "@eslint/js": "^10.0.1",
76
- "@types/node": "26.6.6",
77
- "@types/react": "19.3.0",
76
+ "@types/node": "26.6.10",
77
+ "@types/react": "19.3.3",
78
78
  "eslint": "^10.15.0",
79
79
  "ink-testing-library": "^4.0.0",
80
80
  "jscpd": "^5.4.3",
81
- "knip": "6.47.0",
82
- "lefthook": "^2.2.2",
81
+ "knip": "6.48.0",
82
+ "lefthook": "^2.2.3",
83
83
  "strip-ansi": "7.2.0",
84
84
  "tree-sitter-wasms": "^0.1.13",
85
85
  "tsx": "4.23.15",
86
86
  "typescript": "6.0.3",
87
- "typescript-eslint": "^8.73.0",
88
- "vitest": "^5.1.1"
87
+ "typescript-eslint": "^8.74.0",
88
+ "vitest": "^5.1.2"
89
89
  },
90
90
  "overrides": {
91
91
  "minimatch": "11.0.1"
File without changes
File without changes
File without changes
File without changes
File without changes