/** * Adapters for @wundr/computer-setup package classes * * These adapters wrap existing classes to provide a unified interface * for MCP tool implementations, handling async operations and error handling. * * The adapters use lazy-loading to import the computer-setup classes at runtime, * allowing the MCP server to start even if the computer-setup package is not * fully available (graceful degradation). * * @module adapters */ export interface ProjectInitOptions { projectPath: string; projectName: string; projectType: 'node' | 'react' | 'vue' | 'python' | 'go' | 'rust' | 'java' | 'monorepo'; profile?: DeveloperProfile; includeClaudeSetup: boolean; includeAgents: boolean; includeHooks: boolean; includeGitWorktree: boolean; includeTemplates: boolean; customAgents?: string[]; interactive?: boolean; force?: boolean; } export interface TemplateSelectionCriteria { projectType: string; framework?: string; features?: string[]; scale?: 'small' | 'medium' | 'large' | 'enterprise'; teamSize?: number; useTypeScript?: boolean; useTesting?: boolean; useCI?: boolean; } export interface TemplateMetadata { id: string; name: string; description: string; projectTypes: string[]; frameworks: string[]; features: string[]; agents: string[]; workflows: string[]; conventions: string[]; complexity: 'basic' | 'intermediate' | 'advanced' | 'enterprise'; requirements: { nodeVersion?: string; packageManager?: string[]; tools?: string[]; }; } export interface CustomizationRule { id: string; name: string; description: string; condition: (context: TemplateContext) => boolean; apply: (content: string, context: TemplateContext) => string; priority: number; } export interface ValidationResult { passed: boolean; category: string; check: string; message: string; severity: 'error' | 'warning' | 'info'; fixable: boolean; fix?: () => Promise; } export interface ValidationReport { timestamp: Date; projectPath: string; totalChecks: number; passed: number; failed: number; warnings: number; results: ValidationResult[]; score: number; } export interface TemplateContext { profile: DeveloperProfile; project: { name: string; description: string; version: string; type: 'node' | 'react' | 'vue' | 'python' | 'go' | 'rust' | 'java'; packageManager: 'npm' | 'pnpm' | 'yarn'; repository?: string; license: string; author: string; organization?: string; }; platform: { os: 'darwin' | 'linux' | 'win32'; arch: 'x64' | 'arm64'; nodeVersion: string; shell: 'bash' | 'zsh' | 'fish'; }; customVariables?: Record; } export interface DeveloperProfile { name: string; email: string; role: string; team: string; preferences?: { shell?: string; editor?: string; theme?: string; gitConfig?: { userName: string; userEmail: string; signCommits: boolean; defaultBranch: string; aliases: Record; }; aiTools?: { claudeCode: boolean; ruflo: boolean; mcpTools: string[]; swarmAgents: string[]; memoryAllocation: string; }; }; tools?: { packageManagers?: { npm?: boolean; pnpm?: boolean; yarn?: boolean; }; databases?: { postgresql?: boolean; redis?: boolean; }; }; frameworks?: { react?: boolean; }; } export interface SetupPlatform { os: string; arch: string; nodeVersion?: string; } /** * Result wrapper for adapter operations */ export interface AdapterResult { success: boolean; data?: T; error?: string; timestamp: string; } /** * Adapter for ProjectInitializer class * Handles project initialization with .claude directory setup */ export declare class ProjectInitializerAdapter { private initializerInstance; /** * Get or create the ProjectInitializer instance */ private getInitializer; /** * Initialize a new project with full setup * * @example * const result = await adapter.initialize({ * projectPath: '/path/to/project', * projectName: 'my-app', * projectType: 'node', * includeClaudeSetup: true, * includeAgents: true, * includeHooks: true, * includeGitWorktree: false, * includeTemplates: true * }); */ initialize(options: ProjectInitOptions): Promise>; /** * Get supported project types */ getSupportedProjectTypes(): string[]; } /** * Adapter for TemplateSelector class * Handles template selection based on project criteria */ export declare class TemplateSelectorAdapter { private selectorInstance; private getSelector; private createStubSelector; selectTemplates(criteria: TemplateSelectionCriteria): Promise>; getTemplate(templateId: string): Promise>; listTemplates(): Promise>; getTemplatesForType(projectType: string): Promise>; validateRequirements(template: TemplateMetadata): Promise>; } /** * Adapter for CustomizationEngine class * Handles project customization based on templates and rules */ export declare class CustomizationEngineAdapter { private engineInstance; private getEngine; customize(content: string, context: TemplateContext, filePath?: string): Promise>; customizeProject(projectPath: string, context: TemplateContext): Promise>; } /** * Adapter for ValidationChecker class * Validates project setup and configuration */ export declare class ValidationCheckerAdapter { private checkerInstance; private getChecker; validate(projectPath: string): Promise>; autoFix(projectPath: string): Promise>; } /** * Adapter for ClaudeInstaller (ClaudeConfigInstaller functionality) * Handles Claude CLI, MCP servers, and agent installation */ export declare class ClaudeConfigInstallerAdapter { private installerInstance; private getInstaller; isInstalled(): Promise>; getVersion(): Promise>; validate(): Promise>; isSupported(platform: SetupPlatform): Promise>; install(profile: DeveloperProfile, platform: SetupPlatform): Promise>; configure(profile: DeveloperProfile, platform: SetupPlatform): Promise>; getSteps(profile: DeveloperProfile, platform: SetupPlatform): AdapterResult<{ id: string; name: string; description: string; }[]>; } /** * Adapter for backup and rollback operations * Provides backup and restore functionality for configurations */ export declare class BackupRollbackManagerAdapter { private backupDir; constructor(backupDir?: string); createBackup(sourcePath: string, backupName?: string): Promise>; restore(backupId: string, targetPath: string): Promise>; listBackups(): Promise>; deleteBackup(backupId: string): Promise>; } /** * Adapter for ProjectInitOrchestrator * Combines all initialization components into a single interface */ export declare class ProjectInitOrchestratorAdapter { private orchestratorInstance; private getOrchestrator; initializeProject(options: { projectPath: string; projectName: string; interactive?: boolean; autoFix?: boolean; }): Promise>; setupExistingProject(projectPath: string): Promise>; validateProject(projectPath: string, autoFix?: boolean): Promise>; updateTemplates(projectPath: string): Promise>; } //# sourceMappingURL=adapters.d.ts.map