code-graph-context 2.4.3 → 2.4.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.
@@ -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 Promise.all([initializeNeo4jSchema(), initializeNaturalLanguageService()]);
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
- const schemaPath = 'neo4j-apoc-schema.json';
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",
3
+ "version": "2.4.4",
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",