atlas-pipeline-mcp 1.0.19 → 1.0.21

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.
Files changed (43) hide show
  1. package/dist/mcp.js +191 -0
  2. package/dist/mcp.js.map +1 -1
  3. package/dist/tools/context.d.ts +33 -7
  4. package/dist/tools/context.d.ts.map +1 -1
  5. package/dist/tools/context.js +167 -82
  6. package/dist/tools/context.js.map +1 -1
  7. package/dist/tools/dashboard.d.ts +107 -0
  8. package/dist/tools/dashboard.d.ts.map +1 -0
  9. package/dist/tools/dashboard.js +544 -0
  10. package/dist/tools/dashboard.js.map +1 -0
  11. package/dist/tools/dependencies.d.ts +105 -0
  12. package/dist/tools/dependencies.d.ts.map +1 -0
  13. package/dist/tools/dependencies.js +410 -0
  14. package/dist/tools/dependencies.js.map +1 -0
  15. package/dist/tools/git.d.ts +27 -4
  16. package/dist/tools/git.d.ts.map +1 -1
  17. package/dist/tools/git.js +156 -59
  18. package/dist/tools/git.js.map +1 -1
  19. package/dist/tools/profiler.d.ts +83 -0
  20. package/dist/tools/profiler.d.ts.map +1 -0
  21. package/dist/tools/profiler.js +385 -0
  22. package/dist/tools/profiler.js.map +1 -0
  23. package/dist/tools/refactor.d.ts +63 -0
  24. package/dist/tools/refactor.d.ts.map +1 -0
  25. package/dist/tools/refactor.js +308 -0
  26. package/dist/tools/refactor.js.map +1 -0
  27. package/dist/tools/resource-manager.d.ts +167 -0
  28. package/dist/tools/resource-manager.d.ts.map +1 -0
  29. package/dist/tools/resource-manager.js +352 -0
  30. package/dist/tools/resource-manager.js.map +1 -0
  31. package/dist/tools/review.d.ts +98 -0
  32. package/dist/tools/review.d.ts.map +1 -0
  33. package/dist/tools/review.js +428 -0
  34. package/dist/tools/review.js.map +1 -0
  35. package/dist/tools/test-utils.d.ts +170 -0
  36. package/dist/tools/test-utils.d.ts.map +1 -0
  37. package/dist/tools/test-utils.js +490 -0
  38. package/dist/tools/test-utils.js.map +1 -0
  39. package/dist/tools/validation.d.ts +237 -0
  40. package/dist/tools/validation.d.ts.map +1 -0
  41. package/dist/tools/validation.js +323 -0
  42. package/dist/tools/validation.js.map +1 -0
  43. package/package.json +1 -1
