import { EventEmitter } from 'events'; import { HealthScore } from './health-score.js'; import { FixSuggestion } from './smart-fix.js'; import { UpdateCheck } from './auto-update.js'; import { MultiProjectManager } from './multi-project.js'; import { NeuralMesh } from './neural-mesh.js'; import { BrainConfig, BrainInsight, BrainSession, AgentTool, FileChange, CodeMetrics, VulnResult, CustomRule, ProjectConfig, PRDescription, CommitMessage, SymbolInfo, DependencyGraphResult, DuplicateGroup, ADRDecision, PerfInsight, ProjectKnowledge, TeamInsight, TeamStats, AggregatedHealth, MCPServerOptions, CrossSessionInsight, MeshState, InfiniteMemoryStats, EvolutionSnapshot, AntColonyState, AdversarialLog } from '../types.js'; export declare class Orchestrator extends EventEmitter { private config; private llmClient; private contextBuilder; private analyzer; private fileWatcher; private gitWatcher; private adapters; private patternMemory; private healthEngine; private fixEngine; private reportGen; private customRulesEngine; private prGenerator; private notifier; private metricsEngine; private projectConfigLoader; private vulnScanner; private semanticAnalyzer; private depGraphBuilder; private codeSimilarity; private adrEngine; private typeSafety; private perfProfiler; private contextCompletion; private learningEngine; private mcpServer; private teamMode; private multiProject; private neuralMesh; private astAnalyzer; private a11yChecker; private i18nDetector; private deadCodeEliminator; private mutationAdvisor; private codeAgeAnalyzer; private apiContractAnalyzer; private envAnalyzer; private licenseCompliance; private configDriftDetector; private turboMemory; private ssspRouter; private crossAgentProtocol; private selfEvolution; private predictiveEngine; private knowledgeGraph; private swarmIntelligence; private adversarialDefense; private hierarchicalMemory; private contextRecall; private consensusEngine; private collectiveLearning; private fineTuningEngine; private smartCache; private intentEngine; private codeDNA; private temporalIntelligence; private lspServer; private running; private analyzing; private pendingChanges; private debounceTimer; private evolutionTimer; private currentSession; private startTime; private lastHealthScore; private lastFixes; private lastMetrics; private lastVulns; private updateCheck; private lastSymbols; private lastDepGraph; private lastDuplicates; private lastADRs; private lastPerfInsights; private lastKnowledge; constructor(config: BrainConfig); start(): Promise; stop(): Promise; reviewOnce(): Promise; /** Generate a full report (HTML/markdown/JSON) */ generateReport(format?: 'html' | 'markdown' | 'json'): Promise; /** Generate GitHub Actions workflow YAML */ generateCIWorkflow(): Promise; /** Generate pre-commit hook script */ generatePreCommitHook(): string; /** Get smart fix suggestions for current changes */ getSmartFixes(): Promise; /** Get current health score */ getHealthScore(): Promise; /** Format fix suggestions for terminal display */ formatFixes(fixes: FixSuggestion[]): string; /** Format health score for terminal display */ formatHealthScore(score: HealthScore): string; getLastHealthScore(): HealthScore | null; getLastFixes(): FixSuggestion[]; getLastMetrics(): CodeMetrics | null; getLastVulns(): VulnResult[]; getUpdateCheck(): UpdateCheck | null; getSession(): BrainSession | null; getCustomRules(): CustomRule[]; addCustomRule(rule: CustomRule): void; removeCustomRule(id: string): void; generatePRDescription(changes: FileChange[], branch?: string): Promise; generateCommitMessage(changes: FileChange[]): Promise; runVulnScan(): Promise; formatVulns(vulns: VulnResult[], format?: 'text' | 'json' | 'markdown'): string; computeMetrics(): Promise; formatMetrics(metrics: CodeMetrics, format?: 'text' | 'json' | 'markdown'): string; sendNotification(type: import('../types.js').NotificationPayload['type'], title: string, message: string): Promise<{ sent: boolean; channels: string[]; }>; testNotifications(): Promise<{ channel: string; success: boolean; error?: string; }[]>; getProjectConfig(): ProjectConfig; saveProjectConfig(config: ProjectConfig): void; /** Semantic analysis — extract symbols, find unused exports, dead code */ getSemanticInsights(maxFiles?: number): Promise<{ symbols: Map; unusedExports: SymbolInfo[]; deadCode: SymbolInfo[]; }>; /** Dependency graph — imports, cycles, orphans, hubs */ getDependencyGraph(): Promise; /** Get dependency analysis details */ getDependencyDetails(result: DependencyGraphResult): { orphans: string[]; cycles: string[][]; hubs: Array<{ file: string; dependents: number; risk: string; }>; }; /** Detect duplicate/near-duplicate code blocks */ detectDuplicates(minSimilarity?: number): Promise; /** Get Architecture Decision Records */ getADRs(): Promise; /** Save a new ADR */ saveADR(adr: ADRDecision): Promise; /** Detect architectural decisions from file changes */ detectADRs(changes: Array<{ path: string; diff?: string; }>): Promise; /** Type safety analysis for TypeScript projects */ analyzeTypeSafety(maxFiles?: number): Promise; /** Performance profiling across project */ profilePerformance(maxFiles?: number): Promise; /** Build and persist project knowledge */ buildKnowledge(): Promise; /** Get context gaps — missing documentation, configs, etc. */ getContextGaps(): Promise; /** Run the learning engine to extract patterns and lessons */ runLearningCycle(): Promise; /** Get learned lessons */ getLearnedLessons(): Promise>; /** Start the MCP server for tool integration */ startMCPServer(options?: MCPServerOptions): Promise; /** Stop the MCP server */ stopMCPServer(): Promise; /** Enable team mode with shared insights */ enableTeamMode(userName?: string): void; /** Share an insight with the team */ shareTeamInsight(insight: BrainInsight): Promise; /** Get team insights */ getTeamInsights(limit?: number): Promise; /** Get team stats */ getTeamStats(): Promise; /** Get the multi-project manager */ getMultiProjectManager(): MultiProjectManager; /** Get aggregated health across all registered projects */ getAggregatedHealth(): Promise; /** Scan a parent directory for all git repos */ scanForProjects(parentDir: string): Promise; /** Enable the neural mesh for cross-session intelligence sharing */ enableNeuralMesh(): Promise; /** Disable the neural mesh */ disableNeuralMesh(): Promise; /** Get the neural mesh instance (null if not enabled) */ getNeuralMesh(): NeuralMesh | null; /** Get cross-session insights from other Shadow Brain instances */ getCrossSessionInsights(limit?: number): CrossSessionInsight[]; /** Get the current mesh state */ getMeshState(): MeshState | null; /** Get shared knowledge from all connected nodes */ getSharedKnowledge(limit?: number): import('../types.js').MeshKnowledge[]; /** Get aggregated insights across all mesh projects */ getAggregatedInsights(): ReturnType | null; /** Get all connected mesh nodes */ getConnectedNodes(): import('../types.js').MeshNode[]; /** AST-level complexity analysis — functions, cyclomatic complexity, nesting */ runASTAnalysis(maxFiles?: number): Promise; /** WCAG accessibility audit for frontend code */ runA11yCheck(maxFiles?: number): Promise; /** Internationalization readiness detection */ runI18nAnalysis(maxFiles?: number): Promise; /** Dead code elimination — unreachable code, unused exports */ runDeadCodeAnalysis(maxFiles?: number): Promise; /** Mutation testing advisor — suggests test-killing mutations */ runMutationAnalysis(maxFiles?: number): Promise; /** Code age analysis — stale files, ownership, freshness */ runCodeAgeAnalysis(): Promise; /** API contract analysis — endpoint discovery and security audit */ runAPIContractAnalysis(maxFiles?: number): Promise; /** Environment variable analysis — secrets, validation, naming */ runEnvAnalysis(maxFiles?: number): Promise; /** License compliance audit — restricted, copyleft, unknown licenses */ runLicenseCompliance(): Promise; /** Configuration drift detection — missing configs, tsconfig, gitignore */ runConfigDriftDetection(): Promise; /** Run ALL v3.0.0 + v4.0.0 hyper-intelligence analyses at once */ runFullHyperAnalysis(opts?: { maxFiles?: number; }): Promise<{ ast: BrainInsight[]; a11y: BrainInsight[]; i18n: BrainInsight[]; deadCode: BrainInsight[]; mutation: BrainInsight[]; codeAge: BrainInsight[]; apiContract: BrainInsight[]; env: BrainInsight[]; license: BrainInsight[]; configDrift: BrainInsight[]; turboMemoryStats: InfiniteMemoryStats | null; swarmState: AntColonyState | null; defenseStats: AdversarialLog | null; evolutionSnapshot: EvolutionSnapshot | null; knowledgeGraphEntityCount: number; hierarchicalMemoryStats: import('../types.js').HierarchicalMemoryStats | null; contextRecallStats: any; consensusStats: any; collectiveLearningStats: import('../types.js').CollectiveLearningStats | null; total: number; }>; getStatus(): { running: boolean; version: string; agents: string[]; insightsGenerated: number; filesReviewed: number; suggestionsInjected: number; uptime: number; personality: import("../types.js").BrainPersonality; provider: import("../types.js").LLMProvider; model: string | undefined; projectDir: string; healthScore: number | null; healthGrade: "A" | "C" | "A+" | "B" | "D" | "F" | null; fixCount: number; vulnCount: number; customRuleCount: number; updateAvailable: boolean; latestVersion: string | null; duplicateCount: number; adrCount: number; perfInsightCount: number; mcpServerRunning: boolean; teamModeEnabled: boolean; symbolCount: number; neuralMeshEnabled: boolean; meshNodeId: string | null; meshNodeCount: number; hyperModules: string[]; turboMemoryStats: InfiniteMemoryStats; caipConnectedAgents: AgentTool[]; evolutionGeneration: number; swarmConvergence: any; knowledgeGraphEntities: any; adversarialStats: AdversarialLog; hierarchicalMemoryStats: import("../types.js").HierarchicalMemoryStats; contextRecallStats: { triggerCount: number; linkCount: number; recentActivationCount: number; topTriggers: Array<{ pattern: string; strength: number; matches: number; }>; }; consensusStats: { totalProposals: number; acceptedCount: number; rejectedCount: number; conflictCount: number; pendingCount: number; averageAgreement: number; agentCount: number; topTrustedAgents: Array<{ agent: string; score: number; accuracy: number; }>; }; collectiveLearningStats: import("../types.js").CollectiveLearningStats; fineTuningStats: import("./fine-tuning-engine.js").FineTuneStats; smartCacheStats: import("./smart-cache.js").CacheStats; intentEngineStats: import("./intent-engine.js").IntentStats; codeDNAStats: import("./code-dna.js").CodeDNAStats; temporalStats: import("./temporal-intelligence.js").TemporalStats; lspEnabled: boolean; v511Modules: string[]; }; private setupWatchers; private scheduleAnalysis; private runAnalysis; private injectInsights; private getGitChanges; private parseDiff; /** v4.0.0: Simple text-to-vector for TurboMemory compatibility */ private textToVector; } //# sourceMappingURL=orchestrator.d.ts.map