@qverisai/sdk 0.2.0 → 0.3.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.
@@ -0,0 +1,768 @@
1
+ /**
2
+ * Vercel AI SDK adapter for QVeris.
3
+ *
4
+ * Exposes the QVeris discover / inspect / call workflow as Vercel AI SDK tools,
5
+ * so an agent built with the `ai` package can find and invoke thousands of
6
+ * external capabilities through one QVeris API key.
7
+ *
8
+ * `ai` and `zod` are peer dependencies — install them alongside `@qverisai/sdk`.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * import { generateText } from 'ai';
13
+ * import { openai } from '@ai-sdk/openai';
14
+ * import { Qveris } from '@qverisai/sdk';
15
+ * import { getQverisTools } from '@qverisai/sdk/ai';
16
+ *
17
+ * const qveris = new Qveris({ apiKey: process.env.QVERIS_API_KEY! });
18
+ * const { text } = await generateText({
19
+ * model: openai('gpt-4o'),
20
+ * tools: getQverisTools(qveris),
21
+ * maxSteps: 6,
22
+ * prompt: 'Find a stock quote capability and quote AAPL.',
23
+ * });
24
+ * ```
25
+ *
26
+ * @module @qverisai/sdk/ai
27
+ */
28
+ import type { Qveris } from '../client.js';
29
+ /**
30
+ * Build Vercel AI SDK tools for the QVeris discover/inspect/call workflow.
31
+ *
32
+ * @param qveris - The Qveris client to route calls through.
33
+ * @param options - Optional `sessionId` for correlation/pricing context.
34
+ * @returns A tools object keyed by `qveris_discover` / `qveris_inspect` /
35
+ * `qveris_call`, ready to pass to `generateText`/`streamText`.
36
+ */
37
+ export declare function getQverisTools(qveris: Qveris, options?: {
38
+ sessionId?: string;
39
+ }): {
40
+ qveris_discover: ({
41
+ title?: string;
42
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
43
+ metadata?: import("@ai-sdk/provider").JSONObject;
44
+ inputSchema: import("ai").FlexibleSchema<{
45
+ query: string;
46
+ limit?: number | undefined;
47
+ }>;
48
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
49
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
50
+ query: string;
51
+ limit?: number | undefined;
52
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
53
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
54
+ onInputDelta?: ((options: {
55
+ inputTextDelta: string;
56
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
57
+ onInputAvailable?: ((options: {
58
+ input: {
59
+ query: string;
60
+ limit?: number | undefined;
61
+ };
62
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
63
+ toModelOutput?: ((options: {
64
+ toolCallId: string;
65
+ input: {
66
+ query: string;
67
+ limit?: number | undefined;
68
+ };
69
+ output: NoInfer<import("../types.js").SearchResponse>;
70
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
71
+ } & {
72
+ outputSchema?: import("ai").FlexibleSchema<import("../types.js").SearchResponse> | undefined;
73
+ execute: import("ai").ToolExecuteFunction<{
74
+ query: string;
75
+ limit?: number | undefined;
76
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
77
+ } & {
78
+ description?: string | ((options: {
79
+ context: NoInfer<import("@ai-sdk/provider-utils").Context>;
80
+ experimental_sandbox?: import("ai").Experimental_SandboxSession;
81
+ }) => string) | undefined;
82
+ strict?: boolean;
83
+ inputExamples?: {
84
+ input: NoInfer<{
85
+ query: string;
86
+ limit?: number | undefined;
87
+ }>;
88
+ }[] | undefined;
89
+ id?: never;
90
+ isProviderExecuted?: never;
91
+ args?: never;
92
+ supportsDeferredResults?: never;
93
+ } & {
94
+ type?: undefined | "function";
95
+ } & {
96
+ execute: import("ai").ToolExecuteFunction<{
97
+ query: string;
98
+ limit?: number | undefined;
99
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
100
+ }) | ({
101
+ title?: string;
102
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
103
+ metadata?: import("@ai-sdk/provider").JSONObject;
104
+ inputSchema: import("ai").FlexibleSchema<{
105
+ query: string;
106
+ limit?: number | undefined;
107
+ }>;
108
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
109
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
110
+ query: string;
111
+ limit?: number | undefined;
112
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
113
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
114
+ onInputDelta?: ((options: {
115
+ inputTextDelta: string;
116
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
117
+ onInputAvailable?: ((options: {
118
+ input: {
119
+ query: string;
120
+ limit?: number | undefined;
121
+ };
122
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
123
+ toModelOutput?: ((options: {
124
+ toolCallId: string;
125
+ input: {
126
+ query: string;
127
+ limit?: number | undefined;
128
+ };
129
+ output: NoInfer<import("../types.js").SearchResponse>;
130
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
131
+ } & {
132
+ outputSchema?: import("ai").FlexibleSchema<import("../types.js").SearchResponse> | undefined;
133
+ execute: import("ai").ToolExecuteFunction<{
134
+ query: string;
135
+ limit?: number | undefined;
136
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
137
+ } & {
138
+ description?: string | ((options: {
139
+ context: NoInfer<import("@ai-sdk/provider-utils").Context>;
140
+ experimental_sandbox?: import("ai").Experimental_SandboxSession;
141
+ }) => string) | undefined;
142
+ strict?: boolean;
143
+ inputExamples?: {
144
+ input: NoInfer<{
145
+ query: string;
146
+ limit?: number | undefined;
147
+ }>;
148
+ }[] | undefined;
149
+ id?: never;
150
+ isProviderExecuted?: never;
151
+ args?: never;
152
+ supportsDeferredResults?: never;
153
+ } & {
154
+ type: "dynamic";
155
+ } & {
156
+ execute: import("ai").ToolExecuteFunction<{
157
+ query: string;
158
+ limit?: number | undefined;
159
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
160
+ }) | ({
161
+ title?: string;
162
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
163
+ metadata?: import("@ai-sdk/provider").JSONObject;
164
+ inputSchema: import("ai").FlexibleSchema<{
165
+ query: string;
166
+ limit?: number | undefined;
167
+ }>;
168
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
169
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
170
+ query: string;
171
+ limit?: number | undefined;
172
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
173
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
174
+ onInputDelta?: ((options: {
175
+ inputTextDelta: string;
176
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
177
+ onInputAvailable?: ((options: {
178
+ input: {
179
+ query: string;
180
+ limit?: number | undefined;
181
+ };
182
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
183
+ toModelOutput?: ((options: {
184
+ toolCallId: string;
185
+ input: {
186
+ query: string;
187
+ limit?: number | undefined;
188
+ };
189
+ output: NoInfer<import("../types.js").SearchResponse>;
190
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
191
+ } & {
192
+ outputSchema?: import("ai").FlexibleSchema<import("../types.js").SearchResponse> | undefined;
193
+ execute: import("ai").ToolExecuteFunction<{
194
+ query: string;
195
+ limit?: number | undefined;
196
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
197
+ } & {
198
+ type: "provider";
199
+ id: `${string}.${string}`;
200
+ args: Record<string, unknown>;
201
+ description?: never;
202
+ strict?: never;
203
+ inputExamples?: never;
204
+ } & {
205
+ isProviderExecuted: false;
206
+ supportsDeferredResults?: never;
207
+ } & {
208
+ execute: import("ai").ToolExecuteFunction<{
209
+ query: string;
210
+ limit?: number | undefined;
211
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
212
+ }) | ({
213
+ title?: string;
214
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
215
+ metadata?: import("@ai-sdk/provider").JSONObject;
216
+ inputSchema: import("ai").FlexibleSchema<{
217
+ query: string;
218
+ limit?: number | undefined;
219
+ }>;
220
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
221
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
222
+ query: string;
223
+ limit?: number | undefined;
224
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
225
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
226
+ onInputDelta?: ((options: {
227
+ inputTextDelta: string;
228
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
229
+ onInputAvailable?: ((options: {
230
+ input: {
231
+ query: string;
232
+ limit?: number | undefined;
233
+ };
234
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
235
+ toModelOutput?: ((options: {
236
+ toolCallId: string;
237
+ input: {
238
+ query: string;
239
+ limit?: number | undefined;
240
+ };
241
+ output: NoInfer<import("../types.js").SearchResponse>;
242
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
243
+ } & {
244
+ outputSchema?: import("ai").FlexibleSchema<import("../types.js").SearchResponse> | undefined;
245
+ execute: import("ai").ToolExecuteFunction<{
246
+ query: string;
247
+ limit?: number | undefined;
248
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
249
+ } & {
250
+ type: "provider";
251
+ id: `${string}.${string}`;
252
+ args: Record<string, unknown>;
253
+ description?: never;
254
+ strict?: never;
255
+ inputExamples?: never;
256
+ } & {
257
+ isProviderExecuted: true;
258
+ supportsDeferredResults?: boolean;
259
+ } & {
260
+ execute: import("ai").ToolExecuteFunction<{
261
+ query: string;
262
+ limit?: number | undefined;
263
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
264
+ });
265
+ qveris_inspect: ({
266
+ title?: string;
267
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
268
+ metadata?: import("@ai-sdk/provider").JSONObject;
269
+ inputSchema: import("ai").FlexibleSchema<{
270
+ tool_ids: string[];
271
+ search_id?: string | undefined;
272
+ }>;
273
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
274
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
275
+ tool_ids: string[];
276
+ search_id?: string | undefined;
277
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
278
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
279
+ onInputDelta?: ((options: {
280
+ inputTextDelta: string;
281
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
282
+ onInputAvailable?: ((options: {
283
+ input: {
284
+ tool_ids: string[];
285
+ search_id?: string | undefined;
286
+ };
287
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
288
+ toModelOutput?: ((options: {
289
+ toolCallId: string;
290
+ input: {
291
+ tool_ids: string[];
292
+ search_id?: string | undefined;
293
+ };
294
+ output: NoInfer<import("../types.js").SearchResponse>;
295
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
296
+ } & {
297
+ outputSchema?: import("ai").FlexibleSchema<import("../types.js").SearchResponse> | undefined;
298
+ execute: import("ai").ToolExecuteFunction<{
299
+ tool_ids: string[];
300
+ search_id?: string | undefined;
301
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
302
+ } & {
303
+ description?: string | ((options: {
304
+ context: NoInfer<import("@ai-sdk/provider-utils").Context>;
305
+ experimental_sandbox?: import("ai").Experimental_SandboxSession;
306
+ }) => string) | undefined;
307
+ strict?: boolean;
308
+ inputExamples?: {
309
+ input: NoInfer<{
310
+ tool_ids: string[];
311
+ search_id?: string | undefined;
312
+ }>;
313
+ }[] | undefined;
314
+ id?: never;
315
+ isProviderExecuted?: never;
316
+ args?: never;
317
+ supportsDeferredResults?: never;
318
+ } & {
319
+ type?: undefined | "function";
320
+ } & {
321
+ execute: import("ai").ToolExecuteFunction<{
322
+ tool_ids: string[];
323
+ search_id?: string | undefined;
324
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
325
+ }) | ({
326
+ title?: string;
327
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
328
+ metadata?: import("@ai-sdk/provider").JSONObject;
329
+ inputSchema: import("ai").FlexibleSchema<{
330
+ tool_ids: string[];
331
+ search_id?: string | undefined;
332
+ }>;
333
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
334
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
335
+ tool_ids: string[];
336
+ search_id?: string | undefined;
337
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
338
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
339
+ onInputDelta?: ((options: {
340
+ inputTextDelta: string;
341
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
342
+ onInputAvailable?: ((options: {
343
+ input: {
344
+ tool_ids: string[];
345
+ search_id?: string | undefined;
346
+ };
347
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
348
+ toModelOutput?: ((options: {
349
+ toolCallId: string;
350
+ input: {
351
+ tool_ids: string[];
352
+ search_id?: string | undefined;
353
+ };
354
+ output: NoInfer<import("../types.js").SearchResponse>;
355
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
356
+ } & {
357
+ outputSchema?: import("ai").FlexibleSchema<import("../types.js").SearchResponse> | undefined;
358
+ execute: import("ai").ToolExecuteFunction<{
359
+ tool_ids: string[];
360
+ search_id?: string | undefined;
361
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
362
+ } & {
363
+ description?: string | ((options: {
364
+ context: NoInfer<import("@ai-sdk/provider-utils").Context>;
365
+ experimental_sandbox?: import("ai").Experimental_SandboxSession;
366
+ }) => string) | undefined;
367
+ strict?: boolean;
368
+ inputExamples?: {
369
+ input: NoInfer<{
370
+ tool_ids: string[];
371
+ search_id?: string | undefined;
372
+ }>;
373
+ }[] | undefined;
374
+ id?: never;
375
+ isProviderExecuted?: never;
376
+ args?: never;
377
+ supportsDeferredResults?: never;
378
+ } & {
379
+ type: "dynamic";
380
+ } & {
381
+ execute: import("ai").ToolExecuteFunction<{
382
+ tool_ids: string[];
383
+ search_id?: string | undefined;
384
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
385
+ }) | ({
386
+ title?: string;
387
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
388
+ metadata?: import("@ai-sdk/provider").JSONObject;
389
+ inputSchema: import("ai").FlexibleSchema<{
390
+ tool_ids: string[];
391
+ search_id?: string | undefined;
392
+ }>;
393
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
394
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
395
+ tool_ids: string[];
396
+ search_id?: string | undefined;
397
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
398
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
399
+ onInputDelta?: ((options: {
400
+ inputTextDelta: string;
401
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
402
+ onInputAvailable?: ((options: {
403
+ input: {
404
+ tool_ids: string[];
405
+ search_id?: string | undefined;
406
+ };
407
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
408
+ toModelOutput?: ((options: {
409
+ toolCallId: string;
410
+ input: {
411
+ tool_ids: string[];
412
+ search_id?: string | undefined;
413
+ };
414
+ output: NoInfer<import("../types.js").SearchResponse>;
415
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
416
+ } & {
417
+ outputSchema?: import("ai").FlexibleSchema<import("../types.js").SearchResponse> | undefined;
418
+ execute: import("ai").ToolExecuteFunction<{
419
+ tool_ids: string[];
420
+ search_id?: string | undefined;
421
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
422
+ } & {
423
+ type: "provider";
424
+ id: `${string}.${string}`;
425
+ args: Record<string, unknown>;
426
+ description?: never;
427
+ strict?: never;
428
+ inputExamples?: never;
429
+ } & {
430
+ isProviderExecuted: false;
431
+ supportsDeferredResults?: never;
432
+ } & {
433
+ execute: import("ai").ToolExecuteFunction<{
434
+ tool_ids: string[];
435
+ search_id?: string | undefined;
436
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
437
+ }) | ({
438
+ title?: string;
439
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
440
+ metadata?: import("@ai-sdk/provider").JSONObject;
441
+ inputSchema: import("ai").FlexibleSchema<{
442
+ tool_ids: string[];
443
+ search_id?: string | undefined;
444
+ }>;
445
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
446
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
447
+ tool_ids: string[];
448
+ search_id?: string | undefined;
449
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
450
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
451
+ onInputDelta?: ((options: {
452
+ inputTextDelta: string;
453
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
454
+ onInputAvailable?: ((options: {
455
+ input: {
456
+ tool_ids: string[];
457
+ search_id?: string | undefined;
458
+ };
459
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
460
+ toModelOutput?: ((options: {
461
+ toolCallId: string;
462
+ input: {
463
+ tool_ids: string[];
464
+ search_id?: string | undefined;
465
+ };
466
+ output: NoInfer<import("../types.js").SearchResponse>;
467
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
468
+ } & {
469
+ outputSchema?: import("ai").FlexibleSchema<import("../types.js").SearchResponse> | undefined;
470
+ execute: import("ai").ToolExecuteFunction<{
471
+ tool_ids: string[];
472
+ search_id?: string | undefined;
473
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
474
+ } & {
475
+ type: "provider";
476
+ id: `${string}.${string}`;
477
+ args: Record<string, unknown>;
478
+ description?: never;
479
+ strict?: never;
480
+ inputExamples?: never;
481
+ } & {
482
+ isProviderExecuted: true;
483
+ supportsDeferredResults?: boolean;
484
+ } & {
485
+ execute: import("ai").ToolExecuteFunction<{
486
+ tool_ids: string[];
487
+ search_id?: string | undefined;
488
+ }, import("../types.js").SearchResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
489
+ });
490
+ qveris_call: ({
491
+ title?: string;
492
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
493
+ metadata?: import("@ai-sdk/provider").JSONObject;
494
+ inputSchema: import("ai").FlexibleSchema<{
495
+ tool_id: string;
496
+ params_to_tool?: Record<string, unknown> | undefined;
497
+ search_id?: string | undefined;
498
+ max_response_size?: number | undefined;
499
+ }>;
500
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
501
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
502
+ tool_id: string;
503
+ params_to_tool?: Record<string, unknown> | undefined;
504
+ search_id?: string | undefined;
505
+ max_response_size?: number | undefined;
506
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
507
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
508
+ onInputDelta?: ((options: {
509
+ inputTextDelta: string;
510
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
511
+ onInputAvailable?: ((options: {
512
+ input: {
513
+ tool_id: string;
514
+ params_to_tool?: Record<string, unknown> | undefined;
515
+ search_id?: string | undefined;
516
+ max_response_size?: number | undefined;
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
+ tool_id: string;
523
+ params_to_tool?: Record<string, unknown> | undefined;
524
+ search_id?: string | undefined;
525
+ max_response_size?: number | undefined;
526
+ };
527
+ output: NoInfer<import("../types.js").ExecuteResponse>;
528
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
529
+ } & {
530
+ outputSchema?: import("ai").FlexibleSchema<import("../types.js").ExecuteResponse> | undefined;
531
+ execute: import("ai").ToolExecuteFunction<{
532
+ tool_id: string;
533
+ params_to_tool?: Record<string, unknown> | undefined;
534
+ search_id?: string | undefined;
535
+ max_response_size?: number | undefined;
536
+ }, import("../types.js").ExecuteResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
537
+ } & {
538
+ description?: string | ((options: {
539
+ context: NoInfer<import("@ai-sdk/provider-utils").Context>;
540
+ experimental_sandbox?: import("ai").Experimental_SandboxSession;
541
+ }) => string) | undefined;
542
+ strict?: boolean;
543
+ inputExamples?: {
544
+ input: NoInfer<{
545
+ tool_id: string;
546
+ params_to_tool?: Record<string, unknown> | undefined;
547
+ search_id?: string | undefined;
548
+ max_response_size?: number | undefined;
549
+ }>;
550
+ }[] | undefined;
551
+ id?: never;
552
+ isProviderExecuted?: never;
553
+ args?: never;
554
+ supportsDeferredResults?: never;
555
+ } & {
556
+ type?: undefined | "function";
557
+ } & {
558
+ execute: import("ai").ToolExecuteFunction<{
559
+ tool_id: string;
560
+ params_to_tool?: Record<string, unknown> | undefined;
561
+ search_id?: string | undefined;
562
+ max_response_size?: number | undefined;
563
+ }, import("../types.js").ExecuteResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
564
+ }) | ({
565
+ title?: string;
566
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
567
+ metadata?: import("@ai-sdk/provider").JSONObject;
568
+ inputSchema: import("ai").FlexibleSchema<{
569
+ tool_id: string;
570
+ params_to_tool?: Record<string, unknown> | undefined;
571
+ search_id?: string | undefined;
572
+ max_response_size?: number | undefined;
573
+ }>;
574
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
575
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
576
+ tool_id: string;
577
+ params_to_tool?: Record<string, unknown> | undefined;
578
+ search_id?: string | undefined;
579
+ max_response_size?: number | undefined;
580
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
581
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
582
+ onInputDelta?: ((options: {
583
+ inputTextDelta: string;
584
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
585
+ onInputAvailable?: ((options: {
586
+ input: {
587
+ tool_id: string;
588
+ params_to_tool?: Record<string, unknown> | undefined;
589
+ search_id?: string | undefined;
590
+ max_response_size?: number | undefined;
591
+ };
592
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
593
+ toModelOutput?: ((options: {
594
+ toolCallId: string;
595
+ input: {
596
+ tool_id: string;
597
+ params_to_tool?: Record<string, unknown> | undefined;
598
+ search_id?: string | undefined;
599
+ max_response_size?: number | undefined;
600
+ };
601
+ output: NoInfer<import("../types.js").ExecuteResponse>;
602
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
603
+ } & {
604
+ outputSchema?: import("ai").FlexibleSchema<import("../types.js").ExecuteResponse> | undefined;
605
+ execute: import("ai").ToolExecuteFunction<{
606
+ tool_id: string;
607
+ params_to_tool?: Record<string, unknown> | undefined;
608
+ search_id?: string | undefined;
609
+ max_response_size?: number | undefined;
610
+ }, import("../types.js").ExecuteResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
611
+ } & {
612
+ description?: string | ((options: {
613
+ context: NoInfer<import("@ai-sdk/provider-utils").Context>;
614
+ experimental_sandbox?: import("ai").Experimental_SandboxSession;
615
+ }) => string) | undefined;
616
+ strict?: boolean;
617
+ inputExamples?: {
618
+ input: NoInfer<{
619
+ tool_id: string;
620
+ params_to_tool?: Record<string, unknown> | undefined;
621
+ search_id?: string | undefined;
622
+ max_response_size?: number | undefined;
623
+ }>;
624
+ }[] | undefined;
625
+ id?: never;
626
+ isProviderExecuted?: never;
627
+ args?: never;
628
+ supportsDeferredResults?: never;
629
+ } & {
630
+ type: "dynamic";
631
+ } & {
632
+ execute: import("ai").ToolExecuteFunction<{
633
+ tool_id: string;
634
+ params_to_tool?: Record<string, unknown> | undefined;
635
+ search_id?: string | undefined;
636
+ max_response_size?: number | undefined;
637
+ }, import("../types.js").ExecuteResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
638
+ }) | ({
639
+ title?: string;
640
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
641
+ metadata?: import("@ai-sdk/provider").JSONObject;
642
+ inputSchema: import("ai").FlexibleSchema<{
643
+ tool_id: string;
644
+ params_to_tool?: Record<string, unknown> | undefined;
645
+ search_id?: string | undefined;
646
+ max_response_size?: number | undefined;
647
+ }>;
648
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
649
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
650
+ tool_id: string;
651
+ params_to_tool?: Record<string, unknown> | undefined;
652
+ search_id?: string | undefined;
653
+ max_response_size?: number | undefined;
654
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
655
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
656
+ onInputDelta?: ((options: {
657
+ inputTextDelta: string;
658
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
659
+ onInputAvailable?: ((options: {
660
+ input: {
661
+ tool_id: string;
662
+ params_to_tool?: Record<string, unknown> | undefined;
663
+ search_id?: string | undefined;
664
+ max_response_size?: number | undefined;
665
+ };
666
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
667
+ toModelOutput?: ((options: {
668
+ toolCallId: string;
669
+ input: {
670
+ tool_id: string;
671
+ params_to_tool?: Record<string, unknown> | undefined;
672
+ search_id?: string | undefined;
673
+ max_response_size?: number | undefined;
674
+ };
675
+ output: NoInfer<import("../types.js").ExecuteResponse>;
676
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
677
+ } & {
678
+ outputSchema?: import("ai").FlexibleSchema<import("../types.js").ExecuteResponse> | undefined;
679
+ execute: import("ai").ToolExecuteFunction<{
680
+ tool_id: string;
681
+ params_to_tool?: Record<string, unknown> | undefined;
682
+ search_id?: string | undefined;
683
+ max_response_size?: number | undefined;
684
+ }, import("../types.js").ExecuteResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
685
+ } & {
686
+ type: "provider";
687
+ id: `${string}.${string}`;
688
+ args: Record<string, unknown>;
689
+ description?: never;
690
+ strict?: never;
691
+ inputExamples?: never;
692
+ } & {
693
+ isProviderExecuted: false;
694
+ supportsDeferredResults?: never;
695
+ } & {
696
+ execute: import("ai").ToolExecuteFunction<{
697
+ tool_id: string;
698
+ params_to_tool?: Record<string, unknown> | undefined;
699
+ search_id?: string | undefined;
700
+ max_response_size?: number | undefined;
701
+ }, import("../types.js").ExecuteResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
702
+ }) | ({
703
+ title?: string;
704
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
705
+ metadata?: import("@ai-sdk/provider").JSONObject;
706
+ inputSchema: import("ai").FlexibleSchema<{
707
+ tool_id: string;
708
+ params_to_tool?: Record<string, unknown> | undefined;
709
+ search_id?: string | undefined;
710
+ max_response_size?: number | undefined;
711
+ }>;
712
+ contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
713
+ needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
714
+ tool_id: string;
715
+ params_to_tool?: Record<string, unknown> | undefined;
716
+ search_id?: string | undefined;
717
+ max_response_size?: number | undefined;
718
+ }, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
719
+ onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
720
+ onInputDelta?: ((options: {
721
+ inputTextDelta: string;
722
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
723
+ onInputAvailable?: ((options: {
724
+ input: {
725
+ tool_id: string;
726
+ params_to_tool?: Record<string, unknown> | undefined;
727
+ search_id?: string | undefined;
728
+ max_response_size?: number | undefined;
729
+ };
730
+ } & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
731
+ toModelOutput?: ((options: {
732
+ toolCallId: string;
733
+ input: {
734
+ tool_id: string;
735
+ params_to_tool?: Record<string, unknown> | undefined;
736
+ search_id?: string | undefined;
737
+ max_response_size?: number | undefined;
738
+ };
739
+ output: NoInfer<import("../types.js").ExecuteResponse>;
740
+ }) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
741
+ } & {
742
+ outputSchema?: import("ai").FlexibleSchema<import("../types.js").ExecuteResponse> | undefined;
743
+ execute: import("ai").ToolExecuteFunction<{
744
+ tool_id: string;
745
+ params_to_tool?: Record<string, unknown> | undefined;
746
+ search_id?: string | undefined;
747
+ max_response_size?: number | undefined;
748
+ }, import("../types.js").ExecuteResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
749
+ } & {
750
+ type: "provider";
751
+ id: `${string}.${string}`;
752
+ args: Record<string, unknown>;
753
+ description?: never;
754
+ strict?: never;
755
+ inputExamples?: never;
756
+ } & {
757
+ isProviderExecuted: true;
758
+ supportsDeferredResults?: boolean;
759
+ } & {
760
+ execute: import("ai").ToolExecuteFunction<{
761
+ tool_id: string;
762
+ params_to_tool?: Record<string, unknown> | undefined;
763
+ search_id?: string | undefined;
764
+ max_response_size?: number | undefined;
765
+ }, import("../types.js").ExecuteResponse, NoInfer<import("@ai-sdk/provider-utils").Context>>;
766
+ });
767
+ };
768
+ //# sourceMappingURL=ai.d.ts.map