code-graph-context 2.4.3 → 2.4.5
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/README.md +64 -559
- package/dist/cli/cli.js +0 -0
- package/dist/mcp/service-init.js +3 -2
- package/dist/mcp/tools/natural-language-to-cypher.tool.js +4 -2
- package/package.json +2 -1
- package/dist/core/config/graph-v2.js +0 -1595
- package/dist/core/parsers/typescript-parser-v2.js +0 -590
- package/dist/core/utils/edge-factory.js +0 -37
- package/dist/mcp/handlers/file-change-detection.js +0 -105
- package/dist/mcp/services.js +0 -79
- package/dist/mcp/workers/parse-worker.js +0 -198
- package/dist/mcp/workers/worker.pool.js +0 -54
- package/dist/parsers/cypher-result.parser.js +0 -44
- package/dist/utils/file-utils.js +0 -20
- package/dist/utils/test.js +0 -19
package/dist/cli/cli.js
CHANGED
|
File without changes
|
package/dist/mcp/service-init.js
CHANGED
|
@@ -64,8 +64,9 @@ export const initializeServices = async () => {
|
|
|
64
64
|
await checkConfiguration();
|
|
65
65
|
// Ensure Neo4j is running (fatal if not)
|
|
66
66
|
await ensureNeo4j();
|
|
67
|
-
// Initialize services
|
|
68
|
-
await
|
|
67
|
+
// Initialize services sequentially - schema must be written before NL service reads it
|
|
68
|
+
await initializeNeo4jSchema();
|
|
69
|
+
await initializeNaturalLanguageService();
|
|
69
70
|
};
|
|
70
71
|
/**
|
|
71
72
|
* Dynamically discover schema from the actual graph contents.
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* Natural Language to Cypher Tool
|
|
3
3
|
* Converts natural language queries to Cypher using OpenAI GPT-4
|
|
4
4
|
*/
|
|
5
|
+
import { join } from 'path';
|
|
5
6
|
import { z } from 'zod';
|
|
6
7
|
import { NaturalLanguageToCypherService } from '../../core/embeddings/natural-language-to-cypher.service.js';
|
|
7
8
|
import { Neo4jService } from '../../storage/neo4j/neo4j.service.js';
|
|
8
|
-
import { TOOL_NAMES, TOOL_METADATA, MESSAGES } from '../constants.js';
|
|
9
|
+
import { TOOL_NAMES, TOOL_METADATA, MESSAGES, FILE_PATHS } from '../constants.js';
|
|
9
10
|
import { createErrorResponse, createSuccessResponse, formatQueryResults, debugLog, resolveProjectIdOrError, } from '../utils.js';
|
|
10
11
|
// Service instance - initialized asynchronously
|
|
11
12
|
let naturalLanguageToCypherService = null;
|
|
@@ -15,7 +16,8 @@ let naturalLanguageToCypherService = null;
|
|
|
15
16
|
export const initializeNaturalLanguageService = async () => {
|
|
16
17
|
try {
|
|
17
18
|
const service = new NaturalLanguageToCypherService();
|
|
18
|
-
|
|
19
|
+
// Use same path as service-init.ts writes to (process.cwd())
|
|
20
|
+
const schemaPath = join(process.cwd(), FILE_PATHS.schemaOutput);
|
|
19
21
|
await service.getOrCreateAssistant(schemaPath);
|
|
20
22
|
naturalLanguageToCypherService = service;
|
|
21
23
|
await debugLog('Natural Language to Cypher service initialized successfully');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-graph-context",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.5",
|
|
4
4
|
"description": "MCP server that builds code graphs to provide rich context to LLMs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/drewdrewH/code-graph-context#readme",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
],
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "tsc",
|
|
43
|
+
"prepublishOnly": "rm -rf dist && npm run build",
|
|
43
44
|
"prepare": "npm run build",
|
|
44
45
|
"mcp": "node dist/mcp/mcp.server.js",
|
|
45
46
|
"dev": "tsc --watch",
|