claude-conversation-memory-mcp 0.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/LICENSE +21 -0
- package/README.md +223 -0
- package/dist/ConversationMemory.d.ts +80 -0
- package/dist/ConversationMemory.d.ts.map +1 -0
- package/dist/ConversationMemory.js +203 -0
- package/dist/ConversationMemory.js.map +1 -0
- package/dist/documentation/CodeAnalyzer.d.ts +29 -0
- package/dist/documentation/CodeAnalyzer.d.ts.map +1 -0
- package/dist/documentation/CodeAnalyzer.js +122 -0
- package/dist/documentation/CodeAnalyzer.js.map +1 -0
- package/dist/documentation/ConversationAnalyzer.d.ts +19 -0
- package/dist/documentation/ConversationAnalyzer.d.ts.map +1 -0
- package/dist/documentation/ConversationAnalyzer.js +156 -0
- package/dist/documentation/ConversationAnalyzer.js.map +1 -0
- package/dist/documentation/CrossReferencer.d.ts +67 -0
- package/dist/documentation/CrossReferencer.d.ts.map +1 -0
- package/dist/documentation/CrossReferencer.js +247 -0
- package/dist/documentation/CrossReferencer.js.map +1 -0
- package/dist/documentation/DocumentationGenerator.d.ts +22 -0
- package/dist/documentation/DocumentationGenerator.d.ts.map +1 -0
- package/dist/documentation/DocumentationGenerator.js +57 -0
- package/dist/documentation/DocumentationGenerator.js.map +1 -0
- package/dist/documentation/MarkdownFormatter.d.ts +26 -0
- package/dist/documentation/MarkdownFormatter.d.ts.map +1 -0
- package/dist/documentation/MarkdownFormatter.js +301 -0
- package/dist/documentation/MarkdownFormatter.js.map +1 -0
- package/dist/documentation/types.d.ts +176 -0
- package/dist/documentation/types.d.ts.map +1 -0
- package/dist/documentation/types.js +5 -0
- package/dist/documentation/types.js.map +1 -0
- package/dist/embeddings/EmbeddingConfig.d.ts +39 -0
- package/dist/embeddings/EmbeddingConfig.d.ts.map +1 -0
- package/dist/embeddings/EmbeddingConfig.js +132 -0
- package/dist/embeddings/EmbeddingConfig.js.map +1 -0
- package/dist/embeddings/EmbeddingGenerator.d.ts +45 -0
- package/dist/embeddings/EmbeddingGenerator.d.ts.map +1 -0
- package/dist/embeddings/EmbeddingGenerator.js +129 -0
- package/dist/embeddings/EmbeddingGenerator.js.map +1 -0
- package/dist/embeddings/EmbeddingProvider.d.ts +34 -0
- package/dist/embeddings/EmbeddingProvider.d.ts.map +1 -0
- package/dist/embeddings/EmbeddingProvider.js +6 -0
- package/dist/embeddings/EmbeddingProvider.js.map +1 -0
- package/dist/embeddings/VectorStore.d.ts +75 -0
- package/dist/embeddings/VectorStore.d.ts.map +1 -0
- package/dist/embeddings/VectorStore.js +220 -0
- package/dist/embeddings/VectorStore.js.map +1 -0
- package/dist/embeddings/providers/OllamaEmbeddings.d.ts +38 -0
- package/dist/embeddings/providers/OllamaEmbeddings.d.ts.map +1 -0
- package/dist/embeddings/providers/OllamaEmbeddings.js +132 -0
- package/dist/embeddings/providers/OllamaEmbeddings.js.map +1 -0
- package/dist/embeddings/providers/OpenAIEmbeddings.d.ts +40 -0
- package/dist/embeddings/providers/OpenAIEmbeddings.d.ts.map +1 -0
- package/dist/embeddings/providers/OpenAIEmbeddings.js +128 -0
- package/dist/embeddings/providers/OpenAIEmbeddings.js.map +1 -0
- package/dist/embeddings/providers/TransformersEmbeddings.d.ts +38 -0
- package/dist/embeddings/providers/TransformersEmbeddings.d.ts.map +1 -0
- package/dist/embeddings/providers/TransformersEmbeddings.js +114 -0
- package/dist/embeddings/providers/TransformersEmbeddings.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +127 -0
- package/dist/index.js.map +1 -0
- package/dist/parsers/ConversationParser.d.ts +138 -0
- package/dist/parsers/ConversationParser.d.ts.map +1 -0
- package/dist/parsers/ConversationParser.js +325 -0
- package/dist/parsers/ConversationParser.js.map +1 -0
- package/dist/parsers/DecisionExtractor.d.ts +76 -0
- package/dist/parsers/DecisionExtractor.d.ts.map +1 -0
- package/dist/parsers/DecisionExtractor.js +305 -0
- package/dist/parsers/DecisionExtractor.js.map +1 -0
- package/dist/parsers/GitIntegrator.d.ts +71 -0
- package/dist/parsers/GitIntegrator.d.ts.map +1 -0
- package/dist/parsers/GitIntegrator.js +283 -0
- package/dist/parsers/GitIntegrator.js.map +1 -0
- package/dist/parsers/MistakeExtractor.d.ts +86 -0
- package/dist/parsers/MistakeExtractor.d.ts.map +1 -0
- package/dist/parsers/MistakeExtractor.js +341 -0
- package/dist/parsers/MistakeExtractor.js.map +1 -0
- package/dist/parsers/RequirementsExtractor.d.ts +70 -0
- package/dist/parsers/RequirementsExtractor.d.ts.map +1 -0
- package/dist/parsers/RequirementsExtractor.js +252 -0
- package/dist/parsers/RequirementsExtractor.js.map +1 -0
- package/dist/search/SemanticSearch.d.ts +90 -0
- package/dist/search/SemanticSearch.d.ts.map +1 -0
- package/dist/search/SemanticSearch.js +352 -0
- package/dist/search/SemanticSearch.js.map +1 -0
- package/dist/storage/ConversationStorage.d.ts +53 -0
- package/dist/storage/ConversationStorage.d.ts.map +1 -0
- package/dist/storage/ConversationStorage.js +249 -0
- package/dist/storage/ConversationStorage.js.map +1 -0
- package/dist/storage/SQLiteManager.d.ts +88 -0
- package/dist/storage/SQLiteManager.d.ts.map +1 -0
- package/dist/storage/SQLiteManager.js +281 -0
- package/dist/storage/SQLiteManager.js.map +1 -0
- package/dist/storage/migrations.d.ts +54 -0
- package/dist/storage/migrations.d.ts.map +1 -0
- package/dist/storage/migrations.js +153 -0
- package/dist/storage/migrations.js.map +1 -0
- package/dist/storage/schema.sql +321 -0
- package/dist/tools/ToolDefinitions.d.ts +265 -0
- package/dist/tools/ToolDefinitions.d.ts.map +1 -0
- package/dist/tools/ToolDefinitions.js +261 -0
- package/dist/tools/ToolDefinitions.js.map +1 -0
- package/dist/tools/ToolHandlers.d.ts +56 -0
- package/dist/tools/ToolHandlers.d.ts.map +1 -0
- package/dist/tools/ToolHandlers.js +431 -0
- package/dist/tools/ToolHandlers.js.map +1 -0
- package/dist/types/ToolTypes.d.ts +333 -0
- package/dist/types/ToolTypes.d.ts.map +1 -0
- package/dist/types/ToolTypes.js +6 -0
- package/dist/types/ToolTypes.js.map +1 -0
- package/dist/utils/sanitization.d.ts +35 -0
- package/dist/utils/sanitization.d.ts.map +1 -0
- package/dist/utils/sanitization.js +97 -0
- package/dist/utils/sanitization.js.map +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DocumentationGenerator - Main orchestrator for comprehensive documentation
|
|
3
|
+
*/
|
|
4
|
+
import { type CodeGraphRagData } from './CodeAnalyzer.js';
|
|
5
|
+
import type { SQLiteManager } from '../storage/SQLiteManager.js';
|
|
6
|
+
import type { DocumentationOptions } from './types.js';
|
|
7
|
+
export declare class DocumentationGenerator {
|
|
8
|
+
private codeAnalyzer;
|
|
9
|
+
private conversationAnalyzer;
|
|
10
|
+
private crossReferencer;
|
|
11
|
+
private formatter;
|
|
12
|
+
constructor(db: SQLiteManager);
|
|
13
|
+
/**
|
|
14
|
+
* Generate comprehensive documentation
|
|
15
|
+
*
|
|
16
|
+
* @param options - Documentation options
|
|
17
|
+
* @param codeGraphData - Data from CODE-GRAPH-RAG-MCP (must be fetched externally)
|
|
18
|
+
* @returns Markdown documentation
|
|
19
|
+
*/
|
|
20
|
+
generate(options: DocumentationOptions, codeGraphData: CodeGraphRagData): Promise<string>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=DocumentationGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentationGenerator.d.ts","sourceRoot":"","sources":["../../src/documentation/DocumentationGenerator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAIxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,qBAAa,sBAAsB;IACjC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,SAAS,CAAoB;gBAEzB,EAAE,EAAE,aAAa;IAO7B;;;;;;OAMG;IACG,QAAQ,CAAC,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;CAuChG"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DocumentationGenerator - Main orchestrator for comprehensive documentation
|
|
3
|
+
*/
|
|
4
|
+
import { CodeAnalyzer } from './CodeAnalyzer.js';
|
|
5
|
+
import { ConversationAnalyzer } from './ConversationAnalyzer.js';
|
|
6
|
+
import { CrossReferencer } from './CrossReferencer.js';
|
|
7
|
+
import { MarkdownFormatter } from './MarkdownFormatter.js';
|
|
8
|
+
export class DocumentationGenerator {
|
|
9
|
+
codeAnalyzer;
|
|
10
|
+
conversationAnalyzer;
|
|
11
|
+
crossReferencer;
|
|
12
|
+
formatter;
|
|
13
|
+
constructor(db) {
|
|
14
|
+
this.codeAnalyzer = new CodeAnalyzer();
|
|
15
|
+
this.conversationAnalyzer = new ConversationAnalyzer(db);
|
|
16
|
+
this.crossReferencer = new CrossReferencer();
|
|
17
|
+
this.formatter = new MarkdownFormatter();
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Generate comprehensive documentation
|
|
21
|
+
*
|
|
22
|
+
* @param options - Documentation options
|
|
23
|
+
* @param codeGraphData - Data from CODE-GRAPH-RAG-MCP (must be fetched externally)
|
|
24
|
+
* @returns Markdown documentation
|
|
25
|
+
*/
|
|
26
|
+
async generate(options, codeGraphData) {
|
|
27
|
+
console.log('\n📚 Generating Comprehensive Documentation');
|
|
28
|
+
console.log(`Project: ${options.projectPath}`);
|
|
29
|
+
console.log(`Scope: ${options.scope}`);
|
|
30
|
+
if (options.sessionId) {
|
|
31
|
+
console.log(`Session: ${options.sessionId}`);
|
|
32
|
+
}
|
|
33
|
+
if (options.moduleFilter) {
|
|
34
|
+
console.log(`Filter: ${options.moduleFilter}`);
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
// Step 1: Analyze code structure
|
|
38
|
+
const codeData = await this.codeAnalyzer.analyze(codeGraphData);
|
|
39
|
+
// Step 2: Analyze conversation history
|
|
40
|
+
const conversationData = await this.conversationAnalyzer.analyze(options.projectPath, options.sessionId);
|
|
41
|
+
// Step 3: Cross-reference code and conversations
|
|
42
|
+
const linkedData = await this.crossReferencer.link(codeData, conversationData);
|
|
43
|
+
// Step 4: Format as markdown
|
|
44
|
+
const documentation = this.formatter.format(linkedData, options);
|
|
45
|
+
console.log('✅ Documentation generated successfully');
|
|
46
|
+
console.log(` Modules: ${linkedData.modules.length}`);
|
|
47
|
+
console.log(` Decisions: ${linkedData.statistics.totalDecisions}`);
|
|
48
|
+
console.log(` Mistakes: ${linkedData.statistics.totalMistakes}`);
|
|
49
|
+
return documentation;
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
console.error('❌ Error generating documentation:', error);
|
|
53
|
+
throw error;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=DocumentationGenerator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentationGenerator.js","sourceRoot":"","sources":["../../src/documentation/DocumentationGenerator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAyB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAI3D,MAAM,OAAO,sBAAsB;IACzB,YAAY,CAAe;IAC3B,oBAAoB,CAAuB;IAC3C,eAAe,CAAk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AC,SAAS,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;YAEjE,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;YACtD,OAAO,CAAC,GAAG,CAAC,eAAe,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;YACxD,OAAO,CAAC,GAAG,CAAC,iBAAiB,UAAU,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,CAAC;YACrE,OAAO,CAAC,GAAG,CAAC,gBAAgB,UAAU,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC,CAAC;YAEnE,OAAO,aAAa,CAAC;QAEvB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,mCAAmC,EAAE,KAAK,CAAC,CAAC;YAC1D,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MarkdownFormatter - Generates comprehensive markdown documentation
|
|
3
|
+
*/
|
|
4
|
+
import type { LinkedData, DocumentationOptions } from './types.js';
|
|
5
|
+
export declare class MarkdownFormatter {
|
|
6
|
+
/**
|
|
7
|
+
* Format linked data as markdown
|
|
8
|
+
*/
|
|
9
|
+
format(data: LinkedData, options: DocumentationOptions): string;
|
|
10
|
+
private renderHeader;
|
|
11
|
+
private renderStatistics;
|
|
12
|
+
private renderArchitecture;
|
|
13
|
+
private renderModule;
|
|
14
|
+
private renderModuleDecisions;
|
|
15
|
+
private renderModuleMistakes;
|
|
16
|
+
private renderModuleRequirements;
|
|
17
|
+
private renderModuleEntities;
|
|
18
|
+
private renderDecisions;
|
|
19
|
+
private renderQuality;
|
|
20
|
+
private renderTimeline;
|
|
21
|
+
private renderTimelineEvent;
|
|
22
|
+
private renderFooter;
|
|
23
|
+
private formatDate;
|
|
24
|
+
private formatMonth;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=MarkdownFormatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownFormatter.d.ts","sourceRoot":"","sources":["../../src/documentation/MarkdownFormatter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,UAAU,EAGV,oBAAoB,EAOrB,MAAM,YAAY,CAAC;AAEpB,qBAAa,iBAAiB;IAC5B;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,oBAAoB,GAAG,MAAM;IA6B/D,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,gBAAgB;IAmBxB,OAAO,CAAC,kBAAkB;IAyB1B,OAAO,CAAC,YAAY;IAyBpB,OAAO,CAAC,qBAAqB;IAe7B,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,wBAAwB;IAWhC,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,eAAe;IAsCvB,OAAO,CAAC,aAAa;IA8CrB,OAAO,CAAC,cAAc;IAgCtB,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,YAAY;IAgBpB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,WAAW;CAMpB"}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MarkdownFormatter - Generates comprehensive markdown documentation
|
|
3
|
+
*/
|
|
4
|
+
export class MarkdownFormatter {
|
|
5
|
+
/**
|
|
6
|
+
* Format linked data as markdown
|
|
7
|
+
*/
|
|
8
|
+
format(data, options) {
|
|
9
|
+
let doc = '';
|
|
10
|
+
doc += this.renderHeader(data, options);
|
|
11
|
+
doc += this.renderStatistics(data);
|
|
12
|
+
const { scope, moduleFilter } = options;
|
|
13
|
+
if (scope === 'full' || scope === 'architecture') {
|
|
14
|
+
doc += this.renderArchitecture(data.modules, moduleFilter);
|
|
15
|
+
}
|
|
16
|
+
if (scope === 'full' || scope === 'decisions') {
|
|
17
|
+
doc += this.renderDecisions(data);
|
|
18
|
+
}
|
|
19
|
+
if (scope === 'full' || scope === 'quality') {
|
|
20
|
+
doc += this.renderQuality(data.qualityReport);
|
|
21
|
+
}
|
|
22
|
+
if (scope === 'full') {
|
|
23
|
+
doc += this.renderTimeline(data.timeline);
|
|
24
|
+
}
|
|
25
|
+
doc += this.renderFooter();
|
|
26
|
+
return doc;
|
|
27
|
+
}
|
|
28
|
+
renderHeader(data, options) {
|
|
29
|
+
const projectName = options.projectPath.split('/').pop() || 'Project';
|
|
30
|
+
const sessionInfo = options.sessionId ? ` (Session: ${options.sessionId.substring(0, 8)}...)` : ' (All Sessions)';
|
|
31
|
+
return `# ${projectName} - Comprehensive Documentation
|
|
32
|
+
|
|
33
|
+
**Generated**: ${new Date().toLocaleString()}
|
|
34
|
+
**Scope**: ${options.scope}${sessionInfo}
|
|
35
|
+
**Modules**: ${data.modules.length}
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
`;
|
|
40
|
+
}
|
|
41
|
+
renderStatistics(data) {
|
|
42
|
+
const stats = data.statistics;
|
|
43
|
+
return `## 📊 Project Statistics
|
|
44
|
+
|
|
45
|
+
| Metric | Count |
|
|
46
|
+
|--------|-------|
|
|
47
|
+
| Files | ${stats.totalFiles} |
|
|
48
|
+
| Code Entities | ${stats.totalEntities} |
|
|
49
|
+
| Decisions | ${stats.totalDecisions} |
|
|
50
|
+
| Mistakes | ${stats.totalMistakes} |
|
|
51
|
+
| Git Commits | ${stats.totalCommits} |
|
|
52
|
+
| Avg Complexity | ${stats.averageComplexity}/10 |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
`;
|
|
57
|
+
}
|
|
58
|
+
renderArchitecture(modules, moduleFilter) {
|
|
59
|
+
let filtered = modules;
|
|
60
|
+
if (moduleFilter) {
|
|
61
|
+
filtered = modules.filter(m => m.path.includes(moduleFilter));
|
|
62
|
+
}
|
|
63
|
+
if (filtered.length === 0) {
|
|
64
|
+
return `## 🏗️ Architecture Overview
|
|
65
|
+
|
|
66
|
+
No modules found${moduleFilter ? ` matching filter: ${moduleFilter}` : ''}.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
`;
|
|
71
|
+
}
|
|
72
|
+
return `## 🏗️ Architecture Overview
|
|
73
|
+
|
|
74
|
+
${filtered.map(m => this.renderModule(m)).join('\n')}
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
`;
|
|
79
|
+
}
|
|
80
|
+
renderModule(module) {
|
|
81
|
+
const hasDecisions = module.decisions.length > 0;
|
|
82
|
+
const hasMistakes = module.mistakes.length > 0;
|
|
83
|
+
const hasRequirements = module.requirements.length > 0;
|
|
84
|
+
return `### ${module.name}
|
|
85
|
+
|
|
86
|
+
**Location**: \`${module.path}\`
|
|
87
|
+
**Complexity**: ${module.complexity}/10
|
|
88
|
+
**Changes**: ${module.changeFrequency} edits
|
|
89
|
+
**Entities**: ${module.entities.length}
|
|
90
|
+
|
|
91
|
+
${module.description ? `**Purpose**: ${module.description}\n` : ''}
|
|
92
|
+
|
|
93
|
+
${hasDecisions ? this.renderModuleDecisions(module.decisions) : ''}
|
|
94
|
+
|
|
95
|
+
${hasMistakes ? this.renderModuleMistakes(module.mistakes) : ''}
|
|
96
|
+
|
|
97
|
+
${hasRequirements ? this.renderModuleRequirements(module.requirements) : ''}
|
|
98
|
+
|
|
99
|
+
${this.renderModuleEntities(module.entities)}
|
|
100
|
+
|
|
101
|
+
`;
|
|
102
|
+
}
|
|
103
|
+
renderModuleDecisions(decisions) {
|
|
104
|
+
if (decisions.length === 0) {
|
|
105
|
+
return '';
|
|
106
|
+
}
|
|
107
|
+
const recent = decisions.slice(0, 5); // Show top 5 decisions
|
|
108
|
+
return `**Key Decisions** (${decisions.length} total):
|
|
109
|
+
${recent.map(d => `- ${d.decision_text} (${this.formatDate(d.timestamp)})
|
|
110
|
+
- *Rationale*: ${d.rationale || 'Not specified'}${d.alternatives_considered.length > 0 ? `
|
|
111
|
+
- *Alternatives*: ${d.alternatives_considered.join(', ')}` : ''}`).join('\n')}
|
|
112
|
+
|
|
113
|
+
`;
|
|
114
|
+
}
|
|
115
|
+
renderModuleMistakes(mistakes) {
|
|
116
|
+
if (mistakes.length === 0) {
|
|
117
|
+
return '';
|
|
118
|
+
}
|
|
119
|
+
return `**Past Issues** (${mistakes.length} total):
|
|
120
|
+
${mistakes.map(m => `- ⚠️ ${m.what_went_wrong} (${this.formatDate(m.timestamp)})
|
|
121
|
+
- *Fix*: ${m.how_it_was_fixed || 'Not documented'}
|
|
122
|
+
- *Lesson*: ${m.lesson_learned || 'Not documented'}`).join('\n')}
|
|
123
|
+
|
|
124
|
+
`;
|
|
125
|
+
}
|
|
126
|
+
renderModuleRequirements(requirements) {
|
|
127
|
+
if (requirements.length === 0) {
|
|
128
|
+
return '';
|
|
129
|
+
}
|
|
130
|
+
return `**Requirements**:
|
|
131
|
+
${requirements.map(r => `- ${r.requirement_type}: ${r.description}`).join('\n')}
|
|
132
|
+
|
|
133
|
+
`;
|
|
134
|
+
}
|
|
135
|
+
renderModuleEntities(entities) {
|
|
136
|
+
if (entities.length === 0) {
|
|
137
|
+
return '';
|
|
138
|
+
}
|
|
139
|
+
const byType = {};
|
|
140
|
+
for (const entity of entities) {
|
|
141
|
+
byType[entity.type] = (byType[entity.type] || 0) + 1;
|
|
142
|
+
}
|
|
143
|
+
const summary = Object.entries(byType)
|
|
144
|
+
.map(([type, count]) => `${count} ${type}${count > 1 ? 's' : ''}`)
|
|
145
|
+
.join(', ');
|
|
146
|
+
return `**Code Structure**: ${summary}
|
|
147
|
+
|
|
148
|
+
`;
|
|
149
|
+
}
|
|
150
|
+
renderDecisions(data) {
|
|
151
|
+
const allDecisions = data.modules
|
|
152
|
+
.flatMap(m => m.decisions)
|
|
153
|
+
.sort((a, b) => b.timestamp - a.timestamp);
|
|
154
|
+
if (allDecisions.length === 0) {
|
|
155
|
+
return `## 💡 Decision Log
|
|
156
|
+
|
|
157
|
+
No decisions documented.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
`;
|
|
162
|
+
}
|
|
163
|
+
return `## 💡 Decision Log
|
|
164
|
+
|
|
165
|
+
${allDecisions.map((d, i) => `### ${i + 1}. ${d.decision_text}
|
|
166
|
+
|
|
167
|
+
**Date**: ${this.formatDate(d.timestamp)}
|
|
168
|
+
**Context**: ${d.context || 'Not specified'}
|
|
169
|
+
|
|
170
|
+
**Rationale**: ${d.rationale}
|
|
171
|
+
|
|
172
|
+
${d.alternatives_considered.length > 0 ? `**Alternatives Considered**:
|
|
173
|
+
${d.alternatives_considered.map(alt => `- ${alt}${d.rejected_reasons[alt] ? `: ${d.rejected_reasons[alt]}` : ''}`).join('\n')}
|
|
174
|
+
` : ''}
|
|
175
|
+
|
|
176
|
+
**Affected Files**: ${d.related_files.length > 0 ? d.related_files.map(f => `\`${f}\``).join(', ') : 'None specified'}
|
|
177
|
+
|
|
178
|
+
${d.related_commits.length > 0 ? `**Related Commits**: ${d.related_commits.join(', ')}\n` : ''}
|
|
179
|
+
`).join('\n---\n\n')}
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
`;
|
|
184
|
+
}
|
|
185
|
+
renderQuality(report) {
|
|
186
|
+
return `## 🔍 Quality Insights
|
|
187
|
+
|
|
188
|
+
### Code Hotspots
|
|
189
|
+
|
|
190
|
+
${report.hotspots.length > 0 ? report.hotspots.map((h) => `
|
|
191
|
+
**\`${h.filePath}\`**
|
|
192
|
+
Complexity: ${h.complexity}/10 | Changes: ${h.changeCount}
|
|
193
|
+
|
|
194
|
+
${h.relatedMistakes.length > 0 ? `Past Issues:
|
|
195
|
+
${h.relatedMistakes.map((m) => `- ${m.what_went_wrong}`).join('\n')}
|
|
196
|
+
` : ''}
|
|
197
|
+
${h.relatedDecisions.length > 0 ? `Related Decisions:
|
|
198
|
+
${h.relatedDecisions.map((d) => `- ${d.decision_text}`).join('\n')}
|
|
199
|
+
` : ''}
|
|
200
|
+
`).join('\n') : 'No hotspots identified.\n'}
|
|
201
|
+
|
|
202
|
+
### Code Duplication
|
|
203
|
+
|
|
204
|
+
${report.clones.length > 0 ? report.clones.map(c => `
|
|
205
|
+
- **Similarity**: ${Math.round(c.similarity * 100)}%
|
|
206
|
+
- Files: ${c.files.map((f) => `\`${f}\``).join(', ')}
|
|
207
|
+
- ${c.description}
|
|
208
|
+
`).join('\n') : 'No code duplication detected.\n'}
|
|
209
|
+
|
|
210
|
+
### Lessons Learned
|
|
211
|
+
|
|
212
|
+
${report.mistakeSummary.topLessons.length > 0 ? report.mistakeSummary.topLessons.map((lesson) => `- ${lesson}`).join('\n') : 'No lessons documented yet.\n'}
|
|
213
|
+
|
|
214
|
+
### Mistake Summary
|
|
215
|
+
|
|
216
|
+
**Total**: ${report.mistakeSummary.total} mistakes documented
|
|
217
|
+
|
|
218
|
+
${Object.keys(report.mistakeSummary.byCategory).length > 0 ? `**By Severity**:
|
|
219
|
+
${Object.entries(report.mistakeSummary.byCategory).map(([cat, count]) => `- ${cat}: ${count}`).join('\n')}
|
|
220
|
+
` : ''}
|
|
221
|
+
|
|
222
|
+
${report.mistakeSummary.criticalIssues.length > 0 ? `**Critical Issues**:
|
|
223
|
+
${report.mistakeSummary.criticalIssues.map((m) => `- ${m.what_went_wrong}`).join('\n')}
|
|
224
|
+
` : ''}
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
`;
|
|
229
|
+
}
|
|
230
|
+
renderTimeline(timeline) {
|
|
231
|
+
if (timeline.length === 0) {
|
|
232
|
+
return `## 📅 Development Timeline
|
|
233
|
+
|
|
234
|
+
No timeline events found.
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
`;
|
|
239
|
+
}
|
|
240
|
+
// Group by month
|
|
241
|
+
const byMonth = {};
|
|
242
|
+
for (const event of timeline) {
|
|
243
|
+
const monthKey = this.formatMonth(event.timestamp);
|
|
244
|
+
if (!byMonth[monthKey]) {
|
|
245
|
+
byMonth[monthKey] = [];
|
|
246
|
+
}
|
|
247
|
+
byMonth[monthKey].push(event);
|
|
248
|
+
}
|
|
249
|
+
return `## 📅 Development Timeline
|
|
250
|
+
|
|
251
|
+
${Object.entries(byMonth).map(([month, events]) => `
|
|
252
|
+
### ${month}
|
|
253
|
+
|
|
254
|
+
${events.map(e => this.renderTimelineEvent(e)).join('\n')}
|
|
255
|
+
`).join('\n')}
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
`;
|
|
260
|
+
}
|
|
261
|
+
renderTimelineEvent(event) {
|
|
262
|
+
const icon = {
|
|
263
|
+
decision: '💡',
|
|
264
|
+
mistake: '⚠️',
|
|
265
|
+
commit: '📝',
|
|
266
|
+
edit: '✏️'
|
|
267
|
+
}[event.type] || '•';
|
|
268
|
+
const date = new Date(event.timestamp).toLocaleDateString();
|
|
269
|
+
const files = event.files.length > 0 ? ` (${event.files.length} files)` : '';
|
|
270
|
+
return `- **${date}** ${icon} ${event.description}${files}`;
|
|
271
|
+
}
|
|
272
|
+
renderFooter() {
|
|
273
|
+
return `## 📚 About This Documentation
|
|
274
|
+
|
|
275
|
+
This documentation was automatically generated by combining:
|
|
276
|
+
- **Codebase analysis** from CODE-GRAPH-RAG-MCP
|
|
277
|
+
- **Development conversations** from Claude Code conversation history
|
|
278
|
+
- **Git history** and commit linkage
|
|
279
|
+
|
|
280
|
+
The documentation shows not just **what** exists in the code, but **why** it was built that way.
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
*Generated by Claude Conversation Memory MCP Server*
|
|
285
|
+
`;
|
|
286
|
+
}
|
|
287
|
+
formatDate(timestamp) {
|
|
288
|
+
return new Date(timestamp).toLocaleDateString('en-US', {
|
|
289
|
+
year: 'numeric',
|
|
290
|
+
month: 'short',
|
|
291
|
+
day: 'numeric'
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
formatMonth(timestamp) {
|
|
295
|
+
return new Date(timestamp).toLocaleDateString('en-US', {
|
|
296
|
+
year: 'numeric',
|
|
297
|
+
month: 'long'
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
//# sourceMappingURL=MarkdownFormatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownFormatter.js","sourceRoot":"","sources":["../../src/documentation/MarkdownFormatter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAeH,MAAM,OAAO,iBAAiB;IAC5B;;OAEG;IACH,MAAM,CAAC,IAAgB,EAAE,OAA6B;QACpD,IAAI,GAAG,GAAG,EAAE,CAAC;QAEb,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACxC,GAAG,IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAEnC,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;QAExC,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,cAAc,EAAE,CAAC;YACjD,GAAG,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC7D,CAAC;QAED,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,WAAW,EAAE,CAAC;YAC9C,GAAG,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC;QAED,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YAC5C,GAAG,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAChD,CAAC;QAED,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;YACrB,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC5C,CAAC;QAED,GAAG,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;QAE3B,OAAO,GAAG,CAAC;IACb,CAAC;I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AI,CAAC,IAAI,CAAC;;;;CAIZ,CAAC;IACA,CAAC;IAEO,mBAAmB,CAAC,KAAoB;QAC9C,MAAM,IAAI,GAAG;YACX,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,IAAI;SACX,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;QAErB,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,kBAAkB,EAAE,CAAC;QAC5D,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC,MAAM,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;QAE7E,OAAO,OAAO,IAAI,MAAM,IAAI,IAAI,KAAK,CAAC,WAAW,GAAG,KAAK,EAAE,CAAC;IAC9D,CAAC;IAEO,YAAY;QAClB,OAAO;;;;;;;;;;;;CAYV,CAAC;IACA,CAAC;IAEO,UAAU,CAAC,SAAiB;QAClC,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,OAAO,EAAE;YACrD,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,OAAO;YACd,GAAG,EAAE,SAAS;SACf,CAAC,CAAC;IACL,CAAC;IAEO,WAAW,CAAC,SAAiB;QACnC,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,OAAO,EAAE;YACrD,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for documentation generation
|
|
3
|
+
*/
|
|
4
|
+
export interface CodeEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: 'class' | 'function' | 'interface' | 'module' | 'component';
|
|
8
|
+
filePath: string;
|
|
9
|
+
lineNumber?: number;
|
|
10
|
+
complexity?: number;
|
|
11
|
+
description?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface Relationship {
|
|
14
|
+
from: string;
|
|
15
|
+
to: string;
|
|
16
|
+
type: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface FileInfo {
|
|
20
|
+
path: string;
|
|
21
|
+
size: number;
|
|
22
|
+
entities: CodeEntity[];
|
|
23
|
+
}
|
|
24
|
+
export interface Hotspot {
|
|
25
|
+
filePath: string;
|
|
26
|
+
complexity: number;
|
|
27
|
+
changeCount: number;
|
|
28
|
+
metric: string;
|
|
29
|
+
}
|
|
30
|
+
export interface CodeClone {
|
|
31
|
+
files: string[];
|
|
32
|
+
similarity: number;
|
|
33
|
+
description: string;
|
|
34
|
+
}
|
|
35
|
+
export interface CodeData {
|
|
36
|
+
entities: CodeEntity[];
|
|
37
|
+
relationships: Relationship[];
|
|
38
|
+
files: FileInfo[];
|
|
39
|
+
hotspots: Hotspot[];
|
|
40
|
+
clones: CodeClone[];
|
|
41
|
+
}
|
|
42
|
+
export interface RawEntity {
|
|
43
|
+
id?: string;
|
|
44
|
+
name?: string;
|
|
45
|
+
type?: string;
|
|
46
|
+
filePath?: string;
|
|
47
|
+
file?: string;
|
|
48
|
+
lineNumber?: number;
|
|
49
|
+
line?: number;
|
|
50
|
+
complexity?: number;
|
|
51
|
+
description?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface RawHotspot {
|
|
54
|
+
filePath?: string;
|
|
55
|
+
file?: string;
|
|
56
|
+
path?: string;
|
|
57
|
+
complexity?: number;
|
|
58
|
+
score?: number;
|
|
59
|
+
changeCount?: number;
|
|
60
|
+
changes?: number;
|
|
61
|
+
metric?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface RawClone {
|
|
64
|
+
files?: string[];
|
|
65
|
+
similarity?: number;
|
|
66
|
+
score?: number;
|
|
67
|
+
description?: string;
|
|
68
|
+
}
|
|
69
|
+
export interface Decision {
|
|
70
|
+
id: string;
|
|
71
|
+
conversation_id: string;
|
|
72
|
+
message_id: string;
|
|
73
|
+
decision_text: string;
|
|
74
|
+
rationale: string;
|
|
75
|
+
alternatives_considered: string[];
|
|
76
|
+
rejected_reasons: Record<string, string>;
|
|
77
|
+
context?: string;
|
|
78
|
+
related_files: string[];
|
|
79
|
+
related_commits: string[];
|
|
80
|
+
timestamp: number;
|
|
81
|
+
}
|
|
82
|
+
export interface Mistake {
|
|
83
|
+
id: string;
|
|
84
|
+
conversation_id: string;
|
|
85
|
+
what_went_wrong: string;
|
|
86
|
+
why_it_happened: string;
|
|
87
|
+
how_it_was_fixed: string;
|
|
88
|
+
lesson_learned: string;
|
|
89
|
+
related_files: string[];
|
|
90
|
+
severity: string;
|
|
91
|
+
timestamp: number;
|
|
92
|
+
}
|
|
93
|
+
export interface Requirement {
|
|
94
|
+
id: string;
|
|
95
|
+
requirement_type: string;
|
|
96
|
+
description: string;
|
|
97
|
+
rationale?: string;
|
|
98
|
+
related_files: string[];
|
|
99
|
+
timestamp: number;
|
|
100
|
+
}
|
|
101
|
+
export interface FileEdit {
|
|
102
|
+
id: string;
|
|
103
|
+
conversation_id: string;
|
|
104
|
+
file_path: string;
|
|
105
|
+
edit_type: string;
|
|
106
|
+
timestamp: number;
|
|
107
|
+
}
|
|
108
|
+
export interface GitCommit {
|
|
109
|
+
hash: string;
|
|
110
|
+
conversation_id?: string;
|
|
111
|
+
message: string;
|
|
112
|
+
author: string;
|
|
113
|
+
timestamp: number;
|
|
114
|
+
files_changed: string[];
|
|
115
|
+
}
|
|
116
|
+
export interface ConversationData {
|
|
117
|
+
decisions: Decision[];
|
|
118
|
+
mistakes: Mistake[];
|
|
119
|
+
requirements: Requirement[];
|
|
120
|
+
fileEdits: FileEdit[];
|
|
121
|
+
commits: GitCommit[];
|
|
122
|
+
}
|
|
123
|
+
export interface LinkedModule {
|
|
124
|
+
path: string;
|
|
125
|
+
name: string;
|
|
126
|
+
entities: CodeEntity[];
|
|
127
|
+
decisions: Decision[];
|
|
128
|
+
mistakes: Mistake[];
|
|
129
|
+
requirements: Requirement[];
|
|
130
|
+
complexity: number;
|
|
131
|
+
changeFrequency: number;
|
|
132
|
+
description?: string;
|
|
133
|
+
}
|
|
134
|
+
export interface TimelineEvent {
|
|
135
|
+
timestamp: number;
|
|
136
|
+
type: 'decision' | 'mistake' | 'commit' | 'edit';
|
|
137
|
+
description: string;
|
|
138
|
+
files: string[];
|
|
139
|
+
details: unknown;
|
|
140
|
+
}
|
|
141
|
+
export interface QualityReport {
|
|
142
|
+
hotspots: HotspotWithContext[];
|
|
143
|
+
clones: CodeClone[];
|
|
144
|
+
mistakeSummary: MistakeSummary;
|
|
145
|
+
}
|
|
146
|
+
export interface HotspotWithContext extends Hotspot {
|
|
147
|
+
relatedMistakes: Mistake[];
|
|
148
|
+
relatedDecisions: Decision[];
|
|
149
|
+
}
|
|
150
|
+
export interface MistakeSummary {
|
|
151
|
+
total: number;
|
|
152
|
+
byCategory: Record<string, number>;
|
|
153
|
+
topLessons: string[];
|
|
154
|
+
criticalIssues: Mistake[];
|
|
155
|
+
}
|
|
156
|
+
export interface LinkedData {
|
|
157
|
+
modules: LinkedModule[];
|
|
158
|
+
timeline: TimelineEvent[];
|
|
159
|
+
qualityReport: QualityReport;
|
|
160
|
+
statistics: DocumentationStatistics;
|
|
161
|
+
}
|
|
162
|
+
export interface DocumentationStatistics {
|
|
163
|
+
totalFiles: number;
|
|
164
|
+
totalEntities: number;
|
|
165
|
+
totalDecisions: number;
|
|
166
|
+
totalMistakes: number;
|
|
167
|
+
totalCommits: number;
|
|
168
|
+
averageComplexity: number;
|
|
169
|
+
}
|
|
170
|
+
export interface DocumentationOptions {
|
|
171
|
+
projectPath: string;
|
|
172
|
+
sessionId?: string;
|
|
173
|
+
scope: 'full' | 'architecture' | 'decisions' | 'quality';
|
|
174
|
+
moduleFilter?: string;
|
|
175
|
+
}
|
|
176
|
+
//# sourceMappingUR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MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAID,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,WAAW,GAAG,SAAS,CAAC;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/documentation/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Embedding Configuration Management
|
|
3
|
+
* Loads config from file and environment variables (env vars take precedence)
|
|
4
|
+
*/
|
|
5
|
+
export type EmbeddingProviderType = "ollama" | "transformers" | "openai";
|
|
6
|
+
export interface EmbeddingConfig {
|
|
7
|
+
provider: EmbeddingProviderType;
|
|
8
|
+
model: string;
|
|
9
|
+
dimensions?: number;
|
|
10
|
+
baseUrl?: string;
|
|
11
|
+
apiKey?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class ConfigLoader {
|
|
14
|
+
private static readonly CONFIG_FILENAME;
|
|
15
|
+
/**
|
|
16
|
+
* Load configuration with precedence: env vars > project config > home config > defaults
|
|
17
|
+
*/
|
|
18
|
+
static load(): EmbeddingConfig;
|
|
19
|
+
/**
|
|
20
|
+
* Load and parse config file
|
|
21
|
+
*/
|
|
22
|
+
private static loadConfigFile;
|
|
23
|
+
/**
|
|
24
|
+
* Apply provider-specific defaults
|
|
25
|
+
*/
|
|
26
|
+
private static applyProviderDefaults;
|
|
27
|
+
/**
|
|
28
|
+
* Validate configuration
|
|
29
|
+
*/
|
|
30
|
+
static validate(config: EmbeddingConfig): {
|
|
31
|
+
valid: boolean;
|
|
32
|
+
errors: string[];
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Get example config for documentation
|
|
36
|
+
*/
|
|
37
|
+
static getExampleConfig(): string;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=EmbeddingConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmbeddingConfig.d.ts","sourceRoot":"","sources":["../../src/embeddings/EmbeddingConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,cAAc,GAAG,QAAQ,CAAC;AAEzE,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAgC;IAEvE;;OAEG;IACH,MAAM,CAAC,IAAI,IAAI,eAAe;IAqD9B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAU7B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,qBAAqB;IA6BpC;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE;IA2B9E;;OAEG;IACH,MAAM,CAAC,gBAAgB,IAAI,MAAM;CAalC"}
|