@exulu/backend 1.54.0 → 1.55.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/index.cjs +1970 -1176
- package/dist/index.d.cts +6 -29
- package/dist/index.d.ts +6 -29
- package/dist/index.js +1963 -1164
- package/ee/agentic-retrieval/v3/agent-loop.ts +49 -3
- package/ee/agentic-retrieval/v3/classifier.ts +42 -37
- package/ee/agentic-retrieval/v3/index.ts +112 -18
- package/ee/agentic-retrieval/v3/session-tools-registry.ts +20 -0
- package/ee/agentic-retrieval/v3/strategies.ts +28 -24
- package/ee/agentic-retrieval/v3/tools.ts +226 -111
- package/ee/agentic-retrieval/v3/trajectory.ts +227 -14
- package/ee/invoke-skills/create-sandbox.ts +119 -0
- package/ee/python/documents/processing/doc_processor.ts +106 -14
- package/package.json +4 -2
- package/ee/agentic-retrieval/ANALYSIS.md +0 -658
- package/ee/agentic-retrieval/index.ts +0 -1109
- package/ee/agentic-retrieval/logs/README.md +0 -198
- package/ee/agentic-retrieval/v2.ts +0 -1628
- package/ee/agentic-retrieval/v4/agent-loop.ts +0 -121
- package/ee/agentic-retrieval/v4/embed-preprocessor.ts +0 -76
- package/ee/agentic-retrieval/v4/index.ts +0 -181
- package/ee/agentic-retrieval/v4/system-prompt.ts +0 -248
- package/ee/agentic-retrieval/v4/tools.ts +0 -241
- package/ee/agentic-retrieval/v4/types.ts +0 -29
package/dist/index.d.cts
CHANGED
|
@@ -97,6 +97,10 @@ interface ExuluAgent {
|
|
|
97
97
|
name: string;
|
|
98
98
|
description: string;
|
|
99
99
|
}[];
|
|
100
|
+
skills?: {
|
|
101
|
+
id: string;
|
|
102
|
+
name: string;
|
|
103
|
+
}[];
|
|
100
104
|
maxContextLength?: number;
|
|
101
105
|
authenticationInformation?: string;
|
|
102
106
|
systemInstructions?: string;
|
|
@@ -529,7 +533,6 @@ declare class ExuluContext {
|
|
|
529
533
|
calculateVectors?: "manual" | "onUpdate" | "onInsert" | "always";
|
|
530
534
|
maxRetrievalResults?: number;
|
|
531
535
|
defaultRightsMode?: ExuluRightsMode;
|
|
532
|
-
enableAsTool?: boolean;
|
|
533
536
|
cutoffs?: {
|
|
534
537
|
cosineDistance?: number;
|
|
535
538
|
tsvector?: number;
|
|
@@ -558,7 +561,6 @@ declare class ExuluContext {
|
|
|
558
561
|
configuration?: {
|
|
559
562
|
calculateVectors?: "manual" | "onUpdate" | "onInsert" | "always";
|
|
560
563
|
defaultRightsMode?: ExuluRightsMode;
|
|
561
|
-
enableAsTool?: boolean;
|
|
562
564
|
languages?: ("german" | "english")[];
|
|
563
565
|
maxRetrievalResults?: number;
|
|
564
566
|
expand?: {
|
|
@@ -663,7 +665,6 @@ declare class ExuluContext {
|
|
|
663
665
|
};
|
|
664
666
|
createItemsTable: () => Promise<void>;
|
|
665
667
|
createChunksTable: () => Promise<void>;
|
|
666
|
-
tool: () => ExuluTool | null;
|
|
667
668
|
}
|
|
668
669
|
|
|
669
670
|
declare class ExuluReranker {
|
|
@@ -992,11 +993,6 @@ declare class ExuluQueues {
|
|
|
992
993
|
}
|
|
993
994
|
declare const queues: ExuluQueues;
|
|
994
995
|
|
|
995
|
-
/**
|
|
996
|
-
* Module-level registry so external callers (e.g. test scripts) can read
|
|
997
|
-
* the path of the most recently saved trajectory file.
|
|
998
|
-
* Works because both the trajectory logger and the test run in the same process.
|
|
999
|
-
*/
|
|
1000
996
|
declare const trajectoryRegistry: {
|
|
1001
997
|
lastFile: string | undefined;
|
|
1002
998
|
};
|
|
@@ -2048,32 +2044,14 @@ declare function documentProcessor({ file, name, config }: {
|
|
|
2048
2044
|
* - Context example records sampled at init and cached
|
|
2049
2045
|
* - Strategy-specific instructions and tool sets
|
|
2050
2046
|
*/
|
|
2051
|
-
declare function createAgenticRetrievalToolV3({ contexts, instructions: adminInstructions, rerankers, user, role, model, }: {
|
|
2052
|
-
contexts: ExuluContext[];
|
|
2053
|
-
rerankers: ExuluReranker[];
|
|
2054
|
-
user?: User;
|
|
2055
|
-
role?: string;
|
|
2056
|
-
model?: LanguageModel;
|
|
2057
|
-
instructions?: string;
|
|
2058
|
-
}): ExuluTool | undefined;
|
|
2059
|
-
|
|
2060
|
-
/**
|
|
2061
|
-
* Creates the V4 ExuluTool for agentic context retrieval.
|
|
2062
|
-
*
|
|
2063
|
-
* V4 uses an observe-infer-act loop with two primitive tools:
|
|
2064
|
-
* - execute_query: raw PostgreSQL SELECT via db.raw (with embed() helper for semantic search)
|
|
2065
|
-
* - grep: iterative search on large result files
|
|
2066
|
-
*
|
|
2067
|
-
* Unlike V3, there is no upfront query classification or strategy routing.
|
|
2068
|
-
* The agent writes its own SQL and decides when it has found enough information.
|
|
2069
|
-
*/
|
|
2070
|
-
declare function createAgenticRetrievalToolV4({ contexts, instructions: adminInstructions, rerankers, user, role, model, }: {
|
|
2047
|
+
declare function createAgenticRetrievalToolV3({ contexts, instructions: adminInstructions, rerankers, user, role, model, preselectedItemIds, }: {
|
|
2071
2048
|
contexts: ExuluContext[];
|
|
2072
2049
|
rerankers: ExuluReranker[];
|
|
2073
2050
|
user?: User;
|
|
2074
2051
|
role?: string;
|
|
2075
2052
|
model?: LanguageModel;
|
|
2076
2053
|
instructions?: string;
|
|
2054
|
+
preselectedItemIds?: string[];
|
|
2077
2055
|
}): ExuluTool | undefined;
|
|
2078
2056
|
|
|
2079
2057
|
type JOB_STATUS = "completed" | "failed" | "delayed" | "active" | "waiting" | "paused" | "stuck";
|
|
@@ -2095,7 +2073,6 @@ declare const ExuluDefaultTools: {
|
|
|
2095
2073
|
retrieval: {
|
|
2096
2074
|
create: {
|
|
2097
2075
|
v3: typeof createAgenticRetrievalToolV3;
|
|
2098
|
-
v4: typeof createAgenticRetrievalToolV4;
|
|
2099
2076
|
};
|
|
2100
2077
|
};
|
|
2101
2078
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -97,6 +97,10 @@ interface ExuluAgent {
|
|
|
97
97
|
name: string;
|
|
98
98
|
description: string;
|
|
99
99
|
}[];
|
|
100
|
+
skills?: {
|
|
101
|
+
id: string;
|
|
102
|
+
name: string;
|
|
103
|
+
}[];
|
|
100
104
|
maxContextLength?: number;
|
|
101
105
|
authenticationInformation?: string;
|
|
102
106
|
systemInstructions?: string;
|
|
@@ -529,7 +533,6 @@ declare class ExuluContext {
|
|
|
529
533
|
calculateVectors?: "manual" | "onUpdate" | "onInsert" | "always";
|
|
530
534
|
maxRetrievalResults?: number;
|
|
531
535
|
defaultRightsMode?: ExuluRightsMode;
|
|
532
|
-
enableAsTool?: boolean;
|
|
533
536
|
cutoffs?: {
|
|
534
537
|
cosineDistance?: number;
|
|
535
538
|
tsvector?: number;
|
|
@@ -558,7 +561,6 @@ declare class ExuluContext {
|
|
|
558
561
|
configuration?: {
|
|
559
562
|
calculateVectors?: "manual" | "onUpdate" | "onInsert" | "always";
|
|
560
563
|
defaultRightsMode?: ExuluRightsMode;
|
|
561
|
-
enableAsTool?: boolean;
|
|
562
564
|
languages?: ("german" | "english")[];
|
|
563
565
|
maxRetrievalResults?: number;
|
|
564
566
|
expand?: {
|
|
@@ -663,7 +665,6 @@ declare class ExuluContext {
|
|
|
663
665
|
};
|
|
664
666
|
createItemsTable: () => Promise<void>;
|
|
665
667
|
createChunksTable: () => Promise<void>;
|
|
666
|
-
tool: () => ExuluTool | null;
|
|
667
668
|
}
|
|
668
669
|
|
|
669
670
|
declare class ExuluReranker {
|
|
@@ -992,11 +993,6 @@ declare class ExuluQueues {
|
|
|
992
993
|
}
|
|
993
994
|
declare const queues: ExuluQueues;
|
|
994
995
|
|
|
995
|
-
/**
|
|
996
|
-
* Module-level registry so external callers (e.g. test scripts) can read
|
|
997
|
-
* the path of the most recently saved trajectory file.
|
|
998
|
-
* Works because both the trajectory logger and the test run in the same process.
|
|
999
|
-
*/
|
|
1000
996
|
declare const trajectoryRegistry: {
|
|
1001
997
|
lastFile: string | undefined;
|
|
1002
998
|
};
|
|
@@ -2048,32 +2044,14 @@ declare function documentProcessor({ file, name, config }: {
|
|
|
2048
2044
|
* - Context example records sampled at init and cached
|
|
2049
2045
|
* - Strategy-specific instructions and tool sets
|
|
2050
2046
|
*/
|
|
2051
|
-
declare function createAgenticRetrievalToolV3({ contexts, instructions: adminInstructions, rerankers, user, role, model, }: {
|
|
2052
|
-
contexts: ExuluContext[];
|
|
2053
|
-
rerankers: ExuluReranker[];
|
|
2054
|
-
user?: User;
|
|
2055
|
-
role?: string;
|
|
2056
|
-
model?: LanguageModel;
|
|
2057
|
-
instructions?: string;
|
|
2058
|
-
}): ExuluTool | undefined;
|
|
2059
|
-
|
|
2060
|
-
/**
|
|
2061
|
-
* Creates the V4 ExuluTool for agentic context retrieval.
|
|
2062
|
-
*
|
|
2063
|
-
* V4 uses an observe-infer-act loop with two primitive tools:
|
|
2064
|
-
* - execute_query: raw PostgreSQL SELECT via db.raw (with embed() helper for semantic search)
|
|
2065
|
-
* - grep: iterative search on large result files
|
|
2066
|
-
*
|
|
2067
|
-
* Unlike V3, there is no upfront query classification or strategy routing.
|
|
2068
|
-
* The agent writes its own SQL and decides when it has found enough information.
|
|
2069
|
-
*/
|
|
2070
|
-
declare function createAgenticRetrievalToolV4({ contexts, instructions: adminInstructions, rerankers, user, role, model, }: {
|
|
2047
|
+
declare function createAgenticRetrievalToolV3({ contexts, instructions: adminInstructions, rerankers, user, role, model, preselectedItemIds, }: {
|
|
2071
2048
|
contexts: ExuluContext[];
|
|
2072
2049
|
rerankers: ExuluReranker[];
|
|
2073
2050
|
user?: User;
|
|
2074
2051
|
role?: string;
|
|
2075
2052
|
model?: LanguageModel;
|
|
2076
2053
|
instructions?: string;
|
|
2054
|
+
preselectedItemIds?: string[];
|
|
2077
2055
|
}): ExuluTool | undefined;
|
|
2078
2056
|
|
|
2079
2057
|
type JOB_STATUS = "completed" | "failed" | "delayed" | "active" | "waiting" | "paused" | "stuck";
|
|
@@ -2095,7 +2073,6 @@ declare const ExuluDefaultTools: {
|
|
|
2095
2073
|
retrieval: {
|
|
2096
2074
|
create: {
|
|
2097
2075
|
v3: typeof createAgenticRetrievalToolV3;
|
|
2098
|
-
v4: typeof createAgenticRetrievalToolV4;
|
|
2099
2076
|
};
|
|
2100
2077
|
};
|
|
2101
2078
|
};
|