mcp-adr-analysis-server 2.7.28 → 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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mcp-adr-analysis-server",
3
3
  "mcpName": "io.github.tosin2013/mcp-adr-analysis-server",
4
- "version": "2.7.28",
4
+ "version": "2.7.30",
5
5
  "description": "MCP server for analyzing Architectural Decision Records and project architecture",
6
6
  "main": "dist/src/index.js",
7
7
  "type": "module",
@@ -1,189 +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 { CodeAnalysisResult, type ImportAnalysis, type FunctionAnalysis } from '../utils/tree-sitter-analyzer.js';
21
- /**
22
- * File structure entry
23
- */
24
- export interface FileEntry {
25
- path: string;
26
- relativePath: string;
27
- type: 'file' | 'directory';
28
- extension?: string;
29
- language?: string;
30
- size?: number;
31
- }
32
- /**
33
- * Project structure result
34
- */
35
- export interface ProjectStructureResult {
36
- root: string;
37
- totalFiles: number;
38
- totalDirectories: number;
39
- filesByLanguage: Record<string, number>;
40
- entries: FileEntry[];
41
- }
42
- /**
43
- * Import extraction result
44
- */
45
- export interface ImportExtractionResult {
46
- file: string;
47
- language: string;
48
- imports: ImportAnalysis[];
49
- externalDependencies: string[];
50
- internalDependencies: string[];
51
- }
52
- /**
53
- * Function extraction result
54
- */
55
- export interface FunctionExtractionResult {
56
- file: string;
57
- language: string;
58
- functions: FunctionAnalysis[];
59
- totalFunctions: number;
60
- securitySensitiveFunctions: string[];
61
- }
62
- /**
63
- * Class/Module definition
64
- */
65
- export interface ClassDefinition {
66
- name: string;
67
- type: 'class' | 'interface' | 'type' | 'enum';
68
- methods: string[];
69
- properties: string[];
70
- location: {
71
- line: number;
72
- column: number;
73
- };
74
- exported: boolean;
75
- }
76
- /**
77
- * Class extraction result
78
- */
79
- export interface ClassExtractionResult {
80
- file: string;
81
- language: string;
82
- classes: ClassDefinition[];
83
- interfaces: ClassDefinition[];
84
- types: ClassDefinition[];
85
- }
86
- /**
87
- * Dependency from package.json or requirements.txt
88
- */
89
- export interface DependencyInfo {
90
- name: string;
91
- version: string;
92
- type: 'production' | 'development' | 'peer' | 'optional';
93
- source: string;
94
- }
95
- /**
96
- * Project dependencies result
97
- */
98
- export interface DependenciesResult {
99
- projectPath: string;
100
- dependencies: DependencyInfo[];
101
- totalCount: number;
102
- byType: Record<string, number>;
103
- }
104
- /**
105
- * Export definition
106
- */
107
- export interface ExportDefinition {
108
- name: string;
109
- type: 'function' | 'class' | 'const' | 'type' | 'interface' | 'default' | 'variable';
110
- location: {
111
- line: number;
112
- column: number;
113
- };
114
- isDefault: boolean;
115
- }
116
- /**
117
- * Export extraction result
118
- */
119
- export interface ExportExtractionResult {
120
- file: string;
121
- language: string;
122
- exports: ExportDefinition[];
123
- hasDefaultExport: boolean;
124
- namedExports: string[];
125
- }
126
- /**
127
- * Get deterministic file structure of a project
128
- *
129
- * Returns a complete file tree without any search or filtering.
130
- * The LLM can then decide which files are relevant.
131
- */
132
- export declare function getFileStructure(projectPath: string, options?: {
133
- maxDepth?: number;
134
- includeHidden?: boolean;
135
- excludePatterns?: string[];
136
- }): Promise<ProjectStructureResult>;
137
- /**
138
- * Get AST-extracted imports from a file
139
- *
140
- * Returns deterministic list of all imports/requires in a file.
141
- */
142
- export declare function getImports(filePath: string): Promise<ImportExtractionResult>;
143
- /**
144
- * Get AST-extracted exports from a file
145
- *
146
- * Returns deterministic list of all exports in a file.
147
- */
148
- export declare function getExports(filePath: string): Promise<ExportExtractionResult>;
149
- /**
150
- * Get AST-extracted functions from a file
151
- *
152
- * Returns deterministic list of all functions with signatures.
153
- */
154
- export declare function getFunctions(filePath: string): Promise<FunctionExtractionResult>;
155
- /**
156
- * Get classes, interfaces, and types from a file
157
- *
158
- * Returns deterministic list of class/interface/type definitions.
159
- */
160
- export declare function getClasses(filePath: string): Promise<ClassExtractionResult>;
161
- /**
162
- * Get project dependencies from manifest files
163
- *
164
- * Parses package.json, requirements.txt, etc. for dependencies.
165
- */
166
- export declare function getDependencies(projectPath: string): Promise<DependenciesResult>;
167
- /**
168
- * Perform full tree-sitter analysis on a file
169
- *
170
- * Returns complete AST analysis result.
171
- */
172
- export declare function analyzeFile(filePath: string): Promise<CodeAnalysisResult>;
173
- /**
174
- * Analyze multiple files in a directory
175
- *
176
- * Returns analysis results for all code files.
177
- */
178
- export declare function analyzeDirectory(dirPath: string, options?: {
179
- extensions?: string[];
180
- maxFiles?: number;
181
- recursive?: boolean;
182
- }): Promise<{
183
- files: Array<{
184
- path: string;
185
- analysis: CodeAnalysisResult;
186
- }>;
187
- errors: string[];
188
- }>;
189
- //# sourceMappingURL=tree-sitter-code-tools.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tree-sitter-code-tools.d.ts","sourceRoot":"","sources":["../../../src/tools/tree-sitter-code-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAEL,kBAAkB,EAClB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,kCAAkC,CAAC;AAY1C;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,WAAW,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