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