UNPKG

stellar-cyber-mcp-agents

Version:

Model Context Protocol (MCP) server for Stellar Cyber security operations with specialized multi-agent analysis capabilities

97 lines 3.29 kB
import { BaseAgent } from '../core/base-agent.js'; import { AgentId, AgentType, AgentMetadata, AgentRegistry, AgentCommunicationChannel, AgentLogger, AgentMetrics, AgentRequest, AgentContext, AgentHealth } from '../types/agent.js'; export interface WorkflowStep { id: string; name: string; agentType: AgentType; action: string; parameters: any; dependencies: string[]; timeout: number; retryCount: number; optional: boolean; condition?: { field: string; operator: 'equals' | 'greater_than' | 'less_than' | 'contains' | 'exists'; value: any; }; } export interface WorkflowDefinition { id: string; name: string; description: string; version: string; trigger: { type: 'manual' | 'scheduled' | 'event' | 'api'; condition?: any; }; steps: WorkflowStep[]; metadata: { created: string; author: string; tags: string[]; category: string; }; } export interface WorkflowExecution { id: string; workflowId: string; caseId?: string; status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED'; startTime: string; endTime?: string; currentStep?: string; results: Map<string, any>; errors: Array<{ stepId: string; error: string; timestamp: string; }>; metrics: { totalSteps: number; completedSteps: number; failedSteps: number; duration?: number; }; } export interface WorkflowRequest { workflowId: string; caseId?: string; parameters?: Record<string, any>; priority?: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL'; timeout?: number; } export declare class WorkflowAgent extends BaseAgent { protected readonly agentId: AgentId; private accessToken; private tokenExpiresAt; private readonly config; private readonly workflows; private readonly executions; private readonly agentRegistry; constructor(metadata: AgentMetadata, registry: AgentRegistry, channel: AgentCommunicationChannel, logger: AgentLogger, metrics: AgentMetrics, config: any); getAgentId(): AgentId; protected performHealthCheck(): Promise<boolean>; private performTokenRefresh; private initializeDefaultWorkflows; registerAgent(agentType: AgentType, agentInstance: any): void; executeWorkflow(request: WorkflowRequest): Promise<string>; private executeWorkflowSteps; private executeStep; private evaluateCondition; private invokeAgentAction; private delay; getWorkflowStatus(executionId: string): Promise<WorkflowExecution | null>; cancelWorkflow(executionId: string): Promise<boolean>; getAvailableWorkflows(): WorkflowDefinition[]; addWorkflow(workflow: WorkflowDefinition): Promise<void>; private validateWorkflow; getExecutionHistory(workflowId?: string, limit?: number): Promise<WorkflowExecution[]>; protected onInitialize(): Promise<void>; protected onStart(): Promise<void>; protected onStop(): Promise<void>; protected onDestroy(): Promise<void>; protected onHealthCheck(): Promise<AgentHealth>; protected handleRequest(request: AgentRequest, context: AgentContext): Promise<any>; } //# sourceMappingURL=workflow-agent.d.ts.map