codebase-context 1.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/LICENSE +21 -0
- package/README.md +74 -0
- package/dist/analyzers/angular/index.d.ts +44 -0
- package/dist/analyzers/angular/index.d.ts.map +1 -0
- package/dist/analyzers/angular/index.js +922 -0
- package/dist/analyzers/angular/index.js.map +1 -0
- package/dist/analyzers/generic/index.d.ts +23 -0
- package/dist/analyzers/generic/index.d.ts.map +1 -0
- package/dist/analyzers/generic/index.js +354 -0
- package/dist/analyzers/generic/index.js.map +1 -0
- package/dist/core/analyzer-registry.d.ts +36 -0
- package/dist/core/analyzer-registry.d.ts.map +1 -0
- package/dist/core/analyzer-registry.js +78 -0
- package/dist/core/analyzer-registry.js.map +1 -0
- package/dist/core/file-watcher.d.ts +63 -0
- package/dist/core/file-watcher.d.ts.map +1 -0
- package/dist/core/file-watcher.js +210 -0
- package/dist/core/file-watcher.js.map +1 -0
- package/dist/core/indexer.d.ts +29 -0
- package/dist/core/indexer.d.ts.map +1 -0
- package/dist/core/indexer.js +507 -0
- package/dist/core/indexer.js.map +1 -0
- package/dist/core/search.d.ts +31 -0
- package/dist/core/search.d.ts.map +1 -0
- package/dist/core/search.js +307 -0
- package/dist/core/search.js.map +1 -0
- package/dist/embeddings/index.d.ts +5 -0
- package/dist/embeddings/index.d.ts.map +1 -0
- package/dist/embeddings/index.js +33 -0
- package/dist/embeddings/index.js.map +1 -0
- package/dist/embeddings/openai.d.ts +19 -0
- package/dist/embeddings/openai.d.ts.map +1 -0
- package/dist/embeddings/openai.js +59 -0
- package/dist/embeddings/openai.js.map +1 -0
- package/dist/embeddings/transformers.d.ts +17 -0
- package/dist/embeddings/transformers.d.ts.map +1 -0
- package/dist/embeddings/transformers.js +83 -0
- package/dist/embeddings/transformers.js.map +1 -0
- package/dist/embeddings/types.d.ts +20 -0
- package/dist/embeddings/types.d.ts.map +1 -0
- package/dist/embeddings/types.js +9 -0
- package/dist/embeddings/types.js.map +1 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +790 -0
- package/dist/index.js.map +1 -0
- package/dist/lib.d.ts +58 -0
- package/dist/lib.d.ts.map +1 -0
- package/dist/lib.js +81 -0
- package/dist/lib.js.map +1 -0
- package/dist/storage/index.d.ts +12 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +18 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/lancedb.d.ts +24 -0
- package/dist/storage/lancedb.d.ts.map +1 -0
- package/dist/storage/lancedb.js +197 -0
- package/dist/storage/lancedb.js.map +1 -0
- package/dist/storage/types.d.ts +45 -0
- package/dist/storage/types.d.ts.map +1 -0
- package/dist/storage/types.js +8 -0
- package/dist/storage/types.js.map +1 -0
- package/dist/types/index.d.ts +367 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +6 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/chunking.d.ts +23 -0
- package/dist/utils/chunking.d.ts.map +1 -0
- package/dist/utils/chunking.js +226 -0
- package/dist/utils/chunking.js.map +1 -0
- package/dist/utils/language-detection.d.ts +29 -0
- package/dist/utils/language-detection.d.ts.map +1 -0
- package/dist/utils/language-detection.js +127 -0
- package/dist/utils/language-detection.js.map +1 -0
- package/dist/utils/pattern-detector.d.ts +41 -0
- package/dist/utils/pattern-detector.d.ts.map +1 -0
- package/dist/utils/pattern-detector.js +101 -0
- package/dist/utils/pattern-detector.js.map +1 -0
- package/dist/utils/usage-tracker.d.ts +120 -0
- package/dist/utils/usage-tracker.d.ts.map +1 -0
- package/dist/utils/usage-tracker.js +336 -0
- package/dist/utils/usage-tracker.js.map +1 -0
- package/package.json +98 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Library Usage Tracker & Pattern Detector
|
|
3
|
+
* Tracks what libraries are used and detects common coding patterns
|
|
4
|
+
*/
|
|
5
|
+
export class ImportGraph {
|
|
6
|
+
// Map: importSource -> files that import it
|
|
7
|
+
usages = new Map();
|
|
8
|
+
// Map: file -> what it exports (simplified: just the file path for now)
|
|
9
|
+
exports = new Map();
|
|
10
|
+
trackImport(importSource, importingFile, line = 1) {
|
|
11
|
+
// Normalize
|
|
12
|
+
const normalized = this.normalizeSource(importSource);
|
|
13
|
+
if (!normalized)
|
|
14
|
+
return;
|
|
15
|
+
const existing = this.usages.get(normalized) || [];
|
|
16
|
+
const relPath = this.toRelativePath(importingFile);
|
|
17
|
+
// Avoid duplicates
|
|
18
|
+
if (!existing.some(u => u.file === relPath && u.line === line)) {
|
|
19
|
+
existing.push({ file: relPath, line });
|
|
20
|
+
this.usages.set(normalized, existing);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
trackExport(filePath, exportName) {
|
|
24
|
+
const relPath = this.toRelativePath(filePath);
|
|
25
|
+
const existing = this.exports.get(relPath) || [];
|
|
26
|
+
if (!existing.includes(exportName)) {
|
|
27
|
+
existing.push(exportName);
|
|
28
|
+
this.exports.set(relPath, existing);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
normalizeSource(source) {
|
|
32
|
+
// Keep all imports except relative paths (we track those separately)
|
|
33
|
+
if (source.startsWith('.'))
|
|
34
|
+
return null;
|
|
35
|
+
return source;
|
|
36
|
+
}
|
|
37
|
+
toRelativePath(fullPath) {
|
|
38
|
+
// Take last 4 path segments for readability
|
|
39
|
+
const parts = fullPath.replace(/\\/g, '/').split('/');
|
|
40
|
+
return parts.slice(-4).join('/');
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Find all files that import a given source
|
|
44
|
+
* This is "Find Usages" - the key value
|
|
45
|
+
*/
|
|
46
|
+
getUsages(importSource) {
|
|
47
|
+
const normalized = this.normalizeSource(importSource) || importSource;
|
|
48
|
+
const usages = this.usages.get(normalized) || [];
|
|
49
|
+
return {
|
|
50
|
+
usedIn: usages,
|
|
51
|
+
usageCount: usages.length,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Get full usage stats for all tracked imports
|
|
56
|
+
*/
|
|
57
|
+
getAllUsages() {
|
|
58
|
+
const result = {};
|
|
59
|
+
for (const [source, usages] of this.usages.entries()) {
|
|
60
|
+
result[source] = {
|
|
61
|
+
usedIn: usages.slice(0, 10), // Top 10 usages
|
|
62
|
+
usageCount: usages.length,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Get top N most-used imports
|
|
69
|
+
*/
|
|
70
|
+
getTopUsed(n = 20) {
|
|
71
|
+
return Array.from(this.usages.entries())
|
|
72
|
+
.map(([source, usages]) => ({
|
|
73
|
+
source,
|
|
74
|
+
count: usages.length,
|
|
75
|
+
}))
|
|
76
|
+
.sort((a, b) => b.count - a.count)
|
|
77
|
+
.slice(0, n);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
export class LibraryUsageTracker {
|
|
81
|
+
usage = new Map();
|
|
82
|
+
track(importSource, filePath, line = 1) {
|
|
83
|
+
const normalized = this.normalizeImportSource(importSource);
|
|
84
|
+
if (!normalized)
|
|
85
|
+
return;
|
|
86
|
+
const existing = this.usage.get(normalized) || { count: 0, examples: new Set() };
|
|
87
|
+
existing.count++;
|
|
88
|
+
// Keep top 3 examples
|
|
89
|
+
if (existing.examples.size < 3) {
|
|
90
|
+
const relativePath = filePath.split(/[\\/]/).slice(-3).join('/');
|
|
91
|
+
existing.examples.add(`${relativePath}:${line}`);
|
|
92
|
+
}
|
|
93
|
+
this.usage.set(normalized, existing);
|
|
94
|
+
}
|
|
95
|
+
normalizeImportSource(source) {
|
|
96
|
+
// Ignore relative imports and node built-ins
|
|
97
|
+
if (source.startsWith('.'))
|
|
98
|
+
return null;
|
|
99
|
+
if (['fs', 'path', 'http', 'https', 'crypto', 'util', 'events'].includes(source))
|
|
100
|
+
return null;
|
|
101
|
+
return source;
|
|
102
|
+
}
|
|
103
|
+
getStats() {
|
|
104
|
+
const stats = {};
|
|
105
|
+
for (const [lib, data] of this.usage.entries()) {
|
|
106
|
+
stats[lib] = {
|
|
107
|
+
count: data.count,
|
|
108
|
+
examples: Array.from(data.examples).slice(0, 3),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
return stats;
|
|
112
|
+
}
|
|
113
|
+
getTopLibraries(n = 10) {
|
|
114
|
+
return Array.from(this.usage.entries())
|
|
115
|
+
.map(([lib, data]) => [lib, data.count])
|
|
116
|
+
.sort((a, b) => b[1] - a[1])
|
|
117
|
+
.slice(0, n);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
const DEFAULT_TEST_FRAMEWORK_CONFIGS = [
|
|
121
|
+
// E2E
|
|
122
|
+
{ name: 'Playwright', type: 'e2e', indicators: ['@playwright/test', 'page.goto(', 'page.locator('], priority: 100 },
|
|
123
|
+
{ name: 'Cypress', type: 'e2e', indicators: ['cy.visit(', 'cy.get(', 'cy.request(', 'cy.window('], priority: 100 },
|
|
124
|
+
{ name: 'Puppeteer', type: 'e2e', indicators: ['puppeteer.launch(', 'page.goto(', 'page.locator('], priority: 100 },
|
|
125
|
+
// Unit - specific patterns
|
|
126
|
+
{ name: 'Jest', type: 'unit', indicators: ['jest.mock(', 'jest.fn(', 'jest.spyOn(', '@jest/globals', 'types/jest'], priority: 100 },
|
|
127
|
+
{ name: 'Vitest', type: 'unit', indicators: ['vi.mock(', 'vi.fn(', '@vitest'], priority: 100 },
|
|
128
|
+
{ name: 'Jasmine', type: 'unit', indicators: ['jasmine.createSpy', 'jasmine.createSpyObj'], priority: 100 },
|
|
129
|
+
// Angular TestBed
|
|
130
|
+
{ name: 'Angular TestBed', type: 'unit', indicators: ['TestBed.configureTestingModule'], priority: 50 },
|
|
131
|
+
// Generic fallback
|
|
132
|
+
{ name: 'Generic Test', type: 'unit', indicators: ['describe(', 'it(', 'expect('], priority: 10 },
|
|
133
|
+
];
|
|
134
|
+
export class PatternDetector {
|
|
135
|
+
patterns = new Map();
|
|
136
|
+
canonicalExamples = new Map();
|
|
137
|
+
goldenFiles = [];
|
|
138
|
+
testFrameworkConfigs;
|
|
139
|
+
constructor(customConfigs) {
|
|
140
|
+
this.testFrameworkConfigs = customConfigs || DEFAULT_TEST_FRAMEWORK_CONFIGS;
|
|
141
|
+
}
|
|
142
|
+
track(category, patternName, example) {
|
|
143
|
+
if (!this.patterns.has(category)) {
|
|
144
|
+
this.patterns.set(category, new Map());
|
|
145
|
+
}
|
|
146
|
+
const categoryPatterns = this.patterns.get(category);
|
|
147
|
+
categoryPatterns.set(patternName, (categoryPatterns.get(patternName) || 0) + 1);
|
|
148
|
+
// Smart Canonical Example Selection
|
|
149
|
+
const exampleKey = `${category}:${patternName}`;
|
|
150
|
+
if (example) {
|
|
151
|
+
if (!this.canonicalExamples.has(exampleKey)) {
|
|
152
|
+
this.canonicalExamples.set(exampleKey, example);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
// Check if new example is better
|
|
156
|
+
const existing = this.canonicalExamples.get(exampleKey);
|
|
157
|
+
// Priority 1: Core/Shared directories (likely definitive)
|
|
158
|
+
const isCoreOrShared = (f) => f.includes('core/') || f.includes('shared/');
|
|
159
|
+
const newIsPriority = isCoreOrShared(example.file);
|
|
160
|
+
const oldIsPriority = isCoreOrShared(existing.file);
|
|
161
|
+
if (newIsPriority && !oldIsPriority) {
|
|
162
|
+
this.canonicalExamples.set(exampleKey, example);
|
|
163
|
+
}
|
|
164
|
+
else if (newIsPriority === oldIsPriority) {
|
|
165
|
+
// Priority 2: Concise length (but not too short)
|
|
166
|
+
const newLen = example.snippet.length;
|
|
167
|
+
const oldLen = existing.snippet.length;
|
|
168
|
+
// If current is very long (>200 chars) and new is shorter but substantial (>50), take new
|
|
169
|
+
if (oldLen > 200 && newLen < oldLen && newLen > 50) {
|
|
170
|
+
this.canonicalExamples.set(exampleKey, example);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Track a file as a potential "Golden File" - a file that demonstrates multiple modern patterns
|
|
178
|
+
*/
|
|
179
|
+
trackGoldenFile(file, score, patterns) {
|
|
180
|
+
// Check if already tracked
|
|
181
|
+
const existing = this.goldenFiles.find(gf => gf.file === file);
|
|
182
|
+
if (existing) {
|
|
183
|
+
if (score > existing.score) {
|
|
184
|
+
existing.score = score;
|
|
185
|
+
existing.patterns = patterns;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
this.goldenFiles.push({ file, score, patterns });
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Get top N Golden Files - files that best demonstrate all modern patterns together
|
|
194
|
+
*/
|
|
195
|
+
getGoldenFiles(n = 5) {
|
|
196
|
+
return this.goldenFiles
|
|
197
|
+
.sort((a, b) => b.score - a.score)
|
|
198
|
+
.slice(0, n);
|
|
199
|
+
}
|
|
200
|
+
getConsensus(category) {
|
|
201
|
+
const categoryPatterns = this.patterns.get(category);
|
|
202
|
+
if (!categoryPatterns || categoryPatterns.size === 0)
|
|
203
|
+
return null;
|
|
204
|
+
const total = Array.from(categoryPatterns.values()).reduce((sum, count) => sum + count, 0);
|
|
205
|
+
const sorted = Array.from(categoryPatterns.entries()).sort((a, b) => b[1] - a[1]);
|
|
206
|
+
const [primaryName, primaryCount] = sorted[0];
|
|
207
|
+
const primaryFreq = Math.round((primaryCount / total) * 100);
|
|
208
|
+
// Get canonical example for primary pattern
|
|
209
|
+
const exampleKey = `${category}:${primaryName}`;
|
|
210
|
+
const canonicalExample = this.canonicalExamples.get(exampleKey);
|
|
211
|
+
const result = {
|
|
212
|
+
primary: {
|
|
213
|
+
name: primaryName,
|
|
214
|
+
count: primaryCount,
|
|
215
|
+
frequency: `${primaryFreq}%`,
|
|
216
|
+
examples: canonicalExample ? [canonicalExample.file] : [],
|
|
217
|
+
canonicalExample: canonicalExample,
|
|
218
|
+
},
|
|
219
|
+
};
|
|
220
|
+
if (sorted.length > 1) {
|
|
221
|
+
result.alsoDetected = sorted.slice(1, 3).map(([name, count]) => ({
|
|
222
|
+
name,
|
|
223
|
+
count,
|
|
224
|
+
frequency: `${Math.round((count / total) * 100)}%`,
|
|
225
|
+
}));
|
|
226
|
+
}
|
|
227
|
+
return result;
|
|
228
|
+
}
|
|
229
|
+
getAllPatterns() {
|
|
230
|
+
const stats = {};
|
|
231
|
+
for (const category of this.patterns.keys()) {
|
|
232
|
+
const consensus = this.getConsensus(category);
|
|
233
|
+
if (consensus) {
|
|
234
|
+
stats[category] = consensus;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return stats;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Detect test framework from content using config-driven matching
|
|
241
|
+
* Returns detected framework with confidence based on priority scoring
|
|
242
|
+
*/
|
|
243
|
+
detectTestFramework(content, filePath) {
|
|
244
|
+
const results = [];
|
|
245
|
+
for (const config of this.testFrameworkConfigs) {
|
|
246
|
+
const matched = config.indicators.some(indicator => content.includes(indicator));
|
|
247
|
+
if (matched) {
|
|
248
|
+
results.push({ type: config.type, name: config.name, priority: config.priority });
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
if (results.length === 0)
|
|
252
|
+
return {};
|
|
253
|
+
// Find highest priority match for each type
|
|
254
|
+
const unitMatches = results.filter(r => r.type === 'unit').sort((a, b) => b.priority - a.priority);
|
|
255
|
+
const e2eMatches = results.filter(r => r.type === 'e2e').sort((a, b) => b.priority - a.priority);
|
|
256
|
+
const detected = {};
|
|
257
|
+
// For unit tests, apply special logic for TestBed disambiguation
|
|
258
|
+
if (unitMatches.length > 0) {
|
|
259
|
+
const topUnit = unitMatches[0];
|
|
260
|
+
// If only TestBed or Generic Test was found, try to disambiguate
|
|
261
|
+
if (topUnit.name === 'Angular TestBed' || topUnit.name === 'Generic Test') {
|
|
262
|
+
if (content.includes('jest')) {
|
|
263
|
+
detected.unit = 'Jest';
|
|
264
|
+
}
|
|
265
|
+
else if (content.includes('jasmine')) {
|
|
266
|
+
detected.unit = 'Jasmine';
|
|
267
|
+
}
|
|
268
|
+
else if (content.includes('vitest')) {
|
|
269
|
+
detected.unit = 'Vitest';
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
272
|
+
detected.unit = topUnit.name;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
detected.unit = topUnit.name;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
if (e2eMatches.length > 0) {
|
|
280
|
+
detected.e2e = e2eMatches[0].name;
|
|
281
|
+
}
|
|
282
|
+
return detected;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Detect patterns from code - FRAMEWORK-AGNOSTIC
|
|
286
|
+
* Framework-specific patterns should be detected by framework analyzers
|
|
287
|
+
*/
|
|
288
|
+
detectFromCode(content, filePath) {
|
|
289
|
+
// Test file detection
|
|
290
|
+
if (filePath.includes('.spec.') || filePath.includes('.test.') || filePath.includes('/e2e/')) {
|
|
291
|
+
const detected = this.detectTestFramework(content, filePath);
|
|
292
|
+
if (detected.e2e) {
|
|
293
|
+
this.track('e2eFramework', detected.e2e);
|
|
294
|
+
}
|
|
295
|
+
if (detected.unit) {
|
|
296
|
+
this.track('unitTestFramework', detected.unit);
|
|
297
|
+
}
|
|
298
|
+
// Legacy testingFramework tracker for backward compatibility
|
|
299
|
+
// Prioritize e2e if detected, otherwise unit
|
|
300
|
+
if (detected.e2e) {
|
|
301
|
+
this.track('testingFramework', detected.e2e);
|
|
302
|
+
}
|
|
303
|
+
else if (detected.unit && detected.unit !== 'Generic Test') {
|
|
304
|
+
this.track('testingFramework', detected.unit);
|
|
305
|
+
}
|
|
306
|
+
// Track mocking style (secondary pattern)
|
|
307
|
+
if (content.includes('jest.mock(') || content.includes('jest.fn(')) {
|
|
308
|
+
this.track('testMocking', 'Jest mocks');
|
|
309
|
+
}
|
|
310
|
+
else if (content.includes('.spyOn(')) {
|
|
311
|
+
this.track('testMocking', 'Spy-based mocking');
|
|
312
|
+
}
|
|
313
|
+
else if (content.includes('vi.mock(') || content.includes('vi.fn(')) {
|
|
314
|
+
this.track('testMocking', 'Vitest mocks');
|
|
315
|
+
}
|
|
316
|
+
// Track testing utilities
|
|
317
|
+
if (content.includes('MockComponent') || content.includes('ng-mocks')) {
|
|
318
|
+
this.track('testUtility', 'ng-mocks');
|
|
319
|
+
}
|
|
320
|
+
else if (content.includes('msw') && content.includes('setupServer')) {
|
|
321
|
+
this.track('testUtility', 'MSW');
|
|
322
|
+
}
|
|
323
|
+
else if (content.includes('@testing-library')) {
|
|
324
|
+
this.track('testUtility', 'Testing Library');
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
// Generic state patterns (framework-agnostic)
|
|
328
|
+
if (content.includes('BehaviorSubject') || content.includes('ReplaySubject')) {
|
|
329
|
+
this.track('stateManagement', 'RxJS Subjects');
|
|
330
|
+
}
|
|
331
|
+
if (content.includes('createStore') || content.includes('configureStore')) {
|
|
332
|
+
this.track('stateManagement', 'Redux-style store');
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
//# sourceMappingURL=usage-tracker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-tracker.js","sourceRoot":"","sources":["../../src/utils/usage-tracker.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsCH,MAAM,OAAO,WAAW;IACtB,4CAA4C;IACpC,MAAM,GAA+B,IAAI,GAAG,EAAE,CAAC;IACvD,wEAAwE;IAChE,OAAO,GAA0B,IAAI,GAAG,EAAE,CAAC;IAEnD,WAAW,CAAC,YAAoB,EAAE,aAAqB,EAAE,OAAe,CAAC;QACvE,YAAY;QACZ,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;QACtD,IAAI,CAAC,UAAU;YAAE,OAAO;QAExB,MAAM,QAAQ,GAAG,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
+
"name": "codebase-context",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "MCP server for semantic codebase indexing and search - gives AI agents real understanding of your codebase",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/lib.js",
|
|
7
|
+
"types": "./dist/lib.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/lib.js",
|
|
11
|
+
"types": "./dist/lib.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./server": {
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./analyzers/angular": {
|
|
18
|
+
"import": "./dist/analyzers/angular/index.js",
|
|
19
|
+
"types": "./dist/analyzers/angular/index.d.ts"
|
|
20
|
+
},
|
|
21
|
+
"./analyzers/generic": {
|
|
22
|
+
"import": "./dist/analyzers/generic/index.js",
|
|
23
|
+
"types": "./dist/analyzers/generic/index.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./embeddings": {
|
|
26
|
+
"import": "./dist/embeddings/index.js",
|
|
27
|
+
"types": "./dist/embeddings/index.d.ts"
|
|
28
|
+
},
|
|
29
|
+
"./storage": {
|
|
30
|
+
"import": "./dist/storage/index.js",
|
|
31
|
+
"types": "./dist/storage/index.d.ts"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"bin": {
|
|
35
|
+
"codebase-context": "./dist/index.js"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"README.md",
|
|
40
|
+
"LICENSE"
|
|
41
|
+
],
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=18.0.0"
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"mcp",
|
|
47
|
+
"model-context-protocol",
|
|
48
|
+
"semantic-search",
|
|
49
|
+
"codebase",
|
|
50
|
+
"indexing",
|
|
51
|
+
"embeddings",
|
|
52
|
+
"vector-search",
|
|
53
|
+
"angular",
|
|
54
|
+
"ai",
|
|
55
|
+
"llm",
|
|
56
|
+
"code-understanding",
|
|
57
|
+
"developer-tools"
|
|
58
|
+
],
|
|
59
|
+
"repository": {
|
|
60
|
+
"type": "git",
|
|
61
|
+
"url": "git+https://github.com/PatrickSys/codebase-context-mcp.git"
|
|
62
|
+
},
|
|
63
|
+
"bugs": {
|
|
64
|
+
"url": "https://github.com/PatrickSys/codebase-context-mcp/issues"
|
|
65
|
+
},
|
|
66
|
+
"homepage": "https://github.com/PatrickSys/codebase-context-mcp#readme",
|
|
67
|
+
"author": {
|
|
68
|
+
"name": "Patrick Rosselló",
|
|
69
|
+
"email": "rossellocolompatrick@gmail.com",
|
|
70
|
+
"url": "https://github.com/PatrickSys"
|
|
71
|
+
},
|
|
72
|
+
"license": "MIT",
|
|
73
|
+
"scripts": {
|
|
74
|
+
"build": "tsc",
|
|
75
|
+
"prepublishOnly": "npm run build",
|
|
76
|
+
"start": "node dist/index.js",
|
|
77
|
+
"dev": "ts-node src/index.ts",
|
|
78
|
+
"watch": "tsc -w"
|
|
79
|
+
},
|
|
80
|
+
"dependencies": {
|
|
81
|
+
"@modelcontextprotocol/sdk": "^0.6.0",
|
|
82
|
+
"@xenova/transformers": "^2.17.0",
|
|
83
|
+
"@lancedb/lancedb": "^0.4.0",
|
|
84
|
+
"@typescript-eslint/typescript-estree": "^7.0.0",
|
|
85
|
+
"glob": "^10.3.10",
|
|
86
|
+
"ignore": "^5.3.1",
|
|
87
|
+
"fuse.js": "^7.0.0",
|
|
88
|
+
"uuid": "^9.0.1"
|
|
89
|
+
},
|
|
90
|
+
"devDependencies": {
|
|
91
|
+
"@types/node": "^20.11.24",
|
|
92
|
+
"@types/glob": "^8.1.0",
|
|
93
|
+
"@types/uuid": "^9.0.8",
|
|
94
|
+
"typescript": "^5.3.3",
|
|
95
|
+
"ts-node": "^10.9.2",
|
|
96
|
+
"vitest": "^1.3.0"
|
|
97
|
+
}
|
|
98
|
+
}
|