mcp-code-context 2.5.1 → 3.0.4
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/CHANGELOG.md +92 -236
- package/README.md +304 -298
- package/dist/src/core/engine.d.ts +21 -0
- package/dist/src/core/engine.js +68 -0
- package/dist/src/core/engine.js.map +1 -0
- package/dist/src/core/validator.d.ts +15 -0
- package/dist/src/core/validator.js +44 -0
- package/dist/src/core/validator.js.map +1 -0
- package/dist/src/index.d.ts +7 -11
- package/dist/src/index.js +182 -397
- package/dist/src/index.js.map +1 -1
- package/dist/src/operations/write.d.ts +51 -0
- package/dist/src/operations/write.js +169 -0
- package/dist/src/operations/write.js.map +1 -0
- package/dist/src/parsers/base.d.ts +28 -0
- package/dist/src/parsers/base.js +27 -0
- package/dist/src/parsers/base.js.map +1 -0
- package/dist/src/parsers/dartTreeSitter.d.ts +13 -0
- package/dist/src/parsers/dartTreeSitter.js +91 -0
- package/dist/src/parsers/dartTreeSitter.js.map +1 -0
- package/dist/src/parsers/php.d.ts +12 -0
- package/dist/src/parsers/php.js +86 -0
- package/dist/src/parsers/php.js.map +1 -0
- package/dist/src/parsers/python.d.ts +12 -0
- package/dist/src/parsers/python.js +86 -0
- package/dist/src/parsers/python.js.map +1 -0
- package/dist/src/parsers/registry.d.ts +15 -0
- package/dist/src/parsers/registry.js +70 -0
- package/dist/src/parsers/registry.js.map +1 -0
- package/dist/src/parsers/typescript.d.ts +13 -0
- package/dist/src/parsers/typescript.js +98 -0
- package/dist/src/parsers/typescript.js.map +1 -0
- package/llms.txt +246 -234
- package/mcp-code-context-3.0.2.tgz +0 -0
- package/package.json +59 -57
- package/tsconfig.tests.json +27 -0
- package/.io/RULES.md +0 -12
- package/CONTRIBUTING.md +0 -243
- package/PLAN_v2.5.0.md +0 -407
- package/TROUBLESHOOTING.md +0 -38
- package/dist/src/ast/dartCompressor.d.ts +0 -27
- package/dist/src/ast/dartCompressor.js +0 -859
- package/dist/src/ast/dartCompressor.js.map +0 -1
- package/dist/src/ast/phpCompressor.d.ts +0 -24
- package/dist/src/ast/phpCompressor.js +0 -634
- package/dist/src/ast/phpCompressor.js.map +0 -1
- package/dist/src/ast/semanticCompressor.d.ts +0 -22
- package/dist/src/ast/semanticCompressor.js +0 -677
- package/dist/src/ast/semanticCompressor.js.map +0 -1
- package/dist/src/ast/writers/dartWriter.d.ts +0 -37
- package/dist/src/ast/writers/dartWriter.js +0 -544
- package/dist/src/ast/writers/dartWriter.js.map +0 -1
- package/dist/src/ast/writers/phpWriter.d.ts +0 -37
- package/dist/src/ast/writers/phpWriter.js +0 -411
- package/dist/src/ast/writers/phpWriter.js.map +0 -1
- package/dist/src/ast/writers/pyWriter.d.ts +0 -37
- package/dist/src/ast/writers/pyWriter.js +0 -355
- package/dist/src/ast/writers/pyWriter.js.map +0 -1
- package/dist/src/ast/writers/safeRename.d.ts +0 -14
- package/dist/src/ast/writers/safeRename.js +0 -258
- package/dist/src/ast/writers/safeRename.js.map +0 -1
- package/dist/src/ast/writers/symbolWriter.d.ts +0 -64
- package/dist/src/ast/writers/symbolWriter.js +0 -174
- package/dist/src/ast/writers/symbolWriter.js.map +0 -1
- package/dist/src/ast/writers/tsWriter.d.ts +0 -38
- package/dist/src/ast/writers/tsWriter.js +0 -344
- package/dist/src/ast/writers/tsWriter.js.map +0 -1
- package/dist/src/cache/astCache.d.ts +0 -39
- package/dist/src/cache/astCache.js +0 -169
- package/dist/src/cache/astCache.js.map +0 -1
- package/dist/src/handlers/readHandlers.d.ts +0 -70
- package/dist/src/handlers/readHandlers.js +0 -455
- package/dist/src/handlers/readHandlers.js.map +0 -1
- package/dist/src/handlers/utilHandlers.d.ts +0 -31
- package/dist/src/handlers/utilHandlers.js +0 -69
- package/dist/src/handlers/utilHandlers.js.map +0 -1
- package/dist/src/handlers/writeHandlers.d.ts +0 -57
- package/dist/src/handlers/writeHandlers.js +0 -499
- package/dist/src/handlers/writeHandlers.js.map +0 -1
- package/dist/src/tools/readFileLines.d.ts +0 -26
- package/dist/src/tools/readFileLines.js +0 -77
- package/dist/src/tools/readFileLines.js.map +0 -1
- package/dist/src/tools/searchCodePattern.d.ts +0 -37
- package/dist/src/tools/searchCodePattern.js +0 -144
- package/dist/src/tools/searchCodePattern.js.map +0 -1
- package/dist/src/utils/arrayUtils.d.ts +0 -12
- package/dist/src/utils/arrayUtils.js +0 -27
- package/dist/src/utils/arrayUtils.js.map +0 -1
- package/dist/src/utils/backupManager.d.ts +0 -31
- package/dist/src/utils/backupManager.js +0 -124
- package/dist/src/utils/backupManager.js.map +0 -1
- package/dist/src/utils/confirmationCache.d.ts +0 -16
- package/dist/src/utils/confirmationCache.js +0 -40
- package/dist/src/utils/confirmationCache.js.map +0 -1
- package/dist/src/utils/constants.d.ts +0 -46
- package/dist/src/utils/constants.js +0 -112
- package/dist/src/utils/constants.js.map +0 -1
- package/dist/src/utils/dependencyChecker.d.ts +0 -1
- package/dist/src/utils/dependencyChecker.js +0 -55
- package/dist/src/utils/dependencyChecker.js.map +0 -1
- package/dist/src/utils/diffEngine.d.ts +0 -21
- package/dist/src/utils/diffEngine.js +0 -163
- package/dist/src/utils/diffEngine.js.map +0 -1
- package/dist/src/utils/fuzzyMatch.d.ts +0 -8
- package/dist/src/utils/fuzzyMatch.js +0 -69
- package/dist/src/utils/fuzzyMatch.js.map +0 -1
- package/dist/src/utils/ignoreManager.d.ts +0 -30
- package/dist/src/utils/ignoreManager.js +0 -186
- package/dist/src/utils/ignoreManager.js.map +0 -1
- package/dist/src/utils/normalization.d.ts +0 -49
- package/dist/src/utils/normalization.js +0 -173
- package/dist/src/utils/normalization.js.map +0 -1
- package/dist/src/utils/projectRoot.d.ts +0 -17
- package/dist/src/utils/projectRoot.js +0 -42
- package/dist/src/utils/projectRoot.js.map +0 -1
- package/dist/src/utils/secureValidation.d.ts +0 -15
- package/dist/src/utils/secureValidation.js +0 -41
- package/dist/src/utils/secureValidation.js.map +0 -1
- package/dist/src/utils/syntaxValidator.d.ts +0 -15
- package/dist/src/utils/syntaxValidator.js +0 -218
- package/dist/src/utils/syntaxValidator.js.map +0 -1
- package/dist/src/utils/transactionManager.d.ts +0 -46
- package/dist/src/utils/transactionManager.js +0 -123
- package/dist/src/utils/transactionManager.js.map +0 -1
- package/dist/src/utils/validation.d.ts +0 -87
- package/dist/src/utils/validation.js +0 -231
- package/dist/src/utils/validation.js.map +0 -1
- package/docs/ARCHITECTURE.md +0 -300
- package/docs/architecture/ADR-001-modular-handlers.md +0 -119
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* search_code_pattern — Search for code patterns across files
|
|
3
|
-
*
|
|
4
|
-
* AST-aware search that finds patterns in code while optionally excluding
|
|
5
|
-
* matches in strings, comments, and other non-code contexts.
|
|
6
|
-
*/
|
|
7
|
-
export interface SearchCodePatternArgs {
|
|
8
|
-
rootDir: string;
|
|
9
|
-
pattern: string;
|
|
10
|
-
fileExtensions?: string[];
|
|
11
|
-
excludeDirs?: string[];
|
|
12
|
-
showContext?: boolean;
|
|
13
|
-
contextLines?: number;
|
|
14
|
-
maxResults?: number;
|
|
15
|
-
astAware?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export interface SearchMatch {
|
|
18
|
-
file: string;
|
|
19
|
-
lineNumber: number;
|
|
20
|
-
line: string;
|
|
21
|
-
context?: string[];
|
|
22
|
-
}
|
|
23
|
-
export interface SearchCodePatternResult {
|
|
24
|
-
success: boolean;
|
|
25
|
-
matches?: SearchMatch[];
|
|
26
|
-
error?: string;
|
|
27
|
-
totalMatches?: number;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Synchronous version (deprecated, use async version)
|
|
31
|
-
* @deprecated Use searchCodePattern (async) instead
|
|
32
|
-
*/
|
|
33
|
-
export declare function searchCodePatternSync(args: SearchCodePatternArgs): SearchCodePatternResult;
|
|
34
|
-
/**
|
|
35
|
-
* Search for a pattern across code files (async)
|
|
36
|
-
*/
|
|
37
|
-
export declare function searchCodePattern(args: SearchCodePatternArgs): Promise<SearchCodePatternResult>;
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* search_code_pattern — Search for code patterns across files
|
|
3
|
-
*
|
|
4
|
-
* AST-aware search that finds patterns in code while optionally excluding
|
|
5
|
-
* matches in strings, comments, and other non-code contexts.
|
|
6
|
-
*/
|
|
7
|
-
import * as fs from "node:fs";
|
|
8
|
-
import * as path from "node:path";
|
|
9
|
-
import { IgnoreManager } from "../utils/ignoreManager.js";
|
|
10
|
-
/**
|
|
11
|
-
* Synchronous version (deprecated, use async version)
|
|
12
|
-
* @deprecated Use searchCodePattern (async) instead
|
|
13
|
-
*/
|
|
14
|
-
export function searchCodePatternSync(args) {
|
|
15
|
-
const { rootDir, pattern, fileExtensions = DEFAULT_EXTENSIONS, excludeDirs = ["node_modules", "dist", "build", ".git"], showContext = true, contextLines = 3, maxResults = 50, } = args;
|
|
16
|
-
const resolvedRoot = path.resolve(rootDir);
|
|
17
|
-
if (!fs.existsSync(resolvedRoot)) {
|
|
18
|
-
return {
|
|
19
|
-
success: false,
|
|
20
|
-
error: `Directory not found: ${resolvedRoot}`,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
const ignoreManager = new IgnoreManager(resolvedRoot);
|
|
24
|
-
const allFiles = ignoreManager.walkDirectory();
|
|
25
|
-
const matches = [];
|
|
26
|
-
let totalMatches = 0;
|
|
27
|
-
const regex = new RegExp(pattern, "gi");
|
|
28
|
-
for (const file of allFiles) {
|
|
29
|
-
const ext = path.extname(file).toLowerCase();
|
|
30
|
-
if (!fileExtensions.includes(ext))
|
|
31
|
-
continue;
|
|
32
|
-
const relativePath = path.relative(resolvedRoot, file);
|
|
33
|
-
if (excludeDirs.some(dir => relativePath.includes(dir)))
|
|
34
|
-
continue;
|
|
35
|
-
let content;
|
|
36
|
-
try {
|
|
37
|
-
content = fs.readFileSync(file, "utf-8");
|
|
38
|
-
}
|
|
39
|
-
catch {
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
const lines = content.split("\n");
|
|
43
|
-
for (let i = 0; i < lines.length; i++) {
|
|
44
|
-
const line = lines[i];
|
|
45
|
-
if (regex.test(line)) {
|
|
46
|
-
totalMatches++;
|
|
47
|
-
if (matches.length < maxResults) {
|
|
48
|
-
const match = {
|
|
49
|
-
file: path.relative(resolvedRoot, file).replace(/\\/g, "/"),
|
|
50
|
-
lineNumber: i + 1,
|
|
51
|
-
line: line.trim(),
|
|
52
|
-
};
|
|
53
|
-
if (showContext) {
|
|
54
|
-
const start = Math.max(0, i - contextLines);
|
|
55
|
-
const end = Math.min(lines.length - 1, i + contextLines);
|
|
56
|
-
match.context = lines.slice(start, end + 1).map((l, idx) => {
|
|
57
|
-
const lineNum = start + idx + 1;
|
|
58
|
-
const marker = lineNum === i + 1 ? ">" : " ";
|
|
59
|
-
return `${marker} ${lineNum}: ${l}`;
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
matches.push(match);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
regex.lastIndex = 0;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return {
|
|
69
|
-
success: true,
|
|
70
|
-
matches,
|
|
71
|
-
totalMatches,
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
const DEFAULT_EXTENSIONS = [
|
|
75
|
-
".ts", ".tsx", ".js", ".jsx", ".mts", ".mjs",
|
|
76
|
-
".py", ".php", ".dart", ".java", ".go", ".rs"
|
|
77
|
-
];
|
|
78
|
-
/**
|
|
79
|
-
* Search for a pattern across code files (async)
|
|
80
|
-
*/
|
|
81
|
-
export async function searchCodePattern(args) {
|
|
82
|
-
const { rootDir, pattern, fileExtensions = DEFAULT_EXTENSIONS, excludeDirs = ["node_modules", "dist", "build", ".git"], showContext = true, contextLines = 3, maxResults = 50, astAware = false, } = args;
|
|
83
|
-
const resolvedRoot = path.resolve(rootDir);
|
|
84
|
-
if (!fs.existsSync(resolvedRoot)) {
|
|
85
|
-
return {
|
|
86
|
-
success: false,
|
|
87
|
-
error: `Directory not found: ${resolvedRoot}`,
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
const ignoreManager = new IgnoreManager(resolvedRoot);
|
|
91
|
-
const allFiles = await ignoreManager.walkDirectoryAsync();
|
|
92
|
-
const matches = [];
|
|
93
|
-
let totalMatches = 0;
|
|
94
|
-
const regex = new RegExp(pattern, "gi");
|
|
95
|
-
for (const file of allFiles) {
|
|
96
|
-
// Check extension
|
|
97
|
-
const ext = path.extname(file).toLowerCase();
|
|
98
|
-
if (!fileExtensions.includes(ext))
|
|
99
|
-
continue;
|
|
100
|
-
// Check excluded directories
|
|
101
|
-
const relativePath = path.relative(resolvedRoot, file);
|
|
102
|
-
if (excludeDirs.some(dir => relativePath.includes(dir)))
|
|
103
|
-
continue;
|
|
104
|
-
let content;
|
|
105
|
-
try {
|
|
106
|
-
content = await fs.promises.readFile(file, "utf-8");
|
|
107
|
-
}
|
|
108
|
-
catch {
|
|
109
|
-
continue;
|
|
110
|
-
}
|
|
111
|
-
const lines = content.split("\n");
|
|
112
|
-
for (let i = 0; i < lines.length; i++) {
|
|
113
|
-
const line = lines[i];
|
|
114
|
-
if (regex.test(line)) {
|
|
115
|
-
totalMatches++;
|
|
116
|
-
if (matches.length < maxResults) {
|
|
117
|
-
const match = {
|
|
118
|
-
file: path.relative(resolvedRoot, file).replace(/\\/g, "/"),
|
|
119
|
-
lineNumber: i + 1,
|
|
120
|
-
line: line.trim(),
|
|
121
|
-
};
|
|
122
|
-
if (showContext) {
|
|
123
|
-
const start = Math.max(0, i - contextLines);
|
|
124
|
-
const end = Math.min(lines.length - 1, i + contextLines);
|
|
125
|
-
match.context = lines.slice(start, end + 1).map((l, idx) => {
|
|
126
|
-
const lineNum = start + idx + 1;
|
|
127
|
-
const marker = lineNum === i + 1 ? ">" : " ";
|
|
128
|
-
return `${marker} ${lineNum}: ${l}`;
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
matches.push(match);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
// Reset regex lastIndex for global flag
|
|
135
|
-
regex.lastIndex = 0;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return {
|
|
139
|
-
success: true,
|
|
140
|
-
matches,
|
|
141
|
-
totalMatches,
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
//# sourceMappingURL=searchCodePattern.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"searchCodePattern.js","sourceRoot":"","sources":["../../../src/tools/searchCodePattern.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AA2B1D;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAA2B;IAC/D,MAAM,EACJ,OAAO,EACP,OAAO,EACP,cAAc,GAAG,kBAAkB,EACnC,WAAW,GAAG,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,EACvD,WAAW,GAAG,IAAI,EAClB,YAAY,GAAG,CAAC,EAChB,UAAU,GAAG,EAAE,GAChB,GAAG,IAAI,CAAC;IAET,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACjC,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,wBAAwB,YAAY,EAAE;SAC9C,CAAC;IACJ,CAAC;IAED,MAAM,aAAa,GAAG,IAAI,aAAa,CAAC,YAAY,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,aAAa,CAAC,aAAa,EAAE,CAAC;IAE/C,MAAM,OAAO,GAAkB,EAAE,CAAC;IAClC,IAAI,YAAY,GAAG,CAAC,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AE,CAAC;wBACtC,CAAC,CAAC,CAAC;oBACL,CAAC;oBAED,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACtB,CAAC;YACH,CAAC;YAED,wCAAwC;YACxC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IAED,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO;QACP,YAAY;KACb,CAAC;AACJ,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Array utility functions for async processing
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Splits an array into chunks of specified size
|
|
6
|
-
* Used for batching async operations to prevent overwhelming the event loop
|
|
7
|
-
*/
|
|
8
|
-
export declare function chunkArray<T>(array: T[], chunkSize: number): T[][];
|
|
9
|
-
/**
|
|
10
|
-
* Process array items in parallel batches with concurrency limit
|
|
11
|
-
*/
|
|
12
|
-
export declare function processBatched<T, R>(items: T[], processor: (item: T) => Promise<R>, batchSize?: number): Promise<R[]>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Array utility functions for async processing
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Splits an array into chunks of specified size
|
|
6
|
-
* Used for batching async operations to prevent overwhelming the event loop
|
|
7
|
-
*/
|
|
8
|
-
export function chunkArray(array, chunkSize) {
|
|
9
|
-
const chunks = [];
|
|
10
|
-
for (let i = 0; i < array.length; i += chunkSize) {
|
|
11
|
-
chunks.push(array.slice(i, i + chunkSize));
|
|
12
|
-
}
|
|
13
|
-
return chunks;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Process array items in parallel batches with concurrency limit
|
|
17
|
-
*/
|
|
18
|
-
export async function processBatched(items, processor, batchSize = 50) {
|
|
19
|
-
const chunks = chunkArray(items, batchSize);
|
|
20
|
-
const results = [];
|
|
21
|
-
for (const chunk of chunks) {
|
|
22
|
-
const chunkResults = await Promise.all(chunk.map(processor));
|
|
23
|
-
results.push(...chunkResults);
|
|
24
|
-
}
|
|
25
|
-
return results;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=arrayUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arrayUtils.js","sourceRoot":"","sources":["../../../src/utils/arrayUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAI,KAAU,EAAE,SAAiB;IACzD,MAAM,MAAM,GAAU,EAAE,CAAC;IACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,SAAS,EAAE,CAAC;QACjD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,KAAU,EACV,SAAkC,EAClC,YAAoB,EAAE;IAEtB,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAQ,EAAE,CAAC;IAExB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;QAC7D,OAAO,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* backupManager.ts — File Backup & Restore Utility
|
|
3
|
-
*
|
|
4
|
-
* Provides opt-in backup functionality for surgical write operations.
|
|
5
|
-
* Creates centralized `.mcp-backups/` directory at project root.
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* - Before modifying: createBackup(filePath) → returns backup path
|
|
9
|
-
* - On failure: restoreBackup(filePath) → restores from backup
|
|
10
|
-
* - Cleanup: cleanAllBackups(projectRoot) → removes all backups
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Create a backup copy of a file before modifying it.
|
|
14
|
-
* Keeps a rolling window of the last 5 backups per file in a centralized directory.
|
|
15
|
-
*
|
|
16
|
-
* Backups are stored at: [project-root]/.mcp-backups/[relative-path]/[filename].N.backup
|
|
17
|
-
*/
|
|
18
|
-
export declare function createBackup(filePath: string): string;
|
|
19
|
-
/**
|
|
20
|
-
* Restore a file from its backup.
|
|
21
|
-
*/
|
|
22
|
-
export declare function restoreBackup(filePath: string, steps?: number): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Clean all backups for a project.
|
|
25
|
-
* Removes the entire .mcp-backups directory at project root.
|
|
26
|
-
*/
|
|
27
|
-
export declare function cleanAllBackups(projectRoot: string): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Clean legacy backups (no-op, kept for compatibility).
|
|
30
|
-
*/
|
|
31
|
-
export declare function cleanBackup(filePath: string): void;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* backupManager.ts — File Backup & Restore Utility
|
|
3
|
-
*
|
|
4
|
-
* Provides opt-in backup functionality for surgical write operations.
|
|
5
|
-
* Creates centralized `.mcp-backups/` directory at project root.
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* - Before modifying: createBackup(filePath) → returns backup path
|
|
9
|
-
* - On failure: restoreBackup(filePath) → restores from backup
|
|
10
|
-
* - Cleanup: cleanAllBackups(projectRoot) → removes all backups
|
|
11
|
-
*/
|
|
12
|
-
import * as fs from "node:fs";
|
|
13
|
-
import * as path from "node:path";
|
|
14
|
-
import { findProjectRoot } from "./projectRoot.js";
|
|
15
|
-
/**
|
|
16
|
-
* Create a backup copy of a file before modifying it.
|
|
17
|
-
* Keeps a rolling window of the last 5 backups per file in a centralized directory.
|
|
18
|
-
*
|
|
19
|
-
* Backups are stored at: [project-root]/.mcp-backups/[relative-path]/[filename].N.backup
|
|
20
|
-
*/
|
|
21
|
-
export function createBackup(filePath) {
|
|
22
|
-
if (!fs.existsSync(filePath))
|
|
23
|
-
return "";
|
|
24
|
-
// Find project root
|
|
25
|
-
const projectRoot = findProjectRoot(filePath);
|
|
26
|
-
if (!projectRoot) {
|
|
27
|
-
// Fallback to old behavior if no project root found
|
|
28
|
-
return createBackupLegacy(filePath);
|
|
29
|
-
}
|
|
30
|
-
// Calculate relative path from project root
|
|
31
|
-
const relativePath = path.relative(projectRoot, filePath);
|
|
32
|
-
const parsed = path.parse(relativePath);
|
|
33
|
-
// Create centralized backup directory
|
|
34
|
-
const backupDir = path.join(projectRoot, ".mcp-backups", parsed.dir);
|
|
35
|
-
if (!fs.existsSync(backupDir)) {
|
|
36
|
-
fs.mkdirSync(backupDir, { recursive: true });
|
|
37
|
-
}
|
|
38
|
-
// Push existing backups down the stack (max 5)
|
|
39
|
-
for (let i = 4; i >= 1; i--) {
|
|
40
|
-
const oldB = path.join(backupDir, `${parsed.base}.${i}.backup`);
|
|
41
|
-
const newB = path.join(backupDir, `${parsed.base}.${i + 1}.backup`);
|
|
42
|
-
if (fs.existsSync(oldB)) {
|
|
43
|
-
if (i === 4 && fs.existsSync(newB)) {
|
|
44
|
-
fs.unlinkSync(newB); // Drop the 5th one to make room
|
|
45
|
-
}
|
|
46
|
-
fs.renameSync(oldB, newB);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const backupPath = path.join(backupDir, `${parsed.base}.1.backup`);
|
|
50
|
-
fs.copyFileSync(filePath, backupPath);
|
|
51
|
-
return backupPath;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Legacy backup function (creates .mcp-backups in same directory)
|
|
55
|
-
* Used as fallback when project root cannot be determined
|
|
56
|
-
*/
|
|
57
|
-
function createBackupLegacy(filePath) {
|
|
58
|
-
const parsed = path.parse(filePath);
|
|
59
|
-
const backupDir = path.join(parsed.dir, ".mcp-backups");
|
|
60
|
-
if (!fs.existsSync(backupDir)) {
|
|
61
|
-
fs.mkdirSync(backupDir, { recursive: true });
|
|
62
|
-
}
|
|
63
|
-
for (let i = 4; i >= 1; i--) {
|
|
64
|
-
const oldB = path.join(backupDir, `${parsed.base}.${i}.backup`);
|
|
65
|
-
const newB = path.join(backupDir, `${parsed.base}.${i + 1}.backup`);
|
|
66
|
-
if (fs.existsSync(oldB)) {
|
|
67
|
-
if (i === 4 && fs.existsSync(newB)) {
|
|
68
|
-
fs.unlinkSync(newB);
|
|
69
|
-
}
|
|
70
|
-
fs.renameSync(oldB, newB);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
const backupPath = path.join(backupDir, `${parsed.base}.1.backup`);
|
|
74
|
-
fs.copyFileSync(filePath, backupPath);
|
|
75
|
-
return backupPath;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Restore a file from its backup.
|
|
79
|
-
*/
|
|
80
|
-
export function restoreBackup(filePath, steps = 1) {
|
|
81
|
-
// Try centralized backup first
|
|
82
|
-
const projectRoot = findProjectRoot(filePath);
|
|
83
|
-
if (projectRoot) {
|
|
84
|
-
const relativePath = path.relative(projectRoot, filePath);
|
|
85
|
-
const parsed = path.parse(relativePath);
|
|
86
|
-
const backupDir = path.join(projectRoot, ".mcp-backups", parsed.dir);
|
|
87
|
-
const targetBackup = path.join(backupDir, `${parsed.base}.${steps}.backup`);
|
|
88
|
-
if (fs.existsSync(targetBackup)) {
|
|
89
|
-
fs.copyFileSync(targetBackup, filePath);
|
|
90
|
-
return true;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
// Fallback to legacy location
|
|
94
|
-
const parsed = path.parse(filePath);
|
|
95
|
-
const backupDir = path.join(parsed.dir, ".mcp-backups");
|
|
96
|
-
const targetBackup = path.join(backupDir, `${parsed.base}.${steps}.backup`);
|
|
97
|
-
if (!fs.existsSync(targetBackup))
|
|
98
|
-
return false;
|
|
99
|
-
fs.copyFileSync(targetBackup, filePath);
|
|
100
|
-
return true;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Clean all backups for a project.
|
|
104
|
-
* Removes the entire .mcp-backups directory at project root.
|
|
105
|
-
*/
|
|
106
|
-
export function cleanAllBackups(projectRoot) {
|
|
107
|
-
const backupDir = path.join(projectRoot, ".mcp-backups");
|
|
108
|
-
if (!fs.existsSync(backupDir))
|
|
109
|
-
return false;
|
|
110
|
-
try {
|
|
111
|
-
fs.rmSync(backupDir, { recursive: true, force: true });
|
|
112
|
-
return true;
|
|
113
|
-
}
|
|
114
|
-
catch {
|
|
115
|
-
return false;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Clean legacy backups (no-op, kept for compatibility).
|
|
120
|
-
*/
|
|
121
|
-
export function cleanBackup(filePath) {
|
|
122
|
-
// No-op. We keep the rolling 5 versions instead of deleting.
|
|
123
|
-
}
|
|
124
|
-
//# sourceMappingURL=backupManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"backupManager.js","sourceRoot":"","sources":["../../../src/utils/backupManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,EAAE,CAAC;IAExC,oBAAoB;IACpB,MAAM,WAAW,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,oDAAoD;QACpD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,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,WAAmB;IACjD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IAEzD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC;QAAE,OAAO,KAAK,CAAC;IAE5C,IAAI,CAAC;QACH,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACvD,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,QAAgB;IAC1C,6DAA6D;AAC/D,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface PendingOperation {
|
|
2
|
-
token: string;
|
|
3
|
-
operation: "write_file_surgical" | "insert_symbol" | "rename_symbol" | "remove_symbol";
|
|
4
|
-
filePath: string;
|
|
5
|
-
payload: any;
|
|
6
|
-
expiresAt: number;
|
|
7
|
-
}
|
|
8
|
-
declare class ConfirmationCacheManager {
|
|
9
|
-
private cache;
|
|
10
|
-
add(operation: PendingOperation["operation"], filePath: string, payload: any): string;
|
|
11
|
-
get(token: string): PendingOperation | undefined;
|
|
12
|
-
consume(token: string): PendingOperation | undefined;
|
|
13
|
-
private cleanup;
|
|
14
|
-
}
|
|
15
|
-
export declare const confirmationCache: ConfirmationCacheManager;
|
|
16
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import crypto from "node:crypto";
|
|
2
|
-
const CACHE_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
|
|
3
|
-
class ConfirmationCacheManager {
|
|
4
|
-
cache = new Map();
|
|
5
|
-
add(operation, filePath, payload) {
|
|
6
|
-
const token = crypto.randomUUID();
|
|
7
|
-
this.cache.set(token, {
|
|
8
|
-
token,
|
|
9
|
-
operation,
|
|
10
|
-
filePath,
|
|
11
|
-
payload,
|
|
12
|
-
expiresAt: Date.now() + CACHE_TIMEOUT_MS,
|
|
13
|
-
});
|
|
14
|
-
// Clean up expired items lazily
|
|
15
|
-
this.cleanup();
|
|
16
|
-
return token;
|
|
17
|
-
}
|
|
18
|
-
get(token) {
|
|
19
|
-
this.cleanup();
|
|
20
|
-
return this.cache.get(token);
|
|
21
|
-
}
|
|
22
|
-
consume(token) {
|
|
23
|
-
this.cleanup();
|
|
24
|
-
const op = this.cache.get(token);
|
|
25
|
-
if (op) {
|
|
26
|
-
this.cache.delete(token);
|
|
27
|
-
}
|
|
28
|
-
return op;
|
|
29
|
-
}
|
|
30
|
-
cleanup() {
|
|
31
|
-
const now = Date.now();
|
|
32
|
-
for (const [key, value] of this.cache.entries()) {
|
|
33
|
-
if (now > value.expiresAt) {
|
|
34
|
-
this.cache.delete(key);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
export const confirmationCache = new ConfirmationCacheManager();
|
|
40
|
-
//# sourceMappingURL=confirmationCache.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"confirmationCache.js","sourceRoot":"","sources":["../../../src/utils/confirmationCache.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAUjC,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;AAEpD,MAAM,wBAAwB;IACpB,KAAK,GAAG,IAAI,GAAG,EAA4B,CAAC;IAE7C,GAAG,CACR,SAAwC,EACxC,QAAgB,EAChB,OAAY;QAEZ,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAElC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE;YACpB,KAAK;YACL,SAAS;YACT,QAAQ;YACR,OAAO;YACP,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,gBAAgB;SACzC,CAAC,CAAC;QAEH,gCAAgC;QAChC,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,OAAO,KAAK,CAAC;IACf,CAAC;IAEM,GAAG,CAAC,KAAa;QACtB,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAEM,OAAO,CAAC,KAAa;QAC1B,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACjC,IAAI,EAAE,EAAE,CAAC;YACP,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;IAEO,OAAO;QACb,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YAChD,IAAI,GAAG,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;gBAC1B,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACzB,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,wBAAwB,EAAE,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* constants.ts — Centralized Configuration Constants
|
|
3
|
-
*
|
|
4
|
-
* All magic numbers, file extensions, and configuration values
|
|
5
|
-
* are defined here to eliminate hardcoding throughout the codebase.
|
|
6
|
-
*/
|
|
7
|
-
/** Extensions considered source code for semantic analysis */
|
|
8
|
-
export declare const SOURCE_EXTENSIONS: Set<string>;
|
|
9
|
-
/** Extensions eligible for import/dependency analysis */
|
|
10
|
-
export declare const IMPORTABLE_EXTENSIONS: Set<string>;
|
|
11
|
-
/** Extensions that support surgical AST-based editing */
|
|
12
|
-
export declare const WRITABLE_EXTENSIONS: Set<string>;
|
|
13
|
-
/** Maximum files to process in get_semantic_repo_map to prevent timeout */
|
|
14
|
-
export declare const MAX_FILES_FOR_REPO_MAP = 500;
|
|
15
|
-
/** Maximum file size in bytes (10MB) to prevent memory issues */
|
|
16
|
-
export declare const MAX_FILE_SIZE_BYTES: number;
|
|
17
|
-
/** Maximum symbol name length for fuzzy matching (prevent ReDoS) */
|
|
18
|
-
export declare const MAX_SYMBOL_NAME_LENGTH = 1000;
|
|
19
|
-
/** Maximum number of backups to keep per file */
|
|
20
|
-
export declare const MAX_BACKUP_VERSIONS = 5;
|
|
21
|
-
/** Confirmation token TTL in milliseconds (5 minutes) */
|
|
22
|
-
export declare const CONFIRMATION_TOKEN_TTL_MS: number;
|
|
23
|
-
/** Maximum entries in confirmation cache before cleanup */
|
|
24
|
-
export declare const MAX_CONFIRMATION_CACHE_SIZE = 100;
|
|
25
|
-
/** Maximum results to return from code pattern search */
|
|
26
|
-
export declare const MAX_SEARCH_RESULTS = 50;
|
|
27
|
-
/** Default context lines for code search */
|
|
28
|
-
export declare const DEFAULT_CONTEXT_LINES = 3;
|
|
29
|
-
/** Default indentation for Dart (2 spaces per Dart style guide) */
|
|
30
|
-
export declare const DART_INDENT = " ";
|
|
31
|
-
/** Default indentation for TypeScript/JavaScript */
|
|
32
|
-
export declare const TS_INDENT = " ";
|
|
33
|
-
/** Default indentation for PHP (4 spaces per PSR-12) */
|
|
34
|
-
export declare const PHP_INDENT = " ";
|
|
35
|
-
/** Default indentation for Python (4 spaces per PEP 8) */
|
|
36
|
-
export declare const PYTHON_INDENT = " ";
|
|
37
|
-
/** Files/directories that indicate a project root */
|
|
38
|
-
export declare const PROJECT_ROOT_MARKERS: string[];
|
|
39
|
-
/** Directories that should always be excluded from analysis */
|
|
40
|
-
export declare const ALWAYS_IGNORE_DIRS: string[];
|
|
41
|
-
export declare const SERVER_NAME = "mcp-code-context";
|
|
42
|
-
export declare const SERVER_VERSION = "2.5.1";
|
|
43
|
-
/** Regex to detect potentially dangerous patterns in user input */
|
|
44
|
-
export declare const DANGEROUS_PATTERN_REGEX: RegExp;
|
|
45
|
-
/** Maximum regex pattern length to prevent ReDoS */
|
|
46
|
-
export declare const MAX_REGEX_PATTERN_LENGTH = 500;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* constants.ts — Centralized Configuration Constants
|
|
3
|
-
*
|
|
4
|
-
* All magic numbers, file extensions, and configuration values
|
|
5
|
-
* are defined here to eliminate hardcoding throughout the codebase.
|
|
6
|
-
*/
|
|
7
|
-
// ─── File Extensions ────────────────────────────────────────────────
|
|
8
|
-
/** Extensions considered source code for semantic analysis */
|
|
9
|
-
export const SOURCE_EXTENSIONS = new Set([
|
|
10
|
-
".ts", ".tsx", ".js", ".jsx", ".mts", ".mjs", ".cts", ".cjs",
|
|
11
|
-
".py", ".pyi",
|
|
12
|
-
".json", ".yaml", ".yml", ".toml",
|
|
13
|
-
".md", ".txt",
|
|
14
|
-
".css", ".scss", ".less",
|
|
15
|
-
".html", ".vue", ".svelte",
|
|
16
|
-
".rs", ".go", ".java", ".kt", ".dart",
|
|
17
|
-
".c", ".cpp", ".h", ".hpp",
|
|
18
|
-
".rb", ".php", ".swift",
|
|
19
|
-
".sh", ".bash", ".zsh",
|
|
20
|
-
".sql",
|
|
21
|
-
".graphql", ".gql",
|
|
22
|
-
".proto",
|
|
23
|
-
".dockerfile",
|
|
24
|
-
]);
|
|
25
|
-
/** Extensions eligible for import/dependency analysis */
|
|
26
|
-
export const IMPORTABLE_EXTENSIONS = new Set([
|
|
27
|
-
".ts", ".tsx", ".js", ".jsx", ".mts", ".mjs", ".cts", ".cjs",
|
|
28
|
-
".py", ".pyi",
|
|
29
|
-
".php", ".phtml",
|
|
30
|
-
".dart",
|
|
31
|
-
".vue", ".svelte",
|
|
32
|
-
]);
|
|
33
|
-
/** Extensions that support surgical AST-based editing */
|
|
34
|
-
export const WRITABLE_EXTENSIONS = new Set([
|
|
35
|
-
".ts", ".tsx", ".js", ".jsx", ".mts", ".mjs", ".cts", ".cjs",
|
|
36
|
-
".php", ".phtml",
|
|
37
|
-
".dart",
|
|
38
|
-
".py", ".pyi",
|
|
39
|
-
]);
|
|
40
|
-
// ─── Resource Limits ────────────────────────────────────────────────
|
|
41
|
-
/** Maximum files to process in get_semantic_repo_map to prevent timeout */
|
|
42
|
-
export const MAX_FILES_FOR_REPO_MAP = 500;
|
|
43
|
-
/** Maximum file size in bytes (10MB) to prevent memory issues */
|
|
44
|
-
export const MAX_FILE_SIZE_BYTES = 10 * 1024 * 1024;
|
|
45
|
-
/** Maximum symbol name length for fuzzy matching (prevent ReDoS) */
|
|
46
|
-
export const MAX_SYMBOL_NAME_LENGTH = 1000;
|
|
47
|
-
/** Maximum number of backups to keep per file */
|
|
48
|
-
export const MAX_BACKUP_VERSIONS = 5;
|
|
49
|
-
/** Confirmation token TTL in milliseconds (5 minutes) */
|
|
50
|
-
export const CONFIRMATION_TOKEN_TTL_MS = 5 * 60 * 1000;
|
|
51
|
-
/** Maximum entries in confirmation cache before cleanup */
|
|
52
|
-
export const MAX_CONFIRMATION_CACHE_SIZE = 100;
|
|
53
|
-
/** Maximum results to return from code pattern search */
|
|
54
|
-
export const MAX_SEARCH_RESULTS = 50;
|
|
55
|
-
/** Default context lines for code search */
|
|
56
|
-
export const DEFAULT_CONTEXT_LINES = 3;
|
|
57
|
-
// ─── Indentation ────────────────────────────────────────────────────
|
|
58
|
-
/** Default indentation for Dart (2 spaces per Dart style guide) */
|
|
59
|
-
export const DART_INDENT = " ";
|
|
60
|
-
/** Default indentation for TypeScript/JavaScript */
|
|
61
|
-
export const TS_INDENT = " ";
|
|
62
|
-
/** Default indentation for PHP (4 spaces per PSR-12) */
|
|
63
|
-
export const PHP_INDENT = " ";
|
|
64
|
-
/** Default indentation for Python (4 spaces per PEP 8) */
|
|
65
|
-
export const PYTHON_INDENT = " ";
|
|
66
|
-
// ─── Project Root Markers ───────────────────────────────────────────
|
|
67
|
-
/** Files/directories that indicate a project root */
|
|
68
|
-
export const PROJECT_ROOT_MARKERS = [
|
|
69
|
-
"package.json",
|
|
70
|
-
".git",
|
|
71
|
-
"pyproject.toml",
|
|
72
|
-
"setup.py",
|
|
73
|
-
"Cargo.toml",
|
|
74
|
-
"go.mod",
|
|
75
|
-
"pom.xml",
|
|
76
|
-
"build.gradle",
|
|
77
|
-
"CMakeLists.txt",
|
|
78
|
-
".gitignore",
|
|
79
|
-
"Gemfile",
|
|
80
|
-
"composer.json",
|
|
81
|
-
"pubspec.yaml",
|
|
82
|
-
];
|
|
83
|
-
// ─── Directories to Always Ignore ───────────────────────────────────
|
|
84
|
-
/** Directories that should always be excluded from analysis */
|
|
85
|
-
export const ALWAYS_IGNORE_DIRS = [
|
|
86
|
-
"node_modules",
|
|
87
|
-
"dist",
|
|
88
|
-
"build",
|
|
89
|
-
"out",
|
|
90
|
-
"vendor",
|
|
91
|
-
".git",
|
|
92
|
-
".svn",
|
|
93
|
-
".hg",
|
|
94
|
-
"__pycache__",
|
|
95
|
-
".pytest_cache",
|
|
96
|
-
".mypy_cache",
|
|
97
|
-
"coverage",
|
|
98
|
-
".next",
|
|
99
|
-
".nuxt",
|
|
100
|
-
"target",
|
|
101
|
-
"bin",
|
|
102
|
-
"obj",
|
|
103
|
-
];
|
|
104
|
-
// ─── Server Metadata ────────────────────────────────────────────────
|
|
105
|
-
export const SERVER_NAME = "mcp-code-context";
|
|
106
|
-
export const SERVER_VERSION = "2.5.1";
|
|
107
|
-
// ─── Validation Patterns ────────────────────────────────────────────
|
|
108
|
-
/** Regex to detect potentially dangerous patterns in user input */
|
|
109
|
-
export const DANGEROUS_PATTERN_REGEX = /(\.\.|\/etc\/|\/root\/|C:\\Windows|%SYSTEMROOT%)/i;
|
|
110
|
-
/** Maximum regex pattern length to prevent ReDoS */
|
|
111
|
-
export const MAX_REGEX_PATTERN_LENGTH = 500;
|
|
112
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,uEAAuE;AAEvE,8DAA8D;AAC9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IACvC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAC5D,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO;IACjC,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,OAAO,EAAE,OAAO;IACxB,OAAO,EAAE,MAAM,EAAE,SAAS;IAC1B,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO;IACrC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAC1B,KAAK,EAAE,MAAM,EAAE,QAAQ;IACvB,KAAK,EAAE,OAAO,EAAE,MAAM;IACtB,MAAM;IACN,UAAU,EAAE,MAAM;IAClB,QAAQ;IACR,aAAa;CACd,CAAC,CAAC;AAEH,yDAAyD;AACzD,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IAC3C,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAC5D,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,QAAQ;IAChB,OAAO;IACP,MAAM,EAAE,SAAS;CAClB,CAAC,CAAC;AAEH,yDAAyD;AACzD,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IACzC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,M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AAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,cAAc;IACd,MAAM;IACN,OAAO;IACP,KAAK;IACL,QAAQ;IACR,MAAM;IACN,MAAM;IACN,KAAK;IACL,aAAa;IACb,eAAe;IACf,aAAa;IACb,UAAU;IACV,OAAO;IACP,OAAO;IACP,QAAQ;IACR,KAAK;IACL,KAAK;CACN,CAAC;AAEF,uEAAuE;AAEvE,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC;AAC9C,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;AAEtC,uEAAuE;AAEvE,mEAAmE;AACnE,MAAM,CAAC,MAAM,uBAAuB,GAAG,mDAAmD,CAAC;AAE3F,oDAAoD;AACpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function checkSymbolUsage(filePath: string, content: string, symbolName: string): Promise<boolean>;
|