@@ -0,0 +1,237 @@
1
+ /**
2
+ * Atlas Server - Input Validation and Sanitization
3
+ *
4
+ * Comprehensive validation layer for all tool inputs to ensure:
5
+ * - Type safety at runtime
6
+ * - Security against injection attacks
7
+ * - Proper error messages for debugging
8
+ * - Performance through caching
9
+ *
10
+ * @module validation
11
+ * @version 1.0.0
12
+ */
13
+ import { z } from 'zod';
14
+ /** Safe string schema with length limits */
15
+ export declare const SafeStringSchema: z.ZodEffects<z.ZodString, string, string>;
16
+ /** Code string schema with specific limits */
17
+ export declare const CodeStringSchema: z.ZodString;
18
+ /** File path schema with security validation */
19
+ export declare const FilePathSchema: z.ZodEffects<z.ZodString, string, string>;
20
+ /** Optional file path */
21
+ export declare const OptionalFilePathSchema: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
22
+ /** Language identifier */
23
+ export declare const LanguageSchema: z.ZodEnum<["typescript", "javascript", "python", "rust", "go", "java", "c", "cpp", "csharp", "ruby", "php", "swift", "kotlin", "scala", "dart", "elixir", "haskell", "other"]>;
24
+ /** Framework identifier */
25
+ export declare const FrameworkSchema: z.ZodEnum<["react", "vue", "angular", "svelte", "next", "nuxt", "express", "fastify", "nestjs", "django", "flask", "spring", "rails", "laravel", "other"]>;
26
+ export declare const DebugRequestSchema: z.ZodEffects<z.ZodObject<{
27
+ error: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
28
+ stackTrace: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
29
+ code: z.ZodOptional<z.ZodString>;
30
+ context: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
31
+ language: z.ZodOptional<z.ZodEnum<["typescript", "javascript", "python", "rust", "go", "java", "c", "cpp", "csharp", "ruby", "php", "swift", "kotlin", "scala", "dart", "elixir", "haskell", "other"]>>;
32
+ framework: z.ZodOptional<z.ZodEnum<["react", "vue", "angular", "svelte", "next", "nuxt", "express", "fastify", "nestjs", "django", "flask", "spring", "rails", "laravel", "other"]>>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ context?: string | undefined;
35
+ language?: "other" | "typescript" | "javascript" | "python" | "go" | "ruby" | "rust" | "java" | "c" | "cpp" | "csharp" | "php" | "swift" | "kotlin" | "scala" | "dart" | "elixir" | "haskell" | undefined;
36
+ framework?: "other" | "next" | "react" | "vue" | "svelte" | "fastify" | "express" | "angular" | "django" | "flask" | "nuxt" | "nestjs" | "spring" | "rails" | "laravel" | undefined;
37
+ code?: string | undefined;
38
+ error?: string | undefined;
39
+ stackTrace?: string | undefined;
40
+ }, {
41
+ context?: string | undefined;
42
+ language?: "other" | "typescript" | "javascript" | "python" | "go" | "ruby" | "rust" | "java" | "c" | "cpp" | "csharp" | "php" | "swift" | "kotlin" | "scala" | "dart" | "elixir" | "haskell" | undefined;
43
+ framework?: "other" | "next" | "react" | "vue" | "svelte" | "fastify" | "express" | "angular" | "django" | "flask" | "nuxt" | "nestjs" | "spring" | "rails" | "laravel" | undefined;
44
+ code?: string | undefined;
45
+ error?: string | undefined;
46
+ stackTrace?: string | undefined;
47
+ }>, {
48
+ context?: string | undefined;
49
+ language?: "other" | "typescript" | "javascript" | "python" | "go" | "ruby" | "rust" | "java" | "c" | "cpp" | "csharp" | "php" | "swift" | "kotlin" | "scala" | "dart" | "elixir" | "haskell" | undefined;
50
+ framework?: "other" | "next" | "react" | "vue" | "svelte" | "fastify" | "express" | "angular" | "django" | "flask" | "nuxt" | "nestjs" | "spring" | "rails" | "laravel" | undefined;
51
+ code?: string | undefined;
52
+ error?: string | undefined;
53
+ stackTrace?: string | undefined;
54
+ }, {
55
+ context?: string | undefined;
56
+ language?: "other" | "typescript" | "javascript" | "python" | "go" | "ruby" | "rust" | "java" | "c" | "cpp" | "csharp" | "php" | "swift" | "kotlin" | "scala" | "dart" | "elixir" | "haskell" | undefined;
57
+ framework?: "other" | "next" | "react" | "vue" | "svelte" | "fastify" | "express" | "angular" | "django" | "flask" | "nuxt" | "nestjs" | "spring" | "rails" | "laravel" | undefined;
58
+ code?: string | undefined;
59
+ error?: string | undefined;
60
+ stackTrace?: string | undefined;
61
+ }>;
62
+ export type ValidatedDebugRequest = z.infer<typeof DebugRequestSchema>;
63
+ export declare const DocumentationOptionsSchema: z.ZodObject<{
64
+ style: z.ZodOptional<z.ZodEnum<["jsdoc", "tsdoc", "pydoc", "godoc", "rustdoc", "auto"]>>;
65
+ format: z.ZodOptional<z.ZodEnum<["markdown", "html", "json", "plain"]>>;
66
+ includeExamples: z.ZodOptional<z.ZodBoolean>;
67
+ includeTypes: z.ZodOptional<z.ZodBoolean>;
68
+ verbose: z.ZodOptional<z.ZodBoolean>;
69
+ language: z.ZodOptional<z.ZodEnum<["typescript", "javascript", "python", "rust", "go", "java", "c", "cpp", "csharp", "ruby", "php", "swift", "kotlin", "scala", "dart", "elixir", "haskell", "other"]>>;
70
+ }, "strip", z.ZodTypeAny, {
71
+ language?: "other" | "typescript" | "javascript" | "python" | "go" | "ruby" | "rust" | "java" | "c" | "cpp" | "csharp" | "php" | "swift" | "kotlin" | "scala" | "dart" | "elixir" | "haskell" | undefined;
72
+ style?: "auto" | "jsdoc" | "tsdoc" | "pydoc" | "godoc" | "rustdoc" | undefined;
73
+ format?: "markdown" | "html" | "json" | "plain" | undefined;
74
+ includeExamples?: boolean | undefined;
75
+ includeTypes?: boolean | undefined;
76
+ verbose?: boolean | undefined;
77
+ }, {
78
+ language?: "other" | "typescript" | "javascript" | "python" | "go" | "ruby" | "rust" | "java" | "c" | "cpp" | "csharp" | "php" | "swift" | "kotlin" | "scala" | "dart" | "elixir" | "haskell" | undefined;
79
+ style?: "auto" | "jsdoc" | "tsdoc" | "pydoc" | "godoc" | "rustdoc" | undefined;
80
+ format?: "markdown" | "html" | "json" | "plain" | undefined;
81
+ includeExamples?: boolean | undefined;
82
+ includeTypes?: boolean | undefined;
83
+ verbose?: boolean | undefined;
84
+ }>;
85
+ export type ValidatedDocumentationOptions = z.infer<typeof DocumentationOptionsSchema>;
86
+ export declare const ExplanationOptionsSchema: z.ZodObject<{
87
+ level: z.ZodOptional<z.ZodEnum<["beginner", "intermediate", "expert"]>>;
88
+ type: z.ZodOptional<z.ZodEnum<["overview", "detailed", "line-by-line", "algorithm"]>>;
89
+ language: z.ZodOptional<z.ZodEnum<["typescript", "javascript", "python", "rust", "go", "java", "c", "cpp", "csharp", "ruby", "php", "swift", "kotlin", "scala", "dart", "elixir", "haskell", "other"]>>;
90
+ focusArea: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
91
+ includeComplexity: z.ZodOptional<z.ZodBoolean>;
92
+ includePatterns: z.ZodOptional<z.ZodBoolean>;
93
+ }, "strip", z.ZodTypeAny, {
94
+ language?: "other" | "typescript" | "javascript" | "python" | "go" | "ruby" | "rust" | "java" | "c" | "cpp" | "csharp" | "php" | "swift" | "kotlin" | "scala" | "dart" | "elixir" | "haskell" | undefined;
95
+ type?: "overview" | "detailed" | "line-by-line" | "algorithm" | undefined;
96
+ level?: "beginner" | "intermediate" | "expert" | undefined;
97
+ focusArea?: string | undefined;
98
+ includeComplexity?: boolean | undefined;
99
+ includePatterns?: boolean | undefined;
100
+ }, {
101
+ language?: "other" | "typescript" | "javascript" | "python" | "go" | "ruby" | "rust" | "java" | "c" | "cpp" | "csharp" | "php" | "swift" | "kotlin" | "scala" | "dart" | "elixir" | "haskell" | undefined;
102
+ type?: "overview" | "detailed" | "line-by-line" | "algorithm" | undefined;
103
+ level?: "beginner" | "intermediate" | "expert" | undefined;
104
+ focusArea?: string | undefined;
105
+ includeComplexity?: boolean | undefined;
106
+ includePatterns?: boolean | undefined;
107
+ }>;
108
+ export type ValidatedExplanationOptions = z.infer<typeof ExplanationOptionsSchema>;
109
+ export declare const TestGenerationOptionsSchema: z.ZodObject<{
110
+ language: z.ZodOptional<z.ZodEnum<["typescript", "javascript", "python", "rust", "go", "java", "c", "cpp", "csharp", "ruby", "php", "swift", "kotlin", "scala", "dart", "elixir", "haskell", "other"]>>;
111
+ framework: z.ZodOptional<z.ZodEnum<["jest", "vitest", "mocha", "pytest", "unittest", "go_test", "rspec", "auto"]>>;
112
+ testType: z.ZodOptional<z.ZodEnum<["unit", "integration", "e2e", "snapshot", "property"]>>;
113
+ functionName: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
114
+ context: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ context?: string | undefined;
117
+ language?: "other" | "typescript" | "javascript" | "python" | "go" | "ruby" | "rust" | "java" | "c" | "cpp" | "csharp" | "php" | "swift" | "kotlin" | "scala" | "dart" | "elixir" | "haskell" | undefined;
118
+ framework?: "auto" | "jest" | "vitest" | "mocha" | "pytest" | "unittest" | "go_test" | "rspec" | undefined;
119
+ testType?: "unit" | "integration" | "e2e" | "snapshot" | "property" | undefined;
120
+ functionName?: string | undefined;
121
+ }, {
122
+ context?: string | undefined;
123
+ language?: "other" | "typescript" | "javascript" | "python" | "go" | "ruby" | "rust" | "java" | "c" | "cpp" | "csharp" | "php" | "swift" | "kotlin" | "scala" | "dart" | "elixir" | "haskell" | undefined;
124
+ framework?: "auto" | "jest" | "vitest" | "mocha" | "pytest" | "unittest" | "go_test" | "rspec" | undefined;
125
+ testType?: "unit" | "integration" | "e2e" | "snapshot" | "property" | undefined;
126
+ functionName?: string | undefined;
127
+ }>;
128
+ export type ValidatedTestGenerationOptions = z.infer<typeof TestGenerationOptionsSchema>;
129
+ export declare const SecurityScanOptionsSchema: z.ZodObject<{
130
+ language: z.ZodOptional<z.ZodEnum<["typescript", "javascript", "python", "rust", "go", "java", "c", "cpp", "csharp", "ruby", "php", "swift", "kotlin", "scala", "dart", "elixir", "haskell", "other"]>>;
131
+ severity: z.ZodOptional<z.ZodEnum<["critical", "high", "medium", "low", "info", "all"]>>;
132
+ categories: z.ZodOptional<z.ZodArray<z.ZodEnum<["injection", "authentication", "authorization", "xss", "secrets", "cryptography", "configuration", "dependencies", "input_validation", "sensitive_data", "other"]>, "many">>;
133
+ }, "strip", z.ZodTypeAny, {
134
+ language?: "other" | "typescript" | "javascript" | "python" | "go" | "ruby" | "rust" | "java" | "c" | "cpp" | "csharp" | "php" | "swift" | "kotlin" | "scala" | "dart" | "elixir" | "haskell" | undefined;
135
+ severity?: "low" | "high" | "medium" | "critical" | "info" | "all" | undefined;
136
+ categories?: ("other" | "injection" | "authentication" | "authorization" | "xss" | "secrets" | "cryptography" | "configuration" | "dependencies" | "input_validation" | "sensitive_data")[] | undefined;
137
+ }, {
138
+ language?: "other" | "typescript" | "javascript" | "python" | "go" | "ruby" | "rust" | "java" | "c" | "cpp" | "csharp" | "php" | "swift" | "kotlin" | "scala" | "dart" | "elixir" | "haskell" | undefined;
139
+ severity?: "low" | "high" | "medium" | "critical" | "info" | "all" | undefined;
140
+ categories?: ("other" | "injection" | "authentication" | "authorization" | "xss" | "secrets" | "cryptography" | "configuration" | "dependencies" | "input_validation" | "sensitive_data")[] | undefined;
141
+ }>;
142
+ export type ValidatedSecurityScanOptions = z.infer<typeof SecurityScanOptionsSchema>;
143
+ /**
144
+ * Validate and sanitize input with comprehensive error reporting
145
+ *
146
+ * @template T - Zod schema type
147
+ * @param schema - Zod schema to validate against
148
+ * @param data - Data to validate
149
+ * @param context - Context for error messages
150
+ * @returns Validated data
151
+ * @throws {ValidationError} If validation fails
152
+ */
153
+ export declare function validateInput<T extends z.ZodType>(schema: T, data: unknown, context?: string): z.infer<T>;
154
+ /**
155
+ * Validate input and return result without throwing
156
+ *
157
+ * @template T - Zod schema type
158
+ * @param schema - Zod schema to validate against
159
+ * @param data - Data to validate
160
+ * @returns Validation result with data or errors
161
+ */
162
+ export declare function safeValidate<T extends z.ZodType>(schema: T, data: unknown): {
163
+ success: true;
164
+ data: z.infer<T>;
165
+ } | {
166
+ success: false;
167
+ errors: z.ZodIssue[];
168
+ };
169
+ /**
170
+ * Sanitize string to prevent injection attacks
171
+ *
172
+ * @param input - String to sanitize
173
+ * @param options - Sanitization options
174
+ * @returns Sanitized string
175
+ */
176
+ export declare function sanitizeString(input: string, options?: {
177
+ maxLength?: number;
178
+ allowHtml?: boolean;
179
+ allowSpecialChars?: boolean;
180
+ }): string;
181
+ /**
182
+ * Validate file path for security
183
+ *
184
+ * @param path - Path to validate
185
+ * @returns True if path is safe
186
+ */
187
+ export declare function isSecurePath(path: string): boolean;
188
+ /**
189
+ * Sanitize code input to prevent injection
190
+ *
191
+ * @param code - Code to sanitize
192
+ * @param maxSize - Maximum size in bytes
193
+ * @returns Sanitized code
194
+ */
195
+ export declare function sanitizeCode(code: string, maxSize?: number): string;
196
+ /**
197
+ * Custom validation error with detailed information
198
+ */
199
+ export declare class ValidationError extends Error {
200
+ readonly issues: z.ZodIssue[];
201
+ constructor(message: string, issues?: z.ZodIssue[]);
202
+ /** Get formatted error messages */
203
+ getFormattedErrors(): string[];
204
+ /** Convert to JSON for API responses */
205
+ toJSON(): Record<string, unknown>;
206
+ }
207
+ /**
208
+ * Simple in-memory rate limiter for tool calls
209
+ */
210
+ export declare class RateLimiter {
211
+ private readonly maxRequests;
212
+ private readonly windowMs;
213
+ private requests;
214
+ constructor(maxRequests?: number, windowMs?: number);
215
+ /**
216
+ * Check if request is allowed
217
+ *
218
+ * @param key - Unique identifier for the requester
219
+ * @returns True if allowed, false if rate limited
220
+ */
221
+ isAllowed(key: string): boolean;
222
+ /**
223
+ * Cleanup old entries to prevent memory leaks
224
+ */
225
+ private cleanup;
226
+ /**
227
+ * Clear all rate limit data
228
+ */
229
+ clear(): void;
230
+ /**
231
+ * Get current count for a key
232
+ */
233
+ getCount(key: string): number;
234
+ }
235
+ /** Global rate limiter instance */
236
+ export declare const globalRateLimiter: RateLimiter;
237
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/tools/validation.ts"],"names":[],"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B,OAAO,CAAC,QAAQ,CAA+B;gBAG5B,WAAW,GAAE,MAAY,EACzB,QAAQ,GAAE,MAAc;IAG3C;;;;;OAKG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAwB/B;;OAEG;IACH,OAAO,CAAC,OAAO;IAcf;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;CAK9B;AAED,mCAAmC;AACnC,eAAO,MAAM,iBAAiB,aAA8B,CAAC"}
@@ -0,0 +1,323 @@
1
+ /**
2
+ * Atlas Server - Input Validation and Sanitization
3
+ *
4
+ * Comprehensive validation layer for all tool inputs to ensure:
5
+ * - Type safety at runtime
6
+ * - Security against injection attacks
7
+ * - Proper error messages for debugging
8
+ * - Performance through caching
9
+ *
10
+ * @module validation
11
+ * @version 1.0.0
12
+ */
13
+ import { z } from 'zod';
14
+ import { logger } from '../utils.js';
15
+ // ============================================================================
16
+ // Security Constants
17
+ // ============================================================================
18
+ /** Maximum safe string length (prevents DoS) */
19
+ const MAX_STRING_LENGTH = 1_000_000; // 1MB
20
+ /** Maximum code size to process */
21
+ const MAX_CODE_SIZE = 500_000; // 500KB
22
+ /** Maximum array length */
23
+ const MAX_ARRAY_LENGTH = 1000;
24
+ /** Regex patterns for security validation */
25
+ const SECURITY_PATTERNS = {
26
+ /** Path traversal attack patterns */
27
+ PATH_TRAVERSAL: /\.\.[\/\\]/,
28
+ /** SQL injection patterns */
29
+ SQL_INJECTION: /(union|select|insert|update|delete|drop|create|alter|exec|script|javascript|onerror|onload)/i,
30
+ /** Command injection patterns */
31
+ COMMAND_INJECTION: /[;&|`$(){}[\]<>]/,
32
+ /** Safe file path pattern */
33
+ SAFE_PATH: /^[a-zA-Z0-9._\-\/\\:]+$/,
34
+ };
35
+ // ============================================================================
36
+ // Base Schemas
37
+ // ============================================================================
38
+ /** Safe string schema with length limits */
39
+ export const SafeStringSchema = z
40
+ .string()
41
+ .max(MAX_STRING_LENGTH, 'String exceeds maximum length')
42
+ .transform((val) => val.trim());
43
+ /** Code string schema with specific limits */
44
+ export const CodeStringSchema = z
45
+ .string()
46
+ .max(MAX_CODE_SIZE, 'Code exceeds maximum size')
47
+ .min(1, 'Code cannot be empty');
48
+ /** File path schema with security validation */
49
+ export const FilePathSchema = z
50
+ .string()
51
+ .min(1, 'Path cannot be empty')
52
+ .max(1000, 'Path too long')
53
+ .refine((path) => !SECURITY_PATTERNS.PATH_TRAVERSAL.test(path), 'Path contains path traversal characters');
54
+ /** Optional file path */
55
+ export const OptionalFilePathSchema = FilePathSchema.optional();
56
+ /** Language identifier */
57
+ export const LanguageSchema = z.enum([
58
+ 'typescript', 'javascript', 'python', 'rust', 'go', 'java',
59
+ 'c', 'cpp', 'csharp', 'ruby', 'php', 'swift', 'kotlin',
60
+ 'scala', 'dart', 'elixir', 'haskell', 'other'
61
+ ]);
62
+ /** Framework identifier */
63
+ export const FrameworkSchema = z.enum([
64
+ 'react', 'vue', 'angular', 'svelte', 'next', 'nuxt',
65
+ 'express', 'fastify', 'nestjs', 'django', 'flask', 'spring',
66
+ 'rails', 'laravel', 'other'
67
+ ]);
68
+ // ============================================================================
69
+ // Debug Tool Validation
70
+ // ============================================================================
71
+ export const DebugRequestSchema = z.object({
72
+ error: SafeStringSchema.optional(),
73
+ stackTrace: SafeStringSchema.optional(),
74
+ code: CodeStringSchema.optional(),
75
+ context: SafeStringSchema.optional(),
76
+ language: LanguageSchema.optional(),
77
+ framework: FrameworkSchema.optional(),
78
+ }).refine((data) => data.error || data.stackTrace, 'Either error or stackTrace must be provided');
79
+ // ============================================================================
80
+ // Documentation Tool Validation
81
+ // ============================================================================
82
+ export const DocumentationOptionsSchema = z.object({
83
+ style: z.enum(['jsdoc', 'tsdoc', 'pydoc', 'godoc', 'rustdoc', 'auto']).optional(),
84
+ format: z.enum(['markdown', 'html', 'json', 'plain']).optional(),
85
+ includeExamples: z.boolean().optional(),
86
+ includeTypes: z.boolean().optional(),
87
+ verbose: z.boolean().optional(),
88
+ language: LanguageSchema.optional(),
89
+ });
90
+ // ============================================================================
91
+ // Explanation Tool Validation
92
+ // ============================================================================
93
+ export const ExplanationOptionsSchema = z.object({
94
+ level: z.enum(['beginner', 'intermediate', 'expert']).optional(),
95
+ type: z.enum(['overview', 'detailed', 'line-by-line', 'algorithm']).optional(),
96
+ language: LanguageSchema.optional(),
97
+ focusArea: SafeStringSchema.optional(),
98
+ includeComplexity: z.boolean().optional(),
99
+ includePatterns: z.boolean().optional(),
100
+ });
101
+ // ============================================================================
102
+ // Test Generation Validation
103
+ // ============================================================================
104
+ export const TestGenerationOptionsSchema = z.object({
105
+ language: LanguageSchema.optional(),
106
+ framework: z.enum(['jest', 'vitest', 'mocha', 'pytest', 'unittest', 'go_test', 'rspec', 'auto']).optional(),
107
+ testType: z.enum(['unit', 'integration', 'e2e', 'snapshot', 'property']).optional(),
108
+ functionName: SafeStringSchema.optional(),
109
+ context: SafeStringSchema.optional(),
110
+ });
111
+ // ============================================================================
112
+ // Security Scan Validation
113
+ // ============================================================================
114
+ export const SecurityScanOptionsSchema = z.object({
115
+ language: LanguageSchema.optional(),
116
+ severity: z.enum(['critical', 'high', 'medium', 'low', 'info', 'all']).optional(),
117
+ categories: z.array(z.enum([
118
+ 'injection', 'authentication', 'authorization', 'xss', 'secrets',
119
+ 'cryptography', 'configuration', 'dependencies', 'input_validation',
120
+ 'sensitive_data', 'other'
121
+ ])).max(MAX_ARRAY_LENGTH).optional(),
122
+ });
123
+ // ============================================================================
124
+ // Validation Utilities
125
+ // ============================================================================
126
+ /**
127
+ * Validate and sanitize input with comprehensive error reporting
128
+ *
129
+ * @template T - Zod schema type
130
+ * @param schema - Zod schema to validate against
131
+ * @param data - Data to validate
132
+ * @param context - Context for error messages
133
+ * @returns Validated data
134
+ * @throws {ValidationError} If validation fails
135
+ */
136
+ export function validateInput(schema, data, context = 'input') {
137
+ try {
138
+ return schema.parse(data);
139
+ }
140
+ catch (error) {
141
+ if (error instanceof z.ZodError) {
142
+ const issues = error.issues.map((issue) => `${issue.path.join('.')}: ${issue.message}`).join(', ');
143
+ logger.error({ context, issues }, 'Validation failed');
144
+ throw new ValidationError(`Invalid ${context}: ${issues}`, error.issues);
145
+ }
146
+ throw error;
147
+ }
148
+ }
149
+ /**
150
+ * Validate input and return result without throwing
151
+ *
152
+ * @template T - Zod schema type
153
+ * @param schema - Zod schema to validate against
154
+ * @param data - Data to validate
155
+ * @returns Validation result with data or errors
156
+ */
157
+ export function safeValidate(schema, data) {
158
+ const result = schema.safeParse(data);
159
+ if (result.success) {
160
+ return { success: true, data: result.data };
161
+ }
162
+ return { success: false, errors: result.error.issues };
163
+ }
164
+ /**
165
+ * Sanitize string to prevent injection attacks
166
+ *
167
+ * @param input - String to sanitize
168
+ * @param options - Sanitization options
169
+ * @returns Sanitized string
170
+ */
171
+ export function sanitizeString(input, options = {}) {
172
+ const { maxLength = MAX_STRING_LENGTH, allowHtml = false, allowSpecialChars = true, } = options;
173
+ let sanitized = input.slice(0, maxLength).trim();
174
+ // Remove HTML if not allowed
175
+ if (!allowHtml) {
176
+ sanitized = sanitized
177
+ .replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '')
178
+ .replace(/<[^>]+>/g, '');
179
+ }
180
+ // Remove dangerous characters if not allowed
181
+ if (!allowSpecialChars) {
182
+ sanitized = sanitized.replace(/[<>&'"]/g, '');
183
+ }
184
+ return sanitized;
185
+ }
186
+ /**
187
+ * Validate file path for security
188
+ *
189
+ * @param path - Path to validate
190
+ * @returns True if path is safe
191
+ */
192
+ export function isSecurePath(path) {
193
+ if (!path || typeof path !== 'string')
194
+ return false;
195
+ // Check for path traversal
196
+ if (SECURITY_PATTERNS.PATH_TRAVERSAL.test(path))
197
+ return false;
198
+ // Check for command injection characters
199
+ if (SECURITY_PATTERNS.COMMAND_INJECTION.test(path))
200
+ return false;
201
+ // Check length
202
+ if (path.length > 1000)
203
+ return false;
204
+ return true;
205
+ }
206
+ /**
207
+ * Sanitize code input to prevent injection
208
+ *
209
+ * @param code - Code to sanitize
210
+ * @param maxSize - Maximum size in bytes
211
+ * @returns Sanitized code
212
+ */
213
+ export function sanitizeCode(code, maxSize = MAX_CODE_SIZE) {
214
+ if (!code || typeof code !== 'string') {
215
+ return '';
216
+ }
217
+ // Trim to max size
218
+ let sanitized = code.slice(0, maxSize);
219
+ // Remove null bytes (potential binary injection)
220
+ sanitized = sanitized.replace(/\0/g, '');
221
+ return sanitized;
222
+ }
223
+ // ============================================================================
224
+ // Custom Errors
225
+ // ============================================================================
226
+ /**
227
+ * Custom validation error with detailed information
228
+ */
229
+ export class ValidationError extends Error {
230
+ issues;
231
+ constructor(message, issues = []) {
232
+ super(message);
233
+ this.issues = issues;
234
+ this.name = 'ValidationError';
235
+ Object.setPrototypeOf(this, ValidationError.prototype);
236
+ }
237
+ /** Get formatted error messages */
238
+ getFormattedErrors() {
239
+ return this.issues.map((issue) => `${issue.path.join('.')}: ${issue.message}`);
240
+ }
241
+ /** Convert to JSON for API responses */
242
+ toJSON() {
243
+ return {
244
+ name: this.name,
245
+ message: this.message,
246
+ issues: this.issues.map((issue) => ({
247
+ path: issue.path.join('.'),
248
+ message: issue.message,
249
+ code: issue.code,
250
+ })),
251
+ };
252
+ }
253
+ }
254
+ // ============================================================================
255
+ // Rate Limiting Support
256
+ // ============================================================================
257
+ /**
258
+ * Simple in-memory rate limiter for tool calls
259
+ */
260
+ export class RateLimiter {
261
+ maxRequests;
262
+ windowMs;
263
+ requests = new Map();
264
+ constructor(maxRequests = 100, windowMs = 60000 // 1 minute
265
+ ) {
266
+ this.maxRequests = maxRequests;
267
+ this.windowMs = windowMs;
268
+ }
269
+ /**
270
+ * Check if request is allowed
271
+ *
272
+ * @param key - Unique identifier for the requester
273
+ * @returns True if allowed, false if rate limited
274
+ */
275
+ isAllowed(key) {
276
+ const now = Date.now();
277
+ const timestamps = this.requests.get(key) || [];
278
+ // Remove old timestamps outside the window
279
+ const validTimestamps = timestamps.filter((ts) => now - ts < this.windowMs);
280
+ if (validTimestamps.length >= this.maxRequests) {
281
+ return false;
282
+ }
283
+ validTimestamps.push(now);
284
+ this.requests.set(key, validTimestamps);
285
+ // Cleanup old entries periodically
286
+ if (this.requests.size > 1000) {
287
+ this.cleanup();
288
+ }
289
+ return true;
290
+ }
291
+ /**
292
+ * Cleanup old entries to prevent memory leaks
293
+ */
294
+ cleanup() {
295
+ const now = Date.now();
296
+ for (const [key, timestamps] of this.requests) {
297
+ const validTimestamps = timestamps.filter((ts) => now - ts < this.windowMs);
298
+ if (validTimestamps.length === 0) {
299
+ this.requests.delete(key);
300
+ }
301
+ else {
302
+ this.requests.set(key, validTimestamps);
303
+ }
304
+ }
305
+ }
306
+ /**
307
+ * Clear all rate limit data
308
+ */
309
+ clear() {
310
+ this.requests.clear();
311
+ }
312
+ /**
313
+ * Get current count for a key
314
+ */
315
+ getCount(key) {
316
+ const now = Date.now();
317
+ const timestamps = this.requests.get(key) || [];
318
+ return timestamps.filter((ts) => now - ts < this.windowMs).length;
319
+ }
320
+ }
321
+ /** Global rate limiter instance */
322
+ export const globalRateLimiter = new RateLimiter(100, 60000);
323
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/tools/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E,gDAAgD;AAChD,MAAM,iBAAiB,GAAG,SAAS,CAAC,CAAC,MAAM;AAE3C,mCAAmC;AACnC,MAAM,aAAa,GAAG,OAAO,CAAC,CAAC,QAAQ;AAEvC,2BAA2B;AAC3B,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAE9B,6CAA6C;AAC7C,MAAM,iBAAiB,GAA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AM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;IACpE,CAAC;CACF;AAED,mCAAmC;AACnC,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atlas-pipeline-mcp",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "mcpName": "io.github.IamNishant51/atlas-pipeline",
5
5
  "description": "Model Context Protocol server with multi-stage AI pipeline - works with any LLM provider (Ollama, OpenAI, Anthropic). Compatible with Cursor, GitHub Copilot, Windsurf, and more. Features 15 tools including security scanning, test generation, code explanation, debugging assistance, and advanced sequential thinking.",
6
6
  "main": "dist/server.js",