/** * MCP-specific type definitions */ import { AgentProfile, Task, OrchestratorMetrics, MemoryQuery } from "../utils/types.js"; export interface IOrchestrator { getStatus(): Promise; listTasks(params: TaskListParams): Promise; createTask(task: Omit): Promise; cancelTask(taskId: string): Promise; getTask(taskId: string): Promise; getTaskStatus(taskId: string): Promise; assignTask(taskId: string, agentId: string): Promise; assignTaskToType(taskId: string, agentType: string): Promise; getMetrics(timeRange?: string): Promise; registerAgent(profile: AgentProfile): Promise; executeObjective(objective: string, options?: ObjectiveOptions): Promise; getObjectiveStatus(objectiveId: string): Promise; spawnAgent(profile: AgentProfile): Promise; listAgents(): Promise; terminateAgent(agentId: string, options?: { reason?: string; graceful?: boolean; }): Promise; getAgentInfo(agentId: string): Promise; queryMemory(query: MemoryQuery): Promise; storeMemory(entry: MemoryStoreParams): Promise; deleteMemory(entryId: string): Promise; exportMemory(options: MemoryExportOptions): Promise; importMemory(options: MemoryImportOptions): Promise; getSystemStatus(): Promise; performHealthCheck(deep?: boolean): Promise; getConfig(section?: string): Promise>; updateConfig(section: string, config: Record, restart?: boolean): Promise; validateConfig(config: Record): Promise; executeWorkflow(options: WorkflowExecuteOptions): Promise; createWorkflow(workflow: WorkflowDefinition, savePath?: string): Promise; listWorkflows(directory?: string): Promise; executeCommand(options: ExecuteCommandOptions): Promise; listTerminals(includeIdle?: boolean): Promise; createTerminal(options: CreateTerminalOptions): Promise; } export interface ISwarmCoordinator { getStatus(): Promise; listAgents(): Promise; spawnAgent(profile: AgentProfile): Promise; terminateAgent(agentId: string): Promise; assignTask(agentId: string, task: Task): Promise; } export interface IAgentManager { listAgents(): Promise; spawnAgent(profile: AgentProfile, config?: AgentConfig): Promise; terminateAgent(agentId: string): Promise; getAgentStatus(agentId: string): Promise; } export interface IResourceManager { listResources(): Promise; getStatus(): Promise; allocateResource(resourceId: string, agentId: string): Promise; releaseResource(resourceId: string): Promise; } export interface IMemoryManager { query(params: MemoryQuery): Promise; store(params: MemoryStoreParams): Promise; delete(entryId: string): Promise; getStats(): Promise; } export interface IMonitor { getMetrics(): Promise; getAlerts(): Promise; recordMetrics(component: string, metrics: Record): void; sendAlert(alert: AlertParams): void; healthCheck(): Promise; } export interface ITerminalManager { listSessions(): Promise; execute(command: string, sessionId?: string): Promise; createSession(): Promise; closeSession(sessionId: string): Promise; } export interface TaskListParams { status?: "pending" | "running" | "completed" | "failed"; limit?: number; offset?: number; agentId?: string; } export interface OrchestratorStatus { running: boolean; uptime: number; totalAgents: number; activeAgents: number; queuedTasks: number; metrics?: OrchestratorMetrics; } export interface ObjectiveOptions { maxAgents?: number; timeout?: number; strategy?: string; } export interface ObjectiveResult { objectiveId: string; status: "started" | "running" | "completed" | "failed"; result?: unknown; error?: string; } export interface ObjectiveStatus { objectiveId: string; status: "pending" | "running" | "completed" | "failed"; progress: number; agents: string[]; tasks: string[]; result?: unknown; error?: string; } export interface SwarmStatus { active: boolean; totalAgents: number; activeAgents: number; idleAgents: number; totalTasks: number; completedTasks: number; } export interface SwarmAgent { id: string; name: string; type: string; status: "active" | "idle" | "terminated"; currentTask?: string; capabilities: string[]; } export interface AgentInfo { id: string; name: string; type: string; status: string; profile: AgentProfile; createdAt: Date; lastActivity?: Date; } export interface AgentConfig { maxConcurrentTasks?: number; timeout?: number; retryAttempts?: number; } export interface Resource { id: string; type: string; name: string; status: "available" | "allocated" | "unavailable"; allocatedTo?: string; metadata?: Record; } export interface ResourceManagerStatus { totalResources: number; availableResources: number; allocatedResources: number; resourcesByType: Record; } export interface MemoryQueryResult { entries: Array<{ id: string; content: string; metadata: Record; timestamp: Date; }>; total: number; offset: number; limit: number; } export interface MemoryStoreParams { data: Record; namespace?: string; tags?: string[]; metadata?: Record; } export interface MemoryStats { totalEntries: number; totalSize: number; namespaces: string[]; entryCountByNamespace: Record; } export interface SystemMetrics { cpu: { usage: number; loadAverage: number[]; }; memory: { used: number; total: number; percentage: number; }; requests: { total: number; perSecond: number; averageLatency: number; }; errors: { total: number; rate: number; }; } export interface Alert { id: string; severity: "info" | "warning" | "error" | "critical"; component: string; message: string; timestamp: Date; metadata?: Record; } export interface AlertParams { source: string; severity: "info" | "warning" | "error" | "critical"; message: string; metadata?: Record; } export interface HealthCheckResult { healthy: boolean; components: Record; } export interface TerminalSession { id: string; pid?: number; status: "active" | "idle" | "closed"; createdAt: Date; lastActivity: Date; } export interface ExecutionResult { stdout: string; stderr: string; exitCode: number; duration: number; } export interface SpawnAgentInput { name: string; type: string; capabilities?: string[]; systemPrompt?: string; maxConcurrentTasks?: number; priority?: number; environment?: Record; workingDirectory?: string; config?: Record; } export interface ListAgentsInput { status?: string; filterByType?: string; includeTerminated?: boolean; } export interface CreateTaskInput { type: string; description: string; priority?: number; assignedAgent?: string; input?: Record; dependencies?: string[]; assignToAgent?: string; assignToAgentType?: string; } export interface ListTasksInput { status?: string; agentId?: string; limit?: number; offset?: number; type?: string; } export interface MemoryQueryInput { query?: string; namespace?: string; limit?: number; agentId?: string; sessionId?: string; type?: string; tags?: string[]; search?: string; startTime?: string; endTime?: string; offset?: number; } export interface MemoryStoreInput { key?: string; value?: unknown; namespace?: string; tags?: string[]; agentId?: string; sessionId?: string; type?: string; content?: unknown; context?: Record; parentId?: string; } export interface ExecuteCommandInput { command: string; sessionId?: string; cwd?: string; env?: Record; timeout?: number; } export interface WorkflowExecuteInput { file: string; params?: Record; } export interface CreateObjectiveInput { objective: string; strategy?: string; maxAgents?: number; timeout?: number; priority?: number; } export interface SystemMonitorInput { component?: string; metrics?: string[]; interval?: number; } export interface MemoryExportOptions { namespace?: string; format?: "json" | "csv"; includeMetadata?: boolean; dateRange?: { start: Date; end: Date; }; } export interface MemoryExportResult { data: unknown; format: string; size: number; entries: number; } export interface MemoryImportOptions { data: unknown; namespace?: string; overwrite?: boolean; validateSchema?: boolean; } export interface MemoryImportResult { imported: number; skipped: number; errors: string[]; } export interface SystemStatus { uptime: number; version: string; environment: string; components: Record; resources: { cpu: number; memory: number; disk: number; }; } export interface ConfigUpdateResult { success: boolean; changes: string[]; restartRequired: boolean; errors?: string[]; } export interface ConfigValidationResult { valid: boolean; errors?: string[]; warnings?: string[]; } export interface WorkflowExecuteOptions { file: string; params?: Record; timeout?: number; parallel?: boolean; } export interface WorkflowExecuteResult { success: boolean; result?: unknown; duration: number; steps: Array<{ name: string; status: string; duration: number; }>; error?: string; } export interface WorkflowDefinition { name: string; description?: string; steps: Array<{ name: string; type: string; config: Record; }>; metadata?: Record; } export interface WorkflowCreateResult { success: boolean; path?: string; error?: string; } export interface WorkflowListResult { workflows: Array<{ name: string; path: string; description?: string; }>; } export interface ExecuteCommandOptions { command: string; sessionId?: string; cwd?: string; env?: Record; timeout?: number; } export interface CreateTerminalOptions { name?: string; cwd?: string; env?: Record; } //# sourceMappingURL=types.d.ts.map