@exulu/backend 3.0.0 → 3.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.
- package/dist/{chunk-KFL7HIID.js → chunk-ZDH5S2WF.js} +873 -277
- package/dist/{convert-exulu-tools-to-ai-sdk-tools-YY2WIMMJ.js → convert-exulu-tools-to-ai-sdk-tools-FN6WZSIQ.js} +1 -1
- package/dist/index.cjs +2306 -608
- package/dist/index.d.cts +41 -8
- package/dist/index.d.ts +41 -8
- package/dist/index.js +1203 -202
- package/ee/agentic-retrieval/pipeline/hyde.test.ts +1 -1
- package/ee/agentic-retrieval/pipeline/hyde.ts +6 -3
- package/ee/agentic-retrieval/pipeline/memory.test.ts +5 -1
- package/ee/agentic-retrieval/pipeline/memory.ts +71 -104
- package/ee/agentic-retrieval/pipeline/micro-call.test.ts +112 -0
- package/ee/agentic-retrieval/pipeline/micro-call.ts +98 -0
- package/ee/agentic-retrieval/pipeline/prefilter.test.ts +1 -0
- package/ee/agentic-retrieval/pipeline/prefilter.ts +11 -20
- package/ee/agentic-retrieval/pipeline/routing.test.ts +44 -1
- package/ee/agentic-retrieval/pipeline/routing.ts +31 -56
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -233,7 +233,8 @@ interface Item {
|
|
|
233
233
|
* declared in code (source them from env vars or however you like) — none of
|
|
234
234
|
* them are exposed as admin-configurable tool config.
|
|
235
235
|
*/
|
|
236
|
-
|
|
236
|
+
interface ExuluOauthConfig {
|
|
237
|
+
authType: "oauth";
|
|
237
238
|
/**
|
|
238
239
|
* Identifier for the OAuth provider (e.g., "google", "jira", "github").
|
|
239
240
|
* Tools sharing the same provider share tokens under (provider, userId) —
|
|
@@ -241,7 +242,7 @@ type ExuluOauthConfig = {
|
|
|
241
242
|
* omitted, defaults to the tool's `id`, preserving per-tool behavior for
|
|
242
243
|
* tools that don't opt in.
|
|
243
244
|
*/
|
|
244
|
-
provider
|
|
245
|
+
provider: string;
|
|
245
246
|
/** The provider's authorization endpoint, e.g. https://app.hubspot.com/oauth/authorize */
|
|
246
247
|
authorizationUrl: string;
|
|
247
248
|
/** The provider's token endpoint, e.g. https://api.hubapi.com/oauth/v1/token */
|
|
@@ -250,7 +251,7 @@ type ExuluOauthConfig = {
|
|
|
250
251
|
/** Never leaves the server: used only in the server-side token exchange. */
|
|
251
252
|
clientSecret: string;
|
|
252
253
|
/** Scopes to request; joined with spaces in the authorization URL. */
|
|
253
|
-
scopes: string[];
|
|
254
|
+
scopes: readonly string[];
|
|
254
255
|
/** PKCE (S256). Defaults to true; set false for providers that reject PKCE. */
|
|
255
256
|
pkce?: boolean;
|
|
256
257
|
/**
|
|
@@ -259,7 +260,26 @@ type ExuluOauthConfig = {
|
|
|
259
260
|
* refresh token.
|
|
260
261
|
*/
|
|
261
262
|
extraAuthParams?: Record<string, string>;
|
|
262
|
-
}
|
|
263
|
+
}
|
|
264
|
+
interface CredentialField {
|
|
265
|
+
name: string;
|
|
266
|
+
label: string;
|
|
267
|
+
type: "text" | "password";
|
|
268
|
+
placeholder?: string;
|
|
269
|
+
help?: string;
|
|
270
|
+
}
|
|
271
|
+
interface ExuluUserCredentialsConfig {
|
|
272
|
+
authType: "user_credentials";
|
|
273
|
+
provider: string;
|
|
274
|
+
fields: CredentialField[];
|
|
275
|
+
validate?: (values: Record<string, string>) => Promise<void>;
|
|
276
|
+
}
|
|
277
|
+
type ExuluAuthConfig = ExuluOauthConfig | ExuluUserCredentialsConfig;
|
|
278
|
+
interface ExuluCredentialsToolContext {
|
|
279
|
+
userId: string;
|
|
280
|
+
provider: string;
|
|
281
|
+
credentials: Record<string, string>;
|
|
282
|
+
}
|
|
263
283
|
/** The oauth context injected into an oauth-enabled tool's execute inputs. */
|
|
264
284
|
type ExuluOauthToolContext = {
|
|
265
285
|
accessToken: string;
|
|
@@ -281,14 +301,14 @@ declare class ExuluTool {
|
|
|
281
301
|
type: ToolType;
|
|
282
302
|
tool: Tool;
|
|
283
303
|
needsApproval: boolean;
|
|
284
|
-
|
|
304
|
+
authentication?: ExuluAuthConfig;
|
|
285
305
|
config: {
|
|
286
306
|
name: string;
|
|
287
307
|
description: string;
|
|
288
308
|
type: "boolean" | "string" | "number" | "variable" | "json";
|
|
289
309
|
default?: string | boolean | number | object;
|
|
290
310
|
}[];
|
|
291
|
-
constructor({ id, name, description, category, inputSchema, type, execute, config, needsApproval,
|
|
311
|
+
constructor({ id, name, description, category, inputSchema, type, execute, config, needsApproval, authentication, }: {
|
|
292
312
|
id: string;
|
|
293
313
|
name: string;
|
|
294
314
|
description: string;
|
|
@@ -302,7 +322,7 @@ declare class ExuluTool {
|
|
|
302
322
|
default?: string | boolean | number | object;
|
|
303
323
|
}[];
|
|
304
324
|
needsApproval?: boolean;
|
|
305
|
-
|
|
325
|
+
authentication?: ExuluAuthConfig;
|
|
306
326
|
execute: (inputs: any, options?: any) => Promise<{
|
|
307
327
|
result?: string;
|
|
308
328
|
job?: string;
|
|
@@ -658,6 +678,13 @@ type ExuluContextFieldDefinition = {
|
|
|
658
678
|
index?: boolean;
|
|
659
679
|
enumValues?: string[];
|
|
660
680
|
allowedFileTypes?: allFileTypes[];
|
|
681
|
+
/**
|
|
682
|
+
* Write-only secret: excluded from the generated GraphQL object type, Filter
|
|
683
|
+
* type, SQL read selections, and all read payloads. Still accepted as
|
|
684
|
+
* mutation INPUT (the mutation layer hashes/stores it) unless additionally
|
|
685
|
+
* excluded by name in the input generator.
|
|
686
|
+
*/
|
|
687
|
+
hidden?: boolean;
|
|
661
688
|
};
|
|
662
689
|
type ExuluContextSource = {
|
|
663
690
|
id: string;
|
|
@@ -2532,6 +2559,12 @@ declare const JOB_STATUS_ENUM: {
|
|
|
2532
2559
|
cancelled: string;
|
|
2533
2560
|
};
|
|
2534
2561
|
|
|
2562
|
+
declare class CredentialInvalidError extends Error {
|
|
2563
|
+
readonly provider: string;
|
|
2564
|
+
readonly reason?: string;
|
|
2565
|
+
constructor(provider: string, reason?: string);
|
|
2566
|
+
}
|
|
2567
|
+
|
|
2535
2568
|
declare const ExuluJobs: {
|
|
2536
2569
|
redis: typeof redisClient;
|
|
2537
2570
|
};
|
|
@@ -2635,4 +2668,4 @@ declare const ExuluPython: {
|
|
|
2635
2668
|
instructions: typeof getPythonSetupInstructions;
|
|
2636
2669
|
};
|
|
2637
2670
|
|
|
2638
|
-
export { type ChunkerOperation, type ChunkerResponse, 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, type ExuluContextEmbedder, ExuluDatabase, ExuluDefaultProviders, ExuluDefaultTools, ExuluDocumentProcessor, ExuluEval, type Item as ExuluItem, ExuluJobs, type ExuluOauthConfig, type ExuluOauthToolContext, ExuluOtel, ExuluProvider, ExuluPython, queues as ExuluQueues, ExuluReadApi, ExuluReranker, ExuluTool, ExuluVariables, type VectorSearchChunkResult, defaultChunker, enableLiteLLMClientMode, postgresClient };
|
|
2671
|
+
export { type ChunkerOperation, type ChunkerResponse, type CredentialField, CredentialInvalidError, 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, type ExuluAuthConfig, ExuluAuthentication, ExuluChunkers, ExuluContext, type ExuluContextEmbedder, type ExuluCredentialsToolContext, ExuluDatabase, ExuluDefaultProviders, ExuluDefaultTools, ExuluDocumentProcessor, ExuluEval, type Item as ExuluItem, ExuluJobs, type ExuluOauthConfig, type ExuluOauthToolContext, ExuluOtel, ExuluProvider, ExuluPython, queues as ExuluQueues, ExuluReadApi, ExuluReranker, ExuluTool, type ExuluUserCredentialsConfig, ExuluVariables, type VectorSearchChunkResult, defaultChunker, enableLiteLLMClientMode, postgresClient };
|
package/dist/index.d.ts
CHANGED
|
@@ -233,7 +233,8 @@ interface Item {
|
|
|
233
233
|
* declared in code (source them from env vars or however you like) — none of
|
|
234
234
|
* them are exposed as admin-configurable tool config.
|
|
235
235
|
*/
|
|
236
|
-
|
|
236
|
+
interface ExuluOauthConfig {
|
|
237
|
+
authType: "oauth";
|
|
237
238
|
/**
|
|
238
239
|
* Identifier for the OAuth provider (e.g., "google", "jira", "github").
|
|
239
240
|
* Tools sharing the same provider share tokens under (provider, userId) —
|
|
@@ -241,7 +242,7 @@ type ExuluOauthConfig = {
|
|
|
241
242
|
* omitted, defaults to the tool's `id`, preserving per-tool behavior for
|
|
242
243
|
* tools that don't opt in.
|
|
243
244
|
*/
|
|
244
|
-
provider
|
|
245
|
+
provider: string;
|
|
245
246
|
/** The provider's authorization endpoint, e.g. https://app.hubspot.com/oauth/authorize */
|
|
246
247
|
authorizationUrl: string;
|
|
247
248
|
/** The provider's token endpoint, e.g. https://api.hubapi.com/oauth/v1/token */
|
|
@@ -250,7 +251,7 @@ type ExuluOauthConfig = {
|
|
|
250
251
|
/** Never leaves the server: used only in the server-side token exchange. */
|
|
251
252
|
clientSecret: string;
|
|
252
253
|
/** Scopes to request; joined with spaces in the authorization URL. */
|
|
253
|
-
scopes: string[];
|
|
254
|
+
scopes: readonly string[];
|
|
254
255
|
/** PKCE (S256). Defaults to true; set false for providers that reject PKCE. */
|
|
255
256
|
pkce?: boolean;
|
|
256
257
|
/**
|
|
@@ -259,7 +260,26 @@ type ExuluOauthConfig = {
|
|
|
259
260
|
* refresh token.
|
|
260
261
|
*/
|
|
261
262
|
extraAuthParams?: Record<string, string>;
|
|
262
|
-
}
|
|
263
|
+
}
|
|
264
|
+
interface CredentialField {
|
|
265
|
+
name: string;
|
|
266
|
+
label: string;
|
|
267
|
+
type: "text" | "password";
|
|
268
|
+
placeholder?: string;
|
|
269
|
+
help?: string;
|
|
270
|
+
}
|
|
271
|
+
interface ExuluUserCredentialsConfig {
|
|
272
|
+
authType: "user_credentials";
|
|
273
|
+
provider: string;
|
|
274
|
+
fields: CredentialField[];
|
|
275
|
+
validate?: (values: Record<string, string>) => Promise<void>;
|
|
276
|
+
}
|
|
277
|
+
type ExuluAuthConfig = ExuluOauthConfig | ExuluUserCredentialsConfig;
|
|
278
|
+
interface ExuluCredentialsToolContext {
|
|
279
|
+
userId: string;
|
|
280
|
+
provider: string;
|
|
281
|
+
credentials: Record<string, string>;
|
|
282
|
+
}
|
|
263
283
|
/** The oauth context injected into an oauth-enabled tool's execute inputs. */
|
|
264
284
|
type ExuluOauthToolContext = {
|
|
265
285
|
accessToken: string;
|
|
@@ -281,14 +301,14 @@ declare class ExuluTool {
|
|
|
281
301
|
type: ToolType;
|
|
282
302
|
tool: Tool;
|
|
283
303
|
needsApproval: boolean;
|
|
284
|
-
|
|
304
|
+
authentication?: ExuluAuthConfig;
|
|
285
305
|
config: {
|
|
286
306
|
name: string;
|
|
287
307
|
description: string;
|
|
288
308
|
type: "boolean" | "string" | "number" | "variable" | "json";
|
|
289
309
|
default?: string | boolean | number | object;
|
|
290
310
|
}[];
|
|
291
|
-
constructor({ id, name, description, category, inputSchema, type, execute, config, needsApproval,
|
|
311
|
+
constructor({ id, name, description, category, inputSchema, type, execute, config, needsApproval, authentication, }: {
|
|
292
312
|
id: string;
|
|
293
313
|
name: string;
|
|
294
314
|
description: string;
|
|
@@ -302,7 +322,7 @@ declare class ExuluTool {
|
|
|
302
322
|
default?: string | boolean | number | object;
|
|
303
323
|
}[];
|
|
304
324
|
needsApproval?: boolean;
|
|
305
|
-
|
|
325
|
+
authentication?: ExuluAuthConfig;
|
|
306
326
|
execute: (inputs: any, options?: any) => Promise<{
|
|
307
327
|
result?: string;
|
|
308
328
|
job?: string;
|
|
@@ -658,6 +678,13 @@ type ExuluContextFieldDefinition = {
|
|
|
658
678
|
index?: boolean;
|
|
659
679
|
enumValues?: string[];
|
|
660
680
|
allowedFileTypes?: allFileTypes[];
|
|
681
|
+
/**
|
|
682
|
+
* Write-only secret: excluded from the generated GraphQL object type, Filter
|
|
683
|
+
* type, SQL read selections, and all read payloads. Still accepted as
|
|
684
|
+
* mutation INPUT (the mutation layer hashes/stores it) unless additionally
|
|
685
|
+
* excluded by name in the input generator.
|
|
686
|
+
*/
|
|
687
|
+
hidden?: boolean;
|
|
661
688
|
};
|
|
662
689
|
type ExuluContextSource = {
|
|
663
690
|
id: string;
|
|
@@ -2532,6 +2559,12 @@ declare const JOB_STATUS_ENUM: {
|
|
|
2532
2559
|
cancelled: string;
|
|
2533
2560
|
};
|
|
2534
2561
|
|
|
2562
|
+
declare class CredentialInvalidError extends Error {
|
|
2563
|
+
readonly provider: string;
|
|
2564
|
+
readonly reason?: string;
|
|
2565
|
+
constructor(provider: string, reason?: string);
|
|
2566
|
+
}
|
|
2567
|
+
|
|
2535
2568
|
declare const ExuluJobs: {
|
|
2536
2569
|
redis: typeof redisClient;
|
|
2537
2570
|
};
|
|
@@ -2635,4 +2668,4 @@ declare const ExuluPython: {
|
|
|
2635
2668
|
instructions: typeof getPythonSetupInstructions;
|
|
2636
2669
|
};
|
|
2637
2670
|
|
|
2638
|
-
export { type ChunkerOperation, type ChunkerResponse, 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, type ExuluContextEmbedder, ExuluDatabase, ExuluDefaultProviders, ExuluDefaultTools, ExuluDocumentProcessor, ExuluEval, type Item as ExuluItem, ExuluJobs, type ExuluOauthConfig, type ExuluOauthToolContext, ExuluOtel, ExuluProvider, ExuluPython, queues as ExuluQueues, ExuluReadApi, ExuluReranker, ExuluTool, ExuluVariables, type VectorSearchChunkResult, defaultChunker, enableLiteLLMClientMode, postgresClient };
|
|
2671
|
+
export { type ChunkerOperation, type ChunkerResponse, type CredentialField, CredentialInvalidError, 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, type ExuluAuthConfig, ExuluAuthentication, ExuluChunkers, ExuluContext, type ExuluContextEmbedder, type ExuluCredentialsToolContext, ExuluDatabase, ExuluDefaultProviders, ExuluDefaultTools, ExuluDocumentProcessor, ExuluEval, type Item as ExuluItem, ExuluJobs, type ExuluOauthConfig, type ExuluOauthToolContext, ExuluOtel, ExuluProvider, ExuluPython, queues as ExuluQueues, ExuluReadApi, ExuluReranker, ExuluTool, type ExuluUserCredentialsConfig, ExuluVariables, type VectorSearchChunkResult, defaultChunker, enableLiteLLMClientMode, postgresClient };
|