@bendyline/gezel-inference 0.0.0-stage → 0.1.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,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Publish the measured accelerator pool. Called by `detectMemoryProfile`.
|
|
3
|
+
*
|
|
4
|
+
* `unifiedMemory` is deliberately separate from the byte count: equal-sized
|
|
5
|
+
* VRAM and RAM are common on small discrete-GPU machines, so their ratio is
|
|
6
|
+
* not enough to tell a GeForce from a genuinely shared GB10/iGPU pool.
|
|
7
|
+
*/
|
|
8
|
+
export declare function setDetectedGpuVramBytes(bytes: number | null, unifiedMemory?: boolean): void;
|
|
9
|
+
/** The published accelerator-memory figure, or null when none was measured. */
|
|
10
|
+
export declare function getDetectedGpuVramBytes(): number | null;
|
|
11
|
+
/**
|
|
12
|
+
* True when CPU and GPU share one physical memory pool, so a byte spent on
|
|
13
|
+
* weights is a byte the OS cannot use. Apple Silicon is the case that
|
|
14
|
+
* matters for this platform fallback. Integrated-GPU PCs are supplied as
|
|
15
|
+
* `unifiedMemory: true` by the async memory profile instead.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isUnifiedMemoryHost(): boolean;
|
|
18
|
+
/** Which pool (or pools) the auto-derived budget is drawn from. */
|
|
19
|
+
export type CapacityBudgetKind = 'unified' | 'discrete-gpu' | 'system-ram';
|
|
20
|
+
export interface CapacityBudget {
|
|
21
|
+
/**
|
|
22
|
+
* Total working set resident local engines may hold, summed across every
|
|
23
|
+
* pool they can use. This is the admission ceiling — the number the broker
|
|
24
|
+
* denies against.
|
|
25
|
+
*/
|
|
26
|
+
budgetBytes: number;
|
|
27
|
+
/**
|
|
28
|
+
* The FAST pool inside that budget: usable VRAM on a discrete card, the
|
|
29
|
+
* whole budget on unified / CPU hosts. Size KV slots and prompt caches
|
|
30
|
+
* against this, not against {@link budgetBytes} — on a discrete card the
|
|
31
|
+
* rest of the budget is system RAM that weights stream from, and putting
|
|
32
|
+
* more KV there than the card holds is how a GPU OOMs.
|
|
33
|
+
*/
|
|
34
|
+
fastBytes: number;
|
|
35
|
+
/** Usable VRAM on a discrete card; 0 on unified / CPU-only hosts. */
|
|
36
|
+
vramBytes: number;
|
|
37
|
+
/** The system-RAM share of the budget. */
|
|
38
|
+
ramShareBytes: number;
|
|
39
|
+
/**
|
|
40
|
+
* What concurrent KV slots may be sized against — never more than
|
|
41
|
+
* {@link fastBytes}, and on a unified host held to the pre-reserve-cap
|
|
42
|
+
* fraction. Admission capacity and peak concurrency grow for different
|
|
43
|
+
* reasons: a bigger budget should let MORE MODELS fit, not give one model
|
|
44
|
+
* more simultaneous slots of the same KV. The 27B-q8 Metal abort is what
|
|
45
|
+
* happens when the two move together (see {@link UNIFIED_FRACTION}).
|
|
46
|
+
*/
|
|
47
|
+
concurrencySizingBytes: number;
|
|
48
|
+
kind: CapacityBudgetKind;
|
|
49
|
+
/** True when `GEZEL_CAPACITY_BUDGET_GB` set the total. */
|
|
50
|
+
overriddenByEnv: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface CapacityBudgetInput {
|
|
53
|
+
systemRamBytes?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Measured discrete-GPU VRAM, or null for none. Omit entirely to fall back
|
|
56
|
+
* to the last published probe ({@link getDetectedGpuVramBytes}) — but only
|
|
57
|
+
* when `unifiedMemory` is also omitted, so a caller that states the host
|
|
58
|
+
* shape explicitly (every test does) stays deterministic.
|
|
59
|
+
*/
|
|
60
|
+
gpuVramBytes?: number | null;
|
|
61
|
+
unifiedMemory?: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Resolve the memory a host can give resident local engines, per pool.
|
|
65
|
+
*
|
|
66
|
+
* Three shapes:
|
|
67
|
+
*
|
|
68
|
+
* • **unified** — Apple Silicon, or a host whose reported VRAM is really
|
|
69
|
+
* the shared pool. One pool: {@link UNIFIED_FRACTION} of it, minus a flat
|
|
70
|
+
* {@link UNIFIED_OS_RESERVE_BYTES} floor.
|
|
71
|
+
*
|
|
72
|
+
* • **discrete-gpu** — a real card. Its VRAM is memory the OS does not
|
|
73
|
+
* want back, so it is ADDED to the RAM share rather than replacing it:
|
|
74
|
+
* a 42 GB MoE on a 24 GB card streams its experts from system RAM while
|
|
75
|
+
* attention stays on the GPU, and a budget that saw only one pool refused
|
|
76
|
+
* it. Bounded by construction — VRAM absorbs at most `vramBytes`, so no
|
|
77
|
+
* admissible set of models can put more than `ramShareBytes` in RAM.
|
|
78
|
+
*
|
|
79
|
+
* • **system-ram** — no GPU. The discrete curve's RAM share alone.
|
|
80
|
+
*
|
|
81
|
+
* `GEZEL_CAPACITY_BUDGET_GB` overrides the total, including the setting.
|
|
82
|
+
*/
|
|
83
|
+
export declare function computeCapacityBudget(input?: CapacityBudgetInput): CapacityBudget;
|
|
84
|
+
/**
|
|
85
|
+
* The default answer to "may co-resident models spill into system RAM?" for
|
|
86
|
+
* this host, when the user has expressed no preference. Only a discrete card
|
|
87
|
+
* has two pools to choose between; unified and CPU-only hosts have one, so
|
|
88
|
+
* there is nothing to spill *into* and the rule never binds.
|
|
89
|
+
*/
|
|
90
|
+
export declare function autoAllowRamSpillover(budget: Pick<CapacityBudget, 'kind' | 'vramBytes'>): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Auto-detect budget for resident local-engine processes, combined —
|
|
93
|
+
* the total of {@link computeCapacityBudget}. See that function for the
|
|
94
|
+
* per-pool rules.
|
|
95
|
+
*
|
|
96
|
+
* The unified curve is more permissive than the discrete RAM share at the
|
|
97
|
+
* 16–64 GB end. That is where the old shared 60% fraction denied models the
|
|
98
|
+
* machine could actually hold — a 16 GB Mac was capped at 9.6 GiB, below any
|
|
99
|
+
* 8B-class model at 8-bit. It also means a fully committed budget on a small
|
|
100
|
+
* Mac will lean on compressed memory; the `localEngineMemoryGb` setting
|
|
101
|
+
* (Settings → the engine pages) is the dial for owners who want that traded
|
|
102
|
+
* either way.
|
|
103
|
+
*/
|
|
104
|
+
export declare function autoDetectBudgetBytes(systemRamBytes?: number, opts?: {
|
|
105
|
+
unifiedMemory?: boolean;
|
|
106
|
+
gpuVramBytes?: number | null;
|
|
107
|
+
}): number;
|
|
108
|
+
/**
|
|
109
|
+
* The FAST-memory ceiling for this host — usable VRAM on a discrete card,
|
|
110
|
+
* the whole budget otherwise. KV slots, prompt caches, and anything else
|
|
111
|
+
* that must live where the compute happens size against this.
|
|
112
|
+
*/
|
|
113
|
+
export declare function fastMemoryBudgetBytes(systemRamBytes?: number, opts?: {
|
|
114
|
+
unifiedMemory?: boolean;
|
|
115
|
+
gpuVramBytes?: number | null;
|
|
116
|
+
}): number;
|
|
117
|
+
/**
|
|
118
|
+
* How long a pressured but physically idle engine may stay resident before it
|
|
119
|
+
* flushes and stops.
|
|
120
|
+
*
|
|
121
|
+
* The grace exists so a model is not torn down between two turns of the same
|
|
122
|
+
* conversation. On a card where one model IS the accelerator, that reasoning
|
|
123
|
+
* inverts: the engine holding the memory is the reason nothing else can load,
|
|
124
|
+
* and a minute is long enough for the tenant waiting on it to fail. Two gezel
|
|
125
|
+
* installs sharing a 12 GB laptop card spent a captured night evicting each
|
|
126
|
+
* other on exactly this timer — each politely stopping its own idle engine
|
|
127
|
+
* inside the grace, the other reloading into the space, over and over.
|
|
128
|
+
*
|
|
129
|
+
* Sized off the FAST pool rather than total memory: what matters is how much
|
|
130
|
+
* of the accelerator a single model occupies, which is the same question on a
|
|
131
|
+
* 12 GB card and a 16 GB unified host.
|
|
132
|
+
*/
|
|
133
|
+
export declare function pressureIdleGraceMs(fastBytes?: number): number;
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { arch, platform, totalmem } from 'node:os';
|
|
2
|
+
const GIB = 1024 ** 3;
|
|
3
|
+
/**
|
|
4
|
+
* Ceiling on the auto-derived SYSTEM-RAM share, however much RAM the host
|
|
5
|
+
* reports. Discrete-GPU and CPU-only hosts only: there the share is memory
|
|
6
|
+
* taken from an OS that wants it back, so an absolute stop is right. A
|
|
7
|
+
* unified host bounds the RESERVE instead ({@link UNIFIED_OS_RESERVE_MAX_BYTES})
|
|
8
|
+
* — the same bytes are the GPU's pool, and capping the share stranded 16 GB
|
|
9
|
+
* on a 128 GB Mac. Still governs unified SLOT SIZING, which kept this curve.
|
|
10
|
+
*/
|
|
11
|
+
const BUDGET_CAP_BYTES = 96 * GIB;
|
|
12
|
+
/** Above this, a discrete-GPU/CPU host is treated as workstation-tier. */
|
|
13
|
+
const HIGH_MEMORY_THRESHOLD_BYTES = 96 * GIB;
|
|
14
|
+
/**
|
|
15
|
+
* Fraction of unified memory local engines may hold. Apple Silicon shares
|
|
16
|
+
* one pool between CPU and GPU, so the split that protects a discrete-GPU
|
|
17
|
+
* host from cramping the OS just strands capacity here: the weights sit in
|
|
18
|
+
* the same RAM the fraction was reserving. macOS itself lets the GPU wire
|
|
19
|
+
* roughly 75% (`iogpu.wired_limit_pct`), and our budget covers weights plus
|
|
20
|
+
* KV plus scratch, so the working ceiling sits just under that.
|
|
21
|
+
*
|
|
22
|
+
* Deliberately not higher, because this fraction is now what
|
|
23
|
+
* {@link localEngineSlotCeiling} sizes concurrent KV slots against: past
|
|
24
|
+
* ~0.72 on a 64 GB Mac a 27B-q8 at 32K f16 goes from serial to two slots,
|
|
25
|
+
* which is the exact shape that aborted Metal (see the regression test of
|
|
26
|
+
* that name). The admission budget no longer rides on it — it follows
|
|
27
|
+
* {@link UNIFIED_OS_RESERVE_MAX_BYTES} — so raising this raises peak
|
|
28
|
+
* concurrency and nothing else. Raise the reserve cap to fit more models;
|
|
29
|
+
* raise this only to give one model more simultaneous slots.
|
|
30
|
+
*/
|
|
31
|
+
const UNIFIED_FRACTION = 0.7;
|
|
32
|
+
/**
|
|
33
|
+
* Floor on what stays outside the budget on a unified host. A fraction
|
|
34
|
+
* alone is wrong at the small end — 80% of a 16 GB Mac leaves 3.2 GB for
|
|
35
|
+
* macOS, the Electron shell, and the renderer combined. The OS reserve is
|
|
36
|
+
* roughly constant in absolute terms, not proportional, so express it that
|
|
37
|
+
* way and let whichever bound is tighter win.
|
|
38
|
+
*/
|
|
39
|
+
const UNIFIED_OS_RESERVE_BYTES = 4 * GIB;
|
|
40
|
+
/**
|
|
41
|
+
* Ceiling on that same reserve. Past a point the fraction stops describing
|
|
42
|
+
* anything real: 20% of a 128 GB Mac is 25.6 GB held back for an OS whose
|
|
43
|
+
* need is roughly constant once met, and the old flat 96 GiB cap stranded
|
|
44
|
+
* a further 16 GB on top of that — a machine bought for big models could
|
|
45
|
+
* not use a third of its memory for them. What the OS, the shell, and the
|
|
46
|
+
* user's other apps actually need is absolute, so bound the reserve in
|
|
47
|
+
* absolute terms and let the fraction govern only the small end where it
|
|
48
|
+
* is the tighter of the two.
|
|
49
|
+
*
|
|
50
|
+
* This raises the ADMISSION budget only. Concurrency is sized against
|
|
51
|
+
* {@link CapacityBudget.concurrencySizingBytes}, which deliberately keeps
|
|
52
|
+
* the older curve — see the note on {@link UNIFIED_FRACTION} about why
|
|
53
|
+
* growing the load ceiling must not silently grow peak slot count.
|
|
54
|
+
*/
|
|
55
|
+
const UNIFIED_OS_RESERVE_MAX_BYTES = 16 * GIB;
|
|
56
|
+
/**
|
|
57
|
+
* Share of a discrete card's VRAM local engines may hold. The whole pool is
|
|
58
|
+
* available in practice; the 5% margin covers the display framebuffer and
|
|
59
|
+
* driver allocations. Same number `detectMemoryProfile` uses for the fast
|
|
60
|
+
* budget it reports to the UI — these must not drift.
|
|
61
|
+
*/
|
|
62
|
+
const VRAM_USABLE_FRACTION = 0.95;
|
|
63
|
+
/**
|
|
64
|
+
* A reported "VRAM" at or above this share of system RAM is a shared pool
|
|
65
|
+
* (GB10 / DGX Spark, or an integrated GPU reporting host memory), not a
|
|
66
|
+
* dedicated card. Adding it to the RAM share would double-count the same
|
|
67
|
+
* bytes, so those hosts take the unified curve instead.
|
|
68
|
+
*/
|
|
69
|
+
const UNIFIED_VRAM_RATIO = 0.75;
|
|
70
|
+
/**
|
|
71
|
+
* Last accelerator-memory figure `detectMemoryProfile` measured on this host,
|
|
72
|
+
* or null when nothing has probed yet / no GPU memory figure was published.
|
|
73
|
+
*
|
|
74
|
+
* The probe is async (`nvidia-smi`, `llama-server --list-devices`) while the
|
|
75
|
+
* budget is read from synchronous paths — the engine-slot sizing in
|
|
76
|
+
* `buildLlamaCppProvider`, the MLX KV ceiling — that have no broker to ask.
|
|
77
|
+
* Those callers used to see a RAM-only number and size a 24 GB card's slots
|
|
78
|
+
* against 38 GB of system RAM. Publishing the probe here lets them read the
|
|
79
|
+
* same shape the broker does, and a host that has not probed yet degrades to
|
|
80
|
+
* exactly the old RAM-only behavior rather than to a wrong GPU number.
|
|
81
|
+
*/
|
|
82
|
+
let detectedGpuVramBytes = null;
|
|
83
|
+
let detectedGpuUnifiedMemory;
|
|
84
|
+
/**
|
|
85
|
+
* Publish the measured accelerator pool. Called by `detectMemoryProfile`.
|
|
86
|
+
*
|
|
87
|
+
* `unifiedMemory` is deliberately separate from the byte count: equal-sized
|
|
88
|
+
* VRAM and RAM are common on small discrete-GPU machines, so their ratio is
|
|
89
|
+
* not enough to tell a GeForce from a genuinely shared GB10/iGPU pool.
|
|
90
|
+
*/
|
|
91
|
+
export function setDetectedGpuVramBytes(bytes, unifiedMemory) {
|
|
92
|
+
detectedGpuVramBytes =
|
|
93
|
+
typeof bytes === 'number' && Number.isFinite(bytes) && bytes > 0 ? bytes : null;
|
|
94
|
+
detectedGpuUnifiedMemory = unifiedMemory;
|
|
95
|
+
}
|
|
96
|
+
/** The published accelerator-memory figure, or null when none was measured. */
|
|
97
|
+
export function getDetectedGpuVramBytes() {
|
|
98
|
+
return detectedGpuVramBytes;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* True when CPU and GPU share one physical memory pool, so a byte spent on
|
|
102
|
+
* weights is a byte the OS cannot use. Apple Silicon is the case that
|
|
103
|
+
* matters for this platform fallback. Integrated-GPU PCs are supplied as
|
|
104
|
+
* `unifiedMemory: true` by the async memory profile instead.
|
|
105
|
+
*/
|
|
106
|
+
export function isUnifiedMemoryHost() {
|
|
107
|
+
return platform() === 'darwin' && arch() === 'arm64';
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Resolve the memory a host can give resident local engines, per pool.
|
|
111
|
+
*
|
|
112
|
+
* Three shapes:
|
|
113
|
+
*
|
|
114
|
+
* • **unified** — Apple Silicon, or a host whose reported VRAM is really
|
|
115
|
+
* the shared pool. One pool: {@link UNIFIED_FRACTION} of it, minus a flat
|
|
116
|
+
* {@link UNIFIED_OS_RESERVE_BYTES} floor.
|
|
117
|
+
*
|
|
118
|
+
* • **discrete-gpu** — a real card. Its VRAM is memory the OS does not
|
|
119
|
+
* want back, so it is ADDED to the RAM share rather than replacing it:
|
|
120
|
+
* a 42 GB MoE on a 24 GB card streams its experts from system RAM while
|
|
121
|
+
* attention stays on the GPU, and a budget that saw only one pool refused
|
|
122
|
+
* it. Bounded by construction — VRAM absorbs at most `vramBytes`, so no
|
|
123
|
+
* admissible set of models can put more than `ramShareBytes` in RAM.
|
|
124
|
+
*
|
|
125
|
+
* • **system-ram** — no GPU. The discrete curve's RAM share alone.
|
|
126
|
+
*
|
|
127
|
+
* `GEZEL_CAPACITY_BUDGET_GB` overrides the total, including the setting.
|
|
128
|
+
*/
|
|
129
|
+
export function computeCapacityBudget(input = {}) {
|
|
130
|
+
const systemRamBytes = input.systemRamBytes ?? totalmem();
|
|
131
|
+
// Reading the ambient probe is for callers that know nothing about the
|
|
132
|
+
// host. One that passes `unifiedMemory` has already described it.
|
|
133
|
+
const measuredVram = input.gpuVramBytes !== undefined
|
|
134
|
+
? input.gpuVramBytes
|
|
135
|
+
: input.unifiedMemory === undefined
|
|
136
|
+
? detectedGpuVramBytes
|
|
137
|
+
: null;
|
|
138
|
+
const measuredUnifiedMemory = input.unifiedMemory !== undefined
|
|
139
|
+
? input.unifiedMemory
|
|
140
|
+
: input.gpuVramBytes === undefined
|
|
141
|
+
? detectedGpuUnifiedMemory
|
|
142
|
+
: undefined;
|
|
143
|
+
const hasCard = typeof measuredVram === 'number' && Number.isFinite(measuredVram) && measuredVram > 0;
|
|
144
|
+
const sharedPool = hasCard && measuredVram >= systemRamBytes * UNIFIED_VRAM_RATIO;
|
|
145
|
+
const unified = measuredUnifiedMemory ?? (isUnifiedMemoryHost() || sharedPool);
|
|
146
|
+
const discrete = hasCard && !unified;
|
|
147
|
+
const highMemory = systemRamBytes >= HIGH_MEMORY_THRESHOLD_BYTES;
|
|
148
|
+
// Whichever bound leaves the host MORE memory wins between the fraction and
|
|
149
|
+
// the capped reserve, then the 4 GiB floor reserve caps them both. Written
|
|
150
|
+
// as shares rather than as `ram - reserve` so the fraction cases stay
|
|
151
|
+
// byte-identical to the pre-cap curve.
|
|
152
|
+
const unifiedFractionShare = Math.floor(systemRamBytes * (highMemory ? 0.8 : UNIFIED_FRACTION));
|
|
153
|
+
const unifiedShare = Math.max(0, Math.min(Math.max(unifiedFractionShare, systemRamBytes - UNIFIED_OS_RESERVE_MAX_BYTES), systemRamBytes - UNIFIED_OS_RESERVE_BYTES));
|
|
154
|
+
const nonUnifiedShare = Math.min(Math.floor(systemRamBytes * (highMemory ? 0.8 : 0.6)), BUDGET_CAP_BYTES);
|
|
155
|
+
const ramShareBytes = unified ? unifiedShare : nonUnifiedShare;
|
|
156
|
+
const vramBytes = discrete ? Math.floor(measuredVram * VRAM_USABLE_FRACTION) : 0;
|
|
157
|
+
// The pre-cap curve, retained for slot sizing only.
|
|
158
|
+
const concurrencyRamShare = unified
|
|
159
|
+
? Math.max(0, Math.min(unifiedFractionShare, systemRamBytes - UNIFIED_OS_RESERVE_BYTES, BUDGET_CAP_BYTES))
|
|
160
|
+
: nonUnifiedShare;
|
|
161
|
+
const kind = unified ? 'unified' : discrete ? 'discrete-gpu' : 'system-ram';
|
|
162
|
+
const auto = ramShareBytes + vramBytes;
|
|
163
|
+
const envBytes = envOverrideBytes();
|
|
164
|
+
if (envBytes !== null) {
|
|
165
|
+
const envFast = discrete ? Math.min(vramBytes, envBytes) : envBytes;
|
|
166
|
+
return {
|
|
167
|
+
budgetBytes: envBytes,
|
|
168
|
+
fastBytes: envFast,
|
|
169
|
+
vramBytes,
|
|
170
|
+
ramShareBytes: Math.max(0, envBytes - vramBytes),
|
|
171
|
+
// An explicit override is the operator stating the whole ceiling; it
|
|
172
|
+
// governs slot sizing too, or the override could not lower concurrency.
|
|
173
|
+
concurrencySizingBytes: envFast,
|
|
174
|
+
kind,
|
|
175
|
+
overriddenByEnv: true,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
const fastBytes = discrete ? vramBytes : auto;
|
|
179
|
+
return {
|
|
180
|
+
budgetBytes: auto,
|
|
181
|
+
fastBytes,
|
|
182
|
+
vramBytes,
|
|
183
|
+
ramShareBytes,
|
|
184
|
+
concurrencySizingBytes: Math.min(fastBytes, discrete ? vramBytes : concurrencyRamShare),
|
|
185
|
+
kind,
|
|
186
|
+
overriddenByEnv: false,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* The default answer to "may co-resident models spill into system RAM?" for
|
|
191
|
+
* this host, when the user has expressed no preference. Only a discrete card
|
|
192
|
+
* has two pools to choose between; unified and CPU-only hosts have one, so
|
|
193
|
+
* there is nothing to spill *into* and the rule never binds.
|
|
194
|
+
*/
|
|
195
|
+
export function autoAllowRamSpillover(budget) {
|
|
196
|
+
if (budget.kind !== 'discrete-gpu')
|
|
197
|
+
return true;
|
|
198
|
+
// One intentionally offloaded model may still use the combined pool, but
|
|
199
|
+
// automatic co-residency must stay within VRAM. Otherwise concurrency would
|
|
200
|
+
// incorrectly treat system RAM as additional graphics memory. This stays
|
|
201
|
+
// off even on <=12 GB cards: silently making every concurrent model slower
|
|
202
|
+
// is a worse default than serializing them, and the explicit override is
|
|
203
|
+
// available to users who prefer avoiding reloads on a constrained card.
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
function envOverrideBytes() {
|
|
207
|
+
const raw = process.env.GEZEL_CAPACITY_BUDGET_GB;
|
|
208
|
+
if (!raw)
|
|
209
|
+
return null;
|
|
210
|
+
const gb = Number.parseFloat(raw);
|
|
211
|
+
if (!Number.isFinite(gb) || gb <= 0)
|
|
212
|
+
return null;
|
|
213
|
+
return Math.round(gb * GIB);
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Auto-detect budget for resident local-engine processes, combined —
|
|
217
|
+
* the total of {@link computeCapacityBudget}. See that function for the
|
|
218
|
+
* per-pool rules.
|
|
219
|
+
*
|
|
220
|
+
* The unified curve is more permissive than the discrete RAM share at the
|
|
221
|
+
* 16–64 GB end. That is where the old shared 60% fraction denied models the
|
|
222
|
+
* machine could actually hold — a 16 GB Mac was capped at 9.6 GiB, below any
|
|
223
|
+
* 8B-class model at 8-bit. It also means a fully committed budget on a small
|
|
224
|
+
* Mac will lean on compressed memory; the `localEngineMemoryGb` setting
|
|
225
|
+
* (Settings → the engine pages) is the dial for owners who want that traded
|
|
226
|
+
* either way.
|
|
227
|
+
*/
|
|
228
|
+
export function autoDetectBudgetBytes(systemRamBytes = totalmem(), opts = {}) {
|
|
229
|
+
return computeCapacityBudget({ systemRamBytes, ...opts }).budgetBytes;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* The FAST-memory ceiling for this host — usable VRAM on a discrete card,
|
|
233
|
+
* the whole budget otherwise. KV slots, prompt caches, and anything else
|
|
234
|
+
* that must live where the compute happens size against this.
|
|
235
|
+
*/
|
|
236
|
+
export function fastMemoryBudgetBytes(systemRamBytes = totalmem(), opts = {}) {
|
|
237
|
+
return computeCapacityBudget({ systemRamBytes, ...opts }).fastBytes;
|
|
238
|
+
}
|
|
239
|
+
/** Fast pool at or below which a host is treated as accelerator-constrained. */
|
|
240
|
+
const CONSTRAINED_FAST_POOL_BYTES = 16 * GIB;
|
|
241
|
+
/** Warm-retention grace for a pressured idle engine on a roomy host. */
|
|
242
|
+
const PRESSURE_IDLE_GRACE_MS = 60_000;
|
|
243
|
+
/** The same grace on a host where one model is most of the accelerator. */
|
|
244
|
+
const CONSTRAINED_PRESSURE_IDLE_GRACE_MS = 15_000;
|
|
245
|
+
/**
|
|
246
|
+
* How long a pressured but physically idle engine may stay resident before it
|
|
247
|
+
* flushes and stops.
|
|
248
|
+
*
|
|
249
|
+
* The grace exists so a model is not torn down between two turns of the same
|
|
250
|
+
* conversation. On a card where one model IS the accelerator, that reasoning
|
|
251
|
+
* inverts: the engine holding the memory is the reason nothing else can load,
|
|
252
|
+
* and a minute is long enough for the tenant waiting on it to fail. Two gezel
|
|
253
|
+
* installs sharing a 12 GB laptop card spent a captured night evicting each
|
|
254
|
+
* other on exactly this timer — each politely stopping its own idle engine
|
|
255
|
+
* inside the grace, the other reloading into the space, over and over.
|
|
256
|
+
*
|
|
257
|
+
* Sized off the FAST pool rather than total memory: what matters is how much
|
|
258
|
+
* of the accelerator a single model occupies, which is the same question on a
|
|
259
|
+
* 12 GB card and a 16 GB unified host.
|
|
260
|
+
*/
|
|
261
|
+
export function pressureIdleGraceMs(fastBytes = fastMemoryBudgetBytes()) {
|
|
262
|
+
return fastBytes > 0 && fastBytes <= CONSTRAINED_FAST_POOL_BYTES
|
|
263
|
+
? CONSTRAINED_PRESSURE_IDLE_GRACE_MS
|
|
264
|
+
: PRESSURE_IDLE_GRACE_MS;
|
|
265
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { NativeCapacityCommand, NativeCapacityReply } from '@bendyline/gezel';
|
|
2
|
+
export interface DeviceCapacitySample {
|
|
3
|
+
budgetBytes: number;
|
|
4
|
+
gpuBudgetBytes: number;
|
|
5
|
+
availableBytes?: number;
|
|
6
|
+
availableGpuBytes?: number;
|
|
7
|
+
/**
|
|
8
|
+
* System RAM free now, less the OS reserve, on a discrete-GPU host. When
|
|
9
|
+
* present, a claim's RAM need is what it does not put on the card
|
|
10
|
+
* (`bytes - gpuBytes`), so a MoE that keeps only its residue on the GPU is
|
|
11
|
+
* checked against the RAM its experts really need.
|
|
12
|
+
*/
|
|
13
|
+
availableRamBytes?: number;
|
|
14
|
+
serializeLoads: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function processAlive(pid: number): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* SQLite's process lock makes check-and-reserve atomic across GEZEL_HOME values.
|
|
19
|
+
* Reservations survive a broker restart. A dead parent does not free the memory
|
|
20
|
+
* of a surviving engine child, and a live owner never loses a lease to a TTL.
|
|
21
|
+
*/
|
|
22
|
+
export declare class DeviceCapacityLedger {
|
|
23
|
+
private readonly options;
|
|
24
|
+
constructor(options: {
|
|
25
|
+
directory: string;
|
|
26
|
+
sample: () => Promise<DeviceCapacitySample>;
|
|
27
|
+
alive?: (pid: number) => boolean;
|
|
28
|
+
});
|
|
29
|
+
execute(command: NativeCapacityCommand): Promise<NativeCapacityReply>;
|
|
30
|
+
private transact;
|
|
31
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { chmod, mkdir } from 'node:fs/promises';
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { CapacityDeniedError } from './capacity-broker.js';
|
|
5
|
+
// Keep the newer builtin behind a runtime require. The current tsup/esbuild
|
|
6
|
+
// target rewrites a static `node:sqlite` import to the nonexistent npm package
|
|
7
|
+
// `sqlite`, making the daemon bundle fail before it can write runtime state.
|
|
8
|
+
const nodeRequire = createRequire(import.meta.url);
|
|
9
|
+
const { DatabaseSync } = nodeRequire('node:sqlite');
|
|
10
|
+
function gb(bytes) {
|
|
11
|
+
return `${(bytes / 1024 ** 3).toFixed(1)} GB`;
|
|
12
|
+
}
|
|
13
|
+
export function processAlive(pid) {
|
|
14
|
+
try {
|
|
15
|
+
process.kill(pid, 0);
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
return error.code !== 'ESRCH';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* SQLite's process lock makes check-and-reserve atomic across GEZEL_HOME values.
|
|
24
|
+
* Reservations survive a broker restart. A dead parent does not free the memory
|
|
25
|
+
* of a surviving engine child, and a live owner never loses a lease to a TTL.
|
|
26
|
+
*/
|
|
27
|
+
export class DeviceCapacityLedger {
|
|
28
|
+
options;
|
|
29
|
+
constructor(options) {
|
|
30
|
+
this.options = options;
|
|
31
|
+
}
|
|
32
|
+
async execute(command) {
|
|
33
|
+
const sample = await this.options.sample();
|
|
34
|
+
await mkdir(this.options.directory, { recursive: true, mode: 0o700 });
|
|
35
|
+
const path = join(this.options.directory, 'leases.sqlite');
|
|
36
|
+
const db = new DatabaseSync(path);
|
|
37
|
+
try {
|
|
38
|
+
await chmod(path, 0o600);
|
|
39
|
+
db.exec('PRAGMA busy_timeout = 1000');
|
|
40
|
+
db.exec('CREATE TABLE IF NOT EXISTS claims (id TEXT PRIMARY KEY, claim TEXT NOT NULL)');
|
|
41
|
+
db.exec('BEGIN IMMEDIATE');
|
|
42
|
+
try {
|
|
43
|
+
const result = this.transact(db, command, sample);
|
|
44
|
+
db.exec('COMMIT');
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
db.exec('ROLLBACK');
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
finally {
|
|
53
|
+
db.close();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
transact(db, command, sample) {
|
|
57
|
+
const alive = this.options.alive ?? processAlive;
|
|
58
|
+
const rows = db.prepare('SELECT claim FROM claims ORDER BY rowid').all();
|
|
59
|
+
const claims = rows.map((row) => JSON.parse(String(row.claim)));
|
|
60
|
+
const remove = db.prepare('DELETE FROM claims WHERE id = ?');
|
|
61
|
+
const save = db.prepare('UPDATE claims SET claim = ? WHERE id = ?');
|
|
62
|
+
const live = claims.filter((claim) => {
|
|
63
|
+
// An unbound grant with a dead owner could have spawned just before the
|
|
64
|
+
// owner died. Keep it conservatively; never guess that its bytes are free.
|
|
65
|
+
const stale = (claim.childPid !== undefined && !alive(claim.childPid)) ||
|
|
66
|
+
(!alive(claim.ownerPid) && claim.phase === 'waiting');
|
|
67
|
+
if (stale)
|
|
68
|
+
remove.run(claim.id);
|
|
69
|
+
return !stale;
|
|
70
|
+
});
|
|
71
|
+
let own = live.find((c) => c.id === command.id);
|
|
72
|
+
if (command.action === 'release') {
|
|
73
|
+
remove.run(command.id);
|
|
74
|
+
return { state: 'released', releaseRequested: false };
|
|
75
|
+
}
|
|
76
|
+
if (command.action === 'acquire' && !own) {
|
|
77
|
+
if (command.bytes > sample.budgetBytes || command.gpuBytes > sample.gpuBudgetBytes) {
|
|
78
|
+
throw new CapacityDeniedError(`Not enough memory to load ${command.label}: its planned working set exceeds this device's safe model capacity.`);
|
|
79
|
+
}
|
|
80
|
+
own = {
|
|
81
|
+
id: command.id,
|
|
82
|
+
ownerPid: command.ownerPid,
|
|
83
|
+
label: command.label,
|
|
84
|
+
bytes: command.bytes,
|
|
85
|
+
gpuBytes: command.gpuBytes,
|
|
86
|
+
exclusive: command.exclusive,
|
|
87
|
+
phase: 'waiting',
|
|
88
|
+
priority: command.priority ?? 'interactive',
|
|
89
|
+
bypasses: 0,
|
|
90
|
+
};
|
|
91
|
+
db.prepare('INSERT INTO claims (id, claim) VALUES (?, ?)').run(own.id, JSON.stringify(own));
|
|
92
|
+
live.push(own);
|
|
93
|
+
}
|
|
94
|
+
if (!own)
|
|
95
|
+
return { state: 'released', releaseRequested: false };
|
|
96
|
+
if (command.action === 'acquire' && command.priority === 'interactive')
|
|
97
|
+
own.priority = 'interactive';
|
|
98
|
+
if (command.action === 'bind' && own.phase !== 'waiting')
|
|
99
|
+
own.childPid = command.childPid;
|
|
100
|
+
if (command.action === 'ready' && own.phase === 'loading')
|
|
101
|
+
own.phase = 'ready';
|
|
102
|
+
const active = live.filter((c) => c.phase !== 'waiting');
|
|
103
|
+
const waiting = live.filter((c) => c.phase === 'waiting');
|
|
104
|
+
const first = waiting.find((c) => c.bypasses >= 4) ??
|
|
105
|
+
waiting.find((c) => c.priority !== 'background') ??
|
|
106
|
+
waiting[0];
|
|
107
|
+
const fits = (request) => active.reduce((sum, c) => sum + c.bytes, request.bytes) <= sample.budgetBytes &&
|
|
108
|
+
active.reduce((sum, c) => sum + c.gpuBytes, request.gpuBytes) <= sample.gpuBudgetBytes &&
|
|
109
|
+
!(request.gpuBytes > 0 &&
|
|
110
|
+
active.some((c) => c.gpuBytes > 0 && (c.exclusive || request.exclusive)));
|
|
111
|
+
// Set only when the ONLY thing in the way is memory this protocol does
|
|
112
|
+
// not govern: the request leads the queue, fits the budget, and no other
|
|
113
|
+
// claim is loading or resident. Waiting cannot help — see the waiter.
|
|
114
|
+
let shortfall;
|
|
115
|
+
if (own === first && fits(own)) {
|
|
116
|
+
const loading = active.filter((c) => c.phase === 'loading');
|
|
117
|
+
const ramNeed = (c) => Math.max(0, c.bytes - c.gpuBytes);
|
|
118
|
+
const memoryAvailable = sample.availableRamBytes !== undefined
|
|
119
|
+
? ramNeed(own) + loading.reduce((sum, c) => sum + ramNeed(c), 0) <=
|
|
120
|
+
sample.availableRamBytes
|
|
121
|
+
: sample.availableBytes === undefined ||
|
|
122
|
+
own.bytes + loading.reduce((sum, c) => sum + c.bytes, 0) <= sample.availableBytes;
|
|
123
|
+
const gpuAvailable = sample.availableGpuBytes === undefined ||
|
|
124
|
+
own.gpuBytes + loading.reduce((sum, c) => sum + c.gpuBytes, 0) <= sample.availableGpuBytes;
|
|
125
|
+
const loadSlot = !sample.serializeLoads || own.gpuBytes === 0 || !loading.some((c) => c.gpuBytes > 0);
|
|
126
|
+
if (memoryAvailable && gpuAvailable && loadSlot) {
|
|
127
|
+
own.phase = 'loading';
|
|
128
|
+
for (const older of waiting.slice(0, waiting.indexOf(own))) {
|
|
129
|
+
older.bypasses = (older.bypasses ?? 0) + 1;
|
|
130
|
+
save.run(JSON.stringify(older), older.id);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
else if (active.length === 0) {
|
|
134
|
+
// `loadSlot` can only be false behind a loading claim, so reaching
|
|
135
|
+
// here with no active claims means the host itself is short.
|
|
136
|
+
if (!memoryAvailable && sample.availableRamBytes !== undefined)
|
|
137
|
+
shortfall = { requiredBytes: ramNeed(own), availableBytes: sample.availableRamBytes };
|
|
138
|
+
else if (!memoryAvailable && sample.availableBytes !== undefined)
|
|
139
|
+
shortfall = { requiredBytes: own.bytes, availableBytes: sample.availableBytes };
|
|
140
|
+
else if (!gpuAvailable && sample.availableGpuBytes !== undefined)
|
|
141
|
+
shortfall = { requiredBytes: own.gpuBytes, availableBytes: sample.availableGpuBytes };
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
save.run(JSON.stringify(own), own.id);
|
|
145
|
+
// FIFO within a lane, with bounded priority bypass, protects large and
|
|
146
|
+
// background requests from an endless stream of small interactive arrivals.
|
|
147
|
+
// Only owners stop their own idle engine; this protocol never sends signals.
|
|
148
|
+
const releaseRequested = own.phase !== 'waiting' &&
|
|
149
|
+
first !== undefined &&
|
|
150
|
+
first !== own &&
|
|
151
|
+
(!fits(first) ||
|
|
152
|
+
(sample.availableBytes !== undefined && first.bytes > sample.availableBytes) ||
|
|
153
|
+
(sample.availableGpuBytes !== undefined && first.gpuBytes > sample.availableGpuBytes));
|
|
154
|
+
const waitingReason = (() => {
|
|
155
|
+
if (own.phase !== 'waiting')
|
|
156
|
+
return undefined;
|
|
157
|
+
if (own !== first) {
|
|
158
|
+
const ahead = waiting.indexOf(own);
|
|
159
|
+
return `Queued behind ${ahead} earlier model request${ahead === 1 ? '' : 's'}.`;
|
|
160
|
+
}
|
|
161
|
+
if (!fits(own)) {
|
|
162
|
+
const committed = active.reduce((sum, claim) => sum + claim.bytes, 0);
|
|
163
|
+
const committedGpu = active.reduce((sum, claim) => sum + claim.gpuBytes, 0);
|
|
164
|
+
const gpuLimited = own.gpuBytes + committedGpu > sample.gpuBudgetBytes;
|
|
165
|
+
return (`Waiting for model capacity: ${gb(gpuLimited ? own.gpuBytes : own.bytes)} requested, ` +
|
|
166
|
+
`${gb(gpuLimited ? committedGpu : committed)} reserved by ${active.length} ` +
|
|
167
|
+
`running or loading engine${active.length === 1 ? '' : 's'} of ` +
|
|
168
|
+
`${gb(gpuLimited ? sample.gpuBudgetBytes : sample.budgetBytes)} safe capacity.`);
|
|
169
|
+
}
|
|
170
|
+
if (active.some((claim) => claim.phase === 'loading'))
|
|
171
|
+
return 'Waiting for another model load to finish before starting this model.';
|
|
172
|
+
if (sample.availableBytes !== undefined)
|
|
173
|
+
return (`Waiting for reclaimable device memory: ${gb(own.bytes)} planned, ` +
|
|
174
|
+
`${gb(sample.availableBytes)} available while ${active.length} ` +
|
|
175
|
+
`engine${active.length === 1 ? ' is' : 's are'} resident.`);
|
|
176
|
+
return `Waiting for memory to load ${own.label}; another engine is using the available capacity.`;
|
|
177
|
+
})();
|
|
178
|
+
return {
|
|
179
|
+
state: own.phase === 'waiting' ? 'waiting' : 'granted',
|
|
180
|
+
releaseRequested,
|
|
181
|
+
...(own.phase === 'waiting'
|
|
182
|
+
? shortfall
|
|
183
|
+
? {
|
|
184
|
+
reason: `Waiting for memory to load ${own.label}: it needs ${gb(shortfall.requiredBytes)} ` +
|
|
185
|
+
`and this device has ${gb(shortfall.availableBytes)} available.`,
|
|
186
|
+
externalShortfall: true,
|
|
187
|
+
requiredBytes: shortfall.requiredBytes,
|
|
188
|
+
availableBytes: shortfall.availableBytes,
|
|
189
|
+
}
|
|
190
|
+
: {
|
|
191
|
+
reason: waitingReason ?? 'Waiting for model capacity.',
|
|
192
|
+
}
|
|
193
|
+
: {}),
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
}
|