@deepagents/toolbox 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.
@@ -2,7 +2,10 @@ import { type UIToolInvocation } from 'ai';
2
2
  import { z } from 'zod';
3
3
  export declare const GetWeatherSchema: z.ZodObject<{
4
4
  location: z.ZodString;
5
- unit: z.ZodEnum<["C", "F"]>;
5
+ unit: z.ZodEnum<{
6
+ C: "C";
7
+ F: "F";
8
+ }>;
6
9
  temperature: z.ZodNumber;
7
10
  condition: z.ZodString;
8
11
  high: z.ZodNumber;
@@ -10,41 +13,392 @@ export declare const GetWeatherSchema: z.ZodObject<{
10
13
  humidity: z.ZodNumber;
11
14
  windKph: z.ZodNumber;
12
15
  icon: z.ZodOptional<z.ZodString>;
13
- }, "strip", z.ZodTypeAny, {
14
- high: number;
15
- low: number;
16
- location: string;
17
- unit: "C" | "F";
18
- temperature: number;
19
- condition: string;
20
- humidity: number;
21
- windKph: number;
22
- icon?: string | undefined;
23
- }, {
24
- high: number;
25
- low: number;
26
- location: string;
27
- unit: "C" | "F";
28
- temperature: number;
29
- condition: string;
30
- humidity: number;
31
- windKph: number;
32
- icon?: string | undefined;
33
- }>;
16
+ }, z.core.$strip>;
34
17
  export type GetWeatherResult = z.infer<typeof GetWeatherSchema>;
