@exulu/backend 1.54.0 → 1.56.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 +2275 -1330
- package/dist/index.d.cts +8 -30
- package/dist/index.d.ts +8 -30
- package/dist/index.js +2256 -1306
- package/ee/agentic-retrieval/v3/agent-loop.ts +49 -3
- package/ee/agentic-retrieval/v3/classifier.ts +61 -42
- package/ee/agentic-retrieval/v3/context-sampler.ts +10 -1
- package/ee/agentic-retrieval/v3/index.ts +211 -35
- 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 +236 -113
- package/ee/agentic-retrieval/v3/trajectory.ts +227 -14
- package/ee/agentic-retrieval/v4/agent-loop.ts +142 -55
- package/ee/agentic-retrieval/v4/context-sampler.ts +79 -0
- package/ee/agentic-retrieval/v4/index.ts +673 -164
- package/ee/agentic-retrieval/v4/types.ts +33 -4
- 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/embed-preprocessor.ts +0 -76
- package/ee/agentic-retrieval/v4/system-prompt.ts +0 -248
- package/ee/agentic-retrieval/v4/tools.ts +0 -241
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?: {
|
|
@@ -627,7 +629,7 @@ declare class ExuluContext {
|
|
|
627
629
|
item: Item;
|
|
628
630
|
job?: string;
|
|
629
631
|
}>;
|
|
630
|
-
updateItem: (item: Item, config: ExuluConfig, user?: number, role?: string, generateEmbeddingsOverwrite?: boolean) => Promise<{
|
|
632
|
+
updateItem: (item: Item, config: ExuluConfig, user?: number, role?: string, generateEmbeddingsOverwrite?: boolean, runProcessorOverwrite?: boolean) => Promise<{
|
|
631
633
|
item: Item;
|
|
632
634
|
job?: string;
|
|
633
635
|
}>;
|
|
@@ -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,15 @@ 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, preselected, memoryItems }: {
|
|
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
|
+
preselected?: string[];
|
|
2055
|
+
memoryItems?: Item[];
|
|
2077
2056
|
}): ExuluTool | undefined;
|
|
2078
2057
|
|
|
2079
2058
|
type JOB_STATUS = "completed" | "failed" | "delayed" | "active" | "waiting" | "paused" | "stuck";
|
|
@@ -2095,7 +2074,6 @@ declare const ExuluDefaultTools: {
|
|
|
2095
2074
|
retrieval: {
|
|
2096
2075
|
create: {
|
|
2097
2076
|
v3: typeof createAgenticRetrievalToolV3;
|
|
2098
|
-
v4: typeof createAgenticRetrievalToolV4;
|
|
2099
2077
|
};
|
|
2100
2078
|
};
|
|
2101
2079
|
};
|
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?: {
|
|
@@ -627,7 +629,7 @@ declare class ExuluContext {
|
|
|
627
629
|
item: Item;
|
|
628
630
|
job?: string;
|
|
629
631
|
}>;
|
|
630
|
-
updateItem: (item: Item, config: ExuluConfig, user?: number, role?: string, generateEmbeddingsOverwrite?: boolean) => Promise<{
|
|
632
|
+
updateItem: (item: Item, config: ExuluConfig, user?: number, role?: string, generateEmbeddingsOverwrite?: boolean, runProcessorOverwrite?: boolean) => Promise<{
|
|
631
633
|
item: Item;
|
|
632
634
|
job?: string;
|
|
633
635
|
}>;
|
|
@@ -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,15 @@ 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, preselected, memoryItems }: {
|
|
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
|
+
preselected?: string[];
|
|
2055
|
+
memoryItems?: Item[];
|
|
2077
2056
|
}): ExuluTool | undefined;
|
|
2078
2057
|
|
|
2079
2058
|
type JOB_STATUS = "completed" | "failed" | "delayed" | "active" | "waiting" | "paused" | "stuck";
|
|
@@ -2095,7 +2074,6 @@ declare const ExuluDefaultTools: {
|
|
|
2095
2074
|
retrieval: {
|
|
2096
2075
|
create: {
|
|
2097
2076
|
v3: typeof createAgenticRetrievalToolV3;
|
|
2098
|
-
v4: typeof createAgenticRetrievalToolV4;
|
|
2099
2077
|
};
|
|
2100
2078
|
};
|
|
2101
2079
|
};
|