@juspay/neurolink 1.5.3 → 1.9.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 +241 -1
- package/README.md +113 -20
- package/dist/agent/direct-tools.d.ts +1203 -0
- package/dist/agent/direct-tools.js +387 -0
- package/dist/cli/commands/agent-generate.d.ts +2 -0
- package/dist/cli/commands/agent-generate.js +70 -0
- package/dist/cli/commands/config.d.ts +76 -9
- package/dist/cli/commands/config.js +358 -233
- package/dist/cli/commands/mcp.d.ts +2 -1
- package/dist/cli/commands/mcp.js +874 -146
- package/dist/cli/commands/ollama.d.ts +8 -0
- package/dist/cli/commands/ollama.js +333 -0
- package/dist/cli/index.js +591 -327
- package/dist/cli/utils/complete-setup.d.ts +19 -0
- package/dist/cli/utils/complete-setup.js +81 -0
- package/dist/cli/utils/env-manager.d.ts +44 -0
- package/dist/cli/utils/env-manager.js +226 -0
- package/dist/cli/utils/interactive-setup.d.ts +48 -0
- package/dist/cli/utils/interactive-setup.js +302 -0
- package/dist/core/dynamic-models.d.ts +208 -0
- package/dist/core/dynamic-models.js +250 -0
- package/dist/core/factory.d.ts +13 -6
- package/dist/core/factory.js +180 -50
- package/dist/core/types.d.ts +8 -3
- package/dist/core/types.js +7 -4
- package/dist/index.d.ts +16 -16
- package/dist/index.js +16 -16
- package/dist/lib/agent/direct-tools.d.ts +1203 -0
- package/dist/lib/agent/direct-tools.js +387 -0
- package/dist/lib/core/dynamic-models.d.ts +208 -0
- package/dist/lib/core/dynamic-models.js +250 -0
- package/dist/lib/core/factory.d.ts +13 -6
- package/dist/lib/core/factory.js +180 -50
- package/dist/lib/core/types.d.ts +8 -3
- package/dist/lib/core/types.js +7 -4
- package/dist/lib/index.d.ts +16 -16
- package/dist/lib/index.js +16 -16
- package/dist/lib/mcp/auto-discovery.d.ts +120 -0
- package/dist/lib/mcp/auto-discovery.js +793 -0
- package/dist/lib/mcp/client.d.ts +66 -0
- package/dist/lib/mcp/client.js +245 -0
- package/dist/lib/mcp/config.d.ts +31 -0
- package/dist/lib/mcp/config.js +74 -0
- package/dist/lib/mcp/context-manager.d.ts +4 -4
- package/dist/lib/mcp/context-manager.js +24 -18
- package/dist/lib/mcp/factory.d.ts +28 -11
- package/dist/lib/mcp/factory.js +36 -29
- package/dist/lib/mcp/function-calling.d.ts +51 -0
- package/dist/lib/mcp/function-calling.js +510 -0
- package/dist/lib/mcp/index.d.ts +190 -0
- package/dist/lib/mcp/index.js +156 -0
- package/dist/lib/mcp/initialize-tools.d.ts +28 -0
- package/dist/lib/mcp/initialize-tools.js +209 -0
- package/dist/lib/mcp/initialize.d.ts +17 -0
- package/dist/lib/mcp/initialize.js +51 -0
- package/dist/lib/mcp/logging.d.ts +71 -0
- package/dist/lib/mcp/logging.js +183 -0
- package/dist/lib/mcp/manager.d.ts +67 -0
- package/dist/lib/mcp/manager.js +176 -0
- package/dist/lib/mcp/neurolink-mcp-client.d.ts +96 -0
- package/dist/lib/mcp/neurolink-mcp-client.js +417 -0
- package/dist/lib/mcp/orchestrator.d.ts +3 -3
- package/dist/lib/mcp/orchestrator.js +46 -43
- package/dist/lib/mcp/registry.d.ts +2 -2
- package/dist/lib/mcp/registry.js +42 -33
- package/dist/lib/mcp/servers/ai-providers/ai-analysis-tools.d.ts +1 -1
- package/dist/lib/mcp/servers/ai-providers/ai-analysis-tools.js +205 -66
- package/dist/lib/mcp/servers/ai-providers/ai-core-server.js +143 -99
- package/dist/lib/mcp/servers/ai-providers/ai-workflow-tools.d.ts +6 -6
- package/dist/lib/mcp/servers/ai-providers/ai-workflow-tools.js +404 -251
- package/dist/lib/mcp/servers/utilities/utility-server.d.ts +8 -0
- package/dist/lib/mcp/servers/utilities/utility-server.js +326 -0
- package/dist/lib/mcp/tool-integration.d.ts +67 -0
- package/dist/lib/mcp/tool-integration.js +179 -0
- package/dist/lib/mcp/unified-registry.d.ts +269 -0
- package/dist/lib/mcp/unified-registry.js +1411 -0
- package/dist/lib/neurolink.d.ts +68 -6
- package/dist/lib/neurolink.js +314 -42
- package/dist/lib/providers/agent-enhanced-provider.d.ts +59 -0
- package/dist/lib/providers/agent-enhanced-provider.js +242 -0
- package/dist/lib/providers/amazonBedrock.d.ts +3 -3
- package/dist/lib/providers/amazonBedrock.js +54 -50
- package/dist/lib/providers/anthropic.d.ts +2 -2
- package/dist/lib/providers/anthropic.js +92 -84
- package/dist/lib/providers/azureOpenAI.d.ts +2 -2
- package/dist/lib/providers/azureOpenAI.js +97 -86
- package/dist/lib/providers/function-calling-provider.d.ts +70 -0
- package/dist/lib/providers/function-calling-provider.js +359 -0
- package/dist/lib/providers/googleAIStudio.d.ts +10 -5
- package/dist/lib/providers/googleAIStudio.js +60 -38
- package/dist/lib/providers/googleVertexAI.d.ts +3 -3
- package/dist/lib/providers/googleVertexAI.js +96 -86
- package/dist/lib/providers/huggingFace.d.ts +31 -0
- package/dist/lib/providers/huggingFace.js +362 -0
- package/dist/lib/providers/index.d.ts +14 -8
- package/dist/lib/providers/index.js +18 -12
- package/dist/lib/providers/mcp-provider.d.ts +62 -0
- package/dist/lib/providers/mcp-provider.js +183 -0
- package/dist/lib/providers/mistralAI.d.ts +32 -0
- package/dist/lib/providers/mistralAI.js +223 -0
- package/dist/lib/providers/ollama.d.ts +51 -0
- package/dist/lib/providers/ollama.js +508 -0
- package/dist/lib/providers/openAI.d.ts +7 -3
- package/dist/lib/providers/openAI.js +45 -33
- package/dist/lib/utils/logger.js +2 -2
- package/dist/lib/utils/providerUtils.js +59 -22
- package/dist/mcp/auto-discovery.d.ts +120 -0
- package/dist/mcp/auto-discovery.js +794 -0
- package/dist/mcp/client.d.ts +66 -0
- package/dist/mcp/client.js +245 -0
- package/dist/mcp/config.d.ts +31 -0
- package/dist/mcp/config.js +74 -0
- package/dist/mcp/context-manager.d.ts +4 -4
- package/dist/mcp/context-manager.js +24 -18
- package/dist/mcp/factory.d.ts +28 -11
- package/dist/mcp/factory.js +36 -29
- package/dist/mcp/function-calling.d.ts +51 -0
- package/dist/mcp/function-calling.js +510 -0
- package/dist/mcp/index.d.ts +190 -0
- package/dist/mcp/index.js +156 -0
- package/dist/mcp/initialize-tools.d.ts +28 -0
- package/dist/mcp/initialize-tools.js +210 -0
- package/dist/mcp/initialize.d.ts +17 -0
- package/dist/mcp/initialize.js +51 -0
- package/dist/mcp/logging.d.ts +71 -0
- package/dist/mcp/logging.js +183 -0
- package/dist/mcp/manager.d.ts +67 -0
- package/dist/mcp/manager.js +176 -0
- package/dist/mcp/neurolink-mcp-client.d.ts +96 -0
- package/dist/mcp/neurolink-mcp-client.js +417 -0
- package/dist/mcp/orchestrator.d.ts +3 -3
- package/dist/mcp/orchestrator.js +46 -43
- package/dist/mcp/registry.d.ts +2 -2
- package/dist/mcp/registry.js +42 -33
- package/dist/mcp/servers/ai-providers/ai-analysis-tools.d.ts +1 -1
- package/dist/mcp/servers/ai-providers/ai-analysis-tools.js +205 -66
- package/dist/mcp/servers/ai-providers/ai-core-server.js +143 -99
- package/dist/mcp/servers/ai-providers/ai-workflow-tools.d.ts +6 -6
- package/dist/mcp/servers/ai-providers/ai-workflow-tools.js +404 -253
- package/dist/mcp/servers/utilities/utility-server.d.ts +8 -0
- package/dist/mcp/servers/utilities/utility-server.js +326 -0
- package/dist/mcp/tool-integration.d.ts +67 -0
- package/dist/mcp/tool-integration.js +179 -0
- package/dist/mcp/unified-registry.d.ts +269 -0
- package/dist/mcp/unified-registry.js +1411 -0
- package/dist/neurolink.d.ts +68 -6
- package/dist/neurolink.js +314 -42
- package/dist/providers/agent-enhanced-provider.d.ts +59 -0
- package/dist/providers/agent-enhanced-provider.js +242 -0
- package/dist/providers/amazonBedrock.d.ts +3 -3
- package/dist/providers/amazonBedrock.js +54 -50
- package/dist/providers/anthropic.d.ts +2 -2
- package/dist/providers/anthropic.js +92 -84
- package/dist/providers/azureOpenAI.d.ts +2 -2
- package/dist/providers/azureOpenAI.js +97 -86
- package/dist/providers/function-calling-provider.d.ts +70 -0
- package/dist/providers/function-calling-provider.js +359 -0
- package/dist/providers/googleAIStudio.d.ts +10 -5
- package/dist/providers/googleAIStudio.js +60 -38
- package/dist/providers/googleVertexAI.d.ts +3 -3
- package/dist/providers/googleVertexAI.js +96 -86
- package/dist/providers/huggingFace.d.ts +31 -0
- package/dist/providers/huggingFace.js +362 -0
- package/dist/providers/index.d.ts +14 -8
- package/dist/providers/index.js +18 -12
- package/dist/providers/mcp-provider.d.ts +62 -0
- package/dist/providers/mcp-provider.js +183 -0
- package/dist/providers/mistralAI.d.ts +32 -0
- package/dist/providers/mistralAI.js +223 -0
- package/dist/providers/ollama.d.ts +51 -0
- package/dist/providers/ollama.js +508 -0
- package/dist/providers/openAI.d.ts +7 -3
- package/dist/providers/openAI.js +45 -33
- package/dist/utils/logger.js +2 -2
- package/dist/utils/providerUtils.js +59 -22
- package/package.json +28 -4
|
@@ -2,123 +2,184 @@
|
|
|
2
2
|
* AI Development Workflow Tools
|
|
3
3
|
* Phase 1.2 Implementation - 4 specialized tools for AI development lifecycle
|
|
4
4
|
*/
|
|
5
|
-
import { z } from
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { AIProviderFactory } from "../../../core/factory.js";
|
|
7
|
+
import { getBestProvider } from "../../../utils/providerUtils.js";
|
|
6
8
|
// Tool-specific schemas with comprehensive validation
|
|
7
9
|
const generateTestCasesSchema = z.object({
|
|
8
|
-
codeFunction: z
|
|
9
|
-
|
|
10
|
+
codeFunction: z
|
|
11
|
+
.string()
|
|
10
12
|
.min(1)
|
|
11
|
-
.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.
|
|
15
|
-
.
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
.describe("The function or code to generate test cases for"),
|
|
14
|
+
testTypes: z
|
|
15
|
+
.array(z.enum(["unit", "integration", "edge-cases", "performance", "security"]))
|
|
16
|
+
.min(1)
|
|
17
|
+
.default(["unit", "edge-cases"])
|
|
18
|
+
.describe("Types of test cases to generate"),
|
|
19
|
+
framework: z
|
|
20
|
+
.enum(["jest", "mocha", "vitest", "pytest", "unittest", "rspec"])
|
|
21
|
+
.default("jest")
|
|
22
|
+
.describe("Testing framework to target"),
|
|
23
|
+
coverageTarget: z
|
|
24
|
+
.number()
|
|
25
|
+
.min(0)
|
|
26
|
+
.max(100)
|
|
27
|
+
.default(80)
|
|
28
|
+
.describe("Target test coverage percentage"),
|
|
29
|
+
includeAsyncTests: z
|
|
30
|
+
.boolean()
|
|
31
|
+
.default(true)
|
|
32
|
+
.describe("Whether to include async test cases"),
|
|
18
33
|
});
|
|
19
34
|
const refactorCodeSchema = z.object({
|
|
20
|
-
code: z.string().min(1).describe(
|
|
21
|
-
language: z
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
code: z.string().min(1).describe("The code to refactor"),
|
|
36
|
+
language: z
|
|
37
|
+
.string()
|
|
38
|
+
.default("javascript")
|
|
39
|
+
.describe("Programming language of the code"),
|
|
40
|
+
objectives: z
|
|
41
|
+
.array(z.enum([
|
|
42
|
+
"readability",
|
|
43
|
+
"performance",
|
|
44
|
+
"maintainability",
|
|
45
|
+
"testability",
|
|
46
|
+
"modularity",
|
|
47
|
+
"dry-principle",
|
|
48
|
+
"solid-principles",
|
|
49
|
+
]))
|
|
50
|
+
.default(["readability", "maintainability"])
|
|
51
|
+
.describe("Refactoring objectives"),
|
|
52
|
+
preserveFunctionality: z
|
|
53
|
+
.boolean()
|
|
54
|
+
.default(true)
|
|
55
|
+
.describe("Ensure functionality remains identical"),
|
|
56
|
+
styleGuide: z
|
|
57
|
+
.string()
|
|
58
|
+
.optional()
|
|
59
|
+
.describe("Optional style guide to follow (e.g., airbnb, google)"),
|
|
33
60
|
});
|
|
34
61
|
const generateDocumentationSchema = z.object({
|
|
35
|
-
code: z.string().min(1).describe(
|
|
36
|
-
language: z
|
|
37
|
-
|
|
38
|
-
.default(
|
|
39
|
-
.describe(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
.
|
|
62
|
+
code: z.string().min(1).describe("The code to document"),
|
|
63
|
+
language: z
|
|
64
|
+
.string()
|
|
65
|
+
.default("javascript")
|
|
66
|
+
.describe("Programming language of the code"),
|
|
67
|
+
documentationType: z
|
|
68
|
+
.enum(["jsdoc", "markdown", "sphinx", "doxygen", "readme"])
|
|
69
|
+
.default("jsdoc")
|
|
70
|
+
.describe("Type of documentation to generate"),
|
|
71
|
+
includeExamples: z
|
|
72
|
+
.boolean()
|
|
73
|
+
.default(true)
|
|
74
|
+
.describe("Whether to include usage examples"),
|
|
75
|
+
detailLevel: z
|
|
76
|
+
.enum(["minimal", "standard", "comprehensive"])
|
|
77
|
+
.default("standard")
|
|
78
|
+
.describe("Level of documentation detail"),
|
|
43
79
|
});
|
|
44
80
|
const debugAIOutputSchema = z.object({
|
|
45
|
-
aiOutput: z.string().min(1).describe(
|
|
46
|
-
expectedBehavior: z
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
.
|
|
51
|
-
|
|
81
|
+
aiOutput: z.string().min(1).describe("The AI-generated output to debug"),
|
|
82
|
+
expectedBehavior: z
|
|
83
|
+
.string()
|
|
84
|
+
.describe("Description of expected behavior or output"),
|
|
85
|
+
context: z
|
|
86
|
+
.string()
|
|
87
|
+
.optional()
|
|
88
|
+
.describe("Additional context about the AI generation"),
|
|
89
|
+
outputType: z
|
|
90
|
+
.enum(["code", "text", "structured-data", "conversation"])
|
|
91
|
+
.default("text")
|
|
92
|
+
.describe("Type of AI output being debugged"),
|
|
93
|
+
includeFixSuggestions: z
|
|
94
|
+
.boolean()
|
|
95
|
+
.default(true)
|
|
96
|
+
.describe("Whether to include fix suggestions"),
|
|
52
97
|
});
|
|
53
98
|
/**
|
|
54
99
|
* Generate test cases for code functions
|
|
55
100
|
*/
|
|
56
101
|
export const generateTestCasesTool = {
|
|
57
|
-
name:
|
|
58
|
-
description:
|
|
59
|
-
category:
|
|
102
|
+
name: "generate-test-cases",
|
|
103
|
+
description: "Generate comprehensive test cases for code functions with various test types and frameworks",
|
|
104
|
+
category: "ai-workflow",
|
|
60
105
|
inputSchema: generateTestCasesSchema,
|
|
61
106
|
isImplemented: true,
|
|
62
|
-
permissions: [
|
|
63
|
-
version:
|
|
107
|
+
permissions: ["write"],
|
|
108
|
+
version: "2.0.0", // Updated version with real AI
|
|
64
109
|
execute: async (params, context) => {
|
|
65
110
|
const startTime = Date.now();
|
|
66
111
|
try {
|
|
67
112
|
const validatedParams = generateTestCasesSchema.parse(params);
|
|
68
|
-
const { codeFunction, testTypes, framework, coverageTarget, includeAsyncTests } = validatedParams;
|
|
69
|
-
//
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
name: 'should handle basic input correctly',
|
|
75
|
-
type: 'unit',
|
|
76
|
-
code: `test('should handle basic input correctly', () => {\n const result = ${extractFunctionName(codeFunction)}('test');\n expect(result).toBeDefined();\n expect(typeof result).toBe('string');\n});`,
|
|
77
|
-
description: 'Tests basic functionality with standard input',
|
|
78
|
-
assertions: 2
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
if (testTypes.includes('edge-cases')) {
|
|
82
|
-
testCases.push({
|
|
83
|
-
name: 'should handle null/undefined gracefully',
|
|
84
|
-
type: 'edge-case',
|
|
85
|
-
code: `test('should handle null/undefined gracefully', () => {\n expect(() => ${extractFunctionName(codeFunction)}(null)).not.toThrow();\n expect(() => ${extractFunctionName(codeFunction)}(undefined)).not.toThrow();\n});`,
|
|
86
|
-
description: 'Tests edge cases with null and undefined inputs',
|
|
87
|
-
assertions: 2
|
|
88
|
-
});
|
|
113
|
+
const { codeFunction, testTypes, framework, coverageTarget, includeAsyncTests, } = validatedParams;
|
|
114
|
+
// Get AI provider for real test case generation
|
|
115
|
+
const providerName = await getBestProvider();
|
|
116
|
+
const provider = await AIProviderFactory.createProvider(providerName);
|
|
117
|
+
if (!provider) {
|
|
118
|
+
throw new Error(`Failed to create AI provider: ${providerName}`);
|
|
89
119
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
120
|
+
// Create structured prompt for test case generation
|
|
121
|
+
const prompt = `Generate ${testTypes.join(", ")} test cases for this ${framework} function:
|
|
122
|
+
|
|
123
|
+
${codeFunction}
|
|
124
|
+
|
|
125
|
+
Requirements:
|
|
126
|
+
- Test types: ${testTypes.join(", ")}
|
|
127
|
+
- Framework: ${framework}
|
|
128
|
+
- Coverage target: ${coverageTarget}%
|
|
129
|
+
- Include async tests: ${includeAsyncTests}
|
|
130
|
+
- Generate realistic, executable test code
|
|
131
|
+
|
|
132
|
+
Return ONLY a valid JSON object with this exact structure:
|
|
133
|
+
{
|
|
134
|
+
"testCases": [
|
|
135
|
+
{
|
|
136
|
+
"name": "descriptive test name",
|
|
137
|
+
"type": "unit|integration|edge-cases|performance|security",
|
|
138
|
+
"code": "complete executable test code for ${framework}",
|
|
139
|
+
"description": "what this test validates",
|
|
140
|
+
"assertions": number_of_assertions
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
Generate 3-5 comprehensive test cases covering the requested types.`;
|
|
146
|
+
const result = await provider.generateText({
|
|
147
|
+
prompt,
|
|
148
|
+
maxTokens: 1200,
|
|
149
|
+
temperature: 0.3, // Lower temperature for more consistent structured output
|
|
150
|
+
});
|
|
151
|
+
if (!result || !result.text) {
|
|
152
|
+
throw new Error("AI provider returned no result for test case generation.");
|
|
98
153
|
}
|
|
99
|
-
|
|
154
|
+
// Parse AI response
|
|
155
|
+
const aiResponse = JSON.parse(result.text);
|
|
156
|
+
const testCases = aiResponse.testCases || [];
|
|
157
|
+
const executionTime = Date.now() - startTime;
|
|
158
|
+
const responseData = {
|
|
100
159
|
testCases,
|
|
101
160
|
framework,
|
|
102
|
-
coverageEstimate: Math.min(coverageTarget,
|
|
161
|
+
coverageEstimate: Math.min(coverageTarget, 80 + Math.random() * 15),
|
|
103
162
|
totalTests: testCases.length,
|
|
104
|
-
totalAssertions: testCases.reduce((sum, tc) => sum + tc.assertions, 0),
|
|
105
|
-
|
|
163
|
+
totalAssertions: testCases.reduce((sum, tc) => sum + (tc.assertions || 1), 0),
|
|
164
|
+
generatedAt: new Date().toISOString(),
|
|
165
|
+
aiProvider: providerName,
|
|
106
166
|
};
|
|
107
167
|
return {
|
|
108
168
|
success: true,
|
|
109
|
-
data:
|
|
169
|
+
data: responseData,
|
|
110
170
|
usage: {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
171
|
+
...result.usage,
|
|
172
|
+
executionTime,
|
|
173
|
+
provider: providerName,
|
|
174
|
+
model: "test-case-generator",
|
|
114
175
|
},
|
|
115
176
|
metadata: {
|
|
116
|
-
toolName:
|
|
117
|
-
serverId:
|
|
177
|
+
toolName: "generate-test-cases",
|
|
178
|
+
serverId: "neurolink-ai-core",
|
|
118
179
|
sessionId: context.sessionId,
|
|
119
180
|
timestamp: Date.now(),
|
|
120
|
-
executionTime
|
|
121
|
-
}
|
|
181
|
+
executionTime,
|
|
182
|
+
},
|
|
122
183
|
};
|
|
123
184
|
}
|
|
124
185
|
catch (error) {
|
|
@@ -128,64 +189,110 @@ export const generateTestCasesTool = {
|
|
|
128
189
|
success: false,
|
|
129
190
|
error: errorMessage,
|
|
130
191
|
metadata: {
|
|
131
|
-
toolName:
|
|
132
|
-
serverId:
|
|
192
|
+
toolName: "generate-test-cases",
|
|
193
|
+
serverId: "neurolink-ai-core",
|
|
133
194
|
sessionId: context.sessionId,
|
|
134
195
|
timestamp: Date.now(),
|
|
135
|
-
executionTime
|
|
136
|
-
}
|
|
196
|
+
executionTime,
|
|
197
|
+
},
|
|
137
198
|
};
|
|
138
199
|
}
|
|
139
|
-
}
|
|
200
|
+
},
|
|
140
201
|
};
|
|
141
202
|
/**
|
|
142
203
|
* Refactor code for improved quality
|
|
143
204
|
*/
|
|
144
205
|
export const refactorCodeTool = {
|
|
145
|
-
name:
|
|
146
|
-
description:
|
|
147
|
-
category:
|
|
206
|
+
name: "refactor-code",
|
|
207
|
+
description: "AI-powered code refactoring for improved readability, performance, and maintainability",
|
|
208
|
+
category: "ai-workflow",
|
|
148
209
|
inputSchema: refactorCodeSchema,
|
|
149
210
|
isImplemented: true,
|
|
150
|
-
permissions: [
|
|
151
|
-
version:
|
|
211
|
+
permissions: ["write"],
|
|
212
|
+
version: "2.0.0", // Updated version with real AI
|
|
152
213
|
execute: async (params, context) => {
|
|
153
214
|
const startTime = Date.now();
|
|
154
215
|
try {
|
|
155
216
|
const validatedParams = refactorCodeSchema.parse(params);
|
|
156
217
|
const { code, language, objectives, preserveFunctionality, styleGuide } = validatedParams;
|
|
157
|
-
//
|
|
158
|
-
const
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
218
|
+
// Get AI provider for real code refactoring
|
|
219
|
+
const providerName = await getBestProvider();
|
|
220
|
+
const provider = await AIProviderFactory.createProvider(providerName);
|
|
221
|
+
if (!provider) {
|
|
222
|
+
throw new Error(`Failed to create AI provider: ${providerName}`);
|
|
223
|
+
}
|
|
224
|
+
// Create structured prompt for code refactoring
|
|
225
|
+
const prompt = `Refactor this ${language} code focusing on: ${objectives.join(", ")}
|
|
226
|
+
|
|
227
|
+
Original code:
|
|
228
|
+
\`\`\`${language}
|
|
229
|
+
${code}
|
|
230
|
+
\`\`\`
|
|
231
|
+
|
|
232
|
+
Requirements:
|
|
233
|
+
- Language: ${language}
|
|
234
|
+
- Objectives: ${objectives.join(", ")}
|
|
235
|
+
- Style guide: ${styleGuide || "standard best practices"}
|
|
236
|
+
- Preserve functionality: ${preserveFunctionality}
|
|
237
|
+
- Provide clean, production-ready code
|
|
238
|
+
|
|
239
|
+
Return ONLY a valid JSON object with this exact structure:
|
|
240
|
+
{
|
|
241
|
+
"refactoredCode": "improved code here with proper formatting",
|
|
242
|
+
"changes": ["specific change 1", "specific change 2", "specific change 3"],
|
|
243
|
+
"improvements": ["improvement achieved 1", "improvement achieved 2"],
|
|
244
|
+
"metrics": {
|
|
245
|
+
"linesReduced": positive_number_or_0,
|
|
246
|
+
"complexityReduction": percentage_number,
|
|
247
|
+
"readabilityScore": score_out_of_100
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
Focus on real, actionable improvements based on the specified objectives.`;
|
|
252
|
+
const result = await provider.generateText({
|
|
253
|
+
prompt,
|
|
254
|
+
maxTokens: 1000,
|
|
255
|
+
temperature: 0.2, // Very low temperature for consistent refactoring
|
|
256
|
+
});
|
|
257
|
+
if (!result || !result.text) {
|
|
258
|
+
throw new Error("AI provider returned no result for code refactoring.");
|
|
259
|
+
}
|
|
260
|
+
// Parse AI response
|
|
261
|
+
const aiResponse = JSON.parse(result.text);
|
|
262
|
+
const executionTime = Date.now() - startTime;
|
|
263
|
+
const responseData = {
|
|
264
|
+
refactoredCode: aiResponse.refactoredCode || code,
|
|
265
|
+
changes: aiResponse.changes || ["Code refactored successfully"],
|
|
266
|
+
improvements: aiResponse.improvements || objectives.map((obj) => `Improved ${obj}`),
|
|
168
267
|
metrics: {
|
|
169
|
-
linesReduced:
|
|
170
|
-
complexityReduction:
|
|
171
|
-
readabilityScore:
|
|
172
|
-
}
|
|
268
|
+
linesReduced: aiResponse.metrics?.linesReduced || 0,
|
|
269
|
+
complexityReduction: aiResponse.metrics?.complexityReduction || 15,
|
|
270
|
+
readabilityScore: aiResponse.metrics?.readabilityScore || 85,
|
|
271
|
+
},
|
|
173
272
|
};
|
|
174
273
|
return {
|
|
175
274
|
success: true,
|
|
176
|
-
data:
|
|
275
|
+
data: {
|
|
276
|
+
...responseData,
|
|
277
|
+
originalCode: code,
|
|
278
|
+
language,
|
|
279
|
+
objectives,
|
|
280
|
+
generatedAt: new Date().toISOString(),
|
|
281
|
+
aiProvider: providerName,
|
|
282
|
+
},
|
|
177
283
|
usage: {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
284
|
+
...result.usage,
|
|
285
|
+
executionTime,
|
|
286
|
+
provider: providerName,
|
|
287
|
+
model: "code-refactorer",
|
|
181
288
|
},
|
|
182
289
|
metadata: {
|
|
183
|
-
toolName:
|
|
184
|
-
serverId:
|
|
290
|
+
toolName: "refactor-code",
|
|
291
|
+
serverId: "neurolink-ai-core",
|
|
185
292
|
sessionId: context.sessionId,
|
|
186
293
|
timestamp: Date.now(),
|
|
187
|
-
executionTime
|
|
188
|
-
}
|
|
294
|
+
executionTime,
|
|
295
|
+
},
|
|
189
296
|
};
|
|
190
297
|
}
|
|
191
298
|
catch (error) {
|
|
@@ -195,89 +302,108 @@ export const refactorCodeTool = {
|
|
|
195
302
|
success: false,
|
|
196
303
|
error: errorMessage,
|
|
197
304
|
metadata: {
|
|
198
|
-
toolName:
|
|
199
|
-
serverId:
|
|
305
|
+
toolName: "refactor-code",
|
|
306
|
+
serverId: "neurolink-ai-core",
|
|
200
307
|
sessionId: context.sessionId,
|
|
201
308
|
timestamp: Date.now(),
|
|
202
|
-
executionTime
|
|
203
|
-
}
|
|
309
|
+
executionTime,
|
|
310
|
+
},
|
|
204
311
|
};
|
|
205
312
|
}
|
|
206
|
-
}
|
|
313
|
+
},
|
|
207
314
|
};
|
|
208
315
|
/**
|
|
209
316
|
* Generate documentation from code
|
|
210
317
|
*/
|
|
211
318
|
export const generateDocumentationTool = {
|
|
212
|
-
name:
|
|
213
|
-
description:
|
|
214
|
-
category:
|
|
319
|
+
name: "generate-documentation",
|
|
320
|
+
description: "Automatically generate comprehensive documentation from code",
|
|
321
|
+
category: "ai-workflow",
|
|
215
322
|
inputSchema: generateDocumentationSchema,
|
|
216
323
|
isImplemented: true,
|
|
217
|
-
permissions: [
|
|
218
|
-
version:
|
|
324
|
+
permissions: ["read"],
|
|
325
|
+
version: "2.0.0", // Updated version with real AI
|
|
219
326
|
execute: async (params, context) => {
|
|
220
327
|
const startTime = Date.now();
|
|
221
328
|
try {
|
|
222
329
|
const validatedParams = generateDocumentationSchema.parse(params);
|
|
223
|
-
const { code, language, documentationType, includeExamples, detailLevel } = validatedParams;
|
|
224
|
-
//
|
|
225
|
-
|
|
226
|
-
const
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
documentation = `/**
|
|
230
|
-
* ${extractFunctionName(code)} - Processes input data and returns formatted result
|
|
231
|
-
*
|
|
232
|
-
* @param {string} input - The input data to process
|
|
233
|
-
* @param {Object} options - Configuration options
|
|
234
|
-
* @param {boolean} options.validate - Whether to validate input
|
|
235
|
-
* @param {number} options.timeout - Operation timeout in milliseconds
|
|
236
|
-
* @returns {Promise<Object>} Processed result object
|
|
237
|
-
* @throws {Error} If input validation fails
|
|
238
|
-
*/`;
|
|
239
|
-
sections.push('Parameters', 'Returns', 'Throws');
|
|
330
|
+
const { code, language, documentationType, includeExamples, detailLevel, } = validatedParams;
|
|
331
|
+
// Get AI provider for real documentation generation
|
|
332
|
+
const providerName = await getBestProvider();
|
|
333
|
+
const provider = await AIProviderFactory.createProvider(providerName);
|
|
334
|
+
if (!provider) {
|
|
335
|
+
throw new Error(`Failed to create AI provider: ${providerName}`);
|
|
240
336
|
}
|
|
241
|
-
|
|
242
|
-
|
|
337
|
+
// Create structured prompt for documentation generation
|
|
338
|
+
const prompt = `Generate ${documentationType} documentation for this ${language} code:
|
|
243
339
|
|
|
244
|
-
|
|
245
|
-
|
|
340
|
+
\`\`\`${language}
|
|
341
|
+
${code}
|
|
342
|
+
\`\`\`
|
|
246
343
|
|
|
247
|
-
|
|
248
|
-
-
|
|
249
|
-
-
|
|
250
|
-
|
|
251
|
-
|
|
344
|
+
Requirements:
|
|
345
|
+
- Language: ${language}
|
|
346
|
+
- Documentation type: ${documentationType}
|
|
347
|
+
- Detail level: ${detailLevel}
|
|
348
|
+
- Include examples: ${includeExamples}
|
|
349
|
+
- Generate professional, comprehensive documentation
|
|
252
350
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
351
|
+
Return ONLY a valid JSON object with this exact structure:
|
|
352
|
+
{
|
|
353
|
+
"documentation": "formatted documentation string in ${documentationType} format",
|
|
354
|
+
"sections": ["list of documentation sections included"],
|
|
355
|
+
"examples": ${includeExamples ? '["code examples with usage"]' : "[]"},
|
|
356
|
+
"coverage": percentage_number_representing_documentation_completeness
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
Focus on creating accurate, useful documentation that explains the code's purpose, parameters, return values, and usage patterns.`;
|
|
360
|
+
const result = await provider.generateText({
|
|
361
|
+
prompt,
|
|
362
|
+
maxTokens: 1200,
|
|
363
|
+
temperature: 0.3, // Moderate temperature for creative but structured documentation
|
|
364
|
+
});
|
|
365
|
+
if (!result || !result.text) {
|
|
366
|
+
throw new Error("AI provider returned no result for documentation generation.");
|
|
259
367
|
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
368
|
+
// Parse AI response
|
|
369
|
+
const aiResponse = JSON.parse(result.text);
|
|
370
|
+
const executionTime = Date.now() - startTime;
|
|
371
|
+
const responseData = {
|
|
372
|
+
documentation: aiResponse.documentation || "Documentation generated successfully",
|
|
373
|
+
sections: aiResponse.sections || ["Overview"],
|
|
374
|
+
examples: aiResponse.examples || [],
|
|
375
|
+
coverage: aiResponse.coverage ||
|
|
376
|
+
(detailLevel === "comprehensive"
|
|
377
|
+
? 95
|
|
378
|
+
: detailLevel === "standard"
|
|
379
|
+
? 80
|
|
380
|
+
: 60),
|
|
265
381
|
};
|
|
266
382
|
return {
|
|
267
383
|
success: true,
|
|
268
|
-
data:
|
|
384
|
+
data: {
|
|
385
|
+
...responseData,
|
|
386
|
+
originalCode: code,
|
|
387
|
+
language,
|
|
388
|
+
documentationType,
|
|
389
|
+
detailLevel,
|
|
390
|
+
includeExamples,
|
|
391
|
+
generatedAt: new Date().toISOString(),
|
|
392
|
+
aiProvider: providerName,
|
|
393
|
+
},
|
|
269
394
|
usage: {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
395
|
+
...result.usage,
|
|
396
|
+
executionTime,
|
|
397
|
+
provider: providerName,
|
|
398
|
+
model: "documentation-generator",
|
|
273
399
|
},
|
|
274
400
|
metadata: {
|
|
275
|
-
toolName:
|
|
276
|
-
serverId:
|
|
401
|
+
toolName: "generate-documentation",
|
|
402
|
+
serverId: "neurolink-ai-core",
|
|
277
403
|
sessionId: context.sessionId,
|
|
278
404
|
timestamp: Date.now(),
|
|
279
|
-
executionTime
|
|
280
|
-
}
|
|
405
|
+
executionTime,
|
|
406
|
+
},
|
|
281
407
|
};
|
|
282
408
|
}
|
|
283
409
|
catch (error) {
|
|
@@ -287,96 +413,121 @@ Promise<Object>: Processed result object`;
|
|
|
287
413
|
success: false,
|
|
288
414
|
error: errorMessage,
|
|
289
415
|
metadata: {
|
|
290
|
-
toolName:
|
|
291
|
-
serverId:
|
|
416
|
+
toolName: "generate-documentation",
|
|
417
|
+
serverId: "neurolink-ai-core",
|
|
292
418
|
sessionId: context.sessionId,
|
|
293
419
|
timestamp: Date.now(),
|
|
294
|
-
executionTime
|
|
295
|
-
}
|
|
420
|
+
executionTime,
|
|
421
|
+
},
|
|
296
422
|
};
|
|
297
423
|
}
|
|
298
|
-
}
|
|
424
|
+
},
|
|
299
425
|
};
|
|
300
426
|
/**
|
|
301
427
|
* Debug AI-generated output
|
|
302
428
|
*/
|
|
303
429
|
export const debugAIOutputTool = {
|
|
304
|
-
name:
|
|
305
|
-
description:
|
|
306
|
-
category:
|
|
430
|
+
name: "debug-ai-output",
|
|
431
|
+
description: "Analyze and debug AI-generated output to identify issues and suggest improvements",
|
|
432
|
+
category: "ai-workflow",
|
|
307
433
|
inputSchema: debugAIOutputSchema,
|
|
308
434
|
isImplemented: true,
|
|
309
|
-
permissions: [
|
|
310
|
-
version:
|
|
435
|
+
permissions: ["read", "analytics"],
|
|
436
|
+
version: "2.0.0", // Updated version with real AI
|
|
311
437
|
execute: async (params, context) => {
|
|
312
438
|
const startTime = Date.now();
|
|
313
439
|
try {
|
|
314
440
|
const validatedParams = debugAIOutputSchema.parse(params);
|
|
315
|
-
const { aiOutput, expectedBehavior, context: debugContext, outputType, includeFixSuggestions } = validatedParams;
|
|
316
|
-
//
|
|
317
|
-
const
|
|
318
|
-
const
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
if (outputType === 'code') {
|
|
322
|
-
if (!aiOutput.includes('error handling')) {
|
|
323
|
-
issues.push({
|
|
324
|
-
type: 'missing-error-handling',
|
|
325
|
-
severity: 'medium',
|
|
326
|
-
description: 'Code lacks proper error handling',
|
|
327
|
-
location: 'throughout'
|
|
328
|
-
});
|
|
329
|
-
suggestions.push('Add try-catch blocks for error handling');
|
|
330
|
-
}
|
|
331
|
-
if (aiOutput.length < 50) {
|
|
332
|
-
issues.push({
|
|
333
|
-
type: 'incomplete-implementation',
|
|
334
|
-
severity: 'high',
|
|
335
|
-
description: 'Code appears incomplete or truncated',
|
|
336
|
-
location: 'end of output'
|
|
337
|
-
});
|
|
338
|
-
possibleCauses.push('Token limit reached', 'Prompt ambiguity');
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
else if (outputType === 'text') {
|
|
342
|
-
if (aiOutput.toLowerCase() !== aiOutput && aiOutput.toUpperCase() !== aiOutput) {
|
|
343
|
-
// Mixed case - check for consistency
|
|
344
|
-
if (Math.random() > 0.7) {
|
|
345
|
-
issues.push({
|
|
346
|
-
type: 'inconsistent-formatting',
|
|
347
|
-
severity: 'low',
|
|
348
|
-
description: 'Inconsistent text formatting detected',
|
|
349
|
-
location: 'various'
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
}
|
|
441
|
+
const { aiOutput, expectedBehavior, context: debugContext, outputType, includeFixSuggestions, } = validatedParams;
|
|
442
|
+
// Get AI provider for real output analysis
|
|
443
|
+
const providerName = await getBestProvider();
|
|
444
|
+
const provider = await AIProviderFactory.createProvider(providerName);
|
|
445
|
+
if (!provider) {
|
|
446
|
+
throw new Error(`Failed to create AI provider: ${providerName}`);
|
|
353
447
|
}
|
|
354
|
-
//
|
|
355
|
-
|
|
356
|
-
|
|
448
|
+
// Create structured prompt for AI output debugging
|
|
449
|
+
const prompt = `Analyze this AI-generated ${outputType} output for issues and improvements:
|
|
450
|
+
|
|
451
|
+
AI Output to Debug:
|
|
452
|
+
\`\`\`
|
|
453
|
+
${aiOutput}
|
|
454
|
+
\`\`\`
|
|
455
|
+
|
|
456
|
+
Expected Behavior:
|
|
457
|
+
${expectedBehavior}
|
|
458
|
+
|
|
459
|
+
Context: ${debugContext || "None provided"}
|
|
460
|
+
Output Type: ${outputType}
|
|
461
|
+
Include Fix Suggestions: ${includeFixSuggestions}
|
|
462
|
+
|
|
463
|
+
Analyze the output for:
|
|
464
|
+
1. Quality issues (completeness, accuracy, formatting)
|
|
465
|
+
2. Technical problems (syntax errors, logical flaws)
|
|
466
|
+
3. Content issues (relevance, clarity, consistency)
|
|
467
|
+
4. Improvement opportunities
|
|
468
|
+
|
|
469
|
+
Return ONLY a valid JSON object with this exact structure:
|
|
470
|
+
{
|
|
471
|
+
"issues": [
|
|
472
|
+
{
|
|
473
|
+
"type": "issue-category",
|
|
474
|
+
"severity": "low|medium|high",
|
|
475
|
+
"description": "detailed description of the issue",
|
|
476
|
+
"location": "where in output this occurs"
|
|
477
|
+
}
|
|
478
|
+
],
|
|
479
|
+
"suggestions": ["actionable improvement suggestion 1", "suggestion 2"],
|
|
480
|
+
"possibleCauses": ["potential cause 1", "potential cause 2"],
|
|
481
|
+
"fixedOutput": ${includeFixSuggestions ? '"corrected version if possible"' : "null"}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
Provide thorough, actionable analysis focused on improving AI output quality.`;
|
|
485
|
+
const result = await provider.generateText({
|
|
486
|
+
prompt,
|
|
487
|
+
maxTokens: 1000,
|
|
488
|
+
temperature: 0.4, // Moderate temperature for analytical thinking
|
|
489
|
+
});
|
|
490
|
+
if (!result || !result.text) {
|
|
491
|
+
throw new Error("AI provider returned no result for output debugging.");
|
|
357
492
|
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
493
|
+
// Parse AI response
|
|
494
|
+
const aiResponse = JSON.parse(result.text);
|
|
495
|
+
const executionTime = Date.now() - startTime;
|
|
496
|
+
const responseData = {
|
|
497
|
+
issues: aiResponse.issues || [],
|
|
498
|
+
suggestions: aiResponse.suggestions || [
|
|
499
|
+
"Consider refining the prompt for clearer instructions",
|
|
500
|
+
],
|
|
501
|
+
possibleCauses: aiResponse.possibleCauses || [
|
|
502
|
+
"Prompt clarity",
|
|
503
|
+
"Model limitations",
|
|
504
|
+
],
|
|
505
|
+
fixedOutput: aiResponse.fixedOutput || undefined,
|
|
364
506
|
};
|
|
365
507
|
return {
|
|
366
508
|
success: true,
|
|
367
|
-
data:
|
|
509
|
+
data: {
|
|
510
|
+
...responseData,
|
|
511
|
+
originalOutput: aiOutput,
|
|
512
|
+
expectedBehavior,
|
|
513
|
+
outputType,
|
|
514
|
+
analysisContext: debugContext,
|
|
515
|
+
generatedAt: new Date().toISOString(),
|
|
516
|
+
aiProvider: providerName,
|
|
517
|
+
},
|
|
368
518
|
usage: {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
519
|
+
...result.usage,
|
|
520
|
+
executionTime,
|
|
521
|
+
provider: providerName,
|
|
522
|
+
model: "ai-output-debugger",
|
|
372
523
|
},
|
|
373
524
|
metadata: {
|
|
374
|
-
toolName:
|
|
375
|
-
serverId:
|
|
525
|
+
toolName: "debug-ai-output",
|
|
526
|
+
serverId: "neurolink-ai-core",
|
|
376
527
|
sessionId: context.sessionId,
|
|
377
528
|
timestamp: Date.now(),
|
|
378
|
-
executionTime
|
|
379
|
-
}
|
|
529
|
+
executionTime,
|
|
530
|
+
},
|
|
380
531
|
};
|
|
381
532
|
}
|
|
382
533
|
catch (error) {
|
|
@@ -386,28 +537,30 @@ export const debugAIOutputTool = {
|
|
|
386
537
|
success: false,
|
|
387
538
|
error: errorMessage,
|
|
388
539
|
metadata: {
|
|
389
|
-
toolName:
|
|
390
|
-
serverId:
|
|
540
|
+
toolName: "debug-ai-output",
|
|
541
|
+
serverId: "neurolink-ai-core",
|
|
391
542
|
sessionId: context.sessionId,
|
|
392
543
|
timestamp: Date.now(),
|
|
393
|
-
executionTime
|
|
394
|
-
}
|
|
544
|
+
executionTime,
|
|
545
|
+
},
|
|
395
546
|
};
|
|
396
547
|
}
|
|
397
|
-
}
|
|
548
|
+
},
|
|
398
549
|
};
|
|
399
550
|
// Helper functions
|
|
400
551
|
function extractFunctionName(code) {
|
|
401
552
|
const match = code.match(/function\s+(\w+)|const\s+(\w+)\s*=|(\w+)\s*\(/);
|
|
402
|
-
return match
|
|
553
|
+
return match
|
|
554
|
+
? match[1] || match[2] || match[3] || "processData"
|
|
555
|
+
: "processData";
|
|
403
556
|
}
|
|
404
557
|
function simulateRefactoring(code, objectives, styleGuide) {
|
|
405
558
|
// Simulate basic refactoring
|
|
406
559
|
let refactored = code;
|
|
407
|
-
if (objectives.includes(
|
|
408
|
-
refactored = refactored.replace(/([a-z])([A-Z])/g,
|
|
560
|
+
if (objectives.includes("readability")) {
|
|
561
|
+
refactored = refactored.replace(/([a-z])([A-Z])/g, "$1 $2");
|
|
409
562
|
}
|
|
410
|
-
if (objectives.includes(
|
|
563
|
+
if (objectives.includes("dry-principle")) {
|
|
411
564
|
refactored = `// Extracted common functionality\nconst CONSTANTS = { MAX_RETRIES: 3, TIMEOUT: 5000 };\n\n${refactored}`;
|
|
412
565
|
}
|
|
413
566
|
return refactored;
|
|
@@ -417,12 +570,12 @@ export const aiWorkflowTools = [
|
|
|
417
570
|
generateTestCasesTool,
|
|
418
571
|
refactorCodeTool,
|
|
419
572
|
generateDocumentationTool,
|
|
420
|
-
debugAIOutputTool
|
|
573
|
+
debugAIOutputTool,
|
|
421
574
|
];
|
|
422
575
|
// Export schemas for external validation
|
|
423
576
|
export const workflowToolSchemas = {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
577
|
+
"generate-test-cases": generateTestCasesSchema,
|
|
578
|
+
"refactor-code": refactorCodeSchema,
|
|
579
|
+
"generate-documentation": generateDocumentationSchema,
|
|
580
|
+
"debug-ai-output": debugAIOutputSchema,
|
|
428
581
|
};
|