import z from "zod";
import type { Content, UUID } from "../../types";
/**
 * Local metadata type for stored knowledge items.
 * Uses a permissive record type to avoid conflicts between TypeScript and protobuf MemoryMetadata types.
 */
export type StoredKnowledgeMetadata = Record<string, unknown>;
/**
 * Stored knowledge item with content, metadata, and optional similarity score.
 * Used for knowledge retrieval results and internal knowledge processing.
 * This is a local definition to avoid conflicts with the proto KnowledgeItem type.
 */
export interface StoredKnowledgeItem {
    id: UUID;
    content: Content;
    metadata?: StoredKnowledgeMetadata;
    worldId?: UUID;
    similarity?: number;
}
export declare const ModelConfigSchema: z.ZodObject<{
    EMBEDDING_PROVIDER: z.ZodOptional<z.ZodEnum<{
        openai: "openai";
        google: "google";
        local: "local";
    }>>;
    TEXT_PROVIDER: z.ZodOptional<z.ZodEnum<{
        anthropic: "anthropic";
        openai: "openai";
        google: "google";
        openrouter: "openrouter";
    }>>;
    OPENAI_API_KEY: z.ZodOptional<z.ZodString>;
    ANTHROPIC_API_KEY: z.ZodOptional<z.ZodString>;
    OPENROUTER_API_KEY: z.ZodOptional<z.ZodString>;
    GOOGLE_API_KEY: z.ZodOptional<z.ZodString>;
    OPENAI_BASE_URL: z.ZodOptional<z.ZodString>;
    ANTHROPIC_BASE_URL: z.ZodOptional<z.ZodString>;
    OPENROUTER_BASE_URL: z.ZodOptional<z.ZodString>;
    GOOGLE_BASE_URL: z.ZodOptional<z.ZodString>;
    TEXT_EMBEDDING_MODEL: z.ZodString;
    TEXT_MODEL: z.ZodOptional<z.ZodString>;
    MAX_INPUT_TOKENS: z.ZodPipe<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>;
    MAX_OUTPUT_TOKENS: z.ZodPipe<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>, z.ZodTransform<number, string | number | undefined>>;
    EMBEDDING_DIMENSION: z.ZodPipe<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>, z.ZodTransform<number, string | number | undefined>>;
    LOAD_DOCS_ON_STARTUP: z.ZodDefault<z.ZodBoolean>;
    CTX_KNOWLEDGE_ENABLED: z.ZodDefault<z.ZodBoolean>;
    RATE_LIMIT_ENABLED: z.ZodDefault<z.ZodBoolean>;
    MAX_CONCURRENT_REQUESTS: z.ZodPipe<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>, z.ZodTransform<number, string | number | undefined>>;
    REQUESTS_PER_MINUTE: z.ZodPipe<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>, z.ZodTransform<number, string | number | undefined>>;
    TOKENS_PER_MINUTE: z.ZodPipe<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>, z.ZodTransform<number, string | number | undefined>>;
    BATCH_DELAY_MS: z.ZodPipe<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>, z.ZodTransform<number, string | number | undefined>>;
}, z.core.$strip>;
export type ModelConfig = z.infer<typeof ModelConfigSchema>;
export interface ProviderRateLimits {
    maxConcurrentRequests: number;
    requestsPerMinute: number;
    tokensPerMinute?: number;
    provider: string;
    rateLimitEnabled: boolean;
    batchDelayMs: number;
}
export interface TextGenerationOptions {
    provider?: "anthropic" | "openai" | "openrouter" | "google";
    modelName?: string;
    maxTokens?: number;
    cacheDocument?: string;
    cacheOptions?: {
        type: "ephemeral";
    };
    autoCacheContextualRetrieval?: boolean;
}
export interface AddKnowledgeOptions {
    agentId?: UUID;
    worldId: UUID;
    roomId: UUID;
    entityId: UUID;
    clientDocumentId: UUID;
    contentType: string;
    originalFilename: string;
    content: string;
    metadata?: Record<string, unknown>;
}
declare module "../../types/service.ts" {
    interface ServiceTypeRegistry {
        KNOWLEDGE: "knowledge";
    }
}
declare module "@elizaos/core" {
    interface ServiceTypeRegistry {
        KNOWLEDGE: "knowledge";
    }
}
export declare const KnowledgeServiceType: {
    KNOWLEDGE: "knowledge";
};
export interface KnowledgeDocumentMetadata extends Record<string, unknown> {
    type: string;
    source: string;
    title?: string;
    filename?: string;
    fileExt?: string;
    fileType?: string;
    fileSize?: number;
}
export interface KnowledgeConfig {
    CTX_KNOWLEDGE_ENABLED: boolean;
    LOAD_DOCS_ON_STARTUP: boolean;
    MAX_INPUT_TOKENS?: string | number;
    MAX_OUTPUT_TOKENS?: string | number;
    EMBEDDING_PROVIDER?: string;
    TEXT_PROVIDER?: string;
    TEXT_EMBEDDING_MODEL?: string;
    RATE_LIMIT_ENABLED?: boolean;
    MAX_CONCURRENT_REQUESTS?: number;
    REQUESTS_PER_MINUTE?: number;
    TOKENS_PER_MINUTE?: number;
    BATCH_DELAY_MS?: number;
}
export interface LoadResult {
    successful: number;
    failed: number;
    errors?: Array<{
        filename: string;
        error: string;
    }>;
}
export interface ExtendedMemoryMetadata extends Record<string, unknown> {
    type?: string;
    title?: string;
    filename?: string;
    path?: string;
    description?: string;
    fileExt?: string;
    timestamp?: number;
    contentType?: string;
    documentId?: string;
    source?: string;
    fileType?: string;
    fileSize?: number;
    position?: number;
    originalFilename?: string;
    url?: string;
}
//# sourceMappingURL=types.d.ts.map