/** * Doppler Config Schema * * Master configuration schema that composes all runtime configs together. * This provides a single unified interface for configuring the entire * Doppler inference engine. * * Individual configs remain importable for subsystems that only need * their specific domain. This master config is for: * - Serializing/restoring full engine state * - Configuration management UIs * - Debugging/logging full config state * * @module config/schema/doppler */ import type { LoadingConfigSchema } from './loading.schema.js'; import type { ExecutionV1PatchSchema, ExecutionV1SessionSchema } from './execution-v1.schema.js'; import type { SharedRuntimeConfigSchema } from './shared-runtime.schema.js'; import type { EmulationConfigSchema } from './emulation.schema.js'; import type { KernelPathSchema } from './kernel-path.schema.js'; export interface LargeWeightConfigSchema { enabled: boolean; safetyRatio: number; preferF16: boolean; lmHeadChunkRows: number | null; gpuResidentOverrides: string[] | null; } export interface RuntimeInferenceConfigSchema { prompt?: string | null; rerank?: { query?: string | null; documents?: string[] | null; } | null; debugTokens?: boolean; batching: Record; sampling: Record; compute: Record; tokenizer: Record; largeWeights: LargeWeightConfigSchema; kvcache: Record; diffusion: Record; diffusionGemma: Record; energy: Record; moe: Record; speculative: Record; generation: Record; chatTemplate: Record; session: Partial; executionPatch: ExecutionV1PatchSchema | Record; kernelPath?: KernelPathSchema | null; kernelPathSource?: 'config' | 'model' | 'manifest' | 'execution-v1' | 'execution-v1-transform' | 'none'; kernelPathPolicy?: Record | null; modelOverrides?: Record | null; pipeline?: Record | null; } /** * Runtime configuration schema. * * Contains all configurable settings that are independent of the model. * These settings control engine behavior regardless of which model is loaded. */ export interface RuntimeConfigSchema { /** Cross-cutting runtime settings shared by loader + inference */ shared: SharedRuntimeConfigSchema; /** OPFS paths, shard cache, memory management */ loading: LoadingConfigSchema; /** Batching, sampling, tokenizer defaults */ inference: RuntimeInferenceConfigSchema; /** NVIDIA superchip emulation settings */ emulation: EmulationConfigSchema; } /** Chat-template defaults (enabled/type/thinking tri-state) */ export interface ChatTemplateDefaultConfigSchema { enabled: boolean | null; type: string | null; thinking: boolean; } /** Default runtime configuration */ export declare const DEFAULT_LARGE_WEIGHT_CONFIG: LargeWeightConfigSchema; export declare const DEFAULT_CHAT_TEMPLATE_CONFIG: ChatTemplateDefaultConfigSchema; export declare const DEFAULT_RUNTIME_CONFIG: RuntimeConfigSchema; /** * Master Doppler configuration schema. * * Combines model-specific configuration resolved from manifest + runtime config * with runtime configuration (engine settings) and platform overrides. */ export interface DopplerConfigSchema { /** Model-specific configuration (reserved, no longer family-registry driven) */ model?: Record; /** Runtime configuration (engine settings) */ runtime: RuntimeConfigSchema; } export interface DopplerConfigOverrides extends Partial> { runtime?: Partial; } /** Default Doppler configuration (no model loaded) */ export declare const DEFAULT_DOPPLER_CONFIG: DopplerConfigSchema; /** * Create a Doppler configuration with optional overrides. * * Merges provided overrides with defaults, performing a deep merge * on nested objects. */ export declare function createDopplerConfig( overrides?: DopplerConfigOverrides ): DopplerConfigSchema;