import { I as ICache, a as ILogger, b as ITracing, c as IAI } from './IAI-D8wA_i8N.js';
import { z } from 'zod';

/**
 * Database abstraction interface
 * Provides a vendor-agnostic way to interact with SQL databases
 */
interface QueryResult<T = unknown> {
    data: T[];
    count?: number;
    error?: Error;
}
interface IDatabase {
    /**
     * Query data from a table
     */
    from<T = unknown>(table: string): IQueryBuilder<T>;
    /**
     * Execute a raw SQL query
     */
    raw<T = unknown>(sql: string, params?: unknown[]): Promise<QueryResult<T>>;
    /**
     * Begin a transaction
     */
    transaction<T>(fn: (tx: IDatabase) => Promise<T>): Promise<T>;
    /**
     * Check database connectivity
     */
    healthCheck(): Promise<boolean>;
    /**
     * Close database connection
     */
    close(): Promise<void>;
}
interface IQueryBuilder<T = unknown> {
    select(columns?: string | string[]): IQueryBuilder<T>;
    insert(data: Partial<T> | Partial<T>[]): IQueryBuilder<T>;
    update(data: Partial<T>): IQueryBuilder<T>;
    delete(): IQueryBuilder<T>;
    where(column: string, operator: string, value: unknown): IQueryBuilder<T>;
    whereIn(column: string, values: unknown[]): IQueryBuilder<T>;
    orderBy(column: string, direction?: "asc" | "desc"): IQueryBuilder<T>;
    limit(count: number): IQueryBuilder<T>;
    offset(count: number): IQueryBuilder<T>;
    single(): Promise<{
        data: T | null;
        error?: Error;
    }>;
    execute(): Promise<QueryResult<T>>;
}

/**
 * Storage abstraction interface
 * Provides a vendor-agnostic way to interact with file/blob storage
 */
interface StorageFile {
    key: string;
    size: number;
    contentType?: string;
    lastModified?: Date;
    etag?: string;
}
interface UploadOptions {
    contentType?: string;
    metadata?: Record<string, string>;
    public?: boolean;
}
interface IStorage {
    /**
     * Upload a file
     */
    upload(key: string, data: Buffer | Blob | ReadableStream, options?: UploadOptions): Promise<{
        url: string;
    }>;
    /**
     * Download a file
     */
    download(key: string): Promise<Buffer>;
    /**
     * Get a signed URL for download
     */
    getSignedUrl(key: string, expiresIn?: number): Promise<string>;
    /**
     * Delete a file
     */
    delete(key: string): Promise<void>;
    /**
     * Delete multiple files
     */
    deleteMany(keys: string[]): Promise<void>;
    /**
     * List files in a path
     */
    list(prefix?: string): Promise<StorageFile[]>;
    /**
     * Check if file exists
     */
    exists(key: string): Promise<boolean>;
    /**
     * Get file metadata
     */
    getMetadata(key: string): Promise<StorageFile | null>;
    /**
     * Check storage connectivity
     */
    healthCheck(): Promise<boolean>;
}

/**
 * Email abstraction interface
 * Provides a vendor-agnostic way to send emails
 */
interface EmailAddress {
    email: string;
    name?: string;
}
interface EmailAttachment {
    filename: string;
    content: Buffer | string;
    contentType?: string;
}
interface EmailMessage {
    to: EmailAddress | EmailAddress[];
    from?: EmailAddress;
    replyTo?: EmailAddress;
    subject: string;
    text?: string;
    html?: string;
    attachments?: EmailAttachment[];
    headers?: Record<string, string>;
    tags?: string[];
}
interface EmailResult {
    id: string;
    success: boolean;
    error?: Error;
}
interface IEmail {
    /**
     * Send an email
     */
    send(message: EmailMessage): Promise<EmailResult>;
    /**
     * Send multiple emails (batch)
     */
    sendBatch(messages: EmailMessage[]): Promise<EmailResult[]>;
    /**
     * Check email service connectivity
     */
    healthCheck(): Promise<boolean>;
}

/**
 * Queue abstraction interface
 * Provides a vendor-agnostic way to work with job queues
 *
 * Design Principles:
 * - Self-hostable: Works with Redis (BullMQ) or in-memory for testing
 * - No cloud lock-in: All adapters use open-source technologies
 * - Backward compatible: All new fields/methods are optional
 * - Zero external costs: Only requires self-hosted Redis for production
 */
interface BackoffOptions {
    type: "fixed" | "exponential";
    delay: number;
    /** Maximum delay for exponential backoff (ms) */
    maxDelay?: number;
}
interface RepeatOptions {
    /** Repeat every N milliseconds */
    every?: number;
    /** Cron expression (e.g., "0 * * * *" for hourly) */
    cron?: string;
    /** Timezone for cron (e.g., "America/New_York") */
    tz?: string;
    /** Maximum number of times to repeat */
    limit?: number;
}
interface JobOptions {
    /** Delay before job is processed (ms) */
    delay?: number;
    /** Number of retry attempts */
    attempts?: number;
    /** Backoff strategy */
    backoff?: BackoffOptions;
    /** Job priority (higher = more priority) */
    priority?: number;
    /** Remove job after completion */
    removeOnComplete?: boolean | number;
    /** Remove job after failure */
    removeOnFail?: boolean | number;
    /** Job timeout in milliseconds (new) */
    timeout?: number;
    /** Custom job ID (new) */
    jobId?: string;
    /** Repeat/cron options (new) */
    repeat?: RepeatOptions;
    /** Correlation ID for tracing (new) */
    correlationId?: string;
    /** Custom metadata (new) */
    metadata?: Record<string, unknown>;
}
type JobState = "waiting" | "active" | "completed" | "failed" | "delayed";
interface Job<T = unknown> {
    id: string;
    name: string;
    data: T;
    attemptsMade: number;
    progress: number;
    timestamp: number;
    /** Job state (new, optional) */
    state?: JobState;
    /** Processing start time (new, optional) */
    processedOn?: number;
    /** Completion time (new, optional) */
    finishedOn?: number;
    /** Failure reason (new, optional) */
    failedReason?: string;
    /** Correlation ID (new, optional) */
    correlationId?: string;
    /** Custom metadata (new, optional) */
    metadata?: Record<string, unknown>;
}
interface JobResult<T = unknown> {
    jobId: string;
    result?: T;
    error?: Error;
    /** Duration in ms (new, optional) */
    duration?: number;
}
interface JobContext<T = unknown> {
    job: Job<T>;
    /** Update job progress (0-100) */
    updateProgress(progress: number): Promise<void>;
    /** Log message for this job */
    log(message: string): void;
    /** Check if job timed out */
    isTimedOut(): boolean;
}
interface QueueStats {
    waiting: number;
    active: number;
    completed: number;
    failed: number;
    delayed: number;
}
type JobEventType = "completed" | "failed" | "progress" | "active" | "stalled";
interface JobEvent<T = unknown> {
    type: JobEventType;
    job: Job<T>;
    result?: unknown;
    error?: Error;
    progress?: number;
    timestamp: number;
}
type JobEventHandler<T = unknown> = (event: JobEvent<T>) => void | Promise<void>;
interface IQueue<T = unknown> {
    /**
     * Add a job to the queue
     */
    add(name: string, data: T, options?: JobOptions): Promise<Job<T>>;
    /**
     * Add multiple jobs
     */
    addBulk(jobs: Array<{
        name: string;
        data: T;
        options?: JobOptions;
    }>): Promise<Job<T>[]>;
    /**
     * Process jobs (backward compatible signature)
     * New signature with options is also supported
     */
    process(handler: (job: Job<T>) => Promise<unknown>, options?: {
        concurrency?: number;
    }): void;
    /**
     * Get a job by ID
     */
    getJob(id: string): Promise<Job<T> | null>;
    /**
     * Remove a job
     */
    removeJob(id: string): Promise<void>;
    /**
     * Pause the queue
     */
    pause(): Promise<void>;
    /**
     * Resume the queue
     */
    resume(): Promise<void>;
    /**
     * Get queue statistics
     */
    getStats(): Promise<QueueStats>;
    /**
     * Check queue connectivity
     */
    healthCheck(): Promise<boolean>;
    /**
     * Close queue connection
     */
    close(): Promise<void>;
    /**
     * Add a recurring job (cron/interval)
     * @throws {Error} If adapter doesn't support recurring jobs
     */
    addRecurring?(name: string, data: T, repeat: RepeatOptions, options?: Omit<JobOptions, "repeat">): Promise<Job<T>>;
    /**
     * Get jobs by state
     */
    getJobs?(state: JobState | JobState[], start?: number, end?: number): Promise<Job<T>[]>;
    /**
     * Get failed jobs (dead letter queue)
     */
    getFailedJobs?(start?: number, end?: number): Promise<Job<T>[]>;
    /**
     * Retry a failed job
     */
    retryJob?(id: string): Promise<void>;
    /**
     * Replay all failed jobs
     */
    replayAllFailed?(): Promise<number>;
    /**
     * Update job progress
     */
    updateProgress?(id: string, progress: number): Promise<void>;
    /**
     * Clean old jobs
     */
    clean?(grace: number, limit: number, state: JobState): Promise<string[]>;
    /**
     * Remove all jobs
     */
    obliterate?(options?: {
        force?: boolean;
    }): Promise<void>;
    /**
     * Subscribe to job events
     */
    on?(event: JobEventType, handler: JobEventHandler<T>): void;
    /**
     * Unsubscribe from job events
     */
    off?(event: JobEventType, handler: JobEventHandler<T>): void;
    /**
     * Get queue name
     */
    getName?(): string;
}
/**
 * Calculate exponential backoff delay
 */
