import { C as Capabilities, B as BaseLLMAdapter, L as LLMProviderConfig, b as LLMCompletionRequest, c as LLMCompletionResponse } from '../base-adapter-BQZiL4zs.cjs'; /** * BitNet Adapter * * Connects to a local bitnet.cpp inference server. * BitNet runs 1-bit quantized models that use ~10x less memory than * standard GGUF models and run faster on CPU — no GPU required. * * Setup (one-time): * git clone --recursive https://github.com/microsoft/BitNet * cd BitNet * pip install -r requirements.txt * python setup_env.py -md microsoft/bitnet-b1.58-2B-4T -q i2_s * * Run the server: * python run_inference.py --serve --port 8080 --host 0.0.0.0 * * The server exposes: POST http://localhost:8080/v1/chat/completions * * Why BitNet over standard GGUF? * - ~500 MB model size vs ~4 GB for Mistral-7B Q4 * - Faster on CPU (1-bit arithmetic, no FP multiply) * - Deployable on Railway, Fly.io, any server without GPU * - See: https://github.com/microsoft/BitNet * * @version 2.0.0 */ type BitNetAdapterConfig = Omit & { apiKey?: string; model?: string; }; declare const BITNET_MODELS: readonly ["microsoft/bitnet-b1.58-2B-4T", "1bitLLM/bitnet_b1_58-large"]; type BitNetModel = (typeof BITNET_MODELS)[number]; /** * Short aliases accepted by bitnet.cpp (maps to full HuggingFace model IDs) */ declare const BITNET_MODEL_ALIASES: Readonly>; /** * Capability manifest — BitNet 1-bit quantized models on local CPU * (~500MB model, no GPU required). Tiny model with limited capabilities; * keep declaration minimal and honest. Brains routing here should expect * the no-frills baseline: text in, text out, $0 marginal cost. * * Exported as a constant so the capability-aware router can read it * without instantiating the adapter — single source of truth per W.GOLD.006. */ declare const BITNET_CAPABILITIES: Capabilities; declare class BitNetAdapter extends BaseLLMAdapter { readonly name: "bitnet"; readonly models: readonly ["microsoft/bitnet-b1.58-2B-4T", "1bitLLM/bitnet_b1_58-large"]; readonly defaultHoloScriptModel: string; readonly capabilities: Capabilities; private readonly localBaseURL; constructor(config?: BitNetAdapterConfig); protected getDefaultModel(): string; /** * Send a chat completion request to the bitnet.cpp server. * Uses the OpenAI-compatible /v1/chat/completions endpoint. */ complete(request: LLMCompletionRequest, model?: string): Promise; /** * Returns the HoloScript-tuned system prompt for BitNet's smaller model context. * Overrides the base class version to use the compact prompt. */ protected getHoloScriptSystemPrompt(): string; /** * Check if the local BitNet server is reachable. * Delegates to BaseLLMAdapter.healthCheckLocalServer — same /health → * /v1/models fallback, branded error with bitnet.cpp setup hint. */ healthCheck(): Promise<{ ok: boolean; latencyMs: number; error?: string; }>; } export { BITNET_CAPABILITIES, BITNET_MODELS, BITNET_MODEL_ALIASES, BitNetAdapter, type BitNetModel };