mcp-adr-analysis-server 2.7.29 → 2.7.30
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/.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/tools/tree-sitter-code-tools.d.ts +0 -189
- package/dist/src/tools/tree-sitter-code-tools.d.ts.map +0 -1
- package/dist/src/tools/tree-sitter-code-tools.js +0 -647
- package/dist/src/tools/tree-sitter-code-tools.js.map +0 -1
- package/dist/src/utils/apply-cot-enhancement.d.ts +0 -46
- package/dist/src/utils/apply-cot-enhancement.d.ts.map +0 -1
- package/dist/src/utils/apply-cot-enhancement.js +0 -165
- package/dist/src/utils/apply-cot-enhancement.js.map +0 -1
- package/dist/src/utils/deployment-type-registry.d.ts +0 -52
- package/dist/src/utils/deployment-type-registry.d.ts.map +0 -1
- package/dist/src/utils/deployment-type-registry.js +0 -543
- package/dist/src/utils/deployment-type-registry.js.map +0 -1
- package/dist/src/utils/research-documentation.d.ts +0 -58
- package/dist/src/utils/research-documentation.d.ts.map +0 -1
- package/dist/src/utils/research-documentation.js +0 -438
- package/dist/src/utils/research-documentation.js.map +0 -1
|
@@ -1,647 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tree-Sitter Code Analysis Tools
|
|
3
|
-
*
|
|
4
|
-
* Provides deterministic code structure analysis tools for MCP.
|
|
5
|
-
* These tools replace non-deterministic ripgrep-based search with
|
|
6
|
-
* AST-based structural analysis.
|
|
7
|
-
*
|
|
8
|
-
* Design Philosophy (per ADR-016):
|
|
9
|
-
* - Tools provide deterministic data
|
|
10
|
-
* - LLM handles reasoning and semantic matching
|
|
11
|
-
* - Same input always produces same output
|
|
12
|
-
*
|
|
13
|
-
* @see docs/adrs/adr-006-tree-sitter-integration-strategy.md
|
|
14
|
-
*
|
|
15
|
-
* NOTE: this previously cited adr-016-replace-ripgrep-with-tree-sitter.md, which has
|
|
16
|
-
* never existed. ADR-017 references it twice as a 'predecessor decision', so the
|
|
17
|
-
* ripgrep -> tree-sitter switch was decided and implemented but never recorded.
|
|
18
|
-
* ADR-006 is the closest real record. The gap itself is tracked in #1415.
|
|
19
|
-
*/
|
|
20
|
-
import { readFileSync, readdirSync, statSync, existsSync } from 'fs';
|
|
21
|
-
import { join, extname, relative } from 'path';
|
|
22
|
-
import { TreeSitterAnalyzer, } from '../utils/tree-sitter-analyzer.js';
|
|
23
|
-
// Singleton analyzer instance
|
|
24
|
-
let analyzerInstance = null;
|
|
25
|
-
function getAnalyzer() {
|
|
26
|
-
if (!analyzerInstance) {
|
|
27
|
-
analyzerInstance = new TreeSitterAnalyzer();
|
|
28
|
-
}
|
|
29
|
-
return analyzerInstance;
|
|
30
|
-
}
|
|
31
|
-
// Language detection by extension
|
|
32
|
-
const EXTENSION_TO_LANGUAGE = {
|
|
33
|
-
'.ts': 'typescript',
|
|
34
|
-
'.tsx': 'typescript',
|
|
35
|
-
'.js': 'javascript',
|
|
36
|
-
'.jsx': 'javascript',
|
|
37
|
-
'.mjs': 'javascript',
|
|
38
|
-
'.py': 'python',
|
|
39
|
-
'.yml': 'yaml',
|
|
40
|
-
'.yaml': 'yaml',
|
|
41
|
-
'.json': 'json',
|
|
42
|
-
'.sh': 'bash',
|
|
43
|
-
'.bash': 'bash',
|
|
44
|
-
'.tf': 'terraform',
|
|
45
|
-
'.tfvars': 'terraform',
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Get deterministic file structure of a project
|
|
49
|
-
*
|
|
50
|
-
* Returns a complete file tree without any search or filtering.
|
|
51
|
-
* The LLM can then decide which files are relevant.
|
|
52
|
-
*/
|
|
53
|
-
export async function getFileStructure(projectPath, options = {}) {
|
|
54
|
-
const { maxDepth = 10, includeHidden = false, excludePatterns = ['node_modules', 'dist', '.git', '__pycache__', '.pytest_cache', 'coverage'], } = options;
|
|
55
|
-
const entries = [];
|
|
56
|
-
const filesByLanguage = {};
|
|
57
|
-
let totalDirectories = 0;
|
|
58
|
-
function shouldExclude(name) {
|
|
59
|
-
if (!includeHidden && name.startsWith('.'))
|
|
60
|
-
return true;
|
|
61
|
-
// Use exact matching only to avoid excluding directories like "distribution" when "dist" is excluded
|
|
62
|
-
return excludePatterns.some(pattern => name === pattern);
|
|
63
|
-
}
|
|
64
|
-
function walkDirectory(dirPath, depth) {
|
|
65
|
-
if (depth > maxDepth)
|
|
66
|
-
return;
|
|
67
|
-
try {
|
|
68
|
-
const items = readdirSync(dirPath);
|
|
69
|
-
for (const item of items.sort()) {
|
|
70
|
-
if (shouldExclude(item))
|
|
71
|
-
continue;
|
|
72
|
-
const fullPath = join(dirPath, item);
|
|
73
|
-
const relativePath = relative(projectPath, fullPath);
|
|
74
|
-
try {
|
|
75
|
-
const stats = statSync(fullPath);
|
|
76
|
-
if (stats.isDirectory()) {
|
|
77
|
-
totalDirectories++;
|
|
78
|
-
entries.push({
|
|
79
|
-
path: fullPath,
|
|
80
|
-
relativePath,
|
|
81
|
-
type: 'directory',
|
|
82
|
-
});
|
|
83
|
-
walkDirectory(fullPath, depth + 1);
|
|
84
|
-
}
|
|
85
|
-
else if (stats.isFile()) {
|
|
86
|
-
const ext = extname(item).toLowerCase();
|
|
87
|
-
const language = EXTENSION_TO_LANGUAGE[ext] || 'other';
|
|
88
|
-
filesByLanguage[language] = (filesByLanguage[language] || 0) + 1;
|
|
89
|
-
entries.push({
|
|
90
|
-
path: fullPath,
|
|
91
|
-
relativePath,
|
|
92
|
-
type: 'file',
|
|
93
|
-
extension: ext,
|
|
94
|
-
language,
|
|
95
|
-
size: stats.size,
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
catch {
|
|
100
|
-
// Skip files we can't stat
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
catch {
|
|
105
|
-
// Skip directories we can't read
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
walkDirectory(projectPath, 0);
|
|
109
|
-
return {
|
|
110
|
-
root: projectPath,
|
|
111
|
-
totalFiles: entries.filter(e => e.type === 'file').length,
|
|
112
|
-
totalDirectories,
|
|
113
|
-
filesByLanguage,
|
|
114
|
-
entries,
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Get AST-extracted imports from a file
|
|
119
|
-
*
|
|
120
|
-
* Returns deterministic list of all imports/requires in a file.
|
|
121
|
-
*/
|
|
122
|
-
export async function getImports(filePath) {
|
|
123
|
-
const analyzer = getAnalyzer();
|
|
124
|
-
const analysis = await analyzer.analyzeFile(filePath);
|
|
125
|
-
const externalDependencies = analysis.imports
|
|
126
|
-
.filter(imp => imp.isExternal)
|
|
127
|
-
.map(imp => imp.module);
|
|
128
|
-
const internalDependencies = analysis.imports
|
|
129
|
-
.filter(imp => !imp.isExternal)
|
|
130
|
-
.map(imp => imp.module);
|
|
131
|
-
return {
|
|
132
|
-
file: filePath,
|
|
133
|
-
language: analysis.language,
|
|
134
|
-
imports: analysis.imports,
|
|
135
|
-
externalDependencies: [...new Set(externalDependencies)],
|
|
136
|
-
internalDependencies: [...new Set(internalDependencies)],
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Get AST-extracted exports from a file
|
|
141
|
-
*
|
|
142
|
-
* Returns deterministic list of all exports in a file.
|
|
143
|
-
*/
|
|
144
|
-
export async function getExports(filePath) {
|
|
145
|
-
const content = readFileSync(filePath, 'utf-8');
|
|
146
|
-
const ext = extname(filePath).toLowerCase();
|
|
147
|
-
const language = EXTENSION_TO_LANGUAGE[ext] || 'other';
|
|
148
|
-
const exports = [];
|
|
149
|
-
let hasDefaultExport = false;
|
|
150
|
-
// Parse exports based on language
|
|
151
|
-
if (language === 'typescript' || language === 'javascript') {
|
|
152
|
-
// ES6 named exports: export const/function/class/type/interface
|
|
153
|
-
const namedExportRegex = /export\s+(const|let|var|function|class|type|interface|enum)\s+(\w+)/g;
|
|
154
|
-
let match;
|
|
155
|
-
while ((match = namedExportRegex.exec(content)) !== null) {
|
|
156
|
-
const lineNum = content.substring(0, match.index).split('\n').length;
|
|
157
|
-
const name = match[2] ?? '';
|
|
158
|
-
const type = match[1] ?? 'variable';
|
|
159
|
-
if (name) {
|
|
160
|
-
exports.push({
|
|
161
|
-
name,
|
|
162
|
-
type: type,
|
|
163
|
-
location: { line: lineNum, column: 0 },
|
|
164
|
-
isDefault: false,
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
// Default exports: export default
|
|
169
|
-
const defaultExportRegex = /export\s+default\s+(?:(class|function)\s+)?(\w+)?/g;
|
|
170
|
-
while ((match = defaultExportRegex.exec(content)) !== null) {
|
|
171
|
-
hasDefaultExport = true;
|
|
172
|
-
const lineNum = content.substring(0, match.index).split('\n').length;
|
|
173
|
-
const name = match[2] || 'default';
|
|
174
|
-
const type = match[1] || 'default';
|
|
175
|
-
exports.push({
|
|
176
|
-
name,
|
|
177
|
-
type: type,
|
|
178
|
-
location: { line: lineNum, column: 0 },
|
|
179
|
-
isDefault: true,
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
// Re-exports: export { ... } from '...'
|
|
183
|
-
const reExportRegex = /export\s+\{([^}]+)\}/g;
|
|
184
|
-
while ((match = reExportRegex.exec(content)) !== null) {
|
|
185
|
-
const lineNum = content.substring(0, match.index).split('\n').length;
|
|
186
|
-
const namesStr = match[1] ?? '';
|
|
187
|
-
const parsedNames = namesStr.split(',').map(n => {
|
|
188
|
-
const parts = n.trim().split(' as ');
|
|
189
|
-
return (parts[0] ?? '').trim();
|
|
190
|
-
});
|
|
191
|
-
for (const name of parsedNames) {
|
|
192
|
-
if (name && !exports.some(e => e.name === name)) {
|
|
193
|
-
exports.push({
|
|
194
|
-
name,
|
|
195
|
-
type: 'variable',
|
|
196
|
-
location: { line: lineNum, column: 0 },
|
|
197
|
-
isDefault: false,
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
else if (language === 'python') {
|
|
204
|
-
// Python module-level definitions (implicitly exported)
|
|
205
|
-
const defRegex = /^(def|class)\s+(\w+)/gm;
|
|
206
|
-
let match;
|
|
207
|
-
while ((match = defRegex.exec(content)) !== null) {
|
|
208
|
-
const lineNum = content.substring(0, match.index).split('\n').length;
|
|
209
|
-
const name = match[2] ?? '';
|
|
210
|
-
const defType = match[1] ?? 'def';
|
|
211
|
-
if (name) {
|
|
212
|
-
exports.push({
|
|
213
|
-
name,
|
|
214
|
-
type: defType === 'def' ? 'function' : 'class',
|
|
215
|
-
location: { line: lineNum, column: 0 },
|
|
216
|
-
isDefault: false,
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
// __all__ definition - check for explicit exports
|
|
221
|
-
const allRegex = /__all__\s*=\s*\[([^\]]+)\]/;
|
|
222
|
-
const allMatch = content.match(allRegex);
|
|
223
|
-
if (allMatch && allMatch[1]) {
|
|
224
|
-
// Mark only __all__ items as explicitly exported (future enhancement)
|
|
225
|
-
// Currently just acknowledging existence
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
return {
|
|
229
|
-
file: filePath,
|
|
230
|
-
language,
|
|
231
|
-
exports,
|
|
232
|
-
hasDefaultExport,
|
|
233
|
-
namedExports: exports.filter(e => !e.isDefault).map(e => e.name),
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* Get AST-extracted functions from a file
|
|
238
|
-
*
|
|
239
|
-
* Returns deterministic list of all functions with signatures.
|
|
240
|
-
*/
|
|
241
|
-
export async function getFunctions(filePath) {
|
|
242
|
-
const analyzer = getAnalyzer();
|
|
243
|
-
const analysis = await analyzer.analyzeFile(filePath);
|
|
244
|
-
const securitySensitiveFunctions = analysis.functions
|
|
245
|
-
.filter(fn => fn.securitySensitive)
|
|
246
|
-
.map(fn => fn.name);
|
|
247
|
-
return {
|
|
248
|
-
file: filePath,
|
|
249
|
-
language: analysis.language,
|
|
250
|
-
functions: analysis.functions,
|
|
251
|
-
totalFunctions: analysis.functions.length,
|
|
252
|
-
securitySensitiveFunctions,
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Get classes, interfaces, and types from a file
|
|
257
|
-
*
|
|
258
|
-
* Returns deterministic list of class/interface/type definitions.
|
|
259
|
-
*/
|
|
260
|
-
export async function getClasses(filePath) {
|
|
261
|
-
const content = readFileSync(filePath, 'utf-8');
|
|
262
|
-
const ext = extname(filePath).toLowerCase();
|
|
263
|
-
const language = EXTENSION_TO_LANGUAGE[ext] || 'other';
|
|
264
|
-
const classes = [];
|
|
265
|
-
const interfaces = [];
|
|
266
|
-
const types = [];
|
|
267
|
-
if (language === 'typescript' || language === 'javascript') {
|
|
268
|
-
// Parse classes
|
|
269
|
-
const classRegex = /(export\s+)?(class)\s+(\w+)(?:\s+extends\s+\w+)?(?:\s+implements\s+[\w,\s]+)?\s*\{/g;
|
|
270
|
-
let match;
|
|
271
|
-
while ((match = classRegex.exec(content)) !== null) {
|
|
272
|
-
const lineNum = content.substring(0, match.index).split('\n').length;
|
|
273
|
-
const className = match[3] ?? '';
|
|
274
|
-
const isExported = !!match[1];
|
|
275
|
-
if (className) {
|
|
276
|
-
// Extract methods (simplified)
|
|
277
|
-
const classBody = extractBraceBlock(content, match.index + match[0].length - 1);
|
|
278
|
-
const methods = extractMethods(classBody);
|
|
279
|
-
const properties = extractProperties(classBody);
|
|
280
|
-
classes.push({
|
|
281
|
-
name: className,
|
|
282
|
-
type: 'class',
|
|
283
|
-
methods,
|
|
284
|
-
properties,
|
|
285
|
-
location: { line: lineNum, column: 0 },
|
|
286
|
-
exported: isExported,
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
// Parse interfaces (TypeScript)
|
|
291
|
-
const interfaceRegex = /(export\s+)?(interface)\s+(\w+)(?:<[^>]+>)?\s*(?:extends\s+[\w,\s<>]+)?\s*\{/g;
|
|
292
|
-
while ((match = interfaceRegex.exec(content)) !== null) {
|
|
293
|
-
const lineNum = content.substring(0, match.index).split('\n').length;
|
|
294
|
-
const interfaceName = match[3] ?? '';
|
|
295
|
-
const isExported = !!match[1];
|
|
296
|
-
if (interfaceName) {
|
|
297
|
-
const interfaceBody = extractBraceBlock(content, match.index + match[0].length - 1);
|
|
298
|
-
const methods = extractInterfaceMethods(interfaceBody);
|
|
299
|
-
const properties = extractInterfaceProperties(interfaceBody);
|
|
300
|
-
interfaces.push({
|
|
301
|
-
name: interfaceName,
|
|
302
|
-
type: 'interface',
|
|
303
|
-
methods,
|
|
304
|
-
properties,
|
|
305
|
-
location: { line: lineNum, column: 0 },
|
|
306
|
-
exported: isExported,
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
// Parse type aliases
|
|
311
|
-
const typeRegex = /(export\s+)?type\s+(\w+)(?:<[^>]+>)?\s*=/g;
|
|
312
|
-
while ((match = typeRegex.exec(content)) !== null) {
|
|
313
|
-
const lineNum = content.substring(0, match.index).split('\n').length;
|
|
314
|
-
const typeName = match[2] ?? '';
|
|
315
|
-
const isExported = !!match[1];
|
|
316
|
-
if (typeName) {
|
|
317
|
-
types.push({
|
|
318
|
-
name: typeName,
|
|
319
|
-
type: 'type',
|
|
320
|
-
methods: [],
|
|
321
|
-
properties: [],
|
|
322
|
-
location: { line: lineNum, column: 0 },
|
|
323
|
-
exported: isExported,
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
else if (language === 'python') {
|
|
329
|
-
// Parse Python classes (including nested classes with indentation)
|
|
330
|
-
const classRegex = /^(\s*)class\s+(\w+)(?:\([^)]*\))?:/gm;
|
|
331
|
-
let match;
|
|
332
|
-
while ((match = classRegex.exec(content)) !== null) {
|
|
333
|
-
const lineNum = content.substring(0, match.index).split('\n').length;
|
|
334
|
-
const classIndent = match[1]?.length ?? 0;
|
|
335
|
-
const className = match[2] ?? '';
|
|
336
|
-
if (className) {
|
|
337
|
-
// Extract methods from class body, passing the class indentation level
|
|
338
|
-
const classBodyStart = match.index + match[0].length;
|
|
339
|
-
const methods = extractPythonMethods(content, classBodyStart, classIndent);
|
|
340
|
-
classes.push({
|
|
341
|
-
name: className,
|
|
342
|
-
type: 'class',
|
|
343
|
-
methods,
|
|
344
|
-
properties: [],
|
|
345
|
-
location: { line: lineNum, column: classIndent },
|
|
346
|
-
exported: !className.startsWith('_'),
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
return {
|
|
352
|
-
file: filePath,
|
|
353
|
-
language,
|
|
354
|
-
classes,
|
|
355
|
-
interfaces,
|
|
356
|
-
types,
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
/**
|
|
360
|
-
* Get project dependencies from manifest files
|
|
361
|
-
*
|
|
362
|
-
* Parses package.json, requirements.txt, etc. for dependencies.
|
|
363
|
-
*/
|
|
364
|
-
export async function getDependencies(projectPath) {
|
|
365
|
-
const dependencies = [];
|
|
366
|
-
// Check package.json
|
|
367
|
-
const packageJsonPath = join(projectPath, 'package.json');
|
|
368
|
-
if (existsSync(packageJsonPath)) {
|
|
369
|
-
try {
|
|
370
|
-
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
|
|
371
|
-
// Production dependencies
|
|
372
|
-
if (packageJson.dependencies) {
|
|
373
|
-
for (const [name, version] of Object.entries(packageJson.dependencies)) {
|
|
374
|
-
dependencies.push({
|
|
375
|
-
name,
|
|
376
|
-
version: String(version),
|
|
377
|
-
type: 'production',
|
|
378
|
-
source: 'package.json',
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
// Development dependencies
|
|
383
|
-
if (packageJson.devDependencies) {
|
|
384
|
-
for (const [name, version] of Object.entries(packageJson.devDependencies)) {
|
|
385
|
-
dependencies.push({
|
|
386
|
-
name,
|
|
387
|
-
version: String(version),
|
|
388
|
-
type: 'development',
|
|
389
|
-
source: 'package.json',
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
// Peer dependencies
|
|
394
|
-
if (packageJson.peerDependencies) {
|
|
395
|
-
for (const [name, version] of Object.entries(packageJson.peerDependencies)) {
|
|
396
|
-
dependencies.push({
|
|
397
|
-
name,
|
|
398
|
-
version: String(version),
|
|
399
|
-
type: 'peer',
|
|
400
|
-
source: 'package.json',
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
// Optional dependencies
|
|
405
|
-
if (packageJson.optionalDependencies) {
|
|
406
|
-
for (const [name, version] of Object.entries(packageJson.optionalDependencies)) {
|
|
407
|
-
dependencies.push({
|
|
408
|
-
name,
|
|
409
|
-
version: String(version),
|
|
410
|
-
type: 'optional',
|
|
411
|
-
source: 'package.json',
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
catch {
|
|
417
|
-
// Invalid package.json
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
// Check requirements.txt
|
|
421
|
-
const requirementsPath = join(projectPath, 'requirements.txt');
|
|
422
|
-
if (existsSync(requirementsPath)) {
|
|
423
|
-
try {
|
|
424
|
-
const content = readFileSync(requirementsPath, 'utf-8');
|
|
425
|
-
const lines = content.split('\n');
|
|
426
|
-
for (const line of lines) {
|
|
427
|
-
const trimmed = line.trim();
|
|
428
|
-
if (!trimmed || trimmed.startsWith('#') || trimmed.startsWith('-'))
|
|
429
|
-
continue;
|
|
430
|
-
// Parse requirement: name==version, name>=version, name, etc.
|
|
431
|
-
const match = trimmed.match(/^([a-zA-Z0-9_-]+)(?:[=<>!~]+(.+))?/);
|
|
432
|
-
if (match && match[1]) {
|
|
433
|
-
dependencies.push({
|
|
434
|
-
name: match[1],
|
|
435
|
-
version: match[2] ?? '*',
|
|
436
|
-
type: 'production',
|
|
437
|
-
source: 'requirements.txt',
|
|
438
|
-
});
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
catch {
|
|
443
|
-
// Invalid requirements.txt
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
// Check pyproject.toml (Poetry/PEP 621)
|
|
447
|
-
const pyprojectPath = join(projectPath, 'pyproject.toml');
|
|
448
|
-
if (existsSync(pyprojectPath)) {
|
|
449
|
-
try {
|
|
450
|
-
const content = readFileSync(pyprojectPath, 'utf-8');
|
|
451
|
-
// Simple TOML parsing for dependencies
|
|
452
|
-
const depsMatch = content.match(/\[tool\.poetry\.dependencies\]([\s\S]*?)(?=\[|$)/);
|
|
453
|
-
if (depsMatch && depsMatch[1]) {
|
|
454
|
-
const depsSection = depsMatch[1];
|
|
455
|
-
const depLines = depsSection.match(/^(\w+)\s*=\s*["']?([^"'\n]+)["']?/gm) ?? [];
|
|
456
|
-
for (const line of depLines) {
|
|
457
|
-
const [name, version] = line.split('=').map(s => s.trim().replace(/['"]/g, ''));
|
|
458
|
-
if (name && name !== 'python') {
|
|
459
|
-
dependencies.push({
|
|
460
|
-
name,
|
|
461
|
-
version: version || '*',
|
|
462
|
-
type: 'production',
|
|
463
|
-
source: 'pyproject.toml',
|
|
464
|
-
});
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
catch {
|
|
470
|
-
// Invalid pyproject.toml
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
// Calculate by type
|
|
474
|
-
const byType = {};
|
|
475
|
-
for (const dep of dependencies) {
|
|
476
|
-
byType[dep.type] = (byType[dep.type] || 0) + 1;
|
|
477
|
-
}
|
|
478
|
-
return {
|
|
479
|
-
projectPath,
|
|
480
|
-
dependencies,
|
|
481
|
-
totalCount: dependencies.length,
|
|
482
|
-
byType,
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
* Perform full tree-sitter analysis on a file
|
|
487
|
-
*
|
|
488
|
-
* Returns complete AST analysis result.
|
|
489
|
-
*/
|
|
490
|
-
export async function analyzeFile(filePath) {
|
|
491
|
-
const analyzer = getAnalyzer();
|
|
492
|
-
return analyzer.analyzeFile(filePath);
|
|
493
|
-
}
|
|
494
|
-
/**
|
|
495
|
-
* Analyze multiple files in a directory
|
|
496
|
-
*
|
|
497
|
-
* Returns analysis results for all code files.
|
|
498
|
-
*/
|
|
499
|
-
export async function analyzeDirectory(dirPath, options = {}) {
|
|
500
|
-
const { extensions = ['.ts', '.tsx', '.js', '.jsx', '.py', '.yaml', '.yml', '.json', '.sh', '.tf'], maxFiles = 100, recursive = true, } = options;
|
|
501
|
-
const results = [];
|
|
502
|
-
const errors = [];
|
|
503
|
-
let fileCount = 0;
|
|
504
|
-
async function processDirectory(currentPath) {
|
|
505
|
-
if (fileCount >= maxFiles)
|
|
506
|
-
return;
|
|
507
|
-
try {
|
|
508
|
-
const items = readdirSync(currentPath);
|
|
509
|
-
for (const item of items) {
|
|
510
|
-
if (fileCount >= maxFiles)
|
|
511
|
-
break;
|
|
512
|
-
const fullPath = join(currentPath, item);
|
|
513
|
-
// Skip common non-code directories
|
|
514
|
-
if (['node_modules', 'dist', '.git', '__pycache__', 'coverage'].includes(item)) {
|
|
515
|
-
continue;
|
|
516
|
-
}
|
|
517
|
-
try {
|
|
518
|
-
const stats = statSync(fullPath);
|
|
519
|
-
if (stats.isDirectory() && recursive) {
|
|
520
|
-
await processDirectory(fullPath);
|
|
521
|
-
}
|
|
522
|
-
else if (stats.isFile()) {
|
|
523
|
-
const ext = extname(item).toLowerCase();
|
|
524
|
-
if (extensions.includes(ext)) {
|
|
525
|
-
try {
|
|
526
|
-
const analysis = await analyzeFile(fullPath);
|
|
527
|
-
results.push({ path: fullPath, analysis });
|
|
528
|
-
fileCount++;
|
|
529
|
-
}
|
|
530
|
-
catch (err) {
|
|
531
|
-
errors.push(`Failed to analyze ${fullPath}: ${err}`);
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
catch {
|
|
537
|
-
// Skip files we can't access
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
catch (err) {
|
|
542
|
-
errors.push(`Failed to read directory ${currentPath}: ${err}`);
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
await processDirectory(dirPath);
|
|
546
|
-
return { files: results, errors };
|
|
547
|
-
}
|
|
548
|
-
// Helper functions for parsing
|
|
549
|
-
function extractBraceBlock(content, startIndex) {
|
|
550
|
-
let depth = 1;
|
|
551
|
-
let i = startIndex + 1;
|
|
552
|
-
while (i < content.length && depth > 0) {
|
|
553
|
-
if (content[i] === '{')
|
|
554
|
-
depth++;
|
|
555
|
-
else if (content[i] === '}')
|
|
556
|
-
depth--;
|
|
557
|
-
i++;
|
|
558
|
-
}
|
|
559
|
-
return content.substring(startIndex + 1, i - 1);
|
|
560
|
-
}
|
|
561
|
-
function extractMethods(classBody) {
|
|
562
|
-
const methods = [];
|
|
563
|
-
const methodRegex = /(?:async\s+)?(\w+)\s*\([^)]*\)\s*(?::\s*[^{]+)?\s*\{/g;
|
|
564
|
-
let match;
|
|
565
|
-
while ((match = methodRegex.exec(classBody)) !== null) {
|
|
566
|
-
const methodName = match[1];
|
|
567
|
-
if (methodName && !['constructor', 'if', 'while', 'for', 'switch'].includes(methodName)) {
|
|
568
|
-
methods.push(methodName);
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
return [...new Set(methods)];
|
|
572
|
-
}
|
|
573
|
-
function extractProperties(classBody) {
|
|
574
|
-
const properties = [];
|
|
575
|
-
const propRegex = /(?:private|public|protected|readonly)?\s*(\w+)\s*(?::\s*[^;=]+)?(?:=|;)/g;
|
|
576
|
-
let match;
|
|
577
|
-
while ((match = propRegex.exec(classBody)) !== null) {
|
|
578
|
-
const propName = match[1];
|
|
579
|
-
if (propName && !['constructor', 'return', 'const', 'let', 'var'].includes(propName)) {
|
|
580
|
-
properties.push(propName);
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
return [...new Set(properties)];
|
|
584
|
-
}
|
|
585
|
-
function extractInterfaceMethods(interfaceBody) {
|
|
586
|
-
const methods = [];
|
|
587
|
-
const methodRegex = /(\w+)\s*\([^)]*\)\s*:/g;
|
|
588
|
-
let match;
|
|
589
|
-
while ((match = methodRegex.exec(interfaceBody)) !== null) {
|
|
590
|
-
const methodName = match[1];
|
|
591
|
-
if (methodName) {
|
|
592
|
-
methods.push(methodName);
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
return [...new Set(methods)];
|
|
596
|
-
}
|
|
597
|
-
function extractInterfaceProperties(interfaceBody) {
|
|
598
|
-
const properties = [];
|
|
599
|
-
const propRegex = /(\w+)\s*\??\s*:/g;
|
|
600
|
-
let match;
|
|
601
|
-
while ((match = propRegex.exec(interfaceBody)) !== null) {
|
|
602
|
-
const propName = match[1];
|
|
603
|
-
if (propName && !properties.includes(propName)) {
|
|
604
|
-
properties.push(propName);
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
return [...new Set(properties)];
|
|
608
|
-
}
|
|
609
|
-
function extractPythonMethods(content, startIndex, classIndent = 0) {
|
|
610
|
-
const methods = [];
|
|
611
|
-
// Expected method indentation is one level deeper than class (typically 4 spaces)
|
|
612
|
-
const expectedMethodIndent = classIndent + 4;
|
|
613
|
-
// Split content from startIndex into lines for line-by-line analysis
|
|
614
|
-
const remainingContent = content.substring(startIndex);
|
|
615
|
-
const lines = remainingContent.split('\n');
|
|
616
|
-
for (const line of lines) {
|
|
617
|
-
// Skip empty lines and comments
|
|
618
|
-
if (line.trim() === '' || line.trim().startsWith('#')) {
|
|
619
|
-
continue;
|
|
620
|
-
}
|
|
621
|
-
// Calculate line indentation (count leading spaces)
|
|
622
|
-
const lineIndent = line.length - line.trimStart().length;
|
|
623
|
-
// If we hit something at class level or less indentation (except empty/comment), class body ends
|
|
624
|
-
if (lineIndent <= classIndent && line.trim() !== '') {
|
|
625
|
-
break;
|
|
626
|
-
}
|
|
627
|
-
// Check for nested class at method level - skip it and its contents
|
|
628
|
-
const nestedClassMatch = line.match(/^(\s*)class\s+(\w+)/);
|
|
629
|
-
if (nestedClassMatch) {
|
|
630
|
-
// Nested class detected - don't include its methods in outer class
|
|
631
|
-
continue;
|
|
632
|
-
}
|
|
633
|
-
// Only match methods at exactly one indentation level deeper than the class
|
|
634
|
-
// This prevents capturing nested class methods
|
|
635
|
-
const methodMatch = line.match(/^(\s*)def\s+(\w+)\s*\(/);
|
|
636
|
-
if (methodMatch) {
|
|
637
|
-
const methodIndent = methodMatch[1]?.length ?? 0;
|
|
638
|
-
const methodName = methodMatch[2];
|
|
639
|
-
// Only capture methods at the expected indentation level
|
|
640
|
-
if (methodName && methodIndent === expectedMethodIndent) {
|
|
641
|
-
methods.push(methodName);
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
return methods;
|
|
646
|
-
}
|
|
647
|
-
//# sourceMappingURL=tree-sitter-code-tools.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tree-sitter-code-tools.js","sourceRoot":"","sources":["../../../src/tools/tree-sitter-code-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,EACL,kBAAkB,GAInB,MAAM,kCAAkC,CAAC;AAE1C,8BAA8B;AAC9B,IAAI,gBAAgB,GAA8B,IAAI,CAAC;AAEvD,SAAS,WAAW;IAClB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,gBAAgB,GAAG,IAAI,kBAAkB,EAAE,CAAC;IAC9C,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AA+GD,kCAAkC;AAClC,MAAM,qBAAqB,GAA2B;IACpD,KAAK,EAAE,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