@botsrated/ai-sdk 0.1.1 → 0.1.2

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