@quelvio/langchain 0.1.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,789 @@
1
+ import { z } from 'zod';
2
+ import { CallbackManagerForRetrieverRun, CallbackManagerForToolRun } from '@langchain/core/callbacks/manager';
3
+ import { Document } from '@langchain/core/documents';
4
+ import { BaseRetriever, BaseRetrieverInput } from '@langchain/core/retrievers';
5
+ import { StructuredTool } from '@langchain/core/tools';
6
+
7
+ /**
8
+ * Zod schemas + TypeScript types for Quelvio API request and response
9
+ * payloads. These mirror the wire format documented at
10
+ * `https://api.quelvio.com/openapi.json`. Every response schema uses
11
+ * `.passthrough()` so additions to the API (new fields on a chunk, a new
12
+ * top-level response key) do not break older client versions.
13
+ */
14
+
15
+ declare const QueryModeSchema: z.ZodEnum<["fast", "standard", "deep"]>;
16
+ type QueryMode = z.infer<typeof QueryModeSchema>;
17
+ declare const QueryRequestSchema: z.ZodObject<{
18
+ query: z.ZodString;
19
+ limit: z.ZodDefault<z.ZodNumber>;
20
+ mode: z.ZodDefault<z.ZodEnum<["fast", "standard", "deep"]>>;
21
+ domain_filter: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ query: string;
24
+ limit: number;
25
+ mode: "fast" | "standard" | "deep";
26
+ domain_filter?: string | null | undefined;
27
+ }, {
28
+ query: string;
29
+ limit?: number | undefined;
30
+ mode?: "fast" | "standard" | "deep" | undefined;
31
+ domain_filter?: string | null | undefined;
32
+ }>;
33
+ type QueryRequest = z.infer<typeof QueryRequestSchema>;
34
+ declare const ChunkResultSchema: z.ZodObject<{
35
+ chunk_id: z.ZodString;
36
+ content_piece_id: z.ZodString;
37
+ title: z.ZodString;
38
+ excerpt: z.ZodString;
39
+ score: z.ZodNumber;
40
+ rank: z.ZodNumber;
41
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
42
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
+ creator_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
45
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
+ department: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
49
+ chunk_id: z.ZodString;
50
+ content_piece_id: z.ZodString;
51
+ title: z.ZodString;
52
+ excerpt: z.ZodString;
53
+ score: z.ZodNumber;
54
+ rank: z.ZodNumber;
55
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
56
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
58
+ creator_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
+ department: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
63
+ chunk_id: z.ZodString;
64
+ content_piece_id: z.ZodString;
65
+ title: z.ZodString;
66
+ excerpt: z.ZodString;
67
+ score: z.ZodNumber;
68
+ rank: z.ZodNumber;
69
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
70
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
71
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
72
+ creator_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
73
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
74
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
75
+ department: z.ZodOptional<z.ZodNullable<z.ZodString>>;
76
+ }, z.ZodTypeAny, "passthrough">>;
77
+ type ChunkResult = z.infer<typeof ChunkResultSchema>;
78
+ declare const QueryResponseSchema: z.ZodObject<{
79
+ query: z.ZodString;
80
+ query_id: z.ZodString;
81
+ results: z.ZodDefault<z.ZodArray<z.ZodObject<{
82
+ chunk_id: z.ZodString;
83
+ content_piece_id: z.ZodString;
84
+ title: z.ZodString;
85
+ excerpt: z.ZodString;
86
+ score: z.ZodNumber;
87
+ rank: z.ZodNumber;
88
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
89
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
90
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
91
+ creator_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
92
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
93
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
+ department: z.ZodOptional<z.ZodNullable<z.ZodString>>;
95
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
96
+ chunk_id: z.ZodString;
97
+ content_piece_id: z.ZodString;
98
+ title: z.ZodString;
99
+ excerpt: z.ZodString;
100
+ score: z.ZodNumber;
101
+ rank: z.ZodNumber;
102
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
103
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
105
+ creator_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
106
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
107
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
+ department: z.ZodOptional<z.ZodNullable<z.ZodString>>;
109
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
110
+ chunk_id: z.ZodString;
111
+ content_piece_id: z.ZodString;
112
+ title: z.ZodString;
113
+ excerpt: z.ZodString;
114
+ score: z.ZodNumber;
115
+ rank: z.ZodNumber;
116
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
117
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
+ creator_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
120
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
122
+ department: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
124
+ result_count: z.ZodDefault<z.ZodNumber>;
125
+ coverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
126
+ risk_flag: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
127
+ retrieval_mode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
128
+ synthesis: z.ZodOptional<z.ZodNullable<z.ZodString>>;
129
+ synthesis_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
130
+ latency_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
131
+ tokens_consumed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
132
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
133
+ query: z.ZodString;
134
+ query_id: z.ZodString;
135
+ results: z.ZodDefault<z.ZodArray<z.ZodObject<{
136
+ chunk_id: z.ZodString;
137
+ content_piece_id: z.ZodString;
138
+ title: z.ZodString;
139
+ excerpt: z.ZodString;
140
+ score: z.ZodNumber;
141
+ rank: z.ZodNumber;
142
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
143
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
144
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
145
+ creator_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
146
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
147
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
148
+ department: z.ZodOptional<z.ZodNullable<z.ZodString>>;
149
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
150
+ chunk_id: z.ZodString;
151
+ content_piece_id: z.ZodString;
152
+ title: z.ZodString;
153
+ excerpt: z.ZodString;
154
+ score: z.ZodNumber;
155
+ rank: z.ZodNumber;
156
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
157
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
158
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
159
+ creator_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
160
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
161
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
162
+ department: z.ZodOptional<z.ZodNullable<z.ZodString>>;
163
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
164
+ chunk_id: z.ZodString;
165
+ content_piece_id: z.ZodString;
166
+ title: z.ZodString;
167
+ excerpt: z.ZodString;
168
+ score: z.ZodNumber;
169
+ rank: z.ZodNumber;
170
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
171
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
172
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
173
+ creator_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
174
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
175
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
176
+ department: z.ZodOptional<z.ZodNullable<z.ZodString>>;
177
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
178
+ result_count: z.ZodDefault<z.ZodNumber>;
179
+ coverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
180
+ risk_flag: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
181
+ retrieval_mode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
182
+ synthesis: z.ZodOptional<z.ZodNullable<z.ZodString>>;
183
+ synthesis_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
184
+ latency_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
185
+ tokens_consumed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
186
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
187
+ query: z.ZodString;
188
+ query_id: z.ZodString;
189
+ results: z.ZodDefault<z.ZodArray<z.ZodObject<{
190
+ chunk_id: z.ZodString;
191
+ content_piece_id: z.ZodString;
192
+ title: z.ZodString;
193
+ excerpt: z.ZodString;
194
+ score: z.ZodNumber;
195
+ rank: z.ZodNumber;
196
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
197
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
198
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
199
+ creator_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
200
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
201
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
202
+ department: z.ZodOptional<z.ZodNullable<z.ZodString>>;
203
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
204
+ chunk_id: z.ZodString;
205
+ content_piece_id: z.ZodString;
206
+ title: z.ZodString;
207
+ excerpt: z.ZodString;
208
+ score: z.ZodNumber;
209
+ rank: z.ZodNumber;
210
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
211
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
212
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
213
+ creator_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
215
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
216
+ department: z.ZodOptional<z.ZodNullable<z.ZodString>>;
217
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
218
+ chunk_id: z.ZodString;
219
+ content_piece_id: z.ZodString;
220
+ title: z.ZodString;
221
+ excerpt: z.ZodString;
222
+ score: z.ZodNumber;
223
+ rank: z.ZodNumber;
224
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
225
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
226
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
227
+ creator_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
228
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
229
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
230
+ department: z.ZodOptional<z.ZodNullable<z.ZodString>>;
231
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
232
+ result_count: z.ZodDefault<z.ZodNumber>;
233
+ coverage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
234
+ risk_flag: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
235
+ retrieval_mode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
236
+ synthesis: z.ZodOptional<z.ZodNullable<z.ZodString>>;
237
+ synthesis_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
238
+ latency_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
239
+ tokens_consumed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
240
+ }, z.ZodTypeAny, "passthrough">>;
241
+ type QueryResponse = z.infer<typeof QueryResponseSchema>;
242
+ declare const DomainCoverageSchema: z.ZodObject<{
243
+ taxonomy_domain: z.ZodString;
244
+ document_count: z.ZodDefault<z.ZodNumber>;
245
+ chunk_count: z.ZodDefault<z.ZodNumber>;
246
+ expert_count: z.ZodDefault<z.ZodNumber>;
247
+ coverage_level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
248
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
249
+ taxonomy_domain: z.ZodString;
250
+ document_count: z.ZodDefault<z.ZodNumber>;
251
+ chunk_count: z.ZodDefault<z.ZodNumber>;
252
+ expert_count: z.ZodDefault<z.ZodNumber>;
253
+ coverage_level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
254
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
255
+ taxonomy_domain: z.ZodString;
256
+ document_count: z.ZodDefault<z.ZodNumber>;
257
+ chunk_count: z.ZodDefault<z.ZodNumber>;
258
+ expert_count: z.ZodDefault<z.ZodNumber>;
259
+ coverage_level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
260
+ }, z.ZodTypeAny, "passthrough">>;
261
+ type DomainCoverage = z.infer<typeof DomainCoverageSchema>;
262
+ declare const DomainsListResponseSchema: z.ZodObject<{
263
+ domains: z.ZodDefault<z.ZodArray<z.ZodObject<{
264
+ taxonomy_domain: z.ZodString;
265
+ document_count: z.ZodDefault<z.ZodNumber>;
266
+ chunk_count: z.ZodDefault<z.ZodNumber>;
267
+ expert_count: z.ZodDefault<z.ZodNumber>;
268
+ coverage_level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
269
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
270
+ taxonomy_domain: z.ZodString;
271
+ document_count: z.ZodDefault<z.ZodNumber>;
272
+ chunk_count: z.ZodDefault<z.ZodNumber>;
273
+ expert_count: z.ZodDefault<z.ZodNumber>;
274
+ coverage_level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
275
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
276
+ taxonomy_domain: z.ZodString;
277
+ document_count: z.ZodDefault<z.ZodNumber>;
278
+ chunk_count: z.ZodDefault<z.ZodNumber>;
279
+ expert_count: z.ZodDefault<z.ZodNumber>;
280
+ coverage_level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
281
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
282
+ total: z.ZodDefault<z.ZodNumber>;
283
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
284
+ domains: z.ZodDefault<z.ZodArray<z.ZodObject<{
285
+ taxonomy_domain: z.ZodString;
286
+ document_count: z.ZodDefault<z.ZodNumber>;
287
+ chunk_count: z.ZodDefault<z.ZodNumber>;
288
+ expert_count: z.ZodDefault<z.ZodNumber>;
289
+ coverage_level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
290
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
291
+ taxonomy_domain: z.ZodString;
292
+ document_count: z.ZodDefault<z.ZodNumber>;
293
+ chunk_count: z.ZodDefault<z.ZodNumber>;
294
+ expert_count: z.ZodDefault<z.ZodNumber>;
295
+ coverage_level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
296
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
297
+ taxonomy_domain: z.ZodString;
298
+ document_count: z.ZodDefault<z.ZodNumber>;
299
+ chunk_count: z.ZodDefault<z.ZodNumber>;
300
+ expert_count: z.ZodDefault<z.ZodNumber>;
301
+ coverage_level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
302
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
303
+ total: z.ZodDefault<z.ZodNumber>;
304
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
305
+ domains: z.ZodDefault<z.ZodArray<z.ZodObject<{
306
+ taxonomy_domain: z.ZodString;
307
+ document_count: z.ZodDefault<z.ZodNumber>;
308
+ chunk_count: z.ZodDefault<z.ZodNumber>;
309
+ expert_count: z.ZodDefault<z.ZodNumber>;
310
+ coverage_level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
311
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
312
+ taxonomy_domain: z.ZodString;
313
+ document_count: z.ZodDefault<z.ZodNumber>;
314
+ chunk_count: z.ZodDefault<z.ZodNumber>;
315
+ expert_count: z.ZodDefault<z.ZodNumber>;
316
+ coverage_level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
317
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
318
+ taxonomy_domain: z.ZodString;
319
+ document_count: z.ZodDefault<z.ZodNumber>;
320
+ chunk_count: z.ZodDefault<z.ZodNumber>;
321
+ expert_count: z.ZodDefault<z.ZodNumber>;
322
+ coverage_level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
323
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
324
+ total: z.ZodDefault<z.ZodNumber>;
325
+ }, z.ZodTypeAny, "passthrough">>;
326
+ type DomainsListResponse = z.infer<typeof DomainsListResponseSchema>;
327
+ declare const SourceChunkSchema: z.ZodObject<{
328
+ chunk_id: z.ZodString;
329
+ content_piece_id: z.ZodString;
330
+ title: z.ZodString;
331
+ excerpt: z.ZodString;
332
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
333
+ source_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
334
+ lifecycle_state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
335
+ embedded_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
336
+ last_source_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
337
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
338
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
339
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
340
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
341
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
342
+ chunk_id: z.ZodString;
343
+ content_piece_id: z.ZodString;
344
+ title: z.ZodString;
345
+ excerpt: z.ZodString;
346
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
347
+ source_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
348
+ lifecycle_state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
349
+ embedded_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
350
+ last_source_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
351
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
352
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
353
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
354
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
355
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
356
+ chunk_id: z.ZodString;
357
+ content_piece_id: z.ZodString;
358
+ title: z.ZodString;
359
+ excerpt: z.ZodString;
360
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
361
+ source_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
362
+ lifecycle_state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
363
+ embedded_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
364
+ last_source_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
365
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
366
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
367
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
368
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
369
+ }, z.ZodTypeAny, "passthrough">>;
370
+ type SourceChunk = z.infer<typeof SourceChunkSchema>;
371
+ declare const SourceDetailResponseSchema: z.ZodObject<{
372
+ query_id: z.ZodString;
373
+ tenant_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
374
+ chunks: z.ZodDefault<z.ZodArray<z.ZodObject<{
375
+ chunk_id: z.ZodString;
376
+ content_piece_id: z.ZodString;
377
+ title: z.ZodString;
378
+ excerpt: z.ZodString;
379
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
380
+ source_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
381
+ lifecycle_state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
382
+ embedded_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
383
+ last_source_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
384
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
385
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
386
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
387
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
388
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
389
+ chunk_id: z.ZodString;
390
+ content_piece_id: z.ZodString;
391
+ title: z.ZodString;
392
+ excerpt: z.ZodString;
393
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
394
+ source_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
395
+ lifecycle_state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
396
+ embedded_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
397
+ last_source_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
398
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
399
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
400
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
401
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
402
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
403
+ chunk_id: z.ZodString;
404
+ content_piece_id: z.ZodString;
405
+ title: z.ZodString;
406
+ excerpt: z.ZodString;
407
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
408
+ source_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
409
+ lifecycle_state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
410
+ embedded_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
411
+ last_source_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
412
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
413
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
414
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
415
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
416
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
417
+ chunk_count: z.ZodDefault<z.ZodNumber>;
418
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
419
+ query_id: z.ZodString;
420
+ tenant_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
421
+ chunks: z.ZodDefault<z.ZodArray<z.ZodObject<{
422
+ chunk_id: z.ZodString;
423
+ content_piece_id: z.ZodString;
424
+ title: z.ZodString;
425
+ excerpt: z.ZodString;
426
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
427
+ source_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
428
+ lifecycle_state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
429
+ embedded_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
430
+ last_source_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
431
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
432
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
433
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
434
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
435
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
436
+ chunk_id: z.ZodString;
437
+ content_piece_id: z.ZodString;
438
+ title: z.ZodString;
439
+ excerpt: z.ZodString;
440
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
441
+ source_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
442
+ lifecycle_state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
443
+ embedded_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
444
+ last_source_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
445
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
446
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
447
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
448
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
449
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
450
+ chunk_id: z.ZodString;
451
+ content_piece_id: z.ZodString;
452
+ title: z.ZodString;
453
+ excerpt: z.ZodString;
454
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
455
+ source_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
456
+ lifecycle_state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
457
+ embedded_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
458
+ last_source_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
459
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
460
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
461
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
462
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
463
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
464
+ chunk_count: z.ZodDefault<z.ZodNumber>;
465
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
466
+ query_id: z.ZodString;
467
+ tenant_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
468
+ chunks: z.ZodDefault<z.ZodArray<z.ZodObject<{
469
+ chunk_id: z.ZodString;
470
+ content_piece_id: z.ZodString;
471
+ title: z.ZodString;
472
+ excerpt: z.ZodString;
473
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
474
+ source_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
475
+ lifecycle_state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
476
+ embedded_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
477
+ last_source_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
478
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
479
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
480
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
481
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
482
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
483
+ chunk_id: z.ZodString;
484
+ content_piece_id: z.ZodString;
485
+ title: z.ZodString;
486
+ excerpt: z.ZodString;
487
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
488
+ source_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
489
+ lifecycle_state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
490
+ embedded_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
491
+ last_source_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
492
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
493
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
494
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
495
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
496
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
497
+ chunk_id: z.ZodString;
498
+ content_piece_id: z.ZodString;
499
+ title: z.ZodString;
500
+ excerpt: z.ZodString;
501
+ source_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
502
+ source_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
503
+ lifecycle_state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
504
+ embedded_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
505
+ last_source_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
506
+ authority_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
507
+ taxonomy_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
508
+ author_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
509
+ author_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
510
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
511
+ chunk_count: z.ZodDefault<z.ZodNumber>;
512
+ }, z.ZodTypeAny, "passthrough">>;
513
+ type SourceDetailResponse = z.infer<typeof SourceDetailResponseSchema>;
514
+
515
+ /**
516
+ * Async HTTP client for the Quelvio enterprise REST API.
517
+ *
518
+ * Wraps three endpoints used by the LangChain integration:
519
+ *
520
+ * - `POST /v1/enterprise/query` — retrieval + optional synthesis
521
+ * - `GET /v1/enterprise/domains` — taxonomy discovery
522
+ * - `GET /v1/enterprise/sources/{id}` — provenance for a previous query
523
+ *
524
+ * The bearer token is stored privately (closed over, not exposed as a
525
+ * field) and is never written to `toString()`, `JSON.stringify()`, or
526
+ * any error message emitted by this library. Pass it via the `apiKey`
527
+ * constructor argument or set the `QUELVIO_API_KEY` environment variable.
528
+ */
529
+
530
+ declare const DEFAULT_BASE_URL = "https://api.quelvio.com";
531
+ declare const DEFAULT_TIMEOUT_MS = 30000;
532
+ declare const DEFAULT_MAX_RETRIES = 3;
533
+ type QuelvioSource = 'langchain-js-client' | 'langchain-js-retriever' | 'langchain-js-tool' | 'langchain-js-synthesis';
534
+ interface QuelvioClientOptions {
535
+ /** Bearer token (PAT, OAuth access token, or Service Account key). Falls back to `QUELVIO_API_KEY`. */
536
+ apiKey?: string;
537
+ /** Override the API base URL. Defaults to `QUELVIO_API_BASE` or `https://api.quelvio.com`. */
538
+ baseUrl?: string;
539
+ /** Per-request timeout in milliseconds. Defaults to 30,000. */
540
+ timeoutMs?: number;
541
+ /** Number of retries for transient errors. Defaults to 3. */
542
+ maxRetries?: number;
543
+ /** Tag used for the `X-Quelvio-Command` header. Lets the audit-log writer distinguish callers. */
544
+ source?: QuelvioSource;
545
+ /**
546
+ * Inject a custom `fetch`. Defaults to `globalThis.fetch`. Useful for
547
+ * tests (pass a `vi.fn()`) or for environments where you need a
548
+ * proxy-aware fetch.
549
+ */
550
+ fetch?: typeof globalThis.fetch;
551
+ }
552
+ interface QueryOptions {
553
+ query: string;
554
+ limit?: number;
555
+ mode?: string;
556
+ domainFilter?: string | null;
557
+ }
558
+ /** Lower-case the mode and validate it. Exported for unit tests. */
559
+ declare function normalizeMode(mode: string | undefined | null): QueryMode;
560
+ /** Clamp the chunk limit into [1, 50]. Exported for unit tests. */
561
+ declare function boundLimit(value: number | undefined | null): number;
562
+ /** Build the JSON body for `POST /v1/enterprise/query`. Exported for unit tests. */
563
+ declare function buildQueryBody(opts: QueryOptions): Record<string, unknown>;
564
+ /**
565
+ * Async HTTP client for the Quelvio enterprise API.
566
+ *
567
+ * @example
568
+ * ```ts
569
+ * const client = new QuelvioClient({ apiKey: 'qlv_pat_...' });
570
+ * const response = await client.query({ query: "what's our refund policy?" });
571
+ * ```
572
+ */
573
+ declare class QuelvioClient {
574
+ #private;
575
+ readonly baseUrl: string;
576
+ readonly timeoutMs: number;
577
+ readonly maxRetries: number;
578
+ constructor(options?: QuelvioClientOptions);
579
+ /**
580
+ * Don't surface the bearer token from string coercion or JSON
581
+ * serialization. We deliberately list non-sensitive fields only.
582
+ */
583
+ toString(): string;
584
+ toJSON(): Record<string, unknown>;
585
+ /** Internal accessor used by sibling classes that share the same client. */
586
+ _exposeApiKeyForSibling(): string;
587
+ /** Internal accessor — returns the configured `fetch` for sibling reuse. */
588
+ _exposeFetchForSibling(): typeof globalThis.fetch;
589
+ /** Send a one-shot query and return the parsed response. */
590
+ query(opts: QueryOptions): Promise<QueryResponse>;
591
+ listDomains(opts?: {
592
+ coverage?: string;
593
+ }): Promise<DomainsListResponse>;
594
+ getSourceDetail(queryId: string): Promise<SourceDetailResponse>;
595
+ }
596
+
597
+ /**
598
+ * Typed exceptions for `@quelvio/langchain`.
599
+ *
600
+ * Every error inherits from {@link QuelvioError}. Catch that for a broad
601
+ * net; catch a subclass to handle a specific failure mode (auth, rate
602
+ * limit, transient server error, etc.).
603
+ */
604
+ declare class QuelvioError extends Error {
605
+ constructor(message: string);
606
+ }
607
+ /** Authentication failed (HTTP 401 or 403). */
608
+ declare class QuelvioAuthError extends QuelvioError {
609
+ constructor(message: string);
610
+ }
611
+ /** The request was rejected as malformed (HTTP 400). */
612
+ declare class QuelvioBadRequestError extends QuelvioError {
613
+ constructor(message: string);
614
+ }
615
+ /** The requested resource was not found (HTTP 404). */
616
+ declare class QuelvioNotFoundError extends QuelvioError {
617
+ constructor(message: string);
618
+ }
619
+ /** Rate limited by the Quelvio API (HTTP 429). */
620
+ declare class QuelvioRateLimitError extends QuelvioError {
621
+ /** Value of the `Retry-After` header if present; otherwise `null`. */
622
+ retryAfterSeconds: number | null;
623
+ constructor(message: string, retryAfterSeconds?: number | null);
624
+ }
625
+ /** Quelvio returned a 5xx server error after retries were exhausted. */
626
+ declare class QuelvioServerError extends QuelvioError {
627
+ statusCode: number;
628
+ constructor(message: string, statusCode: number);
629
+ }
630
+ /** The HTTP request timed out before a response was received. */
631
+ declare class QuelvioTimeoutError extends QuelvioError {
632
+ constructor(message: string);
633
+ }
634
+ /** A non-timeout transport-level error (DNS, TLS, connection refused, etc.). */
635
+ declare class QuelvioNetworkError extends QuelvioError {
636
+ constructor(message: string);
637
+ }
638
+
639
+ /**
640
+ * `QuelvioRetriever` — a LangChain.js {@link BaseRetriever} backed by
641
+ * Quelvio's enterprise knowledge API.
642
+ *
643
+ * Drop this into any LangChain RAG chain. Each call to `invoke()` makes
644
+ * exactly one HTTP request to `POST /v1/enterprise/query` and converts
645
+ * the returned chunks to LangChain `Document` objects, preserving per-
646
+ * chunk provenance (source URL, authority score, taxonomy domain,
647
+ * chunk id) in the `metadata` dict.
648
+ */
649
+
650
+ interface QuelvioRetrieverOptions extends BaseRetrieverInput, QuelvioClientOptions {
651
+ /** Maximum number of chunks to retrieve (1 to 50). Defaults to 5. */
652
+ limit?: number;
653
+ /** `fast` | `standard` (default) | `deep`. */
654
+ mode?: string;
655
+ /** Restrict retrieval to a single taxonomy domain. */
656
+ domainFilter?: string | null;
657
+ /** Inject a pre-built {@link QuelvioClient} for connection reuse. */
658
+ client?: QuelvioClient;
659
+ }
660
+ declare class QuelvioRetriever extends BaseRetriever {
661
+ #private;
662
+ static lc_name(): string;
663
+ lc_namespace: string[];
664
+ readonly limit: number;
665
+ readonly mode: string;
666
+ readonly domainFilter: string | null;
667
+ constructor(options?: QuelvioRetrieverOptions);
668
+ toString(): string;
669
+ _getRelevantDocuments(query: string, _runManager?: CallbackManagerForRetrieverRun): Promise<Document[]>;
670
+ }
671
+
672
+ /**
673
+ * One-shot helpers for getting a synthesized answer from Quelvio.
674
+ *
675
+ * `synthesizeAnswer` is the lowest-ceremony entry point: useful when you
676
+ * want a single async function call that returns a final answer +
677
+ * citations, without wiring up a retriever or an agent.
678
+ */
679
+
680
+ interface SynthesizedAnswer {
681
+ /** Synthesized natural-language answer, or `null` for `mode: 'fast'`. */
682
+ answer: string | null;
683
+ /** Chunks that informed the answer, in rank order. */
684
+ sources: ChunkResult[];
685
+ /** Server-side query identifier — pass to `QuelvioClient.getSourceDetail`. */
686
+ queryId: string;
687
+ }
688
+ interface SynthesizeAnswerOptions extends QuelvioClientOptions {
689
+ mode?: string;
690
+ maxSources?: number;
691
+ domainFilter?: string | null;
692
+ client?: QuelvioClient;
693
+ }
694
+ /**
695
+ * Ask Quelvio a question and return a synthesized answer plus citations.
696
+ *
697
+ * @example
698
+ * ```ts
699
+ * const { answer, sources } = await synthesizeAnswer("What's our refund policy?");
700
+ * console.log(answer);
701
+ * for (const s of sources) console.log(` • ${s.title} → ${s.source_url}`);
702
+ * ```
703
+ */
704
+ declare function synthesizeAnswer(question: string, options?: SynthesizeAnswerOptions): Promise<SynthesizedAnswer>;
705
+ /**
706
+ * Async alias of {@link synthesizeAnswer} — preserved for symmetry with
707
+ * the Python sibling package, which exposes both `synthesize_answer` and
708
+ * `asynthesize_answer`. In JavaScript, fetch is async-only, so both
709
+ * names point at the same implementation.
710
+ */
711
+ declare const asynthesizeAnswer: typeof synthesizeAnswer;
712
+
713
+ /**
714
+ * `QuelvioTool` — a LangChain.js {@link StructuredTool} for agents.
715
+ *
716
+ * Use this when you want an LLM agent to *decide* whether to query the
717
+ * company's knowledge brain. The tool returns a synthesized natural-
718
+ * language answer plus a list of cited sources (titles + URLs), which
719
+ * the agent can quote back to the user.
720
+ */
721
+
722
+ declare const QuelvioToolInputSchema: z.ZodObject<{
723
+ question: z.ZodString;
724
+ mode: z.ZodOptional<z.ZodEnum<["fast", "standard", "deep"]>>;
725
+ max_sources: z.ZodOptional<z.ZodNumber>;
726
+ domain: z.ZodOptional<z.ZodString>;
727
+ }, "strip", z.ZodTypeAny, {
728
+ question: string;
729
+ mode?: "fast" | "standard" | "deep" | undefined;
730
+ max_sources?: number | undefined;
731
+ domain?: string | undefined;
732
+ }, {
733
+ question: string;
734
+ mode?: "fast" | "standard" | "deep" | undefined;
735
+ max_sources?: number | undefined;
736
+ domain?: string | undefined;
737
+ }>;
738
+ type QuelvioToolInput = z.infer<typeof QuelvioToolInputSchema>;
739
+ interface QuelvioToolOptions extends QuelvioClientOptions {
740
+ /** Override the tool name (default: `quelvio_query`). */
741
+ name?: string;
742
+ /** Override the LLM-facing description. */
743
+ description?: string;
744
+ /** Default synthesis mode used when the agent omits `mode`. */
745
+ defaultMode?: string;
746
+ /** Default chunk limit used when the agent omits `max_sources`. */
747
+ defaultMaxSources?: number;
748
+ /** Inject a pre-built {@link QuelvioClient} for connection reuse. */
749
+ client?: QuelvioClient;
750
+ }
751
+ declare class QuelvioTool extends StructuredTool<typeof QuelvioToolInputSchema> {
752
+ #private;
753
+ static lc_name(): string;
754
+ get lc_namespace(): string[];
755
+ name: string;
756
+ description: string;
757
+ schema: z.ZodObject<{
758
+ question: z.ZodString;
759
+ mode: z.ZodOptional<z.ZodEnum<["fast", "standard", "deep"]>>;
760
+ max_sources: z.ZodOptional<z.ZodNumber>;
761
+ domain: z.ZodOptional<z.ZodString>;
762
+ }, "strip", z.ZodTypeAny, {
763
+ question: string;
764
+ mode?: "fast" | "standard" | "deep" | undefined;
765
+ max_sources?: number | undefined;
766
+ domain?: string | undefined;
767
+ }, {
768
+ question: string;
769
+ mode?: "fast" | "standard" | "deep" | undefined;
770
+ max_sources?: number | undefined;
771
+ domain?: string | undefined;
772
+ }>;
773
+ readonly defaultMode: string;
774
+ readonly defaultMaxSources: number;
775
+ constructor(options?: QuelvioToolOptions);
776
+ toString(): string;
777
+ protected _call(input: QuelvioToolInput, _runManager?: CallbackManagerForToolRun): Promise<string>;
778
+ }
779
+
780
+ /**
781
+ * Package version. Hardcoded — kept in lockstep with `package.json` by
782
+ * the release workflow. Reading the file at runtime would require an
783
+ * extra read in every consumer environment (bundlers, edge runtimes) for
784
+ * no real benefit, so we accept the duplication and let `tsup`'s `define`
785
+ * mechanism flag a mismatch at build time.
786
+ */
787
+ declare const VERSION = "0.1.0";
788
+
789
+ export { type ChunkResult, ChunkResultSchema, DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT_MS, type DomainCoverage, DomainCoverageSchema, type DomainsListResponse, DomainsListResponseSchema, QuelvioAuthError, QuelvioBadRequestError, QuelvioClient, type QuelvioClientOptions, QuelvioError, QuelvioNetworkError, QuelvioNotFoundError, QuelvioRateLimitError, QuelvioRetriever, type QuelvioRetrieverOptions, QuelvioServerError, type QuelvioSource, QuelvioTimeoutError, QuelvioTool, type QuelvioToolInput, QuelvioToolInputSchema, type QuelvioToolOptions, type QueryMode, QueryModeSchema, type QueryOptions, type QueryRequest, QueryRequestSchema, type QueryResponse, QueryResponseSchema, type SourceChunk, SourceChunkSchema, type SourceDetailResponse, SourceDetailResponseSchema, type SynthesizeAnswerOptions, type SynthesizedAnswer, VERSION, asynthesizeAnswer, boundLimit, buildQueryBody, normalizeMode, synthesizeAnswer };