@denizokcu/haze 0.8.0 → 0.10.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 (182) hide show
  1. package/CHANGELOG.md +67 -17
  2. package/README.md +121 -64
  3. package/dist/cli/chat/chatMetrics.d.ts +17 -1
  4. package/dist/cli/chat/chatMetrics.js +22 -5
  5. package/dist/cli/chat/contextReport.d.ts +11 -0
  6. package/dist/cli/chat/contextReport.js +44 -0
  7. package/dist/cli/chat/fileMentionSuggestions.d.ts +29 -0
  8. package/dist/cli/chat/fileMentionSuggestions.js +91 -0
  9. package/dist/cli/chat/inputSuggestions.d.ts +5 -0
  10. package/dist/cli/chat/inputSuggestions.js +17 -3
  11. package/dist/cli/chat/sessionLifecycle.d.ts +58 -0
  12. package/dist/cli/chat/sessionLifecycle.js +155 -0
  13. package/dist/cli/chat/sessionRecorder.d.ts +3 -0
  14. package/dist/cli/chat/sessionRecorder.js +21 -8
  15. package/dist/cli/chat/startupInfo.d.ts +1 -0
  16. package/dist/cli/chat/startupInfo.js +11 -0
  17. package/dist/cli/chat/tips.d.ts +21 -0
  18. package/dist/cli/chat/tips.js +43 -0
  19. package/dist/cli/chat/wizardDispatch.d.ts +64 -0
  20. package/dist/cli/chat/wizardDispatch.js +645 -0
  21. package/dist/cli/commands/chat.d.ts +1 -0
  22. package/dist/cli/commands/chat.js +246 -779
  23. package/dist/cli/commands/chatModes.d.ts +1 -1
  24. package/dist/cli/commands/chatModes.js +7 -2
  25. package/dist/cli/commands/commandHelp.js +5 -3
  26. package/dist/cli/commands/commands.d.ts +4 -3
  27. package/dist/cli/commands/commands.js +12 -13
  28. package/dist/cli/commands/fleetCommand.d.ts +14 -0
  29. package/dist/cli/commands/fleetCommand.js +46 -0
  30. package/dist/cli/commands/formatters.d.ts +5 -0
  31. package/dist/cli/commands/formatters.js +36 -9
  32. package/dist/cli/commands/logsCommand.js +8 -28
  33. package/dist/cli/commands/mcpWizard.js +24 -2
  34. package/dist/cli/commands/modelCommand.js +1 -1
  35. package/dist/cli/commands/providerWizard.d.ts +1 -0
  36. package/dist/cli/commands/providerWizard.js +31 -5
  37. package/dist/cli/commands/runCommand.d.ts +1 -0
  38. package/dist/cli/commands/runCommand.js +32 -20
  39. package/dist/cli/commands/sessionPicker.d.ts +9 -0
  40. package/dist/cli/commands/sessionPicker.js +29 -0
  41. package/dist/cli/commands/settingsSummary.js +8 -4
  42. package/dist/cli/commands/skillConfirmRemove.js +4 -3
  43. package/dist/cli/commands/skillWizard.d.ts +2 -0
  44. package/dist/cli/commands/skillWizard.js +16 -6
  45. package/dist/cli/commands/streaming/idleTimer.d.ts +26 -0
  46. package/dist/cli/commands/streaming/idleTimer.js +24 -0
  47. package/dist/cli/commands/streaming/toolGroupRenderer.d.ts +2 -0
  48. package/dist/cli/commands/streaming/toolGroupRenderer.js +4 -2
  49. package/dist/cli/commands/streaming/turnOutcome.d.ts +10 -0
  50. package/dist/cli/commands/streaming/turnOutcome.js +13 -0
  51. package/dist/cli/commands/streaming/turnRuntime.js +6 -4
  52. package/dist/cli/commands/streaming.d.ts +13 -1
  53. package/dist/cli/commands/streaming.js +104 -44
  54. package/dist/cli/commands/wizardActions.d.ts +6 -0
  55. package/dist/cli/commands/wizardActions.js +6 -0
  56. package/dist/cli/commands/wizardPrompts.js +1 -1
  57. package/dist/cli/commands/wizardSuggestions.d.ts +8 -0
  58. package/dist/cli/commands/wizardSuggestions.js +62 -13
  59. package/dist/cli/commands/wizardTransition.d.ts +37 -0
  60. package/dist/cli/commands/wizardTransition.js +43 -0
  61. package/dist/cli/index.js +17 -3
  62. package/dist/cli/terminalTitle.d.ts +6 -0
  63. package/dist/cli/terminalTitle.js +36 -0
  64. package/dist/config/contextFiles.js +6 -3
  65. package/dist/config/endpointSecurity.d.ts +2 -0
  66. package/dist/config/endpointSecurity.js +28 -0
  67. package/dist/config/inputHistory.d.ts +3 -3
  68. package/dist/config/inputHistory.js +13 -17
  69. package/dist/config/modelDiscovery.d.ts +20 -0
  70. package/dist/config/modelDiscovery.js +51 -0
  71. package/dist/config/privateStorage.d.ts +6 -0
  72. package/dist/config/privateStorage.js +61 -0
  73. package/dist/config/providerPresets.d.ts +16 -4
  74. package/dist/config/providerPresets.js +263 -34
  75. package/dist/config/providers.d.ts +2 -0
  76. package/dist/config/providers.js +7 -0
  77. package/dist/config/settings.d.ts +22 -0
  78. package/dist/config/settings.js +33 -5
  79. package/dist/config/skillSettings.d.ts +6 -13
  80. package/dist/config/skillSettings.js +20 -19
  81. package/dist/config/updateCheck.js +4 -2
  82. package/dist/core/agent/budgets.d.ts +26 -0
  83. package/dist/core/agent/budgets.js +34 -0
  84. package/dist/core/agent/compaction.js +17 -3
  85. package/dist/core/agent/contextBudget.d.ts +8 -0
  86. package/dist/core/agent/contextBudget.js +29 -0
  87. package/dist/core/agent/errors.js +6 -2
  88. package/dist/core/agent/events.d.ts +12 -0
  89. package/dist/core/agent/toolOutputStore.d.ts +8 -0
  90. package/dist/core/agent/toolOutputStore.js +49 -11
  91. package/dist/core/agent/workState.d.ts +1 -1
  92. package/dist/core/agent/workState.js +0 -4
  93. package/dist/core/attachments/imageAttachments.d.ts +90 -0
  94. package/dist/core/attachments/imageAttachments.js +245 -0
  95. package/dist/core/attachments/readBlessings.d.ts +37 -0
  96. package/dist/core/attachments/readBlessings.js +79 -0
  97. package/dist/core/goal/completionPolicy.d.ts +0 -28
  98. package/dist/core/goal/completionPolicy.js +0 -88
  99. package/dist/core/goal/requestClassifier.d.ts +0 -3
  100. package/dist/core/goal/requestClassifier.js +0 -13
  101. package/dist/core/io/boundedRead.d.ts +15 -0
  102. package/dist/core/io/boundedRead.js +144 -0
  103. package/dist/core/limits/byteBudgets.d.ts +18 -0
  104. package/dist/core/limits/byteBudgets.js +18 -0
  105. package/dist/core/limits/textBudgets.d.ts +23 -0
  106. package/dist/core/limits/textBudgets.js +23 -0
  107. package/dist/core/log/llmLog.d.ts +10 -0
  108. package/dist/core/log/llmLog.js +59 -13
  109. package/dist/core/persistence/orderedFileWriter.d.ts +11 -0
  110. package/dist/core/persistence/orderedFileWriter.js +29 -0
  111. package/dist/core/process/backgroundRegistry.d.ts +35 -0
  112. package/dist/core/process/backgroundRegistry.js +194 -0
  113. package/dist/core/process/runBoundedProcess.d.ts +30 -0
  114. package/dist/core/process/runBoundedProcess.js +116 -0
  115. package/dist/core/safety/urlGuard.d.ts +2 -1
  116. package/dist/core/safety/urlGuard.js +3 -2
  117. package/dist/core/session/sessionSlimming.js +47 -4
  118. package/dist/core/session/sessionStore.d.ts +37 -0
  119. package/dist/core/session/sessionStore.js +136 -27
  120. package/dist/core/subagent/contracts.d.ts +116 -0
  121. package/dist/core/subagent/contracts.js +54 -0
  122. package/dist/core/subagent/executionProfiles.d.ts +28 -0
  123. package/dist/core/subagent/executionProfiles.js +45 -0
  124. package/dist/core/subagent/subagentCoordinator.d.ts +74 -0
  125. package/dist/core/subagent/subagentCoordinator.js +134 -0
  126. package/dist/core/subagent/subagentRunner.d.ts +211 -145
  127. package/dist/core/subagent/subagentRunner.js +228 -98
  128. package/dist/core/subagent/workspaceMutationPolicy.d.ts +11 -0
  129. package/dist/core/subagent/workspaceMutationPolicy.js +52 -0
  130. package/dist/core/tasks/taskStorage.js +12 -1
  131. package/dist/llm/client.d.ts +20 -29
  132. package/dist/llm/client.js +33 -29
  133. package/dist/llm/hazeTools.d.ts +2396 -67
  134. package/dist/llm/hazeTools.js +50 -37
  135. package/dist/llm/lsp.d.ts +23 -3
  136. package/dist/llm/lsp.js +73 -16
  137. package/dist/llm/lspTools.d.ts +96 -48
  138. package/dist/llm/mcp.d.ts +1 -1
  139. package/dist/llm/mcp.js +65 -16
  140. package/dist/llm/requestContext.d.ts +23 -1
  141. package/dist/llm/requestContext.js +50 -7
  142. package/dist/llm/systemPrompt.d.ts +4 -1
  143. package/dist/llm/systemPrompt.js +14 -4
  144. package/dist/llm/toolResultTypes.d.ts +1 -1
  145. package/dist/llm/tools/bashTool.d.ts +1210 -16
  146. package/dist/llm/tools/bashTool.js +43 -60
  147. package/dist/llm/tools/fetchTool.d.ts +26 -26
  148. package/dist/llm/tools/fetchTool.js +1 -1
  149. package/dist/llm/tools/fileToolShared.d.ts +2 -1
  150. package/dist/llm/tools/fileToolShared.js +5 -5
  151. package/dist/llm/tools/grepRunner.d.ts +20 -0
  152. package/dist/llm/tools/grepRunner.js +66 -0
  153. package/dist/llm/tools/outputCap.d.ts +2 -6
  154. package/dist/llm/tools/outputCap.js +2 -6
  155. package/dist/llm/tools/processTool.d.ts +1077 -0
  156. package/dist/llm/tools/processTool.js +41 -0
  157. package/dist/llm/tools/toolContext.d.ts +8 -0
  158. package/dist/llm/tools/toolContext.js +22 -11
  159. package/dist/llm/tools/workspaceFile.d.ts +9 -1
  160. package/dist/llm/tools/workspaceFile.js +33 -4
  161. package/dist/llm/webFetch.js +24 -11
  162. package/dist/llm/workerContext.d.ts +18 -0
  163. package/dist/llm/workerContext.js +55 -0
  164. package/dist/skills/SkillLoader.d.ts +2 -2
  165. package/dist/skills/SkillLoader.js +17 -5
  166. package/dist/skills/SkillRegistry.d.ts +3 -2
  167. package/dist/skills/SkillRegistry.js +53 -10
  168. package/dist/skills/builder/SkillBuilder.d.ts +3 -0
  169. package/dist/skills/builder/SkillBuilder.js +23 -5
  170. package/dist/skills/skillTools.js +11 -4
  171. package/dist/skills/types.d.ts +11 -1
  172. package/dist/ui/components/TextInput.d.ts +5 -2
  173. package/dist/ui/components/TextInput.js +76 -8
  174. package/dist/utils/format.d.ts +2 -0
  175. package/dist/utils/format.js +8 -0
  176. package/dist/utils/fs.d.ts +0 -1
  177. package/dist/utils/fs.js +0 -4
  178. package/dist/utils/openPath.d.ts +2 -0
  179. package/dist/utils/openPath.js +9 -0
  180. package/dist/utils/path.d.ts +2 -0
  181. package/dist/utils/path.js +9 -4
  182. package/package.json +1 -1
