mcp-code-context 3.9.1 → 7.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/CHANGELOG.md +288 -215
- package/INSTRUCTIONS.md +28 -11
- package/README.md +124 -11
- package/dist/src/core/engine.d.ts +1 -1
- package/dist/src/core/engine.js +1 -1
- package/dist/src/core/indexManager.d.ts +1 -1
- package/dist/src/core/indexManager.js +26 -26
- package/dist/src/core/sessionManager.d.ts +1 -1
- package/dist/src/core/sessionManager.js +1 -1
- package/dist/src/core/validator.d.ts +2 -2
- package/dist/src/core/validator.js +8 -2
- package/dist/src/core/validator.js.map +1 -1
- package/dist/src/index.d.ts +4 -2
- package/dist/src/index.js +119 -14
- package/dist/src/index.js.map +1 -1
- package/dist/src/operations/apiRoutes.d.ts +31 -0
- package/dist/src/operations/apiRoutes.js +170 -0
- package/dist/src/operations/apiRoutes.js.map +1 -0
- package/dist/src/operations/architectureLinter.d.ts +45 -0
- package/dist/src/operations/architectureLinter.js +223 -0
- package/dist/src/operations/architectureLinter.js.map +1 -0
- package/dist/src/operations/astComplexity.d.ts +38 -0
- package/dist/src/operations/astComplexity.js +243 -0
- package/dist/src/operations/astComplexity.js.map +1 -0
- package/dist/src/operations/astMockGenerator.d.ts +34 -0
- package/dist/src/operations/astMockGenerator.js +203 -0
- package/dist/src/operations/astMockGenerator.js.map +1 -0
- package/dist/src/operations/astQuery.d.ts +47 -0
- package/dist/src/operations/astQuery.js +169 -0
- package/dist/src/operations/astQuery.js.map +1 -0
- package/dist/src/operations/astTransform.d.ts +1 -1
- package/dist/src/operations/astTransform.js +11 -2
- package/dist/src/operations/astTransform.js.map +1 -1
- package/dist/src/operations/asyncBlockers.d.ts +33 -0
- package/dist/src/operations/asyncBlockers.js +162 -0
- package/dist/src/operations/asyncBlockers.js.map +1 -0
- package/dist/src/operations/blastRadiusReport.d.ts +43 -0
- package/dist/src/operations/blastRadiusReport.js +236 -0
- package/dist/src/operations/blastRadiusReport.js.map +1 -0
- package/dist/src/operations/callHierarchy.d.ts +28 -0
- package/dist/src/operations/callHierarchy.js +166 -0
- package/dist/src/operations/callHierarchy.js.map +1 -0
- package/dist/src/operations/circularDependencies.d.ts +28 -0
- package/dist/src/operations/circularDependencies.js +201 -0
- package/dist/src/operations/circularDependencies.js.map +1 -0
- package/dist/src/operations/classHierarchyFlattener.d.ts +35 -0
- package/dist/src/operations/classHierarchyFlattener.js +185 -0
- package/dist/src/operations/classHierarchyFlattener.js.map +1 -0
- package/dist/src/operations/compress.d.ts +2 -2
- package/dist/src/operations/compress.js +154 -20
- package/dist/src/operations/compress.js.map +1 -1
- package/dist/src/operations/conceptSearch.d.ts +19 -0
- package/dist/src/operations/conceptSearch.js +176 -0
- package/dist/src/operations/conceptSearch.js.map +1 -0
- package/dist/src/operations/confirmationStore.d.ts +1 -1
- package/dist/src/operations/confirmationStore.js +1 -1
- package/dist/src/operations/conflictPredictor.d.ts +21 -0
- package/dist/src/operations/conflictPredictor.js +139 -0
- package/dist/src/operations/conflictPredictor.js.map +1 -0
- package/dist/src/operations/contextCompactor.d.ts +38 -0
- package/dist/src/operations/contextCompactor.js +348 -0
- package/dist/src/operations/contextCompactor.js.map +1 -0
- package/dist/src/operations/cstCodemod.d.ts +34 -0
- package/dist/src/operations/cstCodemod.js +205 -0
- package/dist/src/operations/cstCodemod.js.map +1 -0
- package/dist/src/operations/deadSymbols.d.ts +32 -0
- package/dist/src/operations/deadSymbols.js +178 -0
- package/dist/src/operations/deadSymbols.js.map +1 -0
- package/dist/src/operations/envContract.d.ts +35 -0
- package/dist/src/operations/envContract.js +194 -0
- package/dist/src/operations/envContract.js.map +1 -0
- package/dist/src/operations/errorAudit.d.ts +36 -0
- package/dist/src/operations/errorAudit.js +201 -0
- package/dist/src/operations/errorAudit.js.map +1 -0
- package/dist/src/operations/importIntegrity.d.ts +48 -0
- package/dist/src/operations/importIntegrity.js +395 -0
- package/dist/src/operations/importIntegrity.js.map +1 -0
- package/dist/src/operations/incrementalDiff.d.ts +47 -0
- package/dist/src/operations/incrementalDiff.js +216 -0
- package/dist/src/operations/incrementalDiff.js.map +1 -0
- package/dist/src/operations/lexicalScope.d.ts +51 -0
- package/dist/src/operations/lexicalScope.js +212 -0
- package/dist/src/operations/lexicalScope.js.map +1 -0
- package/dist/src/operations/read.d.ts +21 -0
- package/dist/src/operations/read.js +21 -0
- package/dist/src/operations/read.js.map +1 -1
- package/dist/src/operations/readCore.js +37 -17
- package/dist/src/operations/readCore.js.map +1 -1
- package/dist/src/operations/rename.js +35 -24
- package/dist/src/operations/rename.js.map +1 -1
- package/dist/src/operations/sqlValidator.d.ts +36 -0
- package/dist/src/operations/sqlValidator.js +202 -0
- package/dist/src/operations/sqlValidator.js.map +1 -0
- package/dist/src/operations/symbolQuery.js +112 -23
- package/dist/src/operations/symbolQuery.js.map +1 -1
- package/dist/src/operations/taintAnalysis.d.ts +46 -0
- package/dist/src/operations/taintAnalysis.js +220 -0
- package/dist/src/operations/taintAnalysis.js.map +1 -0
- package/dist/src/operations/testImpact.d.ts +31 -0
- package/dist/src/operations/testImpact.js +179 -0
- package/dist/src/operations/testImpact.js.map +1 -0
- package/dist/src/operations/typeInference.d.ts +54 -0
- package/dist/src/operations/typeInference.js +565 -0
- package/dist/src/operations/typeInference.js.map +1 -0
- package/dist/src/operations/wireContract.d.ts +34 -0
- package/dist/src/operations/wireContract.js +185 -0
- package/dist/src/operations/wireContract.js.map +1 -0
- package/dist/src/operations/write.d.ts +2 -2
- package/dist/src/operations/write.js +151 -82
- package/dist/src/operations/write.js.map +1 -1
- package/dist/src/parsers/base.d.ts +9 -1
- package/dist/src/parsers/base.js +61 -1
- package/dist/src/parsers/base.js.map +1 -1
- package/dist/src/parsers/csharp.d.ts +1 -1
- package/dist/src/parsers/csharp.js +1 -1
- package/dist/src/parsers/dartTreeSitter.d.ts +1 -1
- package/dist/src/parsers/dartTreeSitter.js +1 -1
- package/dist/src/parsers/go.d.ts +1 -1
- package/dist/src/parsers/go.js +1 -1
- package/dist/src/parsers/java.d.ts +1 -1
- package/dist/src/parsers/java.js +1 -1
- package/dist/src/parsers/kotlin.d.ts +1 -1
- package/dist/src/parsers/kotlin.js +1 -1
- package/dist/src/parsers/php.d.ts +1 -1
- package/dist/src/parsers/php.js +1 -1
- package/dist/src/parsers/python.d.ts +1 -1
- package/dist/src/parsers/python.js +1 -1
- package/dist/src/parsers/registry.d.ts +1 -1
- package/dist/src/parsers/registry.js +1 -1
- package/dist/src/parsers/ruby.d.ts +1 -1
- package/dist/src/parsers/ruby.js +1 -1
- package/dist/src/parsers/rust.d.ts +1 -1
- package/dist/src/parsers/rust.js +1 -1
- package/dist/src/parsers/typescript.d.ts +1 -1
- package/dist/src/parsers/typescript.js +1 -1
- package/dist/src/tools/adminHandlers.js +8 -7
- package/dist/src/tools/adminHandlers.js.map +1 -1
- package/dist/src/tools/context.d.ts +4 -0
- package/dist/src/tools/context.js +14 -0
- package/dist/src/tools/context.js.map +1 -1
- package/dist/src/tools/pipeline.js +27 -1
- package/dist/src/tools/pipeline.js.map +1 -1
- package/dist/src/tools/readHandlers.d.ts +150 -0
- package/dist/src/tools/readHandlers.js +642 -35
- package/dist/src/tools/readHandlers.js.map +1 -1
- package/dist/src/tools/toolDefinitions.d.ts +2190 -1
- package/dist/src/tools/toolDefinitionsAdmin.d.ts +1 -1
- package/dist/src/tools/toolDefinitionsAdmin.js +12 -12
- package/dist/src/tools/toolDefinitionsAdmin.js.map +1 -1
- package/dist/src/tools/toolDefinitionsCore.d.ts +2189 -0
- package/dist/src/tools/toolDefinitionsCore.js +422 -42
- package/dist/src/tools/toolDefinitionsCore.js.map +1 -1
- package/dist/src/tools/writeHandlers.js +31 -17
- package/dist/src/tools/writeHandlers.js.map +1 -1
- package/dist/src/utils/appDir.d.ts +1 -1
- package/dist/src/utils/appDir.js +1 -1
- package/dist/src/utils/auditLogger.d.ts +1 -1
- package/dist/src/utils/auditLogger.js +1 -1
- package/dist/src/utils/backupManager.d.ts +1 -1
- package/dist/src/utils/backupManager.js +1 -1
- package/dist/src/utils/conceptEngine.d.ts +56 -0
- package/dist/src/utils/conceptEngine.js +234 -0
- package/dist/src/utils/conceptEngine.js.map +1 -0
- package/dist/src/utils/constants.d.ts +1 -1
- package/dist/src/utils/constants.js +2 -1
- package/dist/src/utils/constants.js.map +1 -1
- package/dist/src/utils/diff.d.ts +1 -1
- package/dist/src/utils/diff.js +1 -1
- package/dist/src/utils/fileLock.d.ts +1 -1
- package/dist/src/utils/fileLock.js +1 -1
- package/dist/src/utils/fileWalker.d.ts +1 -1
- package/dist/src/utils/fileWalker.js +1 -1
- package/dist/src/utils/fileWatcher.d.ts +1 -1
- package/dist/src/utils/fileWatcher.js +1 -1
- package/dist/src/utils/fuzzySearch.d.ts +1 -1
- package/dist/src/utils/fuzzySearch.js +1 -1
- package/dist/src/utils/gemfileParser.d.ts +1 -1
- package/dist/src/utils/gemfileParser.js +1 -1
- package/dist/src/utils/logger.d.ts +1 -1
- package/dist/src/utils/logger.js +1 -1
- package/dist/src/utils/metaprogramming.d.ts +1 -1
- package/dist/src/utils/metaprogramming.js +1 -1
- package/dist/src/utils/projectRoot.d.ts +9 -0
- package/dist/src/utils/projectRoot.js +94 -0
- package/dist/src/utils/projectRoot.js.map +1 -0
- package/dist/src/utils/railsRoutes.d.ts +1 -1
- package/dist/src/utils/railsRoutes.js +1 -1
- package/dist/src/utils/rateLimiter.d.ts +26 -1
- package/dist/src/utils/rateLimiter.js +26 -1
- package/dist/src/utils/rateLimiter.js.map +1 -1
- package/dist/src/utils/streaming.d.ts +1 -1
- package/dist/src/utils/streaming.js +1 -1
- package/dist/src/utils/telemetry.d.ts +1 -1
- package/dist/src/utils/telemetry.js +1 -1
- package/dist/src/utils/virtualSchema.d.ts +31 -0
- package/dist/src/utils/virtualSchema.js +367 -0
- package/dist/src/utils/virtualSchema.js.map +1 -0
- package/llms.txt +24 -6
- package/package.json +4 -2
- package/skills/code-context-logo.png +0 -0
- package/skills/code-context-pro/SKILL.md +149 -0
- package/skills/code-context-pro/references/benchmarks.md +25 -0
- package/skills/code-context-pro/references/decision-tree.md +32 -0
- package/skills/code-context-pro/references/multi-ide-setup.md +104 -0
- package/skills/code-context-pro.zip +0 -0
- package/HIRE_ME.md +0 -234
- package/SPONSORS.md +0 -104
- package/vitest.config.ts +0 -37
|
@@ -7,10 +7,10 @@ export const CORE_TOOLS = [
|
|
|
7
7
|
type: "object",
|
|
8
8
|
properties: {
|
|
9
9
|
directoryPath: { type: "string", description: "Absolute path to repository root" },
|
|
10
|
-
projectRoot: { type: "string", description: "Project root for security boundary" },
|
|
11
|
-
format: { type: "string", enum: ["xml", "markdown"], description: "Output format (default: xml)" },
|
|
10
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to directoryPath)" },
|
|
11
|
+
format: { type: "string", enum: ["xml", "markdown", "html"], description: "Output format (default: xml, markdown, or html for interactive visual architecture dashboard)" },
|
|
12
12
|
},
|
|
13
|
-
required: ["directoryPath"
|
|
13
|
+
required: ["directoryPath"],
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
{
|
|
@@ -20,11 +20,11 @@ export const CORE_TOOLS = [
|
|
|
20
20
|
type: "object",
|
|
21
21
|
properties: {
|
|
22
22
|
filePath: { type: "string", description: "Absolute path to file" },
|
|
23
|
-
projectRoot: { type: "string", description: "Project root (
|
|
23
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to file project root)" },
|
|
24
24
|
symbolName: { type: "string", description: "Symbol name to extract (optional)" },
|
|
25
25
|
className: { type: "string", description: "Class name for scoping (optional)" },
|
|
26
26
|
},
|
|
27
|
-
required: ["filePath"
|
|
27
|
+
required: ["filePath"],
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
{
|
|
@@ -34,10 +34,10 @@ export const CORE_TOOLS = [
|
|
|
34
34
|
type: "object",
|
|
35
35
|
properties: {
|
|
36
36
|
filePath: { type: "string", description: "Absolute path to file" },
|
|
37
|
-
projectRoot: { type: "string", description: "Project root for security boundary" },
|
|
37
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to file project root)" },
|
|
38
38
|
rootDir: { type: "string", description: "Repository root (optional, defaults to projectRoot)" },
|
|
39
39
|
},
|
|
40
|
-
required: ["filePath"
|
|
40
|
+
required: ["filePath"],
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
{
|
|
@@ -47,13 +47,13 @@ export const CORE_TOOLS = [
|
|
|
47
47
|
type: "object",
|
|
48
48
|
properties: {
|
|
49
49
|
filePath: { type: "string", description: "Absolute path to file" },
|
|
50
|
-
projectRoot: { type: "string", description: "Project root for security boundary" },
|
|
50
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to file project root)" },
|
|
51
51
|
startLine: { type: "number", description: "Starting line number (1-indexed)" },
|
|
52
52
|
endLine: { type: "number", description: "Ending line number (1-indexed)" },
|
|
53
53
|
aroundPattern: { type: "string", description: "Search pattern to find and return surrounding lines" },
|
|
54
54
|
contextLines: { type: "number", description: "Number of lines before/after pattern (default: 5)" },
|
|
55
55
|
},
|
|
56
|
-
required: ["filePath"
|
|
56
|
+
required: ["filePath"],
|
|
57
57
|
},
|
|
58
58
|
},
|
|
59
59
|
{
|
|
@@ -63,7 +63,7 @@ export const CORE_TOOLS = [
|
|
|
63
63
|
type: "object",
|
|
64
64
|
properties: {
|
|
65
65
|
rootDir: { type: "string", description: "Repository root directory" },
|
|
66
|
-
projectRoot: { type: "string", description: "Project root for security boundary" },
|
|
66
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to rootDir)" },
|
|
67
67
|
pattern: { type: "string", description: "Regular expression pattern to search" },
|
|
68
68
|
fileExtensions: { type: "array", items: { type: "string" }, description: "Extensions to search" },
|
|
69
69
|
excludeDirs: { type: "array", items: { type: "string" }, description: "Directories to exclude" },
|
|
@@ -72,7 +72,7 @@ export const CORE_TOOLS = [
|
|
|
72
72
|
fuzzyMatch: { type: "boolean", description: "Enable fuzzy matching (default: false)" },
|
|
73
73
|
fuzzyThreshold: { type: "number", description: "Fuzzy match threshold 0-1 (default: 0.4)" },
|
|
74
74
|
},
|
|
75
|
-
required: ["rootDir", "
|
|
75
|
+
required: ["rootDir", "pattern"],
|
|
76
76
|
},
|
|
77
77
|
},
|
|
78
78
|
{
|
|
@@ -82,9 +82,9 @@ export const CORE_TOOLS = [
|
|
|
82
82
|
type: "object",
|
|
83
83
|
properties: {
|
|
84
84
|
filePath: { type: "string", description: "Absolute path to file" },
|
|
85
|
-
projectRoot: { type: "string", description: "Project root (
|
|
85
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to file project root)" },
|
|
86
86
|
},
|
|
87
|
-
required: ["filePath"
|
|
87
|
+
required: ["filePath"],
|
|
88
88
|
},
|
|
89
89
|
},
|
|
90
90
|
{
|
|
@@ -94,15 +94,15 @@ export const CORE_TOOLS = [
|
|
|
94
94
|
type: "object",
|
|
95
95
|
properties: {
|
|
96
96
|
filePath: { type: "string", description: "Absolute path to file" },
|
|
97
|
-
projectRoot: { type: "string", description: "Project root (
|
|
97
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to file project root)" },
|
|
98
98
|
symbolName: { type: "string", description: "Symbol to replace" },
|
|
99
|
-
newContent: { type: "string", description: "New code (Phase 1 only
|
|
99
|
+
newContent: { type: "string", description: "New code (Phase 1 only — omit in Phase 2, server uses stored content)" },
|
|
100
100
|
className: { type: "string", description: "Class name (optional, for scoping)" },
|
|
101
101
|
confirm: { type: "boolean", description: "Set true to apply a pending operation (Phase 2)" },
|
|
102
102
|
confirmationToken: { type: "string", description: "Token from Phase 1 dry-run (Phase 2 only)" },
|
|
103
103
|
diffFormat: { type: "string", enum: ["unified", "compact", "summary", "none"], description: "Diff verbosity in Phase 1 output (default: unified). Use none to skip diff and save tokens." },
|
|
104
104
|
},
|
|
105
|
-
required: ["filePath", "
|
|
105
|
+
required: ["filePath", "symbolName"],
|
|
106
106
|
},
|
|
107
107
|
},
|
|
108
108
|
{
|
|
@@ -112,8 +112,8 @@ export const CORE_TOOLS = [
|
|
|
112
112
|
type: "object",
|
|
113
113
|
properties: {
|
|
114
114
|
filePath: { type: "string", description: "Absolute path to file" },
|
|
115
|
-
projectRoot: { type: "string", description: "Project root (
|
|
116
|
-
code: { type: "string", description: "Code to insert (Phase 1 only
|
|
115
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to file project root)" },
|
|
116
|
+
code: { type: "string", description: "Code to insert (Phase 1 only — omit in Phase 2, server uses stored content)" },
|
|
117
117
|
anchorSymbol: { type: "string", description: "Symbol to position relative to" },
|
|
118
118
|
position: { type: "string", enum: ["before", "after", "inside_start", "inside_end"], description: "Where to insert" },
|
|
119
119
|
className: { type: "string", description: "Class name (optional)" },
|
|
@@ -121,7 +121,7 @@ export const CORE_TOOLS = [
|
|
|
121
121
|
confirmationToken: { type: "string", description: "Token from Phase 1 dry-run (Phase 2 only)" },
|
|
122
122
|
diffFormat: { type: "string", enum: ["unified", "compact", "summary", "none"], description: "Diff verbosity in Phase 1 output (default: unified). Use none to skip diff and save tokens." },
|
|
123
123
|
},
|
|
124
|
-
required: ["filePath", "
|
|
124
|
+
required: ["filePath", "code"],
|
|
125
125
|
},
|
|
126
126
|
},
|
|
127
127
|
{
|
|
@@ -131,14 +131,14 @@ export const CORE_TOOLS = [
|
|
|
131
131
|
type: "object",
|
|
132
132
|
properties: {
|
|
133
133
|
filePath: { type: "string", description: "Absolute path to file" },
|
|
134
|
-
projectRoot: { type: "string", description: "Project root (
|
|
134
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to file project root)" },
|
|
135
135
|
symbolName: { type: "string", description: "Symbol to remove" },
|
|
136
136
|
className: { type: "string", description: "Class name (optional)" },
|
|
137
137
|
force: { type: "boolean", description: "Skip dependency check" },
|
|
138
138
|
confirm: { type: "boolean", description: "Set true to apply a pending operation" },
|
|
139
139
|
confirmationToken: { type: "string", description: "Token from Phase 1 dry-run" },
|
|
140
140
|
},
|
|
141
|
-
required: ["filePath", "
|
|
141
|
+
required: ["filePath", "symbolName"],
|
|
142
142
|
},
|
|
143
143
|
},
|
|
144
144
|
{
|
|
@@ -148,17 +148,17 @@ export const CORE_TOOLS = [
|
|
|
148
148
|
type: "object",
|
|
149
149
|
properties: {
|
|
150
150
|
filePath: { type: "string", description: "File where symbol is defined" },
|
|
151
|
-
projectRoot: { type: "string", description: "Project root (
|
|
151
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to file project root)" },
|
|
152
152
|
oldName: { type: "string", description: "Current name" },
|
|
153
153
|
newName: { type: "string", description: "New name" },
|
|
154
|
-
rootDir: { type: "string", description: "Repository root (optional)" },
|
|
154
|
+
rootDir: { type: "string", description: "Repository root (optional, defaults to projectRoot)" },
|
|
155
155
|
confirm: { type: "boolean", description: "Set true to apply a pending operation" },
|
|
156
156
|
confirmationToken: { type: "string", description: "Token from Phase 1 dry-run" },
|
|
157
157
|
},
|
|
158
|
-
required: ["filePath", "
|
|
158
|
+
required: ["filePath", "oldName", "newName"],
|
|
159
159
|
},
|
|
160
160
|
},
|
|
161
|
-
// ── AST Transform (v3.9.
|
|
161
|
+
// ── AST Transform (v3.9.0) ──────────────────────────────────────────────
|
|
162
162
|
{
|
|
163
163
|
name: "ast_transform",
|
|
164
164
|
description: "Apply a declarative AST transformation to a symbol. Supports: add_parameter, wrap_with_try_catch, add_decorator, change_return_type, extract_variable. Uses two-phase write (Phase 1: preview diff, Phase 2: confirm with token).",
|
|
@@ -166,8 +166,8 @@ export const CORE_TOOLS = [
|
|
|
166
166
|
type: "object",
|
|
167
167
|
properties: {
|
|
168
168
|
filePath: { type: "string", description: "Absolute path to file" },
|
|
169
|
-
projectRoot: { type: "string", description: "Project root (
|
|
170
|
-
symbolName: { type: "string", description: "Target symbol to transform" },
|
|
169
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to file project root)" },
|
|
170
|
+
symbolName: { type: "string", targetSymbol: true, description: "Target symbol to transform" },
|
|
171
171
|
className: { type: "string", description: "Class name (optional, for scoping)" },
|
|
172
172
|
transform: {
|
|
173
173
|
type: "object",
|
|
@@ -192,10 +192,10 @@ export const CORE_TOOLS = [
|
|
|
192
192
|
confirmationToken: { type: "string", description: "Token from Phase 1 dry-run (Phase 2 only)" },
|
|
193
193
|
diffFormat: { type: "string", enum: ["unified", "compact", "summary", "none"], description: "Diff verbosity (default: unified)" },
|
|
194
194
|
},
|
|
195
|
-
required: ["filePath", "
|
|
195
|
+
required: ["filePath", "symbolName", "transform"],
|
|
196
196
|
},
|
|
197
197
|
},
|
|
198
|
-
// ──
|
|
198
|
+
// ── Core Inspection & Search Tools ──────────────────────────────────────────
|
|
199
199
|
{
|
|
200
200
|
name: "search_symbols",
|
|
201
201
|
description: "Search symbols by name across the repo using AST (not text search). Finds classes, functions, methods by approximate name.",
|
|
@@ -203,7 +203,7 @@ export const CORE_TOOLS = [
|
|
|
203
203
|
type: "object",
|
|
204
204
|
properties: {
|
|
205
205
|
rootDir: { type: "string", description: "Directory to search in" },
|
|
206
|
-
projectRoot: { type: "string", description: "Project root for security boundary" },
|
|
206
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to rootDir)" },
|
|
207
207
|
query: { type: "string", description: "Symbol name or partial name to search" },
|
|
208
208
|
fuzzy: { type: "boolean", description: "Enable fuzzy name matching (default: false)" },
|
|
209
209
|
types: { type: "array", items: { type: "string" }, description: "Filter by symbol types: class_declaration, function_declaration, method_definition, etc." },
|
|
@@ -211,7 +211,332 @@ export const CORE_TOOLS = [
|
|
|
211
211
|
excludeDirs: { type: "array", items: { type: "string" }, description: "Directories to exclude" },
|
|
212
212
|
maxResults: { type: "number", description: "Maximum results (default: 20)" },
|
|
213
213
|
},
|
|
214
|
-
required: ["rootDir", "
|
|
214
|
+
required: ["rootDir", "query"],
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: "search_code_concept",
|
|
219
|
+
description: "Search symbols and code by conceptual intent, domain semantics, and docstrings using offline in-memory vectors. Finds functions even when the exact name is unknown (e.g. searching 'VIP discount' finds 'applyLoyaltyRebate').",
|
|
220
|
+
inputSchema: {
|
|
221
|
+
type: "object",
|
|
222
|
+
properties: {
|
|
223
|
+
query: { type: "string", description: "Conceptual query (e.g. 'VIP customer discount calculation', 'auth token refresh', 'database transaction rollback')" },
|
|
224
|
+
rootDir: { type: "string", description: "Directory to search in (optional, defaults to projectRoot)" },
|
|
225
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to rootDir)" },
|
|
226
|
+
threshold: { type: "number", description: "Minimum relevance similarity threshold 0.0 - 1.0 (default: 0.25)" },
|
|
227
|
+
maxResults: { type: "number", description: "Maximum results to return (default: 15)" },
|
|
228
|
+
fileExtensions: { type: "array", items: { type: "string" }, description: "Filter by file extensions (e.g. ['.ts', '.py'])" },
|
|
229
|
+
excludeDirs: { type: "array", items: { type: "string" }, description: "Directories to exclude from search" },
|
|
230
|
+
},
|
|
231
|
+
required: ["query"],
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: "verify_import_integrity",
|
|
236
|
+
description: "Verify that all external package dependencies, local relative files, and named symbols imported in a file exist. Prevents build-breaking import hallucinations and phantom dependencies before applying code changes.",
|
|
237
|
+
inputSchema: {
|
|
238
|
+
type: "object",
|
|
239
|
+
properties: {
|
|
240
|
+
filePath: { type: "string", description: "Path to file being inspected or modified" },
|
|
241
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to file's root)" },
|
|
242
|
+
content: { type: "string", description: "Optional proposed content to verify before saving to disk" },
|
|
243
|
+
},
|
|
244
|
+
required: ["filePath"],
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: "trace_taint_flow",
|
|
249
|
+
description: "Trace data flow from untrusted user inputs (req.query, req.body, $_GET, etc.) to dangerous sinks (db.query, exec, eval, fs.readFile, innerHTML). Identifies SQL Injection, RCE, Path Traversal, and SSRF vulnerabilities before code is committed.",
|
|
250
|
+
inputSchema: {
|
|
251
|
+
type: "object",
|
|
252
|
+
properties: {
|
|
253
|
+
filePath: { type: "string", description: "Path to file being analyzed" },
|
|
254
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to file's root)" },
|
|
255
|
+
sourceParam: { type: "string", description: "Optional specific parameter name to track as tainted source" },
|
|
256
|
+
dangerousSink: { type: "string", description: "Optional specific sink to target (e.g. 'exec', 'db.query', 'eval', 'readFile')" },
|
|
257
|
+
content: { type: "string", description: "Optional proposed content to analyze before saving" },
|
|
258
|
+
},
|
|
259
|
+
required: ["filePath"],
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
name: "backfill_types",
|
|
264
|
+
description: "Inspect AST property accesses (param.id, param.name.trim(), param.age > 18, param.save()), method calls, and return expressions to infer strict TypeScript interfaces or Python TypedDict / BaseModel definitions for untyped or legacy code.",
|
|
265
|
+
inputSchema: {
|
|
266
|
+
type: "object",
|
|
267
|
+
properties: {
|
|
268
|
+
filePath: { type: "string", description: "Path to file to infer types for" },
|
|
269
|
+
projectRoot: { type: "string", description: "Project root directory (optional, resolved automatically)" },
|
|
270
|
+
symbolName: { type: "string", description: "Optional specific function or method name to infer types for" },
|
|
271
|
+
targetLanguage: {
|
|
272
|
+
type: "string",
|
|
273
|
+
enum: ["typescript", "python"],
|
|
274
|
+
description: "Target type system to generate ('typescript' or 'python', defaults based on file extension)"
|
|
275
|
+
},
|
|
276
|
+
content: { type: "string", description: "Optional proposed content to analyze before saving to disk" },
|
|
277
|
+
},
|
|
278
|
+
required: ["filePath"],
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
name: "enforce_architecture_rules",
|
|
283
|
+
description: "Enforce clean/hexagonal architectural boundary guardrails by checking AST imports against layer separation rules (e.g. domain entities cannot import infra/frameworks; UI cannot import raw database models; use cases cannot import controllers).",
|
|
284
|
+
inputSchema: {
|
|
285
|
+
type: "object",
|
|
286
|
+
properties: {
|
|
287
|
+
filePath: { type: "string", description: "Path to file being checked (optional)" },
|
|
288
|
+
projectRoot: { type: "string", description: "Project root directory (optional, resolved automatically)" },
|
|
289
|
+
content: { type: "string", description: "Optional proposed content to verify before saving to disk" },
|
|
290
|
+
rules: {
|
|
291
|
+
type: "array",
|
|
292
|
+
items: {
|
|
293
|
+
type: "object",
|
|
294
|
+
properties: {
|
|
295
|
+
layer: { type: "string", description: "Name of the architectural layer (e.g. 'domain', 'ui', 'use_cases')" },
|
|
296
|
+
pattern: { type: "string", description: "File path glob pattern belonging to this layer (e.g. 'src/domain/**')" },
|
|
297
|
+
disallow: {
|
|
298
|
+
type: "array",
|
|
299
|
+
items: { type: "string" },
|
|
300
|
+
description: "Array of disallowed import paths or package names (e.g. ['src/infra/**', '@prisma/client'])"
|
|
301
|
+
},
|
|
302
|
+
description: { type: "string", description: "Reason for this boundary rule" },
|
|
303
|
+
suggestion: { type: "string", description: "Recommended decoupled alternative pattern" }
|
|
304
|
+
},
|
|
305
|
+
required: ["layer", "pattern", "disallow"]
|
|
306
|
+
},
|
|
307
|
+
description: "Optional custom architectural rules (defaults to reading .architecturerc.json or applying standard Clean Architecture rules)"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
name: "compact_context_ledger",
|
|
314
|
+
description: "Compress source files into lossless AST signature outlines (interfaces, types, classes, fields, and method signatures without implementation bodies). Saves 80% to 90% of tokens while preserving 100% of structural and type fidelity for AI LLMs.",
|
|
315
|
+
inputSchema: {
|
|
316
|
+
type: "object",
|
|
317
|
+
properties: {
|
|
318
|
+
filePaths: {
|
|
319
|
+
oneOf: [
|
|
320
|
+
{ type: "array", items: { type: "string" } },
|
|
321
|
+
{ type: "string" }
|
|
322
|
+
],
|
|
323
|
+
description: "One or more file paths to compact into AST outlines"
|
|
324
|
+
},
|
|
325
|
+
projectRoot: { type: "string", description: "Project root directory (optional, resolved automatically)" },
|
|
326
|
+
dropPrivate: { type: "boolean", description: "Whether to omit private members and helper functions (default: false)" },
|
|
327
|
+
includeDocstrings: { type: "boolean", description: "Whether to preserve JSDoc / docstrings for intent understanding (default: true)" },
|
|
328
|
+
content: { type: "string", description: "Optional proposed content for single file compaction" },
|
|
329
|
+
},
|
|
330
|
+
required: ["filePaths"],
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
name: "generate_ast_impact_report",
|
|
335
|
+
description: "Generate an objective cryptographic PR blast radius report with SHA-256 digest, identifying changed symbols across git refs or working tree, impacted test suites via TIA, and verifying architectural boundary compliance.",
|
|
336
|
+
inputSchema: {
|
|
337
|
+
type: "object",
|
|
338
|
+
properties: {
|
|
339
|
+
baseBranch: { type: "string", description: "Base git ref or branch to compare against (default: 'main')" },
|
|
340
|
+
targetBranch: { type: "string", description: "Target git ref or 'WORKING_TREE' for uncommitted changes (default: 'HEAD')" },
|
|
341
|
+
projectRoot: { type: "string", description: "Project root directory (optional, resolved automatically)" },
|
|
342
|
+
includeTests: { type: "boolean", description: "Whether to run Test Impact Analysis on modified symbols (default: true)" },
|
|
343
|
+
includeArchitecture: { type: "boolean", description: "Whether to verify architectural boundary rules (default: true)" },
|
|
344
|
+
},
|
|
345
|
+
},
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
name: "query_code_ast",
|
|
349
|
+
description: "Execute native Tree-sitter S-Expression (Scheme DSL) queries or pre-built architectural pattern templates directly against source code in memory via WebAssembly.",
|
|
350
|
+
inputSchema: {
|
|
351
|
+
type: "object",
|
|
352
|
+
properties: {
|
|
353
|
+
filePath: { type: "string", description: "Absolute path to source file" },
|
|
354
|
+
query: { type: "string", description: "Tree-sitter S-Expression pattern (e.g. '(catch_clause (statement_block) @empty_catch)')" },
|
|
355
|
+
template: {
|
|
356
|
+
type: "string",
|
|
357
|
+
enum: ["empty-catch", "excessive-params", "nested-ternary", "eval-call", "todo-comment", "console-log", "print-call"],
|
|
358
|
+
description: "Pre-built AST query pattern template",
|
|
359
|
+
},
|
|
360
|
+
code: { type: "string", description: "Optional raw code content to query directly in memory" },
|
|
361
|
+
limit: { type: "number", description: "Maximum number of AST matches to return (default: 50)" },
|
|
362
|
+
projectRoot: { type: "string", description: "Project root directory (optional)" },
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
name: "incremental_ast_diff",
|
|
368
|
+
description: "High-performance O(log N) AST incremental re-parsing and diffing using WebAssembly Tree-sitter. Pinpoints exact changed syntax subtrees and validates AST integrity before saving.",
|
|
369
|
+
inputSchema: {
|
|
370
|
+
type: "object",
|
|
371
|
+
properties: {
|
|
372
|
+
filePath: { type: "string", description: "Absolute path to source file" },
|
|
373
|
+
oldCode: { type: "string", description: "Previous source code buffer" },
|
|
374
|
+
newCode: { type: "string", description: "New or edited source code buffer" },
|
|
375
|
+
projectRoot: { type: "string", description: "Project root directory (optional)" },
|
|
376
|
+
},
|
|
377
|
+
required: ["newCode"],
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
name: "get_ast_complexity_matrix",
|
|
382
|
+
description: "Computes McCabe Cyclomatic and Sonar Cognitive Complexity per function/method using Tree-sitter AST, identifying high-risk structural hotspots.",
|
|
383
|
+
inputSchema: {
|
|
384
|
+
type: "object",
|
|
385
|
+
properties: {
|
|
386
|
+
filePath: { type: "string", description: "Absolute path to source file" },
|
|
387
|
+
code: { type: "string", description: "Optional raw code content" },
|
|
388
|
+
threshold: { type: "number", description: "Minimum cognitive complexity threshold to filter (e.g. 10)" },
|
|
389
|
+
projectRoot: { type: "string", description: "Project root directory (optional)" },
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
name: "generate_ast_mocks",
|
|
395
|
+
description: "Generates zero-hallucination typed factory mocks, fixtures, or JSON samples directly from TypeScript interfaces/types or classes.",
|
|
396
|
+
inputSchema: {
|
|
397
|
+
type: "object",
|
|
398
|
+
properties: {
|
|
399
|
+
symbolName: { type: "string", description: "Name of the interface, type alias, or class to mock" },
|
|
400
|
+
filePath: { type: "string", description: "Absolute path to source file" },
|
|
401
|
+
code: { type: "string", description: "Optional raw code content" },
|
|
402
|
+
format: { type: "string", enum: ["factory", "fixture", "inline_json"], description: "Output mock format (default: 'factory')" },
|
|
403
|
+
projectRoot: { type: "string", description: "Project root directory (optional)" },
|
|
404
|
+
},
|
|
405
|
+
required: ["symbolName"],
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
name: "detect_dead_ast_symbols",
|
|
410
|
+
description: "Detects dead or unconsumed exports, unused internal functions, and unreachable statements after return/throw using AST reachability analysis.",
|
|
411
|
+
inputSchema: {
|
|
412
|
+
type: "object",
|
|
413
|
+
properties: {
|
|
414
|
+
filePath: { type: "string", description: "Absolute path to source file" },
|
|
415
|
+
code: { type: "string", description: "Optional raw code content" },
|
|
416
|
+
projectRoot: { type: "string", description: "Project root directory (optional)" },
|
|
417
|
+
},
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
name: "resolve_lexical_scope",
|
|
422
|
+
description: "Resolves lexical scope chains (closures, blocks, functions) and detects variable shadowing or identifier collision before renaming.",
|
|
423
|
+
inputSchema: {
|
|
424
|
+
type: "object",
|
|
425
|
+
properties: {
|
|
426
|
+
filePath: { type: "string", description: "Absolute path to source file" },
|
|
427
|
+
code: { type: "string", description: "Optional raw code content" },
|
|
428
|
+
proposedRename: {
|
|
429
|
+
type: "object",
|
|
430
|
+
properties: {
|
|
431
|
+
targetSymbol: { type: "string" },
|
|
432
|
+
newSymbolName: { type: "string" },
|
|
433
|
+
atLine: { type: "number" },
|
|
434
|
+
},
|
|
435
|
+
required: ["targetSymbol", "newSymbolName", "atLine"],
|
|
436
|
+
description: "Optional rename simulation to verify if newSymbolName collides with existing scope variables",
|
|
437
|
+
},
|
|
438
|
+
projectRoot: { type: "string", description: "Project root directory (optional)" },
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
name: "sql_ast_validator",
|
|
444
|
+
description: "Extracts and parses embedded SQL queries from TypeScript/Python/PHP code, validating syntax, checking for SQL injection risk, and cross-referencing virtual schemas.",
|
|
445
|
+
inputSchema: {
|
|
446
|
+
type: "object",
|
|
447
|
+
properties: {
|
|
448
|
+
filePath: { type: "string", description: "Absolute path to source file" },
|
|
449
|
+
code: { type: "string", description: "Optional raw code content" },
|
|
450
|
+
projectRoot: { type: "string", description: "Project root directory (optional)" },
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
name: "ast_codemod_transpile",
|
|
456
|
+
description: "Applies lossless Concrete Syntax Tree (CST) structural codemods preserving exact comments and formatting (e.g. CommonJS require to ESM import, strip console).",
|
|
457
|
+
inputSchema: {
|
|
458
|
+
type: "object",
|
|
459
|
+
properties: {
|
|
460
|
+
rule: { type: "string", enum: ["cjs-to-esm", "strip-console"], description: "Codemod transformation rule to apply" },
|
|
461
|
+
filePath: { type: "string", description: "Absolute path to source file" },
|
|
462
|
+
code: { type: "string", description: "Optional raw code content" },
|
|
463
|
+
projectRoot: { type: "string", description: "Project root directory (optional)" },
|
|
464
|
+
},
|
|
465
|
+
required: ["rule"],
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
name: "detect_async_eventloop_blockers",
|
|
470
|
+
description: "Scans async functions for synchronous blocking APIs (time.sleep, fs.readFileSync, execSync) that freeze single-threaded event loops.",
|
|
471
|
+
inputSchema: {
|
|
472
|
+
type: "object",
|
|
473
|
+
properties: {
|
|
474
|
+
filePath: { type: "string", description: "Absolute path to source file" },
|
|
475
|
+
code: { type: "string", description: "Optional raw code content" },
|
|
476
|
+
projectRoot: { type: "string", description: "Project root directory (optional)" },
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
name: "verify_env_contract_drift",
|
|
482
|
+
description: "Verifies environment variable parity between source code (process.env, os.getenv) and .env.example, detecting undocumented and zombie config keys.",
|
|
483
|
+
inputSchema: {
|
|
484
|
+
type: "object",
|
|
485
|
+
properties: {
|
|
486
|
+
filePath: { type: "string", description: "Absolute path to source file" },
|
|
487
|
+
code: { type: "string", description: "Optional raw code content" },
|
|
488
|
+
envExampleContent: { type: "string", description: "Optional .env.example raw content to compare against" },
|
|
489
|
+
projectRoot: { type: "string", description: "Project root directory (optional)" },
|
|
490
|
+
},
|
|
491
|
+
},
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
name: "audit_error_handling_contracts",
|
|
495
|
+
description: "Audits exception handling contracts, catching empty catch blocks, swallowed errors without logging, and suppressed critical process termination signals.",
|
|
496
|
+
inputSchema: {
|
|
497
|
+
type: "object",
|
|
498
|
+
properties: {
|
|
499
|
+
filePath: { type: "string", description: "Absolute path to source file" },
|
|
500
|
+
code: { type: "string", description: "Optional raw code content" },
|
|
501
|
+
projectRoot: { type: "string", description: "Project root directory (optional)" },
|
|
502
|
+
},
|
|
503
|
+
},
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
name: "extract_api_route_matrix",
|
|
507
|
+
description: "Extracts HTTP REST routes, path parameters, and handlers from FastAPI, Express, NestJS, and WP REST directly from AST without executing code.",
|
|
508
|
+
inputSchema: {
|
|
509
|
+
type: "object",
|
|
510
|
+
properties: {
|
|
511
|
+
filePath: { type: "string", description: "Absolute path to source file" },
|
|
512
|
+
code: { type: "string", description: "Optional raw code content" },
|
|
513
|
+
projectRoot: { type: "string", description: "Project root directory (optional)" },
|
|
514
|
+
},
|
|
515
|
+
},
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
name: "flatten_class_hierarchy",
|
|
519
|
+
description: "Flattens complex class hierarchies by resolving PHP traits, mixins, and inherited base classes into a unified virtual class interface.",
|
|
520
|
+
inputSchema: {
|
|
521
|
+
type: "object",
|
|
522
|
+
properties: {
|
|
523
|
+
filePath: { type: "string", description: "Absolute path to source file" },
|
|
524
|
+
className: { type: "string", description: "Name of the class to flatten (optional)" },
|
|
525
|
+
code: { type: "string", description: "Optional raw code content" },
|
|
526
|
+
projectRoot: { type: "string", description: "Project root directory (optional)" },
|
|
527
|
+
},
|
|
528
|
+
},
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
name: "detect_circular_dependencies",
|
|
532
|
+
description: "Detects circular import cycles across project modules using Tarjan's strongly connected components algorithm on AST dependency graphs.",
|
|
533
|
+
inputSchema: {
|
|
534
|
+
type: "object",
|
|
535
|
+
properties: {
|
|
536
|
+
projectRoot: { type: "string", description: "Project root directory (optional)" },
|
|
537
|
+
filePaths: { type: "array", items: { type: "string" }, description: "List of absolute or relative file paths to analyze" },
|
|
538
|
+
filesMap: { type: "object", description: "Optional in-memory map of relativeFilePath -> fileContent" },
|
|
539
|
+
},
|
|
215
540
|
},
|
|
216
541
|
},
|
|
217
542
|
{
|
|
@@ -221,12 +546,12 @@ export const CORE_TOOLS = [
|
|
|
221
546
|
type: "object",
|
|
222
547
|
properties: {
|
|
223
548
|
filePath: { type: "string", description: "Absolute path to file" },
|
|
224
|
-
projectRoot: { type: "string", description: "Project root (
|
|
549
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to file project root)" },
|
|
225
550
|
symbolName: { type: "string", description: "Symbol to explain" },
|
|
226
551
|
className: { type: "string", description: "Class name (optional, for scoping)" },
|
|
227
552
|
rootDir: { type: "string", description: "Root dir for caller search (optional, defaults to projectRoot)" },
|
|
228
553
|
},
|
|
229
|
-
required: ["filePath", "
|
|
554
|
+
required: ["filePath", "symbolName"],
|
|
230
555
|
},
|
|
231
556
|
},
|
|
232
557
|
{
|
|
@@ -248,9 +573,9 @@ export const CORE_TOOLS = [
|
|
|
248
573
|
required: ["filePath", "symbolName"],
|
|
249
574
|
},
|
|
250
575
|
},
|
|
251
|
-
projectRoot: { type: "string", description: "Project root for security boundary" },
|
|
576
|
+
projectRoot: { type: "string", description: "Project root for security boundary (optional, defaults to file project root)" },
|
|
252
577
|
},
|
|
253
|
-
required: ["reads"
|
|
578
|
+
required: ["reads"],
|
|
254
579
|
},
|
|
255
580
|
},
|
|
256
581
|
{
|
|
@@ -262,16 +587,16 @@ export const CORE_TOOLS = [
|
|
|
262
587
|
required: [],
|
|
263
588
|
},
|
|
264
589
|
},
|
|
265
|
-
// ──
|
|
590
|
+
// ── Ruby Intelligence Tools (v3.9.0) ─────────────────────────────────────
|
|
266
591
|
{
|
|
267
592
|
name: "get_gemfile_context",
|
|
268
593
|
description: "Parse Gemfile and return known gem behaviors with implicit Rails conventions. Useful for understanding what capabilities are active in a Ruby project without running the app.",
|
|
269
594
|
inputSchema: {
|
|
270
595
|
type: "object",
|
|
271
596
|
properties: {
|
|
272
|
-
projectRoot: { type: "string", description: "Project root (
|
|
597
|
+
projectRoot: { type: "string", description: "Project root (optional, defaults to current directory) — must contain a Gemfile" },
|
|
273
598
|
},
|
|
274
|
-
required: [
|
|
599
|
+
required: [],
|
|
275
600
|
},
|
|
276
601
|
},
|
|
277
602
|
{
|
|
@@ -280,11 +605,11 @@ export const CORE_TOOLS = [
|
|
|
280
605
|
inputSchema: {
|
|
281
606
|
type: "object",
|
|
282
607
|
properties: {
|
|
283
|
-
projectRoot: { type: "string", description: "Project root (
|
|
608
|
+
projectRoot: { type: "string", description: "Project root (optional, defaults to current directory)" },
|
|
284
609
|
filePath: { type: "string", description: "Scan a single file (optional — omit to scan full project)" },
|
|
285
610
|
rootDir: { type: "string", description: "Scan a subdirectory (optional — e.g. app/models)" },
|
|
286
611
|
},
|
|
287
|
-
required: [
|
|
612
|
+
required: [],
|
|
288
613
|
},
|
|
289
614
|
},
|
|
290
615
|
{
|
|
@@ -293,9 +618,64 @@ export const CORE_TOOLS = [
|
|
|
293
618
|
inputSchema: {
|
|
294
619
|
type: "object",
|
|
295
620
|
properties: {
|
|
296
|
-
projectRoot: { type: "string", description: "Project root (
|
|
621
|
+
projectRoot: { type: "string", description: "Project root (optional, defaults to current directory) — must contain config/routes.rb" },
|
|
622
|
+
},
|
|
623
|
+
required: [],
|
|
624
|
+
},
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
name: "get_impacted_tests",
|
|
628
|
+
description: "Test Impact Analysis (TIA): Map modified AST symbols to target test suites and detect minimal test runner commands.",
|
|
629
|
+
inputSchema: {
|
|
630
|
+
type: "object",
|
|
631
|
+
properties: {
|
|
632
|
+
filePath: { type: "string", description: "Absolute path to the modified source file" },
|
|
633
|
+
symbolName: { type: "string", description: "Name of the modified symbol (optional)" },
|
|
634
|
+
projectRoot: { type: "string", description: "Project root boundary (optional)" },
|
|
635
|
+
},
|
|
636
|
+
required: ["filePath"],
|
|
637
|
+
},
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
name: "get_call_hierarchy",
|
|
641
|
+
description: "AST-based 3-Hop Call Hierarchy: Trace callers and callees up to 3 hops with Mermaid graph TD visualization.",
|
|
642
|
+
inputSchema: {
|
|
643
|
+
type: "object",
|
|
644
|
+
properties: {
|
|
645
|
+
filePath: { type: "string", description: "Absolute path to file" },
|
|
646
|
+
symbolName: { type: "string", description: "Name of function or method to trace" },
|
|
647
|
+
direction: { type: "string", enum: ["callers", "callees", "both"], description: "Traversal direction (default: both)" },
|
|
648
|
+
maxHops: { type: "number", description: "Maximum hops to trace (default: 3, max: 5)" },
|
|
649
|
+
projectRoot: { type: "string", description: "Project root boundary (optional)" },
|
|
650
|
+
},
|
|
651
|
+
required: ["filePath", "symbolName"],
|
|
652
|
+
},
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
name: "validate_wire_contract",
|
|
656
|
+
description: "Cross-Language Wire Contract Validator: Verify frontend TypeScript interfaces against backend models/schemas for drift, type mismatches, and naming conventions.",
|
|
657
|
+
inputSchema: {
|
|
658
|
+
type: "object",
|
|
659
|
+
properties: {
|
|
660
|
+
frontendFile: { type: "string", description: "Absolute path to frontend file containing TypeScript interface/type" },
|
|
661
|
+
backendFile: { type: "string", description: "Absolute path to backend model/migration/entity file (optional)" },
|
|
662
|
+
endpoint: { type: "string", description: "API endpoint route (e.g. /api/users) (optional)" },
|
|
663
|
+
projectRoot: { type: "string", description: "Project root boundary (optional)" },
|
|
664
|
+
},
|
|
665
|
+
required: ["frontendFile"],
|
|
666
|
+
},
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
name: "predict_semantic_conflicts",
|
|
670
|
+
description: "Semantic Merge Conflict Predictor: Analyze AST divergence across Git branches/worktrees before merge to identify breaking symbol changes and affected dependents.",
|
|
671
|
+
inputSchema: {
|
|
672
|
+
type: "object",
|
|
673
|
+
properties: {
|
|
674
|
+
baseBranch: { type: "string", description: "Base Git ref or branch (default: HEAD~1)" },
|
|
675
|
+
targetBranch: { type: "string", description: "Target Git ref or branch (default: HEAD)" },
|
|
676
|
+
projectRoot: { type: "string", description: "Project root boundary (optional)" },
|
|
297
677
|
},
|
|
298
|
-
required: [
|
|
678
|
+
required: [],
|
|
299
679
|
},
|
|
300
680
|
},
|
|
301
681
|
// ── END NEW TOOLS ────────────────────────────────────────────────────────
|