UNPKG

vibe-coder-mcp

Version:

Production-ready MCP server with complete agent integration, multi-transport support, and comprehensive development automation tools for AI-assisted workflows.

149 lines 6.21 kB
import { OpenRouterConfig } from '../../../types/workflow.js'; export interface PathValidationResult { isValid: boolean; normalizedPath?: string; error?: string; warnings?: string[]; violationType?: 'path_traversal' | 'outside_boundary' | 'invalid_path' | 'dangerous_characters' | 'invalid_extension'; } export type PathOperation = 'read' | 'write'; export interface ValidationOptions { operation?: PathOperation; allowTestMode?: boolean; checkExtensions?: boolean; allowedExtensions?: string[]; strictMode?: boolean; } export interface UnifiedSecurityConfiguration { allowedReadDirectory: string; allowedWriteDirectory: string; securityMode: 'strict' | 'permissive'; allowedDirectories: string[]; performanceThresholdMs: number; enablePermissionChecking: boolean; enableBlacklist: boolean; enableExtensionFiltering: boolean; maxPathLength: number; allowedDir?: string; outputDir?: string; serviceBoundaries: { vibeTaskManager: { readDir: string; writeDir: string; }; codeMapGenerator: { allowedDir: string; outputDir: string; }; contextCurator: { readDir: string; outputDir: string; }; }; } export declare class UnifiedSecurityConfigManager { private static instance; private config; private mcpConfig; private constructor(); static getInstance(): UnifiedSecurityConfigManager; initializeFromMCPConfig(mcpConfig: OpenRouterConfig): void; isInitialized(): boolean; getConfig(): UnifiedSecurityConfiguration; getFilesystemSecurityConfig(): { allowedDirectories: string[]; securityMode: 'strict' | 'permissive'; enablePermissionChecking: boolean; enableBlacklist: boolean; enableExtensionFiltering: boolean; maxPathLength: number; performanceThresholdMs: number; }; getPathValidatorConfig(): { allowedDirectories: string[]; maxPathLength: number; }; getSecurityManagerConfig(): { pathSecurity: { allowedDirectories: string[]; }; strictMode: boolean; performanceThresholdMs: number; }; getCodeMapGeneratorConfig(): { allowedDir: string; outputDir: string; securityMode: 'strict' | 'permissive'; }; getContextCuratorConfig(): { readDir: string; outputDir: string; allowedDirectories: string[]; securityMode: 'strict' | 'permissive'; }; getVibeTaskManagerSecurityValidatorConfig(): { readDir: string; writeDir: string; securityMode: 'strict' | 'permissive'; }; getServiceBoundaries(serviceName: 'vibeTaskManager' | 'codeMapGenerator' | 'contextCurator'): { readDir?: string; writeDir?: string; allowedDir?: string; outputDir?: string; }; isPathAllowed(filePath: string, operation?: 'read' | 'write'): boolean; normalizePath(inputPath: string): string; isPathWithin(childPath: string, parentPath: string): boolean; validatePathSecurity(inputPath: string, options?: ValidationOptions): PathValidationResult; createSecurePath(inputPath: string, operation?: PathOperation, options?: ValidationOptions): string; isPathAllowedForOperation(inputPath: string, operation: PathOperation, options?: ValidationOptions): PathValidationResult; validateMultiplePaths(paths: string[], operation?: PathOperation, options?: ValidationOptions): Map<string, PathValidationResult>; getConfigStatus(): { initialized: boolean; mcpConfigPresent: boolean; allowedReadDirectory?: string; allowedWriteDirectory?: string; securityMode?: string; }; validatePathSecurityCompat(inputPath: string, allowedDirectory?: string): { isValid: boolean; normalizedPath?: string; error?: string; }; createSecureReadPath(filePath: string): string; createSecureWritePath(filePath: string): string; isPathWithinReadDirectory(filePath: string): boolean; isPathWithinWriteDirectory(filePath: string): boolean; validatePathWithConfig(inputPath: string, config?: { allowedExtensions?: string[]; maxPathLength?: number; allowSymlinks?: boolean; strictMode?: boolean; }): PathValidationResult; reset(): void; getToolOutputDirectory(): string; createSecureToolOutputPath(relativePath: string): string; ensureToolOutputDirectory(toolName: string): Promise<string>; getEnvironmentVariable(varName: string, fallback?: string): string | undefined; } export declare function getUnifiedSecurityConfig(): UnifiedSecurityConfigManager; export declare function validatePathSecurity(inputPath: string, options?: ValidationOptions): PathValidationResult; export declare function createSecurePath(inputPath: string, operation?: PathOperation, options?: ValidationOptions): string; export declare function normalizePath(inputPath: string): string; export declare function isPathWithin(childPath: string, parentPath: string): boolean; export declare function isPathAllowed(inputPath: string, operation?: PathOperation, options?: ValidationOptions): boolean; export declare function validateMultiplePaths(paths: string[], operation?: PathOperation, options?: ValidationOptions): Map<string, PathValidationResult>; export declare function validatePathSecurityCompat(inputPath: string, allowedDirectory?: string): { isValid: boolean; normalizedPath?: string; error?: string; }; export declare function createSecureReadPath(filePath: string): string; export declare function createSecureWritePath(filePath: string): string; export declare function isPathWithinReadDirectory(filePath: string): boolean; export declare function isPathWithinWriteDirectory(filePath: string): boolean; export declare function getToolOutputDirectory(): string; export declare function createSecureToolOutputPath(relativePath: string): string; export declare function ensureToolOutputDirectory(toolName: string): Promise<string>; //# sourceMappingURL=unified-security-config.d.ts.map