@@ -5,12 +5,14 @@ export declare const bashTool: ({
5
5
  inputSchema: import("ai").FlexibleSchema<{
6
6
  command: string;
7
7
  allowMutation: boolean;
8
+ background: boolean;
8
9
  timeoutSeconds?: number | undefined;
9
10
  }>;
10
11
  contextSchema?: import("ai").FlexibleSchema<import("./toolContext.js").HazeToolContext> | undefined;
11
12
  needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
12
13
  command: string;
13
14
  allowMutation: boolean;
15
+ background: boolean;
14
16
  timeoutSeconds?: number | undefined;
15
17
  }, NoInfer<import("./toolContext.js").HazeToolContext>> | undefined;
16
18
  onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("./toolContext.js").HazeToolContext>>) => void | PromiseLike<void>) | undefined;
@@ -21,6 +23,7 @@ export declare const bashTool: ({
21
23
  input: {
22
24
  command: string;
23
25
  allowMutation: boolean;
26
+ background: boolean;
24
27
  timeoutSeconds?: number | undefined;
25
28
  };
26
29
  } & import("ai").ToolExecutionOptions<NoInfer<import("./toolContext.js").HazeToolContext>>) => void | PromiseLike<void>) | undefined;
@@ -29,17 +32,238 @@ export declare const bashTool: ({
29
32
  input: {
30
33
  command: string;
31
34
  allowMutation: boolean;
35
+ background: boolean;
32
36
  timeoutSeconds?: number | undefined;
33
37
  };
34
- output: unknown;
38
+ output: NoInfer<{
39
+ ok: true;
40
+ duplicateSkipped: true;
41
+ toolName: string;
42
+ reason: string;
43
+ } | {
44
+ ok: boolean;
45
+ command: string;
46
+ reasonCode: string;
47
+ recoverable: boolean;
48
+ error: string;
49
+ suggestedNextStep: string;
50
+ background?: undefined;
51
+ } | {
52
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
53
+ hint: string;
54
+ backgroundId: string;
55
+ pid?: number;
56
+ command: string;
57
+ cwd: string;
58
+ startedAt: string;
59
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
60
+ code?: number | null;
61
+ signal?: NodeJS.Signals | null;
62
+ outputHandle: string;
63
+ outputBytes: {
64
+ totalBytes: number;
65
+ retainedBytes: number;
66
+ omittedBytes: number;
67
+ };
68
+ error?: string;
69
+ ok: boolean;
70
+ background: boolean;
71
+ reasonCode?: undefined;
72
+ recoverable?: undefined;
73
+ suggestedNextStep?: undefined;
74
+ } | {
75
+ ok: boolean;
76
+ background: boolean;
77
+ command: string;
78
+ reasonCode: string;
79
+ recoverable: boolean;
80
+ error: string;
81
+ suggestedNextStep: string;
82
+ } | {
83
+ error?: string | undefined;
84
+ ok: boolean;
85
+ code: number | null;
86
+ command: string;
87
+ cwd: string;
88
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
89
+ durationMs: number;
90
+ timedOut: boolean;
91
+ aborted: boolean;
92
+ signal: NodeJS.Signals | null;
93
+ forcedTermination: boolean;
94
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
95
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
96
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
97
+ stdoutBytes: {
98
+ totalBytes: number;
99
+ retainedBytes: number;
100
+ omittedBytes: number;
101
+ };
102
+ stderrBytes: {
103
+ totalBytes: number;
104
+ retainedBytes: number;
105
+ omittedBytes: number;
106
+ };
107
+ reasonCode?: undefined;
108
+ recoverable?: undefined;
109
+ suggestedNextStep?: undefined;
110
+ background?: undefined;
111
+ }>;
35
112
  }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
36
113
  } & {
37
- outputSchema?: import("ai").FlexibleSchema<unknown> | undefined;
114
+ outputSchema?: import("ai").FlexibleSchema<{
115
+ ok: true;
116
+ duplicateSkipped: true;
117
+ toolName: string;
118
+ reason: string;
119
+ } | {
120
+ ok: boolean;
121
+ command: string;
122
+ reasonCode: string;
123
+ recoverable: boolean;
124
+ error: string;
125
+ suggestedNextStep: string;
126
+ background?: undefined;
127
+ } | {
128
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
129
+ hint: string;
130
+ backgroundId: string;
131
+ pid?: number;
132
+ command: string;
133
+ cwd: string;
134
+ startedAt: string;
135
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
136
+ code?: number | null;
137
+ signal?: NodeJS.Signals | null;
138
+ outputHandle: string;
139
+ outputBytes: {
140
+ totalBytes: number;
141
+ retainedBytes: number;
142
+ omittedBytes: number;
143
+ };
144
+ error?: string;
145
+ ok: boolean;
146
+ background: boolean;
147
+ reasonCode?: undefined;
148
+ recoverable?: undefined;
149
+ suggestedNextStep?: undefined;
150
+ } | {
151
+ ok: boolean;
152
+ background: boolean;
153
+ command: string;
154
+ reasonCode: string;
155
+ recoverable: boolean;
156
+ error: string;
157
+ suggestedNextStep: string;
158
+ } | {
159
+ error?: string | undefined;
160
+ ok: boolean;
161
+ code: number | null;
162
+ command: string;
163
+ cwd: string;
164
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
165
+ durationMs: number;
166
+ timedOut: boolean;
167
+ aborted: boolean;
168
+ signal: NodeJS.Signals | null;
169
+ forcedTermination: boolean;
170
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
171
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
172
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
173
+ stdoutBytes: {
174
+ totalBytes: number;
175
+ retainedBytes: number;
176
+ omittedBytes: number;
177
+ };
178
+ stderrBytes: {
179
+ totalBytes: number;
180
+ retainedBytes: number;
181
+ omittedBytes: number;
182
+ };
183
+ reasonCode?: undefined;
184
+ recoverable?: undefined;
185
+ suggestedNextStep?: undefined;
186
+ background?: undefined;
187
+ }> | undefined;
38
188
  execute: import("ai").ToolExecuteFunction<{
39
189
  command: string;
40
190
  allowMutation: boolean;
191
+ background: boolean;
41
192
  timeoutSeconds?: number | undefined;
42
- }, unknown, NoInfer<import("./toolContext.js").HazeToolContext>>;
193
+ }, {
194
+ ok: true;
195
+ duplicateSkipped: true;
196
+ toolName: string;
197
+ reason: string;
198
+ } | {
199
+ ok: boolean;
200
+ command: string;
201
+ reasonCode: string;
202
+ recoverable: boolean;
203
+ error: string;
204
+ suggestedNextStep: string;
205
+ background?: undefined;
206
+ } | {
207
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
208
+ hint: string;
209
+ backgroundId: string;
210
+ pid?: number;
211
+ command: string;
212
+ cwd: string;
213
+ startedAt: string;
214
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
215
+ code?: number | null;
216
+ signal?: NodeJS.Signals | null;
217
+ outputHandle: string;
218
+ outputBytes: {
219
+ totalBytes: number;
220
+ retainedBytes: number;
221
+ omittedBytes: number;
222
+ };
223
+ error?: string;
224
+ ok: boolean;
225
+ background: boolean;
226
+ reasonCode?: undefined;
227
+ recoverable?: undefined;
228
+ suggestedNextStep?: undefined;
229
+ } | {
230
+ ok: boolean;
231
+ background: boolean;
232
+ command: string;
233
+ reasonCode: string;
234
+ recoverable: boolean;
235
+ error: string;
236
+ suggestedNextStep: string;
237
+ } | {
238
+ error?: string | undefined;
239
+ ok: boolean;
240
+ code: number | null;
241
+ command: string;
242
+ cwd: string;
243
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
244
+ durationMs: number;
245
+ timedOut: boolean;
246
+ aborted: boolean;
247
+ signal: NodeJS.Signals | null;
248
+ forcedTermination: boolean;
249
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
250
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
251
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
252
+ stdoutBytes: {
253
+ totalBytes: number;
254
+ retainedBytes: number;
255
+ omittedBytes: number;
256
+ };
257
+ stderrBytes: {
258
+ totalBytes: number;
259
+ retainedBytes: number;
260
+ omittedBytes: number;
261
+ };
262
+ reasonCode?: undefined;
263
+ recoverable?: undefined;
264
+ suggestedNextStep?: undefined;
265
+ background?: undefined;
266
+ }, NoInfer<import("./toolContext.js").HazeToolContext>>;
43
267
  } & {
44
268
  description?: string | ((options: {
45
269
  context: NoInfer<import("./toolContext.js").HazeToolContext>;
@@ -50,6 +274,7 @@ export declare const bashTool: ({
50
274
  input: NoInfer<{
51
275
  command: string;
52
276
  allowMutation: boolean;
277
+ background: boolean;
53
278
  timeoutSeconds?: number | undefined;
54
279
  }>;
55
280
  }[] | undefined;
@@ -63,8 +288,82 @@ export declare const bashTool: ({
63
288
  execute: import("ai").ToolExecuteFunction<{
64
289
  command: string;
65
290
  allowMutation: boolean;
291
+ background: boolean;
66
292
  timeoutSeconds?: number | undefined;
67
- }, unknown, NoInfer<import("./toolContext.js").HazeToolContext>>;
293
+ }, {
294
+ ok: true;
295
+ duplicateSkipped: true;
296
+ toolName: string;
297
+ reason: string;
298
+ } | {
299
+ ok: boolean;
300
+ command: string;
301
+ reasonCode: string;
302
+ recoverable: boolean;
303
+ error: string;
304
+ suggestedNextStep: string;
305
+ background?: undefined;
306
+ } | {
307
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
308
+ hint: string;
309
+ backgroundId: string;
310
+ pid?: number;
311
+ command: string;
312
+ cwd: string;
313
+ startedAt: string;
314
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
315
+ code?: number | null;
316
+ signal?: NodeJS.Signals | null;
317
+ outputHandle: string;
318
+ outputBytes: {
319
+ totalBytes: number;
320
+ retainedBytes: number;
321
+ omittedBytes: number;
322
+ };
323
+ error?: string;
324
+ ok: boolean;
325
+ background: boolean;
326
+ reasonCode?: undefined;
327
+ recoverable?: undefined;
328
+ suggestedNextStep?: undefined;
329
+ } | {
330
+ ok: boolean;
331
+ background: boolean;
332
+ command: string;
333
+ reasonCode: string;
334
+ recoverable: boolean;
335
+ error: string;
336
+ suggestedNextStep: string;
337
+ } | {
338
+ error?: string | undefined;
339
+ ok: boolean;
340
+ code: number | null;
341
+ command: string;
342
+ cwd: string;
343
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
344
+ durationMs: number;
345
+ timedOut: boolean;
346
+ aborted: boolean;
347
+ signal: NodeJS.Signals | null;
348
+ forcedTermination: boolean;
349
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
350
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
351
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
352
+ stdoutBytes: {
353
+ totalBytes: number;
354
+ retainedBytes: number;
355
+ omittedBytes: number;
356
+ };
357
+ stderrBytes: {
358
+ totalBytes: number;
359
+ retainedBytes: number;
360
+ omittedBytes: number;
361
+ };
362
+ reasonCode?: undefined;
363
+ recoverable?: undefined;
364
+ suggestedNextStep?: undefined;
365
+ background?: undefined;
366
+ }, NoInfer<import("./toolContext.js").HazeToolContext>>;
68
367
  }) | ({
69
368
  title?: string;
70
369
  providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
@@ -72,12 +371,14 @@ export declare const bashTool: ({
72
371
  inputSchema: import("ai").FlexibleSchema<{
73
372
  command: string;
74
373
  allowMutation: boolean;
374
+ background: boolean;
75
375
  timeoutSeconds?: number | undefined;
76
376
  }>;
77
377
  contextSchema?: import("ai").FlexibleSchema<import("./toolContext.js").HazeToolContext> | undefined;
78
378
  needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
79
379
  command: string;
80
380
  allowMutation: boolean;
381
+ background: boolean;
81
382
  timeoutSeconds?: number | undefined;
82
383
  }, NoInfer<import("./toolContext.js").HazeToolContext>> | undefined;
83
384
  onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("./toolContext.js").HazeToolContext>>) => void | PromiseLike<void>) | undefined;
@@ -88,6 +389,7 @@ export declare const bashTool: ({
88
389
  input: {
89
390
  command: string;
90
391
  allowMutation: boolean;
392
+ background: boolean;
91
393
  timeoutSeconds?: number | undefined;
92
394
  };
93
395
  } & import("ai").ToolExecutionOptions<NoInfer<import("./toolContext.js").HazeToolContext>>) => void | PromiseLike<void>) | undefined;
@@ -96,17 +398,238 @@ export declare const bashTool: ({
96
398
  input: {
97
399
  command: string;
98
400
  allowMutation: boolean;
401
+ background: boolean;
99
402
  timeoutSeconds?: number | undefined;
100
403
  };
101
- output: unknown;
404
+ output: NoInfer<{
405
+ ok: true;
406
+ duplicateSkipped: true;
407
+ toolName: string;
408
+ reason: string;
409
+ } | {
410
+ ok: boolean;
411
+ command: string;
412
+ reasonCode: string;
413
+ recoverable: boolean;
414
+ error: string;
415
+ suggestedNextStep: string;
416
+ background?: undefined;
417
+ } | {
418
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
419
+ hint: string;
420
+ backgroundId: string;
421
+ pid?: number;
422
+ command: string;
423
+ cwd: string;
424
+ startedAt: string;
425
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
426
+ code?: number | null;
427
+ signal?: NodeJS.Signals | null;
428
+ outputHandle: string;
429
+ outputBytes: {
430
+ totalBytes: number;
431
+ retainedBytes: number;
432
+ omittedBytes: number;
433
+ };
434
+ error?: string;
435
+ ok: boolean;
436
+ background: boolean;
437
+ reasonCode?: undefined;
438
+ recoverable?: undefined;
439
+ suggestedNextStep?: undefined;
440
+ } | {
441
+ ok: boolean;
442
+ background: boolean;
443
+ command: string;
444
+ reasonCode: string;
445
+ recoverable: boolean;
446
+ error: string;
447
+ suggestedNextStep: string;
448
+ } | {
449
+ error?: string | undefined;
450
+ ok: boolean;
451
+ code: number | null;
452
+ command: string;
453
+ cwd: string;
454
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
455
+ durationMs: number;
456
+ timedOut: boolean;
457
+ aborted: boolean;
458
+ signal: NodeJS.Signals | null;
459
+ forcedTermination: boolean;
460
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
461
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
462
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
463
+ stdoutBytes: {
464
+ totalBytes: number;
465
+ retainedBytes: number;
466
+ omittedBytes: number;
467
+ };
468
+ stderrBytes: {
469
+ totalBytes: number;
470
+ retainedBytes: number;
471
+ omittedBytes: number;
472
+ };
473
+ reasonCode?: undefined;
474
+ recoverable?: undefined;
475
+ suggestedNextStep?: undefined;
476
+ background?: undefined;
477
+ }>;
102
478
  }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
103
479
  } & {
104
- outputSchema?: import("ai").FlexibleSchema<unknown> | undefined;
480
+ outputSchema?: import("ai").FlexibleSchema<{
481
+ ok: true;
482
+ duplicateSkipped: true;
483
+ toolName: string;
484
+ reason: string;
485
+ } | {
486
+ ok: boolean;
487
+ command: string;
488
+ reasonCode: string;
489
+ recoverable: boolean;
490
+ error: string;
491
+ suggestedNextStep: string;
492
+ background?: undefined;
493
+ } | {
494
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
495
+ hint: string;
496
+ backgroundId: string;
497
+ pid?: number;
498
+ command: string;
499
+ cwd: string;
500
+ startedAt: string;
501
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
502
+ code?: number | null;
503
+ signal?: NodeJS.Signals | null;
504
+ outputHandle: string;
505
+ outputBytes: {
506
+ totalBytes: number;
507
+ retainedBytes: number;
508
+ omittedBytes: number;
509
+ };
510
+ error?: string;
511
+ ok: boolean;
512
+ background: boolean;
513
+ reasonCode?: undefined;
514
+ recoverable?: undefined;
515
+ suggestedNextStep?: undefined;
516
+ } | {
517
+ ok: boolean;
518
+ background: boolean;
519
+ command: string;
520
+ reasonCode: string;
521
+ recoverable: boolean;
522
+ error: string;
523
+ suggestedNextStep: string;
524
+ } | {
525
+ error?: string | undefined;
526
+ ok: boolean;
527
+ code: number | null;
528
+ command: string;
529
+ cwd: string;
530
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
531
+ durationMs: number;
532
+ timedOut: boolean;
533
+ aborted: boolean;
534
+ signal: NodeJS.Signals | null;
535
+ forcedTermination: boolean;
536
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
537
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
538
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
539
+ stdoutBytes: {
540
+ totalBytes: number;
541
+ retainedBytes: number;
542
+ omittedBytes: number;
543
+ };
544
+ stderrBytes: {
545
+ totalBytes: number;
546
+ retainedBytes: number;
547
+ omittedBytes: number;
548
+ };
549
+ reasonCode?: undefined;
550
+ recoverable?: undefined;
551
+ suggestedNextStep?: undefined;
552
+ background?: undefined;
553
+ }> | undefined;
105
554
  execute: import("ai").ToolExecuteFunction<{
106
555
  command: string;
107
556
  allowMutation: boolean;
557
+ background: boolean;
108
558
  timeoutSeconds?: number | undefined;
109
- }, unknown, NoInfer<import("./toolContext.js").HazeToolContext>>;
559
+ }, {
560
+ ok: true;
561
+ duplicateSkipped: true;
562
+ toolName: string;
563
+ reason: string;
564
+ } | {
565
+ ok: boolean;
566
+ command: string;
567
+ reasonCode: string;
568
+ recoverable: boolean;
569
+ error: string;
570
+ suggestedNextStep: string;
571
+ background?: undefined;
572
+ } | {
573
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
574
+ hint: string;
575
+ backgroundId: string;
576
+ pid?: number;
577
+ command: string;
578
+ cwd: string;
579
+ startedAt: string;
580
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
581
+ code?: number | null;
582
+ signal?: NodeJS.Signals | null;
583
+ outputHandle: string;
584
+ outputBytes: {
585
+ totalBytes: number;
586
+ retainedBytes: number;
587
+ omittedBytes: number;
588
+ };
589
+ error?: string;
590
+ ok: boolean;
591
+ background: boolean;
592
+ reasonCode?: undefined;
593
+ recoverable?: undefined;
594
+ suggestedNextStep?: undefined;
595
+ } | {
596
+ ok: boolean;
597
+ background: boolean;
598
+ command: string;
599
+ reasonCode: string;
600
+ recoverable: boolean;
601
+ error: string;
602
+ suggestedNextStep: string;
603
+ } | {
604
+ error?: string | undefined;
605
+ ok: boolean;
606
+ code: number | null;
607
+ command: string;
608
+ cwd: string;
609
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
610
+ durationMs: number;
611
+ timedOut: boolean;
612
+ aborted: boolean;
613
+ signal: NodeJS.Signals | null;
614
+ forcedTermination: boolean;
615
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
616
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
617
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
618
+ stdoutBytes: {
619
+ totalBytes: number;
620
+ retainedBytes: number;
621
+ omittedBytes: number;
622
+ };
623
+ stderrBytes: {
624
+ totalBytes: number;
625
+ retainedBytes: number;
626
+ omittedBytes: number;
627
+ };
628
+ reasonCode?: undefined;
629
+ recoverable?: undefined;
630
+ suggestedNextStep?: undefined;
631
+ background?: undefined;
632
+ }, NoInfer<import("./toolContext.js").HazeToolContext>>;
110
633
  } & {
111
634
  description?: string | ((options: {
112
635
  context: NoInfer<import("./toolContext.js").HazeToolContext>;
@@ -117,6 +640,7 @@ export declare const bashTool: ({
117
640
  input: NoInfer<{
118
641
  command: string;
119
642
  allowMutation: boolean;
643
+ background: boolean;
120
644
  timeoutSeconds?: number | undefined;
121
645
  }>;
122
646
  }[] | undefined;
@@ -130,8 +654,82 @@ export declare const bashTool: ({
130
654
  execute: import("ai").ToolExecuteFunction<{
131
655
  command: string;
132
656
  allowMutation: boolean;
657
+ background: boolean;
133
658
  timeoutSeconds?: number | undefined;
134
- }, unknown, NoInfer<import("./toolContext.js").HazeToolContext>>;
659
+ }, {
660
+ ok: true;
661
+ duplicateSkipped: true;
662
+ toolName: string;
663
+ reason: string;
664
+ } | {
665
+ ok: boolean;
666
+ command: string;
667
+ reasonCode: string;
668
+ recoverable: boolean;
669
+ error: string;
670
+ suggestedNextStep: string;
671
+ background?: undefined;
672
+ } | {
673
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
674
+ hint: string;
675
+ backgroundId: string;
676
+ pid?: number;
677
+ command: string;
678
+ cwd: string;
679
+ startedAt: string;
680
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
681
+ code?: number | null;
682
+ signal?: NodeJS.Signals | null;
683
+ outputHandle: string;
684
+ outputBytes: {
685
+ totalBytes: number;
686
+ retainedBytes: number;
687
+ omittedBytes: number;
688
+ };
689
+ error?: string;
690
+ ok: boolean;
691
+ background: boolean;
692
+ reasonCode?: undefined;
693
+ recoverable?: undefined;
694
+ suggestedNextStep?: undefined;
695
+ } | {
696
+ ok: boolean;
697
+ background: boolean;
698
+ command: string;
699
+ reasonCode: string;
700
+ recoverable: boolean;
701
+ error: string;
702
+ suggestedNextStep: string;
703
+ } | {
704
+ error?: string | undefined;
705
+ ok: boolean;
706
+ code: number | null;
707
+ command: string;
708
+ cwd: string;
709
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
710
+ durationMs: number;
711
+ timedOut: boolean;
712
+ aborted: boolean;
713
+ signal: NodeJS.Signals | null;
714
+ forcedTermination: boolean;
715
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
716
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
717
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
718
+ stdoutBytes: {
719
+ totalBytes: number;
720
+ retainedBytes: number;
721
+ omittedBytes: number;
722
+ };
723
+ stderrBytes: {
724
+ totalBytes: number;
725
+ retainedBytes: number;
726
+ omittedBytes: number;
727
+ };
728
+ reasonCode?: undefined;
729
+ recoverable?: undefined;
730
+ suggestedNextStep?: undefined;
731
+ background?: undefined;
732
+ }, NoInfer<import("./toolContext.js").HazeToolContext>>;
135
733
  }) | ({
136
734
  title?: string;
137
735
  providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
@@ -139,12 +737,14 @@ export declare const bashTool: ({
139
737
  inputSchema: import("ai").FlexibleSchema<{
140
738
  command: string;
141
739
  allowMutation: boolean;
740
+ background: boolean;
142
741
  timeoutSeconds?: number | undefined;
143
742
  }>;
144
743
  contextSchema?: import("ai").FlexibleSchema<import("./toolContext.js").HazeToolContext> | undefined;
145
744
  needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
146
745
  command: string;
147
746
  allowMutation: boolean;
747
+ background: boolean;
148
748
  timeoutSeconds?: number | undefined;
149
749
  }, NoInfer<import("./toolContext.js").HazeToolContext>> | undefined;
150
750
  onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("./toolContext.js").HazeToolContext>>) => void | PromiseLike<void>) | undefined;
@@ -155,6 +755,7 @@ export declare const bashTool: ({
155
755
  input: {
156
756
  command: string;
157
757
  allowMutation: boolean;
758
+ background: boolean;
158
759
  timeoutSeconds?: number | undefined;
159
760
  };
160
761
  } & import("ai").ToolExecutionOptions<NoInfer<import("./toolContext.js").HazeToolContext>>) => void | PromiseLike<void>) | undefined;
@@ -163,17 +764,238 @@ export declare const bashTool: ({
163
764
  input: {
164
765
  command: string;
165
766
  allowMutation: boolean;
767
+ background: boolean;
166
768
  timeoutSeconds?: number | undefined;
167
769
  };
168
- output: unknown;
770
+ output: NoInfer<{
771
+ ok: true;
772
+ duplicateSkipped: true;
773
+ toolName: string;
774
+ reason: string;
775
+ } | {
776
+ ok: boolean;
777
+ command: string;
778
+ reasonCode: string;
779
+ recoverable: boolean;
780
+ error: string;
781
+ suggestedNextStep: string;
782
+ background?: undefined;
783
+ } | {
784
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
785
+ hint: string;
786
+ backgroundId: string;
787
+ pid?: number;
788
+ command: string;
789
+ cwd: string;
790
+ startedAt: string;
791
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
792
+ code?: number | null;
793
+ signal?: NodeJS.Signals | null;
794
+ outputHandle: string;
795
+ outputBytes: {
796
+ totalBytes: number;
797
+ retainedBytes: number;
798
+ omittedBytes: number;
799
+ };
800
+ error?: string;
801
+ ok: boolean;
802
+ background: boolean;
803
+ reasonCode?: undefined;
804
+ recoverable?: undefined;
805
+ suggestedNextStep?: undefined;
806
+ } | {
807
+ ok: boolean;
808
+ background: boolean;
809
+ command: string;
810
+ reasonCode: string;
811
+ recoverable: boolean;
812
+ error: string;
813
+ suggestedNextStep: string;
814
+ } | {
815
+ error?: string | undefined;
816
+ ok: boolean;
817
+ code: number | null;
818
+ command: string;
819
+ cwd: string;
820
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
821
+ durationMs: number;
822
+ timedOut: boolean;
823
+ aborted: boolean;
824
+ signal: NodeJS.Signals | null;
825
+ forcedTermination: boolean;
826
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
827
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
828
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
829
+ stdoutBytes: {
830
+ totalBytes: number;
831
+ retainedBytes: number;
832
+ omittedBytes: number;
833
+ };
834
+ stderrBytes: {
835
+ totalBytes: number;
836
+ retainedBytes: number;
837
+ omittedBytes: number;
838
+ };
839
+ reasonCode?: undefined;
840
+ recoverable?: undefined;
841
+ suggestedNextStep?: undefined;
842
+ background?: undefined;
843
+ }>;
169
844
  }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
170
845
  } & {
171
- outputSchema?: import("ai").FlexibleSchema<unknown> | undefined;
846
+ outputSchema?: import("ai").FlexibleSchema<{
847
+ ok: true;
848
+ duplicateSkipped: true;
849
+ toolName: string;
850
+ reason: string;
851
+ } | {
852
+ ok: boolean;
853
+ command: string;
854
+ reasonCode: string;
855
+ recoverable: boolean;
856
+ error: string;
857
+ suggestedNextStep: string;
858
+ background?: undefined;
859
+ } | {
860
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
861
+ hint: string;
862
+ backgroundId: string;
863
+ pid?: number;
864
+ command: string;
865
+ cwd: string;
866
+ startedAt: string;
867
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
868
+ code?: number | null;
869
+ signal?: NodeJS.Signals | null;
870
+ outputHandle: string;
871
+ outputBytes: {
872
+ totalBytes: number;
873
+ retainedBytes: number;
874
+ omittedBytes: number;
875
+ };
876
+ error?: string;
877
+ ok: boolean;
878
+ background: boolean;
879
+ reasonCode?: undefined;
880
+ recoverable?: undefined;
881
+ suggestedNextStep?: undefined;
882
+ } | {
883
+ ok: boolean;
884
+ background: boolean;
885
+ command: string;
886
+ reasonCode: string;
887
+ recoverable: boolean;
888
+ error: string;
889
+ suggestedNextStep: string;
890
+ } | {
891
+ error?: string | undefined;
892
+ ok: boolean;
893
+ code: number | null;
894
+ command: string;
895
+ cwd: string;
896
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
897
+ durationMs: number;
898
+ timedOut: boolean;
899
+ aborted: boolean;
900
+ signal: NodeJS.Signals | null;
901
+ forcedTermination: boolean;
902
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
903
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
904
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
905
+ stdoutBytes: {
906
+ totalBytes: number;
907
+ retainedBytes: number;
908
+ omittedBytes: number;
909
+ };
910
+ stderrBytes: {
911
+ totalBytes: number;
912
+ retainedBytes: number;
913
+ omittedBytes: number;
914
+ };
915
+ reasonCode?: undefined;
916
+ recoverable?: undefined;
917
+ suggestedNextStep?: undefined;
918
+ background?: undefined;
919
+ }> | undefined;
172
920
  execute: import("ai").ToolExecuteFunction<{
173
921
  command: string;
174
922
  allowMutation: boolean;
923
+ background: boolean;
175
924
  timeoutSeconds?: number | undefined;
176
- }, unknown, NoInfer<import("./toolContext.js").HazeToolContext>>;
925
+ }, {
926
+ ok: true;
927
+ duplicateSkipped: true;
928
+ toolName: string;
929
+ reason: string;
930
+ } | {
931
+ ok: boolean;
932
+ command: string;
933
+ reasonCode: string;
934
+ recoverable: boolean;
935
+ error: string;
936
+ suggestedNextStep: string;
937
+ background?: undefined;
938
+ } | {
939
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
940
+ hint: string;
941
+ backgroundId: string;
942
+ pid?: number;
943
+ command: string;
944
+ cwd: string;
945
+ startedAt: string;
946
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
947
+ code?: number | null;
948
+ signal?: NodeJS.Signals | null;
949
+ outputHandle: string;
950
+ outputBytes: {
951
+ totalBytes: number;
952
+ retainedBytes: number;
953
+ omittedBytes: number;
954
+ };
955
+ error?: string;
956
+ ok: boolean;
957
+ background: boolean;
958
+ reasonCode?: undefined;
959
+ recoverable?: undefined;
960
+ suggestedNextStep?: undefined;
961
+ } | {
962
+ ok: boolean;
963
+ background: boolean;
964
+ command: string;
965
+ reasonCode: string;
966
+ recoverable: boolean;
967
+ error: string;
968
+ suggestedNextStep: string;
969
+ } | {
970
+ error?: string | undefined;
971
+ ok: boolean;
972
+ code: number | null;
973
+ command: string;
974
+ cwd: string;
975
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
976
+ durationMs: number;
977
+ timedOut: boolean;
978
+ aborted: boolean;
979
+ signal: NodeJS.Signals | null;
980
+ forcedTermination: boolean;
981
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
982
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
983
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
984
+ stdoutBytes: {
985
+ totalBytes: number;
986
+ retainedBytes: number;
987
+ omittedBytes: number;
988
+ };
989
+ stderrBytes: {
990
+ totalBytes: number;
991
+ retainedBytes: number;
992
+ omittedBytes: number;
993
+ };
994
+ reasonCode?: undefined;
995
+ recoverable?: undefined;
996
+ suggestedNextStep?: undefined;
997
+ background?: undefined;
998
+ }, NoInfer<import("./toolContext.js").HazeToolContext>>;
177
999
  } & {
178
1000
  type: "provider";
179
1001
  id: `${string}.${string}`;
@@ -188,8 +1010,82 @@ export declare const bashTool: ({
188
1010
  execute: import("ai").ToolExecuteFunction<{
189
1011
  command: string;
190
1012
  allowMutation: boolean;
1013
+ background: boolean;
191
1014
  timeoutSeconds?: number | undefined;
192
- }, unknown, NoInfer<import("./toolContext.js").HazeToolContext>>;
1015
+ }, {
1016
+ ok: true;
1017
+ duplicateSkipped: true;
1018
+ toolName: string;
1019
+ reason: string;
1020
+ } | {
1021
+ ok: boolean;
1022
+ command: string;
1023
+ reasonCode: string;
1024
+ recoverable: boolean;
1025
+ error: string;
1026
+ suggestedNextStep: string;
1027
+ background?: undefined;
1028
+ } | {
1029
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
1030
+ hint: string;
1031
+ backgroundId: string;
1032
+ pid?: number;
1033
+ command: string;
1034
+ cwd: string;
1035
+ startedAt: string;
1036
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
1037
+ code?: number | null;
1038
+ signal?: NodeJS.Signals | null;
1039
+ outputHandle: string;
1040
+ outputBytes: {
1041
+ totalBytes: number;
1042
+ retainedBytes: number;
1043
+ omittedBytes: number;
1044
+ };
1045
+ error?: string;
1046
+ ok: boolean;
1047
+ background: boolean;
1048
+ reasonCode?: undefined;
1049
+ recoverable?: undefined;
1050
+ suggestedNextStep?: undefined;
1051
+ } | {
1052
+ ok: boolean;
1053
+ background: boolean;
1054
+ command: string;
1055
+ reasonCode: string;
1056
+ recoverable: boolean;
1057
+ error: string;
1058
+ suggestedNextStep: string;
1059
+ } | {
1060
+ error?: string | undefined;
1061
+ ok: boolean;
1062
+ code: number | null;
1063
+ command: string;
1064
+ cwd: string;
1065
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
1066
+ durationMs: number;
1067
+ timedOut: boolean;
1068
+ aborted: boolean;
1069
+ signal: NodeJS.Signals | null;
1070
+ forcedTermination: boolean;
1071
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
1072
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
1073
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
1074
+ stdoutBytes: {
1075
+ totalBytes: number;
1076
+ retainedBytes: number;
1077
+ omittedBytes: number;
1078
+ };
1079
+ stderrBytes: {
1080
+ totalBytes: number;
1081
+ retainedBytes: number;
1082
+ omittedBytes: number;
1083
+ };
1084
+ reasonCode?: undefined;
1085
+ recoverable?: undefined;
1086
+ suggestedNextStep?: undefined;
1087
+ background?: undefined;
1088
+ }, NoInfer<import("./toolContext.js").HazeToolContext>>;
193
1089
  }) | ({
194
1090
  title?: string;
195
1091
  providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
@@ -197,12 +1093,14 @@ export declare const bashTool: ({
197
1093
  inputSchema: import("ai").FlexibleSchema<{
198
1094
  command: string;
199
1095
  allowMutation: boolean;
1096
+ background: boolean;
200
1097
  timeoutSeconds?: number | undefined;
201
1098
  }>;
202
1099
  contextSchema?: import("ai").FlexibleSchema<import("./toolContext.js").HazeToolContext> | undefined;
203
1100
  needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
204
1101
  command: string;
205
1102
  allowMutation: boolean;
1103
+ background: boolean;
206
1104
  timeoutSeconds?: number | undefined;
207
1105
  }, NoInfer<import("./toolContext.js").HazeToolContext>> | undefined;
208
1106
  onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("./toolContext.js").HazeToolContext>>) => void | PromiseLike<void>) | undefined;
@@ -213,6 +1111,7 @@ export declare const bashTool: ({
213
1111
  input: {
214
1112
  command: string;
215
1113
  allowMutation: boolean;
1114
+ background: boolean;
216
1115
  timeoutSeconds?: number | undefined;
217
1116
  };
218
1117
  } & import("ai").ToolExecutionOptions<NoInfer<import("./toolContext.js").HazeToolContext>>) => void | PromiseLike<void>) | undefined;
@@ -221,17 +1120,238 @@ export declare const bashTool: ({
221
1120
  input: {
222
1121
  command: string;
223
1122
  allowMutation: boolean;
1123
+ background: boolean;
224
1124
  timeoutSeconds?: number | undefined;
225
1125
  };
226
- output: unknown;
1126
+ output: NoInfer<{
1127
+ ok: true;
1128
+ duplicateSkipped: true;
1129
+ toolName: string;
1130
+ reason: string;
1131
+ } | {
1132
+ ok: boolean;
1133
+ command: string;
1134
+ reasonCode: string;
1135
+ recoverable: boolean;
1136
+ error: string;
1137
+ suggestedNextStep: string;
1138
+ background?: undefined;
1139
+ } | {
1140
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
1141
+ hint: string;
1142
+ backgroundId: string;
1143
+ pid?: number;
1144
+ command: string;
1145
+ cwd: string;
1146
+ startedAt: string;
1147
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
1148
+ code?: number | null;
1149
+ signal?: NodeJS.Signals | null;
1150
+ outputHandle: string;
1151
+ outputBytes: {
1152
+ totalBytes: number;
1153
+ retainedBytes: number;
1154
+ omittedBytes: number;
1155
+ };
1156
+ error?: string;
1157
+ ok: boolean;
1158
+ background: boolean;
1159
+ reasonCode?: undefined;
1160
+ recoverable?: undefined;
1161
+ suggestedNextStep?: undefined;
1162
+ } | {
1163
+ ok: boolean;
1164
+ background: boolean;
1165
+ command: string;
1166
+ reasonCode: string;
1167
+ recoverable: boolean;
1168
+ error: string;
1169
+ suggestedNextStep: string;
1170
+ } | {
1171
+ error?: string | undefined;
1172
+ ok: boolean;
1173
+ code: number | null;
1174
+ command: string;
1175
+ cwd: string;
1176
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
1177
+ durationMs: number;
1178
+ timedOut: boolean;
1179
+ aborted: boolean;
1180
+ signal: NodeJS.Signals | null;
1181
+ forcedTermination: boolean;
1182
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
1183
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
1184
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
1185
+ stdoutBytes: {
1186
+ totalBytes: number;
1187
+ retainedBytes: number;
1188
+ omittedBytes: number;
1189
+ };
1190
+ stderrBytes: {
1191
+ totalBytes: number;
1192
+ retainedBytes: number;
1193
+ omittedBytes: number;
1194
+ };
1195
+ reasonCode?: undefined;
1196
+ recoverable?: undefined;
1197
+ suggestedNextStep?: undefined;
1198
+ background?: undefined;
1199
+ }>;
227
1200
  }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
228
1201
  } & {
229
- outputSchema?: import("ai").FlexibleSchema<unknown> | undefined;
1202
+ outputSchema?: import("ai").FlexibleSchema<{
1203
+ ok: true;
1204
+ duplicateSkipped: true;
1205
+ toolName: string;
1206
+ reason: string;
1207
+ } | {
1208
+ ok: boolean;
1209
+ command: string;
1210
+ reasonCode: string;
1211
+ recoverable: boolean;
1212
+ error: string;
1213
+ suggestedNextStep: string;
1214
+ background?: undefined;
1215
+ } | {
1216
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
1217
+ hint: string;
1218
+ backgroundId: string;
1219
+ pid?: number;
1220
+ command: string;
1221
+ cwd: string;
1222
+ startedAt: string;
1223
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
1224
+ code?: number | null;
1225
+ signal?: NodeJS.Signals | null;
1226
+ outputHandle: string;
1227
+ outputBytes: {
1228
+ totalBytes: number;
1229
+ retainedBytes: number;
1230
+ omittedBytes: number;
1231
+ };
1232
+ error?: string;
1233
+ ok: boolean;
1234
+ background: boolean;
1235
+ reasonCode?: undefined;
1236
+ recoverable?: undefined;
1237
+ suggestedNextStep?: undefined;
1238
+ } | {
1239
+ ok: boolean;
1240
+ background: boolean;
1241
+ command: string;
1242
+ reasonCode: string;
1243
+ recoverable: boolean;
1244
+ error: string;
1245
+ suggestedNextStep: string;
1246
+ } | {
1247
+ error?: string | undefined;
1248
+ ok: boolean;
1249
+ code: number | null;
1250
+ command: string;
1251
+ cwd: string;
1252
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
1253
+ durationMs: number;
1254
+ timedOut: boolean;
1255
+ aborted: boolean;
1256
+ signal: NodeJS.Signals | null;
1257
+ forcedTermination: boolean;
1258
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
1259
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
1260
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
1261
+ stdoutBytes: {
1262
+ totalBytes: number;
1263
+ retainedBytes: number;
1264
+ omittedBytes: number;
1265
+ };
1266
+ stderrBytes: {
1267
+ totalBytes: number;
1268
+ retainedBytes: number;
1269
+ omittedBytes: number;
1270
+ };
1271
+ reasonCode?: undefined;
1272
+ recoverable?: undefined;
1273
+ suggestedNextStep?: undefined;
1274
+ background?: undefined;
1275
+ }> | undefined;
230
1276
  execute: import("ai").ToolExecuteFunction<{
231
1277
  command: string;
232
1278
  allowMutation: boolean;
1279
+ background: boolean;
233
1280
  timeoutSeconds?: number | undefined;
234
- }, unknown, NoInfer<import("./toolContext.js").HazeToolContext>>;
1281
+ }, {
1282
+ ok: true;
1283
+ duplicateSkipped: true;
1284
+ toolName: string;
1285
+ reason: string;
1286
+ } | {
1287
+ ok: boolean;
1288
+ command: string;
1289
+ reasonCode: string;
1290
+ recoverable: boolean;
1291
+ error: string;
1292
+ suggestedNextStep: string;
1293
+ background?: undefined;
1294
+ } | {
1295
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
1296
+ hint: string;
1297
+ backgroundId: string;
1298
+ pid?: number;
1299
+ command: string;
1300
+ cwd: string;
1301
+ startedAt: string;
1302
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
1303
+ code?: number | null;
1304
+ signal?: NodeJS.Signals | null;
1305
+ outputHandle: string;
1306
+ outputBytes: {
1307
+ totalBytes: number;
1308
+ retainedBytes: number;
1309
+ omittedBytes: number;
1310
+ };
1311
+ error?: string;
1312
+ ok: boolean;
1313
+ background: boolean;
1314
+ reasonCode?: undefined;
1315
+ recoverable?: undefined;
1316
+ suggestedNextStep?: undefined;
1317
+ } | {
1318
+ ok: boolean;
1319
+ background: boolean;
1320
+ command: string;
1321
+ reasonCode: string;
1322
+ recoverable: boolean;
1323
+ error: string;
1324
+ suggestedNextStep: string;
1325
+ } | {
1326
+ error?: string | undefined;
1327
+ ok: boolean;
1328
+ code: number | null;
1329
+ command: string;
1330
+ cwd: string;
1331
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
1332
+ durationMs: number;
1333
+ timedOut: boolean;
1334
+ aborted: boolean;
1335
+ signal: NodeJS.Signals | null;
1336
+ forcedTermination: boolean;
1337
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
1338
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
1339
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
1340
+ stdoutBytes: {
1341
+ totalBytes: number;
1342
+ retainedBytes: number;
1343
+ omittedBytes: number;
1344
+ };
1345
+ stderrBytes: {
1346
+ totalBytes: number;
1347
+ retainedBytes: number;
1348
+ omittedBytes: number;
1349
+ };
1350
+ reasonCode?: undefined;
1351
+ recoverable?: undefined;
1352
+ suggestedNextStep?: undefined;
1353
+ background?: undefined;
1354
+ }, NoInfer<import("./toolContext.js").HazeToolContext>>;
235
1355
  } & {
236
1356
  type: "provider";
237
1357
  id: `${string}.${string}`;
@@ -246,6 +1366,80 @@ export declare const bashTool: ({
246
1366
  execute: import("ai").ToolExecuteFunction<{
247
1367
  command: string;
248
1368
  allowMutation: boolean;
1369
+ background: boolean;
249
1370
  timeoutSeconds?: number | undefined;
250
- }, unknown, NoInfer<import("./toolContext.js").HazeToolContext>>;
1371
+ }, {
1372
+ ok: true;
1373
+ duplicateSkipped: true;
1374
+ toolName: string;
1375
+ reason: string;
1376
+ } | {
1377
+ ok: boolean;
1378
+ command: string;
1379
+ reasonCode: string;
1380
+ recoverable: boolean;
1381
+ error: string;
1382
+ suggestedNextStep: string;
1383
+ background?: undefined;
1384
+ } | {
1385
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
1386
+ hint: string;
1387
+ backgroundId: string;
1388
+ pid?: number;
1389
+ command: string;
1390
+ cwd: string;
1391
+ startedAt: string;
1392
+ status: import("../../core/process/backgroundRegistry.js").BackgroundProcessStatus;
1393
+ code?: number | null;
1394
+ signal?: NodeJS.Signals | null;
1395
+ outputHandle: string;
1396
+ outputBytes: {
1397
+ totalBytes: number;
1398
+ retainedBytes: number;
1399
+ omittedBytes: number;
1400
+ };
1401
+ error?: string;
1402
+ ok: boolean;
1403
+ background: boolean;
1404
+ reasonCode?: undefined;
1405
+ recoverable?: undefined;
1406
+ suggestedNextStep?: undefined;
1407
+ } | {
1408
+ ok: boolean;
1409
+ background: boolean;
1410
+ command: string;
1411
+ reasonCode: string;
1412
+ recoverable: boolean;
1413
+ error: string;
1414
+ suggestedNextStep: string;
1415
+ } | {
1416
+ error?: string | undefined;
1417
+ ok: boolean;
1418
+ code: number | null;
1419
+ command: string;
1420
+ cwd: string;
1421
+ classification: import("../../core/safety/bashClassifier.js").BashClassification;
1422
+ durationMs: number;
1423
+ timedOut: boolean;
1424
+ aborted: boolean;
1425
+ signal: NodeJS.Signals | null;
1426
+ forcedTermination: boolean;
1427
+ stdout: import("../../core/bashOutput/types.js").StreamReduction;
1428
+ stderr: import("../../core/bashOutput/types.js").StreamReduction;
1429
+ validationSummary: import("../toolResultTypes.js").ValidationSummary | undefined;
1430
+ stdoutBytes: {
1431
+ totalBytes: number;
1432
+ retainedBytes: number;
1433
+ omittedBytes: number;
1434
+ };
1435
+ stderrBytes: {
1436
+ totalBytes: number;
1437
+ retainedBytes: number;
1438
+ omittedBytes: number;
1439
+ };
1440
+ reasonCode?: undefined;
1441
+ recoverable?: undefined;
1442
+ suggestedNextStep?: undefined;
1443
+ background?: undefined;
1444
+ }, NoInfer<import("./toolContext.js").HazeToolContext>>;
251
1445
  });