UNPKG

osc-mcp-server

Version:

Model Context Protocol server for OSC (Open Sound Control) endpoint management

38 lines 1.95 kB
import { ErrorCode, OSCError } from '../types/index'; export declare function createOSCError(code: ErrorCode, message: string, details?: Record<string, any>): OSCError; export declare class NetworkErrors { static portInUse(port: number, suggestedPorts?: number[]): OSCError; static portInvalid(port: number): OSCError; static permissionDenied(port: number): OSCError; static networkError(message: string, details?: Record<string, any>): OSCError; } export declare class EndpointErrors { static notFound(endpointId: string): OSCError; static alreadyExists(endpointId: string, port: number): OSCError; static startFailed(endpointId: string, reason: string): OSCError; static alreadyActive(endpointId: string): OSCError; static alreadyStopped(endpointId: string): OSCError; } export declare class MessageErrors { static parseError(reason: string, details?: Record<string, any>): OSCError; static invalidMessage(reason: string): OSCError; static unsupportedType(typeTag: string): OSCError; } export declare class ValidationErrors { static missingParameter(paramName: string): OSCError; static invalidParameter(paramName: string, value: any, expectedType: string): OSCError; static parameterOutOfRange(paramName: string, value: number, min: number, max: number): OSCError; static invalidAddressPattern(pattern: string): OSCError; } export declare class OperationErrors { static internalError(message: string, details?: Record<string, any>): OSCError; static operationFailed(operation: string, reason: string): OSCError; } export declare class ErrorUtils { static fromError(error: Error, code?: ErrorCode): OSCError; static isNetworkError(error: OSCError): boolean; static isRecoverable(error: OSCError): boolean; static getSuggestions(error: OSCError): string[]; } export declare function formatErrorResponse(error: OSCError): any; //# sourceMappingURL=index.d.ts.map