UNPKG

@jerfowler/agent-comm-mcp-server

Version:

MCP server for AI agent task communication and delegation with diagnostic lifecycle visibility

57 lines 1.72 kB
/** * Core types and interfaces for the Agent Communication MCP Server */ import debug from 'debug'; const log = debug('agent-comm:types'); // Initialize core types log('Core type definitions loaded'); // Error types export class AgentCommError extends Error { code; details; constructor(message, code, details) { super(message); this.code = code; this.details = details; this.name = 'AgentCommError'; } } export class FileNotFoundError extends AgentCommError { constructor(path) { super(`File not found: ${path}`, 'FILE_NOT_FOUND', { path }); } } export class InvalidTaskError extends AgentCommError { constructor(message, task) { super(message, 'INVALID_TASK', { task }); } } export class ArchiveError extends AgentCommError { constructor(message, operation) { super(message, 'ARCHIVE_ERROR', { operation }); } } export class AgentOwnershipError extends AgentCommError { attemptingAgent; taskId; actualOwner; constructor(message, attemptingAgent, taskId, actualOwner) { const details = { attemptingAgent, taskId, actualOwner, securityFlag: 'ownership_violation' }; super(message, 'AGENT_OWNERSHIP_ERROR', details); this.attemptingAgent = attemptingAgent; this.taskId = taskId; this.actualOwner = actualOwner; this.name = 'AgentOwnershipError'; } } // Export AlertSeverity enum as a value export { AlertSeverity } from './types/context-types.js'; // ======================== // End of Types - Unused orchestration interfaces removed // ======================== //# sourceMappingURL=types.js.map