@gugacoder/agentic-sdk 0.2.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 (129) hide show
  1. package/dist/agent.d.ts +2 -0
  2. package/dist/agent.js +463 -0
  3. package/dist/context/compaction.d.ts +27 -0
  4. package/dist/context/compaction.js +219 -0
  5. package/dist/context/models.d.ts +6 -0
  6. package/dist/context/models.js +41 -0
  7. package/dist/context/tokenizer.d.ts +5 -0
  8. package/dist/context/tokenizer.js +11 -0
  9. package/dist/context/usage.d.ts +11 -0
  10. package/dist/context/usage.js +49 -0
  11. package/dist/display-schemas.d.ts +1865 -0
  12. package/dist/display-schemas.js +219 -0
  13. package/dist/index.d.ts +38 -0
  14. package/dist/index.js +28 -0
  15. package/dist/middleware/logging.d.ts +2 -0
  16. package/dist/middleware/logging.js +32 -0
  17. package/dist/prompts/assembly.d.ts +13 -0
  18. package/dist/prompts/assembly.js +229 -0
  19. package/dist/providers.d.ts +19 -0
  20. package/dist/providers.js +44 -0
  21. package/dist/proxy.d.ts +2 -0
  22. package/dist/proxy.js +103 -0
  23. package/dist/schemas.d.ts +228 -0
  24. package/dist/schemas.js +51 -0
  25. package/dist/session.d.ts +7 -0
  26. package/dist/session.js +102 -0
  27. package/dist/structured.d.ts +18 -0
  28. package/dist/structured.js +38 -0
  29. package/dist/tool-repair.d.ts +21 -0
  30. package/dist/tool-repair.js +72 -0
  31. package/dist/tools/api-spec.d.ts +4 -0
  32. package/dist/tools/api-spec.js +123 -0
  33. package/dist/tools/apply-patch.d.ts +484 -0
  34. package/dist/tools/apply-patch.js +157 -0
  35. package/dist/tools/ask-user.d.ts +14 -0
  36. package/dist/tools/ask-user.js +27 -0
  37. package/dist/tools/bash.d.ts +550 -0
  38. package/dist/tools/bash.js +43 -0
  39. package/dist/tools/batch.d.ts +13 -0
  40. package/dist/tools/batch.js +84 -0
  41. package/dist/tools/brave-search.d.ts +6 -0
  42. package/dist/tools/brave-search.js +19 -0
  43. package/dist/tools/code-search.d.ts +20 -0
  44. package/dist/tools/code-search.js +42 -0
  45. package/dist/tools/diagnostics.d.ts +4 -0
  46. package/dist/tools/diagnostics.js +69 -0
  47. package/dist/tools/display.d.ts +483 -0
  48. package/dist/tools/display.js +77 -0
  49. package/dist/tools/edit.d.ts +682 -0
  50. package/dist/tools/edit.js +47 -0
  51. package/dist/tools/glob.d.ts +4 -0
  52. package/dist/tools/glob.js +42 -0
  53. package/dist/tools/grep.d.ts +6 -0
  54. package/dist/tools/grep.js +69 -0
  55. package/dist/tools/http-request.d.ts +7 -0
  56. package/dist/tools/http-request.js +98 -0
  57. package/dist/tools/index.d.ts +1611 -0
  58. package/dist/tools/index.js +46 -0
  59. package/dist/tools/job-tools.d.ts +24 -0
  60. package/dist/tools/job-tools.js +67 -0
  61. package/dist/tools/list-dir.d.ts +5 -0
  62. package/dist/tools/list-dir.js +79 -0
  63. package/dist/tools/multi-edit.d.ts +814 -0
  64. package/dist/tools/multi-edit.js +57 -0
  65. package/dist/tools/read.d.ts +5 -0
  66. package/dist/tools/read.js +33 -0
  67. package/dist/tools/task.d.ts +21 -0
  68. package/dist/tools/task.js +51 -0
  69. package/dist/tools/todo.d.ts +14 -0
  70. package/dist/tools/todo.js +60 -0
  71. package/dist/tools/web-fetch.d.ts +4 -0
  72. package/dist/tools/web-fetch.js +126 -0
  73. package/dist/tools/web-search.d.ts +22 -0
  74. package/dist/tools/web-search.js +48 -0
  75. package/dist/tools/write.d.ts +550 -0
  76. package/dist/tools/write.js +30 -0
  77. package/dist/types.d.ts +201 -0
  78. package/dist/types.js +1 -0
  79. package/package.json +43 -0
  80. package/src/agent.ts +520 -0
  81. package/src/context/compaction.ts +265 -0
  82. package/src/context/models.ts +42 -0
  83. package/src/context/tokenizer.ts +12 -0
  84. package/src/context/usage.ts +65 -0
  85. package/src/display-schemas.ts +276 -0
  86. package/src/index.ts +43 -0
  87. package/src/middleware/logging.ts +37 -0
  88. package/src/prompts/assembly.ts +263 -0
  89. package/src/prompts/identity.md +10 -0
  90. package/src/prompts/patterns.md +7 -0
  91. package/src/prompts/safety.md +7 -0
  92. package/src/prompts/tool-guide.md +9 -0
  93. package/src/prompts/tools/bash.md +7 -0
  94. package/src/prompts/tools/edit.md +7 -0
  95. package/src/prompts/tools/glob.md +7 -0
  96. package/src/prompts/tools/grep.md +7 -0
  97. package/src/prompts/tools/read.md +7 -0
  98. package/src/prompts/tools/write.md +7 -0
  99. package/src/providers.ts +58 -0
  100. package/src/proxy.ts +101 -0
  101. package/src/schemas.ts +58 -0
  102. package/src/session.ts +110 -0
  103. package/src/structured.ts +65 -0
  104. package/src/tool-repair.ts +92 -0
  105. package/src/tools/api-spec.ts +158 -0
  106. package/src/tools/apply-patch.ts +188 -0
  107. package/src/tools/ask-user.ts +40 -0
  108. package/src/tools/bash.ts +51 -0
  109. package/src/tools/batch.ts +103 -0
  110. package/src/tools/brave-search.ts +24 -0
  111. package/src/tools/code-search.ts +69 -0
  112. package/src/tools/diagnostics.ts +93 -0
  113. package/src/tools/display.ts +105 -0
  114. package/src/tools/edit.ts +55 -0
  115. package/src/tools/glob.ts +46 -0
  116. package/src/tools/grep.ts +68 -0
  117. package/src/tools/http-request.ts +103 -0
  118. package/src/tools/index.ts +48 -0
  119. package/src/tools/job-tools.ts +84 -0
  120. package/src/tools/list-dir.ts +102 -0
  121. package/src/tools/multi-edit.ts +65 -0
  122. package/src/tools/read.ts +40 -0
  123. package/src/tools/task.ts +71 -0
  124. package/src/tools/todo.ts +82 -0
  125. package/src/tools/web-fetch.ts +155 -0
  126. package/src/tools/web-search.ts +75 -0
  127. package/src/tools/write.ts +34 -0
  128. package/src/types.ts +145 -0
  129. package/tsconfig.json +17 -0
