@bendyline/gezel-inference 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +13 -2
- package/dist/cache/adapter.d.ts +115 -0
- package/dist/cache/adapter.js +23 -0
- package/dist/cache/budget.d.ts +15 -0
- package/dist/cache/budget.js +31 -0
- package/dist/cache/controller.d.ts +205 -0
- package/dist/cache/controller.js +377 -0
- package/dist/catalog/LICENSE +21 -0
- package/dist/catalog/chat-models/bt/btl4-35b-q4/manifest.json +146 -0
- package/dist/catalog/chat-models/bt/btl4-35b-q4/versions/1.0.0/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-35b-q4/versions/1.0.1/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/manifest.json +146 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/versions/1.0.0/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/versions/1.0.1/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/versions/1.0.2/manifest.json +15 -0
- package/dist/catalog/chat-models/de/deepseek-r1-8b-q4/manifest.json +166 -0
- package/dist/catalog/chat-models/de/deepseek-r1-8b-q4/versions/1.1.0/manifest.json +62 -0
- package/dist/catalog/chat-models/de/deepseek-r1-8b-q4/versions/1.1.1/manifest.json +61 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-mxfp4/manifest.json +125 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-mxfp4/versions/1.0.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2/manifest.json +125 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2/versions/1.0.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2/versions/1.1.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2q4/manifest.json +126 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2q4/versions/1.0.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q4/manifest.json +318 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q4/versions/1.0.0/manifest.json +225 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q4/versions/1.1.0/manifest.json +225 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/manifest.json +249 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.0.0/manifest.json +70 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.1.0/manifest.json +72 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.1.2/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.1.3/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.2.0/manifest.json +98 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/manifest.json +228 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.0.0/manifest.json +72 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.0.2/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.0.3/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.1.0/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/manifest.json +220 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.1.0/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.2.0/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.2.1/manifest.json +80 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.2.2/manifest.json +80 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.3.0/manifest.json +81 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/manifest.json +226 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.1.0/manifest.json +80 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.1.1/manifest.json +82 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.2.0/manifest.json +82 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.2.1/manifest.json +95 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.2.2/manifest.json +95 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.3.0/manifest.json +86 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/manifest.json +213 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.1.0/manifest.json +67 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.1.2/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.2.0/manifest.json +71 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.2.1/manifest.json +71 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.3.0/manifest.json +71 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/manifest.json +205 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.1.0/manifest.json +72 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.1.2/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.2.0/manifest.json +76 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.2.1/manifest.json +76 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.3.0/manifest.json +76 -0
- package/dist/catalog/chat-models/gl/glm-5.2-754b-q2/manifest.json +127 -0
- package/dist/catalog/chat-models/gl/glm-5.2-754b-q2/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/manifest.json +140 -0
- package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/versions/1.0.0/manifest.json +23 -0
- package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/versions/1.0.1/manifest.json +26 -0
- package/dist/catalog/chat-models/gp/gpt-oss-120b-q4/manifest.json +247 -0
- package/dist/catalog/chat-models/gp/gpt-oss-120b-q4/versions/1.0.0/manifest.json +137 -0
- package/dist/catalog/chat-models/gp/gpt-oss-120b-q4/versions/1.1.0/manifest.json +135 -0
- package/dist/catalog/chat-models/gp/gpt-oss-20b-q4/manifest.json +195 -0
- package/dist/catalog/chat-models/gp/gpt-oss-20b-q4/versions/1.1.0/manifest.json +72 -0
- package/dist/catalog/chat-models/gp/gpt-oss-20b-q4/versions/1.1.1/manifest.json +71 -0
- package/dist/catalog/chat-models/gr/granite4.2-30b-q4/manifest.json +200 -0
- package/dist/catalog/chat-models/gr/granite4.2-30b-q4/versions/1.0.0/manifest.json +72 -0
- package/dist/catalog/chat-models/gr/granite4.2-3b-q4/manifest.json +196 -0
- package/dist/catalog/chat-models/gr/granite4.2-3b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/gr/granite4.2-8b-q4/manifest.json +189 -0
- package/dist/catalog/chat-models/gr/granite4.2-8b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/index.json +1 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/manifest.json +235 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.0/manifest.json +124 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.1/manifest.json +124 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.2/manifest.json +123 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q6/manifest.json +257 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q6/versions/1.0.0/manifest.json +145 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q6/versions/1.0.1/manifest.json +145 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/manifest.json +285 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.0/manifest.json +174 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.1/manifest.json +174 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.2/manifest.json +173 -0
- package/dist/catalog/chat-models/lf/lfm2.5-2.6b-q4/manifest.json +162 -0
- package/dist/catalog/chat-models/lf/lfm2.5-2.6b-q4/versions/1.0.0/manifest.json +59 -0
- package/dist/catalog/chat-models/lf/lfm2.5-2.6b-q4/versions/1.0.1/manifest.json +58 -0
- package/dist/catalog/chat-models/ll/llama3.2-3b-q4/manifest.json +134 -0
- package/dist/catalog/chat-models/ll/llama3.2-3b-q4/versions/1.1.0/manifest.json +57 -0
- package/dist/catalog/chat-models/ll/llama3.2-3b-q4/versions/1.1.1/manifest.json +56 -0
- package/dist/catalog/chat-models/mi/minicpm5-1b-q4/manifest.json +156 -0
- package/dist/catalog/chat-models/mi/minicpm5-1b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/mi/minicpm5-2b-q4/manifest.json +161 -0
- package/dist/catalog/chat-models/mi/minicpm5-2b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/mi/mistral-7b-q4/manifest.json +159 -0
- package/dist/catalog/chat-models/mi/mistral-7b-q4/versions/1.1.0/manifest.json +62 -0
- package/dist/catalog/chat-models/mi/mistral-7b-q4/versions/1.1.1/manifest.json +61 -0
- package/dist/catalog/chat-models/mi/mistral-medium-3.5-128b-q4/manifest.json +275 -0
- package/dist/catalog/chat-models/mi/mistral-medium-3.5-128b-q4/versions/1.0.0/manifest.json +154 -0
- package/dist/catalog/chat-models/mi/mistral-medium-3.5-128b-q4/versions/1.0.1/manifest.json +153 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/manifest.json +135 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.1/manifest.json +20 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.2/manifest.json +20 -0
- package/dist/catalog/chat-models/na/nanbeige4.2-3b-q4/manifest.json +138 -0
- package/dist/catalog/chat-models/na/nanbeige4.2-3b-q4/versions/1.0.0/manifest.json +14 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/manifest.json +212 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/versions/1.0.0/manifest.json +94 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/versions/1.0.1/manifest.json +94 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/versions/1.0.2/manifest.json +93 -0
- package/dist/catalog/chat-models/ne/nemotron3-super-120b-q4/manifest.json +135 -0
- package/dist/catalog/chat-models/ne/nemotron3-super-120b-q4/versions/1.0.0/manifest.json +30 -0
- package/dist/catalog/chat-models/ne/nemotron3-super-120b-q4/versions/1.0.1/manifest.json +30 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q4/manifest.json +192 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q4/versions/1.0.0/manifest.json +74 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q4/versions/1.0.1/manifest.json +73 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q8/manifest.json +207 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q8/versions/1.0.0/manifest.json +89 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q8/versions/1.0.1/manifest.json +88 -0
- package/dist/catalog/chat-models/or/ornith-35b-q4/manifest.json +224 -0
- package/dist/catalog/chat-models/or/ornith-35b-q4/versions/1.0.0/manifest.json +94 -0
- package/dist/catalog/chat-models/or/ornith-35b-q4/versions/1.0.1/manifest.json +93 -0
- package/dist/catalog/chat-models/or/ornith-35b-q8/manifest.json +244 -0
- package/dist/catalog/chat-models/or/ornith-35b-q8/versions/1.0.0/manifest.json +114 -0
- package/dist/catalog/chat-models/or/ornith-35b-q8/versions/1.0.1/manifest.json +113 -0
- package/dist/catalog/chat-models/or/ornith-9b-q4/manifest.json +215 -0
- package/dist/catalog/chat-models/or/ornith-9b-q4/versions/1.0.0/manifest.json +84 -0
- package/dist/catalog/chat-models/or/ornith-9b-q4/versions/1.0.1/manifest.json +83 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q4/manifest.json +208 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q4/versions/1.0.0/manifest.json +74 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q8/manifest.json +223 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q8/versions/1.0.0/manifest.json +89 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q4/manifest.json +187 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q4/versions/1.0.0/manifest.json +53 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q4/versions/1.0.1/manifest.json +77 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q8/manifest.json +192 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q8/versions/1.0.0/manifest.json +58 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q8/versions/1.0.1/manifest.json +82 -0
- package/dist/catalog/chat-models/qw/qwen3.5-0.8b-q4/manifest.json +192 -0
- package/dist/catalog/chat-models/qw/qwen3.5-0.8b-q4/versions/1.0.0/manifest.json +75 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/manifest.json +315 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.0/manifest.json +164 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.1/manifest.json +164 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.2/manifest.json +164 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.3/manifest.json +163 -0
- package/dist/catalog/chat-models/qw/qwen3.5-27b-q4/manifest.json +217 -0
- package/dist/catalog/chat-models/qw/qwen3.5-27b-q4/versions/1.0.0/manifest.json +90 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/manifest.json +194 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/versions/1.1.0/manifest.json +77 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/versions/1.1.2/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/versions/1.1.3/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/manifest.json +188 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/versions/1.1.0/manifest.json +77 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/versions/1.1.2/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/versions/1.1.3/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/manifest.json +205 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/versions/1.1.0/manifest.json +82 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/versions/1.1.2/manifest.json +81 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/versions/1.1.3/manifest.json +81 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/manifest.json +230 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.0/manifest.json +92 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.4/manifest.json +91 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.5/manifest.json +91 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.6/manifest.json +115 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/manifest.json +240 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.0/manifest.json +102 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.2/manifest.json +103 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.3/manifest.json +103 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.4/manifest.json +127 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/manifest.json +233 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.0/manifest.json +92 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.1/manifest.json +93 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.2/manifest.json +93 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.3/manifest.json +117 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/manifest.json +252 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.0/manifest.json +112 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.1/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.2/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.3/manifest.json +137 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-iq1-s/manifest.json +195 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-iq1-s/versions/1.0.0/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q2/manifest.json +194 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q2/versions/1.0.0/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q3/manifest.json +194 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q3/versions/1.0.0/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q3/versions/1.0.1/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/manifest.json +291 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.1/manifest.json +93 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.2/manifest.json +92 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.3/manifest.json +116 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.4/manifest.json +116 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.5/manifest.json +116 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/manifest.json +278 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.1/manifest.json +104 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.2/manifest.json +103 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.3/manifest.json +127 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/manifest.json +278 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/versions/1.0.0/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/versions/1.0.1/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/versions/1.0.2/manifest.json +137 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq3/manifest.json +221 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq3/versions/1.0.0/manifest.json +36 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/manifest.json +429 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.0.0/manifest.json +36 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.1.0/manifest.json +205 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.1.1/manifest.json +244 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/manifest.json +203 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.0/manifest.json +21 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.1/manifest.json +31 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.2/manifest.json +30 -0
- package/dist/catalog/chat-models/raw-index.json +1 -0
- package/dist/catalog/chat-models/ta/talkie-1930-13b-q4/manifest.json +79 -0
- package/dist/catalog/chat-models/ta/talkie-1930-13b-q4/versions/1.0.0/manifest.json +15 -0
- package/dist/catalog/chat-models/ta/talkie-1930-13b-q4/versions/1.0.1/manifest.json +15 -0
- package/dist/catalog/chat-models/te/ternary-bonsai-27b-q2/manifest.json +204 -0
- package/dist/catalog/chat-models/te/ternary-bonsai-27b-q2/versions/1.0.0/manifest.json +70 -0
- package/dist/catalog/chat-models/te/ternary-bonsai-27b-q2/versions/1.0.1/manifest.json +70 -0
- package/dist/catalog/chat-models/un/underdog-saluki-27b-iq2-mix/manifest.json +164 -0
- package/dist/catalog/chat-models/un/underdog-saluki-27b-iq2-mix/versions/1.0.0/manifest.json +14 -0
- package/dist/catalog/knowledge-catalogs/be/bendyline-how-to-books/manifest.json +26 -0
- package/dist/catalog/knowledge-catalogs/be/bendyline-how-to-books/versions/2026.10.8/manifest.json +8950 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-alaska-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-alaska-part-0001/versions/2026.10.1/manifest.json +658 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-nevada-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-nevada-part-0001/versions/2026.10.1/manifest.json +666 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-300-399-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-300-399-part-0001/versions/2026.10.2/manifest.json +182 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-347-349/manifest.json +25 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-347-349/versions/2026.10.5/manifest.json +38 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0001/versions/2026.10.1/manifest.json +558 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0002/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0002/versions/2026.10.1/manifest.json +258 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0001/versions/2026.10.1/manifest.json +318 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0002/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0002/versions/2026.10.1/manifest.json +266 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0003/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0003/versions/2026.10.1/manifest.json +186 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0004/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0004/versions/2026.10.1/manifest.json +138 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0005/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0005/versions/2026.10.1/manifest.json +138 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-wyoming-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-wyoming-part-0001/versions/2026.10.3/manifest.json +626 -0
- package/dist/catalog/knowledge-catalogs/index.json +1 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-aspnet-core-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-aspnet-core-en/versions/2026.10.16/manifest.json +18270 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-ai-platform-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-ai-platform-en/versions/2026.10.16/manifest.json +1098 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-apps-compute-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-apps-compute-en/versions/2026.10.16/manifest.json +722 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-data-aiot-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-data-aiot-en/versions/2026.10.16/manifest.json +530 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-management-hybrid-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-management-hybrid-en/versions/2026.10.16/manifest.json +602 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-network-security-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-network-security-en/versions/2026.10.16/manifest.json +250 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-dotnet-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-dotnet-en/versions/2026.10.16/manifest.json +16794 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-entity-framework-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-entity-framework-en/versions/2026.10.16/manifest.json +1106 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-microsoft-365-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-microsoft-365-en/versions/2026.10.16/manifest.json +234 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-powershell-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-powershell-en/versions/2026.10.16/manifest.json +522 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-sql-server-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-sql-server-en/versions/2026.10.16/manifest.json +1850 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-apps-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-apps-en/versions/2026.10.16/manifest.json +1734 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-server-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-server-en/versions/2026.10.16/manifest.json +774 -0
- package/dist/catalog/knowledge-catalogs/raw-index.json +1 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/manifest.json +28 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.4.2/manifest.json +53 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.4.3/manifest.json +885 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.4.5/manifest.json +157 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/manifest.json +32 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.4.2/manifest.json +69 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.4.3/manifest.json +741 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.4.5/manifest.json +173 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/manifest.json +69 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/versions/2026.4.4/manifest.json +217 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/versions/2026.4.5/manifest.json +217 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/versions/2026.4.4/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.4.3/manifest.json +925 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/manifest.json +28 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.4.2/manifest.json +53 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.4.3/manifest.json +1665 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.4.5/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.4.3/manifest.json +1233 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.4.5/manifest.json +141 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.4.3/manifest.json +493 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/manifest.json +63 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/versions/2026.4.4/manifest.json +193 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/versions/2026.4.5/manifest.json +193 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/manifest.json +30 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.4.2/manifest.json +61 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.4.3/manifest.json +665 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.4.5/manifest.json +177 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.4.3/manifest.json +745 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/manifest.json +62 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/versions/2026.4.4/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/versions/2026.4.5/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/versions/2026.4.4/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/manifest.json +30 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.4.2/manifest.json +61 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.4.3/manifest.json +1253 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.4.5/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.4.3/manifest.json +1957 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/manifest.json +63 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/versions/2026.4.5/manifest.json +193 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/manifest.json +45 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/versions/2026.4.4/manifest.json +121 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/versions/2026.4.5/manifest.json +173 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/manifest.json +62 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/versions/2026.4.4/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/versions/2026.4.5/manifest.json +189 -0
- package/dist/catalog/provenance.json +8 -0
- package/dist/chat/catalog-model-lookup.d.ts +21 -0
- package/dist/chat/catalog-model-lookup.js +48 -0
- package/dist/chat/local-model-tier.d.ts +1 -0
- package/dist/chat/local-model-tier.js +2 -0
- package/dist/chat/vision-capability.d.ts +1 -0
- package/dist/chat/vision-capability.js +3 -0
- package/dist/engine-components.d.ts +30 -0
- package/dist/engine-components.js +144 -0
- package/dist/engines/electron-native-reuse.d.ts +65 -0
- package/dist/engines/electron-native-reuse.js +305 -0
- package/dist/engines/native-file-manifest.json +1320 -0
- package/dist/engines/native-manifest.d.ts +70 -0
- package/dist/engines/native-manifest.js +98 -0
- package/dist/engines/registry.d.ts +88 -0
- package/dist/engines/registry.js +217 -0
- package/dist/engines/resolver.d.ts +121 -0
- package/dist/engines/resolver.js +894 -0
- package/dist/engines/signature.d.ts +85 -0
- package/dist/engines/signature.js +231 -0
- package/dist/fs/atomic.d.ts +53 -0
- package/dist/fs/atomic.js +202 -0
- package/dist/fs/config-store.d.ts +14 -0
- package/dist/fs/config-store.js +101 -0
- package/dist/fs/home-permissions.d.ts +18 -0
- package/dist/fs/home-permissions.js +27 -0
- package/dist/fs/safe-paths.d.ts +107 -0
- package/dist/fs/safe-paths.js +264 -0
- package/dist/fs/security-json.d.ts +13 -0
- package/dist/fs/security-json.js +67 -0
- package/dist/http/auth-context.d.ts +23 -0
- package/dist/http/auth-context.js +1 -0
- package/dist/http/engine-runtime-context.d.ts +30 -0
- package/dist/http/engine-runtime-context.js +1 -0
- package/dist/http/external-conversation-contract.d.ts +49 -0
- package/dist/http/external-conversation-contract.js +1 -0
- package/dist/http/external-conversation-headers.d.ts +11 -0
- package/dist/http/external-conversation-headers.js +11 -0
- package/dist/http/inference-context.d.ts +36 -0
- package/dist/http/inference-context.js +1 -0
- package/dist/http/model-inventory-cache.d.ts +8 -0
- package/dist/http/model-inventory-cache.js +8 -0
- package/dist/http/openai-compat/action-ledger.d.ts +15 -0
- package/dist/http/openai-compat/action-ledger.js +119 -0
- package/dist/http/openai-compat/apple-model.d.ts +3 -0
- package/dist/http/openai-compat/apple-model.js +44 -0
- package/dist/http/openai-compat/caller-owned-profile.d.ts +7 -0
- package/dist/http/openai-compat/caller-owned-profile.js +18 -0
- package/dist/http/openai-compat/chat-progress.d.ts +9 -0
- package/dist/http/openai-compat/chat-progress.js +69 -0
- package/dist/http/openai-compat/chat-target.d.ts +76 -0
- package/dist/http/openai-compat/chat-target.js +97 -0
- package/dist/http/openai-compat/embeddings.d.ts +37 -0
- package/dist/http/openai-compat/embeddings.js +86 -0
- package/dist/http/openai-compat/request-tuning.d.ts +35 -0
- package/dist/http/openai-compat/request-tuning.js +87 -0
- package/dist/http/openai-compat/responses-streaming.d.ts +351 -0
- package/dist/http/openai-compat/responses-streaming.js +717 -0
- package/dist/http/openai-compat/responses-translate.d.ts +215 -0
- package/dist/http/openai-compat/responses-translate.js +377 -0
- package/dist/http/openai-compat/streaming-telemetry.d.ts +30 -0
- package/dist/http/openai-compat/streaming-telemetry.js +88 -0
- package/dist/http/openai-compat/streaming.d.ts +141 -0
- package/dist/http/openai-compat/streaming.js +687 -0
- package/dist/http/openai-compat/tool-call-stream-filter.d.ts +33 -0
- package/dist/http/openai-compat/tool-call-stream-filter.js +110 -0
- package/dist/http/openai-compat/translate.d.ts +254 -0
- package/dist/http/openai-compat/translate.js +485 -0
- package/dist/http/routes/engines.d.ts +13 -0
- package/dist/http/routes/engines.js +366 -0
- package/dist/http/routes/machine-engine-proxy.d.ts +26 -0
- package/dist/http/routes/machine-engine-proxy.js +43 -0
- package/dist/http/routes/model-bundles.d.ts +4 -0
- package/dist/http/routes/model-bundles.js +190 -0
- package/dist/http/routes/v1-chat.d.ts +72 -0
- package/dist/http/routes/v1-chat.js +645 -0
- package/dist/http/routes/v1-embeddings.d.ts +3 -0
- package/dist/http/routes/v1-embeddings.js +82 -0
- package/dist/http/routes/v1-knowledge.d.ts +4 -0
- package/dist/http/routes/v1-knowledge.js +304 -0
- package/dist/http/routes/v1-models-ensure.d.ts +32 -0
- package/dist/http/routes/v1-models-ensure.js +122 -0
- package/dist/http/routes/v1-models.d.ts +8 -0
- package/dist/http/routes/v1-models.js +189 -0
- package/dist/http/routes/v1-responses.d.ts +20 -0
- package/dist/http/routes/v1-responses.js +327 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/inference-service.d.ts +28 -0
- package/dist/inference-service.js +275 -0
- package/dist/knowledge/admission.d.ts +3 -0
- package/dist/knowledge/admission.js +22 -0
- package/dist/knowledge/bundled-catalog.d.ts +2 -0
- package/dist/knowledge/bundled-catalog.js +2 -0
- package/dist/knowledge/catalog-host.d.ts +103 -0
- package/dist/knowledge/catalog-host.js +180 -0
- package/dist/knowledge/catalog-source.d.ts +22 -0
- package/dist/knowledge/catalog-source.js +35 -0
- package/dist/knowledge/install.d.ts +55 -0
- package/dist/knowledge/install.js +274 -0
- package/dist/knowledge/manager.d.ts +287 -0
- package/dist/knowledge/manager.js +1540 -0
- package/dist/knowledge/registry.d.ts +35 -0
- package/dist/knowledge/registry.js +123 -0
- package/dist/knowledge/search-worker.d.ts +17 -0
- package/dist/knowledge/search-worker.js +36 -0
- package/dist/knowledge/shared-install-contract.d.ts +19 -0
- package/dist/knowledge/shared-install-contract.js +1 -0
- package/dist/knowledge/spatial-query.d.ts +11 -0
- package/dist/knowledge/spatial-query.js +33 -0
- package/dist/knowledge/trust-anchors.d.ts +11 -0
- package/dist/knowledge/trust-anchors.js +51 -0
- package/dist/knowledge/vector-floors.d.ts +44 -0
- package/dist/knowledge/vector-floors.js +92 -0
- package/dist/knowledge/worker-host.d.ts +9 -0
- package/dist/knowledge/worker-host.js +179 -0
- package/dist/kokoro-lexicon/LICENSE +202 -0
- package/dist/kokoro-lexicon/lexicon-gb-en.txt.gz +0 -0
- package/dist/kokoro-lexicon/lexicon-us-en.txt.gz +0 -0
- package/dist/kokoro-lexicon/manifest.json +23 -0
- package/dist/machine-engine/inspect-runtime.d.ts +3 -0
- package/dist/machine-engine/inspect-runtime.js +48 -0
- package/dist/machine-engine/knowledge-assets.d.ts +79 -0
- package/dist/machine-engine/knowledge-assets.js +505 -0
- package/dist/memory/embed-core.d.ts +131 -0
- package/dist/memory/embed-core.js +398 -0
- package/dist/memory/embed-worker.d.ts +23 -0
- package/dist/memory/embed-worker.js +49 -0
- package/dist/memory/embeddings.d.ts +105 -0
- package/dist/memory/embeddings.js +467 -0
- package/dist/model-profile/behaviors/tools-mlx-template-fix.d.ts +1 -0
- package/dist/model-profile/behaviors/tools-mlx-template-fix.js +2 -0
- package/dist/model-profile/behaviors/turn-ramble-detection.d.ts +1 -0
- package/dist/model-profile/behaviors/turn-ramble-detection.js +2 -0
- package/dist/model-profile/defaults.d.ts +1 -0
- package/dist/model-profile/defaults.js +2 -0
- package/dist/model-profile/index.d.ts +9 -0
- package/dist/model-profile/index.js +7 -0
- package/dist/model-profile/registry.d.ts +15 -0
- package/dist/model-profile/registry.js +18 -0
- package/dist/model-profile/runtime.d.ts +48 -0
- package/dist/model-profile/runtime.js +131 -0
- package/dist/model-profile/tool-grammar.d.ts +1 -0
- package/dist/model-profile/tool-grammar.js +2 -0
- package/dist/model-profile/tuning.d.ts +19 -0
- package/dist/model-profile/tuning.js +21 -0
- package/dist/model-profile/types.d.ts +1 -0
- package/dist/model-profile/types.js +2 -0
- package/dist/models/bundle-storage.d.ts +28 -0
- package/dist/models/bundle-storage.js +80 -0
- package/dist/models/catalog-drift.d.ts +48 -0
- package/dist/models/catalog-drift.js +94 -0
- package/dist/models/catalog-payload-identity.d.ts +107 -0
- package/dist/models/catalog-payload-identity.js +254 -0
- package/dist/models/ensure.d.ts +125 -0
- package/dist/models/ensure.js +205 -0
- package/dist/models/gezmodel.d.ts +47 -0
- package/dist/models/gezmodel.js +742 -0
- package/dist/models/install-registry.d.ts +101 -0
- package/dist/models/install-registry.js +216 -0
- package/dist/models/model-id.d.ts +22 -0
- package/dist/models/model-id.js +40 -0
- package/dist/models/storage-roots.d.ts +274 -0
- package/dist/models/storage-roots.js +865 -0
- package/dist/native-release-entry.d.ts +16 -0
- package/dist/native-release-entry.js +16 -0
- package/dist/perf/redact-path.d.ts +2 -0
- package/dist/perf/redact-path.js +27 -0
- package/dist/perf/responsiveness.d.ts +70 -0
- package/dist/perf/responsiveness.js +560 -0
- package/dist/providers/active-install-message.d.ts +42 -0
- package/dist/providers/active-install-message.js +49 -0
- package/dist/providers/apple-foundation-models/binary.d.ts +4 -0
- package/dist/providers/apple-foundation-models/binary.js +18 -0
- package/dist/providers/apple-foundation-models/helper.d.ts +66 -0
- package/dist/providers/apple-foundation-models/helper.js +262 -0
- package/dist/providers/apple-foundation-models/provider.d.ts +82 -0
- package/dist/providers/apple-foundation-models/provider.js +389 -0
- package/dist/providers/apple-foundation-models/status.d.ts +9 -0
- package/dist/providers/apple-foundation-models/status.js +49 -0
- package/dist/providers/audio/kokoro-frontend.d.ts +50 -0
- package/dist/providers/audio/kokoro-frontend.js +113 -0
- package/dist/providers/audio/managed-speech-model.d.ts +9 -0
- package/dist/providers/audio/managed-speech-model.js +86 -0
- package/dist/providers/audio/types.d.ts +202 -0
- package/dist/providers/audio/types.js +17 -0
- package/dist/providers/audio/whisper-cpp.d.ts +99 -0
- package/dist/providers/audio/whisper-cpp.js +420 -0
- package/dist/providers/audio-persister-contract.d.ts +13 -0
- package/dist/providers/audio-persister-contract.js +1 -0
- package/dist/providers/catalog-model-config.d.ts +63 -0
- package/dist/providers/catalog-model-config.js +95 -0
- package/dist/providers/code-block-salvage.d.ts +1 -0
- package/dist/providers/code-block-salvage.js +2 -0
- package/dist/providers/codex-cli/reasoning.d.ts +8 -0
- package/dist/providers/codex-cli/reasoning.js +17 -0
- package/dist/providers/complete-tool-call.d.ts +16 -0
- package/dist/providers/complete-tool-call.js +25 -0
- package/dist/providers/constrained-turn.d.ts +1 -0
- package/dist/providers/constrained-turn.js +2 -0
- package/dist/providers/deliverable-read-pacing.d.ts +1 -0
- package/dist/providers/deliverable-read-pacing.js +2 -0
- package/dist/providers/direct-file-work-prompt.d.ts +1 -0
- package/dist/providers/direct-file-work-prompt.js +2 -0
- package/dist/providers/ds4/build-provider.d.ts +100 -0
- package/dist/providers/ds4/build-provider.js +539 -0
- package/dist/providers/ds4/cache-adapter.d.ts +42 -0
- package/dist/providers/ds4/cache-adapter.js +110 -0
- package/dist/providers/ds4/dspark.d.ts +83 -0
- package/dist/providers/ds4/dspark.js +107 -0
- package/dist/providers/ds4/mtp.d.ts +32 -0
- package/dist/providers/ds4/mtp.js +46 -0
- package/dist/providers/ds4/provider.d.ts +67 -0
- package/dist/providers/ds4/provider.js +104 -0
- package/dist/providers/ds4/residency.d.ts +143 -0
- package/dist/providers/ds4/residency.js +139 -0
- package/dist/providers/ds4/stdout-parser.d.ts +47 -0
- package/dist/providers/ds4/stdout-parser.js +134 -0
- package/dist/providers/duplicate-tool-calls.d.ts +1 -0
- package/dist/providers/duplicate-tool-calls.js +2 -0
- package/dist/providers/file-repair-policy.d.ts +1 -0
- package/dist/providers/file-repair-policy.js +2 -0
- package/dist/providers/gpu-arbiter.d.ts +159 -0
- package/dist/providers/gpu-arbiter.js +301 -0
- package/dist/providers/image-persister-contract.d.ts +15 -0
- package/dist/providers/image-persister-contract.js +1 -0
- package/dist/providers/llama-cpp/build-metadata.d.ts +13 -0
- package/dist/providers/llama-cpp/build-metadata.js +39 -0
- package/dist/providers/llama-cpp/build-provider.d.ts +66 -0
- package/dist/providers/llama-cpp/build-provider.js +1491 -0
- package/dist/providers/llama-cpp/cache-adapter.d.ts +242 -0
- package/dist/providers/llama-cpp/cache-adapter.js +689 -0
- package/dist/providers/llama-cpp/devices.d.ts +130 -0
- package/dist/providers/llama-cpp/devices.js +256 -0
- package/dist/providers/llama-cpp/disk-cache.d.ts +8 -0
- package/dist/providers/llama-cpp/disk-cache.js +112 -0
- package/dist/providers/llama-cpp/engine-flags.d.ts +181 -0
- package/dist/providers/llama-cpp/engine-flags.js +279 -0
- package/dist/providers/llama-cpp/gguf-metadata-async.d.ts +11 -0
- package/dist/providers/llama-cpp/gguf-metadata-async.js +180 -0
- package/dist/providers/llama-cpp/gguf-metadata-worker.d.ts +7 -0
- package/dist/providers/llama-cpp/gguf-metadata-worker.js +27 -0
- package/dist/providers/llama-cpp/gguf-metadata.d.ts +198 -0
- package/dist/providers/llama-cpp/gguf-metadata.js +615 -0
- package/dist/providers/llama-cpp/gguf-quantization-backfill.d.ts +32 -0
- package/dist/providers/llama-cpp/gguf-quantization-backfill.js +75 -0
- package/dist/providers/llama-cpp/index.d.ts +10 -0
- package/dist/providers/llama-cpp/index.js +13 -0
- package/dist/providers/llama-cpp/kv-cache-type.d.ts +118 -0
- package/dist/providers/llama-cpp/kv-cache-type.js +140 -0
- package/dist/providers/llama-cpp/log.d.ts +92 -0
- package/dist/providers/llama-cpp/log.js +280 -0
- package/dist/providers/llama-cpp/models.d.ts +389 -0
- package/dist/providers/llama-cpp/models.js +1011 -0
- package/dist/providers/llama-cpp/offload-planner.d.ts +339 -0
- package/dist/providers/llama-cpp/offload-planner.js +524 -0
- package/dist/providers/llama-cpp/provider.d.ts +493 -0
- package/dist/providers/llama-cpp/provider.js +862 -0
- package/dist/providers/llama-cpp/reasoning-launch.d.ts +7 -0
- package/dist/providers/llama-cpp/reasoning-launch.js +14 -0
- package/dist/providers/llama-cpp/spec-draft.d.ts +44 -0
- package/dist/providers/llama-cpp/spec-draft.js +44 -0
- package/dist/providers/llama-cpp/stdout-parser.d.ts +70 -0
- package/dist/providers/llama-cpp/stdout-parser.js +197 -0
- package/dist/providers/local-tool-call-salvage.d.ts +1 -0
- package/dist/providers/local-tool-call-salvage.js +2 -0
- package/dist/providers/local-turn-policy.d.ts +1 -0
- package/dist/providers/local-turn-policy.js +2 -0
- package/dist/providers/mlx/async-file-handoff.d.ts +11 -0
- package/dist/providers/mlx/async-file-handoff.js +25 -0
- package/dist/providers/mlx/build-provider.d.ts +65 -0
- package/dist/providers/mlx/build-provider.js +717 -0
- package/dist/providers/mlx/cache-adapter.d.ts +161 -0
- package/dist/providers/mlx/cache-adapter.js +445 -0
- package/dist/providers/mlx/chat-protocol.d.ts +48 -0
- package/dist/providers/mlx/chat-protocol.js +8 -0
- package/dist/providers/mlx/config-parser.d.ts +29 -0
- package/dist/providers/mlx/config-parser.js +81 -0
- package/dist/providers/mlx/engine-gate.d.ts +51 -0
- package/dist/providers/mlx/engine-gate.js +207 -0
- package/dist/providers/mlx/engine-hold.d.ts +41 -0
- package/dist/providers/mlx/engine-hold.js +59 -0
- package/dist/providers/mlx/engine-log-router.d.ts +84 -0
- package/dist/providers/mlx/engine-log-router.js +137 -0
- package/dist/providers/mlx/engine-stats-sampler.d.ts +36 -0
- package/dist/providers/mlx/engine-stats-sampler.js +59 -0
- package/dist/providers/mlx/index.d.ts +10 -0
- package/dist/providers/mlx/index.js +10 -0
- package/dist/providers/mlx/log.d.ts +55 -0
- package/dist/providers/mlx/log.js +157 -0
- package/dist/providers/mlx/model-geometry.d.ts +35 -0
- package/dist/providers/mlx/model-geometry.js +118 -0
- package/dist/providers/mlx/models.d.ts +289 -0
- package/dist/providers/mlx/models.js +1079 -0
- package/dist/providers/mlx/provider.d.ts +404 -0
- package/dist/providers/mlx/provider.js +3017 -0
- package/dist/providers/mlx/python/cache_persist.py +348 -0
- package/dist/providers/mlx/python/cache_seed.py +402 -0
- package/dist/providers/mlx/python/gezel_mlx_server.py +4491 -0
- package/dist/providers/mlx/python/lfm2_compat.py +55 -0
- package/dist/providers/mlx/python/qwen3_5_text_compat.py +60 -0
- package/dist/providers/mlx/python/qwen4_ple.py +159 -0
- package/dist/providers/mlx/python/spec_decode.py +775 -0
- package/dist/providers/mlx/python/template_stability.py +133 -0
- package/dist/providers/mlx/python/think_budget.py +113 -0
- package/dist/providers/mlx/python/tool_args_json.py +297 -0
- package/dist/providers/mlx/python/tool_call_stream.py +265 -0
- package/dist/providers/mlx/python/tool_grammar.py +794 -0
- package/dist/providers/mlx/python/vision_inputs.py +64 -0
- package/dist/providers/mlx/python/wave_policy.py +147 -0
- package/dist/providers/mlx/reasoning-stream.d.ts +85 -0
- package/dist/providers/mlx/reasoning-stream.js +196 -0
- package/dist/providers/mlx/request-shape.d.ts +34 -0
- package/dist/providers/mlx/request-shape.js +42 -0
- package/dist/providers/mlx/runtime-diagnostics.d.ts +29 -0
- package/dist/providers/mlx/runtime-diagnostics.js +162 -0
- package/dist/providers/mlx/spec-drafter.d.ts +25 -0
- package/dist/providers/mlx/spec-drafter.js +73 -0
- package/dist/providers/mlx/stdout-parser.d.ts +60 -0
- package/dist/providers/mlx/stdout-parser.js +254 -0
- package/dist/providers/mlx/textual-tool-call-salvage.d.ts +46 -0
- package/dist/providers/mlx/textual-tool-call-salvage.js +396 -0
- package/dist/providers/mlx/tool-call-protocol.d.ts +65 -0
- package/dist/providers/mlx/tool-call-protocol.js +140 -0
- package/dist/providers/mlx/tool-call-stripper.d.ts +68 -0
- package/dist/providers/mlx/tool-call-stripper.js +153 -0
- package/dist/providers/mlx/tool-image-retention.d.ts +23 -0
- package/dist/providers/mlx/tool-image-retention.js +43 -0
- package/dist/providers/mlx/turn-telemetry.d.ts +22 -0
- package/dist/providers/mlx/turn-telemetry.js +45 -0
- package/dist/providers/mlx/venv.d.ts +91 -0
- package/dist/providers/mlx/venv.js +111 -0
- package/dist/providers/mlx/vision-mode.d.ts +92 -0
- package/dist/providers/mlx/vision-mode.js +187 -0
- package/dist/providers/mlx/vision.d.ts +2 -0
- package/dist/providers/mlx/vision.js +12 -0
- package/dist/providers/mlx/wire-transcript.d.ts +14 -0
- package/dist/providers/mlx/wire-transcript.js +43 -0
- package/dist/providers/native/capacity-broker.d.ts +812 -0
- package/dist/providers/native/capacity-broker.js +1058 -0
- package/dist/providers/native/capacity-budget.d.ts +133 -0
- package/dist/providers/native/capacity-budget.js +265 -0
- package/dist/providers/native/device-capacity-ledger.d.ts +31 -0
- package/dist/providers/native/device-capacity-ledger.js +196 -0
- package/dist/providers/native/device-capacity.d.ts +84 -0
- package/dist/providers/native/device-capacity.js +431 -0
- package/dist/providers/native/engine-api-key.d.ts +57 -0
- package/dist/providers/native/engine-api-key.js +72 -0
- package/dist/providers/native/engine-key.d.ts +18 -0
- package/dist/providers/native/engine-key.js +41 -0
- package/dist/providers/native/engine-router.d.ts +145 -0
- package/dist/providers/native/engine-router.js +191 -0
- package/dist/providers/native/gpu-panic-guard.d.ts +54 -0
- package/dist/providers/native/gpu-panic-guard.js +59 -0
- package/dist/providers/native/inference.d.ts +33 -0
- package/dist/providers/native/inference.js +49 -0
- package/dist/providers/native/local-engine-runtime.d.ts +412 -0
- package/dist/providers/native/local-engine-runtime.js +1714 -0
- package/dist/providers/native/measured-budget.d.ts +32 -0
- package/dist/providers/native/measured-budget.js +54 -0
- package/dist/providers/native/port.d.ts +11 -0
- package/dist/providers/native/port.js +29 -0
- package/dist/providers/native/provider-pool.d.ts +474 -0
- package/dist/providers/native/provider-pool.js +1166 -0
- package/dist/providers/native/supervisor.d.ts +503 -0
- package/dist/providers/native/supervisor.js +1466 -0
- package/dist/providers/observation-context.d.ts +16 -0
- package/dist/providers/observation-context.js +1 -0
- package/dist/providers/openai-compatible/sse.d.ts +1 -0
- package/dist/providers/openai-compatible/sse.js +2 -0
- package/dist/providers/patient-fetch.d.ts +36 -0
- package/dist/providers/patient-fetch.js +44 -0
- package/dist/providers/project-macro-loop-bail.d.ts +7 -0
- package/dist/providers/project-macro-loop-bail.js +21 -0
- package/dist/providers/prose-document-salvage.d.ts +1 -0
- package/dist/providers/prose-document-salvage.js +2 -0
- package/dist/providers/provider-disposal.d.ts +1 -0
- package/dist/providers/provider-disposal.js +2 -0
- package/dist/providers/queue.d.ts +15 -0
- package/dist/providers/queue.js +23 -0
- package/dist/providers/ramble-abort-message.d.ts +1 -0
- package/dist/providers/ramble-abort-message.js +2 -0
- package/dist/providers/ramble-detector.d.ts +1 -0
- package/dist/providers/ramble-detector.js +2 -0
- package/dist/providers/reasoning-depth.d.ts +1 -0
- package/dist/providers/reasoning-depth.js +2 -0
- package/dist/providers/required-input-reads.d.ts +1 -0
- package/dist/providers/required-input-reads.js +2 -0
- package/dist/providers/session-defaults.d.ts +13 -0
- package/dist/providers/session-defaults.js +49 -0
- package/dist/providers/session-hooks.d.ts +26 -0
- package/dist/providers/session-hooks.js +1 -0
- package/dist/providers/streaming-session.d.ts +1 -0
- package/dist/providers/streaming-session.js +2 -0
- package/dist/providers/terminal-tool-policy.d.ts +1 -0
- package/dist/providers/terminal-tool-policy.js +2 -0
- package/dist/providers/tool-arg-schema-coercion.d.ts +1 -0
- package/dist/providers/tool-arg-schema-coercion.js +2 -0
- package/dist/providers/tool-executor.d.ts +12 -0
- package/dist/providers/tool-executor.js +20 -0
- package/dist/providers/tool-failure-tracker.d.ts +1 -0
- package/dist/providers/tool-failure-tracker.js +2 -0
- package/dist/providers/tool-repeat-tracker.d.ts +1 -0
- package/dist/providers/tool-repeat-tracker.js +2 -0
- package/dist/providers/turn-timeout.d.ts +1 -0
- package/dist/providers/turn-timeout.js +1 -0
- package/dist/providers/types.d.ts +834 -0
- package/dist/providers/types.js +42 -0
- package/dist/providers/usage-builder.d.ts +1 -0
- package/dist/providers/usage-builder.js +2 -0
- package/dist/providers/vision-capability.d.ts +109 -0
- package/dist/providers/vision-capability.js +137 -0
- package/dist/python/mlx-runtime-status-bus.d.ts +39 -0
- package/dist/python/mlx-runtime-status-bus.js +27 -0
- package/dist/python/uv-runtime.d.ts +176 -0
- package/dist/python/uv-runtime.js +492 -0
- package/dist/relevance/install.d.ts +28 -0
- package/dist/relevance/install.js +114 -0
- package/dist/relevance/manager.d.ts +79 -0
- package/dist/relevance/manager.js +211 -0
- package/dist/relevance/registry.d.ts +11 -0
- package/dist/relevance/registry.js +158 -0
- package/dist/relevance/relevance-core.d.ts +67 -0
- package/dist/relevance/relevance-core.js +189 -0
- package/dist/relevance/relevance-model.d.ts +42 -0
- package/dist/relevance/relevance-model.js +292 -0
- package/dist/relevance/relevance-worker.d.ts +20 -0
- package/dist/relevance/relevance-worker.js +57 -0
- package/dist/relevance/settings.d.ts +30 -0
- package/dist/relevance/settings.js +81 -0
- package/dist/remotes/identity.d.ts +121 -0
- package/dist/remotes/identity.js +348 -0
- package/dist/remotes/pinned-fetch.d.ts +45 -0
- package/dist/remotes/pinned-fetch.js +193 -0
- package/dist/remotes/types.d.ts +54 -0
- package/dist/remotes/types.js +1 -0
- package/dist/runtime-lock.d.ts +29 -0
- package/dist/runtime-lock.js +85 -0
- package/dist/search/relevance-stage.d.ts +81 -0
- package/dist/search/relevance-stage.js +177 -0
- package/dist/secrets/types.d.ts +63 -0
- package/dist/secrets/types.js +64 -0
- package/dist/speech.d.ts +1 -0
- package/dist/speech.js +1 -0
- package/dist/system/darwin-memory.d.ts +26 -0
- package/dist/system/darwin-memory.js +81 -0
- package/dist/system/gezel-process-memory.d.ts +55 -0
- package/dist/system/gezel-process-memory.js +156 -0
- package/dist/system/memory.d.ts +154 -0
- package/dist/system/memory.js +501 -0
- package/dist/transformers-cache.d.ts +112 -0
- package/dist/transformers-cache.js +392 -0
- package/dist/utils/disk-space.d.ts +55 -0
- package/dist/utils/disk-space.js +72 -0
- package/dist/utils/download-common.d.ts +138 -0
- package/dist/utils/download-common.js +196 -0
- package/dist/utils/download-with-retry.d.ts +85 -0
- package/dist/utils/download-with-retry.js +522 -0
- package/dist/utils/extract-zip.d.ts +22 -0
- package/dist/utils/extract-zip.js +103 -0
- package/dist/utils/retire-model-worker.d.ts +15 -0
- package/dist/utils/retire-model-worker.js +24 -0
- package/dist/utils/service-worker-entry.d.ts +59 -0
- package/dist/utils/service-worker-entry.js +69 -0
- package/dist/utils/xet-download.d.ts +40 -0
- package/dist/utils/xet-download.js +526 -0
- package/dist/utils/xet.d.ts +86 -0
- package/dist/utils/xet.js +201 -0
- package/package.json +103 -3
- package/scripts/embedding-packaging.cjs +264 -0
- package/scripts/embedding-packaging.d.cts +16 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type NativeCapacityCommand, type NativeCapacityReply } from '@bendyline/gezel';
|
|
2
|
+
import type { CapacityBudget } from './capacity-budget.js';
|
|
3
|
+
import { DeviceCapacityLedger, type DeviceCapacitySample } from './device-capacity-ledger.js';
|
|
4
|
+
import type { NativeEngineLaunch } from './supervisor.js';
|
|
5
|
+
export interface BrokerVersionSkew {
|
|
6
|
+
/** What the installed machine engine reports, or `'unknown'` if it reports none. */
|
|
7
|
+
brokerVersion: string;
|
|
8
|
+
localVersion: string;
|
|
9
|
+
/**
|
|
10
|
+
* Take the LOCAL ledger instead of deferring. True only for an unstamped
|
|
11
|
+
* dev build facing a broker that is not the same build.
|
|
12
|
+
*/
|
|
13
|
+
takeLocalAuthority: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Decide who arbitrates this machine's memory when an installed machine engine
|
|
17
|
+
* is present.
|
|
18
|
+
*
|
|
19
|
+
* Hosting mode does not answer this. An embedded dev daemon still shares the
|
|
20
|
+
* physical RAM of the box with whatever the installed app loads, so deferring
|
|
21
|
+
* to one machine-wide ledger is right in production and right for two builds
|
|
22
|
+
* of the same version. What it is NOT right for is a dev loop: on 2026-09-08 a
|
|
23
|
+
* patched dev build planned an 8.6 GB launch against its own corrected
|
|
24
|
+
* availability reading, handed the request to an installed 1.26251.69 broker
|
|
25
|
+
* whose formula saw 5.9 GB, and waited out the full five-minute admission
|
|
26
|
+
* budget — the fix under test could not run, because the process that decides
|
|
27
|
+
* was a different, older one. Nothing in either log said so.
|
|
28
|
+
*
|
|
29
|
+
* Ordering is deliberately not the test. `isUnstampedDevBuild` is: a checkout
|
|
30
|
+
* carries code no release has, while `0.0.0` sorts below every stamped version
|
|
31
|
+
* — so `compareGezelVersions` would conclude the exact opposite of the truth.
|
|
32
|
+
*/
|
|
33
|
+
export declare function assessBrokerVersionSkew(brokerVersion: string | undefined, localVersion?: string): BrokerVersionSkew | null;
|
|
34
|
+
export interface NativeMemoryRequirement {
|
|
35
|
+
bytes: number;
|
|
36
|
+
gpuBytes?: number;
|
|
37
|
+
exclusive?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface NativeCapacityLease {
|
|
40
|
+
bind(pid: number): Promise<void>;
|
|
41
|
+
ready(): Promise<void>;
|
|
42
|
+
release(): Promise<void>;
|
|
43
|
+
shouldYield(): Promise<boolean>;
|
|
44
|
+
}
|
|
45
|
+
export interface NativeCapacityOptions {
|
|
46
|
+
home: string;
|
|
47
|
+
exclusive?: boolean;
|
|
48
|
+
priority?: () => 'interactive' | 'background';
|
|
49
|
+
/** Evaluated after resolveLaunch, so context/offload recovery is priced anew. */
|
|
50
|
+
requirement?: () => NativeMemoryRequirement | undefined | Promise<NativeMemoryRequirement | undefined>;
|
|
51
|
+
execute?: (command: NativeCapacityCommand) => Promise<NativeCapacityReply>;
|
|
52
|
+
}
|
|
53
|
+
export declare function nativeCapacityDirectory(home: string): string;
|
|
54
|
+
/**
|
|
55
|
+
* Free graphics memory as device admission counts it: every card's reported
|
|
56
|
+
* free memory, less a driver reserve. Undefined when no card reports usage.
|
|
57
|
+
*
|
|
58
|
+
* The llama.cpp context planner sizes adaptive growth against this same
|
|
59
|
+
* reading. It used to size against 95% of the card's TOTAL memory while
|
|
60
|
+
* admission compared against this, so on a 32 GB card with ~4.5 GB held by
|
|
61
|
+
* the desktop and browsers, gemma4-31b grew to a 96K window, planned a
|
|
62
|
+
* 28.3 GB launch, and was refused against 27.2 GB free — a launch that fit
|
|
63
|
+
* comfortably at the 64K it would otherwise have used (2026-09-23).
|
|
64
|
+
*/
|
|
65
|
+
export declare function measureAvailableGpuBytes(): Promise<number | undefined>;
|
|
66
|
+
/** The engine memory limit the person set in Settings, in bytes, when they set one. */
|
|
67
|
+
export declare function configuredEngineMemoryBytes(config: {
|
|
68
|
+
localEngineMemoryGb?: number | null | undefined;
|
|
69
|
+
}): number | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* The ledger's static ceilings: a request above either is refused at acquire,
|
|
72
|
+
* whatever else is running. Shared with the media fit check so a model the
|
|
73
|
+
* download pages hide is exactly one the launch path refuses. Omit
|
|
74
|
+
* `configuredBytes` for the machine's automatic ceilings.
|
|
75
|
+
*/
|
|
76
|
+
export declare function staticCapacityCeilings(budget: Pick<CapacityBudget, 'budgetBytes' | 'fastBytes' | 'kind'>, ramBytes: number, configuredBytes?: number): {
|
|
77
|
+
budgetBytes: number;
|
|
78
|
+
gpuBudgetBytes: number;
|
|
79
|
+
};
|
|
80
|
+
export declare function sampleDeviceCapacity(home?: string): Promise<DeviceCapacitySample>;
|
|
81
|
+
export declare function localDeviceCapacity(home: string): DeviceCapacityLedger;
|
|
82
|
+
/** Conservative fallback for media engines that do not expose a launch planner. */
|
|
83
|
+
export declare function estimateNativeLaunchMemory(launch: NativeEngineLaunch): Promise<NativeMemoryRequirement>;
|
|
84
|
+
export declare function acquireNativeCapacity(options: NativeCapacityOptions, launch: NativeEngineLaunch, signal: AbortSignal, onWait: (message: string) => void): Promise<NativeCapacityLease>;
|
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { readdir, stat } from 'node:fs/promises';
|
|
3
|
+
import { homedir, totalmem } from 'node:os';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { GEZEL_VERSION, NativeCapacityCommandSchema, NativeCapacityReplySchema, awakeNow, createLogger, isUnstampedDevBuild, } from '@bendyline/gezel';
|
|
6
|
+
import { readSystemServiceRuntime, systemServiceHome } from '@bendyline/gezel-client/node';
|
|
7
|
+
import { ConfigStore } from '../../fs/config-store.js';
|
|
8
|
+
import { createPinnedFetch } from '../../remotes/pinned-fetch.js';
|
|
9
|
+
import { CapacityDeniedError, availableSystemRamBytes, liveRamOsReserveBytes, } from './capacity-broker.js';
|
|
10
|
+
import { DeviceCapacityLedger } from './device-capacity-ledger.js';
|
|
11
|
+
import { measuredCapacityBudget } from './measured-budget.js';
|
|
12
|
+
const GIB = 1024 ** 3;
|
|
13
|
+
const POLL_MS = 500;
|
|
14
|
+
/**
|
|
15
|
+
* Ceiling for the case where the ledger reports `externalShortfall` — the
|
|
16
|
+
* request leads the queue and fits the budget, and nothing this protocol
|
|
17
|
+
* governs is holding the memory. Engine work can legitimately take longer
|
|
18
|
+
* than five minutes, so governed contention stays queued until it can run or
|
|
19
|
+
* the caller cancels. Queueing behind the user's browser is different: a
|
|
20
|
+
* request that needs 9.7 GB on a host with 4.3 GB free should report the
|
|
21
|
+
* shortfall promptly.
|
|
22
|
+
* Short rather than zero because a just-released engine's pages take a moment
|
|
23
|
+
* to come back, and makeRoom's retry deserves to see them.
|
|
24
|
+
*/
|
|
25
|
+
const EXTERNAL_SHORTFALL_WAIT_MS = 20_000;
|
|
26
|
+
// Once an installed broker owns this process's reservations, its disappearance
|
|
27
|
+
// is an outage, never permission to create a competing local ledger.
|
|
28
|
+
const observedMachineAuthorities = new Set();
|
|
29
|
+
const log = createLogger('native-capacity');
|
|
30
|
+
/** Skew is announced once per (broker home, version) — acquire runs per launch. */
|
|
31
|
+
const announcedSkew = new Set();
|
|
32
|
+
/**
|
|
33
|
+
* Installed brokers, by (home, version), that answered 404 for the capacity
|
|
34
|
+
* route: they predate memory coordination and never will coordinate, so later
|
|
35
|
+
* launches skip straight to the local ledger until Gezel is updated.
|
|
36
|
+
*/
|
|
37
|
+
const outdatedBrokers = new Set();
|
|
38
|
+
/**
|
|
39
|
+
* Decide who arbitrates this machine's memory when an installed machine engine
|
|
40
|
+
* is present.
|
|
41
|
+
*
|
|
42
|
+
* Hosting mode does not answer this. An embedded dev daemon still shares the
|
|
43
|
+
* physical RAM of the box with whatever the installed app loads, so deferring
|
|
44
|
+
* to one machine-wide ledger is right in production and right for two builds
|
|
45
|
+
* of the same version. What it is NOT right for is a dev loop: on 2026-09-08 a
|
|
46
|
+
* patched dev build planned an 8.6 GB launch against its own corrected
|
|
47
|
+
* availability reading, handed the request to an installed 1.26251.69 broker
|
|
48
|
+
* whose formula saw 5.9 GB, and waited out the full five-minute admission
|
|
49
|
+
* budget — the fix under test could not run, because the process that decides
|
|
50
|
+
* was a different, older one. Nothing in either log said so.
|
|
51
|
+
*
|
|
52
|
+
* Ordering is deliberately not the test. `isUnstampedDevBuild` is: a checkout
|
|
53
|
+
* carries code no release has, while `0.0.0` sorts below every stamped version
|
|
54
|
+
* — so `compareGezelVersions` would conclude the exact opposite of the truth.
|
|
55
|
+
*/
|
|
56
|
+
export function assessBrokerVersionSkew(brokerVersion, localVersion = GEZEL_VERSION) {
|
|
57
|
+
if (brokerVersion !== undefined && brokerVersion === localVersion)
|
|
58
|
+
return null;
|
|
59
|
+
return {
|
|
60
|
+
brokerVersion: brokerVersion ?? 'unknown',
|
|
61
|
+
localVersion,
|
|
62
|
+
// A broker that reports no version cannot be shown to be this build, and a
|
|
63
|
+
// dev loop that silently tests someone else's code is the failure here.
|
|
64
|
+
takeLocalAuthority: isUnstampedDevBuild(localVersion),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function announceSkew(machineHome, skew) {
|
|
68
|
+
const key = `${machineHome}\u0000${skew.brokerVersion}\u0000${String(skew.takeLocalAuthority)}`;
|
|
69
|
+
if (announcedSkew.has(key))
|
|
70
|
+
return;
|
|
71
|
+
announcedSkew.add(key);
|
|
72
|
+
if (skew.takeLocalAuthority) {
|
|
73
|
+
log.warn([
|
|
74
|
+
`dev build (unstamped) differs from the installed machine engine (${skew.brokerVersion}); `,
|
|
75
|
+
'using the LOCAL admission ledger so this build’s own memory decisions are the ones under ',
|
|
76
|
+
'test. Engines started by the installed app are NOT coordinated with — quit it before ',
|
|
77
|
+
'loading large models on a memory-tight host. Set ',
|
|
78
|
+
'GEZEL_NATIVE_CAPACITY_AUTHORITY=machine to defer anyway.',
|
|
79
|
+
].join(''));
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
log.info([
|
|
83
|
+
`this build (${skew.localVersion}) and the installed machine engine (${skew.brokerVersion}) `,
|
|
84
|
+
'are different versions; deferring to the machine engine as the memory authority, so ',
|
|
85
|
+
'admission decisions come from the installed service rather than from this build.',
|
|
86
|
+
].join(''));
|
|
87
|
+
}
|
|
88
|
+
export function nativeCapacityDirectory(home) {
|
|
89
|
+
return (process.env.GEZEL_NATIVE_CAPACITY_DIR ??
|
|
90
|
+
(home === systemServiceHome()
|
|
91
|
+
? join(home, 'native-capacity')
|
|
92
|
+
: join(homedir(), '.gezel', 'runtime', 'native-capacity')));
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Free graphics memory as device admission counts it: every card's reported
|
|
96
|
+
* free memory, less a driver reserve. Undefined when no card reports usage.
|
|
97
|
+
*
|
|
98
|
+
* The llama.cpp context planner sizes adaptive growth against this same
|
|
99
|
+
* reading. It used to size against 95% of the card's TOTAL memory while
|
|
100
|
+
* admission compared against this, so on a 32 GB card with ~4.5 GB held by
|
|
101
|
+
* the desktop and browsers, gemma4-31b grew to a 96K window, planned a
|
|
102
|
+
* 28.3 GB launch, and was refused against 27.2 GB free — a launch that fit
|
|
103
|
+
* comfortably at the 64K it would otherwise have used (2026-09-23).
|
|
104
|
+
*/
|
|
105
|
+
export async function measureAvailableGpuBytes() {
|
|
106
|
+
const { createSystemDeviceHealthProbe } = await import('@bendyline/gezel/native');
|
|
107
|
+
const probe = await createSystemDeviceHealthProbe({
|
|
108
|
+
helperPath: process.env.GEZEL_DEVICE_HEALTH_BIN,
|
|
109
|
+
}).sample();
|
|
110
|
+
const readings = probe.readings.filter((r) => r.memoryTotalMb !== undefined && r.memoryUsedMb !== undefined);
|
|
111
|
+
if (readings.length === 0)
|
|
112
|
+
return undefined;
|
|
113
|
+
return Math.max(0, readings.reduce((sum, r) => sum + r.memoryTotalMb - r.memoryUsedMb, 0) * 1024 ** 2 -
|
|
114
|
+
256 * 1024 ** 2);
|
|
115
|
+
}
|
|
116
|
+
/** The engine memory limit the person set in Settings, in bytes, when they set one. */
|
|
117
|
+
export function configuredEngineMemoryBytes(config) {
|
|
118
|
+
return typeof config.localEngineMemoryGb === 'number' && config.localEngineMemoryGb > 0
|
|
119
|
+
? config.localEngineMemoryGb * GIB
|
|
120
|
+
: undefined;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The ledger's static ceilings: a request above either is refused at acquire,
|
|
124
|
+
* whatever else is running. Shared with the media fit check so a model the
|
|
125
|
+
* download pages hide is exactly one the launch path refuses. Omit
|
|
126
|
+
* `configuredBytes` for the machine's automatic ceilings.
|
|
127
|
+
*/
|
|
128
|
+
export function staticCapacityCeilings(budget, ramBytes, configuredBytes) {
|
|
129
|
+
const budgetBytes = configuredBytes === undefined
|
|
130
|
+
? budget.budgetBytes
|
|
131
|
+
: Math.min(configuredBytes, budget.budgetBytes);
|
|
132
|
+
return {
|
|
133
|
+
budgetBytes,
|
|
134
|
+
// Keep non-reclaimable accelerator commitments on the conservative curve;
|
|
135
|
+
// a larger RAM budget is not permission to wire the whole machine.
|
|
136
|
+
gpuBudgetBytes: Math.min(budgetBytes, budget.kind === 'unified' ? Math.min(budget.fastBytes, ramBytes * 0.75) : budget.fastBytes),
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
export async function sampleDeviceCapacity(home) {
|
|
140
|
+
const budget = await measuredCapacityBudget();
|
|
141
|
+
const ram = totalmem();
|
|
142
|
+
const config = home ? await new ConfigStore(home).readConfig() : {};
|
|
143
|
+
const ceilings = staticCapacityCeilings(budget, ram, configuredEngineMemoryBytes(config));
|
|
144
|
+
// The ledger's RAM ceiling and the OS's currently reclaimable RAM answer
|
|
145
|
+
// different questions. Checking both catches tenants outside this protocol.
|
|
146
|
+
//
|
|
147
|
+
// This MUST be the same reading the context planner sized the launch
|
|
148
|
+
// against — see liveRamOsReserveBytes. It used to be a darwin-only sample
|
|
149
|
+
// that counted neither inactive nor speculative pages, which made admission
|
|
150
|
+
// roughly 5 GiB stricter than planning on a 16 GiB Mac and refused launches
|
|
151
|
+
// the host could serve.
|
|
152
|
+
const availableRamBytes = Math.max(0, availableSystemRamBytes() - liveRamOsReserveBytes(ram));
|
|
153
|
+
const availableBytes = availableRamBytes + budget.vramBytes;
|
|
154
|
+
const discrete = budget.kind === 'discrete-gpu';
|
|
155
|
+
const availableGpuBytes = discrete ? await measureAvailableGpuBytes() : undefined;
|
|
156
|
+
return {
|
|
157
|
+
...ceilings,
|
|
158
|
+
availableBytes,
|
|
159
|
+
...(availableGpuBytes !== undefined ? { availableGpuBytes } : {}),
|
|
160
|
+
// A discrete card's claims say how much of them lives on the card, so
|
|
161
|
+
// their RAM need is the rest. Against RAM plus the whole card, a MoE
|
|
162
|
+
// that keeps only its residue on the GPU would be credited with graphics
|
|
163
|
+
// memory it never uses.
|
|
164
|
+
...(discrete ? { availableRamBytes } : {}),
|
|
165
|
+
serializeLoads: process.platform === 'darwin',
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
export function localDeviceCapacity(home) {
|
|
169
|
+
return new DeviceCapacityLedger({
|
|
170
|
+
directory: nativeCapacityDirectory(home),
|
|
171
|
+
sample: () => sampleDeviceCapacity(home),
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/** Routes reservations to the installed broker even when eval inference is isolated. */
|
|
175
|
+
async function capacityExecutor(home) {
|
|
176
|
+
// Set only after an explicit desktop-startup choice (or deliberately by an
|
|
177
|
+
// operator). This is not tied to GEZEL_DISABLE_MACHINE_ENGINE: isolated
|
|
178
|
+
// inference normally still shares the installed broker's admission ledger.
|
|
179
|
+
const authority = process.env.GEZEL_NATIVE_CAPACITY_AUTHORITY;
|
|
180
|
+
if (authority === 'local') {
|
|
181
|
+
const ledger = localDeviceCapacity(home);
|
|
182
|
+
return (command) => ledger.execute(command);
|
|
183
|
+
}
|
|
184
|
+
const machineHome = systemServiceHome();
|
|
185
|
+
if (machineHome && machineHome !== home) {
|
|
186
|
+
const runtime = await readSystemServiceRuntime(machineHome);
|
|
187
|
+
if (runtime?.serviceRole === 'machine-engine') {
|
|
188
|
+
const { inspectMachineRuntime } = await import('../../machine-engine/inspect-runtime.js');
|
|
189
|
+
let identity;
|
|
190
|
+
try {
|
|
191
|
+
identity = await inspectMachineRuntime(runtime);
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
// Seeing the role at all is enough to refuse a competing ledger. A
|
|
195
|
+
// broker that is merely unreachable is an outage, never permission to
|
|
196
|
+
// double-book the machine — so claim the authority before rethrowing.
|
|
197
|
+
observedMachineAuthorities.add(machineHome);
|
|
198
|
+
throw error;
|
|
199
|
+
}
|
|
200
|
+
const skew = assessBrokerVersionSkew(identity.gezelVersion);
|
|
201
|
+
if (skew)
|
|
202
|
+
announceSkew(machineHome, skew);
|
|
203
|
+
// `machine` is the explicit opt-back-in for a dev build that wants the
|
|
204
|
+
// installed broker's arbitration anyway (two engines, one tight host).
|
|
205
|
+
if (skew?.takeLocalAuthority && authority !== 'machine') {
|
|
206
|
+
const ledger = localDeviceCapacity(home);
|
|
207
|
+
return (command) => ledger.execute(command);
|
|
208
|
+
}
|
|
209
|
+
const outdatedKey = `${machineHome}\u0000${identity.gezelVersion ?? 'unknown'}`;
|
|
210
|
+
if (outdatedBrokers.has(outdatedKey) && authority !== 'machine') {
|
|
211
|
+
const ledger = localDeviceCapacity(home);
|
|
212
|
+
return (command) => ledger.execute(command);
|
|
213
|
+
}
|
|
214
|
+
observedMachineAuthorities.add(machineHome);
|
|
215
|
+
let verifiedCert = runtime.cert;
|
|
216
|
+
let brokerAccepted = false;
|
|
217
|
+
let local = null;
|
|
218
|
+
return async (command) => {
|
|
219
|
+
if (local)
|
|
220
|
+
return local.execute(command);
|
|
221
|
+
// Re-read discovery on each operation: broker restarts rotate both the
|
|
222
|
+
// token and TLS certificate. Never switch a live lease to another ledger.
|
|
223
|
+
const current = await readSystemServiceRuntime(machineHome);
|
|
224
|
+
if (!current || current.serviceRole !== 'machine-engine' || !current.cert) {
|
|
225
|
+
throw new CapacityDeniedError('Waiting for the machine engine to restore memory coordination.');
|
|
226
|
+
}
|
|
227
|
+
if (current.cert !== verifiedCert) {
|
|
228
|
+
const refreshed = await inspectMachineRuntime(current);
|
|
229
|
+
if (refreshed.pinnedIdentityFingerprint !== identity.pinnedIdentityFingerprint)
|
|
230
|
+
throw new CapacityDeniedError('The machine memory coordinator identity changed.');
|
|
231
|
+
verifiedCert = current.cert;
|
|
232
|
+
}
|
|
233
|
+
const fetchImpl = createPinnedFetch(current.cert);
|
|
234
|
+
try {
|
|
235
|
+
const response = await fetchImpl(`${current.baseUrl}/v1/remote/manage/native-capacity`, {
|
|
236
|
+
method: 'POST',
|
|
237
|
+
headers: {
|
|
238
|
+
authorization: `Bearer ${current.token}`,
|
|
239
|
+
'content-type': 'application/json',
|
|
240
|
+
},
|
|
241
|
+
body: JSON.stringify(command),
|
|
242
|
+
signal: AbortSignal.timeout(5_000),
|
|
243
|
+
});
|
|
244
|
+
if (response.ok) {
|
|
245
|
+
brokerAccepted = true;
|
|
246
|
+
return NativeCapacityReplySchema.parse(await response.json());
|
|
247
|
+
}
|
|
248
|
+
// Once the broker has accepted a command it holds this lease, and a
|
|
249
|
+
// 404 is no longer evidence that it predates coordination.
|
|
250
|
+
if (response.status !== 404 || brokerAccepted || authority === 'machine') {
|
|
251
|
+
const detail = response.status === 409
|
|
252
|
+
? (await response.json().catch(() => null))
|
|
253
|
+
: null;
|
|
254
|
+
throw new CapacityDeniedError(response.status === 404
|
|
255
|
+
? 'The installed machine engine needs an update before isolated local engines can share memory safely.'
|
|
256
|
+
: (detail?.error ??
|
|
257
|
+
`Machine memory coordination unavailable (HTTP ${response.status}).`));
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
finally {
|
|
261
|
+
await fetchImpl.close();
|
|
262
|
+
}
|
|
263
|
+
// The installed broker predates memory coordination: it neither sees
|
|
264
|
+
// nor limits this build's engines, and refusing would leave an embedded
|
|
265
|
+
// Gezel unable to run its own models until the person updates an app
|
|
266
|
+
// they may not use. Admit through this build's ledger instead; it still
|
|
267
|
+
// checks the RAM the OS reports free, so the older app's resident
|
|
268
|
+
// engines count against every launch.
|
|
269
|
+
outdatedBrokers.add(outdatedKey);
|
|
270
|
+
observedMachineAuthorities.delete(machineHome);
|
|
271
|
+
// Diagnostics only: the person is never asked to resolve version skew.
|
|
272
|
+
log.info([
|
|
273
|
+
`the installed machine engine (${identity.gezelVersion ?? 'unknown'}) predates memory `,
|
|
274
|
+
'coordination; admitting this build’s engines through its own ledger.',
|
|
275
|
+
].join(''));
|
|
276
|
+
local = localDeviceCapacity(home);
|
|
277
|
+
return local.execute(command);
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
if (observedMachineAuthorities.has(machineHome))
|
|
281
|
+
throw new CapacityDeniedError('Waiting for the machine engine to restore memory coordination.');
|
|
282
|
+
}
|
|
283
|
+
const ledger = localDeviceCapacity(home);
|
|
284
|
+
return (command) => ledger.execute(command);
|
|
285
|
+
}
|
|
286
|
+
/** Conservative fallback for media engines that do not expose a launch planner. */
|
|
287
|
+
export async function estimateNativeLaunchMemory(launch) {
|
|
288
|
+
const paths = new Set();
|
|
289
|
+
for (let i = 0; i < launch.args.length - 1; i++) {
|
|
290
|
+
if ([
|
|
291
|
+
'--model',
|
|
292
|
+
'-m',
|
|
293
|
+
'--mmproj',
|
|
294
|
+
'--diffusion-model',
|
|
295
|
+
'--vae',
|
|
296
|
+
'--clip_l',
|
|
297
|
+
'--clip_g',
|
|
298
|
+
'--t5xxl',
|
|
299
|
+
'--llm',
|
|
300
|
+
'--model-draft',
|
|
301
|
+
].includes(launch.args[i])) {
|
|
302
|
+
paths.add(launch.args[i + 1]);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
const weightBytes = async (path, depth = 0) => {
|
|
306
|
+
const info = await stat(path);
|
|
307
|
+
if (info.isFile())
|
|
308
|
+
return info.size;
|
|
309
|
+
if (!info.isDirectory() || depth > 6)
|
|
310
|
+
return 0;
|
|
311
|
+
const entries = await readdir(path, { withFileTypes: true });
|
|
312
|
+
let bytes = 0;
|
|
313
|
+
for (const entry of entries) {
|
|
314
|
+
if (entry.isDirectory() ||
|
|
315
|
+
(entry.isFile() && /\.(gguf|safetensors|bin|pt|pth)$/i.test(entry.name))) {
|
|
316
|
+
bytes += await weightBytes(join(path, entry.name), depth + 1);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
return bytes;
|
|
320
|
+
};
|
|
321
|
+
let bytes = 0;
|
|
322
|
+
for (const path of paths)
|
|
323
|
+
bytes += await weightBytes(path);
|
|
324
|
+
if (bytes <= 0)
|
|
325
|
+
throw new CapacityDeniedError('Cannot determine the native model working set before starting it.');
|
|
326
|
+
const cpu = launch.args.includes('--cpu') ||
|
|
327
|
+
launch.args.includes('--no-gpu') ||
|
|
328
|
+
launch.args.some((arg, i) => arg === '--accelerator' && launch.args[i + 1] === 'cpu') ||
|
|
329
|
+
launch.args.some((arg, i) => ['--n-gpu-layers', '--gpu-layers', '-ngl'].includes(arg) && launch.args[i + 1] === '0');
|
|
330
|
+
const reservation = Math.ceil(bytes * 1.5 + GIB);
|
|
331
|
+
return { bytes: reservation, ...(cpu ? { gpuBytes: 0 } : {}) };
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* The refusal a person can act on: which two numbers disagreed, and that the
|
|
335
|
+
* memory is held by their other applications rather than by Gezel. The old
|
|
336
|
+
* wording ("current engine work is still protected") described a queue that,
|
|
337
|
+
* in this branch, has nothing in it.
|
|
338
|
+
*/
|
|
339
|
+
function formatHostMemoryShortfall(reply) {
|
|
340
|
+
const gb = (bytes) => `${(bytes / GIB).toFixed(1)} GB`;
|
|
341
|
+
if (reply.requiredBytes === undefined || reply.availableBytes === undefined)
|
|
342
|
+
return 'Not enough free memory on this device to start this model right now. Close some applications and retry, or choose a smaller model.';
|
|
343
|
+
return [
|
|
344
|
+
'Not enough free memory on this device to start this model: it needs about ',
|
|
345
|
+
`${gb(reply.requiredBytes)}, and ${gb(reply.availableBytes)} is available right now. `,
|
|
346
|
+
'The rest is in use by other applications, not by Gezel — closing some and retrying ',
|
|
347
|
+
'will help, as will choosing a smaller model.',
|
|
348
|
+
].join('');
|
|
349
|
+
}
|
|
350
|
+
export async function acquireNativeCapacity(options, launch, signal, onWait) {
|
|
351
|
+
const execute = options.execute ?? (await capacityExecutor(options.home));
|
|
352
|
+
const requirement = (await options.requirement?.()) ?? (await estimateNativeLaunchMemory(launch));
|
|
353
|
+
const budget = await measuredCapacityBudget();
|
|
354
|
+
const id = randomUUID();
|
|
355
|
+
const request = NativeCapacityCommandSchema.parse({
|
|
356
|
+
action: 'acquire',
|
|
357
|
+
id,
|
|
358
|
+
ownerPid: process.pid,
|
|
359
|
+
label: 'native model',
|
|
360
|
+
bytes: Math.ceil(requirement.bytes),
|
|
361
|
+
gpuBytes: Math.ceil(requirement.gpuBytes ??
|
|
362
|
+
(budget.kind === 'system-ram'
|
|
363
|
+
? 0
|
|
364
|
+
: budget.kind === 'discrete-gpu'
|
|
365
|
+
? Math.min(requirement.bytes, budget.fastBytes)
|
|
366
|
+
: requirement.bytes)),
|
|
367
|
+
exclusive: requirement.exclusive ?? options.exclusive ?? false,
|
|
368
|
+
});
|
|
369
|
+
let lastReport = Number.NEGATIVE_INFINITY;
|
|
370
|
+
let externalSince;
|
|
371
|
+
try {
|
|
372
|
+
for (;;) {
|
|
373
|
+
signal.throwIfAborted();
|
|
374
|
+
if (request.action === 'acquire')
|
|
375
|
+
request.priority = options.priority?.() ?? 'interactive';
|
|
376
|
+
const reply = await execute(request);
|
|
377
|
+
signal.throwIfAborted();
|
|
378
|
+
if (reply.state === 'granted')
|
|
379
|
+
break;
|
|
380
|
+
if (reply.externalShortfall) {
|
|
381
|
+
externalSince ??= awakeNow();
|
|
382
|
+
if (awakeNow() - externalSince >= EXTERNAL_SHORTFALL_WAIT_MS)
|
|
383
|
+
throw new CapacityDeniedError(formatHostMemoryShortfall(reply));
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
externalSince = undefined;
|
|
387
|
+
}
|
|
388
|
+
if (awakeNow() - lastReport >= 15_000) {
|
|
389
|
+
onWait(reply.reason ?? 'Waiting for memory.');
|
|
390
|
+
lastReport = awakeNow();
|
|
391
|
+
}
|
|
392
|
+
await new Promise((resolve, reject) => {
|
|
393
|
+
const done = () => {
|
|
394
|
+
clearTimeout(timer);
|
|
395
|
+
signal.removeEventListener('abort', abort);
|
|
396
|
+
resolve();
|
|
397
|
+
};
|
|
398
|
+
const abort = () => {
|
|
399
|
+
clearTimeout(timer);
|
|
400
|
+
signal.removeEventListener('abort', abort);
|
|
401
|
+
reject(signal.reason);
|
|
402
|
+
};
|
|
403
|
+
const timer = setTimeout(done, POLL_MS);
|
|
404
|
+
signal.addEventListener('abort', abort, { once: true });
|
|
405
|
+
if (signal.aborted)
|
|
406
|
+
abort();
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
catch (error) {
|
|
411
|
+
await execute({ action: 'release', id }).catch(() => { });
|
|
412
|
+
throw error;
|
|
413
|
+
}
|
|
414
|
+
return {
|
|
415
|
+
bind: async (childPid) => {
|
|
416
|
+
if ((await execute({ action: 'bind', id, childPid })).state !== 'granted')
|
|
417
|
+
throw new CapacityDeniedError('The engine memory reservation was lost before startup.');
|
|
418
|
+
},
|
|
419
|
+
ready: async () => {
|
|
420
|
+
if ((await execute({ action: 'ready', id })).state !== 'granted')
|
|
421
|
+
throw new CapacityDeniedError('The engine memory reservation was lost during startup.');
|
|
422
|
+
},
|
|
423
|
+
release: async () => {
|
|
424
|
+
await execute({ action: 'release', id });
|
|
425
|
+
},
|
|
426
|
+
shouldYield: async () => {
|
|
427
|
+
const reply = await execute({ action: 'status', id });
|
|
428
|
+
return reply.state !== 'granted' || reply.releaseRequested;
|
|
429
|
+
},
|
|
430
|
+
};
|
|
431
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A per-process bearer token for the loopback engine APIs we spawn.
|
|
3
|
+
*
|
|
4
|
+
* ── Why a local-only HTTP server still needs auth ────────────────────────
|
|
5
|
+
*
|
|
6
|
+
* A supervised engine binds `127.0.0.1:<ephemeral>`, which sounds closed but
|
|
7
|
+
* is not. Two callers can reach it that we do not want reaching it:
|
|
8
|
+
*
|
|
9
|
+
* 1. **Any web page in the user's browser.** llama.cpp defaults
|
|
10
|
+
* `--cors-origins` to `*` with credentials enabled, so it echoes back
|
|
11
|
+
* whatever `Origin` it is handed — measured directly against the pinned
|
|
12
|
+
* build, a request carrying `Origin: https://evil.example` came back
|
|
13
|
+
* `200` with `Access-Control-Allow-Origin: https://evil.example` and a
|
|
14
|
+
* full chat completion. The response body also leaks the absolute model
|
|
15
|
+
* path, which contains the account name. Passing `--cors-origins
|
|
16
|
+
* localhost` removes the header entirely for a foreign origin and closes
|
|
17
|
+
* this;`--no-webui` drops the built-in chat page nobody here uses.
|
|
18
|
+
* 2. **Any other local process.** CORS is a *browser* policy; it does
|
|
19
|
+
* nothing about a native process that opens the port directly. Only a
|
|
20
|
+
* credential does, which is what this module is for.
|
|
21
|
+
*
|
|
22
|
+
* ── Shape ────────────────────────────────────────────────────────────────
|
|
23
|
+
*
|
|
24
|
+
* One random token per daemon process, generated lazily and never persisted.
|
|
25
|
+
* Per-process rather than per-engine because the value it protects is
|
|
26
|
+
* identical across replicas (a local model server holds no per-engine
|
|
27
|
+
* secret), and one token keeps the wrapper below stateless.
|
|
28
|
+
*
|
|
29
|
+
* It is handed to the child through the **environment**, never `argv`:
|
|
30
|
+
* command lines are world-readable via `ps` on a shared machine, whereas
|
|
31
|
+
* `/proc/<pid>/environ` is owner-only and macOS requires root for `ps -E`.
|
|
32
|
+
*
|
|
33
|
+
* Engines this applies to are the ones we launch. An engine the user pointed
|
|
34
|
+
* us at through an external base URL is theirs, not ours — we neither set its
|
|
35
|
+
* flags nor assume a key, so the wrapper is applied only on the supervised
|
|
36
|
+
* path.
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
* The token for this daemon process. Generated on first use so a daemon that
|
|
40
|
+
* never starts an engine never mints one.
|
|
41
|
+
*/
|
|
42
|
+
export declare function engineApiKey(): string;
|
|
43
|
+
/** Test seam — forget the token so a case can assert generation behaviour. */
|
|
44
|
+
export declare function resetEngineApiKeyForTests(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Wrap a fetch so every request carries the engine bearer token.
|
|
47
|
+
*
|
|
48
|
+
* An existing `Authorization` header always wins: the wrapper is a default,
|
|
49
|
+
* not an override, so a caller that deliberately authenticates some other way
|
|
50
|
+
* is left alone.
|
|
51
|
+
*
|
|
52
|
+
* Note that the engine's readiness and health endpoints are deliberately
|
|
53
|
+
* *unauthenticated* upstream (`/health` answers 200 without a key while
|
|
54
|
+
* `/props`, `/slots` and `/v1/*` return 401), so the supervisor's readiness
|
|
55
|
+
* probe and health watch keep working whether or not they go through this.
|
|
56
|
+
*/
|
|
57
|
+
export declare function withEngineApiKey(fetchImpl: typeof fetch, key: string): typeof fetch;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A per-process bearer token for the loopback engine APIs we spawn.
|
|
3
|
+
*
|
|
4
|
+
* ── Why a local-only HTTP server still needs auth ────────────────────────
|
|
5
|
+
*
|
|
6
|
+
* A supervised engine binds `127.0.0.1:<ephemeral>`, which sounds closed but
|
|
7
|
+
* is not. Two callers can reach it that we do not want reaching it:
|
|
8
|
+
*
|
|
9
|
+
* 1. **Any web page in the user's browser.** llama.cpp defaults
|
|
10
|
+
* `--cors-origins` to `*` with credentials enabled, so it echoes back
|
|
11
|
+
* whatever `Origin` it is handed — measured directly against the pinned
|
|
12
|
+
* build, a request carrying `Origin: https://evil.example` came back
|
|
13
|
+
* `200` with `Access-Control-Allow-Origin: https://evil.example` and a
|
|
14
|
+
* full chat completion. The response body also leaks the absolute model
|
|
15
|
+
* path, which contains the account name. Passing `--cors-origins
|
|
16
|
+
* localhost` removes the header entirely for a foreign origin and closes
|
|
17
|
+
* this;`--no-webui` drops the built-in chat page nobody here uses.
|
|
18
|
+
* 2. **Any other local process.** CORS is a *browser* policy; it does
|
|
19
|
+
* nothing about a native process that opens the port directly. Only a
|
|
20
|
+
* credential does, which is what this module is for.
|
|
21
|
+
*
|
|
22
|
+
* ── Shape ────────────────────────────────────────────────────────────────
|
|
23
|
+
*
|
|
24
|
+
* One random token per daemon process, generated lazily and never persisted.
|
|
25
|
+
* Per-process rather than per-engine because the value it protects is
|
|
26
|
+
* identical across replicas (a local model server holds no per-engine
|
|
27
|
+
* secret), and one token keeps the wrapper below stateless.
|
|
28
|
+
*
|
|
29
|
+
* It is handed to the child through the **environment**, never `argv`:
|
|
30
|
+
* command lines are world-readable via `ps` on a shared machine, whereas
|
|
31
|
+
* `/proc/<pid>/environ` is owner-only and macOS requires root for `ps -E`.
|
|
32
|
+
*
|
|
33
|
+
* Engines this applies to are the ones we launch. An engine the user pointed
|
|
34
|
+
* us at through an external base URL is theirs, not ours — we neither set its
|
|
35
|
+
* flags nor assume a key, so the wrapper is applied only on the supervised
|
|
36
|
+
* path.
|
|
37
|
+
*/
|
|
38
|
+
import { randomBytes } from 'node:crypto';
|
|
39
|
+
let cached;
|
|
40
|
+
/**
|
|
41
|
+
* The token for this daemon process. Generated on first use so a daemon that
|
|
42
|
+
* never starts an engine never mints one.
|
|
43
|
+
*/
|
|
44
|
+
export function engineApiKey() {
|
|
45
|
+
if (!cached)
|
|
46
|
+
cached = randomBytes(32).toString('hex');
|
|
47
|
+
return cached;
|
|
48
|
+
}
|
|
49
|
+
/** Test seam — forget the token so a case can assert generation behaviour. */
|
|
50
|
+
export function resetEngineApiKeyForTests() {
|
|
51
|
+
cached = undefined;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Wrap a fetch so every request carries the engine bearer token.
|
|
55
|
+
*
|
|
56
|
+
* An existing `Authorization` header always wins: the wrapper is a default,
|
|
57
|
+
* not an override, so a caller that deliberately authenticates some other way
|
|
58
|
+
* is left alone.
|
|
59
|
+
*
|
|
60
|
+
* Note that the engine's readiness and health endpoints are deliberately
|
|
61
|
+
* *unauthenticated* upstream (`/health` answers 200 without a key while
|
|
62
|
+
* `/props`, `/slots` and `/v1/*` return 401), so the supervisor's readiness
|
|
63
|
+
* probe and health watch keep working whether or not they go through this.
|
|
64
|
+
*/
|
|
65
|
+
export function withEngineApiKey(fetchImpl, key) {
|
|
66
|
+
return ((input, init) => {
|
|
67
|
+
const headers = new Headers(init?.headers ?? {});
|
|
68
|
+
if (!headers.has('authorization'))
|
|
69
|
+
headers.set('authorization', `Bearer ${key}`);
|
|
70
|
+
return fetchImpl(input, { ...init, headers });
|
|
71
|
+
});
|
|
72
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EngineKey — the string handle that identifies a local-engine
|
|
3
|
+
* instance in the ProviderPool. Composite: `${provider}:${modelId}:${replicaIdx}`.
|
|
4
|
+
*
|
|
5
|
+
* Cloud providers (copilot, openai, anthropic, anthropic-cli,
|
|
6
|
+
* codex-cli, ollama, mock) are NOT pool-managed — they keep the
|
|
7
|
+
* bare-provider-name keying ChatManager's `cloudProviders` map uses.
|
|
8
|
+
*/
|
|
9
|
+
export type LocalProviderName = 'llama-cpp' | 'mlx' | 'ds4';
|
|
10
|
+
export declare const LOCAL_PROVIDERS: readonly LocalProviderName[];
|
|
11
|
+
export declare function isLocalProvider(name: string): name is LocalProviderName;
|
|
12
|
+
export interface ParsedEngineKey {
|
|
13
|
+
provider: LocalProviderName;
|
|
14
|
+
modelId: string;
|
|
15
|
+
replicaIdx: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function makeEngineKey(provider: LocalProviderName, modelId: string, replicaIdx: number): string;
|
|
18
|
+
export declare function parseEngineKey(key: string): ParsedEngineKey | null;
|