@denizokcu/haze 1.7.10 → 1.7.12

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