declare function calculateBackoff(attempt: number, options: BackoffOptions): number;
/**
 * Generate a unique job ID
 */
declare function generateJobId(): string;

/**
 * Metrics Interface
 *
 * Provides observability through counters, gauges, histograms, and timers.
 */
/**
 * Tags for metrics (key-value pairs for dimensions)
 */
type MetricTags = Record<string, string | number | boolean>;
/**
 * Metrics interface for observability
 */
interface IMetrics {
    /**
     * Increment a counter by a value (default 1)
     *
     * @example
     * metrics.increment('api.requests', 1, { method: 'GET', path: '/users' })
     */
    increment(name: string, value?: number, tags?: MetricTags): void;
    /**
     * Decrement a counter by a value (default 1)
     *
     * @example
     * metrics.decrement('active.connections', 1, { server: 'api-1' })
     */
    decrement(name: string, value?: number, tags?: MetricTags): void;
    /**
     * Set a gauge to a specific value
     *
     * @example
     * metrics.gauge('queue.size', 42, { queue: 'emails' })
     */
    gauge(name: string, value: number, tags?: MetricTags): void;
    /**
     * Record a value in a histogram (for distributions)
     *
     * @example
     * metrics.histogram('response.size', 1024, { endpoint: '/api/users' })
     */
    histogram(name: string, value: number, tags?: MetricTags): void;
    /**
     * Record a timing value in milliseconds
     *
     * @example
     * metrics.timing('db.query.duration', 42, { table: 'users' })
     */
    timing(name: string, value: number, tags?: MetricTags): void;
    /**
     * Start a timer and return a function to stop it
     *
     * @example
     * const stop = metrics.startTimer('api.request.duration', { method: 'GET' })
     * // ... do work ...
     * stop() // Records the duration
     */
    startTimer(name: string, tags?: MetricTags): () => void;
    /**
     * Record a distribution value (similar to histogram but for Datadog)
     *
     * @example
     * metrics.distribution('payment.amount', 99.99, { currency: 'USD' })
     */
    distribution?(name: string, value: number, tags?: MetricTags): void;
    /**
     * Record a set value (count unique elements)
     *
     * @example
     * metrics.set('unique.users', 'user-123')
     */
    set?(name: string, value: string | number, tags?: MetricTags): void;
    /**
     * Flush all pending metrics to the backend
     */
    flush(): Promise<void>;
    /**
     * Close the metrics client
     */
    close(): Promise<void>;
}
/**
 * Memory-based metrics implementation for testing
 */
declare class MemoryMetrics implements IMetrics {
    private counters;
    private gauges;
    private histograms;
    private timings;
    private sets;
    increment(name: string, value?: number, tags?: MetricTags): void;
    decrement(name: string, value?: number, tags?: MetricTags): void;
    gauge(name: string, value: number, tags?: MetricTags): void;
    histogram(name: string, value: number, tags?: MetricTags): void;
    timing(name: string, value: number, tags?: MetricTags): void;
    startTimer(name: string, tags?: MetricTags): () => void;
    distribution(name: string, value: number, tags?: MetricTags): void;
    set(name: string, value: string | number, tags?: MetricTags): void;
    flush(): Promise<void>;
    close(): Promise<void>;
    /**
     * Get counter value
     */
    getCounter(name: string, tags?: MetricTags): number;
    /**
     * Get gauge value
     */
    getGauge(name: string, tags?: MetricTags): number | undefined;
    /**
     * Get histogram values
     */
    getHistogram(name: string, tags?: MetricTags): number[];
    /**
     * Get timing values
     */
    getTiming(name: string, tags?: MetricTags): number[];
    /**
     * Get set size
     */
    getSetSize(name: string, tags?: MetricTags): number;
    /**
     * Get all metrics as a summary
     */
    getSummary(): MetricsSummary;
    /**
     * Reset all metrics
     */
    reset(): void;
    private createKey;
    private percentile;
}
/**
 * No-op metrics implementation
 */
declare class NoopMetrics implements IMetrics {
    increment(): void;
    decrement(): void;
    gauge(): void;
    histogram(): void;
    timing(): void;
    startTimer(): () => void;
    distribution(): void;
    set(): void;
    flush(): Promise<void>;
    close(): Promise<void>;
}
/**
 * Summary of all metrics
 */
interface MetricsSummary {
    counters: Record<string, number>;
    gauges: Record<string, number>;
    histograms: Record<string, HistogramStats>;
    timings: Record<string, TimingStats>;
    sets: Record<string, number>;
}
/**
 * Histogram statistics
 */
interface HistogramStats {
    count: number;
    sum: number;
    min: number;
    max: number;
    avg: number;
}
/**
 * Timing statistics
 */
interface TimingStats extends HistogramStats {
    p50: number;
    p95: number;
    p99: number;
}
/**
 * Create a scoped metrics instance with a prefix
 */
declare function createScopedMetrics(metrics: IMetrics, prefix: string, defaultTags?: MetricTags): IMetrics;

/**
 * IRAG - Retrieval Augmented Generation interface
 *
 * Provides infrastructure for building RAG pipelines:
 * - Document ingestion and chunking
 * - Vector storage and retrieval
 * - Semantic search
 * - Hybrid search (vector + keyword)
 * - Reranking
 * - Context assembly
 */
