codecrucible-synth
Version:
Production-Ready AI Development Platform with Multi-Voice Synthesis, Smithery MCP Integration, Enterprise Security, and Zero-Timeout Reliability
76 lines • 2.61 kB
TypeScript
/**
* Client Interface Abstractions
* Breaking circular dependencies through interface segregation
*
* Living Spiral Council Applied:
* - Architect: Clear separation between interface and implementation
* - Maintainer: Stable contracts for loose coupling
* - Security Guardian: Controlled access through well-defined interfaces
* - Performance Engineer: Minimal interface surface area for efficiency
*/
import { ProjectContext, ModelRequest, ModelResponse } from '../types.js';
export { ProjectContext, ModelRequest, ModelResponse };
export interface StreamToken {
content: string;
finished?: boolean;
index: number;
timestamp: number;
metadata?: Record<string, any>;
}
export interface IModelClient {
processRequest(request: ModelRequest, context?: ProjectContext): Promise<ModelResponse>;
streamRequest(request: ModelRequest, onToken: (token: StreamToken) => void, context?: ProjectContext): Promise<ModelResponse>;
generateText(prompt: string, options?: any): Promise<string>;
synthesize(request: ModelRequest): Promise<ModelResponse>;
healthCheck(): Promise<Record<string, boolean>>;
getProviders(): Map<string, any>;
initialize(): Promise<void>;
shutdown(): Promise<void>;
destroy(): Promise<void>;
}
export interface IVoiceSystem {
generateVoiceResponse(prompt: string, voiceId: string, options?: any): Promise<any>;
synthesizeMultiVoice(request: any): Promise<any>;
getAvailableVoices(): string[];
}
export interface IIntegratedSystem {
synthesize(request: any): Promise<any>;
getSystemStatus(): Promise<any>;
enableIntegration(): Promise<void>;
disableIntegration(): Promise<void>;
}
export interface IPerformanceMonitor {
[key: string]: any;
}
export interface IClientConfig {
providers: any[];
executionMode: string;
fallbackChain: string[];
performanceThresholds: any;
security: any;
streaming?: any;
}
export interface ClientEvents {
requestStarted: {
requestId: string;
request: ModelRequest;
};
requestCompleted: {
requestId: string;
response: ModelResponse;
};
requestFailed: {
requestId: string;
error: Error;
};
providersReady: void;
providersPartial: {
error: Error;
};
shutdown: void;
}
export interface IClientFactory {
createClient(config: IClientConfig): Promise<IModelClient>;
createClientWithDependencies(providers: any, cache: any, security: any, streaming: any, config: IClientConfig): Promise<IModelClient>;
}
//# sourceMappingURL=client-interfaces.d.ts.map