zignet
Version:
MCP server for Zig — AI-powered code analysis, validation, and documentation with fine-tuned LLM
105 lines • 3.09 kB
text/typescript
//#region src/config.d.ts
/**
* ZigNet Configuration
*
* Centralized configuration management based on environment variables.
* Controls Zig versions for documentation scraping, compilation, and defaults.
* Also manages LLM model settings for ZigNet's intelligent features.
*/
/**
* Supported Zig versions (from ZIG_SUPPORTED env var)
* Default: "0.13.0,0.14.0,0.15.2"
*
* Example:
* export ZIG_SUPPORTED="0.13.0,0.14.0,0.15.2"
*/
declare const SUPPORTED_ZIG_VERSIONS: readonly string[];
type ZigVersion = (typeof SUPPORTED_ZIG_VERSIONS)[number];
/**
* Default Zig version (from ZIG_DEFAULT env var)
* Default: "0.15.2"
*
* Example:
* export ZIG_DEFAULT="0.15.2"
*/
declare const DEFAULT_ZIG_VERSION: ZigVersion;
/**
* Get configuration summary for logging
*/
declare function getConfigSummary(): string;
/**
* Validate a Zig version string
*/
declare function isValidZigVersion(version: string): version is ZigVersion;
/**
* Get Zig version or fallback to default
*/
declare function getZigVersionOrDefault(version?: string): ZigVersion;
/**
* Path to the GGUF model file
* Default: ~/.zignet/models/zignet-qwen-7b-q4km.gguf
*
* Example:
* export ZIGNET_MODEL_PATH="/path/to/custom/model.gguf"
*/
declare const MODEL_PATH: string;
/**
* Auto-download model from HuggingFace if not found
* Default: true
*
* Example:
* export ZIGNET_MODEL_AUTO_DOWNLOAD="false"
*/
declare const MODEL_AUTO_DOWNLOAD: boolean;
/**
* GPU device selection (CUDA_VISIBLE_DEVICES)
* Specify which GPU(s) to use for CUDA inference
* Default: undefined (use all available GPUs)
*
* Examples:
* export ZIGNET_GPU_DEVICE="0" # Use first GPU only (e.g., RTX 4090)
* export ZIGNET_GPU_DEVICE="1" # Use second GPU only
* export ZIGNET_GPU_DEVICE="0,1" # Use first and second GPUs
*
* Note: GPU indices are system-dependent. Use `nvidia-smi` to list available GPUs.
* This sets CUDA_VISIBLE_DEVICES before loading the model.
*/
declare const GPU_DEVICE: string | undefined;
/**
* Number of layers to offload to GPU
* Default: 35 (all layers for RTX 3090)
* Set to 0 for CPU-only inference
*
* Example:
* export ZIGNET_GPU_LAYERS="0" # CPU only
* export ZIGNET_GPU_LAYERS="20" # Partial GPU
* export ZIGNET_GPU_LAYERS="35" # Full GPU (RTX 3090)
*/
declare const GPU_LAYERS: number;
/**
* LLM context size (max tokens)
* Default: 4096
*
* Example:
* export ZIGNET_CONTEXT_SIZE="8192"
*/
declare const CONTEXT_SIZE: number;
/**
* LLM temperature (creativity)
* Default: 0.7
*
* Example:
* export ZIGNET_TEMPERATURE="0.5"
*/
declare const TEMPERATURE: number;
/**
* LLM top-p sampling
* Default: 0.9
*
* Example:
* export ZIGNET_TOP_P="0.8"
*/
declare const TOP_P: number;
//#endregion
export { MODEL_AUTO_DOWNLOAD as a, TEMPERATURE as c, getConfigSummary as d, getZigVersionOrDefault as f, GPU_LAYERS as i, TOP_P as l, DEFAULT_ZIG_VERSION as n, MODEL_PATH as o, isValidZigVersion as p, GPU_DEVICE as r, SUPPORTED_ZIG_VERSIONS as s, CONTEXT_SIZE as t, ZigVersion as u };
//# sourceMappingURL=config-DRCClO4V.d.cts.map