type DocumentStatus = "pending" | "processing" | "indexed" | "failed";
interface RAGDocument {
    id: string;
    /** Source identifier (e.g., file path, URL, database ID) */
    source: string;
    /** Document type (pdf, markdown, html, text, etc.) */
    type: string;
    /** Original content */
    content: string;
    /** Document title */
    title?: string;
    /** Document metadata */
    metadata: Record<string, unknown>;
    /** Tenant ID for multi-tenant isolation */
    tenantId?: string;
    /** Collection/namespace */
    collection: string;
    /** Document status */
    status: DocumentStatus;
    /** Error message if failed */
    error?: string;
    /** Chunk count */
    chunkCount?: number;
    /** Token count */
    tokenCount?: number;
    /** Created timestamp */
    createdAt: Date;
    /** Updated timestamp */
    updatedAt: Date;
}
interface RAGChunk {
    id: string;
    documentId: string;
    /** Chunk index within document */
    index: number;
    /** Chunk content */
    content: string;
    /** Embedding vector */
    embedding?: number[];
    /** Chunk metadata */
    metadata: Record<string, unknown>;
    /** Start character position in original document */
    startOffset?: number;
    /** End character position */
    endOffset?: number;
    /** Token count */
    tokenCount: number;
    /** Collection/namespace */
    collection: string;
    /** Tenant ID */
    tenantId?: string;
}
type ChunkingStrategy = "fixed" | "sentence" | "paragraph" | "semantic" | "recursive";
interface ChunkingConfig {
    /** Chunking strategy */
    strategy: ChunkingStrategy;
    /** Target chunk size in tokens */
    chunkSize: number;
    /** Overlap between chunks in tokens */
    chunkOverlap: number;
    /** Minimum chunk size */
    minChunkSize?: number;
    /** Maximum chunk size */
    maxChunkSize?: number;
    /** Separators for recursive chunking */
    separators?: string[];
    /** Keep metadata in chunks */
    includeMetadata?: boolean;
    /** Add document title to each chunk */
    includeTitle?: boolean;
}
declare const ChunkingPresets: Record<string, ChunkingConfig>;
type SearchMode = "vector" | "keyword" | "hybrid";
interface RAGSearchQuery {
    /** Search query text */
    query: string;
    /** Collection to search */
    collection: string;
    /** Tenant ID for filtering */
    tenantId?: string;
    /** Search mode */
    mode?: SearchMode;
    /** Maximum results to return */
    limit?: number;
    /** Minimum similarity score (0-1) */
    minScore?: number;
    /** Metadata filters */
    filters?: RAGFilter[];
    /** Include embeddings in results */
    includeEmbeddings?: boolean;
    /** Include original document content */
    includeDocumentContent?: boolean;
    /** Rerank results using cross-encoder */
    rerank?: boolean;
    /** Number of candidates for reranking */
    rerankCandidates?: number;
}
interface RAGFilter {
    field: string;
    operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "in" | "nin" | "contains";
    value: unknown;
}
interface RAGSearchResult {
    chunk: RAGChunk;
    score: number;
    document?: RAGDocument;
    highlights?: string[];
}
interface RAGSearchResponse {
    results: RAGSearchResult[];
    query: string;
    totalMatches: number;
    searchTimeMs: number;
    mode: SearchMode;
}
interface ContextAssemblyConfig {
    /** Maximum tokens for assembled context */
    maxTokens: number;
    /** Template for formatting each chunk */
    chunkTemplate?: string;
    /** Template for the full context */
    contextTemplate?: string;
    /** Include source citations */
    includeCitations?: boolean;
    /** Deduplicate similar chunks */
    deduplicate?: boolean;
    /** Deduplication similarity threshold */
    dedupeThreshold?: number;
    /** Sort order for chunks */
    sortBy?: "score" | "document" | "position";
}
interface AssembledContext {
    /** Final assembled context string */
    context: string;
    /** Chunks included in context */
    chunks: RAGChunk[];
    /** Total tokens used */
    tokenCount: number;
    /** Source documents referenced */
    sources: Array<{
        documentId: string;
        title?: string;
        source: string;
    }>;
    /** Chunks excluded due to limits */
    truncated: boolean;
}
interface IngestionOptions {
    /** Collection to add documents to */
    collection: string;
    /** Tenant ID */
    tenantId?: string;
    /** Chunking configuration */
    chunking?: Partial<ChunkingConfig>;
    /** Document metadata to attach */
    metadata?: Record<string, unknown>;
    /** Generate embeddings immediately */
    generateEmbeddings?: boolean;
    /** Batch size for processing */
    batchSize?: number;
    /** Skip existing documents */
    skipExisting?: boolean;
}
interface IngestionResult {
    documentId: string;
    status: DocumentStatus;
    chunkCount: number;
    tokenCount: number;
    error?: string;
    processingTimeMs: number;
}
interface BulkIngestionResult {
    total: number;
    successful: number;
    failed: number;
    results: IngestionResult[];
    totalProcessingTimeMs: number;
}
interface RAGCollection {
    name: string;
    description?: string;
    /** Embedding model used */
    embeddingModel: string;
    /** Embedding dimensions */
    dimensions: number;
    /** Distance metric for similarity */
    distanceMetric: "cosine" | "euclidean" | "dotproduct";
    /** Chunking config for this collection */
    chunkingConfig: ChunkingConfig;
    /** Document count */
    documentCount: number;
    /** Chunk count */
    chunkCount: number;
    /** Total token count */
    totalTokens: number;
    /** Created timestamp */
    createdAt: Date;
    /** Updated timestamp */
    updatedAt: Date;
}
interface CreateCollectionOptions {
    name: string;
    description?: string;
    embeddingModel?: string;
    dimensions?: number;
    distanceMetric?: "cosine" | "euclidean" | "dotproduct";
    chunkingConfig?: Partial<ChunkingConfig>;
}
interface RAGPipelineStep {
    name: string;
    type: "transform" | "filter" | "enrich" | "embed" | "store";
    config: Record<string, unknown>;
    enabled: boolean;
}
interface RAGPipeline {
    id: string;
    name: string;
    description?: string;
    collection: string;
    steps: RAGPipelineStep[];
    createdAt: Date;
    updatedAt: Date;
}
interface RAGConfig {
    /** Default embedding model */
    defaultEmbeddingModel?: string;
    /** Default chunking config */
    defaultChunkingConfig?: Partial<ChunkingConfig>;
    /** Default search mode */
    defaultSearchMode?: SearchMode;
    /** Default result limit */
    defaultLimit?: number;
    /** Enable caching */
    enableCache?: boolean;
    /** Cache TTL in seconds */
    cacheTtlSeconds?: number;
    /** Maximum documents per collection */
    maxDocumentsPerCollection?: number;
    /** Maximum chunks per document */
    maxChunksPerDocument?: number;
}
/**
 * IRAG - RAG pipeline interface
 *
 * @example
 * ```typescript
 * const rag = platform.rag;
 *
 * // Create a collection
 * await rag.createCollection({
 *   name: 'knowledge-base',
 *   embeddingModel: 'text-embedding-3-small',
 * });
 *
 * // Ingest documents
 * await rag.ingest('knowledge-base', [
 *   { source: 'doc1.pdf', content: '...', type: 'pdf' },
 *   { source: 'doc2.md', content: '...', type: 'markdown' },
 * ]);
 *
 * // Search
 * const results = await rag.search({
 *   query: 'How do I configure authentication?',
 *   collection: 'knowledge-base',
 *   limit: 5,
 * });
 *
 * // Assemble context for LLM
 * const context = await rag.assembleContext(results, {
 *   maxTokens: 4000,
 *   includeCitations: true,
 * });
 *
 * // Use with AI
 * const response = await ai.chat({
 *   messages: [
 *     { role: 'system', content: `Use this context: ${context.context}` },
 *     { role: 'user', content: 'How do I configure authentication?' }
 *   ]
 * });
 * ```
 */
interface IRAG {
    /**
     * Create a new collection
     */
    createCollection(options: CreateCollectionOptions): Promise<RAGCollection>;
    /**
     * Get a collection by name
     */
    getCollection(name: string): Promise<RAGCollection | null>;
    /**
     * List all collections
     */
    listCollections(tenantId?: string): Promise<RAGCollection[]>;
    /**
     * Delete a collection and all its documents
     */
    deleteCollection(name: string): Promise<void>;
    /**
     * Get collection statistics
     */
    getCollectionStats(name: string): Promise<{
        documentCount: number;
        chunkCount: number;
        totalTokens: number;
        averageChunkSize: number;
        storageBytes: number;
    }>;
    /**
     * Ingest documents into a collection
     */
    ingest(collection: string, documents: Array<Omit<RAGDocument, "id" | "status" | "chunkCount" | "tokenCount" | "createdAt" | "updatedAt">>, options?: Partial<IngestionOptions>): Promise<BulkIngestionResult>;
    /**
     * Ingest a single document
     */
    ingestOne(collection: string, document: Omit<RAGDocument, "id" | "status" | "chunkCount" | "tokenCount" | "createdAt" | "updatedAt" | "collection">, options?: Partial<IngestionOptions>): Promise<IngestionResult>;
    /**
     * Get a document by ID
     */
    getDocument(documentId: string): Promise<RAGDocument | null>;
    /**
     * List documents in a collection
     */
    listDocuments(collection: string, options?: {
        tenantId?: string;
        status?: DocumentStatus;
        limit?: number;
        offset?: number;
    }): Promise<{
        documents: RAGDocument[];
        total: number;
    }>;
    /**
     * Delete a document and its chunks
     */
    deleteDocument(documentId: string): Promise<void>;
    /**
     * Reprocess a document (re-chunk and re-embed)
     */
    reprocessDocument(documentId: string, options?: Partial<IngestionOptions>): Promise<IngestionResult>;
    /**
     * Get chunks for a document
     */
    getChunks(documentId: string): Promise<RAGChunk[]>;
    /**
     * Get a specific chunk by ID
     */
    getChunk(chunkId: string): Promise<RAGChunk | null>;
    /**
     * Update chunk metadata
     */
    updateChunkMetadata(chunkId: string, metadata: Record<string, unknown>): Promise<RAGChunk>;
    /**
     * Search for relevant chunks
     */
    search(query: RAGSearchQuery): Promise<RAGSearchResponse>;
    /**
     * Get similar chunks to a given chunk
     */
    findSimilar(chunkId: string, options?: {
        limit?: number;
        minScore?: number;
        collection?: string;
    }): Promise<RAGSearchResult[]>;
    /**
     * Multi-query search (query expansion)
     */
    multiSearch(queries: RAGSearchQuery[]): Promise<RAGSearchResponse[]>;
    /**
     * Assemble context from search results
     */
    assembleContext(results: RAGSearchResponse | RAGSearchResult[], config?: Partial<ContextAssemblyConfig>): Promise<AssembledContext>;
    /**
     * Query and assemble in one step
     */
    queryWithContext(query: RAGSearchQuery, contextConfig?: Partial<ContextAssemblyConfig>): Promise<{
        searchResponse: RAGSearchResponse;
        context: AssembledContext;
    }>;
    /**
     * Generate embeddings for text
     */
    embed(texts: string | string[], model?: string): Promise<number[][]>;
    /**
     * Update embeddings for a collection
     */
    reembed(collection: string, model?: string, batchSize?: number): Promise<{
        updated: number;
        errors: number;
    }>;
    /**
     * Create a processing pipeline
     */
    createPipeline(pipeline: Omit<RAGPipeline, "id" | "createdAt" | "updatedAt">): Promise<RAGPipeline>;
    /**
     * Get a pipeline
     */
    getPipeline(pipelineId: string): Promise<RAGPipeline | null>;
    /**
     * Run a pipeline on documents
     */
    runPipeline(pipelineId: string, documentIds: string[]): Promise<BulkIngestionResult>;
}
/**
 * MemoryRAG - In-memory implementation for testing
 */
