@eclipse-lyra/extension-rag-system 0.0.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/api.d.ts +9 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +90 -0
- package/dist/api.js.map +1 -0
- package/dist/chunkers/chunker-interface.d.ts +21 -0
- package/dist/chunkers/chunker-interface.d.ts.map +1 -0
- package/dist/chunkers/document-chunker.d.ts +12 -0
- package/dist/chunkers/document-chunker.d.ts.map +1 -0
- package/dist/chunkers/fallback-chunker.d.ts +10 -0
- package/dist/chunkers/fallback-chunker.d.ts.map +1 -0
- package/dist/chunkers/langchain-chunker.d.ts +12 -0
- package/dist/chunkers/langchain-chunker.d.ts.map +1 -0
- package/dist/document-index-service.d.ts +102 -0
- package/dist/document-index-service.d.ts.map +1 -0
- package/dist/embedding-service.d.ts +18 -0
- package/dist/embedding-service.d.ts.map +1 -0
- package/dist/extractors/document-extractor-interface.d.ts +26 -0
- package/dist/extractors/document-extractor-interface.d.ts.map +1 -0
- package/dist/extractors/document-extractor.d.ts +13 -0
- package/dist/extractors/document-extractor.d.ts.map +1 -0
- package/dist/extractors/llm-ocr-extractor.d.ts +16 -0
- package/dist/extractors/llm-ocr-extractor.d.ts.map +1 -0
- package/dist/extractors/pdfjs-extractor.d.ts +7 -0
- package/dist/extractors/pdfjs-extractor.d.ts.map +1 -0
- package/dist/i18n.json.d.ts +13 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/rag-integration-DO7-zvk2.js +191 -0
- package/dist/rag-integration-DO7-zvk2.js.map +1 -0
- package/dist/rag-integration.d.ts +6 -0
- package/dist/rag-integration.d.ts.map +1 -0
- package/dist/rag-service-BKBGCuO-.js +1872 -0
- package/dist/rag-service-BKBGCuO-.js.map +1 -0
- package/dist/rag-service.d.ts +25 -0
- package/dist/rag-service.d.ts.map +1 -0
- package/dist/rag-system-extension-DfD6H8Vr.js +1142 -0
- package/dist/rag-system-extension-DfD6H8Vr.js.map +1 -0
- package/dist/rag-system-extension.d.ts +2 -0
- package/dist/rag-system-extension.d.ts.map +1 -0
- package/dist/rag-system-manager.d.ts +41 -0
- package/dist/rag-system-manager.d.ts.map +1 -0
- package/dist/rxdb-loader.d.ts +9 -0
- package/dist/rxdb-loader.d.ts.map +1 -0
- package/dist/services/rag-result-formatter.d.ts +23 -0
- package/dist/services/rag-result-formatter.d.ts.map +1 -0
- package/dist/services/relevance-calculator.d.ts +7 -0
- package/dist/services/relevance-calculator.d.ts.map +1 -0
- package/dist/utils/constants.d.ts +35 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/context-scopes.d.ts +39 -0
- package/dist/utils/context-scopes.d.ts.map +1 -0
- package/dist/utils/query-utils.d.ts +7 -0
- package/dist/utils/query-utils.d.ts.map +1 -0
- package/dist/utils/snippet-extractor.d.ts +22 -0
- package/dist/utils/snippet-extractor.d.ts.map +1 -0
- package/dist/utils/workspace-utils.d.ts +8 -0
- package/dist/utils/workspace-utils.d.ts.map +1 -0
- package/dist/vector-utils.d.ts +28 -0
- package/dist/vector-utils.d.ts.map +1 -0
- package/package.json +39 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { i as SEARCH_CONFIG, s as searchWorkspaceDocuments, R as RAGResultFormatter, d as documentIndexService, f as getWorkspacePath, S as SnippetExtractor, r as ragService } from "./rag-service-BKBGCuO-.js";
|
|
2
|
+
import { registerAll, createLogger, rootContext } from "@eclipse-lyra/core";
|
|
3
|
+
import { aiService } from "@eclipse-lyra/extension-ai-system/api";
|
|
4
|
+
const logger = createLogger("RAGIntegration");
|
|
5
|
+
const resultFormatter = new RAGResultFormatter(new SnippetExtractor());
|
|
6
|
+
const ragPromptEnhancer = {
|
|
7
|
+
priority: 10,
|
|
8
|
+
async enhance(prompt, context) {
|
|
9
|
+
try {
|
|
10
|
+
const stats = await documentIndexService.getStats();
|
|
11
|
+
if (stats.totalDocuments === 0) {
|
|
12
|
+
return prompt;
|
|
13
|
+
}
|
|
14
|
+
const instruction = `IMPORTANT: When a user mentions a specific file name or path:
|
|
15
|
+
1. ALWAYS first check if the file is indexed using rag.checindexed with the file path
|
|
16
|
+
2. If indexed: Use rag.search-documents with filePath parameter to get relevant content from the indexed document
|
|
17
|
+
3. If not indexed: Read the file directly using file commands (cat_file, ls, etc.)
|
|
18
|
+
|
|
19
|
+
NEVER use filePath or fileName parameters in rag.search-documents without first verifying the file is indexed with rag.checindexed. If you use a non-indexed file path/name, the search will return no results.
|
|
20
|
+
|
|
21
|
+
For general searches (not specific files), use rag.search-documents with just the query parameter to search across all indexed documents. This is more efficient than reading files one by one.`;
|
|
22
|
+
return `${prompt}
|
|
23
|
+
|
|
24
|
+
${instruction}`;
|
|
25
|
+
} catch (error) {
|
|
26
|
+
logger.warn(`RAG enhancement failed: ${error}`);
|
|
27
|
+
return prompt;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
function createRAGToolExecutor() {
|
|
32
|
+
return async (toolName, params) => {
|
|
33
|
+
if (toolName === "search_workspace_documents") {
|
|
34
|
+
const query = params.query || "";
|
|
35
|
+
const limit = Math.min(params.limit || SEARCH_CONFIG.DEFAULT_LIMIT, SEARCH_CONFIG.MAX_LIMIT);
|
|
36
|
+
const fileType = params.fileType;
|
|
37
|
+
const filePath = params.filePath;
|
|
38
|
+
const fileName = params.fileName;
|
|
39
|
+
const documentSearchScope = params.includePaths || params.excludePaths || params.pathPattern ? {
|
|
40
|
+
includePaths: params.includePaths,
|
|
41
|
+
excludePaths: params.excludePaths,
|
|
42
|
+
pathPattern: params.pathPattern
|
|
43
|
+
} : void 0;
|
|
44
|
+
const results = await searchWorkspaceDocuments(query, {
|
|
45
|
+
limit,
|
|
46
|
+
fileType,
|
|
47
|
+
filePath,
|
|
48
|
+
fileName,
|
|
49
|
+
documentSearchScope
|
|
50
|
+
});
|
|
51
|
+
return {
|
|
52
|
+
results: resultFormatter.formatSearchResults(results),
|
|
53
|
+
total: results.length
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
throw new Error(`Unknown RAG tool: ${toolName}`);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function registerRAGCommands() {
|
|
60
|
+
registerAll({
|
|
61
|
+
command: {
|
|
62
|
+
id: "rag.search-documents",
|
|
63
|
+
name: "Search Workspace Documents (RAG)",
|
|
64
|
+
description: "Search indexed workspace documents for relevant content. IMPORTANT: Only use filePath or fileName if you have already verified the file is indexed using rag.checindexed. If the file is not indexed, this will return no results.",
|
|
65
|
+
parameters: [
|
|
66
|
+
{
|
|
67
|
+
name: "query",
|
|
68
|
+
description: "Search query (optional if filePath or fileName is provided)",
|
|
69
|
+
required: false
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "limit",
|
|
73
|
+
description: "Maximum number of results",
|
|
74
|
+
required: false
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "fileType",
|
|
78
|
+
description: "Filter by file type",
|
|
79
|
+
required: false
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: "filePath",
|
|
83
|
+
description: "Exact file path to search (relative to workspace root). Only use if you verified the file is indexed with rag.checindexed.",
|
|
84
|
+
required: false
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "fileName",
|
|
88
|
+
description: "File name to search for (partial match supported). Only use if you verified the file is indexed with rag.checindexed.",
|
|
89
|
+
required: false
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
handler: {
|
|
94
|
+
canExecute: () => true,
|
|
95
|
+
execute: async (context) => {
|
|
96
|
+
const query = context.params?.query || "";
|
|
97
|
+
const limit = context.params?.limit ? Math.min(parseInt(context.params.limit), SEARCH_CONFIG.MAX_LIMIT) : SEARCH_CONFIG.DEFAULT_LIMIT;
|
|
98
|
+
const fileType = context.params?.fileType;
|
|
99
|
+
const filePath = context.params?.filePath;
|
|
100
|
+
const fileName = context.params?.fileName;
|
|
101
|
+
if (!query && !filePath && !fileName) {
|
|
102
|
+
throw new Error("Either query, filePath, or fileName parameter must be provided");
|
|
103
|
+
}
|
|
104
|
+
const results = await searchWorkspaceDocuments(query, {
|
|
105
|
+
limit,
|
|
106
|
+
fileType,
|
|
107
|
+
filePath,
|
|
108
|
+
fileName
|
|
109
|
+
});
|
|
110
|
+
if ((filePath || fileName) && results.length === 0) {
|
|
111
|
+
return {
|
|
112
|
+
query: query || (filePath ? `filePath: ${filePath}` : `fileName: ${fileName}`),
|
|
113
|
+
results: [],
|
|
114
|
+
warning: `No indexed document found for ${filePath ? `file path "${filePath}"` : `file name "${fileName}"`}. The file may not be indexed. Use rag.checindexed to verify if a file is indexed before searching.`
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
query: query || (filePath ? `filePath: ${filePath}` : fileName ? `fileName: ${fileName}` : ""),
|
|
119
|
+
results: resultFormatter.formatCommandResults(results)
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
registerAll({
|
|
125
|
+
command: {
|
|
126
|
+
id: "rag.checindexed",
|
|
127
|
+
name: "Check if File is Indexed",
|
|
128
|
+
description: "Check if a specific file is indexed in the document index. Use this to determine if you should use RAG search or read the file directly.",
|
|
129
|
+
parameters: [
|
|
130
|
+
{
|
|
131
|
+
name: "filePath",
|
|
132
|
+
description: "The file path to check (relative to workspace root)",
|
|
133
|
+
required: true
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
handler: {
|
|
138
|
+
canExecute: () => true,
|
|
139
|
+
execute: async (context) => {
|
|
140
|
+
const filePath = context.params?.filePath;
|
|
141
|
+
if (!filePath) {
|
|
142
|
+
throw new Error("File path parameter required");
|
|
143
|
+
}
|
|
144
|
+
const workspaceResult = await getWorkspacePath();
|
|
145
|
+
if (!workspaceResult) {
|
|
146
|
+
return { indexed: false, reason: "No workspace connected" };
|
|
147
|
+
}
|
|
148
|
+
const { workspacePath } = workspaceResult;
|
|
149
|
+
const document = await documentIndexService.getDocumentByPath(workspacePath, filePath);
|
|
150
|
+
if (document) {
|
|
151
|
+
return {
|
|
152
|
+
indexed: true,
|
|
153
|
+
filePath: document.filePath,
|
|
154
|
+
fileName: document.fileName,
|
|
155
|
+
fileType: document.fileType,
|
|
156
|
+
indexedAt: new Date(document.indexedAt).toISOString(),
|
|
157
|
+
size: document.metadata.size
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
return {
|
|
161
|
+
indexed: false,
|
|
162
|
+
filePath,
|
|
163
|
+
reason: "File not found in document index"
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
function integrateRAGWithAI() {
|
|
170
|
+
try {
|
|
171
|
+
registerRAGCommands();
|
|
172
|
+
const promptBuilder = aiService.promptBuilder;
|
|
173
|
+
if (promptBuilder && typeof promptBuilder.addEnhancer === "function") {
|
|
174
|
+
promptBuilder.addEnhancer(ragPromptEnhancer);
|
|
175
|
+
logger.info("RAG prompt enhancer and commands registered - AI will be instructed to use RAG before reading files");
|
|
176
|
+
} else {
|
|
177
|
+
logger.warn("AI service prompt builder not available yet, will retry");
|
|
178
|
+
setTimeout(() => integrateRAGWithAI(), 1e3);
|
|
179
|
+
}
|
|
180
|
+
} catch (error) {
|
|
181
|
+
logger.warn(`Failed to integrate RAG with AI: ${error}`);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
rootContext.put("ragService", ragService);
|
|
185
|
+
export {
|
|
186
|
+
createRAGToolExecutor,
|
|
187
|
+
integrateRAGWithAI,
|
|
188
|
+
ragPromptEnhancer,
|
|
189
|
+
registerRAGCommands
|
|
190
|
+
};
|
|
191
|
+
//# sourceMappingURL=rag-integration-DO7-zvk2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rag-integration-DO7-zvk2.js","sources":["../src/rag-integration.ts"],"sourcesContent":["import { ragService, searchWorkspaceDocuments } from './rag-service';\nimport { DocumentSearchScope } from './document-index-service';\nimport { documentIndexService } from './document-index-service';\nimport { getWorkspacePath } from './utils/workspace-utils';\nimport { rootContext } from '@eclipse-lyra/core';\nimport { SEARCH_CONFIG } from './utils/constants';\nimport { RAGResultFormatter } from './services/rag-result-formatter';\nimport { SnippetExtractor } from './utils/snippet-extractor';\nimport { aiService } from '@eclipse-lyra/extension-ai-system/api';\nimport { commandRegistry, registerAll } from '@eclipse-lyra/core';\nimport type { ExecutionContext } from '@eclipse-lyra/core';\nimport type { PromptEnhancer, ToolDefinition } from '@eclipse-lyra/extension-ai-system/api';\nimport { createLogger } from '@eclipse-lyra/core';\n\nconst logger = createLogger('RAGIntegration');\nconst resultFormatter = new RAGResultFormatter(new SnippetExtractor());\n\nexport const ragPromptEnhancer: PromptEnhancer = {\n priority: 10,\n async enhance(prompt: string, context: ExecutionContext): Promise<string> {\n try {\n const stats = await documentIndexService.getStats();\n if (stats.totalDocuments === 0) {\n return prompt;\n }\n\n const instruction = `IMPORTANT: When a user mentions a specific file name or path:\n1. ALWAYS first check if the file is indexed using rag.checindexed with the file path\n2. If indexed: Use rag.search-documents with filePath parameter to get relevant content from the indexed document\n3. If not indexed: Read the file directly using file commands (cat_file, ls, etc.)\n\nNEVER use filePath or fileName parameters in rag.search-documents without first verifying the file is indexed with rag.checindexed. If you use a non-indexed file path/name, the search will return no results.\n\nFor general searches (not specific files), use rag.search-documents with just the query parameter to search across all indexed documents. This is more efficient than reading files one by one.`;\n\n return `${prompt}\\n\\n${instruction}`;\n } catch (error) {\n logger.warn(`RAG enhancement failed: ${error}`);\n return prompt;\n }\n }\n};\n\nexport function createRAGToolExecutor() {\n return async (toolName: string, params: any): Promise<any> => {\n if (toolName === 'search_workspace_documents') {\n const query = params.query || '';\n const limit = Math.min(params.limit || SEARCH_CONFIG.DEFAULT_LIMIT, SEARCH_CONFIG.MAX_LIMIT);\n const fileType = params.fileType;\n const filePath = params.filePath;\n const fileName = params.fileName;\n\n const documentSearchScope: DocumentSearchScope | undefined = \n (params.includePaths || params.excludePaths || params.pathPattern)\n ? {\n includePaths: params.includePaths,\n excludePaths: params.excludePaths,\n pathPattern: params.pathPattern\n }\n : undefined;\n\n const results = await searchWorkspaceDocuments(query, {\n limit,\n fileType,\n filePath,\n fileName,\n documentSearchScope\n });\n\n return {\n results: resultFormatter.formatSearchResults(results),\n total: results.length\n };\n }\n\n throw new Error(`Unknown RAG tool: ${toolName}`);\n };\n}\n\nexport function registerRAGCommands() {\n registerAll({\n command: {\n id: 'rag.search-documents',\n name: 'Search Workspace Documents (RAG)',\n description: 'Search indexed workspace documents for relevant content. IMPORTANT: Only use filePath or fileName if you have already verified the file is indexed using rag.checindexed. If the file is not indexed, this will return no results.',\n parameters: [\n {\n name: 'query',\n description: 'Search query (optional if filePath or fileName is provided)',\n required: false\n },\n {\n name: 'limit',\n description: 'Maximum number of results',\n required: false\n },\n {\n name: 'fileType',\n description: 'Filter by file type',\n required: false\n },\n {\n name: 'filePath',\n description: 'Exact file path to search (relative to workspace root). Only use if you verified the file is indexed with rag.checindexed.',\n required: false\n },\n {\n name: 'fileName',\n description: 'File name to search for (partial match supported). Only use if you verified the file is indexed with rag.checindexed.',\n required: false\n }\n ]\n },\n handler: {\n canExecute: () => true,\n execute: async (context) => {\n const query = context.params?.query || '';\n const limit = context.params?.limit \n ? Math.min(parseInt(context.params.limit), SEARCH_CONFIG.MAX_LIMIT)\n : SEARCH_CONFIG.DEFAULT_LIMIT;\n const fileType = context.params?.fileType;\n const filePath = context.params?.filePath;\n const fileName = context.params?.fileName;\n\n if (!query && !filePath && !fileName) {\n throw new Error('Either query, filePath, or fileName parameter must be provided');\n }\n\n const results = await searchWorkspaceDocuments(query, {\n limit,\n fileType,\n filePath,\n fileName\n });\n\n if ((filePath || fileName) && results.length === 0) {\n return {\n query: query || (filePath ? `filePath: ${filePath}` : `fileName: ${fileName}`),\n results: [],\n warning: `No indexed document found for ${filePath ? `file path \"${filePath}\"` : `file name \"${fileName}\"`}. The file may not be indexed. Use rag.checindexed to verify if a file is indexed before searching.`\n };\n }\n\n return {\n query: query || (filePath ? `filePath: ${filePath}` : fileName ? `fileName: ${fileName}` : ''),\n results: resultFormatter.formatCommandResults(results)\n };\n }\n }\n });\n\n registerAll({\n command: {\n id: 'rag.checindexed',\n name: 'Check if File is Indexed',\n description: 'Check if a specific file is indexed in the document index. Use this to determine if you should use RAG search or read the file directly.',\n parameters: [\n {\n name: 'filePath',\n description: 'The file path to check (relative to workspace root)',\n required: true\n }\n ]\n },\n handler: {\n canExecute: () => true,\n execute: async (context) => {\n const filePath = context.params?.filePath;\n if (!filePath) {\n throw new Error('File path parameter required');\n }\n\n const workspaceResult = await getWorkspacePath();\n if (!workspaceResult) {\n return { indexed: false, reason: 'No workspace connected' };\n }\n\n const { workspacePath } = workspaceResult;\n const document = await documentIndexService.getDocumentByPath(workspacePath, filePath);\n\n if (document) {\n return {\n indexed: true,\n filePath: document.filePath,\n fileName: document.fileName,\n fileType: document.fileType,\n indexedAt: new Date(document.indexedAt).toISOString(),\n size: document.metadata.size\n };\n }\n\n return {\n indexed: false,\n filePath,\n reason: 'File not found in document index'\n };\n }\n }\n });\n}\n\nexport function integrateRAGWithAI() {\n try {\n registerRAGCommands();\n \n const promptBuilder = (aiService as any).promptBuilder;\n if (promptBuilder && typeof promptBuilder.addEnhancer === 'function') {\n promptBuilder.addEnhancer(ragPromptEnhancer);\n logger.info('RAG prompt enhancer and commands registered - AI will be instructed to use RAG before reading files');\n } else {\n logger.warn('AI service prompt builder not available yet, will retry');\n setTimeout(() => integrateRAGWithAI(), 1000);\n }\n } catch (error) {\n logger.warn(`Failed to integrate RAG with AI: ${error}`);\n }\n}\n\nrootContext.put('ragService', ragService);\n\n"],"names":[],"mappings":";;;AAcA,MAAM,SAAS,aAAa,gBAAgB;AAC5C,MAAM,kBAAkB,IAAI,mBAAmB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B,GAAI;AAAA,IAC/C;AAAA,EACJ,SAAS,OAAO;AACZ,WAAO,KAAK,oCAAoC,KAAK,EAAE;AAAA,EAC3D;AACJ;AAEA,YAAY,IAAI,cAAc,UAAU;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PromptEnhancer } from '@eclipse-lyra/extension-ai-system/api';
|
|
2
|
+
export declare const ragPromptEnhancer: PromptEnhancer;
|
|
3
|
+
export declare function createRAGToolExecutor(): (toolName: string, params: any) => Promise<any>;
|
|
4
|
+
export declare function registerRAGCommands(): void;
|
|
5
|
+
export declare function integrateRAGWithAI(): void;
|
|
6
|
+
//# sourceMappingURL=rag-integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rag-integration.d.ts","sourceRoot":"","sources":["../src/rag-integration.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,uCAAuC,CAAC;AAM5F,eAAO,MAAM,iBAAiB,EAAE,cAwB/B,CAAC;AAEF,wBAAgB,qBAAqB,KACnB,UAAU,MAAM,EAAE,QAAQ,GAAG,KAAG,OAAO,CAAC,GAAG,CAAC,CAiC7D;AAED,wBAAgB,mBAAmB,SAwHlC;AAED,wBAAgB,kBAAkB,SAejC"}
|