@exulu/backend 1.47.0 → 1.48.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/.mcp.json +7 -0
- package/CHANGELOG.md +4 -15
- package/README.md +2 -2
- package/dist/index.cjs +54 -51
- package/dist/index.d.cts +347 -347
- package/dist/index.d.ts +347 -347
- package/dist/index.js +53 -51
- package/ee/entitlements.ts +1 -1
- package/ee/schemas.ts +4 -3
- package/mintlify-docs/changelog.mdx +96 -2
- package/package.json +4 -3
- package/old-documentation/logging.md +0 -122
- package/old-documentation/otel.md +0 -145
- /package/{old-documentation → devops/documentation}/patch-older-releases.md +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as _opentelemetry_sdk_node from '@opentelemetry/sdk-node';
|
|
2
2
|
import * as knex from 'knex';
|
|
3
|
-
import {
|
|
4
|
-
import { z } from 'zod';
|
|
3
|
+
import { RedisClientType } from 'redis';
|
|
5
4
|
import * as bullmq from 'bullmq';
|
|
6
5
|
import { Queue } from 'bullmq';
|
|
7
|
-
import {
|
|
6
|
+
import { Request, Express } from 'express';
|
|
8
7
|
import { transport } from 'winston';
|
|
9
|
-
import {
|
|
8
|
+
import { LanguageModel, Tool, UIMessage, streamText } from 'ai';
|
|
9
|
+
import { z } from 'zod';
|
|
10
10
|
import { Tiktoken } from 'tiktoken/lite';
|
|
11
11
|
import models from 'tiktoken/model_to_encoding.json';
|
|
12
12
|
|
|
@@ -31,6 +31,10 @@ type User = {
|
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
+
declare function redisClient(): Promise<{
|
|
35
|
+
client: RedisClientType | null;
|
|
36
|
+
}>;
|
|
37
|
+
|
|
34
38
|
type ExuluProviderConfig = {
|
|
35
39
|
name: string;
|
|
36
40
|
instructions: string;
|
|
@@ -153,19 +157,61 @@ interface Item {
|
|
|
153
157
|
[key: string]: any;
|
|
154
158
|
}
|
|
155
159
|
|
|
156
|
-
|
|
160
|
+
declare class ExuluTool {
|
|
157
161
|
id: string;
|
|
158
162
|
name: string;
|
|
159
|
-
description
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
description: string;
|
|
164
|
+
category: string;
|
|
165
|
+
inputSchema?: z.ZodType;
|
|
166
|
+
type: "context" | "function" | "agent" | "web_search";
|
|
167
|
+
tool: Tool;
|
|
168
|
+
config: {
|
|
169
|
+
name: string;
|
|
170
|
+
description: string;
|
|
171
|
+
type: "boolean" | "string" | "number" | "variable";
|
|
172
|
+
default?: string | boolean | number;
|
|
173
|
+
}[];
|
|
174
|
+
constructor({ id, name, description, category, inputSchema, type, execute, config, }: {
|
|
175
|
+
id: string;
|
|
176
|
+
name: string;
|
|
177
|
+
description: string;
|
|
178
|
+
category?: string;
|
|
179
|
+
inputSchema?: z.ZodType;
|
|
180
|
+
type: "context" | "function" | "agent" | "web_search";
|
|
181
|
+
config: {
|
|
182
|
+
name: string;
|
|
183
|
+
description: string;
|
|
184
|
+
type: "boolean" | "string" | "number" | "variable";
|
|
185
|
+
default?: string | boolean | number;
|
|
186
|
+
}[];
|
|
187
|
+
execute: (inputs: any) => Promise<{
|
|
188
|
+
result?: string;
|
|
189
|
+
job?: string;
|
|
190
|
+
items?: Item[];
|
|
191
|
+
}> | AsyncGenerator<{
|
|
192
|
+
result?: string;
|
|
193
|
+
job?: string;
|
|
194
|
+
items?: Item[];
|
|
195
|
+
}>;
|
|
196
|
+
});
|
|
197
|
+
execute: ({ agent: agentId, config, user, inputs, project, items, }: {
|
|
198
|
+
agent: string;
|
|
199
|
+
config: ExuluConfig;
|
|
200
|
+
user?: User;
|
|
201
|
+
inputs: any;
|
|
202
|
+
project?: string;
|
|
203
|
+
items?: string[];
|
|
204
|
+
}) => Promise<any>;
|
|
167
205
|
}
|
|
168
206
|
|
|
207
|
+
type ExuluFieldTypes = "text" | "longText" | "shortText" | "number" | "boolean" | "code" | "json" | "enum" | "markdown" | "file" | "date" | "uuid";
|
|
208
|
+
|
|
209
|
+
type allFileTypes = imageTypes | fileTypes | audioTypes | videoTypes;
|
|
210
|
+
type audioTypes = ".mp3" | ".wav" | ".m4a" | ".mp4" | ".mpeg";
|
|
211
|
+
type videoTypes = ".mp4" | ".m4a" | ".mp3" | ".mpeg" | ".wav";
|
|
212
|
+
type imageTypes = ".png" | ".jpg" | ".jpeg" | ".gif" | ".webp";
|
|
213
|
+
type fileTypes = ".pdf" | ".docx" | ".doc" | ".xlsx" | ".xls" | ".csv" | ".pptx" | ".ppt" | ".txt" | ".md" | ".json" | ".srt" | ".html";
|
|
214
|
+
|
|
169
215
|
type ExuluQueueConfig = {
|
|
170
216
|
queue: Queue;
|
|
171
217
|
ratelimit: number;
|
|
@@ -181,123 +227,6 @@ type ExuluQueueConfig = {
|
|
|
181
227
|
};
|
|
182
228
|
};
|
|
183
229
|
|
|
184
|
-
interface ExuluEvalParams {
|
|
185
|
-
id: string;
|
|
186
|
-
name: string;
|
|
187
|
-
description: string;
|
|
188
|
-
llm: boolean;
|
|
189
|
-
execute: (params: {
|
|
190
|
-
agent: ExuluAgent;
|
|
191
|
-
provider: ExuluProvider;
|
|
192
|
-
messages: UIMessage[];
|
|
193
|
-
testCase: TestCase;
|
|
194
|
-
config?: Record<string, any>;
|
|
195
|
-
}) => Promise<number>;
|
|
196
|
-
config?: {
|
|
197
|
-
name: string;
|
|
198
|
-
description: string;
|
|
199
|
-
}[];
|
|
200
|
-
queue: Promise<ExuluQueueConfig>;
|
|
201
|
-
}
|
|
202
|
-
declare class ExuluEval {
|
|
203
|
-
id: string;
|
|
204
|
-
name: string;
|
|
205
|
-
description: string;
|
|
206
|
-
llm: boolean;
|
|
207
|
-
private execute;
|
|
208
|
-
config?: {
|
|
209
|
-
name: string;
|
|
210
|
-
description: string;
|
|
211
|
-
}[];
|
|
212
|
-
queue?: Promise<ExuluQueueConfig>;
|
|
213
|
-
constructor({ id, name, description, execute, config, queue, llm }: ExuluEvalParams);
|
|
214
|
-
run(agent: ExuluAgent, provider: ExuluProvider, testCase: TestCase, messages: UIMessage[], config?: Record<string, any>): Promise<number>;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Base operator type with comparison operations
|
|
219
|
-
*/
|
|
220
|
-
type BaseOperator<T> = {
|
|
221
|
-
/** Equals */
|
|
222
|
-
eq?: T;
|
|
223
|
-
/** Not equals */
|
|
224
|
-
ne?: T;
|
|
225
|
-
/** In array */
|
|
226
|
-
in?: T[];
|
|
227
|
-
/** AND conditions */
|
|
228
|
-
and?: BaseOperator<T>[];
|
|
229
|
-
/** OR conditions */
|
|
230
|
-
or?: BaseOperator<T>[];
|
|
231
|
-
/** Contains (case-insensitive substring match) */
|
|
232
|
-
contains?: string;
|
|
233
|
-
};
|
|
234
|
-
/**
|
|
235
|
-
* String field filter operators
|
|
236
|
-
*/
|
|
237
|
-
type StringOperator = BaseOperator<string> & {
|
|
238
|
-
/** Contains (case-insensitive substring match) */
|
|
239
|
-
contains?: string;
|
|
240
|
-
};
|
|
241
|
-
/**
|
|
242
|
-
* Number field filter operators
|
|
243
|
-
*/
|
|
244
|
-
type NumberOperator = BaseOperator<number> & {
|
|
245
|
-
/** Less than or equal to */
|
|
246
|
-
lte?: number;
|
|
247
|
-
/** Greater than or equal to */
|
|
248
|
-
gte?: number;
|
|
249
|
-
};
|
|
250
|
-
/**
|
|
251
|
-
* Date field filter operators
|
|
252
|
-
*/
|
|
253
|
-
type DateOperator = BaseOperator<Date | string> & {
|
|
254
|
-
/** Less than or equal to */
|
|
255
|
-
lte?: Date | string;
|
|
256
|
-
/** Greater than or equal to */
|
|
257
|
-
gte?: Date | string;
|
|
258
|
-
};
|
|
259
|
-
/**
|
|
260
|
-
* Boolean field filter operators
|
|
261
|
-
*/
|
|
262
|
-
type BooleanOperator = BaseOperator<boolean>;
|
|
263
|
-
/**
|
|
264
|
-
* JSON field filter operators
|
|
265
|
-
*/
|
|
266
|
-
type JsonOperator = BaseOperator<any> & {
|
|
267
|
-
/** Contains (PostgreSQL @> operator for JSON containment) */
|
|
268
|
-
contains?: any;
|
|
269
|
-
};
|
|
270
|
-
/**
|
|
271
|
-
* Filter operator type based on field type
|
|
272
|
-
*/
|
|
273
|
-
type FilterOperator = BaseOperator<any> | StringOperator | NumberOperator | DateOperator | BooleanOperator | JsonOperator;
|
|
274
|
-
/**
|
|
275
|
-
* Single filter object - a record of field names to their filter operators
|
|
276
|
-
*/
|
|
277
|
-
type Filter = Record<string, FilterOperator>;
|
|
278
|
-
/**
|
|
279
|
-
* Type for the filters parameter used throughout the codebase
|
|
280
|
-
* Filters is an array of filter objects, where each object contains field names mapped to their operators
|
|
281
|
-
*
|
|
282
|
-
* @example
|
|
283
|
-
* ```typescript
|
|
284
|
-
* const filters: Filters = [
|
|
285
|
-
* { name: { contains: "test" } },
|
|
286
|
-
* { age: { gte: 18, lte: 65 } },
|
|
287
|
-
* { status: { in: ["active", "pending"] } }
|
|
288
|
-
* ];
|
|
289
|
-
* ```
|
|
290
|
-
*/
|
|
291
|
-
type SearchFilters = Filter[];
|
|
292
|
-
|
|
293
|
-
type ExuluFieldTypes = "text" | "longText" | "shortText" | "number" | "boolean" | "code" | "json" | "enum" | "markdown" | "file" | "date" | "uuid";
|
|
294
|
-
|
|
295
|
-
type allFileTypes = imageTypes | fileTypes | audioTypes | videoTypes;
|
|
296
|
-
type audioTypes = ".mp3" | ".wav" | ".m4a" | ".mp4" | ".mpeg";
|
|
297
|
-
type videoTypes = ".mp4" | ".m4a" | ".mp3" | ".mpeg" | ".wav";
|
|
298
|
-
type imageTypes = ".png" | ".jpg" | ".jpeg" | ".gif" | ".webp";
|
|
299
|
-
type fileTypes = ".pdf" | ".docx" | ".doc" | ".xlsx" | ".xls" | ".csv" | ".pptx" | ".ppt" | ".txt" | ".md" | ".json" | ".srt" | ".html";
|
|
300
|
-
|
|
301
230
|
declare class ExuluStorage {
|
|
302
231
|
private config;
|
|
303
232
|
constructor({ config }: {
|
|
@@ -420,50 +349,148 @@ declare class ExuluEmbedder {
|
|
|
420
349
|
|
|
421
350
|
type ExuluRightsMode = "private" | "users" | "roles" | "public";
|
|
422
351
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
352
|
+
/**
|
|
353
|
+
* Base operator type with comparison operations
|
|
354
|
+
*/
|
|
355
|
+
type BaseOperator<T> = {
|
|
356
|
+
/** Equals */
|
|
357
|
+
eq?: T;
|
|
358
|
+
/** Not equals */
|
|
359
|
+
ne?: T;
|
|
360
|
+
/** In array */
|
|
361
|
+
in?: T[];
|
|
362
|
+
/** AND conditions */
|
|
363
|
+
and?: BaseOperator<T>[];
|
|
364
|
+
/** OR conditions */
|
|
365
|
+
or?: BaseOperator<T>[];
|
|
366
|
+
/** Contains (case-insensitive substring match) */
|
|
367
|
+
contains?: string;
|
|
427
368
|
};
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
unique?: boolean;
|
|
435
|
-
required?: boolean;
|
|
436
|
-
default?: any;
|
|
437
|
-
calculated?: boolean;
|
|
438
|
-
index?: boolean;
|
|
439
|
-
enumValues?: string[];
|
|
440
|
-
allowedFileTypes?: allFileTypes[];
|
|
369
|
+
/**
|
|
370
|
+
* String field filter operators
|
|
371
|
+
*/
|
|
372
|
+
type StringOperator = BaseOperator<string> & {
|
|
373
|
+
/** Contains (case-insensitive substring match) */
|
|
374
|
+
contains?: string;
|
|
441
375
|
};
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
backoff?: {
|
|
451
|
-
type: "exponential" | "linear";
|
|
452
|
-
delay: number;
|
|
453
|
-
};
|
|
454
|
-
params?: {
|
|
455
|
-
name: string;
|
|
456
|
-
description: string;
|
|
457
|
-
default?: string;
|
|
458
|
-
}[];
|
|
459
|
-
};
|
|
460
|
-
execute: (inputs: {
|
|
461
|
-
exuluConfig: ExuluConfig;
|
|
462
|
-
[key: string]: any;
|
|
463
|
-
}) => Promise<Item[]>;
|
|
376
|
+
/**
|
|
377
|
+
* Number field filter operators
|
|
378
|
+
*/
|
|
379
|
+
type NumberOperator = BaseOperator<number> & {
|
|
380
|
+
/** Less than or equal to */
|
|
381
|
+
lte?: number;
|
|
382
|
+
/** Greater than or equal to */
|
|
383
|
+
gte?: number;
|
|
464
384
|
};
|
|
465
|
-
|
|
466
|
-
|
|
385
|
+
/**
|
|
386
|
+
* Date field filter operators
|
|
387
|
+
*/
|
|
388
|
+
type DateOperator = BaseOperator<Date | string> & {
|
|
389
|
+
/** Less than or equal to */
|
|
390
|
+
lte?: Date | string;
|
|
391
|
+
/** Greater than or equal to */
|
|
392
|
+
gte?: Date | string;
|
|
393
|
+
};
|
|
394
|
+
/**
|
|
395
|
+
* Boolean field filter operators
|
|
396
|
+
*/
|
|
397
|
+
type BooleanOperator = BaseOperator<boolean>;
|
|
398
|
+
/**
|
|
399
|
+
* JSON field filter operators
|
|
400
|
+
*/
|
|
401
|
+
type JsonOperator = BaseOperator<any> & {
|
|
402
|
+
/** Contains (PostgreSQL @> operator for JSON containment) */
|
|
403
|
+
contains?: any;
|
|
404
|
+
};
|
|
405
|
+
/**
|
|
406
|
+
* Filter operator type based on field type
|
|
407
|
+
*/
|
|
408
|
+
type FilterOperator = BaseOperator<any> | StringOperator | NumberOperator | DateOperator | BooleanOperator | JsonOperator;
|
|
409
|
+
/**
|
|
410
|
+
* Single filter object - a record of field names to their filter operators
|
|
411
|
+
*/
|
|
412
|
+
type Filter = Record<string, FilterOperator>;
|
|
413
|
+
/**
|
|
414
|
+
* Type for the filters parameter used throughout the codebase
|
|
415
|
+
* Filters is an array of filter objects, where each object contains field names mapped to their operators
|
|
416
|
+
*
|
|
417
|
+
* @example
|
|
418
|
+
* ```typescript
|
|
419
|
+
* const filters: Filters = [
|
|
420
|
+
* { name: { contains: "test" } },
|
|
421
|
+
* { age: { gte: 18, lte: 65 } },
|
|
422
|
+
* { status: { in: ["active", "pending"] } }
|
|
423
|
+
* ];
|
|
424
|
+
* ```
|
|
425
|
+
*/
|
|
426
|
+
type SearchFilters = Filter[];
|
|
427
|
+
|
|
428
|
+
declare const VectorMethodEnum: {
|
|
429
|
+
readonly cosineDistance: "cosineDistance";
|
|
430
|
+
readonly hybridSearch: "hybridSearch";
|
|
431
|
+
readonly tsvector: "tsvector";
|
|
432
|
+
};
|
|
433
|
+
type VectorMethod = (typeof VectorMethodEnum)[keyof typeof VectorMethodEnum];
|
|
434
|
+
|
|
435
|
+
type VectorSearchChunkResult = {
|
|
436
|
+
chunk_content: string;
|
|
437
|
+
chunk_index: number;
|
|
438
|
+
chunk_id: string;
|
|
439
|
+
chunk_source: string;
|
|
440
|
+
chunk_metadata: Record<string, string>;
|
|
441
|
+
chunk_created_at: string;
|
|
442
|
+
chunk_updated_at: string;
|
|
443
|
+
item_id: string;
|
|
444
|
+
item_external_id: string;
|
|
445
|
+
item_name: string;
|
|
446
|
+
item_updated_at: string;
|
|
447
|
+
item_created_at: string;
|
|
448
|
+
chunk_cosine_distance?: number;
|
|
449
|
+
chunk_fts_rank?: number;
|
|
450
|
+
chunk_hybrid_score?: number;
|
|
451
|
+
context?: {
|
|
452
|
+
name: string;
|
|
453
|
+
id: string;
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
type ExuluContextFieldDefinition = {
|
|
458
|
+
name: string;
|
|
459
|
+
type: ExuluFieldTypes;
|
|
460
|
+
editable?: boolean;
|
|
461
|
+
unique?: boolean;
|
|
462
|
+
required?: boolean;
|
|
463
|
+
default?: any;
|
|
464
|
+
calculated?: boolean;
|
|
465
|
+
index?: boolean;
|
|
466
|
+
enumValues?: string[];
|
|
467
|
+
allowedFileTypes?: allFileTypes[];
|
|
468
|
+
};
|
|
469
|
+
type ExuluContextSource = {
|
|
470
|
+
id: string;
|
|
471
|
+
name: string;
|
|
472
|
+
description: string;
|
|
473
|
+
config?: {
|
|
474
|
+
schedule?: string;
|
|
475
|
+
queue?: Promise<ExuluQueueConfig>;
|
|
476
|
+
retries?: number;
|
|
477
|
+
backoff?: {
|
|
478
|
+
type: "exponential" | "linear";
|
|
479
|
+
delay: number;
|
|
480
|
+
};
|
|
481
|
+
params?: {
|
|
482
|
+
name: string;
|
|
483
|
+
description: string;
|
|
484
|
+
default?: string;
|
|
485
|
+
}[];
|
|
486
|
+
};
|
|
487
|
+
execute: (inputs: {
|
|
488
|
+
exuluConfig: ExuluConfig;
|
|
489
|
+
[key: string]: any;
|
|
490
|
+
}) => Promise<Item[]>;
|
|
491
|
+
};
|
|
492
|
+
declare class ExuluContext {
|
|
493
|
+
id: string;
|
|
467
494
|
name: string;
|
|
468
495
|
active: boolean;
|
|
469
496
|
fields: ExuluContextFieldDefinition[];
|
|
@@ -636,28 +663,6 @@ declare class ExuluContext {
|
|
|
636
663
|
tool: () => ExuluTool | null;
|
|
637
664
|
}
|
|
638
665
|
|
|
639
|
-
type VectorSearchChunkResult = {
|
|
640
|
-
chunk_content: string;
|
|
641
|
-
chunk_index: number;
|
|
642
|
-
chunk_id: string;
|
|
643
|
-
chunk_source: string;
|
|
644
|
-
chunk_metadata: Record<string, string>;
|
|
645
|
-
chunk_created_at: string;
|
|
646
|
-
chunk_updated_at: string;
|
|
647
|
-
item_id: string;
|
|
648
|
-
item_external_id: string;
|
|
649
|
-
item_name: string;
|
|
650
|
-
item_updated_at: string;
|
|
651
|
-
item_created_at: string;
|
|
652
|
-
chunk_cosine_distance?: number;
|
|
653
|
-
chunk_fts_rank?: number;
|
|
654
|
-
chunk_hybrid_score?: number;
|
|
655
|
-
context?: {
|
|
656
|
-
name: string;
|
|
657
|
-
id: string;
|
|
658
|
-
};
|
|
659
|
-
};
|
|
660
|
-
|
|
661
666
|
declare class ExuluReranker {
|
|
662
667
|
id: string;
|
|
663
668
|
name: string;
|
|
@@ -678,156 +683,6 @@ declare class ExuluReranker {
|
|
|
678
683
|
run(query: string, chunks: VectorSearchChunkResult[]): Promise<VectorSearchChunkResult[]>;
|
|
679
684
|
}
|
|
680
685
|
|
|
681
|
-
type ExuluConfig = {
|
|
682
|
-
telemetry?: {
|
|
683
|
-
enabled: boolean;
|
|
684
|
-
};
|
|
685
|
-
logger?: {
|
|
686
|
-
winston: {
|
|
687
|
-
transports: transport[];
|
|
688
|
-
};
|
|
689
|
-
};
|
|
690
|
-
workers: {
|
|
691
|
-
enabled: boolean;
|
|
692
|
-
logger?: {
|
|
693
|
-
winston: {
|
|
694
|
-
transports: transport[];
|
|
695
|
-
};
|
|
696
|
-
};
|
|
697
|
-
telemetry?: {
|
|
698
|
-
enabled: boolean;
|
|
699
|
-
};
|
|
700
|
-
};
|
|
701
|
-
MCP: {
|
|
702
|
-
enabled: boolean;
|
|
703
|
-
};
|
|
704
|
-
fileUploads?: {
|
|
705
|
-
s3region: string;
|
|
706
|
-
s3key: string;
|
|
707
|
-
s3secret: string;
|
|
708
|
-
s3Bucket: string;
|
|
709
|
-
s3endpoint?: string;
|
|
710
|
-
s3prefix?: string;
|
|
711
|
-
};
|
|
712
|
-
privacy?: {
|
|
713
|
-
systemPromptPersonalization?: boolean;
|
|
714
|
-
};
|
|
715
|
-
};
|
|
716
|
-
declare class ExuluApp {
|
|
717
|
-
private _providers;
|
|
718
|
-
private _agents;
|
|
719
|
-
private _config?;
|
|
720
|
-
private _evals;
|
|
721
|
-
private _queues;
|
|
722
|
-
private _rerankers;
|
|
723
|
-
private _contexts?;
|
|
724
|
-
private _tools;
|
|
725
|
-
private _expressApp;
|
|
726
|
-
constructor();
|
|
727
|
-
create: ({ contexts, providers, config, agents, tools, evals, rerankers, }: {
|
|
728
|
-
contexts?: Record<string, ExuluContext>;
|
|
729
|
-
config: ExuluConfig;
|
|
730
|
-
agents?: ExuluAgent[];
|
|
731
|
-
providers?: ExuluProvider[];
|
|
732
|
-
rerankers?: ExuluReranker[];
|
|
733
|
-
evals?: ExuluEval[];
|
|
734
|
-
tools?: ExuluTool[];
|
|
735
|
-
}) => Promise<ExuluApp>;
|
|
736
|
-
express: {
|
|
737
|
-
init: () => Promise<Express>;
|
|
738
|
-
};
|
|
739
|
-
get expressApp(): Express;
|
|
740
|
-
tool(id: string): ExuluTool | undefined;
|
|
741
|
-
tools(): ExuluTool[];
|
|
742
|
-
agent(id: string, include?: {
|
|
743
|
-
source: {
|
|
744
|
-
code: boolean;
|
|
745
|
-
database: boolean;
|
|
746
|
-
};
|
|
747
|
-
}): Promise<ExuluAgent | undefined>;
|
|
748
|
-
agents(include?: {
|
|
749
|
-
source: {
|
|
750
|
-
code: boolean;
|
|
751
|
-
database: boolean;
|
|
752
|
-
};
|
|
753
|
-
}): Promise<ExuluAgent[]>;
|
|
754
|
-
context(id: string): ExuluContext | undefined;
|
|
755
|
-
provider(id: string): ExuluProvider | undefined;
|
|
756
|
-
get contexts(): ExuluContext[];
|
|
757
|
-
get providers(): ExuluProvider[];
|
|
758
|
-
embeddings: {
|
|
759
|
-
generate: {
|
|
760
|
-
one: ({ context: contextId, item: itemId }: {
|
|
761
|
-
context: string;
|
|
762
|
-
item: string;
|
|
763
|
-
}) => Promise<{
|
|
764
|
-
id: string;
|
|
765
|
-
job?: string;
|
|
766
|
-
chunks?: number;
|
|
767
|
-
}>;
|
|
768
|
-
all: ({ context: contextId }: {
|
|
769
|
-
context: string;
|
|
770
|
-
}) => Promise<{
|
|
771
|
-
jobs: string[];
|
|
772
|
-
items: number;
|
|
773
|
-
}>;
|
|
774
|
-
};
|
|
775
|
-
};
|
|
776
|
-
bullmq: {
|
|
777
|
-
workers: {
|
|
778
|
-
create: (queues?: string[]) => Promise<bullmq.Worker<any, any, string>[]>;
|
|
779
|
-
};
|
|
780
|
-
};
|
|
781
|
-
private server;
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
declare class ExuluTool {
|
|
785
|
-
id: string;
|
|
786
|
-
name: string;
|
|
787
|
-
description: string;
|
|
788
|
-
category: string;
|
|
789
|
-
inputSchema?: z.ZodType;
|
|
790
|
-
type: "context" | "function" | "agent" | "web_search";
|
|
791
|
-
tool: Tool;
|
|
792
|
-
config: {
|
|
793
|
-
name: string;
|
|
794
|
-
description: string;
|
|
795
|
-
type: "boolean" | "string" | "number" | "variable";
|
|
796
|
-
default?: string | boolean | number;
|
|
797
|
-
}[];
|
|
798
|
-
constructor({ id, name, description, category, inputSchema, type, execute, config, }: {
|
|
799
|
-
id: string;
|
|
800
|
-
name: string;
|
|
801
|
-
description: string;
|
|
802
|
-
category?: string;
|
|
803
|
-
inputSchema?: z.ZodType;
|
|
804
|
-
type: "context" | "function" | "agent" | "web_search";
|
|
805
|
-
config: {
|
|
806
|
-
name: string;
|
|
807
|
-
description: string;
|
|
808
|
-
type: "boolean" | "string" | "number" | "variable";
|
|
809
|
-
default?: string | boolean | number;
|
|
810
|
-
}[];
|
|
811
|
-
execute: (inputs: any) => Promise<{
|
|
812
|
-
result?: string;
|
|
813
|
-
job?: string;
|
|
814
|
-
items?: Item[];
|
|
815
|
-
}> | AsyncGenerator<{
|
|
816
|
-
result?: string;
|
|
817
|
-
job?: string;
|
|
818
|
-
items?: Item[];
|
|
819
|
-
}>;
|
|
820
|
-
});
|
|
821
|
-
execute: ({ agent: agentId, config, user, inputs, project, items, }: {
|
|
822
|
-
agent: string;
|
|
823
|
-
config: ExuluConfig;
|
|
824
|
-
user?: User;
|
|
825
|
-
inputs: any;
|
|
826
|
-
project?: string;
|
|
827
|
-
items?: string[];
|
|
828
|
-
}) => Promise<any>;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
686
|
type ExuluAgentToolConfig = {
|
|
832
687
|
id: string;
|
|
833
688
|
type: string;
|
|
@@ -944,9 +799,154 @@ declare class ExuluProvider {
|
|
|
944
799
|
}>;
|
|
945
800
|
}
|
|
946
801
|
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
802
|
+
interface TestCase {
|
|
803
|
+
id: string;
|
|
804
|
+
name: string;
|
|
805
|
+
description?: string;
|
|
806
|
+
inputs: UIMessage[];
|
|
807
|
+
expected_output: string;
|
|
808
|
+
expected_tools?: string[];
|
|
809
|
+
expected_knowledge_sources?: string[];
|
|
810
|
+
expected_agent_tools?: string[];
|
|
811
|
+
createdAt: string;
|
|
812
|
+
updatedAt: string;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
interface ExuluEvalParams {
|
|
816
|
+
id: string;
|
|
817
|
+
name: string;
|
|
818
|
+
description: string;
|
|
819
|
+
llm: boolean;
|
|
820
|
+
execute: (params: {
|
|
821
|
+
agent: ExuluAgent;
|
|
822
|
+
provider: ExuluProvider;
|
|
823
|
+
messages: UIMessage[];
|
|
824
|
+
testCase: TestCase;
|
|
825
|
+
config?: Record<string, any>;
|
|
826
|
+
}) => Promise<number>;
|
|
827
|
+
config?: {
|
|
828
|
+
name: string;
|
|
829
|
+
description: string;
|
|
830
|
+
}[];
|
|
831
|
+
queue: Promise<ExuluQueueConfig>;
|
|
832
|
+
}
|
|
833
|
+
declare class ExuluEval {
|
|
834
|
+
id: string;
|
|
835
|
+
name: string;
|
|
836
|
+
description: string;
|
|
837
|
+
llm: boolean;
|
|
838
|
+
private execute;
|
|
839
|
+
config?: {
|
|
840
|
+
name: string;
|
|
841
|
+
description: string;
|
|
842
|
+
}[];
|
|
843
|
+
queue?: Promise<ExuluQueueConfig>;
|
|
844
|
+
constructor({ id, name, description, execute, config, queue, llm }: ExuluEvalParams);
|
|
845
|
+
run(agent: ExuluAgent, provider: ExuluProvider, testCase: TestCase, messages: UIMessage[], config?: Record<string, any>): Promise<number>;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
type ExuluConfig = {
|
|
849
|
+
telemetry?: {
|
|
850
|
+
enabled: boolean;
|
|
851
|
+
};
|
|
852
|
+
logger?: {
|
|
853
|
+
winston: {
|
|
854
|
+
transports: transport[];
|
|
855
|
+
};
|
|
856
|
+
};
|
|
857
|
+
workers: {
|
|
858
|
+
enabled: boolean;
|
|
859
|
+
logger?: {
|
|
860
|
+
winston: {
|
|
861
|
+
transports: transport[];
|
|
862
|
+
};
|
|
863
|
+
};
|
|
864
|
+
telemetry?: {
|
|
865
|
+
enabled: boolean;
|
|
866
|
+
};
|
|
867
|
+
};
|
|
868
|
+
MCP: {
|
|
869
|
+
enabled: boolean;
|
|
870
|
+
};
|
|
871
|
+
fileUploads?: {
|
|
872
|
+
s3region: string;
|
|
873
|
+
s3key: string;
|
|
874
|
+
s3secret: string;
|
|
875
|
+
s3Bucket: string;
|
|
876
|
+
s3endpoint?: string;
|
|
877
|
+
s3prefix?: string;
|
|
878
|
+
};
|
|
879
|
+
privacy?: {
|
|
880
|
+
systemPromptPersonalization?: boolean;
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
declare class ExuluApp {
|
|
884
|
+
private _providers;
|
|
885
|
+
private _agents;
|
|
886
|
+
private _config?;
|
|
887
|
+
private _evals;
|
|
888
|
+
private _queues;
|
|
889
|
+
private _rerankers;
|
|
890
|
+
private _contexts?;
|
|
891
|
+
private _tools;
|
|
892
|
+
private _expressApp;
|
|
893
|
+
constructor();
|
|
894
|
+
create: ({ contexts, providers, config, agents, tools, evals, rerankers, }: {
|
|
895
|
+
contexts?: Record<string, ExuluContext>;
|
|
896
|
+
config: ExuluConfig;
|
|
897
|
+
agents?: ExuluAgent[];
|
|
898
|
+
providers?: ExuluProvider[];
|
|
899
|
+
rerankers?: ExuluReranker[];
|
|
900
|
+
evals?: ExuluEval[];
|
|
901
|
+
tools?: ExuluTool[];
|
|
902
|
+
}) => Promise<ExuluApp>;
|
|
903
|
+
express: {
|
|
904
|
+
init: () => Promise<Express>;
|
|
905
|
+
};
|
|
906
|
+
get expressApp(): Express;
|
|
907
|
+
tool(id: string): ExuluTool | undefined;
|
|
908
|
+
tools(): ExuluTool[];
|
|
909
|
+
agent(id: string, include?: {
|
|
910
|
+
source: {
|
|
911
|
+
code: boolean;
|
|
912
|
+
database: boolean;
|
|
913
|
+
};
|
|
914
|
+
}): Promise<ExuluAgent | undefined>;
|
|
915
|
+
agents(include?: {
|
|
916
|
+
source: {
|
|
917
|
+
code: boolean;
|
|
918
|
+
database: boolean;
|
|
919
|
+
};
|
|
920
|
+
}): Promise<ExuluAgent[]>;
|
|
921
|
+
context(id: string): ExuluContext | undefined;
|
|
922
|
+
provider(id: string): ExuluProvider | undefined;
|
|
923
|
+
get contexts(): ExuluContext[];
|
|
924
|
+
get providers(): ExuluProvider[];
|
|
925
|
+
embeddings: {
|
|
926
|
+
generate: {
|
|
927
|
+
one: ({ context: contextId, item: itemId }: {
|
|
928
|
+
context: string;
|
|
929
|
+
item: string;
|
|
930
|
+
}) => Promise<{
|
|
931
|
+
id: string;
|
|
932
|
+
job?: string;
|
|
933
|
+
chunks?: number;
|
|
934
|
+
}>;
|
|
935
|
+
all: ({ context: contextId }: {
|
|
936
|
+
context: string;
|
|
937
|
+
}) => Promise<{
|
|
938
|
+
jobs: string[];
|
|
939
|
+
items: number;
|
|
940
|
+
}>;
|
|
941
|
+
};
|
|
942
|
+
};
|
|
943
|
+
bullmq: {
|
|
944
|
+
workers: {
|
|
945
|
+
create: (queues?: string[]) => Promise<bullmq.Worker<any, any, string>[]>;
|
|
946
|
+
};
|
|
947
|
+
};
|
|
948
|
+
private server;
|
|
949
|
+
}
|
|
950
950
|
|
|
951
951
|
declare class ExuluQueues {
|
|
952
952
|
queues: {
|
|
@@ -2012,4 +2012,4 @@ declare const ExuluChunkers: {
|
|
|
2012
2012
|
};
|
|
2013
2013
|
};
|
|
2014
2014
|
|
|
2015
|
-
export { type JOB_STATUS as EXULU_JOB_STATUS, JOB_STATUS_ENUM as EXULU_JOB_STATUS_ENUM, type STATISTICS_TYPE as EXULU_STATISTICS_TYPE, STATISTICS_TYPE_ENUM as EXULU_STATISTICS_TYPE_ENUM, ExuluApp, ExuluAuthentication, ExuluChunkers, ExuluContext, ExuluDatabase, ExuluDefaultProviders, ExuluDocumentProcessor, ExuluEmbedder, ExuluEval, type Item as ExuluItem, ExuluJobs, ExuluOtel, queues as ExuluQueues, ExuluReranker, ExuluTool, ExuluVariables };
|
|
2015
|
+
export { type JOB_STATUS as EXULU_JOB_STATUS, JOB_STATUS_ENUM as EXULU_JOB_STATUS_ENUM, type STATISTICS_TYPE as EXULU_STATISTICS_TYPE, STATISTICS_TYPE_ENUM as EXULU_STATISTICS_TYPE_ENUM, type ExuluAgent, ExuluApp, ExuluAuthentication, ExuluChunkers, ExuluContext, ExuluDatabase, ExuluDefaultProviders, ExuluDocumentProcessor, ExuluEmbedder, ExuluEval, type Item as ExuluItem, ExuluJobs, ExuluOtel, ExuluProvider, queues as ExuluQueues, ExuluReranker, ExuluTool, ExuluVariables };
|