declare class MemoryRAG implements IRAG {
    private config;
    private collections;
    private documents;
    private chunks;
    private pipelines;
    private embeddings;
    constructor(config?: RAGConfig);
    createCollection(options: CreateCollectionOptions): Promise<RAGCollection>;
    getCollection(name: string): Promise<RAGCollection | null>;
    listCollections(tenantId?: string): Promise<RAGCollection[]>;
    deleteCollection(name: string): Promise<void>;
    getCollectionStats(name: string): Promise<{
        documentCount: number;
        chunkCount: number;
        totalTokens: number;
        averageChunkSize: number;
        storageBytes: number;
    }>;
    ingest(collection: string, documents: Array<Omit<RAGDocument, "id" | "status" | "chunkCount" | "tokenCount" | "createdAt" | "updatedAt">>, options?: Partial<IngestionOptions>): Promise<BulkIngestionResult>;
    ingestOne(collection: string, document: Omit<RAGDocument, "id" | "status" | "chunkCount" | "tokenCount" | "createdAt" | "updatedAt" | "collection">, options?: Partial<IngestionOptions>): Promise<IngestionResult>;
    getDocument(documentId: string): Promise<RAGDocument | null>;
    listDocuments(collection: string, options?: {
        tenantId?: string;
        status?: DocumentStatus;
        limit?: number;
        offset?: number;
    }): Promise<{
        documents: RAGDocument[];
        total: number;
    }>;
    deleteDocument(documentId: string): Promise<void>;
    reprocessDocument(documentId: string, options?: Partial<IngestionOptions>): Promise<IngestionResult>;
    getChunks(documentId: string): Promise<RAGChunk[]>;
    getChunk(chunkId: string): Promise<RAGChunk | null>;
    updateChunkMetadata(chunkId: string, metadata: Record<string, unknown>): Promise<RAGChunk>;
    search(query: RAGSearchQuery): Promise<RAGSearchResponse>;
    findSimilar(chunkId: string, options?: {
        limit?: number;
        minScore?: number;
        collection?: string;
    }): Promise<RAGSearchResult[]>;
    multiSearch(queries: RAGSearchQuery[]): Promise<RAGSearchResponse[]>;
    assembleContext(results: RAGSearchResponse | RAGSearchResult[], config?: Partial<ContextAssemblyConfig>): Promise<AssembledContext>;
    queryWithContext(query: RAGSearchQuery, contextConfig?: Partial<ContextAssemblyConfig>): Promise<{
        searchResponse: RAGSearchResponse;
        context: AssembledContext;
    }>;
    embed(texts: string | string[], model?: string): Promise<number[][]>;
    reembed(collection: string, model?: string, batchSize?: number): Promise<{
        updated: number;
        errors: number;
    }>;
    createPipeline(pipeline: Omit<RAGPipeline, "id" | "createdAt" | "updatedAt">): Promise<RAGPipeline>;
    getPipeline(pipelineId: string): Promise<RAGPipeline | null>;
    runPipeline(pipelineId: string, documentIds: string[]): Promise<BulkIngestionResult>;
    private chunkDocument;
    private generateMockEmbedding;
    private cosineSimilarity;
    private keywordScore;
    private matchesFilters;
    private generateHighlights;
    private deduplicateResults;
}

/**
 * ICrypto - Field-Level Encryption Interface
 * Provides AES-256-GCM encryption with key rotation for PII in databases.
 */
type CryptoAlgorithm = "aes-256-gcm";
type CryptoKeyStatus = "active" | "decrypt-only" | "retired";
/** Encrypted field stored in database columns */
interface EncryptedField {
    /** Base64-encoded ciphertext */
    ciphertext: string;
    /** Base64-encoded initialization vector (96-bit for GCM) */
    iv: string;
    /** Base64-encoded GCM authentication tag */
    tag: string;
    /** ID of the key used for encryption */
    keyId: string;
    /** Algorithm used */
    algorithm: CryptoAlgorithm;
    /** Schema version for forward compatibility */
    version: 1;
}
/** Deterministic encrypted field — enables WHERE clause lookups */
interface DeterministicEncryptedField {
    /** HMAC-SHA256 hash for equality searches */
    hash: string;
    /** Full encrypted field for decryption */
    encrypted: EncryptedField;
}
/** Key metadata (never exposes raw key material) */
interface CryptoKeyMetadata {
    keyId: string;
    createdAt: Date;
    status: CryptoKeyStatus;
}
/** Options for encrypt/decrypt operations */
interface EncryptOptions {
    /** Specific key ID to use (defaults to active key) */
    keyId?: string;
    /** Additional Authenticated Data for GCM (e.g., table name + row ID) */
    aad?: string;
}
/** Result of a key rotation */
interface KeyRotationResult {
    /** ID of the new active key */
    newKeyId: string;
    /** ID of the previous active key (now decrypt-only) */
    previousKeyId: string;
}
interface ICrypto {
    /**
     * Encrypt plaintext using AES-256-GCM with a random IV.
     * Each call produces unique ciphertext (non-deterministic).
     */
    encrypt(plaintext: string, options?: EncryptOptions): Promise<EncryptedField>;
    /**
     * Decrypt an encrypted field back to plaintext.
     * Automatically selects the correct key by keyId.
     */
    decrypt(field: EncryptedField, options?: EncryptOptions): Promise<string>;
    /**
     * Encrypt with a deterministic hash for searchable encryption.
     * The hash is stable for the same plaintext (HMAC-SHA256),
     * while the encrypted value still uses a random IV.
     */
    encryptDeterministic(plaintext: string, options?: EncryptOptions): Promise<DeterministicEncryptedField>;
    /**
     * Compute a deterministic hash (HMAC-SHA256) for WHERE clause lookups.
     * Use this to search for records without decrypting.
     */
    computeHash(plaintext: string): Promise<string>;
    /**
     * Encrypt multiple fields in a single call.
     */
    encryptBatch(fields: Record<string, string>, options?: EncryptOptions): Promise<Record<string, EncryptedField>>;
    /**
     * Decrypt multiple fields in a single call.
     */
    decryptBatch(fields: Record<string, EncryptedField>, options?: EncryptOptions): Promise<Record<string, string>>;
    /**
     * Rotate to a new encryption key.
     * The old key is marked as decrypt-only (can still decrypt, cannot encrypt new data).
     */
    rotateKey(): Promise<KeyRotationResult>;
    /**
     * Re-encrypt a field with the current active key.
     * Used after key rotation to migrate old ciphertext.
     */
    reEncrypt(field: EncryptedField, options?: EncryptOptions): Promise<EncryptedField>;
    /**
     * List all keys and their statuses.
     */
    listKeys(): Promise<CryptoKeyMetadata[]>;
    /**
     * Get the ID of the current active encryption key.
     */
    getActiveKeyId(): Promise<string>;
    /**
     * Health check — verifies encrypt/decrypt round-trip works.
     */
    healthCheck(): Promise<boolean>;
}

/**
 * Main Platform interface
 * Combines all infrastructure services into a single entry point
 */

interface PlatformHealthStatus {
    healthy: boolean;
    services: {
        database: boolean;
        cache: boolean;
        storage: boolean;
        email: boolean;
        queue: boolean;
        tracing?: boolean;
    };
    timestamp: number;
}
interface IPlatform {
    /** Database service */
    readonly db: IDatabase;
    /** Cache service */
    readonly cache: ICache;
    /** Storage service */
    readonly storage: IStorage;
    /** Email service */
    readonly email: IEmail;
    /** Queue service */
    readonly queue: IQueue;
    /** Logger service (optional) */
    readonly logger?: ILogger;
    /** Metrics service (optional) */
    readonly metrics?: IMetrics;
    /** Tracing service (optional) */
    readonly tracing?: ITracing;
    /** AI service (optional, enabled via AI_ENABLED=true) */
    readonly ai?: IAI;
    /** RAG service (optional, enabled via RAG_ENABLED=true) */
    readonly rag?: IRAG;
    /** Crypto service for field-level encryption (optional) */
    readonly crypto?: ICrypto;
    /**
     * Check health of all services
     */
    healthCheck(): Promise<PlatformHealthStatus>;
    /**
     * Close all connections
     */
    close(): Promise<void>;
}

/**
 * Secrets Management Interface
 *
 * Provides a vendor-agnostic abstraction for secrets management.
 * Supports various backends: Environment variables, HashiCorp Vault,
 * AWS Secrets Manager, Azure Key Vault, GCP Secret Manager, etc.
 */
/**
 * Secret metadata
 */
interface SecretMetadata {
    /** Secret version or ETag */
    version?: string;
    /** Creation timestamp */
    createdAt?: Date;
    /** Last updated timestamp */
    updatedAt?: Date;
    /** Expiration timestamp */
    expiresAt?: Date;
    /** Custom tags/labels */
    tags?: Record<string, string>;
}
/**
 * Secret with metadata
 */
interface Secret<T = string> {
    /** Secret key/name */
    key: string;
    /** Secret value */
    value: T;
    /** Secret metadata */
    metadata?: SecretMetadata;
}
/**
 * Options for getting secrets
 */
interface GetSecretOptions {
    /** Specific version to retrieve */
    version?: string;
    /** Include metadata in response */
    includeMetadata?: boolean;
    /** Cache TTL in seconds (0 = no cache) */
    cacheTtl?: number;
}
/**
 * Options for setting secrets
 */
interface SetSecretOptions {
    /** Expiration timestamp */
    expiresAt?: Date;
    /** Custom tags/labels */
    tags?: Record<string, string>;
    /** Description */
    description?: string;
}
/**
 * Options for rotating secrets
 */
interface RotateSecretOptions {
    /** Custom rotation function */
    rotationFn?: () => Promise<string>;
    /** Rotation period in days */
    rotationPeriodDays?: number;
    /** Keep previous version count */
    keepPreviousVersions?: number;
}
/**
 * Result of a rotation operation
 */
interface RotationResult {
    /** New secret value */
    newValue: string;
    /** Previous secret value (for rollback) */
    previousValue?: string;
    /** New version identifier */
    newVersion: string;
    /** Previous version identifier */
    previousVersion?: string;
}
/**
 * Secrets Management Interface
 */
