code-graph-context 2.5.4 → 2.6.1
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/dist/core/embeddings/natural-language-to-cypher.service.js +5 -5
- package/dist/core/parsers/parser-factory.js +3 -3
- package/dist/mcp/constants.js +70 -557
- package/dist/mcp/handlers/graph-generator.handler.js +10 -10
- package/dist/mcp/handlers/traversal.handler.js +2 -2
- package/dist/mcp/mcp.server.js +1 -1
- package/dist/mcp/services/job-manager.js +2 -2
- package/dist/mcp/services/watch-manager.js +4 -4
- package/dist/mcp/tools/detect-dead-code.tool.js +0 -16
- package/dist/mcp/tools/detect-duplicate-code.tool.js +0 -27
- package/dist/mcp/tools/impact-analysis.tool.js +0 -13
- package/dist/mcp/tools/index.js +4 -15
- package/dist/mcp/tools/list-projects.tool.js +0 -2
- package/dist/mcp/tools/list-watchers.tool.js +0 -2
- package/dist/mcp/tools/natural-language-to-cypher.tool.js +0 -6
- package/dist/mcp/tools/parse-typescript-project.tool.js +5 -5
- package/dist/mcp/tools/search-codebase.tool.js +0 -19
- package/dist/mcp/tools/swarm-claim-task.tool.js +220 -93
- package/dist/mcp/tools/swarm-cleanup.tool.js +0 -8
- package/dist/mcp/tools/swarm-complete-task.tool.js +79 -88
- package/dist/mcp/tools/swarm-get-tasks.tool.js +0 -9
- package/dist/mcp/tools/swarm-orchestrate.tool.js +55 -92
- package/dist/mcp/tools/swarm-post-task.tool.js +32 -11
- package/dist/mcp/tools/traverse-from-node.tool.js +0 -15
- package/package.json +1 -1
|
@@ -195,7 +195,7 @@ Provide ONLY the JSON response with no additional text, markdown formatting, or
|
|
|
195
195
|
this.schemaPath = schemaPath;
|
|
196
196
|
if (process.env.OPENAI_ASSISTANT_ID) {
|
|
197
197
|
this.assistantId = process.env.OPENAI_ASSISTANT_ID;
|
|
198
|
-
console.
|
|
198
|
+
console.error(`Using existing assistant with ID: ${this.assistantId}`);
|
|
199
199
|
return this.assistantId;
|
|
200
200
|
}
|
|
201
201
|
const schemaFile = await this.openai.files.create({
|
|
@@ -418,7 +418,7 @@ The query will be scoped to project: ${projectId}
|
|
|
418
418
|
Remember to include WHERE n.projectId = $projectId for all node patterns.
|
|
419
419
|
`;
|
|
420
420
|
// SECURITY: Only log prompt length, not full content which may contain sensitive data
|
|
421
|
-
console.
|
|
421
|
+
console.error(`NL-to-Cypher: Processing prompt (${prompt.length} chars) for project ${projectId}`);
|
|
422
422
|
const run = await this.openai.beta.threads.createAndRunPoll({
|
|
423
423
|
assistant_id: this.assistantId,
|
|
424
424
|
thread: {
|
|
@@ -432,7 +432,7 @@ Remember to include WHERE n.projectId = $projectId for all node patterns.
|
|
|
432
432
|
});
|
|
433
433
|
const threadId = run.thread_id;
|
|
434
434
|
// SECURITY: Log minimal info, avoid exposing full objects that may contain sensitive data
|
|
435
|
-
console.
|
|
435
|
+
console.error(`NL-to-Cypher: Thread ${threadId}, status: ${run.status}`);
|
|
436
436
|
// Validate run completed successfully
|
|
437
437
|
if (run.status !== 'completed') {
|
|
438
438
|
// SECURITY: Only log status and error, not full run object which may contain sensitive data
|
|
@@ -448,7 +448,7 @@ Remember to include WHERE n.projectId = $projectId for all node patterns.
|
|
|
448
448
|
`This may occur if the assistant is still initializing. Try setting OPENAI_ASSISTANT_ID in .env.`);
|
|
449
449
|
}
|
|
450
450
|
// SECURITY: Don't log full message content which may contain user data
|
|
451
|
-
console.
|
|
451
|
+
console.error(`NL-to-Cypher: Received message with ${latestMessage.content?.length ?? 0} content blocks`);
|
|
452
452
|
if (!latestMessage.content || latestMessage.content.length === 0) {
|
|
453
453
|
throw new Error(`Message has no content. Run status: ${run.status}. Thread: ${threadId}. ` +
|
|
454
454
|
`Message role: ${latestMessage.role}`);
|
|
@@ -464,7 +464,7 @@ Remember to include WHERE n.projectId = $projectId for all node patterns.
|
|
|
464
464
|
`Text content: ${JSON.stringify(textContent)}`);
|
|
465
465
|
}
|
|
466
466
|
// SECURITY: Don't log the full text value which may contain sensitive queries
|
|
467
|
-
console.
|
|
467
|
+
console.error(`NL-to-Cypher: Parsing response (${textValue.length} chars)`);
|
|
468
468
|
// Parse the response with proper error handling
|
|
469
469
|
let result;
|
|
470
470
|
try {
|
|
@@ -23,8 +23,8 @@ export class ParserFactory {
|
|
|
23
23
|
customFrameworkSchemas = [], excludePatterns = EXCLUDE_PATTERNS_REGEX, excludedNodeTypes = [CoreNodeType.PARAMETER_DECLARATION], projectId, lazyLoad = false, } = options;
|
|
24
24
|
// Select framework schemas based on project type
|
|
25
25
|
const frameworkSchemas = this.selectFrameworkSchemas(projectType, customFrameworkSchemas);
|
|
26
|
-
console.
|
|
27
|
-
console.
|
|
26
|
+
console.error(`📦 Creating parser for ${projectType} project`);
|
|
27
|
+
console.error(`📚 Framework schemas: ${frameworkSchemas.map((s) => s.name).join(', ')}`);
|
|
28
28
|
return new TypeScriptParser(workspacePath, tsConfigPath, CORE_TYPESCRIPT_SCHEMA, frameworkSchemas, {
|
|
29
29
|
excludePatterns,
|
|
30
30
|
excludedNodeTypes,
|
|
@@ -93,7 +93,7 @@ export class ParserFactory {
|
|
|
93
93
|
*/
|
|
94
94
|
static async createParserWithAutoDetection(workspacePath, tsConfigPath, projectId, lazyLoad = false) {
|
|
95
95
|
const projectType = await this.detectProjectType(workspacePath);
|
|
96
|
-
console.
|
|
96
|
+
console.error(`🔍 Auto-detected project type: ${projectType}`);
|
|
97
97
|
return this.createParser({
|
|
98
98
|
workspacePath,
|
|
99
99
|
tsConfigPath,
|