codemap-ai 0.1.2 → 3.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.
@@ -1,367 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import {
4
- GraphStorage
5
- } from "./chunk-5ONPBEWJ.js";
6
-
7
- // src/mcp/server.ts
8
- import { Server } from "@modelcontextprotocol/sdk/server/index.js";
9
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
10
- import {
11
- CallToolRequestSchema,
12
- ListToolsRequestSchema,
13
- ListResourcesRequestSchema,
14
- ReadResourceRequestSchema
15
- } from "@modelcontextprotocol/sdk/types.js";
16
- import { resolve } from "path";
17
- var DB_PATH = process.env.CODEMAP_DB_PATH || ".codemap/graph.db";
18
- var PROJECT_ROOT = process.env.CODEMAP_PROJECT_ROOT || process.cwd();
19
- var storage = null;
20
- function getStorage() {
21
- if (!storage) {
22
- const dbPath = resolve(PROJECT_ROOT, DB_PATH);
23
- storage = new GraphStorage(dbPath);
24
- }
25
- return storage;
26
- }
27
- var server = new Server(
28
- {
29
- name: "codemap",
30
- version: "0.1.0"
31
- },
32
- {
33
- capabilities: {
34
- tools: {},
35
- resources: {}
36
- }
37
- }
38
- );
39
- server.setRequestHandler(ListToolsRequestSchema, async () => {
40
- return {
41
- tools: [
42
- {
43
- name: "codemap_search",
44
- description: "Search for functions, classes, or files in the codebase",
45
- inputSchema: {
46
- type: "object",
47
- properties: {
48
- query: {
49
- type: "string",
50
- description: "Search query (function name, class name, or file pattern)"
51
- },
52
- type: {
53
- type: "string",
54
- enum: ["function", "class", "method", "file", "all"],
55
- description: "Type of entity to search for",
56
- default: "all"
57
- }
58
- },
59
- required: ["query"]
60
- }
61
- },
62
- {
63
- name: "codemap_callers",
64
- description: "Find all functions/methods that call a specific function",
65
- inputSchema: {
66
- type: "object",
67
- properties: {
68
- functionName: {
69
- type: "string",
70
- description: "Name of the function to find callers for"
71
- }
72
- },
73
- required: ["functionName"]
74
- }
75
- },
76
- {
77
- name: "codemap_dependencies",
78
- description: "Get import/dependency information for a file",
79
- inputSchema: {
80
- type: "object",
81
- properties: {
82
- filePath: {
83
- type: "string",
84
- description: "Path to the file (relative or absolute)"
85
- }
86
- },
87
- required: ["filePath"]
88
- }
89
- },
90
- {
91
- name: "codemap_impact",
92
- description: "Analyze what files would be affected by changes to a file or function",
93
- inputSchema: {
94
- type: "object",
95
- properties: {
96
- target: {
97
- type: "string",
98
- description: "File path or function name to analyze"
99
- },
100
- depth: {
101
- type: "number",
102
- description: "How many levels of dependencies to follow (default: 2)",
103
- default: 2
104
- }
105
- },
106
- required: ["target"]
107
- }
108
- },
109
- {
110
- name: "codemap_stats",
111
- description: "Get statistics about the codebase",
112
- inputSchema: {
113
- type: "object",
114
- properties: {}
115
- }
116
- },
117
- {
118
- name: "codemap_file_contents",
119
- description: "Get all functions and classes defined in a file",
120
- inputSchema: {
121
- type: "object",
122
- properties: {
123
- filePath: {
124
- type: "string",
125
- description: "Path to the file"
126
- }
127
- },
128
- required: ["filePath"]
129
- }
130
- }
131
- ]
132
- };
133
- });
134
- server.setRequestHandler(CallToolRequestSchema, async (request) => {
135
- const { name, arguments: args } = request.params;
136
- const db = getStorage();
137
- try {
138
- switch (name) {
139
- case "codemap_search": {
140
- const query = args?.query;
141
- const type = args?.type || "all";
142
- let nodes = db.searchNodes(query);
143
- if (type !== "all") {
144
- nodes = nodes.filter((n) => n.type === type);
145
- }
146
- const results = nodes.slice(0, 20).map((n) => ({
147
- name: n.name,
148
- type: n.type,
149
- file: n.filePath,
150
- line: n.startLine,
151
- language: n.language
152
- }));
153
- return {
154
- content: [
155
- {
156
- type: "text",
157
- text: JSON.stringify(results, null, 2)
158
- }
159
- ]
160
- };
161
- }
162
- case "codemap_callers": {
163
- const functionName = args?.functionName;
164
- const callers = db.getCallers(functionName);
165
- const results = callers.map((n) => ({
166
- name: n.name,
167
- type: n.type,
168
- file: n.filePath,
169
- line: n.startLine
170
- }));
171
- return {
172
- content: [
173
- {
174
- type: "text",
175
- text: `Found ${results.length} callers of "${functionName}":
176
- ${JSON.stringify(results, null, 2)}`
177
- }
178
- ]
179
- };
180
- }
181
- case "codemap_dependencies": {
182
- const filePath = args?.filePath;
183
- const deps = db.getFileDependencies(filePath);
184
- return {
185
- content: [
186
- {
187
- type: "text",
188
- text: `Dependencies for ${filePath}:
189
-
190
- Imports:
191
- ${deps.imports.map((i) => ` - ${i}`).join("\n")}
192
-
193
- Imported by:
194
- ${deps.importedBy.map((i) => ` - ${i}`).join("\n")}`
195
- }
196
- ]
197
- };
198
- }
199
- case "codemap_impact": {
200
- const target = args?.target;
201
- const depth = args?.depth || 2;
202
- const nodes = db.searchNodes(target);
203
- if (nodes.length === 0) {
204
- return {
205
- content: [{ type: "text", text: `No matches found for "${target}"` }]
206
- };
207
- }
208
- const targetNode = nodes[0];
209
- const affected = /* @__PURE__ */ new Set();
210
- const queue = [{ id: targetNode.id, depth: 0 }];
211
- const visited = /* @__PURE__ */ new Set();
212
- while (queue.length > 0) {
213
- const current = queue.shift();
214
- if (visited.has(current.id) || current.depth > depth) continue;
215
- visited.add(current.id);
216
- const incomingEdges = db.getEdgesTo(current.id);
217
- for (const edge of incomingEdges) {
218
- const sourceNode = db.getNode(edge.sourceId);
219
- if (sourceNode) {
220
- affected.add(sourceNode.filePath);
221
- if (current.depth < depth) {
222
- queue.push({ id: sourceNode.id, depth: current.depth + 1 });
223
- }
224
- }
225
- }
226
- if (targetNode.type === "file" || targetNode.type === "function") {
227
- const importers = db.getFilesThatImport(targetNode.filePath);
228
- for (const importer of importers) {
229
- affected.add(importer);
230
- }
231
- }
232
- }
233
- const affectedList = [...affected].filter((f) => f !== targetNode.filePath);
234
- return {
235
- content: [
236
- {
237
- type: "text",
238
- text: `Impact analysis for "${target}":
239
-
240
- Target: ${targetNode.name} (${targetNode.type}) in ${targetNode.filePath}
241
-
242
- Affected files (${affectedList.length}):
243
- ${affectedList.map((f) => ` - ${f}`).join("\n") || " (none found)"}`
244
- }
245
- ]
246
- };
247
- }
248
- case "codemap_stats": {
249
- const stats = db.getStats();
250
- const rootPath = db.getMeta("rootPath") || "unknown";
251
- const analyzedAt = db.getMeta("analyzedAt") || "unknown";
252
- return {
253
- content: [
254
- {
255
- type: "text",
256
- text: `CodeMap Statistics:
257
-
258
- Project: ${rootPath}
259
- Last analyzed: ${analyzedAt}
260
-
261
- Files: ${stats.totalFiles}
262
- Nodes: ${stats.totalNodes}
263
- Edges: ${stats.totalEdges}
264
-
265
- By type:
266
- ${Object.entries(stats.nodesByType).map(([t, c]) => ` - ${t}: ${c}`).join("\n")}
267
-
268
- By language:
269
- ${Object.entries(stats.languages).map(([l, c]) => ` - ${l}: ${c}`).join("\n")}
270
-
271
- Relationships:
272
- ${Object.entries(stats.edgesByType).map(([t, c]) => ` - ${t}: ${c}`).join("\n")}`
273
- }
274
- ]
275
- };
276
- }
277
- case "codemap_file_contents": {
278
- const filePath = args?.filePath;
279
- const nodes = db.getNodesByFile(filePath);
280
- const contents = nodes.filter((n) => n.type !== "file").map((n) => ({
281
- name: n.name,
282
- type: n.type,
283
- line: `${n.startLine}-${n.endLine}`,
284
- metadata: n.metadata
285
- }));
286
- return {
287
- content: [
288
- {
289
- type: "text",
290
- text: `Contents of ${filePath}:
291
- ${JSON.stringify(contents, null, 2)}`
292
- }
293
- ]
294
- };
295
- }
296
- default:
297
- return {
298
- content: [{ type: "text", text: `Unknown tool: ${name}` }],
299
- isError: true
300
- };
301
- }
302
- } catch (error) {
303
- return {
304
- content: [
305
- {
306
- type: "text",
307
- text: `Error: ${error instanceof Error ? error.message : String(error)}`
308
- }
309
- ],
310
- isError: true
311
- };
312
- }
313
- });
314
- server.setRequestHandler(ListResourcesRequestSchema, async () => {
315
- return {
316
- resources: [
317
- {
318
- uri: "codemap://stats",
319
- name: "Codebase Statistics",
320
- description: "Overview statistics of the analyzed codebase",
321
- mimeType: "application/json"
322
- },
323
- {
324
- uri: "codemap://graph",
325
- name: "Dependency Graph",
326
- description: "Full dependency graph for visualization",
327
- mimeType: "application/json"
328
- }
329
- ]
330
- };
331
- });
332
- server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
333
- const { uri } = request.params;
334
- const db = getStorage();
335
- if (uri === "codemap://stats") {
336
- const stats = db.getStats();
337
- return {
338
- contents: [
339
- {
340
- uri,
341
- mimeType: "application/json",
342
- text: JSON.stringify(stats, null, 2)
343
- }
344
- ]
345
- };
346
- }
347
- if (uri === "codemap://graph") {
348
- const graph = db.exportForVisualization();
349
- return {
350
- contents: [
351
- {
352
- uri,
353
- mimeType: "application/json",
354
- text: JSON.stringify(graph, null, 2)
355
- }
356
- ]
357
- };
358
- }
359
- throw new Error(`Unknown resource: ${uri}`);
360
- });
361
- async function main() {
362
- const transport = new StdioServerTransport();
363
- await server.connect(transport);
364
- console.error("CodeMap MCP server started");
365
- }
366
- main().catch(console.error);
367
- //# sourceMappingURL=server-TBIVIIUJ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/mcp/server.ts"],"sourcesContent":["/**\n * MCP Server for CodeMap - Integrates with Claude Code\n */\n\nimport { Server } from \"@modelcontextprotocol/sdk/server/index.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport {\n CallToolRequestSchema,\n ListToolsRequestSchema,\n ListResourcesRequestSchema,\n ReadResourceRequestSchema,\n} from \"@modelcontextprotocol/sdk/types.js\";\nimport { GraphStorage } from \"../graph/storage.js\";\nimport { resolve } from \"path\";\n\n// Get config from environment\nconst DB_PATH = process.env.CODEMAP_DB_PATH || \".codemap/graph.db\";\nconst PROJECT_ROOT = process.env.CODEMAP_PROJECT_ROOT || process.cwd();\n\nlet storage: GraphStorage | null = null;\n\nfunction getStorage(): GraphStorage {\n if (!storage) {\n const dbPath = resolve(PROJECT_ROOT, DB_PATH);\n storage = new GraphStorage(dbPath);\n }\n return storage;\n}\n\nconst server = new Server(\n {\n name: \"codemap\",\n version: \"0.1.0\",\n },\n {\n capabilities: {\n tools: {},\n resources: {},\n },\n }\n);\n\n// ============ Tools ============\n\nserver.setRequestHandler(ListToolsRequestSchema, async () => {\n return {\n tools: [\n {\n name: \"codemap_search\",\n description: \"Search for functions, classes, or files in the codebase\",\n inputSchema: {\n type: \"object\",\n properties: {\n query: {\n type: \"string\",\n description: \"Search query (function name, class name, or file pattern)\",\n },\n type: {\n type: \"string\",\n enum: [\"function\", \"class\", \"method\", \"file\", \"all\"],\n description: \"Type of entity to search for\",\n default: \"all\",\n },\n },\n required: [\"query\"],\n },\n },\n {\n name: \"codemap_callers\",\n description: \"Find all functions/methods that call a specific function\",\n inputSchema: {\n type: \"object\",\n properties: {\n functionName: {\n type: \"string\",\n description: \"Name of the function to find callers for\",\n },\n },\n required: [\"functionName\"],\n },\n },\n {\n name: \"codemap_dependencies\",\n description: \"Get import/dependency information for a file\",\n inputSchema: {\n type: \"object\",\n properties: {\n filePath: {\n type: \"string\",\n description: \"Path to the file (relative or absolute)\",\n },\n },\n required: [\"filePath\"],\n },\n },\n {\n name: \"codemap_impact\",\n description: \"Analyze what files would be affected by changes to a file or function\",\n inputSchema: {\n type: \"object\",\n properties: {\n target: {\n type: \"string\",\n description: \"File path or function name to analyze\",\n },\n depth: {\n type: \"number\",\n description: \"How many levels of dependencies to follow (default: 2)\",\n default: 2,\n },\n },\n required: [\"target\"],\n },\n },\n {\n name: \"codemap_stats\",\n description: \"Get statistics about the codebase\",\n inputSchema: {\n type: \"object\",\n properties: {},\n },\n },\n {\n name: \"codemap_file_contents\",\n description: \"Get all functions and classes defined in a file\",\n inputSchema: {\n type: \"object\",\n properties: {\n filePath: {\n type: \"string\",\n description: \"Path to the file\",\n },\n },\n required: [\"filePath\"],\n },\n },\n ],\n };\n});\n\nserver.setRequestHandler(CallToolRequestSchema, async (request) => {\n const { name, arguments: args } = request.params;\n const db = getStorage();\n\n try {\n switch (name) {\n case \"codemap_search\": {\n const query = args?.query as string;\n const type = (args?.type as string) || \"all\";\n\n let nodes = db.searchNodes(query);\n if (type !== \"all\") {\n nodes = nodes.filter((n) => n.type === type);\n }\n\n const results = nodes.slice(0, 20).map((n) => ({\n name: n.name,\n type: n.type,\n file: n.filePath,\n line: n.startLine,\n language: n.language,\n }));\n\n return {\n content: [\n {\n type: \"text\",\n text: JSON.stringify(results, null, 2),\n },\n ],\n };\n }\n\n case \"codemap_callers\": {\n const functionName = args?.functionName as string;\n const callers = db.getCallers(functionName);\n\n const results = callers.map((n) => ({\n name: n.name,\n type: n.type,\n file: n.filePath,\n line: n.startLine,\n }));\n\n return {\n content: [\n {\n type: \"text\",\n text: `Found ${results.length} callers of \"${functionName}\":\\n${JSON.stringify(results, null, 2)}`,\n },\n ],\n };\n }\n\n case \"codemap_dependencies\": {\n const filePath = args?.filePath as string;\n const deps = db.getFileDependencies(filePath);\n\n return {\n content: [\n {\n type: \"text\",\n text: `Dependencies for ${filePath}:\\n\\nImports:\\n${deps.imports.map((i) => ` - ${i}`).join(\"\\n\")}\\n\\nImported by:\\n${deps.importedBy.map((i) => ` - ${i}`).join(\"\\n\")}`,\n },\n ],\n };\n }\n\n case \"codemap_impact\": {\n const target = args?.target as string;\n const depth = (args?.depth as number) || 2;\n\n // Find the target\n const nodes = db.searchNodes(target);\n if (nodes.length === 0) {\n return {\n content: [{ type: \"text\", text: `No matches found for \"${target}\"` }],\n };\n }\n\n const targetNode = nodes[0];\n const affected: Set<string> = new Set();\n\n // BFS to find affected files\n const queue: Array<{ id: string; depth: number }> = [{ id: targetNode.id, depth: 0 }];\n const visited = new Set<string>();\n\n while (queue.length > 0) {\n const current = queue.shift()!;\n if (visited.has(current.id) || current.depth > depth) continue;\n visited.add(current.id);\n\n // Find edges pointing to this node\n const incomingEdges = db.getEdgesTo(current.id);\n for (const edge of incomingEdges) {\n const sourceNode = db.getNode(edge.sourceId);\n if (sourceNode) {\n affected.add(sourceNode.filePath);\n if (current.depth < depth) {\n queue.push({ id: sourceNode.id, depth: current.depth + 1 });\n }\n }\n }\n\n // Also check file-level dependencies\n if (targetNode.type === \"file\" || targetNode.type === \"function\") {\n const importers = db.getFilesThatImport(targetNode.filePath);\n for (const importer of importers) {\n affected.add(importer);\n }\n }\n }\n\n const affectedList = [...affected].filter((f) => f !== targetNode.filePath);\n\n return {\n content: [\n {\n type: \"text\",\n text: `Impact analysis for \"${target}\":\\n\\nTarget: ${targetNode.name} (${targetNode.type}) in ${targetNode.filePath}\\n\\nAffected files (${affectedList.length}):\\n${affectedList.map((f) => ` - ${f}`).join(\"\\n\") || \" (none found)\"}`,\n },\n ],\n };\n }\n\n case \"codemap_stats\": {\n const stats = db.getStats();\n const rootPath = db.getMeta(\"rootPath\") || \"unknown\";\n const analyzedAt = db.getMeta(\"analyzedAt\") || \"unknown\";\n\n return {\n content: [\n {\n type: \"text\",\n text: `CodeMap Statistics:\n\nProject: ${rootPath}\nLast analyzed: ${analyzedAt}\n\nFiles: ${stats.totalFiles}\nNodes: ${stats.totalNodes}\nEdges: ${stats.totalEdges}\n\nBy type:\n${Object.entries(stats.nodesByType).map(([t, c]) => ` - ${t}: ${c}`).join(\"\\n\")}\n\nBy language:\n${Object.entries(stats.languages).map(([l, c]) => ` - ${l}: ${c}`).join(\"\\n\")}\n\nRelationships:\n${Object.entries(stats.edgesByType).map(([t, c]) => ` - ${t}: ${c}`).join(\"\\n\")}`,\n },\n ],\n };\n }\n\n case \"codemap_file_contents\": {\n const filePath = args?.filePath as string;\n const nodes = db.getNodesByFile(filePath);\n\n const contents = nodes\n .filter((n) => n.type !== \"file\")\n .map((n) => ({\n name: n.name,\n type: n.type,\n line: `${n.startLine}-${n.endLine}`,\n metadata: n.metadata,\n }));\n\n return {\n content: [\n {\n type: \"text\",\n text: `Contents of ${filePath}:\\n${JSON.stringify(contents, null, 2)}`,\n },\n ],\n };\n }\n\n default:\n return {\n content: [{ type: \"text\", text: `Unknown tool: ${name}` }],\n isError: true,\n };\n }\n } catch (error) {\n return {\n content: [\n {\n type: \"text\",\n text: `Error: ${error instanceof Error ? error.message : String(error)}`,\n },\n ],\n isError: true,\n };\n }\n});\n\n// ============ Resources ============\n\nserver.setRequestHandler(ListResourcesRequestSchema, async () => {\n return {\n resources: [\n {\n uri: \"codemap://stats\",\n name: \"Codebase Statistics\",\n description: \"Overview statistics of the analyzed codebase\",\n mimeType: \"application/json\",\n },\n {\n uri: \"codemap://graph\",\n name: \"Dependency Graph\",\n description: \"Full dependency graph for visualization\",\n mimeType: \"application/json\",\n },\n ],\n };\n});\n\nserver.setRequestHandler(ReadResourceRequestSchema, async (request) => {\n const { uri } = request.params;\n const db = getStorage();\n\n if (uri === \"codemap://stats\") {\n const stats = db.getStats();\n return {\n contents: [\n {\n uri,\n mimeType: \"application/json\",\n text: JSON.stringify(stats, null, 2),\n },\n ],\n };\n }\n\n if (uri === \"codemap://graph\") {\n const graph = db.exportForVisualization();\n return {\n contents: [\n {\n uri,\n mimeType: \"application/json\",\n text: JSON.stringify(graph, null, 2),\n },\n ],\n };\n }\n\n throw new Error(`Unknown resource: ${uri}`);\n});\n\n// ============ Main ============\n\nasync function main() {\n const transport = new StdioServerTransport();\n await server.connect(transport);\n console.error(\"CodeMap MCP server started\");\n}\n\nmain().catch(console.error);\n"],"mappings":";;;;;;;AAIA,SAAS,cAAc;AACvB,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,eAAe;AAGxB,IAAM,UAAU,QAAQ,IAAI,mBAAmB;AAC/C,IAAM,eAAe,QAAQ,IAAI,wBAAwB,QAAQ,IAAI;AAErE,IAAI,UAA+B;AAEnC,SAAS,aAA2B;AAClC,MAAI,CAAC,SAAS;AACZ,UAAM,SAAS,QAAQ,cAAc,OAAO;AAC5C,cAAU,IAAI,aAAa,MAAM;AAAA,EACnC;AACA,SAAO;AACT;AAEA,IAAM,SAAS,IAAI;AAAA,EACjB;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,cAAc;AAAA,MACZ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