interface ISecrets {
    /**
     * Get a secret value by key
     */
    get(key: string, options?: GetSecretOptions): Promise<string | null>;
    /**
     * Get a secret with metadata
     */
    getWithMetadata(key: string, options?: GetSecretOptions): Promise<Secret | null>;
    /**
     * Get multiple secrets at once
     */
    mget(keys: string[]): Promise<Map<string, string | null>>;
    /**
     * Set a secret value
     */
    set(key: string, value: string, options?: SetSecretOptions): Promise<void>;
    /**
     * Delete a secret
     */
    delete(key: string): Promise<void>;
    /**
     * Check if a secret exists
     */
    exists(key: string): Promise<boolean>;
    /**
     * List all secret keys (optionally filtered by prefix)
     */
    list(prefix?: string): Promise<string[]>;
    /**
     * Rotate a secret (generate new value)
     */
    rotate(key: string, options?: RotateSecretOptions): Promise<RotationResult>;
    /**
     * Get all versions of a secret
     */
    getVersions(key: string): Promise<SecretMetadata[]>;
    /**
     * Health check
     */
    healthCheck(): Promise<boolean>;
}
/**
 * Environment Variables Secrets Adapter
 * Simple implementation using process.env - suitable for development
 * and containerized deployments with injected secrets
 */
declare class EnvSecrets implements ISecrets {
    private prefix;
    private cache;
    constructor(options?: {
        prefix?: string;
    });
    private getEnvKey;
    get(key: string, options?: GetSecretOptions): Promise<string | null>;
    getWithMetadata(key: string, options?: GetSecretOptions): Promise<Secret | null>;
    mget(keys: string[]): Promise<Map<string, string | null>>;
    set(key: string, value: string, _options?: SetSecretOptions): Promise<void>;
    delete(key: string): Promise<void>;
    exists(key: string): Promise<boolean>;
    list(prefix?: string): Promise<string[]>;
    rotate(key: string, options?: RotateSecretOptions): Promise<RotationResult>;
    getVersions(_key: string): Promise<SecretMetadata[]>;
    healthCheck(): Promise<boolean>;
    private generateSecureValue;
    /**
     * Clear the internal cache
     */
    clearCache(): void;
}
/**
 * Memory-based Secrets Adapter
 * For testing purposes only - stores secrets in memory
 */
declare class MemorySecrets implements ISecrets {
    private secrets;
    private versions;
    get(key: string, _options?: GetSecretOptions): Promise<string | null>;
    getWithMetadata(key: string, options?: GetSecretOptions): Promise<Secret | null>;
    mget(keys: string[]): Promise<Map<string, string | null>>;
    set(key: string, value: string, options?: SetSecretOptions): Promise<void>;
    delete(key: string): Promise<void>;
    exists(key: string): Promise<boolean>;
    list(prefix?: string): Promise<string[]>;
    rotate(key: string, options?: RotateSecretOptions): Promise<RotationResult>;
    getVersions(key: string): Promise<SecretMetadata[]>;
    healthCheck(): Promise<boolean>;
    private generateSecureValue;
    /**
     * Clear all secrets (for testing)
     */
    clear(): void;
    /**
     * Get count of secrets (for testing)
     */
    get size(): number;
}

/**
 * Platform Configuration
 * Comprehensive Zod schema for all platform options with validation
 */

