feat: add initial implementation of Simple AI Provider package

This commit is contained in:
2025-05-28 11:54:24 +02:00
commit 42902445fb
15 changed files with 1616 additions and 0 deletions

52
src/index.ts Normal file
View File

@@ -0,0 +1,52 @@
/**
* Simple AI Provider - Main Entry Point
*
* A professional, extensible package for integrating multiple AI providers
* into your applications with a unified interface.
*
* @author Jan-Marlon Leibl
* @version 1.0.0
*/
// Core types and interfaces
export type {
AIProviderConfig,
AIMessage,
MessageRole,
CompletionParams,
CompletionResponse,
CompletionChunk,
TokenUsage,
ProviderInfo
} from './types/index.js';
// Error handling
export { AIProviderError, AIErrorType } from './types/index.js';
// Base provider class
export { BaseAIProvider } from './providers/base.js';
// Concrete provider implementations
export { ClaudeProvider, type ClaudeConfig } from './providers/claude.js';
// Utility functions and factory
export {
createProvider,
createClaudeProvider,
ProviderRegistry,
type ProviderType,
type ProviderConfigMap
} from './utils/factory.js';
// Re-export everything from providers for convenience
export * from './providers/index.js';
/**
* Package version
*/
export const VERSION = '1.0.0';
/**
* List of supported providers
*/
export const SUPPORTED_PROVIDERS = ['claude'] as const;