@@ -0,0 +1,814 @@
1
+ export declare function createMultiEditTool(opts?: {
2
+ autoApprove?: boolean;
3
+ }): ({
4
+ description?: string;
5
+ title?: string;
6
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
7
+ inputSchema: import("ai").FlexibleSchema<{
8
+ file_path: string;
9
+ edits: {
10
+ old_string: string;
11
+ new_string: string;
12
+ replace_all: boolean;
13
+ }[];
14
+ }>;
15
+ inputExamples?: {
16
+ input: NoInfer<{
17
+ file_path: string;
18
+ edits: {
19
+ old_string: string;
20
+ new_string: string;
21
+ replace_all: boolean;
22
+ }[];
23
+ }>;
24
+ }[] | undefined;
25
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
26
+ file_path: string;
27
+ edits: {
28
+ old_string: string;
29
+ new_string: string;
30
+ replace_all: boolean;
31
+ }[];
32
+ }> | undefined;
33
+ strict?: boolean;
34
+ onInputStart?: (options: import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
35
+ onInputDelta?: (options: {
36
+ inputTextDelta: string;
37
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
38
+ onInputAvailable?: ((options: {
39
+ input: {
40
+ file_path: string;
41
+ edits: {
42
+ old_string: string;
43
+ new_string: string;
44
+ replace_all: boolean;
45
+ }[];
46
+ };
47
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>) | undefined;
48
+ } & {
49
+ outputSchema: import("ai").FlexibleSchema<string>;
50
+ execute?: never;
51
+ } & {
52
+ toModelOutput?: ((options: {
53
+ toolCallId: string;
54
+ input: {
55
+ file_path: string;
56
+ edits: {
57
+ old_string: string;
58
+ new_string: string;
59
+ replace_all: boolean;
60
+ }[];
61
+ };
62
+ output: string;
63
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
64
+ } & {
65
+ type?: undefined | "function";
66
+ }) | ({
67
+ description?: string;
68
+ title?: string;
69
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
70
+ inputSchema: import("ai").FlexibleSchema<{
71
+ file_path: string;
72
+ edits: {
73
+ old_string: string;
74
+ new_string: string;
75
+ replace_all: boolean;
76
+ }[];
77
+ }>;
78
+ inputExamples?: {
79
+ input: NoInfer<{
80
+ file_path: string;
81
+ edits: {
82
+ old_string: string;
83
+ new_string: string;
84
+ replace_all: boolean;
85
+ }[];
86
+ }>;
87
+ }[] | undefined;
88
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
89
+ file_path: string;
90
+ edits: {
91
+ old_string: string;
92
+ new_string: string;
93
+ replace_all: boolean;
94
+ }[];
95
+ }> | undefined;
96
+ strict?: boolean;
97
+ onInputStart?: (options: import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
98
+ onInputDelta?: (options: {
99
+ inputTextDelta: string;
100
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
101
+ onInputAvailable?: ((options: {
102
+ input: {
103
+ file_path: string;
104
+ edits: {
105
+ old_string: string;
106
+ new_string: string;
107
+ replace_all: boolean;
108
+ }[];
109
+ };
110
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>) | undefined;
111
+ } & {
112
+ outputSchema: import("ai").FlexibleSchema<string>;
113
+ execute?: never;
114
+ } & {
115
+ toModelOutput?: ((options: {
116
+ toolCallId: string;
117
+ input: {
118
+ file_path: string;
119
+ edits: {
120
+ old_string: string;
121
+ new_string: string;
122
+ replace_all: boolean;
123
+ }[];
124
+ };
125
+ output: string;
126
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
127
+ } & {
128
+ type: "dynamic";
129
+ }) | ({
130
+ description?: string;
131
+ title?: string;
132
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
133
+ inputSchema: import("ai").FlexibleSchema<{
134
+ file_path: string;
135
+ edits: {
136
+ old_string: string;
137
+ new_string: string;
138
+ replace_all: boolean;
139
+ }[];
140
+ }>;
141
+ inputExamples?: {
142
+ input: NoInfer<{
143
+ file_path: string;
144
+ edits: {
145
+ old_string: string;
146
+ new_string: string;
147
+ replace_all: boolean;
148
+ }[];
149
+ }>;
150
+ }[] | undefined;
151
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
152
+ file_path: string;
153
+ edits: {
154
+ old_string: string;
155
+ new_string: string;
156
+ replace_all: boolean;
157
+ }[];
158
+ }> | undefined;
159
+ strict?: boolean;
160
+ onInputStart?: (options: import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
161
+ onInputDelta?: (options: {
162
+ inputTextDelta: string;
163
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
164
+ onInputAvailable?: ((options: {
165
+ input: {
166
+ file_path: string;
167
+ edits: {
168
+ old_string: string;
169
+ new_string: string;
170
+ replace_all: boolean;
171
+ }[];
172
+ };
173
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>) | undefined;
174
+ } & {
175
+ outputSchema: import("ai").FlexibleSchema<string>;
176
+ execute?: never;
177
+ } & {
178
+ toModelOutput?: ((options: {
179
+ toolCallId: string;
180
+ input: {
181
+ file_path: string;
182
+ edits: {
183
+ old_string: string;
184
+ new_string: string;
185
+ replace_all: boolean;
186
+ }[];
187
+ };
188
+ output: string;
189
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
190
+ } & {
191
+ type: "provider";
192
+ id: `${string}.${string}`;
193
+ args: Record<string, unknown>;
194
+ supportsDeferredResults?: boolean;
195
+ }) | ({
196
+ description?: string;
197
+ title?: string;
198
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
199
+ inputSchema: import("ai").FlexibleSchema<{
200
+ file_path: string;
201
+ edits: {
202
+ old_string: string;
203
+ new_string: string;
204
+ replace_all: boolean;
205
+ }[];
206
+ }>;
207
+ inputExamples?: {
208
+ input: NoInfer<{
209
+ file_path: string;
210
+ edits: {
211
+ old_string: string;
212
+ new_string: string;
213
+ replace_all: boolean;
214
+ }[];
215
+ }>;
216
+ }[] | undefined;
217
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
218
+ file_path: string;
219
+ edits: {
220
+ old_string: string;
221
+ new_string: string;
222
+ replace_all: boolean;
223
+ }[];
224
+ }> | undefined;
225
+ strict?: boolean;
226
+ onInputStart?: (options: import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
227
+ onInputDelta?: (options: {
228
+ inputTextDelta: string;
229
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
230
+ onInputAvailable?: ((options: {
231
+ input: {
232
+ file_path: string;
233
+ edits: {
234
+ old_string: string;
235
+ new_string: string;
236
+ replace_all: boolean;
237
+ }[];
238
+ };
239
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>) | undefined;
240
+ } & {
241
+ execute: import("ai").ToolExecuteFunction<{
242
+ file_path: string;
243
+ edits: {
244
+ old_string: string;
245
+ new_string: string;
246
+ replace_all: boolean;
247
+ }[];
248
+ }, string>;
249
+ outputSchema?: import("ai").FlexibleSchema<string> | undefined;
250
+ } & {
251
+ toModelOutput?: ((options: {
252
+ toolCallId: string;
253
+ input: {
254
+ file_path: string;
255
+ edits: {
256
+ old_string: string;
257
+ new_string: string;
258
+ replace_all: boolean;
259
+ }[];
260
+ };
261
+ output: string;
262
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
263
+ } & {
264
+ type?: undefined | "function";
265
+ }) | ({
266
+ description?: string;
267
+ title?: string;
268
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
269
+ inputSchema: import("ai").FlexibleSchema<{
270
+ file_path: string;
271
+ edits: {
272
+ old_string: string;
273
+ new_string: string;
274
+ replace_all: boolean;
275
+ }[];
276
+ }>;
277
+ inputExamples?: {
278
+ input: NoInfer<{
279
+ file_path: string;
280
+ edits: {
281
+ old_string: string;
282
+ new_string: string;
283
+ replace_all: boolean;
284
+ }[];
285
+ }>;
286
+ }[] | undefined;
287
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
288
+ file_path: string;
289
+ edits: {
290
+ old_string: string;
291
+ new_string: string;
292
+ replace_all: boolean;
293
+ }[];
294
+ }> | undefined;
295
+ strict?: boolean;
296
+ onInputStart?: (options: import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
297
+ onInputDelta?: (options: {
298
+ inputTextDelta: string;
299
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
300
+ onInputAvailable?: ((options: {
301
+ input: {
302
+ file_path: string;
303
+ edits: {
304
+ old_string: string;
305
+ new_string: string;
306
+ replace_all: boolean;
307
+ }[];
308
+ };
309
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>) | undefined;
310
+ } & {
311
+ execute: import("ai").ToolExecuteFunction<{
312
+ file_path: string;
313
+ edits: {
314
+ old_string: string;
315
+ new_string: string;
316
+ replace_all: boolean;
317
+ }[];
318
+ }, string>;
319
+ outputSchema?: import("ai").FlexibleSchema<string> | undefined;
320
+ } & {
321
+ toModelOutput?: ((options: {
322
+ toolCallId: string;
323
+ input: {
324
+ file_path: string;
325
+ edits: {
326
+ old_string: string;
327
+ new_string: string;
328
+ replace_all: boolean;
329
+ }[];
330
+ };
331
+ output: string;
332
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
333
+ } & {
334
+ type: "dynamic";
335
+ }) | ({
336
+ description?: string;
337
+ title?: string;
338
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
339
+ inputSchema: import("ai").FlexibleSchema<{
340
+ file_path: string;
341
+ edits: {
342
+ old_string: string;
343
+ new_string: string;
344
+ replace_all: boolean;
345
+ }[];
346
+ }>;
347
+ inputExamples?: {
348
+ input: NoInfer<{
349
+ file_path: string;
350
+ edits: {
351
+ old_string: string;
352
+ new_string: string;
353
+ replace_all: boolean;
354
+ }[];
355
+ }>;
356
+ }[] | undefined;
357
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
358
+ file_path: string;
359
+ edits: {
360
+ old_string: string;
361
+ new_string: string;
362
+ replace_all: boolean;
363
+ }[];
364
+ }> | undefined;
365
+ strict?: boolean;
366
+ onInputStart?: (options: import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
367
+ onInputDelta?: (options: {
368
+ inputTextDelta: string;
369
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
370
+ onInputAvailable?: ((options: {
371
+ input: {
372
+ file_path: string;
373
+ edits: {
374
+ old_string: string;
375
+ new_string: string;
376
+ replace_all: boolean;
377
+ }[];
378
+ };
379
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>) | undefined;
380
+ } & {
381
+ execute: import("ai").ToolExecuteFunction<{
382
+ file_path: string;
383
+ edits: {
384
+ old_string: string;
385
+ new_string: string;
386
+ replace_all: boolean;
387
+ }[];
388
+ }, string>;
389
+ outputSchema?: import("ai").FlexibleSchema<string> | undefined;
390
+ } & {
391
+ toModelOutput?: ((options: {
392
+ toolCallId: string;
393
+ input: {
394
+ file_path: string;
395
+ edits: {
396
+ old_string: string;
397
+ new_string: string;
398
+ replace_all: boolean;
399
+ }[];
400
+ };
401
+ output: string;
402
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
403
+ } & {
404
+ type: "provider";
405
+ id: `${string}.${string}`;
406
+ args: Record<string, unknown>;
407
+ supportsDeferredResults?: boolean;
408
+ });
409
+ export declare const multiEditTool: ({
410
+ description?: string;
411
+ title?: string;
412
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
413
+ inputSchema: import("ai").FlexibleSchema<{
414
+ file_path: string;
415
+ edits: {
416
+ old_string: string;
417
+ new_string: string;
418
+ replace_all: boolean;
419
+ }[];
420
+ }>;
421
+ inputExamples?: {
422
+ input: NoInfer<{
423
+ file_path: string;
424
+ edits: {
425
+ old_string: string;
426
+ new_string: string;
427
+ replace_all: boolean;
428
+ }[];
429
+ }>;
430
+ }[] | undefined;
431
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
432
+ file_path: string;
433
+ edits: {
434
+ old_string: string;
435
+ new_string: string;
436
+ replace_all: boolean;
437
+ }[];
438
+ }> | undefined;
439
+ strict?: boolean;
440
+ onInputStart?: (options: import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
441
+ onInputDelta?: (options: {
442
+ inputTextDelta: string;
443
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
444
+ onInputAvailable?: ((options: {
445
+ input: {
446
+ file_path: string;
447
+ edits: {
448
+ old_string: string;
449
+ new_string: string;
450
+ replace_all: boolean;
451
+ }[];
452
+ };
453
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>) | undefined;
454
+ } & {
455
+ outputSchema: import("ai").FlexibleSchema<string>;
456
+ execute?: never;
457
+ } & {
458
+ toModelOutput?: ((options: {
459
+ toolCallId: string;
460
+ input: {
461
+ file_path: string;
462
+ edits: {
463
+ old_string: string;
464
+ new_string: string;
465
+ replace_all: boolean;
466
+ }[];
467
+ };
468
+ output: string;
469
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
470
+ } & {
471
+ type?: undefined | "function";
472
+ }) | ({
473
+ description?: string;
474
+ title?: string;
475
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
476
+ inputSchema: import("ai").FlexibleSchema<{
477
+ file_path: string;
478
+ edits: {
479
+ old_string: string;
480
+ new_string: string;
481
+ replace_all: boolean;
482
+ }[];
483
+ }>;
484
+ inputExamples?: {
485
+ input: NoInfer<{
486
+ file_path: string;
487
+ edits: {
488
+ old_string: string;
489
+ new_string: string;
490
+ replace_all: boolean;
491
+ }[];
492
+ }>;
493
+ }[] | undefined;
494
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
495
+ file_path: string;
496
+ edits: {
497
+ old_string: string;
498
+ new_string: string;
499
+ replace_all: boolean;
500
+ }[];
501
+ }> | undefined;
502
+ strict?: boolean;
503
+ onInputStart?: (options: import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
504
+ onInputDelta?: (options: {
505
+ inputTextDelta: string;
506
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
507
+ onInputAvailable?: ((options: {
508
+ input: {
509
+ file_path: string;
510
+ edits: {
511
+ old_string: string;
512
+ new_string: string;
513
+ replace_all: boolean;
514
+ }[];
515
+ };
516
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>) | undefined;
517
+ } & {
518
+ outputSchema: import("ai").FlexibleSchema<string>;
519
+ execute?: never;
520
+ } & {
521
+ toModelOutput?: ((options: {
522
+ toolCallId: string;
523
+ input: {
524
+ file_path: string;
525
+ edits: {
526
+ old_string: string;
527
+ new_string: string;
528
+ replace_all: boolean;
529
+ }[];
530
+ };
531
+ output: string;
532
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
533
+ } & {
534
+ type: "dynamic";
535
+ }) | ({
536
+ description?: string;
537
+ title?: string;
538
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
539
+ inputSchema: import("ai").FlexibleSchema<{
540
+ file_path: string;
541
+ edits: {
542
+ old_string: string;
543
+ new_string: string;
544
+ replace_all: boolean;
545
+ }[];
546
+ }>;
547
+ inputExamples?: {
548
+ input: NoInfer<{
549
+ file_path: string;
550
+ edits: {
551
+ old_string: string;
552
+ new_string: string;
553
+ replace_all: boolean;
554
+ }[];
555
+ }>;
556
+ }[] | undefined;
557
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
558
+ file_path: string;
559
+ edits: {
560
+ old_string: string;
561
+ new_string: string;
562
+ replace_all: boolean;
563
+ }[];
564
+ }> | undefined;
565
+ strict?: boolean;
566
+ onInputStart?: (options: import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
567
+ onInputDelta?: (options: {
568
+ inputTextDelta: string;
569
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
570
+ onInputAvailable?: ((options: {
571
+ input: {
572
+ file_path: string;
573
+ edits: {
574
+ old_string: string;
575
+ new_string: string;
576
+ replace_all: boolean;
577
+ }[];
578
+ };
579
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>) | undefined;
580
+ } & {
581
+ outputSchema: import("ai").FlexibleSchema<string>;
582
+ execute?: never;
583
+ } & {
584
+ toModelOutput?: ((options: {
585
+ toolCallId: string;
586
+ input: {
587
+ file_path: string;
588
+ edits: {
589
+ old_string: string;
590
+ new_string: string;
591
+ replace_all: boolean;
592
+ }[];
593
+ };
594
+ output: string;
595
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
596
+ } & {
597
+ type: "provider";
598
+ id: `${string}.${string}`;
599
+ args: Record<string, unknown>;
600
+ supportsDeferredResults?: boolean;
601
+ }) | ({
602
+ description?: string;
603
+ title?: string;
604
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
605
+ inputSchema: import("ai").FlexibleSchema<{
606
+ file_path: string;
607
+ edits: {
608
+ old_string: string;
609
+ new_string: string;
610
+ replace_all: boolean;
611
+ }[];
612
+ }>;
613
+ inputExamples?: {
614
+ input: NoInfer<{
615
+ file_path: string;
616
+ edits: {
617
+ old_string: string;
618
+ new_string: string;
619
+ replace_all: boolean;
620
+ }[];
621
+ }>;
622
+ }[] | undefined;
623
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
624
+ file_path: string;
625
+ edits: {
626
+ old_string: string;
627
+ new_string: string;
628
+ replace_all: boolean;
629
+ }[];
630
+ }> | undefined;
631
+ strict?: boolean;
632
+ onInputStart?: (options: import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
633
+ onInputDelta?: (options: {
634
+ inputTextDelta: string;
635
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
636
+ onInputAvailable?: ((options: {
637
+ input: {
638
+ file_path: string;
639
+ edits: {
640
+ old_string: string;
641
+ new_string: string;
642
+ replace_all: boolean;
643
+ }[];
644
+ };
645
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>) | undefined;
646
+ } & {
647
+ execute: import("ai").ToolExecuteFunction<{
648
+ file_path: string;
649
+ edits: {
650
+ old_string: string;
651
+ new_string: string;
652
+ replace_all: boolean;
653
+ }[];
654
+ }, string>;
655
+ outputSchema?: import("ai").FlexibleSchema<string> | undefined;
656
+ } & {
657
+ toModelOutput?: ((options: {
658
+ toolCallId: string;
659
+ input: {
660
+ file_path: string;
661
+ edits: {
662
+ old_string: string;
663
+ new_string: string;
664
+ replace_all: boolean;
665
+ }[];
666
+ };
667
+ output: string;
668
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
669
+ } & {
670
+ type?: undefined | "function";
671
+ }) | ({
672
+ description?: string;
673
+ title?: string;
674
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
675
+ inputSchema: import("ai").FlexibleSchema<{
676
+ file_path: string;
677
+ edits: {
678
+ old_string: string;
679
+ new_string: string;
680
+ replace_all: boolean;
681
+ }[];
682
+ }>;
683
+ inputExamples?: {
684
+ input: NoInfer<{
685
+ file_path: string;
686
+ edits: {
687
+ old_string: string;
688
+ new_string: string;
689
+ replace_all: boolean;
690
+ }[];
691
+ }>;
692
+ }[] | undefined;
693
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
694
+ file_path: string;
695
+ edits: {
696
+ old_string: string;
697
+ new_string: string;
698
+ replace_all: boolean;
699
+ }[];
700
+ }> | undefined;
701
+ strict?: boolean;
702
+ onInputStart?: (options: import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
703
+ onInputDelta?: (options: {
704
+ inputTextDelta: string;
705
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
706
+ onInputAvailable?: ((options: {
707
+ input: {
708
+ file_path: string;
709
+ edits: {
710
+ old_string: string;
711
+ new_string: string;
712
+ replace_all: boolean;
713
+ }[];
714
+ };
715
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>) | undefined;
716
+ } & {
717
+ execute: import("ai").ToolExecuteFunction<{
718
+ file_path: string;
719
+ edits: {
720
+ old_string: string;
721
+ new_string: string;
722
+ replace_all: boolean;
723
+ }[];
724
+ }, string>;
725
+ outputSchema?: import("ai").FlexibleSchema<string> | undefined;
726
+ } & {
727
+ toModelOutput?: ((options: {
728
+ toolCallId: string;
729
+ input: {
730
+ file_path: string;
731
+ edits: {
732
+ old_string: string;
733
+ new_string: string;
734
+ replace_all: boolean;
735
+ }[];
736
+ };
737
+ output: string;
738
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
739
+ } & {
740
+ type: "dynamic";
741
+ }) | ({
742
+ description?: string;
743
+ title?: string;
744
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
745
+ inputSchema: import("ai").FlexibleSchema<{
746
+ file_path: string;
747
+ edits: {
748
+ old_string: string;
749
+ new_string: string;
750
+ replace_all: boolean;
751
+ }[];
752
+ }>;
753
+ inputExamples?: {
754
+ input: NoInfer<{
755
+ file_path: string;
756
+ edits: {
757
+ old_string: string;
758
+ new_string: string;
759
+ replace_all: boolean;
760
+ }[];
761
+ }>;
762
+ }[] | undefined;
763
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
764
+ file_path: string;
765
+ edits: {
766
+ old_string: string;
767
+ new_string: string;
768
+ replace_all: boolean;
769
+ }[];
770
+ }> | undefined;
771
+ strict?: boolean;
772
+ onInputStart?: (options: import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
773
+ onInputDelta?: (options: {
774
+ inputTextDelta: string;
775
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>;
776
+ onInputAvailable?: ((options: {
777
+ input: {
778
+ file_path: string;
779
+ edits: {
780
+ old_string: string;
781
+ new_string: string;
782
+ replace_all: boolean;
783
+ }[];
784
+ };
785
+ } & import("ai").ToolExecutionOptions) => void | PromiseLike<void>) | undefined;
786
+ } & {
787
+ execute: import("ai").ToolExecuteFunction<{
788
+ file_path: string;
789
+ edits: {
790
+ old_string: string;
791
+ new_string: string;
792
+ replace_all: boolean;
793
+ }[];
794
+ }, string>;
795
+ outputSchema?: import("ai").FlexibleSchema<string> | undefined;
796
+ } & {
797
+ toModelOutput?: ((options: {
798
+ toolCallId: string;
799
+ input: {
800
+ file_path: string;
801
+ edits: {
802
+ old_string: string;
803
+ new_string: string;
804
+ replace_all: boolean;
805
+ }[];
806
+ };
807
+ output: string;
808
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
809
+ } & {
810
+ type: "provider";
811
+ id: `${string}.${string}`;
812
+ args: Record<string, unknown>;
813
+ supportsDeferredResults?: boolean;
814
+ });