declare const DatabaseProviderSchema: z.ZodEnum<{
    memory: "memory";
    postgres: "postgres";
    supabase: "supabase";
}>;
declare const CacheProviderSchema: z.ZodEnum<{
    memory: "memory";
    redis: "redis";
    upstash: "upstash";
}>;
declare const StorageProviderSchema: z.ZodEnum<{
    memory: "memory";
    supabase: "supabase";
    s3: "s3";
    minio: "minio";
    r2: "r2";
}>;
declare const EmailProviderSchema: z.ZodEnum<{
    console: "console";
    smtp: "smtp";
    memory: "memory";
    resend: "resend";
}>;
declare const QueueProviderSchema: z.ZodEnum<{
    memory: "memory";
    bullmq: "bullmq";
}>;
declare const TracingProviderSchema: z.ZodEnum<{
    otlp: "otlp";
    memory: "memory";
    noop: "noop";
}>;
declare const LogLevelSchema: z.ZodEnum<{
    debug: "debug";
    info: "info";
    warn: "warn";
    error: "error";
}>;
declare const AIProviderSchema: z.ZodEnum<{
    openai: "openai";
    anthropic: "anthropic";
    google: "google";
    memory: "memory";
}>;
declare const RAGProviderSchema: z.ZodEnum<{
    memory: "memory";
    pinecone: "pinecone";
    weaviate: "weaviate";
}>;
declare const DatabaseConfigSchema: z.ZodObject<{
    provider: z.ZodDefault<z.ZodEnum<{
        memory: "memory";
        postgres: "postgres";
        supabase: "supabase";
    }>>;
    url: z.ZodOptional<z.ZodString>;
    connectionString: z.ZodOptional<z.ZodString>;
    supabaseUrl: z.ZodOptional<z.ZodString>;
    supabaseAnonKey: z.ZodOptional<z.ZodString>;
    supabaseServiceRoleKey: z.ZodOptional<z.ZodString>;
    poolSize: z.ZodDefault<z.ZodNumber>;
    connectionTimeout: z.ZodDefault<z.ZodNumber>;
    ssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
        rejectUnauthorized: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strip>]>>;
}, z.core.$strip>;
declare const CacheConfigSchema: z.ZodObject<{
    provider: z.ZodDefault<z.ZodEnum<{
        memory: "memory";
        redis: "redis";
        upstash: "upstash";
    }>>;
    url: z.ZodOptional<z.ZodString>;
    upstashUrl: z.ZodOptional<z.ZodString>;
    upstashToken: z.ZodOptional<z.ZodString>;
    defaultTTL: z.ZodDefault<z.ZodNumber>;
    keyPrefix: z.ZodDefault<z.ZodString>;
    maxRetries: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
declare const StorageConfigSchema: z.ZodObject<{
    provider: z.ZodDefault<z.ZodEnum<{
        memory: "memory";
        supabase: "supabase";
        s3: "s3";
        minio: "minio";
        r2: "r2";
    }>>;
    endpoint: z.ZodOptional<z.ZodString>;
    region: z.ZodDefault<z.ZodString>;
    accessKey: z.ZodOptional<z.ZodString>;
    secretKey: z.ZodOptional<z.ZodString>;
    bucket: z.ZodOptional<z.ZodString>;
    publicUrl: z.ZodOptional<z.ZodString>;
    forcePathStyle: z.ZodDefault<z.ZodBoolean>;
    signedUrlExpiry: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
declare const EmailConfigSchema: z.ZodObject<{
    provider: z.ZodDefault<z.ZodEnum<{
        console: "console";
        smtp: "smtp";
        memory: "memory";
        resend: "resend";
    }>>;
    host: z.ZodOptional<z.ZodString>;
    port: z.ZodOptional<z.ZodNumber>;
    secure: z.ZodDefault<z.ZodBoolean>;
    username: z.ZodOptional<z.ZodString>;
    password: z.ZodOptional<z.ZodString>;
    apiKey: z.ZodOptional<z.ZodString>;
    from: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
    replyTo: z.ZodOptional<z.ZodString>;
    rateLimitPerSecond: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
declare const QueueConfigSchema: z.ZodObject<{
    provider: z.ZodDefault<z.ZodEnum<{
        memory: "memory";
        bullmq: "bullmq";
    }>>;
    redisUrl: z.ZodOptional<z.ZodString>;
    queueName: z.ZodDefault<z.ZodString>;
    concurrency: z.ZodDefault<z.ZodNumber>;
    maxRetries: z.ZodDefault<z.ZodNumber>;
    retryDelay: z.ZodDefault<z.ZodNumber>;
    removeOnComplete: z.ZodDefault<z.ZodBoolean>;
    removeOnFail: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
declare const AIConfigSchema: z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    provider: z.ZodDefault<z.ZodEnum<{
        openai: "openai";
        anthropic: "anthropic";
        google: "google";
        memory: "memory";
    }>>;
    apiKey: z.ZodOptional<z.ZodString>;
    model: z.ZodOptional<z.ZodString>;
    maxTokens: z.ZodDefault<z.ZodNumber>;
    temperature: z.ZodDefault<z.ZodNumber>;
    timeout: z.ZodDefault<z.ZodNumber>;
    baseUrl: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const RAGConfigSchema: z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    provider: z.ZodDefault<z.ZodEnum<{
        memory: "memory";
        pinecone: "pinecone";
        weaviate: "weaviate";
    }>>;
    apiKey: z.ZodOptional<z.ZodString>;
    environment: z.ZodOptional<z.ZodString>;
    indexName: z.ZodOptional<z.ZodString>;
    namespace: z.ZodOptional<z.ZodString>;
    host: z.ZodOptional<z.ZodString>;
    embeddingProvider: z.ZodDefault<z.ZodEnum<{
        openai: "openai";
        anthropic: "anthropic";
        google: "google";
        memory: "memory";
    }>>;
    embeddingApiKey: z.ZodOptional<z.ZodString>;
    embeddingModel: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const CryptoConfigSchema: z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    masterKey: z.ZodOptional<z.ZodString>;
    hmacKey: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const SecurityConfigSchema: z.ZodObject<{
    enforceTls: z.ZodDefault<z.ZodBoolean>;
    tlsWarnOnly: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
declare const RetryConfigSchema: z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    maxAttempts: z.ZodDefault<z.ZodNumber>;
    baseDelay: z.ZodDefault<z.ZodNumber>;
    maxDelay: z.ZodDefault<z.ZodNumber>;
    backoffMultiplier: z.ZodDefault<z.ZodNumber>;
    jitter: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
declare const CircuitBreakerConfigSchema: z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    failureThreshold: z.ZodDefault<z.ZodNumber>;
    resetTimeout: z.ZodDefault<z.ZodNumber>;
    halfOpenRequests: z.ZodDefault<z.ZodNumber>;
    monitorInterval: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
declare const TimeoutConfigSchema: z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    default: z.ZodDefault<z.ZodNumber>;
    database: z.ZodDefault<z.ZodNumber>;
    cache: z.ZodDefault<z.ZodNumber>;
    storage: z.ZodDefault<z.ZodNumber>;
    email: z.ZodDefault<z.ZodNumber>;
    queue: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
declare const BulkheadConfigSchema: z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    maxConcurrent: z.ZodDefault<z.ZodNumber>;
    maxQueued: z.ZodDefault<z.ZodNumber>;
    timeout: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
declare const ResilienceConfigSchema: z.ZodObject<{
    retry: z.ZodDefault<z.ZodObject<{
        enabled: z.ZodDefault<z.ZodBoolean>;
        maxAttempts: z.ZodDefault<z.ZodNumber>;
        baseDelay: z.ZodDefault<z.ZodNumber>;
        maxDelay: z.ZodDefault<z.ZodNumber>;
        backoffMultiplier: z.ZodDefault<z.ZodNumber>;
        jitter: z.ZodDefault<z.ZodBoolean>;
    }, z.core.$strip>>;
    circuitBreaker: z.ZodDefault<z.ZodObject<{
        enabled: z.ZodDefault<z.ZodBoolean>;
        failureThreshold: z.ZodDefault<z.ZodNumber>;
        resetTimeout: z.ZodDefault<z.ZodNumber>;
        halfOpenRequests: z.ZodDefault<z.ZodNumber>;
        monitorInterval: z.ZodDefault<z.ZodNumber>;
    }, z.core.$strip>>;
    timeout: z.ZodDefault<z.ZodObject<{
        enabled: z.ZodDefault<z.ZodBoolean>;
        default: z.ZodDefault<z.ZodNumber>;
        database: z.ZodDefault<z.ZodNumber>;
        cache: z.ZodDefault<z.ZodNumber>;
        storage: z.ZodDefault<z.ZodNumber>;
        email: z.ZodDefault<z.ZodNumber>;
        queue: z.ZodDefault<z.ZodNumber>;
    }, z.core.$strip>>;
    bulkhead: z.ZodDefault<z.ZodObject<{
        enabled: z.ZodDefault<z.ZodBoolean>;
        maxConcurrent: z.ZodDefault<z.ZodNumber>;
        maxQueued: z.ZodDefault<z.ZodNumber>;
        timeout: z.ZodDefault<z.ZodNumber>;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const LoggingConfigSchema: z.ZodObject<{
    level: z.ZodDefault<z.ZodEnum<{
        debug: "debug";
        info: "info";
        warn: "warn";
        error: "error";
    }>>;
    format: z.ZodDefault<z.ZodEnum<{
        json: "json";
        pretty: "pretty";
    }>>;
    includeTimestamp: z.ZodDefault<z.ZodBoolean>;
    includeCorrelationId: z.ZodDefault<z.ZodBoolean>;
    redactKeys: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
declare const MetricsConfigSchema: z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    prefix: z.ZodDefault<z.ZodString>;
    defaultTags: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
    flushInterval: z.ZodDefault<z.ZodNumber>;
    histogramBuckets: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
}, z.core.$strip>;
declare const TracingConfigSchema: z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    provider: z.ZodDefault<z.ZodEnum<{
        otlp: "otlp";
        memory: "memory";
        noop: "noop";
    }>>;
    serviceName: z.ZodOptional<z.ZodString>;
    serviceVersion: z.ZodOptional<z.ZodString>;
    environment: z.ZodOptional<z.ZodString>;
    sampleRate: z.ZodDefault<z.ZodNumber>;
    propagateContext: z.ZodDefault<z.ZodBoolean>;
    endpoint: z.ZodOptional<z.ZodString>;
    exporterType: z.ZodDefault<z.ZodEnum<{
        console: "console";
        "otlp-http": "otlp-http";
        "otlp-grpc": "otlp-grpc";
    }>>;
}, z.core.$strip>;
declare const ObservabilityConfigSchema: z.ZodObject<{
    logging: z.ZodDefault<z.ZodObject<{
        level: z.ZodDefault<z.ZodEnum<{
            debug: "debug";
            info: "info";
            warn: "warn";
            error: "error";
        }>>;
        format: z.ZodDefault<z.ZodEnum<{
            json: "json";
            pretty: "pretty";
        }>>;
        includeTimestamp: z.ZodDefault<z.ZodBoolean>;
        includeCorrelationId: z.ZodDefault<z.ZodBoolean>;
        redactKeys: z.ZodDefault<z.ZodArray<z.ZodString>>;
    }, z.core.$strip>>;
    metrics: z.ZodDefault<z.ZodObject<{
        enabled: z.ZodDefault<z.ZodBoolean>;
        prefix: z.ZodDefault<z.ZodString>;
        defaultTags: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
        flushInterval: z.ZodDefault<z.ZodNumber>;
        histogramBuckets: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
    }, z.core.$strip>>;
    tracing: z.ZodDefault<z.ZodObject<{
        enabled: z.ZodDefault<z.ZodBoolean>;
        provider: z.ZodDefault<z.ZodEnum<{
            otlp: "otlp";
            memory: "memory";
            noop: "noop";
        }>>;
        serviceName: z.ZodOptional<z.ZodString>;
        serviceVersion: z.ZodOptional<z.ZodString>;
        environment: z.ZodOptional<z.ZodString>;
        sampleRate: z.ZodDefault<z.ZodNumber>;
        propagateContext: z.ZodDefault<z.ZodBoolean>;
        endpoint: z.ZodOptional<z.ZodString>;
        exporterType: z.ZodDefault<z.ZodEnum<{
            console: "console";
            "otlp-http": "otlp-http";
            "otlp-grpc": "otlp-grpc";
        }>>;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const MiddlewareConfigSchema: z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    logging: z.ZodDefault<z.ZodBoolean>;
    metrics: z.ZodDefault<z.ZodBoolean>;
    slowQuery: z.ZodDefault<z.ZodObject<{
        enabled: z.ZodDefault<z.ZodBoolean>;
        thresholdMs: z.ZodDefault<z.ZodNumber>;
    }, z.core.$strip>>;
    cache: z.ZodDefault<z.ZodObject<{
        enabled: z.ZodDefault<z.ZodBoolean>;
        defaultTTL: z.ZodDefault<z.ZodNumber>;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const PlatformConfigSchema: z.ZodObject<{
    database: z.ZodDefault<z.ZodObject<{
        provider: z.ZodDefault<z.ZodEnum<{
            memory: "memory";
            postgres: "postgres";
            supabase: "supabase";
        }>>;
        url: z.ZodOptional<z.ZodString>;
        connectionString: z.ZodOptional<z.ZodString>;
        supabaseUrl: z.ZodOptional<z.ZodString>;
        supabaseAnonKey: z.ZodOptional<z.ZodString>;
        supabaseServiceRoleKey: z.ZodOptional<z.ZodString>;
        poolSize: z.ZodDefault<z.ZodNumber>;
        connectionTimeout: z.ZodDefault<z.ZodNumber>;
        ssl: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
            rejectUnauthorized: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strip>]>>;
    }, z.core.$strip>>;
    cache: z.ZodDefault<z.ZodObject<{
        provider: z.ZodDefault<z.ZodEnum<{
            memory: "memory";
            redis: "redis";
            upstash: "upstash";
        }>>;
        url: z.ZodOptional<z.ZodString>;
        upstashUrl: z.ZodOptional<z.ZodString>;
        upstashToken: z.ZodOptional<z.ZodString>;
        defaultTTL: z.ZodDefault<z.ZodNumber>;
        keyPrefix: z.ZodDefault<z.ZodString>;
        maxRetries: z.ZodDefault<z.ZodNumber>;
    }, z.core.$strip>>;
    storage: z.ZodDefault<z.ZodObject<{
        provider: z.ZodDefault<z.ZodEnum<{
            memory: "memory";
            supabase: "supabase";
            s3: "s3";
            minio: "minio";
            r2: "r2";
        }>>;
        endpoint: z.ZodOptional<z.ZodString>;
        region: z.ZodDefault<z.ZodString>;
        accessKey: z.ZodOptional<z.ZodString>;
        secretKey: z.ZodOptional<z.ZodString>;
        bucket: z.ZodOptional<z.ZodString>;
        publicUrl: z.ZodOptional<z.ZodString>;
        forcePathStyle: z.ZodDefault<z.ZodBoolean>;
        signedUrlExpiry: z.ZodDefault<z.ZodNumber>;
    }, z.core.$strip>>;
    email: z.ZodDefault<z.ZodObject<{
        provider: z.ZodDefault<z.ZodEnum<{
            console: "console";
            smtp: "smtp";
            memory: "memory";
            resend: "resend";
        }>>;
        host: z.ZodOptional<z.ZodString>;
        port: z.ZodOptional<z.ZodNumber>;
        secure: z.ZodDefault<z.ZodBoolean>;
        username: z.ZodOptional<z.ZodString>;
        password: z.ZodOptional<z.ZodString>;
        apiKey: z.ZodOptional<z.ZodString>;
        from: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
        replyTo: z.ZodOptional<z.ZodString>;
        rateLimitPerSecond: z.ZodDefault<z.ZodNumber>;
    }, z.core.$strip>>;
    queue: z.ZodDefault<z.ZodObject<{
        provider: z.ZodDefault<z.ZodEnum<{
            memory: "memory";
            bullmq: "bullmq";
        }>>;
        redisUrl: z.ZodOptional<z.ZodString>;
        queueName: z.ZodDefault<z.ZodString>;
        concurrency: z.ZodDefault<z.ZodNumber>;
        maxRetries: z.ZodDefault<z.ZodNumber>;
        retryDelay: z.ZodDefault<z.ZodNumber>;
        removeOnComplete: z.ZodDefault<z.ZodBoolean>;
        removeOnFail: z.ZodDefault<z.ZodBoolean>;
    }, z.core.$strip>>;
    ai: z.ZodDefault<z.ZodObject<{
        enabled: z.ZodDefault<z.ZodBoolean>;
        provider: z.ZodDefault<z.ZodEnum<{
            openai: "openai";
            anthropic: "anthropic";
            google: "google";
            memory: "memory";
        }>>;
        apiKey: z.ZodOptional<z.ZodString>;
        model: z.ZodOptional<z.ZodString>;
        maxTokens: z.ZodDefault<z.ZodNumber>;
        temperature: z.ZodDefault<z.ZodNumber>;
        timeout: z.ZodDefault<z.ZodNumber>;
        baseUrl: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    rag: z.ZodDefault<z.ZodObject<{
        enabled: z.ZodDefault<z.ZodBoolean>;
        provider: z.ZodDefault<z.ZodEnum<{
            memory: "memory";
            pinecone: "pinecone";
            weaviate: "weaviate";
        }>>;
        apiKey: z.ZodOptional<z.ZodString>;
        environment: z.ZodOptional<z.ZodString>;
        indexName: z.ZodOptional<z.ZodString>;
        namespace: z.ZodOptional<z.ZodString>;
        host: z.ZodOptional<z.ZodString>;
        embeddingProvider: z.ZodDefault<z.ZodEnum<{
            openai: "openai";
            anthropic: "anthropic";
            google: "google";
            memory: "memory";
        }>>;
        embeddingApiKey: z.ZodOptional<z.ZodString>;
        embeddingModel: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    crypto: z.ZodDefault<z.ZodObject<{
        enabled: z.ZodDefault<z.ZodBoolean>;
        masterKey: z.ZodOptional<z.ZodString>;
        hmacKey: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    security: z.ZodDefault<z.ZodObject<{
        enforceTls: z.ZodDefault<z.ZodBoolean>;
        tlsWarnOnly: z.ZodDefault<z.ZodBoolean>;
    }, z.core.$strip>>;
    resilience: z.ZodDefault<z.ZodObject<{
        retry: z.ZodDefault<z.ZodObject<{
            enabled: z.ZodDefault<z.ZodBoolean>;
            maxAttempts: z.ZodDefault<z.ZodNumber>;
            baseDelay: z.ZodDefault<z.ZodNumber>;
            maxDelay: z.ZodDefault<z.ZodNumber>;
            backoffMultiplier: z.ZodDefault<z.ZodNumber>;
            jitter: z.ZodDefault<z.ZodBoolean>;
        }, z.core.$strip>>;
        circuitBreaker: z.ZodDefault<z.ZodObject<{
            enabled: z.ZodDefault<z.ZodBoolean>;
            failureThreshold: z.ZodDefault<z.ZodNumber>;
            resetTimeout: z.ZodDefault<z.ZodNumber>;
            halfOpenRequests: z.ZodDefault<z.ZodNumber>;
            monitorInterval: z.ZodDefault<z.ZodNumber>;
        }, z.core.$strip>>;
        timeout: z.ZodDefault<z.ZodObject<{
            enabled: z.ZodDefault<z.ZodBoolean>;
            default: z.ZodDefault<z.ZodNumber>;
            database: z.ZodDefault<z.ZodNumber>;
            cache: z.ZodDefault<z.ZodNumber>;
            storage: z.ZodDefault<z.ZodNumber>;
            email: z.ZodDefault<z.ZodNumber>;
            queue: z.ZodDefault<z.ZodNumber>;
        }, z.core.$strip>>;
        bulkhead: z.ZodDefault<z.ZodObject<{
            enabled: z.ZodDefault<z.ZodBoolean>;
            maxConcurrent: z.ZodDefault<z.ZodNumber>;
            maxQueued: z.ZodDefault<z.ZodNumber>;
            timeout: z.ZodDefault<z.ZodNumber>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
    observability: z.ZodDefault<z.ZodObject<{
        logging: z.ZodDefault<z.ZodObject<{
            level: z.ZodDefault<z.ZodEnum<{
                debug: "debug";
                info: "info";
                warn: "warn";
                error: "error";
            }>>;
            format: z.ZodDefault<z.ZodEnum<{
                json: "json";
                pretty: "pretty";
            }>>;
            includeTimestamp: z.ZodDefault<z.ZodBoolean>;
            includeCorrelationId: z.ZodDefault<z.ZodBoolean>;
            redactKeys: z.ZodDefault<z.ZodArray<z.ZodString>>;
        }, z.core.$strip>>;
        metrics: z.ZodDefault<z.ZodObject<{
            enabled: z.ZodDefault<z.ZodBoolean>;
            prefix: z.ZodDefault<z.ZodString>;
            defaultTags: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
            flushInterval: z.ZodDefault<z.ZodNumber>;
            histogramBuckets: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
        }, z.core.$strip>>;
        tracing: z.ZodDefault<z.ZodObject<{
            enabled: z.ZodDefault<z.ZodBoolean>;
            provider: z.ZodDefault<z.ZodEnum<{
                otlp: "otlp";
                memory: "memory";
                noop: "noop";
            }>>;
            serviceName: z.ZodOptional<z.ZodString>;
            serviceVersion: z.ZodOptional<z.ZodString>;
            environment: z.ZodOptional<z.ZodString>;
            sampleRate: z.ZodDefault<z.ZodNumber>;
            propagateContext: z.ZodDefault<z.ZodBoolean>;
            endpoint: z.ZodOptional<z.ZodString>;
            exporterType: z.ZodDefault<z.ZodEnum<{
                console: "console";
                "otlp-http": "otlp-http";
                "otlp-grpc": "otlp-grpc";
            }>>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
    middleware: z.ZodDefault<z.ZodObject<{
        enabled: z.ZodDefault<z.ZodBoolean>;
        logging: z.ZodDefault<z.ZodBoolean>;
        metrics: z.ZodDefault<z.ZodBoolean>;
        slowQuery: z.ZodDefault<z.ZodObject<{
            enabled: z.ZodDefault<z.ZodBoolean>;
            thresholdMs: z.ZodDefault<z.ZodNumber>;
        }, z.core.$strip>>;
        cache: z.ZodDefault<z.ZodObject<{
            enabled: z.ZodDefault<z.ZodBoolean>;
            defaultTTL: z.ZodDefault<z.ZodNumber>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
}, z.core.$strip>;
type PlatformConfig = z.infer<typeof PlatformConfigSchema>;
type DatabaseConfig = z.infer<typeof DatabaseConfigSchema>;
type CacheConfig = z.infer<typeof CacheConfigSchema>;
type StorageConfig = z.infer<typeof StorageConfigSchema>;
type EmailConfig = z.infer<typeof EmailConfigSchema>;
type QueueConfig = z.infer<typeof QueueConfigSchema>;
type ResilienceConfig = z.infer<typeof ResilienceConfigSchema>;
type ObservabilityConfig = z.infer<typeof ObservabilityConfigSchema>;
type MiddlewareConfig = z.infer<typeof MiddlewareConfigSchema>;
type CryptoConfig = z.infer<typeof CryptoConfigSchema>;
type SecurityConfig = z.infer<typeof SecurityConfigSchema>;
/**
 * Load configuration from environment variables
 */
declare function loadConfig(): PlatformConfig;
/**
 * Validate configuration object
 * @throws ZodError if validation fails
 */
declare function validateConfig(config: unknown): PlatformConfig;
/**
 * Safely validate configuration, returning errors instead of throwing
 */
declare function safeValidateConfig(config: unknown): {
    success: boolean;
    data?: PlatformConfig;
    errors?: z.ZodError;
};
/**
 * Get configuration with defaults applied
 */
declare function getDefaultConfig(): PlatformConfig;

/**
 * Platform Factory
 * Create a platform instance with configured adapters
 */

/**
 * Create a platform instance (async version)
 */
declare function createPlatformAsync(config?: Partial<PlatformConfig>): Promise<IPlatform>;
/**
 * Create a platform instance (sync version - uses memory adapters only)
 * For production adapters, use createPlatformAsync
 */
declare function createPlatform(config?: Partial<PlatformConfig>): IPlatform;

/**
 * Memory Database Adapter
 * In-memory implementation for testing
 */

declare class MemoryDatabase implements IDatabase {
    private tables;
    from<T = unknown>(table: string): IQueryBuilder<T>;
    raw<T = unknown>(sql: string, params?: unknown[]): Promise<QueryResult<T>>;
    transaction<T>(fn: (tx: IDatabase) => Promise<T>): Promise<T>;
    healthCheck(): Promise<boolean>;
    close(): Promise<void>;
    /**
     * Clear all data (for testing)
     */
    clear(): void;
    /**
     * Get table data (for testing)
     */
    getTable<T = unknown>(tableName: string): T[];
}

/**
 * Memory Cache Adapter
 * In-memory implementation for testing
 */

declare class MemoryCache implements ICache {
    private store;
    private subscriptions;
    get<T = unknown>(key: string): Promise<T | null>;
    set<T = unknown>(key: string, value: T, ttl?: number): Promise<void>;
    delete(key: string): Promise<void>;
    exists(key: string): Promise<boolean>;
    deletePattern(pattern: string): Promise<number>;
    mget<T = unknown>(keys: string[]): Promise<(T | null)[]>;
    mset<T = unknown>(entries: Array<{
        key: string;
        value: T;
        ttl?: number;
    }>): Promise<void>;
    incr(key: string, by?: number): Promise<number>;
    publish(channel: string, message: string): Promise<void>;
    subscribe(channel: string, callback: (message: string) => void): Promise<() => void>;
    healthCheck(): Promise<boolean>;
    close(): Promise<void>;
    /**
     * Clear all cached data (for testing)
     */
    clear(): void;
    /**
     * Get number of cached items (for testing)
     */
    get size(): number;
}

declare class MemoryStorage implements IStorage {
    private files;
    upload(key: string, data: Buffer | Blob | ReadableStream, options?: UploadOptions): Promise<{
        url: string;
    }>;
    download(key: string): Promise<Buffer<ArrayBufferLike>>;
    getSignedUrl(key: string): Promise<string>;
    delete(key: string): Promise<void>;
    deleteMany(keys: string[]): Promise<void>;
    list(prefix?: string): Promise<StorageFile[]>;
    exists(key: string): Promise<boolean>;
    getMetadata(key: string): Promise<null>;
    healthCheck(): Promise<boolean>;
    /**
     * Clear all files (for testing)
     */
    clear(): void;
    /**
     * Get number of stored files (for testing)
     */
    get size(): number;
}

declare class MemoryEmail implements IEmail {
    private sentEmails;
    send(message: EmailMessage): Promise<EmailResult>;
    sendBatch(messages: EmailMessage[]): Promise<EmailResult[]>;
    healthCheck(): Promise<boolean>;
    getSentEmails(): EmailMessage[];
    /**
     * Clear sent emails (for testing)
     */
    clear(): void;
    /**
     * Get number of sent emails (for testing)
     */
    get size(): number;
}

/**
 * Enhanced Memory Queue Implementation
 *
 * Full-featured in-memory queue for testing with:
 * - Retry/backoff support
 * - Job state management
 * - Event emitters
 * - Dead letter queue (failed jobs)
 * - Recurring job support
 *
 * Design: Self-contained, no external dependencies, full IQueue compliance
 */

declare class MemoryQueue<T = unknown> implements IQueue<T> {
    private jobs;
    private handlers;
    private eventHandlers;
    private paused;
    private processingConcurrency;
    private activeCount;
    private repeatIntervals;
    private queueName;
    private processingQueue;
    private isProcessing;
    constructor(name?: string);
    add(name: string, data: T, options?: JobOptions): Promise<Job<T>>;
    addBulk(jobs: Array<{
        name: string;
        data: T;
        options?: JobOptions;
    }>): Promise<Job<T>[]>;
    process(handler: (job: Job<T>) => Promise<unknown>, options?: {
        concurrency?: number;
    }): void;
    getJob(id: string): Promise<Job<T> | null>;
    removeJob(id: string): Promise<void>;
    pause(): Promise<void>;
    resume(): Promise<void>;
    getStats(): Promise<QueueStats>;
    healthCheck(): Promise<boolean>;
    close(): Promise<void>;
    addRecurring(name: string, data: T, repeat: RepeatOptions, options?: Omit<JobOptions, "repeat">): Promise<Job<T>>;
    getJobs(state: JobState | JobState[], start?: number, end?: number): Promise<Job<T>[]>;
    getFailedJobs(start?: number, end?: number): Promise<Job<T>[]>;
    retryJob(id: string): Promise<void>;
    replayAllFailed(): Promise<number>;
    updateProgress(id: string, progress: number): Promise<void>;
    clean(grace: number, limit: number, state: JobState): Promise<string[]>;
    obliterate(options?: {
        force?: boolean;
    }): Promise<void>;
    on(event: JobEventType, handler: JobEventHandler<T>): void;
    off(event: JobEventType, handler: JobEventHandler<T>): void;
    getName(): string;
    /**
     * Clear all jobs (for testing)
     */
    clear(): void;
    /**
     * Get all jobs regardless of state (for testing)
     */
    getAllJobs(): Job<T>[];
    /**
     * Get pending (waiting) jobs (for testing)
     */
    getPendingJobs(): Job<T>[];
    /**
     * Get number of jobs (for testing)
     */
    get size(): number;
    /**
     * Wait for all jobs to complete (for testing)
     */
    drain(timeout?: number): Promise<void>;
    private hasWaitingJobs;
    private processNext;
    private executeWithTimeout;
    private handleJobFailure;
    private emitEvent;
    private toPublicJob;
}

/**
 * Console Email Adapter
 * Development implementation that logs emails to console instead of sending
 */

declare class ConsoleEmail implements IEmail {
    private sentEmails;
    send(message: EmailMessage): Promise<EmailResult>;
    sendBatch(messages: EmailMessage[]): Promise<EmailResult[]>;
    healthCheck(): Promise<boolean>;
    /**
     * Get all sent emails (for testing)
     */
    getSentEmails(): EmailMessage[];
    /**
     * Clear sent emails (for testing)
     */
    clearSentEmails(): void;
    private formatAddress;
    private formatAddresses;
}

export { type RAGPipeline as $, type RAGConfig as A, type CreateCollectionOptions as B, ConsoleEmail as C, type DeterministicEncryptedField as D, EnvSecrets as E, type RAGCollection as F, type RAGDocument as G, type IngestionOptions as H, type IPlatform as I, type Job as J, type KeyRotationResult as K, type BulkIngestionResult as L, MemoryDatabase as M, NoopMetrics as N, type IngestionResult as O, type PlatformHealthStatus as P, type QueryResult as Q, type RepeatOptions as R, type StorageFile as S, type DocumentStatus as T, type UploadOptions as U, type RAGChunk as V, type RAGSearchQuery as W, type RAGSearchResponse as X, type RAGSearchResult as Y, type ContextAssemblyConfig as Z, type AssembledContext as _, MemoryCache as a, type QueueConfig as a$, type JobResult as a0, type JobContext as a1, type JobEvent as a2, type QueueStats as a3, type BackoffOptions as a4, type MetricTags as a5, type HistogramStats as a6, type TimingStats as a7, type Secret as a8, type SecretMetadata as a9, AIProviderSchema as aA, RAGProviderSchema as aB, DatabaseConfigSchema as aC, CacheConfigSchema as aD, StorageConfigSchema as aE, EmailConfigSchema as aF, QueueConfigSchema as aG, AIConfigSchema as aH, RAGConfigSchema as aI, CryptoConfigSchema as aJ, SecurityConfigSchema as aK, RetryConfigSchema as aL, CircuitBreakerConfigSchema as aM, TimeoutConfigSchema as aN, BulkheadConfigSchema as aO, ResilienceConfigSchema as aP, LoggingConfigSchema as aQ, MetricsConfigSchema as aR, TracingConfigSchema as aS, ObservabilityConfigSchema as aT, MiddlewareConfigSchema as aU, PlatformConfigSchema as aV, type PlatformConfig as aW, type DatabaseConfig as aX, type CacheConfig as aY, type StorageConfig as aZ, type EmailConfig as a_, type GetSecretOptions as aa, type SetSecretOptions as ab, type RotateSecretOptions as ac, type RotationResult as ad, MemoryRAG as ae, ChunkingPresets as af, type ChunkingStrategy as ag, type ChunkingConfig as ah, type SearchMode as ai, type RAGFilter as aj, type RAGPipelineStep as ak, type CryptoKeyStatus as al, type CryptoAlgorithm as am, createPlatformAsync as an, createScopedMetrics as ao, type EmailAddress as ap, type EmailAttachment as aq, calculateBackoff as ar, generateJobId as as, DatabaseProviderSchema as at, CacheProviderSchema as au, StorageProviderSchema as av, EmailProviderSchema as aw, QueueProviderSchema as ax, TracingProviderSchema as ay, LogLevelSchema as az, MemoryStorage as b, type ResilienceConfig as b0, type ObservabilityConfig as b1, type MiddlewareConfig as b2, type CryptoConfig as b3, type SecurityConfig as b4, loadConfig as b5, validateConfig as b6, safeValidateConfig as b7, getDefaultConfig as b8, MemoryEmail as c, MemoryQueue as d, type IDatabase as e, MemorySecrets as f, createPlatform as g, MemoryMetrics as h, type IQueryBuilder as i, type IStorage as j, type IEmail as k, type IQueue as l, type IMetrics as m, type ISecrets as n, type JobOptions as o, type EmailMessage as p, type MetricsSummary as q, type ICrypto as r, type EncryptOptions as s, type EncryptedField as t, type CryptoKeyMetadata as u, type EmailResult as v, type JobState as w, type JobEventType as x, type JobEventHandler as y, type IRAG as z };
