@deepagents/agent 4.3.0 → 6.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;
@@ -2,94 +2,32 @@ import { z } from 'zod';
2
2
  declare const PlanningResponseSchema: z.ZodObject<{
3
3
  reasoning: z.ZodString;
4
4
  plan: z.ZodObject<{
5
- steps: z.ZodArray<z.ZodString, "many">;
6
- estimated_complexity: z.ZodEnum<["low", "medium", "high"]>;
7
- }, "strip", z.ZodTypeAny, {
8
- steps: string[];
9
- estimated_complexity: "low" | "medium" | "high";
10
- }, {
11
- steps: string[];
12
- estimated_complexity: "low" | "medium" | "high";
13
- }>;
14
- }, "strip", z.ZodTypeAny, {
15
- reasoning: string;
16
- plan: {
17
- steps: string[];
18
- estimated_complexity: "low" | "medium" | "high";
19
- };
20
- }, {
21
- reasoning: string;
22
- plan: {
23
- steps: string[];
24
- estimated_complexity: "low" | "medium" | "high";
25
- };
26
- }>;
5
+ steps: z.ZodArray<z.ZodString>;
6
+ estimated_complexity: z.ZodEnum<{
7
+ low: "low";
8
+ medium: "medium";
9
+ high: "high";
10
+ }>;
11
+ }, z.core.$strip>;
12
+ }, z.core.$strip>;
27
13
  declare const ExecutionResultSchema: z.ZodObject<{
28
14
  reasoning: z.ZodString;
29
15
  action_taken: z.ZodString;
30
16
  result: z.ZodString;
31
17
  success: z.ZodBoolean;
32
- }, "strip", z.ZodTypeAny, {
33
- reasoning: string;
34
- success: boolean;
35
- action_taken: string;
36
- result: string;
37
- }, {
38
- reasoning: string;
39
- success: boolean;
40
- action_taken: string;
41
- result: string;
42
- }>;
18
+ }, z.core.$strip>;
43
19
  declare const ReplanningDecisionSchema: z.ZodObject<{
44
20
  reasoning: z.ZodString;
45
- decision: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
21
+ decision: z.ZodDiscriminatedUnion<[z.ZodObject<{
46
22
  type: z.ZodLiteral<"continue">;
47
- updated_plan: z.ZodArray<z.ZodString, "many">;
23
+ updated_plan: z.ZodArray<z.ZodString>;
48
24
  notes: z.ZodOptional<z.ZodString>;
49
- }, "strip", z.ZodTypeAny, {
50
- type: "continue";
51
- updated_plan: string[];
52
- notes?: string | undefined;
53
- }, {
54
- type: "continue";
55
- updated_plan: string[];
56
- notes?: string | undefined;
57
- }>, z.ZodObject<{
25
+ }, z.core.$strip>, z.ZodObject<{
58
26
  type: z.ZodLiteral<"complete">;
59
27
  final_answer: z.ZodString;
60
28
  summary: z.ZodString;
61
- }, "strip", z.ZodTypeAny, {
62
- type: "complete";
63
- summary: string;
64
- final_answer: string;
65
- }, {
66
- type: "complete";
67
- summary: string;
68
- final_answer: string;
69
- }>]>;
70
- }, "strip", z.ZodTypeAny, {
71
- reasoning: string;
72
- decision: {
73
- type: "continue";
74
- updated_plan: string[];
75
- notes?: string | undefined;
76
- } | {
77
- type: "complete";
78
- summary: string;
79
- final_answer: string;
80
- };
81
- }, {
82
- reasoning: string;
83
- decision: {
84
- type: "continue";
85
- updated_plan: string[];
86
- notes?: string | undefined;
87
- } | {
88
- type: "complete";
89
- summary: string;
90
- final_answer: string;
91
- };
92
- }>;
29
+ }, z.core.$strip>], "type">;
30
+ }, z.core.$strip>;
93
31
  export type PlanningResponse = z.infer<typeof PlanningResponseSchema>;
94
32
  export type ExecutionResult = z.infer<typeof ExecutionResultSchema>;
95
33
  export type ReplanningDecision = z.infer<typeof ReplanningDecisionSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"plan_and_act.d.ts","sourceRoot":"","sources":["../../../../src/lib/patterns/plan_and_act/plan_and_act.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;EAY1B,CAAC;AAGH,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;EASzB,CAAC;AAGH,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;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