35
- export declare const getWeatherTool: import("ai").Tool<{
36
- location: string;
37
- unit: "C" | "F";
38
- }, {
39
- high: number;
40
- low: number;
41
- location: string;
42
- unit: "C" | "F";
43
- temperature: number;
44
- condition: string;
45
- humidity: number;
46
- windKph: number;
47
- icon?: string | undefined;
48
- }>;
18
+ export declare const getWeatherTool: ({
19
+ title?: string;
20
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
21
+ metadata?: import("@ai-sdk/provider").JSONObject;
22
+ inputSchema: import("ai").FlexibleSchema<{
23
+ location: string;
24
+ unit: "C" | "F";
25
+ }>;
26
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
27
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
28
+ location: string;
29
+ unit: "C" | "F";
30
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
31
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
32
+ onInputDelta?: ((options: {
33
+ inputTextDelta: string;
34
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
35
+ onInputAvailable?: ((options: {
36
+ input: {
37
+ location: string;
38
+ unit: "C" | "F";
39
+ };
40
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
41
+ toModelOutput?: ((options: {
42
+ toolCallId: string;
43
+ input: {
44
+ location: string;
45
+ unit: "C" | "F";
46
+ };
47
+ output: NoInfer<{
48
+ location: string;
49
+ unit: "C" | "F";
50
+ temperature: number;
51
+ condition: string;
52
+ high: number;
53
+ low: number;
54
+ humidity: number;
55
+ windKph: number;
56
+ icon?: string | undefined;
57
+ }>;
58
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
59
+ } & {
60
+ outputSchema?: import("ai").FlexibleSchema<{
61
+ location: string;
62
+ unit: "C" | "F";
63
+ temperature: number;
64
+ condition: string;
65
+ high: number;
66
+ low: number;
67
+ humidity: number;
68
+ windKph: number;
69
+ icon?: string | undefined;
70
+ }> | undefined;
71
+ execute: import("ai").ToolExecuteFunction<{
72
+ location: string;
73
+ unit: "C" | "F";
74
+ }, {
75
+ location: string;
76
+ unit: "C" | "F";
77
+ temperature: number;
78
+ condition: string;
79
+ high: number;
80
+ low: number;
81
+ humidity: number;
82
+ windKph: number;
83
+ icon?: string | undefined;
84
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>>;
85
+ } & {
86
+ description?: string | ((options: {
87
+ context: NoInfer<import("@ai-sdk/provider-utils").Context>;
88
+ experimental_sandbox?: import("ai").Experimental_SandboxSession;
89
+ }) => string) | undefined;
90
+ strict?: boolean;
91
+ inputExamples?: {
92
+ input: NoInfer<{
93
+ location: string;
94
+ unit: "C" | "F";
95
+ }>;
96
+ }[] | undefined;
97
+ id?: never;
98
+ isProviderExecuted?: never;
99
+ args?: never;
100
+ supportsDeferredResults?: never;
101
+ } & {
102
+ type?: undefined | "function";
103
+ } & {
104
+ execute: import("ai").ToolExecuteFunction<{
105
+ location: string;
106
+ unit: "C" | "F";
107
+ }, {
108
+ location: string;
109
+ unit: "C" | "F";
110
+ temperature: number;
111
+ condition: string;
112
+ high: number;
113
+ low: number;
114
+ humidity: number;
115
+ windKph: number;
116
+ icon?: string | undefined;
117
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>>;
118
+ }) | ({
119
+ title?: string;
120
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
121
+ metadata?: import("@ai-sdk/provider").JSONObject;
122
+ inputSchema: import("ai").FlexibleSchema<{
123
+ location: string;
124
+ unit: "C" | "F";
125
+ }>;
126
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
127
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
128
+ location: string;
129
+ unit: "C" | "F";
130
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
131
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
132
+ onInputDelta?: ((options: {
133
+ inputTextDelta: string;
134
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
135
+ onInputAvailable?: ((options: {
136
+ input: {
137
+ location: string;
138
+ unit: "C" | "F";
139
+ };
140
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
141
+ toModelOutput?: ((options: {
142
+ toolCallId: string;
143
+ input: {
144
+ location: string;
145
+ unit: "C" | "F";
146
+ };
147
+ output: NoInfer<{
148
+ location: string;
149
+ unit: "C" | "F";
150
+ temperature: number;
151
+ condition: string;
152
+ high: number;
153
+ low: number;
154
+ humidity: number;
155
+ windKph: number;
156
+ icon?: string | undefined;
157
+ }>;
158
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
159
+ } & {
160
+ outputSchema?: import("ai").FlexibleSchema<{
161
+ location: string;
162
+ unit: "C" | "F";
163
+ temperature: number;
164
+ condition: string;
165
+ high: number;
166
+ low: number;
167
+ humidity: number;
168
+ windKph: number;
169
+ icon?: string | undefined;
170
+ }> | undefined;
171
+ execute: import("ai").ToolExecuteFunction<{
172
+ location: string;
173
+ unit: "C" | "F";
174
+ }, {
175
+ location: string;
176
+ unit: "C" | "F";
177
+ temperature: number;
178
+ condition: string;
179
+ high: number;
180
+ low: number;
181
+ humidity: number;
182
+ windKph: number;
183
+ icon?: string | undefined;
184
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>>;
185
+ } & {
186
+ description?: string | ((options: {
187
+ context: NoInfer<import("@ai-sdk/provider-utils").Context>;
188
+ experimental_sandbox?: import("ai").Experimental_SandboxSession;
189
+ }) => string) | undefined;
190
+ strict?: boolean;
191
+ inputExamples?: {
192
+ input: NoInfer<{
193
+ location: string;
194
+ unit: "C" | "F";
195
+ }>;
196
+ }[] | undefined;
197
+ id?: never;
198
+ isProviderExecuted?: never;
199
+ args?: never;
200
+ supportsDeferredResults?: never;
201
+ } & {
202
+ type: "dynamic";
203
+ } & {
204
+ execute: import("ai").ToolExecuteFunction<{
205
+ location: string;
206
+ unit: "C" | "F";
207
+ }, {
208
+ location: string;
209
+ unit: "C" | "F";
210
+ temperature: number;
211
+ condition: string;
212
+ high: number;
213
+ low: number;
214
+ humidity: number;
215
+ windKph: number;
216
+ icon?: string | undefined;
217
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>>;
218
+ }) | ({
219
+ title?: string;
220
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
221
+ metadata?: import("@ai-sdk/provider").JSONObject;
222
+ inputSchema: import("ai").FlexibleSchema<{
223
+ location: string;
224
+ unit: "C" | "F";
225
+ }>;
226
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
227
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
228
+ location: string;
229
+ unit: "C" | "F";
230
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
231
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
232
+ onInputDelta?: ((options: {
233
+ inputTextDelta: string;
234
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
235
+ onInputAvailable?: ((options: {
236
+ input: {
237
+ location: string;
238
+ unit: "C" | "F";
239
+ };
240
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
241
+ toModelOutput?: ((options: {
242
+ toolCallId: string;
243
+ input: {
244
+ location: string;
245
+ unit: "C" | "F";
246
+ };
247
+ output: NoInfer<{
248
+ location: string;
249
+ unit: "C" | "F";
250
+ temperature: number;
251
+ condition: string;
252
+ high: number;
253
+ low: number;
254
+ humidity: number;
255
+ windKph: number;
256
+ icon?: string | undefined;
257
+ }>;
258
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
259
+ } & {
260
+ outputSchema?: import("ai").FlexibleSchema<{
261
+ location: string;
262
+ unit: "C" | "F";
263
+ temperature: number;
264
+ condition: string;
265
+ high: number;
266
+ low: number;
267
+ humidity: number;
268
+ windKph: number;
269
+ icon?: string | undefined;
270
+ }> | undefined;
271
+ execute: import("ai").ToolExecuteFunction<{
272
+ location: string;
273
+ unit: "C" | "F";
274
+ }, {
275
+ location: string;
276
+ unit: "C" | "F";
277
+ temperature: number;
278
+ condition: string;
279
+ high: number;
280
+ low: number;
281
+ humidity: number;
282
+ windKph: number;
283
+ icon?: string | undefined;
284
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>>;
285
+ } & {
286
+ type: "provider";
287
+ id: `${string}.${string}`;
288
+ args: Record<string, unknown>;
289
+ description?: never;
290
+ strict?: never;
291
+ inputExamples?: never;
292
+ } & {
293
+ isProviderExecuted: false;
294
+ supportsDeferredResults?: never;
295
+ } & {
296
+ execute: import("ai").ToolExecuteFunction<{
297
+ location: string;
298
+ unit: "C" | "F";
299
+ }, {
300
+ location: string;
301
+ unit: "C" | "F";
302
+ temperature: number;
303
+ condition: string;
304
+ high: number;
305
+ low: number;
306
+ humidity: number;
307
+ windKph: number;
308
+ icon?: string | undefined;
309
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>>;
310
+ }) | ({
311
+ title?: string;
312
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
313
+ metadata?: import("@ai-sdk/provider").JSONObject;
314
+ inputSchema: import("ai").FlexibleSchema<{
315
+ location: string;
316
+ unit: "C" | "F";
317
+ }>;
318
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
319
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
320
+ location: string;
321
+ unit: "C" | "F";
322
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
323
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
324
+ onInputDelta?: ((options: {
325
+ inputTextDelta: string;
326
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
327
+ onInputAvailable?: ((options: {
328
+ input: {
329
+ location: string;
330
+ unit: "C" | "F";
331
+ };
332
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
333
+ toModelOutput?: ((options: {
334
+ toolCallId: string;
335
+ input: {
336
+ location: string;
337
+ unit: "C" | "F";
338
+ };
339
+ output: NoInfer<{
340
+ location: string;
341
+ unit: "C" | "F";
342
+ temperature: number;
343
+ condition: string;
344
+ high: number;
345
+ low: number;
346
+ humidity: number;
347
+ windKph: number;
348
+ icon?: string | undefined;
349
+ }>;
350
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
351
+ } & {
352
+ outputSchema?: import("ai").FlexibleSchema<{
353
+ location: string;
354
+ unit: "C" | "F";
355
+ temperature: number;
356
+ condition: string;
357
+ high: number;
358
+ low: number;
359
+ humidity: number;
360
+ windKph: number;
361
+ icon?: string | undefined;
362
+ }> | undefined;
363
+ execute: import("ai").ToolExecuteFunction<{
364
+ location: string;
365
+ unit: "C" | "F";
366
+ }, {
367
+ location: string;
368
+ unit: "C" | "F";
369
+ temperature: number;
370
+ condition: string;
371
+ high: number;
372
+ low: number;
373
+ humidity: number;
374
+ windKph: number;
375
+ icon?: string | undefined;
376
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>>;
377
+ } & {
378
+ type: "provider";
379
+ id: `${string}.${string}`;
380
+ args: Record<string, unknown>;
381
+ description?: never;
382
+ strict?: never;
383
+ inputExamples?: never;
384
+ } & {
385
+ isProviderExecuted: true;
386
+ supportsDeferredResults?: boolean;
387
+ } & {
388
+ execute: import("ai").ToolExecuteFunction<{
389
+ location: string;
390
+ unit: "C" | "F";
391
+ }, {
392
+ location: string;
393
+ unit: "C" | "F";
394
+ temperature: number;
395
+ condition: string;
396
+ high: number;
397
+ low: number;
398
+ humidity: number;
399
+ windKph: number;
400
+ icon?: string | undefined;
401
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>>;
402
+ });
49
403
  export type WeatherToolType = UIToolInvocation<typeof getWeatherTool>;
50
404
  //# sourceMappingURL=weather.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"weather.d.ts","sourceRoot":"","sources":["../../src/lib/weather.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAQ,MAAM,IAAI,CAAC;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU3B,CAAC;AAGH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,eAAO,MAAM,cAAc;;;;;;;;;;;;;EAmDzB,CAAC;AAwHH,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC,OAAO,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"weather.d.ts","sourceRoot":"","sources":["../../src/lib/weather.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAQ,MAAM,IAAI,CAAC;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;iBAU3B,CAAC;AAGH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDzB,CAAC;AAwHH,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC,OAAO,cAAc,CAAC,CAAC"}