@flexabrain/mcp-server
Version:
Advanced electrical schematic analysis MCP server with rail engineering expertise
156 lines • 4.57 kB
TypeScript
/**
* FlexaBrain MCP Server - AI Agent Integration Strategy
*
* Integration strategy for Oracle, Sentinel, and Sage agents with
* enhanced PDF schematic processing pipeline for traction generator
* monitoring control systems.
*/
import { SchematicDatabase } from '../database/database-interface.js';
import { PDFProcessingResult } from '../types/pdf-schematic.js';
export interface AgentIntegrationConfig {
agents: {
oracle: OracleAgentConfig;
sentinel: SentinelAgentConfig;
sage: SageAgentConfig;
};
processingPipeline: {
enableParallelProcessing: boolean;
analysisTimeout: number;
retryAttempts: number;
batchSize: number;
};
dataFlow: {
realTimeAnalysis: boolean;
backgroundProcessing: boolean;
priorityLevels: string[];
};
}
export interface OracleAgentConfig {
enabled: boolean;
analysisTypes: string[];
predictionHorizon: number;
confidenceThreshold: number;
modelVersion: string;
trainingDataSources: string[];
}
export interface SentinelAgentConfig {
enabled: boolean;
monitoringInterval: number;
anomalyThresholds: Record<string, number>;
alertChannels: string[];
escalationRules: EscalationRule[];
}
export interface SageAgentConfig {
enabled: boolean;
reportingSchedule: string;
kpiMetrics: string[];
businessRules: BusinessRule[];
complianceChecks: ComplianceCheck[];
}
export interface EscalationRule {
condition: string;
severity: 'low' | 'medium' | 'high' | 'critical';
action: string;
recipients: string[];
timeoutMinutes: number;
}
export interface BusinessRule {
name: string;
condition: string;
action: string;
priority: number;
enabled: boolean;
}
export interface ComplianceCheck {
standard: string;
requirements: string[];
checkMethod: string;
frequency: string;
}
export interface AgentAnalysisRequest {
documentId: string;
componentId?: string;
analysisType: string;
priority: 'low' | 'medium' | 'high' | 'urgent';
requestedBy: string;
deadline?: Date;
context?: Record<string, any>;
}
export interface AgentAnalysisResponse {
requestId: string;
agentName: 'oracle' | 'sentinel' | 'sage';
status: 'completed' | 'failed' | 'timeout';
results: Record<string, any>;
confidence: number;
processingTime: number;
recommendations?: string[];
errors?: string[];
}
/**
* FlexaBrain Agent Integration Manager
*
* Orchestrates communication between PDF schematic processing pipeline
* and FlexaBrain AI agents (Oracle, Sentinel, Sage).
*/
export declare class AgentIntegrationManager {
private db;
private config;
private analysisQueue;
private activeAnalyses;
constructor(database: SchematicDatabase, config: AgentIntegrationConfig);
/**
* Process newly extracted schematic data with all enabled agents
*/
processSchematicData(processingResult: PDFProcessingResult): Promise<void>;
/**
* Oracle Agent - Predictive Maintenance Analysis
*/
analyzeWithOracle(request: AgentAnalysisRequest): Promise<AgentAnalysisResponse>;
/**
* Sentinel Agent - Real-time Monitoring and Anomaly Detection
*/
analyzeWithSentinel(request: AgentAnalysisRequest): Promise<AgentAnalysisResponse>;
/**
* Sage Agent - Business Intelligence and Compliance Analysis
*/
analyzeWithSage(request: AgentAnalysisRequest): Promise<AgentAnalysisResponse>;
/**
* Process multiple analysis requests in batches
*/
private processAnalysisRequests;
/**
* Process individual analysis request
*/
private processAnalysisRequest;
/**
* Determine component analysis priority based on type and safety level
*/
private determineComponentPriority;
/**
* Generate document-level analysis combining all agent insights
*/
private generateDocumentLevelAnalysis;
/**
* Oracle-specific analysis logic
*/
private performOracleAnalysis;
/**
* Sentinel-specific analysis logic
*/
private performSentinelAnalysis;
/**
* Sage-specific analysis logic
*/
private performSageAnalysis;
/**
* Get analysis status for a document
*/
getAnalysisStatus(documentId: string): Promise<{
completed: number;
failed: number;
pending: number;
totalInsights: number;
}>;
}
export default AgentIntegrationManager;
//# sourceMappingURL=agent-integration-strategy.d.ts.map