UNPKG

codecrucible-synth

Version:

Production-Ready AI Development Platform with Multi-Voice Synthesis, Smithery MCP Integration, Enterprise Security, and Zero-Timeout Reliability

120 lines 3.56 kB
/** * Model Domain Entity * Pure business logic for AI model management * * Living Spiral Council Applied: * - Domain-driven design with pure business entities * - No external dependencies or infrastructure concerns * - Business rules for model selection and health monitoring */ import { ProviderType, ModelName } from '../value-objects/voice-values.js'; /** * Model Entity - Core business object representing an AI model */ export declare class Model { private readonly _name; private readonly _providerType; private readonly _capabilities; private readonly _parameters; private _isHealthy; private _isEnabled; private _lastHealthCheck; private _errorCount; constructor(name: ModelName, providerType: ProviderType, capabilities: string[], parameters: ModelParameters, isHealthy?: boolean, isEnabled?: boolean); get name(): ModelName; get providerType(): ProviderType; get capabilities(): readonly string[]; get parameters(): ModelParameters; get isHealthy(): boolean; get isEnabled(): boolean; get lastHealthCheck(): Date; get errorCount(): number; /** * Check if this model can handle a specific capability */ hasCapability(capability: string): boolean; /** * Check if this model is available for processing */ isAvailable(): boolean; /** * Record a successful health check */ recordHealthCheckSuccess(): Model; /** * Record a failed health check */ recordHealthCheckFailure(): Model; /** * Enable this model for processing */ enable(): Model; /** * Disable this model from processing */ disable(): Model; /** * Calculate suitability score for a given request * Business rule: Match capabilities and performance characteristics */ calculateSuitabilityScore(request: { requiredCapabilities?: string[]; preferredSize?: 'small' | 'medium' | 'large'; maxLatency?: number; qualityThreshold?: number; }): number; /** * Get model configuration for external systems */ toConfig(): ModelConfiguration; /** * Create Model from configuration */ static fromConfig(config: ModelConfiguration): Model; private matchesSizePreference; private determineModelSize; private calculateLatencyScore; private calculateReliabilityScore; private validateInputs; } /** * Model Parameters Value Object */ export interface ModelParameters { maxTokens: number; contextWindow: number; isMultimodal: boolean; estimatedLatency: number; qualityRating: number; } /** * Model configuration interface for external systems */ export interface ModelConfiguration { name: string; providerType: string; capabilities: string[]; parameters: ModelParameters; isHealthy: boolean; isEnabled: boolean; lastHealthCheck: string; errorCount: number; } /** * Model factory for common model types */ export declare class ModelFactory { /** * Create a coding-specialized model */ static createCodingModel(name: string, providerType: string, parameters: ModelParameters): Model; /** * Create a general-purpose model */ static createGeneralModel(name: string, providerType: string, parameters: ModelParameters): Model; /** * Create a multimodal model */ static createMultimodalModel(name: string, providerType: string, parameters: ModelParameters): Model; } //# sourceMappingURL=model.d.ts.map