@deepagents/agent 4.3.0 → 5.0.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.
@@ -1,4 +1,4 @@
1
- import { type LanguageModelV3 } from '@ai-sdk/provider';
1
+ import { type LanguageModelV4 } from '@ai-sdk/provider';
2
2
  import { type GenerateTextResult, type ModelMessage, type StreamTextResult, type ToolCallRepairFunction, type ToolChoice, type ToolSet, type UIDataTypes, type UIMessage, type UITools, generateText } from 'ai';
3
3
  import z from 'zod';
4
4
  export interface Handoff<CIn> {
@@ -13,15 +13,15 @@ type transfer_tool = `transfer_to_${string}`;
13
13
  export type ContextVariables = Record<string, unknown>;
14
14
  export declare function agent<Output, CIn = ContextVariables, COut = CIn>(config: CreateAgent<Output, CIn, COut>): Agent<Output, CIn, COut>;
15
15
  export type ResponseMessage = UIMessage<unknown, UIDataTypes, UITools>;
16
- export type AgentModel = LanguageModelV3;
17
- export type OutputExtractorFn = (output: GenerateTextResult<ToolSet, any>) => string | Promise<string>;
16
+ export type AgentModel = LanguageModelV4;
17
+ export type OutputExtractorFn = (output: GenerateTextResult<ToolSet, any, any>) => string | Promise<string>;
18
18
  export type PrepareHandoffFn = (messages: ModelMessage[]) => void | Promise<void>;
19
19
  export type PrepareEndFn<C, _O = unknown> = (config: {
20
20
  messages: ResponseMessage[];
21
21
  responseMessage: ResponseMessage;
22
22
  contextVariables: C;
23
23
  abortSignal?: AbortSignal;
24
- }) => StreamTextResult<ToolSet, never> | Promise<StreamTextResult<ToolSet, never>> | undefined | void;
24
+ }) => StreamTextResult<ToolSet, any, any> | Promise<StreamTextResult<ToolSet, any, any>> | undefined | void;
25
25
  export interface CreateAgent<Output, CIn, COut = CIn> {
26
26
  name: string;
27
27
  prompt: Instruction<CIn>;
@@ -54,7 +54,7 @@ export declare class Agent<Output = unknown, CIn = ContextVariables, COut = CIn>
54
54
  constructor(config: CreateAgent<Output, CIn, COut>);
55
55
  repairToolCall(abortSignal?: AbortSignal): ToolCallRepairFunction<ToolSet>;
56
56
  get transfer_tools(): {
57
- [k: string]: (import("ai").Tool<never, never> | import("ai").Tool<any, any> | import("ai").Tool<any, never> | import("ai").Tool<never, any>) & Pick<import("ai").Tool<any, any>, "execute" | "onInputAvailable" | "onInputStart" | "onInputDelta" | "needsApproval">;
57
+ [k: string]: (import("ai").Tool<never, never, any> | import("ai").Tool<any, any, any> | import("ai").Tool<any, never, any> | import("ai").Tool<never, any, any>) & Pick<import("ai").Tool<any, any, any>, "execute" | "onInputAvailable" | "onInputStart" | "onInputDelta" | "needsApproval">;
58
58
  };
59
59
  get toolsNames(): string[];
60
60
  instructions(contextVariables?: CIn): string;
@@ -62,18 +62,460 @@ export declare class Agent<Output = unknown, CIn = ContextVariables, COut = CIn>
62
62
  asTool(props?: {
63
63
  toolDescription?: string;
64
64
  outputExtractor?: OutputExtractorFn;
65
- }): import("ai").Tool<{
66
- input: string;
67
- output?: string | undefined;
68
- }, string>;
65
+ }): ({
66
+ title?: string;
67
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
68
+ metadata?: import("@ai-sdk/provider").JSONObject;
69
+ inputSchema: import("ai").FlexibleSchema<{
70
+ input: string;
71
+ output?: string | undefined;
72
+ }>;
73
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
74
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
75
+ input: string;
76
+ output?: string | undefined;
77
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
78
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
79
+ onInputDelta?: ((options: {
80
+ inputTextDelta: string;
81
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
82
+ onInputAvailable?: ((options: {
83
+ input: {
84
+ input: string;
85
+ output?: string | undefined;
86
+ };
87
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
88
+ toModelOutput?: ((options: {
89
+ toolCallId: string;
90
+ input: {
91
+ input: string;
92
+ output?: string | undefined;
93
+ };
94
+ output: string;
95
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
96
+ } & {
97
+ outputSchema?: import("ai").FlexibleSchema<string> | undefined;
98
+ execute: import("ai").ToolExecuteFunction<{
99
+ input: string;
100
+ output?: string | undefined;
101
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
102
+ } & {
103
+ description?: string | ((options: {
104
+ context: NoInfer<import("@ai-sdk/provider-utils").Context>;
105
+ experimental_sandbox?: import("ai").Experimental_SandboxSession;
106
+ }) => string) | undefined;
107
+ strict?: boolean;
108
+ inputExamples?: {
109
+ input: NoInfer<{
110
+ input: string;
111
+ output?: string | undefined;
112
+ }>;
113
+ }[] | undefined;
114
+ id?: never;
115
+ isProviderExecuted?: never;
116
+ args?: never;
117
+ supportsDeferredResults?: never;
118
+ } & {
119
+ type?: undefined | "function";
120
+ } & {
121
+ execute: import("ai").ToolExecuteFunction<{
122
+ input: string;
123
+ output?: string | undefined;
124
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
125
+ }) | ({
126
+ title?: string;
127
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
128
+ metadata?: import("@ai-sdk/provider").JSONObject;
129
+ inputSchema: import("ai").FlexibleSchema<{
130
+ input: string;
131
+ output?: string | undefined;
132
+ }>;
133
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
134
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
135
+ input: string;
136
+ output?: string | undefined;
137
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
138
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
139
+ onInputDelta?: ((options: {
140
+ inputTextDelta: string;
141
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
142
+ onInputAvailable?: ((options: {
143
+ input: {
144
+ input: string;
145
+ output?: string | undefined;
146
+ };
147
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
148
+ toModelOutput?: ((options: {
149
+ toolCallId: string;
150
+ input: {
151
+ input: string;
152
+ output?: string | undefined;
153
+ };
154
+ output: string;
155
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
156
+ } & {
157
+ outputSchema?: import("ai").FlexibleSchema<string> | undefined;
158
+ execute: import("ai").ToolExecuteFunction<{
159
+ input: string;
160
+ output?: string | undefined;
161
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
162
+ } & {
163
+ description?: string | ((options: {
164
+ context: NoInfer<import("@ai-sdk/provider-utils").Context>;
165
+ experimental_sandbox?: import("ai").Experimental_SandboxSession;
166
+ }) => string) | undefined;
167
+ strict?: boolean;
168
+ inputExamples?: {
169
+ input: NoInfer<{
170
+ input: string;
171
+ output?: string | undefined;
172
+ }>;
173
+ }[] | undefined;
174
+ id?: never;
175
+ isProviderExecuted?: never;
176
+ args?: never;
177
+ supportsDeferredResults?: never;
178
+ } & {
179
+ type: "dynamic";
180
+ } & {
181
+ execute: import("ai").ToolExecuteFunction<{
182
+ input: string;
183
+ output?: string | undefined;
184
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
185
+ }) | ({
186
+ title?: string;
187
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
188
+ metadata?: import("@ai-sdk/provider").JSONObject;
189
+ inputSchema: import("ai").FlexibleSchema<{
190
+ input: string;
191
+ output?: string | undefined;
192
+ }>;
193
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
194
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
195
+ input: string;
196
+ output?: string | undefined;
197
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
198
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
199
+ onInputDelta?: ((options: {
200
+ inputTextDelta: string;
201
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
202
+ onInputAvailable?: ((options: {
203
+ input: {
204
+ input: string;
205
+ output?: string | undefined;
206
+ };
207
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
208
+ toModelOutput?: ((options: {
209
+ toolCallId: string;
210
+ input: {
211
+ input: string;
212
+ output?: string | undefined;
213
+ };
214
+ output: string;
215
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
216
+ } & {
217
+ outputSchema?: import("ai").FlexibleSchema<string> | undefined;
218
+ execute: import("ai").ToolExecuteFunction<{
219
+ input: string;
220
+ output?: string | undefined;
221
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
222
+ } & {
223
+ type: "provider";
224
+ id: `${string}.${string}`;
225
+ args: Record<string, unknown>;
226
+ description?: never;
227
+ strict?: never;
228
+ inputExamples?: never;
229
+ } & {
230
+ isProviderExecuted: false;
231
+ supportsDeferredResults?: never;
232
+ } & {
233
+ execute: import("ai").ToolExecuteFunction<{
234
+ input: string;
235
+ output?: string | undefined;
236
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
237
+ }) | ({
238
+ title?: string;
239
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
240
+ metadata?: import("@ai-sdk/provider").JSONObject;
241
+ inputSchema: import("ai").FlexibleSchema<{
242
+ input: string;
243
+ output?: string | undefined;
244
+ }>;
245
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
246
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
247
+ input: string;
248
+ output?: string | undefined;
249
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
250
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
251
+ onInputDelta?: ((options: {
252
+ inputTextDelta: string;
253
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
254
+ onInputAvailable?: ((options: {
255
+ input: {
256
+ input: string;
257
+ output?: string | undefined;
258
+ };
259
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
260
+ toModelOutput?: ((options: {
261
+ toolCallId: string;
262
+ input: {
263
+ input: string;
264
+ output?: string | undefined;
265
+ };
266
+ output: string;
267
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
268
+ } & {
269
+ outputSchema?: import("ai").FlexibleSchema<string> | undefined;
270
+ execute: import("ai").ToolExecuteFunction<{
271
+ input: string;
272
+ output?: string | undefined;
273
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
274
+ } & {
275
+ type: "provider";
276
+ id: `${string}.${string}`;
277
+ args: Record<string, unknown>;
278
+ description?: never;
279
+ strict?: never;
280
+ inputExamples?: never;
281
+ } & {
282
+ isProviderExecuted: true;
283
+ supportsDeferredResults?: boolean;
284
+ } & {
285
+ execute: import("ai").ToolExecuteFunction<{
286
+ input: string;
287
+ output?: string | undefined;
288
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
289
+ });
69
290
  toTool(props?: {
70
291
  toolDescription?: string;
71
292
  outputExtractor?: OutputExtractorFn;
72
293
  }): {
73
- [x: string]: import("ai").Tool<{
74
- input: string;
75
- output?: string | undefined;
76
- }, string>;
294
+ [x: string]: ({
295
+ title?: string;
296
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
297
+ metadata?: import("@ai-sdk/provider").JSONObject;
298
+ inputSchema: import("ai").FlexibleSchema<{
299
+ input: string;
300
+ output?: string | undefined;
301
+ }>;
302
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
303
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
304
+ input: string;
305
+ output?: string | undefined;
306
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
307
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
308
+ onInputDelta?: ((options: {
309
+ inputTextDelta: string;
310
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
311
+ onInputAvailable?: ((options: {
312
+ input: {
313
+ input: string;
314
+ output?: string | undefined;
315
+ };
316
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
317
+ toModelOutput?: ((options: {
318
+ toolCallId: string;
319
+ input: {
320
+ input: string;
321
+ output?: string | undefined;
322
+ };
323
+ output: string;
324
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
325
+ } & {
326
+ outputSchema?: import("ai").FlexibleSchema<string> | undefined;
327
+ execute: import("ai").ToolExecuteFunction<{
328
+ input: string;
329
+ output?: string | undefined;
330
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
331
+ } & {
332
+ description?: string | ((options: {
333
+ context: NoInfer<import("@ai-sdk/provider-utils").Context>;
334
+ experimental_sandbox?: import("ai").Experimental_SandboxSession;
335
+ }) => string) | undefined;
336
+ strict?: boolean;
337
+ inputExamples?: {
338
+ input: NoInfer<{
339
+ input: string;
340
+ output?: string | undefined;
341
+ }>;
342
+ }[] | undefined;
343
+ id?: never;
344
+ isProviderExecuted?: never;
345
+ args?: never;
346
+ supportsDeferredResults?: never;
347
+ } & {
348
+ type?: undefined | "function";
349
+ } & {
350
+ execute: import("ai").ToolExecuteFunction<{
351
+ input: string;
352
+ output?: string | undefined;
353
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
354
+ }) | ({
355
+ title?: string;
356
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
357
+ metadata?: import("@ai-sdk/provider").JSONObject;
358
+ inputSchema: import("ai").FlexibleSchema<{
359
+ input: string;
360
+ output?: string | undefined;
361
+ }>;
362
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
363
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
364
+ input: string;
365
+ output?: string | undefined;
366
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
367
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
368
+ onInputDelta?: ((options: {
369
+ inputTextDelta: string;
370
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
371
+ onInputAvailable?: ((options: {
372
+ input: {
373
+ input: string;
374
+ output?: string | undefined;
375
+ };
376
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
377
+ toModelOutput?: ((options: {
378
+ toolCallId: string;
379
+ input: {
380
+ input: string;
381
+ output?: string | undefined;
382
+ };
383
+ output: string;
384
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
385
+ } & {
386
+ outputSchema?: import("ai").FlexibleSchema<string> | undefined;
387
+ execute: import("ai").ToolExecuteFunction<{
388
+ input: string;
389
+ output?: string | undefined;
390
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
391
+ } & {
392
+ description?: string | ((options: {
393
+ context: NoInfer<import("@ai-sdk/provider-utils").Context>;
394
+ experimental_sandbox?: import("ai").Experimental_SandboxSession;
395
+ }) => string) | undefined;
396
+ strict?: boolean;
397
+ inputExamples?: {
398
+ input: NoInfer<{
399
+ input: string;
400
+ output?: string | undefined;
401
+ }>;
402
+ }[] | undefined;
403
+ id?: never;
404
+ isProviderExecuted?: never;
405
+ args?: never;
406
+ supportsDeferredResults?: never;
407
+ } & {
408
+ type: "dynamic";
409
+ } & {
410
+ execute: import("ai").ToolExecuteFunction<{
411
+ input: string;
412
+ output?: string | undefined;
413
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
414
+ }) | ({
415
+ title?: string;
416
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
417
+ metadata?: import("@ai-sdk/provider").JSONObject;
418
+ inputSchema: import("ai").FlexibleSchema<{
419
+ input: string;
420
+ output?: string | undefined;
421
+ }>;
422
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
423
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
424
+ input: string;
425
+ output?: string | undefined;
426
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
427
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
428
+ onInputDelta?: ((options: {
429
+ inputTextDelta: string;
430
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
431
+ onInputAvailable?: ((options: {
432
+ input: {
433
+ input: string;
434
+ output?: string | undefined;
435
+ };
436
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
437
+ toModelOutput?: ((options: {
438
+ toolCallId: string;
439
+ input: {
440
+ input: string;
441
+ output?: string | undefined;
442
+ };
443
+ output: string;
444
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
445
+ } & {
446
+ outputSchema?: import("ai").FlexibleSchema<string> | undefined;
447
+ execute: import("ai").ToolExecuteFunction<{
448
+ input: string;
449
+ output?: string | undefined;
450
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
451
+ } & {
452
+ type: "provider";
453
+ id: `${string}.${string}`;
454
+ args: Record<string, unknown>;
455
+ description?: never;
456
+ strict?: never;
457
+ inputExamples?: never;
458
+ } & {
459
+ isProviderExecuted: false;
460
+ supportsDeferredResults?: never;
461
+ } & {
462
+ execute: import("ai").ToolExecuteFunction<{
463
+ input: string;
464
+ output?: string | undefined;
465
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
466
+ }) | ({
467
+ title?: string;
468
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
469
+ metadata?: import("@ai-sdk/provider").JSONObject;
470
+ inputSchema: import("ai").FlexibleSchema<{
471
+ input: string;
472
+ output?: string | undefined;
473
+ }>;
474
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
475
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
476
+ input: string;
477
+ output?: string | undefined;
478
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
479
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
480
+ onInputDelta?: ((options: {
481
+ inputTextDelta: string;
482
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
483
+ onInputAvailable?: ((options: {
484
+ input: {
485
+ input: string;
486
+ output?: string | undefined;
487
+ };
488
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
489
+ toModelOutput?: ((options: {
490
+ toolCallId: string;
491
+ input: {
492
+ input: string;
493
+ output?: string | undefined;
494
+ };
495
+ output: string;
496
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
497
+ } & {
498
+ outputSchema?: import("ai").FlexibleSchema<string> | undefined;
499
+ execute: import("ai").ToolExecuteFunction<{
500
+ input: string;
501
+ output?: string | undefined;
502
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
503
+ } & {
504
+ type: "provider";
505
+ id: `${string}.${string}`;
506
+ args: Record<string, unknown>;
507
+ description?: never;
508
+ strict?: never;
509
+ inputExamples?: never;
510
+ } & {
511
+ isProviderExecuted: true;
512
+ supportsDeferredResults?: boolean;
513
+ } & {
514
+ execute: import("ai").ToolExecuteFunction<{
515
+ input: string;
516
+ output?: string | undefined;
517
+ }, string, NoInfer<import("@ai-sdk/provider-utils").Context>>;
518
+ });
77
519
  };
78
520
  debug(): void;
79
521
  toToolset(options?: {
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/lib/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAEjB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,SAAS,EACd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OAAO;IAcX,KAAK,CACH,KAAK,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,GAChE,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC;CAiB5B;AAsBD,MAAM,MAAM,WAAW,CAAC,CAAC,IACrB,MAAM,GACN,MAAM,EAAE,GACR,CAAC,CAAC,gBAAgB,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC,CAAC;AAEvC,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,0BAA0B,UAkB5E;yBAlBe,YAAY;sCAoBgB,0BAA0B;4CA0BnE,0BAA0B;qDA0B1B,0BAA0B;;AA+B7B,KAAK,cAAc,GAAG;IAAE,eAAe,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,CAAC;AAC9E,MAAM,MAAM,YAAY,GAAG;IAAE,MAAM,EAAE,cAAc,CAAA;CAAE,CAAC;AACtD,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,OAAO,GAAG,SAAS,GACxB,IAAI,IAAI,YAAY,CAiBtB;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,EAAE,8BAgB7D"}
@@ -17,8 +17,8 @@ interface MiniMaxProviderSettings {
17
17
  */
18
18
  headers?: Record<string, string>;
19
19
  }
20
- export declare function createMiniMax(config?: MiniMaxProviderSettings): (modelId: "MiniMax-M2.5") => import("@ai-sdk/provider").LanguageModelV3;
21
- export declare const minimax: (modelId: "MiniMax-M2.5") => import("@ai-sdk/provider").LanguageModelV3;
20
+ export declare function createMiniMax(config?: MiniMaxProviderSettings): (modelId: "MiniMax-M2.5") => import("@ai-sdk/provider").LanguageModelV4;
21
+ export declare const minimax: (modelId: "MiniMax-M2.5") => import("@ai-sdk/provider").LanguageModelV4;
22
22
  export declare function embed(documents: string[]): Promise<{
23
23
  embeddings: number[][];
24
24
  dimensions: number;
@@ -1,4 +1,4 @@
1
- import { type LanguageModelV3 } from '@ai-sdk/provider';
1
+ import { type LanguageModelV4 } from '@ai-sdk/provider';
2
2
  import { type ToolCallRepairFunction, type ToolSet } from 'ai';
3
- export declare function createRepairToolCall(model: LanguageModelV3, abortSignal?: AbortSignal): ToolCallRepairFunction<ToolSet>;
3
+ export declare function createRepairToolCall(model: LanguageModelV4, abortSignal?: AbortSignal): ToolCallRepairFunction<ToolSet>;
4
4
  //# sourceMappingURL=repair.d.ts.map
@@ -1,12 +1,12 @@
1
1
  import { type GenerateTextResult, type InferUIMessageChunk, type Output, type StreamTextResult, type ToolExecutionOptions, type ToolSet, type UIDataTypes, type UIMessage, type UITools } from 'ai';
2
- export declare function streamWrite(response: StreamTextResult<ToolSet, never>): Promise<void>;
2
+ export declare function streamWrite(response: StreamTextResult<ToolSet, any, any>): Promise<void>;
3
3
  export declare const printer: {
4
4
  readableStream: (stream: ReadableStream<InferUIMessageChunk<UIMessage<unknown, UIDataTypes, UITools>>>, options?: {
5
5
  reasoning?: boolean;
6
6
  wrapInTags?: boolean;
7
7
  text?: boolean;
8
8
  }) => Promise<void>;
9
- stdout: (response: StreamTextResult<ToolSet, never>, options?: {
9
+ stdout: (response: StreamTextResult<ToolSet, any, any>, options?: {
10
10
  reasoning?: boolean;
11
11
  text?: boolean;
12
12
  wrapInTags?: boolean;
@@ -21,6 +21,9 @@ export declare function input(defaultValue?: string): Promise<string>;
21
21
  export declare function confirm(message: string, defaultValue?: boolean): Promise<boolean>;
22
22
  export declare function last<T>(iterable: AsyncIterable<T>, position?: number): Promise<NonNullable<T>>;
23
23
  export declare function finished<T>(iterable: AsyncIterable<T>): Promise<void>;
24
- export declare function toOutput<T extends Output.Output>(result: Promise<GenerateTextResult<ToolSet, T>> | StreamTextResult<ToolSet, T>): Promise<import("ai").InferGenerateOutput<T>> | Promise<NonNullable<import("ai").InferStreamOutput<T>>>;
25
- export declare function toState<C>(options: ToolExecutionOptions): C;
24
+ export declare function toOutput<T extends Output.Output>(result: Promise<GenerateTextResult<ToolSet, any, T>> | StreamTextResult<ToolSet, any, T>): Promise<import("ai").InferGenerateOutput<T>> | Promise<NonNullable<import("ai").InferStreamOutput<T>>>;
25
+ export declare function toState<C>(options: ToolExecutionOptions<any>): C;
26
+ export declare function toToolsContext<C>(tools: ToolSet, context: C): {
27
+ [k: string]: C;
28
+ };
26
29
  //# sourceMappingURL=stream_utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stream_utils.d.ts","sourceRoot":"","sources":["../../src/lib/stream_utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,OAAO,EAEb,MAAM,IAAI,CAAC;AAaZ,wBAAsB,WAAW,CAAC,QAAQ,EAAE,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,iBAK3E;AAyCD,eAAO,MAAM,OAAO;6BAER,cAAc,CACpB,mBAAmB,CAAC,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAC9D,YACS;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE;uBAe7D,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,YAChC;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE;;;;CAkB1E,CAAC;AAEF,wBAAgB,kB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function generate<O, CIn, COut = CIn>(agent: Agent<O, CIn, COut>, messages: UIMessage[] | string, contextVariables: CIn, config?: {
11
11
  abortSignal?: AbortSignal;
12
12
  providerOptions?: Parameters<typeof generateText>[0]['providerOptions'];
13
- }): Promise<GenerateTextResult<ToolSet, any>>;
13
+ }): Promise<GenerateTextResult<ToolSet, any, any>>;
14
14
  export declare function execute<O, CIn, COut = CIn>(agent: Agent<O, CIn, COut>, messages: UIMessage[] | string, contextVariables: CIn, config?: {
15
15
  abortSignal?: AbortSignal;
16
16
  providerOptions?: Parameters<typeof streamText>[0]['providerOptions'];
17
17
  transform?: StreamTextTransform<ToolSet> | StreamTextTransform<ToolSet>[];
18
- }): Promise<StreamTextResult<ToolSet, any>>;
18
+ }): Promise<StreamTextResult<ToolSet, any, any>>;
19
19
  export declare const stream: typeof execute;
20
20
  export declare const prepareStep: <CIn>(agent: Agent<unknown, CIn, any>, model: AgentModel, contextVariables: CIn) => PrepareStepFunction<NoInfer<ToolSet>>;
21
21
  export declare function swarm<CIn>(agent: Agent<unknown, CIn, any>, messages: UIMessage[] | string, contextVariables: CIn, abortSignal?: AbortSignal): ReadableStream<import("ai").InferUIMessageChunk<UIMessage<unknown, UIDataTypes, UITools>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"swarm.d.ts","sourceRoot":"","sources":["../../src/lib/swarm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAEjB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EAEtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,SAAS,EAEd,KAAK,OAAO,EAIZ,YAAY,EAGZ,UAAU,EACX,MAAM,IAAI,CAAC;AAIZ,OAAO,EACL,KAAK,KAAK,EACV,KAAK,UAAU,EAGhB,MAAM,YAAY,CAAC;AAGpB,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,cAAc,CAAC;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AAE,GAAG,CAAC,EAC/B,OAAO,UAAU,EACjB,kBAAkB,GAAG,KACpB,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,CAyBtC,CAAC;AAEF,wBAAgB,KAAK,CAAC,GAAG,EACvB,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAC/B,QAAQ,EAAE,SAAS,EAAE,GAAG,MAAM,EAC9B,gBAAgB,EAAE,GAAG,EACrB,WAAW,CAAC,EAAE,WAAW,8FAqE1B;AAED,wBAAsB,YAAY,CAAC,GAAG,EACpC,YAAY,EAAE,UAAU,EACxB,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAC/B,QAAQ,EAAE,YAAY,EAAE,EACxB,gBAAgB,CAAC,EAAE,GAAG,GACrB,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAe9C"}
@@ -0,0 +1,11 @@
1
+ import type { ToolSet } from 'ai';
2
+ type ToolWithModelOutput<T extends ToolSet[string]> = T & {
3
+ toModelOutput: NonNullable<T['toModelOutput']>;
4
+ };
5
+ type ToolSetWithModelOutput<TOOLS extends ToolSet> = {
6
+ [NAME in keyof TOOLS]: ToolWithModelOutput<TOOLS[NAME]>;
7
+ };
8
+ /** Add a default projection that omits top-level `meta` from model output. */
9
+ export declare function withHostOnlyToolMetadata<TOOLS extends ToolSet>(tools: TOOLS): ToolSetWithModelOutput<TOOLS>;
10
+ export {};
11
+ //# sourceMappingURL=tool-output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-output.d.ts","sourceRoot":"","sources":["../../src/lib/tool-output.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAElC,KAAK,mBAAmB,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG;IACxD,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;CAChD,CAAC;AAEF,KAAK,sBAAsB,CAAC,KAAK,SAAS,OAAO,IAAI;KAClD,IAAI,IAAI,MAAM,KAAK,GAAG,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;CACxD,CAAC;AAEF,8EAA8E;AAC9E,wBAAgB,wBAAwB,CAAC,KAAK,SAAS,OAAO,EAC5D,KAAK,EAAE,KAAK,GACX,sBAAsB,CAAC,KAAK,CAAC,CAa/B"}