@bendyline/gezel-inference 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +13 -2
- package/dist/cache/adapter.d.ts +115 -0
- package/dist/cache/adapter.js +23 -0
- package/dist/cache/budget.d.ts +15 -0
- package/dist/cache/budget.js +31 -0
- package/dist/cache/controller.d.ts +205 -0
- package/dist/cache/controller.js +377 -0
- package/dist/catalog/LICENSE +21 -0
- package/dist/catalog/chat-models/bt/btl4-35b-q4/manifest.json +146 -0
- package/dist/catalog/chat-models/bt/btl4-35b-q4/versions/1.0.0/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-35b-q4/versions/1.0.1/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/manifest.json +146 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/versions/1.0.0/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/versions/1.0.1/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/versions/1.0.2/manifest.json +15 -0
- package/dist/catalog/chat-models/de/deepseek-r1-8b-q4/manifest.json +166 -0
- package/dist/catalog/chat-models/de/deepseek-r1-8b-q4/versions/1.1.0/manifest.json +62 -0
- package/dist/catalog/chat-models/de/deepseek-r1-8b-q4/versions/1.1.1/manifest.json +61 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-mxfp4/manifest.json +125 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-mxfp4/versions/1.0.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2/manifest.json +125 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2/versions/1.0.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2/versions/1.1.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2q4/manifest.json +126 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2q4/versions/1.0.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q4/manifest.json +318 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q4/versions/1.0.0/manifest.json +225 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q4/versions/1.1.0/manifest.json +225 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/manifest.json +249 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.0.0/manifest.json +70 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.1.0/manifest.json +72 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.1.2/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.1.3/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.2.0/manifest.json +98 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/manifest.json +228 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.0.0/manifest.json +72 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.0.2/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.0.3/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.1.0/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/manifest.json +220 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.1.0/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.2.0/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.2.1/manifest.json +80 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.2.2/manifest.json +80 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.3.0/manifest.json +81 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/manifest.json +226 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.1.0/manifest.json +80 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.1.1/manifest.json +82 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.2.0/manifest.json +82 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.2.1/manifest.json +95 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.2.2/manifest.json +95 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.3.0/manifest.json +86 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/manifest.json +213 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.1.0/manifest.json +67 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.1.2/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.2.0/manifest.json +71 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.2.1/manifest.json +71 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.3.0/manifest.json +71 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/manifest.json +205 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.1.0/manifest.json +72 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.1.2/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.2.0/manifest.json +76 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.2.1/manifest.json +76 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.3.0/manifest.json +76 -0
- package/dist/catalog/chat-models/gl/glm-5.2-754b-q2/manifest.json +127 -0
- package/dist/catalog/chat-models/gl/glm-5.2-754b-q2/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/manifest.json +140 -0
- package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/versions/1.0.0/manifest.json +23 -0
- package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/versions/1.0.1/manifest.json +26 -0
- package/dist/catalog/chat-models/gp/gpt-oss-120b-q4/manifest.json +247 -0
- package/dist/catalog/chat-models/gp/gpt-oss-120b-q4/versions/1.0.0/manifest.json +137 -0
- package/dist/catalog/chat-models/gp/gpt-oss-120b-q4/versions/1.1.0/manifest.json +135 -0
- package/dist/catalog/chat-models/gp/gpt-oss-20b-q4/manifest.json +195 -0
- package/dist/catalog/chat-models/gp/gpt-oss-20b-q4/versions/1.1.0/manifest.json +72 -0
- package/dist/catalog/chat-models/gp/gpt-oss-20b-q4/versions/1.1.1/manifest.json +71 -0
- package/dist/catalog/chat-models/gr/granite4.2-30b-q4/manifest.json +200 -0
- package/dist/catalog/chat-models/gr/granite4.2-30b-q4/versions/1.0.0/manifest.json +72 -0
- package/dist/catalog/chat-models/gr/granite4.2-3b-q4/manifest.json +196 -0
- package/dist/catalog/chat-models/gr/granite4.2-3b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/gr/granite4.2-8b-q4/manifest.json +189 -0
- package/dist/catalog/chat-models/gr/granite4.2-8b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/index.json +1 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/manifest.json +235 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.0/manifest.json +124 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.1/manifest.json +124 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.2/manifest.json +123 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q6/manifest.json +257 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q6/versions/1.0.0/manifest.json +145 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q6/versions/1.0.1/manifest.json +145 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/manifest.json +285 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.0/manifest.json +174 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.1/manifest.json +174 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.2/manifest.json +173 -0
- package/dist/catalog/chat-models/lf/lfm2.5-2.6b-q4/manifest.json +162 -0
- package/dist/catalog/chat-models/lf/lfm2.5-2.6b-q4/versions/1.0.0/manifest.json +59 -0
- package/dist/catalog/chat-models/lf/lfm2.5-2.6b-q4/versions/1.0.1/manifest.json +58 -0
- package/dist/catalog/chat-models/ll/llama3.2-3b-q4/manifest.json +134 -0
- package/dist/catalog/chat-models/ll/llama3.2-3b-q4/versions/1.1.0/manifest.json +57 -0
- package/dist/catalog/chat-models/ll/llama3.2-3b-q4/versions/1.1.1/manifest.json +56 -0
- package/dist/catalog/chat-models/mi/minicpm5-1b-q4/manifest.json +156 -0
- package/dist/catalog/chat-models/mi/minicpm5-1b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/mi/minicpm5-2b-q4/manifest.json +161 -0
- package/dist/catalog/chat-models/mi/minicpm5-2b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/mi/mistral-7b-q4/manifest.json +159 -0
- package/dist/catalog/chat-models/mi/mistral-7b-q4/versions/1.1.0/manifest.json +62 -0
- package/dist/catalog/chat-models/mi/mistral-7b-q4/versions/1.1.1/manifest.json +61 -0
- package/dist/catalog/chat-models/mi/mistral-medium-3.5-128b-q4/manifest.json +275 -0
- package/dist/catalog/chat-models/mi/mistral-medium-3.5-128b-q4/versions/1.0.0/manifest.json +154 -0
- package/dist/catalog/chat-models/mi/mistral-medium-3.5-128b-q4/versions/1.0.1/manifest.json +153 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/manifest.json +135 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.1/manifest.json +20 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.2/manifest.json +20 -0
- package/dist/catalog/chat-models/na/nanbeige4.2-3b-q4/manifest.json +138 -0
- package/dist/catalog/chat-models/na/nanbeige4.2-3b-q4/versions/1.0.0/manifest.json +14 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/manifest.json +212 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/versions/1.0.0/manifest.json +94 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/versions/1.0.1/manifest.json +94 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/versions/1.0.2/manifest.json +93 -0
- package/dist/catalog/chat-models/ne/nemotron3-super-120b-q4/manifest.json +135 -0
- package/dist/catalog/chat-models/ne/nemotron3-super-120b-q4/versions/1.0.0/manifest.json +30 -0
- package/dist/catalog/chat-models/ne/nemotron3-super-120b-q4/versions/1.0.1/manifest.json +30 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q4/manifest.json +192 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q4/versions/1.0.0/manifest.json +74 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q4/versions/1.0.1/manifest.json +73 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q8/manifest.json +207 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q8/versions/1.0.0/manifest.json +89 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q8/versions/1.0.1/manifest.json +88 -0
- package/dist/catalog/chat-models/or/ornith-35b-q4/manifest.json +224 -0
- package/dist/catalog/chat-models/or/ornith-35b-q4/versions/1.0.0/manifest.json +94 -0
- package/dist/catalog/chat-models/or/ornith-35b-q4/versions/1.0.1/manifest.json +93 -0
- package/dist/catalog/chat-models/or/ornith-35b-q8/manifest.json +244 -0
- package/dist/catalog/chat-models/or/ornith-35b-q8/versions/1.0.0/manifest.json +114 -0
- package/dist/catalog/chat-models/or/ornith-35b-q8/versions/1.0.1/manifest.json +113 -0
- package/dist/catalog/chat-models/or/ornith-9b-q4/manifest.json +215 -0
- package/dist/catalog/chat-models/or/ornith-9b-q4/versions/1.0.0/manifest.json +84 -0
- package/dist/catalog/chat-models/or/ornith-9b-q4/versions/1.0.1/manifest.json +83 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q4/manifest.json +208 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q4/versions/1.0.0/manifest.json +74 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q8/manifest.json +223 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q8/versions/1.0.0/manifest.json +89 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q4/manifest.json +187 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q4/versions/1.0.0/manifest.json +53 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q4/versions/1.0.1/manifest.json +77 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q8/manifest.json +192 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q8/versions/1.0.0/manifest.json +58 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q8/versions/1.0.1/manifest.json +82 -0
- package/dist/catalog/chat-models/qw/qwen3.5-0.8b-q4/manifest.json +192 -0
- package/dist/catalog/chat-models/qw/qwen3.5-0.8b-q4/versions/1.0.0/manifest.json +75 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/manifest.json +315 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.0/manifest.json +164 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.1/manifest.json +164 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.2/manifest.json +164 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.3/manifest.json +163 -0
- package/dist/catalog/chat-models/qw/qwen3.5-27b-q4/manifest.json +217 -0
- package/dist/catalog/chat-models/qw/qwen3.5-27b-q4/versions/1.0.0/manifest.json +90 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/manifest.json +194 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/versions/1.1.0/manifest.json +77 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/versions/1.1.2/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/versions/1.1.3/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/manifest.json +188 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/versions/1.1.0/manifest.json +77 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/versions/1.1.2/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/versions/1.1.3/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/manifest.json +205 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/versions/1.1.0/manifest.json +82 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/versions/1.1.2/manifest.json +81 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/versions/1.1.3/manifest.json +81 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/manifest.json +230 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.0/manifest.json +92 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.4/manifest.json +91 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.5/manifest.json +91 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.6/manifest.json +115 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/manifest.json +240 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.0/manifest.json +102 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.2/manifest.json +103 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.3/manifest.json +103 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.4/manifest.json +127 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/manifest.json +233 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.0/manifest.json +92 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.1/manifest.json +93 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.2/manifest.json +93 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.3/manifest.json +117 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/manifest.json +252 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.0/manifest.json +112 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.1/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.2/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.3/manifest.json +137 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-iq1-s/manifest.json +195 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-iq1-s/versions/1.0.0/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q2/manifest.json +194 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q2/versions/1.0.0/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q3/manifest.json +194 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q3/versions/1.0.0/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q3/versions/1.0.1/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/manifest.json +291 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.1/manifest.json +93 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.2/manifest.json +92 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.3/manifest.json +116 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.4/manifest.json +116 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.5/manifest.json +116 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/manifest.json +278 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.1/manifest.json +104 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.2/manifest.json +103 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.3/manifest.json +127 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/manifest.json +278 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/versions/1.0.0/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/versions/1.0.1/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/versions/1.0.2/manifest.json +137 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq3/manifest.json +221 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq3/versions/1.0.0/manifest.json +36 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/manifest.json +429 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.0.0/manifest.json +36 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.1.0/manifest.json +205 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.1.1/manifest.json +244 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/manifest.json +203 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.0/manifest.json +21 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.1/manifest.json +31 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.2/manifest.json +30 -0
- package/dist/catalog/chat-models/raw-index.json +1 -0
- package/dist/catalog/chat-models/ta/talkie-1930-13b-q4/manifest.json +79 -0
- package/dist/catalog/chat-models/ta/talkie-1930-13b-q4/versions/1.0.0/manifest.json +15 -0
- package/dist/catalog/chat-models/ta/talkie-1930-13b-q4/versions/1.0.1/manifest.json +15 -0
- package/dist/catalog/chat-models/te/ternary-bonsai-27b-q2/manifest.json +204 -0
- package/dist/catalog/chat-models/te/ternary-bonsai-27b-q2/versions/1.0.0/manifest.json +70 -0
- package/dist/catalog/chat-models/te/ternary-bonsai-27b-q2/versions/1.0.1/manifest.json +70 -0
- package/dist/catalog/chat-models/un/underdog-saluki-27b-iq2-mix/manifest.json +164 -0
- package/dist/catalog/chat-models/un/underdog-saluki-27b-iq2-mix/versions/1.0.0/manifest.json +14 -0
- package/dist/catalog/knowledge-catalogs/be/bendyline-how-to-books/manifest.json +26 -0
- package/dist/catalog/knowledge-catalogs/be/bendyline-how-to-books/versions/2026.10.8/manifest.json +8950 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-alaska-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-alaska-part-0001/versions/2026.10.1/manifest.json +658 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-nevada-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-nevada-part-0001/versions/2026.10.1/manifest.json +666 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-300-399-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-300-399-part-0001/versions/2026.10.2/manifest.json +182 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-347-349/manifest.json +25 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-347-349/versions/2026.10.5/manifest.json +38 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0001/versions/2026.10.1/manifest.json +558 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0002/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0002/versions/2026.10.1/manifest.json +258 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0001/versions/2026.10.1/manifest.json +318 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0002/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0002/versions/2026.10.1/manifest.json +266 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0003/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0003/versions/2026.10.1/manifest.json +186 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0004/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0004/versions/2026.10.1/manifest.json +138 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0005/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0005/versions/2026.10.1/manifest.json +138 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-wyoming-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-wyoming-part-0001/versions/2026.10.3/manifest.json +626 -0
- package/dist/catalog/knowledge-catalogs/index.json +1 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-aspnet-core-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-aspnet-core-en/versions/2026.10.16/manifest.json +18270 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-ai-platform-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-ai-platform-en/versions/2026.10.16/manifest.json +1098 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-apps-compute-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-apps-compute-en/versions/2026.10.16/manifest.json +722 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-data-aiot-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-data-aiot-en/versions/2026.10.16/manifest.json +530 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-management-hybrid-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-management-hybrid-en/versions/2026.10.16/manifest.json +602 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-network-security-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-network-security-en/versions/2026.10.16/manifest.json +250 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-dotnet-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-dotnet-en/versions/2026.10.16/manifest.json +16794 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-entity-framework-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-entity-framework-en/versions/2026.10.16/manifest.json +1106 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-microsoft-365-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-microsoft-365-en/versions/2026.10.16/manifest.json +234 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-powershell-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-powershell-en/versions/2026.10.16/manifest.json +522 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-sql-server-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-sql-server-en/versions/2026.10.16/manifest.json +1850 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-apps-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-apps-en/versions/2026.10.16/manifest.json +1734 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-server-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-server-en/versions/2026.10.16/manifest.json +774 -0
- package/dist/catalog/knowledge-catalogs/raw-index.json +1 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/manifest.json +28 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.4.2/manifest.json +53 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.4.3/manifest.json +885 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.4.5/manifest.json +157 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/manifest.json +32 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.4.2/manifest.json +69 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.4.3/manifest.json +741 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.4.5/manifest.json +173 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/manifest.json +69 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/versions/2026.4.4/manifest.json +217 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/versions/2026.4.5/manifest.json +217 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/versions/2026.4.4/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.4.3/manifest.json +925 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/manifest.json +28 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.4.2/manifest.json +53 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.4.3/manifest.json +1665 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.4.5/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.4.3/manifest.json +1233 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.4.5/manifest.json +141 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.4.3/manifest.json +493 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/manifest.json +63 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/versions/2026.4.4/manifest.json +193 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/versions/2026.4.5/manifest.json +193 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/manifest.json +30 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.4.2/manifest.json +61 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.4.3/manifest.json +665 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.4.5/manifest.json +177 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.4.3/manifest.json +745 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/manifest.json +62 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/versions/2026.4.4/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/versions/2026.4.5/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/versions/2026.4.4/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/manifest.json +30 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.4.2/manifest.json +61 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.4.3/manifest.json +1253 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.4.5/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.4.3/manifest.json +1957 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/manifest.json +63 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/versions/2026.4.5/manifest.json +193 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/manifest.json +45 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/versions/2026.4.4/manifest.json +121 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/versions/2026.4.5/manifest.json +173 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/manifest.json +62 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/versions/2026.4.4/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/versions/2026.4.5/manifest.json +189 -0
- package/dist/catalog/provenance.json +8 -0
- package/dist/chat/catalog-model-lookup.d.ts +21 -0
- package/dist/chat/catalog-model-lookup.js +48 -0
- package/dist/chat/local-model-tier.d.ts +1 -0
- package/dist/chat/local-model-tier.js +2 -0
- package/dist/chat/vision-capability.d.ts +1 -0
- package/dist/chat/vision-capability.js +3 -0
- package/dist/engine-components.d.ts +30 -0
- package/dist/engine-components.js +144 -0
- package/dist/engines/electron-native-reuse.d.ts +65 -0
- package/dist/engines/electron-native-reuse.js +305 -0
- package/dist/engines/native-file-manifest.json +1320 -0
- package/dist/engines/native-manifest.d.ts +70 -0
- package/dist/engines/native-manifest.js +98 -0
- package/dist/engines/registry.d.ts +88 -0
- package/dist/engines/registry.js +217 -0
- package/dist/engines/resolver.d.ts +121 -0
- package/dist/engines/resolver.js +894 -0
- package/dist/engines/signature.d.ts +85 -0
- package/dist/engines/signature.js +231 -0
- package/dist/fs/atomic.d.ts +53 -0
- package/dist/fs/atomic.js +202 -0
- package/dist/fs/config-store.d.ts +14 -0
- package/dist/fs/config-store.js +101 -0
- package/dist/fs/home-permissions.d.ts +18 -0
- package/dist/fs/home-permissions.js +27 -0
- package/dist/fs/safe-paths.d.ts +107 -0
- package/dist/fs/safe-paths.js +264 -0
- package/dist/fs/security-json.d.ts +13 -0
- package/dist/fs/security-json.js +67 -0
- package/dist/http/auth-context.d.ts +23 -0
- package/dist/http/auth-context.js +1 -0
- package/dist/http/engine-runtime-context.d.ts +30 -0
- package/dist/http/engine-runtime-context.js +1 -0
- package/dist/http/external-conversation-contract.d.ts +49 -0
- package/dist/http/external-conversation-contract.js +1 -0
- package/dist/http/external-conversation-headers.d.ts +11 -0
- package/dist/http/external-conversation-headers.js +11 -0
- package/dist/http/inference-context.d.ts +36 -0
- package/dist/http/inference-context.js +1 -0
- package/dist/http/model-inventory-cache.d.ts +8 -0
- package/dist/http/model-inventory-cache.js +8 -0
- package/dist/http/openai-compat/action-ledger.d.ts +15 -0
- package/dist/http/openai-compat/action-ledger.js +119 -0
- package/dist/http/openai-compat/apple-model.d.ts +3 -0
- package/dist/http/openai-compat/apple-model.js +44 -0
- package/dist/http/openai-compat/caller-owned-profile.d.ts +7 -0
- package/dist/http/openai-compat/caller-owned-profile.js +18 -0
- package/dist/http/openai-compat/chat-progress.d.ts +9 -0
- package/dist/http/openai-compat/chat-progress.js +69 -0
- package/dist/http/openai-compat/chat-target.d.ts +76 -0
- package/dist/http/openai-compat/chat-target.js +97 -0
- package/dist/http/openai-compat/embeddings.d.ts +37 -0
- package/dist/http/openai-compat/embeddings.js +86 -0
- package/dist/http/openai-compat/request-tuning.d.ts +35 -0
- package/dist/http/openai-compat/request-tuning.js +87 -0
- package/dist/http/openai-compat/responses-streaming.d.ts +351 -0
- package/dist/http/openai-compat/responses-streaming.js +717 -0
- package/dist/http/openai-compat/responses-translate.d.ts +215 -0
- package/dist/http/openai-compat/responses-translate.js +377 -0
- package/dist/http/openai-compat/streaming-telemetry.d.ts +30 -0
- package/dist/http/openai-compat/streaming-telemetry.js +88 -0
- package/dist/http/openai-compat/streaming.d.ts +141 -0
- package/dist/http/openai-compat/streaming.js +687 -0
- package/dist/http/openai-compat/tool-call-stream-filter.d.ts +33 -0
- package/dist/http/openai-compat/tool-call-stream-filter.js +110 -0
- package/dist/http/openai-compat/translate.d.ts +254 -0
- package/dist/http/openai-compat/translate.js +485 -0
- package/dist/http/routes/engines.d.ts +13 -0
- package/dist/http/routes/engines.js +366 -0
- package/dist/http/routes/machine-engine-proxy.d.ts +26 -0
- package/dist/http/routes/machine-engine-proxy.js +43 -0
- package/dist/http/routes/model-bundles.d.ts +4 -0
- package/dist/http/routes/model-bundles.js +190 -0
- package/dist/http/routes/v1-chat.d.ts +72 -0
- package/dist/http/routes/v1-chat.js +645 -0
- package/dist/http/routes/v1-embeddings.d.ts +3 -0
- package/dist/http/routes/v1-embeddings.js +82 -0
- package/dist/http/routes/v1-knowledge.d.ts +4 -0
- package/dist/http/routes/v1-knowledge.js +304 -0
- package/dist/http/routes/v1-models-ensure.d.ts +32 -0
- package/dist/http/routes/v1-models-ensure.js +122 -0
- package/dist/http/routes/v1-models.d.ts +8 -0
- package/dist/http/routes/v1-models.js +189 -0
- package/dist/http/routes/v1-responses.d.ts +20 -0
- package/dist/http/routes/v1-responses.js +327 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/inference-service.d.ts +28 -0
- package/dist/inference-service.js +275 -0
- package/dist/knowledge/admission.d.ts +3 -0
- package/dist/knowledge/admission.js +22 -0
- package/dist/knowledge/bundled-catalog.d.ts +2 -0
- package/dist/knowledge/bundled-catalog.js +2 -0
- package/dist/knowledge/catalog-host.d.ts +103 -0
- package/dist/knowledge/catalog-host.js +180 -0
- package/dist/knowledge/catalog-source.d.ts +22 -0
- package/dist/knowledge/catalog-source.js +35 -0
- package/dist/knowledge/install.d.ts +55 -0
- package/dist/knowledge/install.js +274 -0
- package/dist/knowledge/manager.d.ts +287 -0
- package/dist/knowledge/manager.js +1540 -0
- package/dist/knowledge/registry.d.ts +35 -0
- package/dist/knowledge/registry.js +123 -0
- package/dist/knowledge/search-worker.d.ts +17 -0
- package/dist/knowledge/search-worker.js +36 -0
- package/dist/knowledge/shared-install-contract.d.ts +19 -0
- package/dist/knowledge/shared-install-contract.js +1 -0
- package/dist/knowledge/spatial-query.d.ts +11 -0
- package/dist/knowledge/spatial-query.js +33 -0
- package/dist/knowledge/trust-anchors.d.ts +11 -0
- package/dist/knowledge/trust-anchors.js +51 -0
- package/dist/knowledge/vector-floors.d.ts +44 -0
- package/dist/knowledge/vector-floors.js +92 -0
- package/dist/knowledge/worker-host.d.ts +9 -0
- package/dist/knowledge/worker-host.js +179 -0
- package/dist/kokoro-lexicon/LICENSE +202 -0
- package/dist/kokoro-lexicon/lexicon-gb-en.txt.gz +0 -0
- package/dist/kokoro-lexicon/lexicon-us-en.txt.gz +0 -0
- package/dist/kokoro-lexicon/manifest.json +23 -0
- package/dist/machine-engine/inspect-runtime.d.ts +3 -0
- package/dist/machine-engine/inspect-runtime.js +48 -0
- package/dist/machine-engine/knowledge-assets.d.ts +79 -0
- package/dist/machine-engine/knowledge-assets.js +505 -0
- package/dist/memory/embed-core.d.ts +131 -0
- package/dist/memory/embed-core.js +398 -0
- package/dist/memory/embed-worker.d.ts +23 -0
- package/dist/memory/embed-worker.js +49 -0
- package/dist/memory/embeddings.d.ts +105 -0
- package/dist/memory/embeddings.js +467 -0
- package/dist/model-profile/behaviors/tools-mlx-template-fix.d.ts +1 -0
- package/dist/model-profile/behaviors/tools-mlx-template-fix.js +2 -0
- package/dist/model-profile/behaviors/turn-ramble-detection.d.ts +1 -0
- package/dist/model-profile/behaviors/turn-ramble-detection.js +2 -0
- package/dist/model-profile/defaults.d.ts +1 -0
- package/dist/model-profile/defaults.js +2 -0
- package/dist/model-profile/index.d.ts +9 -0
- package/dist/model-profile/index.js +7 -0
- package/dist/model-profile/registry.d.ts +15 -0
- package/dist/model-profile/registry.js +18 -0
- package/dist/model-profile/runtime.d.ts +48 -0
- package/dist/model-profile/runtime.js +131 -0
- package/dist/model-profile/tool-grammar.d.ts +1 -0
- package/dist/model-profile/tool-grammar.js +2 -0
- package/dist/model-profile/tuning.d.ts +19 -0
- package/dist/model-profile/tuning.js +21 -0
- package/dist/model-profile/types.d.ts +1 -0
- package/dist/model-profile/types.js +2 -0
- package/dist/models/bundle-storage.d.ts +28 -0
- package/dist/models/bundle-storage.js +80 -0
- package/dist/models/catalog-drift.d.ts +48 -0
- package/dist/models/catalog-drift.js +94 -0
- package/dist/models/catalog-payload-identity.d.ts +107 -0
- package/dist/models/catalog-payload-identity.js +254 -0
- package/dist/models/ensure.d.ts +125 -0
- package/dist/models/ensure.js +205 -0
- package/dist/models/gezmodel.d.ts +47 -0
- package/dist/models/gezmodel.js +742 -0
- package/dist/models/install-registry.d.ts +101 -0
- package/dist/models/install-registry.js +216 -0
- package/dist/models/model-id.d.ts +22 -0
- package/dist/models/model-id.js +40 -0
- package/dist/models/storage-roots.d.ts +274 -0
- package/dist/models/storage-roots.js +865 -0
- package/dist/native-release-entry.d.ts +16 -0
- package/dist/native-release-entry.js +16 -0
- package/dist/perf/redact-path.d.ts +2 -0
- package/dist/perf/redact-path.js +27 -0
- package/dist/perf/responsiveness.d.ts +70 -0
- package/dist/perf/responsiveness.js +560 -0
- package/dist/providers/active-install-message.d.ts +42 -0
- package/dist/providers/active-install-message.js +49 -0
- package/dist/providers/apple-foundation-models/binary.d.ts +4 -0
- package/dist/providers/apple-foundation-models/binary.js +18 -0
- package/dist/providers/apple-foundation-models/helper.d.ts +66 -0
- package/dist/providers/apple-foundation-models/helper.js +262 -0
- package/dist/providers/apple-foundation-models/provider.d.ts +82 -0
- package/dist/providers/apple-foundation-models/provider.js +389 -0
- package/dist/providers/apple-foundation-models/status.d.ts +9 -0
- package/dist/providers/apple-foundation-models/status.js +49 -0
- package/dist/providers/audio/kokoro-frontend.d.ts +50 -0
- package/dist/providers/audio/kokoro-frontend.js +113 -0
- package/dist/providers/audio/managed-speech-model.d.ts +9 -0
- package/dist/providers/audio/managed-speech-model.js +86 -0
- package/dist/providers/audio/types.d.ts +202 -0
- package/dist/providers/audio/types.js +17 -0
- package/dist/providers/audio/whisper-cpp.d.ts +99 -0
- package/dist/providers/audio/whisper-cpp.js +420 -0
- package/dist/providers/audio-persister-contract.d.ts +13 -0
- package/dist/providers/audio-persister-contract.js +1 -0
- package/dist/providers/catalog-model-config.d.ts +63 -0
- package/dist/providers/catalog-model-config.js +95 -0
- package/dist/providers/code-block-salvage.d.ts +1 -0
- package/dist/providers/code-block-salvage.js +2 -0
- package/dist/providers/codex-cli/reasoning.d.ts +8 -0
- package/dist/providers/codex-cli/reasoning.js +17 -0
- package/dist/providers/complete-tool-call.d.ts +16 -0
- package/dist/providers/complete-tool-call.js +25 -0
- package/dist/providers/constrained-turn.d.ts +1 -0
- package/dist/providers/constrained-turn.js +2 -0
- package/dist/providers/deliverable-read-pacing.d.ts +1 -0
- package/dist/providers/deliverable-read-pacing.js +2 -0
- package/dist/providers/direct-file-work-prompt.d.ts +1 -0
- package/dist/providers/direct-file-work-prompt.js +2 -0
- package/dist/providers/ds4/build-provider.d.ts +100 -0
- package/dist/providers/ds4/build-provider.js +539 -0
- package/dist/providers/ds4/cache-adapter.d.ts +42 -0
- package/dist/providers/ds4/cache-adapter.js +110 -0
- package/dist/providers/ds4/dspark.d.ts +83 -0
- package/dist/providers/ds4/dspark.js +107 -0
- package/dist/providers/ds4/mtp.d.ts +32 -0
- package/dist/providers/ds4/mtp.js +46 -0
- package/dist/providers/ds4/provider.d.ts +67 -0
- package/dist/providers/ds4/provider.js +104 -0
- package/dist/providers/ds4/residency.d.ts +143 -0
- package/dist/providers/ds4/residency.js +139 -0
- package/dist/providers/ds4/stdout-parser.d.ts +47 -0
- package/dist/providers/ds4/stdout-parser.js +134 -0
- package/dist/providers/duplicate-tool-calls.d.ts +1 -0
- package/dist/providers/duplicate-tool-calls.js +2 -0
- package/dist/providers/file-repair-policy.d.ts +1 -0
- package/dist/providers/file-repair-policy.js +2 -0
- package/dist/providers/gpu-arbiter.d.ts +159 -0
- package/dist/providers/gpu-arbiter.js +301 -0
- package/dist/providers/image-persister-contract.d.ts +15 -0
- package/dist/providers/image-persister-contract.js +1 -0
- package/dist/providers/llama-cpp/build-metadata.d.ts +13 -0
- package/dist/providers/llama-cpp/build-metadata.js +39 -0
- package/dist/providers/llama-cpp/build-provider.d.ts +66 -0
- package/dist/providers/llama-cpp/build-provider.js +1491 -0
- package/dist/providers/llama-cpp/cache-adapter.d.ts +242 -0
- package/dist/providers/llama-cpp/cache-adapter.js +689 -0
- package/dist/providers/llama-cpp/devices.d.ts +130 -0
- package/dist/providers/llama-cpp/devices.js +256 -0
- package/dist/providers/llama-cpp/disk-cache.d.ts +8 -0
- package/dist/providers/llama-cpp/disk-cache.js +112 -0
- package/dist/providers/llama-cpp/engine-flags.d.ts +181 -0
- package/dist/providers/llama-cpp/engine-flags.js +279 -0
- package/dist/providers/llama-cpp/gguf-metadata-async.d.ts +11 -0
- package/dist/providers/llama-cpp/gguf-metadata-async.js +180 -0
- package/dist/providers/llama-cpp/gguf-metadata-worker.d.ts +7 -0
- package/dist/providers/llama-cpp/gguf-metadata-worker.js +27 -0
- package/dist/providers/llama-cpp/gguf-metadata.d.ts +198 -0
- package/dist/providers/llama-cpp/gguf-metadata.js +615 -0
- package/dist/providers/llama-cpp/gguf-quantization-backfill.d.ts +32 -0
- package/dist/providers/llama-cpp/gguf-quantization-backfill.js +75 -0
- package/dist/providers/llama-cpp/index.d.ts +10 -0
- package/dist/providers/llama-cpp/index.js +13 -0
- package/dist/providers/llama-cpp/kv-cache-type.d.ts +118 -0
- package/dist/providers/llama-cpp/kv-cache-type.js +140 -0
- package/dist/providers/llama-cpp/log.d.ts +92 -0
- package/dist/providers/llama-cpp/log.js +280 -0
- package/dist/providers/llama-cpp/models.d.ts +389 -0
- package/dist/providers/llama-cpp/models.js +1011 -0
- package/dist/providers/llama-cpp/offload-planner.d.ts +339 -0
- package/dist/providers/llama-cpp/offload-planner.js +524 -0
- package/dist/providers/llama-cpp/provider.d.ts +493 -0
- package/dist/providers/llama-cpp/provider.js +862 -0
- package/dist/providers/llama-cpp/reasoning-launch.d.ts +7 -0
- package/dist/providers/llama-cpp/reasoning-launch.js +14 -0
- package/dist/providers/llama-cpp/spec-draft.d.ts +44 -0
- package/dist/providers/llama-cpp/spec-draft.js +44 -0
- package/dist/providers/llama-cpp/stdout-parser.d.ts +70 -0
- package/dist/providers/llama-cpp/stdout-parser.js +197 -0
- package/dist/providers/local-tool-call-salvage.d.ts +1 -0
- package/dist/providers/local-tool-call-salvage.js +2 -0
- package/dist/providers/local-turn-policy.d.ts +1 -0
- package/dist/providers/local-turn-policy.js +2 -0
- package/dist/providers/mlx/async-file-handoff.d.ts +11 -0
- package/dist/providers/mlx/async-file-handoff.js +25 -0
- package/dist/providers/mlx/build-provider.d.ts +65 -0
- package/dist/providers/mlx/build-provider.js +717 -0
- package/dist/providers/mlx/cache-adapter.d.ts +161 -0
- package/dist/providers/mlx/cache-adapter.js +445 -0
- package/dist/providers/mlx/chat-protocol.d.ts +48 -0
- package/dist/providers/mlx/chat-protocol.js +8 -0
- package/dist/providers/mlx/config-parser.d.ts +29 -0
- package/dist/providers/mlx/config-parser.js +81 -0
- package/dist/providers/mlx/engine-gate.d.ts +51 -0
- package/dist/providers/mlx/engine-gate.js +207 -0
- package/dist/providers/mlx/engine-hold.d.ts +41 -0
- package/dist/providers/mlx/engine-hold.js +59 -0
- package/dist/providers/mlx/engine-log-router.d.ts +84 -0
- package/dist/providers/mlx/engine-log-router.js +137 -0
- package/dist/providers/mlx/engine-stats-sampler.d.ts +36 -0
- package/dist/providers/mlx/engine-stats-sampler.js +59 -0
- package/dist/providers/mlx/index.d.ts +10 -0
- package/dist/providers/mlx/index.js +10 -0
- package/dist/providers/mlx/log.d.ts +55 -0
- package/dist/providers/mlx/log.js +157 -0
- package/dist/providers/mlx/model-geometry.d.ts +35 -0
- package/dist/providers/mlx/model-geometry.js +118 -0
- package/dist/providers/mlx/models.d.ts +289 -0
- package/dist/providers/mlx/models.js +1079 -0
- package/dist/providers/mlx/provider.d.ts +404 -0
- package/dist/providers/mlx/provider.js +3017 -0
- package/dist/providers/mlx/python/cache_persist.py +348 -0
- package/dist/providers/mlx/python/cache_seed.py +402 -0
- package/dist/providers/mlx/python/gezel_mlx_server.py +4491 -0
- package/dist/providers/mlx/python/lfm2_compat.py +55 -0
- package/dist/providers/mlx/python/qwen3_5_text_compat.py +60 -0
- package/dist/providers/mlx/python/qwen4_ple.py +159 -0
- package/dist/providers/mlx/python/spec_decode.py +775 -0
- package/dist/providers/mlx/python/template_stability.py +133 -0
- package/dist/providers/mlx/python/think_budget.py +113 -0
- package/dist/providers/mlx/python/tool_args_json.py +297 -0
- package/dist/providers/mlx/python/tool_call_stream.py +265 -0
- package/dist/providers/mlx/python/tool_grammar.py +794 -0
- package/dist/providers/mlx/python/vision_inputs.py +64 -0
- package/dist/providers/mlx/python/wave_policy.py +147 -0
- package/dist/providers/mlx/reasoning-stream.d.ts +85 -0
- package/dist/providers/mlx/reasoning-stream.js +196 -0
- package/dist/providers/mlx/request-shape.d.ts +34 -0
- package/dist/providers/mlx/request-shape.js +42 -0
- package/dist/providers/mlx/runtime-diagnostics.d.ts +29 -0
- package/dist/providers/mlx/runtime-diagnostics.js +162 -0
- package/dist/providers/mlx/spec-drafter.d.ts +25 -0
- package/dist/providers/mlx/spec-drafter.js +73 -0
- package/dist/providers/mlx/stdout-parser.d.ts +60 -0
- package/dist/providers/mlx/stdout-parser.js +254 -0
- package/dist/providers/mlx/textual-tool-call-salvage.d.ts +46 -0
- package/dist/providers/mlx/textual-tool-call-salvage.js +396 -0
- package/dist/providers/mlx/tool-call-protocol.d.ts +65 -0
- package/dist/providers/mlx/tool-call-protocol.js +140 -0
- package/dist/providers/mlx/tool-call-stripper.d.ts +68 -0
- package/dist/providers/mlx/tool-call-stripper.js +153 -0
- package/dist/providers/mlx/tool-image-retention.d.ts +23 -0
- package/dist/providers/mlx/tool-image-retention.js +43 -0
- package/dist/providers/mlx/turn-telemetry.d.ts +22 -0
- package/dist/providers/mlx/turn-telemetry.js +45 -0
- package/dist/providers/mlx/venv.d.ts +91 -0
- package/dist/providers/mlx/venv.js +111 -0
- package/dist/providers/mlx/vision-mode.d.ts +92 -0
- package/dist/providers/mlx/vision-mode.js +187 -0
- package/dist/providers/mlx/vision.d.ts +2 -0
- package/dist/providers/mlx/vision.js +12 -0
- package/dist/providers/mlx/wire-transcript.d.ts +14 -0
- package/dist/providers/mlx/wire-transcript.js +43 -0
- package/dist/providers/native/capacity-broker.d.ts +812 -0
- package/dist/providers/native/capacity-broker.js +1058 -0
- package/dist/providers/native/capacity-budget.d.ts +133 -0
- package/dist/providers/native/capacity-budget.js +265 -0
- package/dist/providers/native/device-capacity-ledger.d.ts +31 -0
- package/dist/providers/native/device-capacity-ledger.js +196 -0
- package/dist/providers/native/device-capacity.d.ts +84 -0
- package/dist/providers/native/device-capacity.js +431 -0
- package/dist/providers/native/engine-api-key.d.ts +57 -0
- package/dist/providers/native/engine-api-key.js +72 -0
- package/dist/providers/native/engine-key.d.ts +18 -0
- package/dist/providers/native/engine-key.js +41 -0
- package/dist/providers/native/engine-router.d.ts +145 -0
- package/dist/providers/native/engine-router.js +191 -0
- package/dist/providers/native/gpu-panic-guard.d.ts +54 -0
- package/dist/providers/native/gpu-panic-guard.js +59 -0
- package/dist/providers/native/inference.d.ts +33 -0
- package/dist/providers/native/inference.js +49 -0
- package/dist/providers/native/local-engine-runtime.d.ts +412 -0
- package/dist/providers/native/local-engine-runtime.js +1714 -0
- package/dist/providers/native/measured-budget.d.ts +32 -0
- package/dist/providers/native/measured-budget.js +54 -0
- package/dist/providers/native/port.d.ts +11 -0
- package/dist/providers/native/port.js +29 -0
- package/dist/providers/native/provider-pool.d.ts +474 -0
- package/dist/providers/native/provider-pool.js +1166 -0
- package/dist/providers/native/supervisor.d.ts +503 -0
- package/dist/providers/native/supervisor.js +1466 -0
- package/dist/providers/observation-context.d.ts +16 -0
- package/dist/providers/observation-context.js +1 -0
- package/dist/providers/openai-compatible/sse.d.ts +1 -0
- package/dist/providers/openai-compatible/sse.js +2 -0
- package/dist/providers/patient-fetch.d.ts +36 -0
- package/dist/providers/patient-fetch.js +44 -0
- package/dist/providers/project-macro-loop-bail.d.ts +7 -0
- package/dist/providers/project-macro-loop-bail.js +21 -0
- package/dist/providers/prose-document-salvage.d.ts +1 -0
- package/dist/providers/prose-document-salvage.js +2 -0
- package/dist/providers/provider-disposal.d.ts +1 -0
- package/dist/providers/provider-disposal.js +2 -0
- package/dist/providers/queue.d.ts +15 -0
- package/dist/providers/queue.js +23 -0
- package/dist/providers/ramble-abort-message.d.ts +1 -0
- package/dist/providers/ramble-abort-message.js +2 -0
- package/dist/providers/ramble-detector.d.ts +1 -0
- package/dist/providers/ramble-detector.js +2 -0
- package/dist/providers/reasoning-depth.d.ts +1 -0
- package/dist/providers/reasoning-depth.js +2 -0
- package/dist/providers/required-input-reads.d.ts +1 -0
- package/dist/providers/required-input-reads.js +2 -0
- package/dist/providers/session-defaults.d.ts +13 -0
- package/dist/providers/session-defaults.js +49 -0
- package/dist/providers/session-hooks.d.ts +26 -0
- package/dist/providers/session-hooks.js +1 -0
- package/dist/providers/streaming-session.d.ts +1 -0
- package/dist/providers/streaming-session.js +2 -0
- package/dist/providers/terminal-tool-policy.d.ts +1 -0
- package/dist/providers/terminal-tool-policy.js +2 -0
- package/dist/providers/tool-arg-schema-coercion.d.ts +1 -0
- package/dist/providers/tool-arg-schema-coercion.js +2 -0
- package/dist/providers/tool-executor.d.ts +12 -0
- package/dist/providers/tool-executor.js +20 -0
- package/dist/providers/tool-failure-tracker.d.ts +1 -0
- package/dist/providers/tool-failure-tracker.js +2 -0
- package/dist/providers/tool-repeat-tracker.d.ts +1 -0
- package/dist/providers/tool-repeat-tracker.js +2 -0
- package/dist/providers/turn-timeout.d.ts +1 -0
- package/dist/providers/turn-timeout.js +1 -0
- package/dist/providers/types.d.ts +834 -0
- package/dist/providers/types.js +42 -0
- package/dist/providers/usage-builder.d.ts +1 -0
- package/dist/providers/usage-builder.js +2 -0
- package/dist/providers/vision-capability.d.ts +109 -0
- package/dist/providers/vision-capability.js +137 -0
- package/dist/python/mlx-runtime-status-bus.d.ts +39 -0
- package/dist/python/mlx-runtime-status-bus.js +27 -0
- package/dist/python/uv-runtime.d.ts +176 -0
- package/dist/python/uv-runtime.js +492 -0
- package/dist/relevance/install.d.ts +28 -0
- package/dist/relevance/install.js +114 -0
- package/dist/relevance/manager.d.ts +79 -0
- package/dist/relevance/manager.js +211 -0
- package/dist/relevance/registry.d.ts +11 -0
- package/dist/relevance/registry.js +158 -0
- package/dist/relevance/relevance-core.d.ts +67 -0
- package/dist/relevance/relevance-core.js +189 -0
- package/dist/relevance/relevance-model.d.ts +42 -0
- package/dist/relevance/relevance-model.js +292 -0
- package/dist/relevance/relevance-worker.d.ts +20 -0
- package/dist/relevance/relevance-worker.js +57 -0
- package/dist/relevance/settings.d.ts +30 -0
- package/dist/relevance/settings.js +81 -0
- package/dist/remotes/identity.d.ts +121 -0
- package/dist/remotes/identity.js +348 -0
- package/dist/remotes/pinned-fetch.d.ts +45 -0
- package/dist/remotes/pinned-fetch.js +193 -0
- package/dist/remotes/types.d.ts +54 -0
- package/dist/remotes/types.js +1 -0
- package/dist/runtime-lock.d.ts +29 -0
- package/dist/runtime-lock.js +85 -0
- package/dist/search/relevance-stage.d.ts +81 -0
- package/dist/search/relevance-stage.js +177 -0
- package/dist/secrets/types.d.ts +63 -0
- package/dist/secrets/types.js +64 -0
- package/dist/speech.d.ts +1 -0
- package/dist/speech.js +1 -0
- package/dist/system/darwin-memory.d.ts +26 -0
- package/dist/system/darwin-memory.js +81 -0
- package/dist/system/gezel-process-memory.d.ts +55 -0
- package/dist/system/gezel-process-memory.js +156 -0
- package/dist/system/memory.d.ts +154 -0
- package/dist/system/memory.js +501 -0
- package/dist/transformers-cache.d.ts +112 -0
- package/dist/transformers-cache.js +392 -0
- package/dist/utils/disk-space.d.ts +55 -0
- package/dist/utils/disk-space.js +72 -0
- package/dist/utils/download-common.d.ts +138 -0
- package/dist/utils/download-common.js +196 -0
- package/dist/utils/download-with-retry.d.ts +85 -0
- package/dist/utils/download-with-retry.js +522 -0
- package/dist/utils/extract-zip.d.ts +22 -0
- package/dist/utils/extract-zip.js +103 -0
- package/dist/utils/retire-model-worker.d.ts +15 -0
- package/dist/utils/retire-model-worker.js +24 -0
- package/dist/utils/service-worker-entry.d.ts +59 -0
- package/dist/utils/service-worker-entry.js +69 -0
- package/dist/utils/xet-download.d.ts +40 -0
- package/dist/utils/xet-download.js +526 -0
- package/dist/utils/xet.d.ts +86 -0
- package/dist/utils/xet.js +201 -0
- package/package.json +103 -3
- package/scripts/embedding-packaging.cjs +264 -0
- package/scripts/embedding-packaging.d.cts +16 -0
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared cache-dir pinning for every `@huggingface/transformers` consumer
|
|
3
|
+
* in the service (kokoro TTS + memory embeddings).
|
|
4
|
+
*
|
|
5
|
+
* transformers.js v3 derives its model cache dir from the transformers
|
|
6
|
+
* module's OWN on-disk location (`<module>/../.cache/`) and has NO env-var
|
|
7
|
+
* override — it ignores `TRANSFORMERS_CACHE`. In a packaged/bundled runtime
|
|
8
|
+
* that directory isn't writable, so a downloaded model never lands as a
|
|
9
|
+
* cached file and the Node ONNX path-resolver throws "Unable to get model
|
|
10
|
+
* file path or buffer". Pinning `env.cacheDir` to a writable, gezel-managed
|
|
11
|
+
* dir before the first `from_pretrained` / `pipeline` call fixes it.
|
|
12
|
+
*
|
|
13
|
+
* Both consumers import the same ESM-node transformers build
|
|
14
|
+
* (`transformers.node.mjs`), so the `env` object we mutate here is the one
|
|
15
|
+
* the model loader reads `cacheDir` from at download time.
|
|
16
|
+
*/
|
|
17
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
18
|
+
import { createReadStream } from 'node:fs';
|
|
19
|
+
import { mkdir, open, readFile, readdir, rename, rm, stat, writeFile } from 'node:fs/promises';
|
|
20
|
+
import { basename, dirname, join, resolve } from 'node:path';
|
|
21
|
+
import { createLogger } from '@bendyline/gezel';
|
|
22
|
+
import { isPathInside } from './fs/safe-paths.js';
|
|
23
|
+
const log = createLogger('service');
|
|
24
|
+
/**
|
|
25
|
+
* Env var carrying the resolved cache dir to processes that don't otherwise
|
|
26
|
+
* know the gezel home — notably the embed worker thread, which inherits
|
|
27
|
+
* `process.env` at spawn. Set once at service boot.
|
|
28
|
+
*/
|
|
29
|
+
export const HF_CACHE_DIR_ENV = 'GEZEL_HF_CACHE_DIR';
|
|
30
|
+
/** Shared writable HF/transformers cache root for on-device model files. */
|
|
31
|
+
export function transformersCacheDir(home) {
|
|
32
|
+
return join(home, 'engines', 'hf-cache');
|
|
33
|
+
}
|
|
34
|
+
/** The optional peer both TTS and memory embeddings load lazily. */
|
|
35
|
+
export const TRANSFORMERS_MODULE = '@huggingface/transformers';
|
|
36
|
+
const DEFAULT_MODEL_LOCK_TIMEOUT_MS = 10 * 60 * 1_000;
|
|
37
|
+
const DEFAULT_MODEL_LOCK_STALE_MS = 2 * 60 * 60 * 1_000;
|
|
38
|
+
const DEFAULT_MODEL_LOCK_POLL_MS = 100;
|
|
39
|
+
function modelLockDir(cacheDir, modelId) {
|
|
40
|
+
const key = createHash('sha256').update(modelId, 'utf8').digest('hex').slice(0, 24);
|
|
41
|
+
return join(cacheDir, '.gezel-locks', `${key}.lock`);
|
|
42
|
+
}
|
|
43
|
+
function cacheModelDir(cacheDir, modelId) {
|
|
44
|
+
const parts = modelId.split('/');
|
|
45
|
+
if (parts.length === 0 ||
|
|
46
|
+
parts.some((part) => !part || part === '.' || part === '..' || part.includes('\\'))) {
|
|
47
|
+
throw new Error(`refusing unsafe transformers model id: ${modelId}`);
|
|
48
|
+
}
|
|
49
|
+
const root = resolve(cacheDir);
|
|
50
|
+
const target = resolve(root, ...parts);
|
|
51
|
+
if (target === root || !isPathInside(target, root)) {
|
|
52
|
+
throw new Error(`refusing transformers cache path outside ${root}: ${modelId}`);
|
|
53
|
+
}
|
|
54
|
+
return target;
|
|
55
|
+
}
|
|
56
|
+
function errorCode(err) {
|
|
57
|
+
return err?.code;
|
|
58
|
+
}
|
|
59
|
+
function delay(ms) {
|
|
60
|
+
return new Promise((resolveDelay) => setTimeout(resolveDelay, ms));
|
|
61
|
+
}
|
|
62
|
+
function processAlive(pid) {
|
|
63
|
+
try {
|
|
64
|
+
process.kill(pid, 0);
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
return errorCode(err) !== 'ESRCH';
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
async function lockOwnerPid(lockDir) {
|
|
72
|
+
try {
|
|
73
|
+
const owner = JSON.parse(await readFile(join(lockDir, 'owner.json'), 'utf8'));
|
|
74
|
+
return typeof owner.pid === 'number' && Number.isInteger(owner.pid) && owner.pid > 0
|
|
75
|
+
? owner.pid
|
|
76
|
+
: null;
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
async function staleOrMissing(lockDir, staleMs) {
|
|
83
|
+
try {
|
|
84
|
+
const info = await stat(lockDir);
|
|
85
|
+
if (Date.now() - info.mtimeMs > staleMs)
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
if (errorCode(err) === 'ENOENT')
|
|
90
|
+
return true;
|
|
91
|
+
throw err;
|
|
92
|
+
}
|
|
93
|
+
// A holder killed mid-download (a quit during first run) never reaches its
|
|
94
|
+
// `finally`. Waiting out the age limit would keep semantic memory off for
|
|
95
|
+
// hours after the relaunch, so a lock whose owner is gone is stale now.
|
|
96
|
+
const pid = await lockOwnerPid(lockDir);
|
|
97
|
+
return pid !== null && !processAlive(pid);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Serialize first-use model downloads across service/Vitest processes sharing
|
|
101
|
+
* one transformers cache. `pipelinePromise` prevents duplicate loads inside a
|
|
102
|
+
* process; this directory lock closes the remaining cross-process race where
|
|
103
|
+
* two fetches could replace the same ONNX file and leave one worker parsing a
|
|
104
|
+
* partial protobuf.
|
|
105
|
+
*/
|
|
106
|
+
export async function withTransformersModelCacheLock(cacheDir, modelId, run, options = {}) {
|
|
107
|
+
const timeoutMs = options.timeoutMs ?? DEFAULT_MODEL_LOCK_TIMEOUT_MS;
|
|
108
|
+
const staleMs = options.staleMs ?? DEFAULT_MODEL_LOCK_STALE_MS;
|
|
109
|
+
const pollMs = options.pollMs ?? DEFAULT_MODEL_LOCK_POLL_MS;
|
|
110
|
+
const lockDir = modelLockDir(cacheDir, modelId);
|
|
111
|
+
await mkdir(dirname(lockDir), { recursive: true });
|
|
112
|
+
const startedAt = Date.now();
|
|
113
|
+
while (true) {
|
|
114
|
+
try {
|
|
115
|
+
await mkdir(lockDir);
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
catch (err) {
|
|
119
|
+
if (errorCode(err) !== 'EEXIST')
|
|
120
|
+
throw err;
|
|
121
|
+
if (await staleOrMissing(lockDir, staleMs)) {
|
|
122
|
+
await rm(lockDir, { recursive: true, force: true });
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
if (Date.now() - startedAt >= timeoutMs) {
|
|
126
|
+
throw new Error(`timed out waiting for transformers cache lock for ${modelId}`);
|
|
127
|
+
}
|
|
128
|
+
await delay(pollMs);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
try {
|
|
132
|
+
await writeFile(join(lockDir, 'owner.json'), `${JSON.stringify({ pid: process.pid, modelId, acquiredAt: new Date().toISOString() })}\n`);
|
|
133
|
+
return await run();
|
|
134
|
+
}
|
|
135
|
+
finally {
|
|
136
|
+
await rm(lockDir, { recursive: true, force: true });
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/** Remove only the named repository directory after a proven cache parse failure. */
|
|
140
|
+
export async function removeTransformersModelCache(cacheDir, modelId) {
|
|
141
|
+
await rm(cacheModelDir(cacheDir, modelId), { recursive: true, force: true });
|
|
142
|
+
}
|
|
143
|
+
/** Failures that mean retrying against the same cached bytes cannot succeed. */
|
|
144
|
+
export function isCorruptTransformersCacheFailure(error) {
|
|
145
|
+
const messages = [];
|
|
146
|
+
let current = error;
|
|
147
|
+
for (let depth = 0; depth < 6 && current; depth++) {
|
|
148
|
+
messages.push(current instanceof Error ? current.message : String(current));
|
|
149
|
+
current = current instanceof Error ? current.cause : undefined;
|
|
150
|
+
}
|
|
151
|
+
return /(?:protobuf parsing failed|failed to parse protobuf|invalid protobuf|unexpected end of (?:file|data)|failed to load model|load model .* failed|invalid wire type)/i.test(messages.join(' '));
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Load a model under its cross-process lock, replacing only its repository
|
|
155
|
+
* cache and retrying once when the first load proves those bytes corrupt.
|
|
156
|
+
*/
|
|
157
|
+
export async function loadTransformersModelWithCacheRecovery(cacheDir, modelId, load, onCorrupt) {
|
|
158
|
+
return withTransformersModelCacheLock(cacheDir, modelId, async () => {
|
|
159
|
+
try {
|
|
160
|
+
return await load();
|
|
161
|
+
}
|
|
162
|
+
catch (err) {
|
|
163
|
+
if (!isCorruptTransformersCacheFailure(err))
|
|
164
|
+
throw err;
|
|
165
|
+
await onCorrupt?.();
|
|
166
|
+
await removeTransformersModelCache(cacheDir, modelId);
|
|
167
|
+
return await load();
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* A model file gezel downloaded itself did not arrive whole or did not match
|
|
173
|
+
* its pin. Nothing was written to the cache path, so a later attempt starts
|
|
174
|
+
* clean.
|
|
175
|
+
*/
|
|
176
|
+
export class ModelFileDownloadError extends Error {
|
|
177
|
+
constructor(message) {
|
|
178
|
+
super(message);
|
|
179
|
+
this.name = 'ModelFileDownloadError';
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
const VERIFIED_MARKER_SUFFIX = '.gezel-verified';
|
|
183
|
+
const PARTIAL_DOWNLOAD_INFIX = '.download-';
|
|
184
|
+
function cacheFilePath(cacheDir, modelId, file) {
|
|
185
|
+
const parts = file.split('/');
|
|
186
|
+
if (parts.some((part) => !part || part === '.' || part === '..' || part.includes('\\'))) {
|
|
187
|
+
throw new Error(`refusing unsafe model file path: ${file}`);
|
|
188
|
+
}
|
|
189
|
+
const repo = cacheModelDir(cacheDir, modelId);
|
|
190
|
+
const target = resolve(repo, ...parts);
|
|
191
|
+
if (!isPathInside(target, repo)) {
|
|
192
|
+
throw new Error(`refusing model file path outside ${repo}: ${file}`);
|
|
193
|
+
}
|
|
194
|
+
return target;
|
|
195
|
+
}
|
|
196
|
+
function remoteFileUrl(source, modelId, pinned) {
|
|
197
|
+
const host = source.remoteHost.endsWith('/') ? source.remoteHost : `${source.remoteHost}/`;
|
|
198
|
+
const template = source.remotePathTemplate
|
|
199
|
+
.replaceAll('{model}', modelId)
|
|
200
|
+
.replaceAll('{revision}', encodeURIComponent(pinned.revision));
|
|
201
|
+
const path = template.endsWith('/') ? template : `${template}/`;
|
|
202
|
+
return `${host}${path.replace(/^\/+/, '')}${pinned.file}`;
|
|
203
|
+
}
|
|
204
|
+
async function sha256File(path) {
|
|
205
|
+
const hash = createHash('sha256');
|
|
206
|
+
for await (const chunk of createReadStream(path))
|
|
207
|
+
hash.update(chunk);
|
|
208
|
+
return `sha256:${hash.digest('hex')}`;
|
|
209
|
+
}
|
|
210
|
+
async function markerVouches(marker, target, digest) {
|
|
211
|
+
try {
|
|
212
|
+
const recorded = JSON.parse(await readFile(marker, 'utf8'));
|
|
213
|
+
const info = await stat(target);
|
|
214
|
+
return (recorded.digest === digest && recorded.size === info.size && recorded.mtimeMs === info.mtimeMs);
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
async function writeMarker(marker, target, digest) {
|
|
221
|
+
const info = await stat(target);
|
|
222
|
+
const record = { digest, size: info.size, mtimeMs: info.mtimeMs };
|
|
223
|
+
await writeFile(marker, `${JSON.stringify(record)}\n`);
|
|
224
|
+
}
|
|
225
|
+
/** Leftovers of a download that died with its process; only safe while holding the model lock. */
|
|
226
|
+
async function sweepPartialDownloads(target) {
|
|
227
|
+
const prefix = `${basename(target)}${PARTIAL_DOWNLOAD_INFIX}`;
|
|
228
|
+
const names = await readdir(dirname(target)).catch(() => []);
|
|
229
|
+
await Promise.all(names
|
|
230
|
+
.filter((name) => name.startsWith(prefix))
|
|
231
|
+
.map((name) => rm(join(dirname(target), name), { force: true }).catch(() => { })));
|
|
232
|
+
}
|
|
233
|
+
async function downloadVerified(url, target, pinned, fetchImpl) {
|
|
234
|
+
const partial = `${target}${PARTIAL_DOWNLOAD_INFIX}${process.pid}-${randomUUID().slice(0, 8)}`;
|
|
235
|
+
let handle;
|
|
236
|
+
try {
|
|
237
|
+
const response = await fetchImpl(url);
|
|
238
|
+
if (!response.ok || !response.body) {
|
|
239
|
+
throw new Error(`HTTP ${response.status} downloading ${pinned.file}`);
|
|
240
|
+
}
|
|
241
|
+
const encoding = response.headers.get('content-encoding');
|
|
242
|
+
const declared = Number(response.headers.get('content-length') ?? Number.NaN);
|
|
243
|
+
const expected = !encoding || encoding === 'identity' ? declared : Number.NaN;
|
|
244
|
+
handle = await open(partial, 'wx');
|
|
245
|
+
const hash = createHash('sha256');
|
|
246
|
+
let received = 0;
|
|
247
|
+
for await (const chunk of response.body) {
|
|
248
|
+
hash.update(chunk);
|
|
249
|
+
received += chunk.byteLength;
|
|
250
|
+
let offset = 0;
|
|
251
|
+
while (offset < chunk.byteLength) {
|
|
252
|
+
const { bytesWritten } = await handle.write(chunk, offset, chunk.byteLength - offset);
|
|
253
|
+
offset += bytesWritten;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
await handle.sync();
|
|
257
|
+
await handle.close();
|
|
258
|
+
handle = undefined;
|
|
259
|
+
if (Number.isFinite(expected) && received !== expected) {
|
|
260
|
+
throw new ModelFileDownloadError(`download of ${pinned.file} stopped at ${received} of ${expected} bytes`);
|
|
261
|
+
}
|
|
262
|
+
const actual = `sha256:${hash.digest('hex')}`;
|
|
263
|
+
if (actual !== pinned.digest) {
|
|
264
|
+
throw new ModelFileDownloadError(`download of ${pinned.file} does not match its pin (got ${actual})`);
|
|
265
|
+
}
|
|
266
|
+
await rename(partial, target);
|
|
267
|
+
}
|
|
268
|
+
catch (err) {
|
|
269
|
+
await handle?.close().catch(() => { });
|
|
270
|
+
await rm(partial, { force: true }).catch(() => { });
|
|
271
|
+
throw err;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Make sure a pinned model file sits in the transformers cache whole.
|
|
276
|
+
*
|
|
277
|
+
* transformers.js streams a download straight into its final cache path and
|
|
278
|
+
* hands that path to onnxruntime, so a reader that arrives mid-write parses
|
|
279
|
+
* part of a protobuf. The failure was wild-caught on first-run installs over
|
|
280
|
+
* slower connections: two "Protobuf parsing failed" loads, then vector memory
|
|
281
|
+
* off for the whole session, while the file finished correctly moments later.
|
|
282
|
+
* Here the bytes land in a sibling temp file, are checked against the pin,
|
|
283
|
+
* and appear at the cache path only by an atomic rename, so transformers
|
|
284
|
+
* finds a complete file and never downloads it. Call it under
|
|
285
|
+
* {@link withTransformersModelCacheLock}.
|
|
286
|
+
*/
|
|
287
|
+
export async function ensureVerifiedModelFile(cacheDir, modelId, pinned, source) {
|
|
288
|
+
const target = cacheFilePath(cacheDir, modelId, pinned.file);
|
|
289
|
+
const marker = `${target}${VERIFIED_MARKER_SUFFIX}`;
|
|
290
|
+
await mkdir(dirname(target), { recursive: true });
|
|
291
|
+
await sweepPartialDownloads(target);
|
|
292
|
+
const present = await stat(target).then((info) => info.isFile(), () => false);
|
|
293
|
+
if (present) {
|
|
294
|
+
if (await markerVouches(marker, target, pinned.digest))
|
|
295
|
+
return 'cached';
|
|
296
|
+
// Hashed once per file; the marker spares every later boot the read.
|
|
297
|
+
if ((await sha256File(target)) === pinned.digest) {
|
|
298
|
+
await writeMarker(marker, target, pinned.digest);
|
|
299
|
+
return 'cached';
|
|
300
|
+
}
|
|
301
|
+
log.warn(`[models] cached ${modelId}/${pinned.file} is incomplete or altered; downloading it`);
|
|
302
|
+
}
|
|
303
|
+
await rm(marker, { force: true });
|
|
304
|
+
await rm(target, { force: true });
|
|
305
|
+
await downloadVerified(remoteFileUrl(source, modelId, pinned), target, pinned, source.fetchImpl ?? fetch);
|
|
306
|
+
await writeMarker(marker, target, pinned.digest);
|
|
307
|
+
return 'downloaded';
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* True when Node is reporting that `specifier` itself is not installed, rather
|
|
311
|
+
* than the package being present and failing to load.
|
|
312
|
+
*
|
|
313
|
+
* `@huggingface/transformers` and `kokoro-js` are optional peers that an
|
|
314
|
+
* ordinary npm install omits, so absence is a supported configuration and must
|
|
315
|
+
* be distinguishable from breakage before anything picks a log level. Matched
|
|
316
|
+
* on the resolver's error code plus the specifier it names, not on a substring
|
|
317
|
+
* of the message: a genuine failure *inside* transformers also mentions the
|
|
318
|
+
* package, and used to be misreported as "not installed".
|
|
319
|
+
*/
|
|
320
|
+
export function isMissingModule(err, specifier) {
|
|
321
|
+
if (!(err instanceof Error))
|
|
322
|
+
return false;
|
|
323
|
+
const { code } = err;
|
|
324
|
+
if (code !== 'ERR_MODULE_NOT_FOUND' && code !== 'MODULE_NOT_FOUND')
|
|
325
|
+
return false;
|
|
326
|
+
const escaped = specifier.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
327
|
+
return new RegExp(String.raw `Cannot find (?:package|module) '${escaped}'`).test(err.message);
|
|
328
|
+
}
|
|
329
|
+
async function defaultLoadEnv() {
|
|
330
|
+
const mod = (await import('@huggingface/transformers'));
|
|
331
|
+
return mod.env;
|
|
332
|
+
}
|
|
333
|
+
const pinned = new Set();
|
|
334
|
+
let globalsAligned = false;
|
|
335
|
+
/**
|
|
336
|
+
* transformers.js decides whether to WRITE a downloaded file to its FS cache
|
|
337
|
+
* with `response instanceof Response`, reading the *global* `Response`. In the
|
|
338
|
+
* bundled daemon, some dependency leaves `globalThis.fetch` and
|
|
339
|
+
* `globalThis.Response` sourced from different realms — so a real fetch's
|
|
340
|
+
* response fails `instanceof Response`, transformers caches NOTHING, and the
|
|
341
|
+
* ONNX load (which resolves by cached file path) throws "Unable to get model
|
|
342
|
+
* file path or buffer". Re-sourcing `fetch` + `Response` + friends from one
|
|
343
|
+
* `undici` restores the invariant, so caching (and offline reuse) works.
|
|
344
|
+
*
|
|
345
|
+
* `undici` IS Node's own fetch implementation, so this is a functional no-op
|
|
346
|
+
* for callers — it only realigns the class identities. Best-effort.
|
|
347
|
+
*/
|
|
348
|
+
async function alignFetchGlobals() {
|
|
349
|
+
if (globalsAligned)
|
|
350
|
+
return;
|
|
351
|
+
try {
|
|
352
|
+
const u = (await import('undici'));
|
|
353
|
+
const g = globalThis;
|
|
354
|
+
for (const k of ['fetch', 'Response', 'Headers', 'Request', 'FormData', 'File', 'Blob']) {
|
|
355
|
+
if (typeof u[k] !== 'undefined')
|
|
356
|
+
g[k] = u[k];
|
|
357
|
+
}
|
|
358
|
+
globalsAligned = true;
|
|
359
|
+
}
|
|
360
|
+
catch (err) {
|
|
361
|
+
log.warn(`could not align fetch globals: ${err instanceof Error ? err.message : String(err)}`);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Point transformers.js at `cacheDir` (and repair the fetch/Response global
|
|
366
|
+
* mismatch that otherwise defeats its cache). Idempotent per dir, and
|
|
367
|
+
* best-effort: on failure we log and let the caller proceed on the upstream
|
|
368
|
+
* default rather than hard-failing (worst case the original bug resurfaces,
|
|
369
|
+
* which is no worse than not calling this).
|
|
370
|
+
*/
|
|
371
|
+
export async function pinTransformersCacheDir(cacheDir, loadEnv = defaultLoadEnv) {
|
|
372
|
+
await alignFetchGlobals();
|
|
373
|
+
if (pinned.has(cacheDir))
|
|
374
|
+
return;
|
|
375
|
+
try {
|
|
376
|
+
await mkdir(cacheDir, { recursive: true });
|
|
377
|
+
const env = await loadEnv();
|
|
378
|
+
env.cacheDir = cacheDir;
|
|
379
|
+
env.useFSCache = true;
|
|
380
|
+
env.allowRemoteModels = true;
|
|
381
|
+
pinned.add(cacheDir);
|
|
382
|
+
}
|
|
383
|
+
catch (err) {
|
|
384
|
+
if (isMissingModule(err, TRANSFORMERS_MODULE)) {
|
|
385
|
+
// Optional peer absent — nothing to pin, and nothing wrong. The caller
|
|
386
|
+
// that actually needs the model surfaces the actionable install message.
|
|
387
|
+
log.debug(`skipped transformers cache pin: ${TRANSFORMERS_MODULE} is not installed`);
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
log.warn(`could not pin transformers cache dir "${cacheDir}": ${err instanceof Error ? err.message : String(err)}`);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Free-disk-space preflight for model downloads.
|
|
3
|
+
*
|
|
4
|
+
* On-device weights are the largest thing gezel ever writes: a llama.cpp Q4 is
|
|
5
|
+
* a few GiB, but a ds4 GGUF is 80–200+ GiB. Without a preflight the failure
|
|
6
|
+
* mode is the worst possible one — hours of download, then `ENOSPC` at 95%,
|
|
7
|
+
* with a half-written `.partial` still occupying the disk it just filled.
|
|
8
|
+
* Checking first turns that into one instant, actionable sentence.
|
|
9
|
+
*
|
|
10
|
+
* Two rules keep this from becoming its own failure source:
|
|
11
|
+
*
|
|
12
|
+
* 1. **Never block on unknown.** `statfs` is not available on every
|
|
13
|
+
* filesystem (network mounts, some container overlays). A check we
|
|
14
|
+
* couldn't perform returns `known: false` and callers proceed — a missing
|
|
15
|
+
* measurement must not stop a download that would have succeeded.
|
|
16
|
+
* 2. **Measure the nearest existing ancestor.** The destination directory is
|
|
17
|
+
* usually created just before the download, but callers may preflight
|
|
18
|
+
* earlier; walking up to a directory that exists keeps the check honest
|
|
19
|
+
* instead of silently degrading to `known: false`.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Headroom demanded on top of the download itself. A disk filled to the last
|
|
23
|
+
* byte is a broken machine, not a successful install: macOS/Linux need free
|
|
24
|
+
* space for swap, logs, and the atomic `.partial` → final rename. Scales with
|
|
25
|
+
* the download so a 200 GiB model reserves proportionally more than a 4 GiB
|
|
26
|
+
* one, with a 2 GiB floor for small models.
|
|
27
|
+
*/
|
|
28
|
+
export declare function requiredSlackBytes(downloadBytes: number): number;
|
|
29
|
+
export interface DiskSpaceCheck {
|
|
30
|
+
/**
|
|
31
|
+
* False when the filesystem couldn't be measured. `ok` is always true in
|
|
32
|
+
* that case — callers must not treat an unmeasurable disk as a full one.
|
|
33
|
+
*/
|
|
34
|
+
known: boolean;
|
|
35
|
+
ok: boolean;
|
|
36
|
+
freeBytes: number;
|
|
37
|
+
/** Download size plus {@link requiredSlackBytes}. */
|
|
38
|
+
requiredBytes: number;
|
|
39
|
+
}
|
|
40
|
+
/** Injectable for tests — the unmeasurable-filesystem branch can't be
|
|
41
|
+
* reproduced with a real path on a normal dev machine. */
|
|
42
|
+
export type StatfsImpl = (path: string) => Promise<{
|
|
43
|
+
bsize: number;
|
|
44
|
+
bavail: number;
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Whether `dir`'s filesystem can hold `downloadBytes` more, plus headroom.
|
|
48
|
+
*
|
|
49
|
+
* `dir` need not exist yet — the nearest existing ancestor is measured, which
|
|
50
|
+
* is the same filesystem in every layout gezel creates.
|
|
51
|
+
*/
|
|
52
|
+
export declare function checkDiskSpace(dir: string, downloadBytes: number, statfsImpl?: StatfsImpl): Promise<DiskSpaceCheck>;
|
|
53
|
+
/** One-sentence, user-facing shortfall message. Already friendly — callers
|
|
54
|
+
* surface it verbatim in an install-error banner. */
|
|
55
|
+
export declare function describeDiskShortfall(check: DiskSpaceCheck, what: string): string;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Free-disk-space preflight for model downloads.
|
|
3
|
+
*
|
|
4
|
+
* On-device weights are the largest thing gezel ever writes: a llama.cpp Q4 is
|
|
5
|
+
* a few GiB, but a ds4 GGUF is 80–200+ GiB. Without a preflight the failure
|
|
6
|
+
* mode is the worst possible one — hours of download, then `ENOSPC` at 95%,
|
|
7
|
+
* with a half-written `.partial` still occupying the disk it just filled.
|
|
8
|
+
* Checking first turns that into one instant, actionable sentence.
|
|
9
|
+
*
|
|
10
|
+
* Two rules keep this from becoming its own failure source:
|
|
11
|
+
*
|
|
12
|
+
* 1. **Never block on unknown.** `statfs` is not available on every
|
|
13
|
+
* filesystem (network mounts, some container overlays). A check we
|
|
14
|
+
* couldn't perform returns `known: false` and callers proceed — a missing
|
|
15
|
+
* measurement must not stop a download that would have succeeded.
|
|
16
|
+
* 2. **Measure the nearest existing ancestor.** The destination directory is
|
|
17
|
+
* usually created just before the download, but callers may preflight
|
|
18
|
+
* earlier; walking up to a directory that exists keeps the check honest
|
|
19
|
+
* instead of silently degrading to `known: false`.
|
|
20
|
+
*/
|
|
21
|
+
import { statfs } from 'node:fs/promises';
|
|
22
|
+
import { dirname } from 'node:path';
|
|
23
|
+
const GIB = 1024 ** 3;
|
|
24
|
+
/**
|
|
25
|
+
* Headroom demanded on top of the download itself. A disk filled to the last
|
|
26
|
+
* byte is a broken machine, not a successful install: macOS/Linux need free
|
|
27
|
+
* space for swap, logs, and the atomic `.partial` → final rename. Scales with
|
|
28
|
+
* the download so a 200 GiB model reserves proportionally more than a 4 GiB
|
|
29
|
+
* one, with a 2 GiB floor for small models.
|
|
30
|
+
*/
|
|
31
|
+
export function requiredSlackBytes(downloadBytes) {
|
|
32
|
+
return Math.max(2 * GIB, Math.ceil(downloadBytes * 0.02));
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Whether `dir`'s filesystem can hold `downloadBytes` more, plus headroom.
|
|
36
|
+
*
|
|
37
|
+
* `dir` need not exist yet — the nearest existing ancestor is measured, which
|
|
38
|
+
* is the same filesystem in every layout gezel creates.
|
|
39
|
+
*/
|
|
40
|
+
export async function checkDiskSpace(dir, downloadBytes, statfsImpl = statfs) {
|
|
41
|
+
const requiredBytes = downloadBytes + requiredSlackBytes(downloadBytes);
|
|
42
|
+
const freeBytes = await freeBytesFor(dir, statfsImpl);
|
|
43
|
+
if (freeBytes === null) {
|
|
44
|
+
return { known: false, ok: true, freeBytes: 0, requiredBytes };
|
|
45
|
+
}
|
|
46
|
+
return { known: true, ok: freeBytes >= requiredBytes, freeBytes, requiredBytes };
|
|
47
|
+
}
|
|
48
|
+
async function freeBytesFor(dir, statfsImpl) {
|
|
49
|
+
let candidate = dir;
|
|
50
|
+
for (let i = 0; i < 64; i++) {
|
|
51
|
+
try {
|
|
52
|
+
const st = await statfsImpl(candidate);
|
|
53
|
+
// `bavail` (not `bfree`) is what an unprivileged process may actually
|
|
54
|
+
// use — the difference is the root-reserved pool, which we can't have.
|
|
55
|
+
return st.bsize * st.bavail;
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
const parent = dirname(candidate);
|
|
59
|
+
if (parent === candidate)
|
|
60
|
+
return null;
|
|
61
|
+
candidate = parent;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
/** One-sentence, user-facing shortfall message. Already friendly — callers
|
|
67
|
+
* surface it verbatim in an install-error banner. */
|
|
68
|
+
export function describeDiskShortfall(check, what) {
|
|
69
|
+
const need = (check.requiredBytes / GIB).toFixed(1);
|
|
70
|
+
const have = (check.freeBytes / GIB).toFixed(1);
|
|
71
|
+
return `Not enough disk space for ${what}: needs about ${need} GB free (including working headroom), but this disk has ${have} GB. Free up space or choose a smaller model.`;
|
|
72
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared primitives for the model download helpers — the event/result
|
|
3
|
+
* contract, retry/backoff math, partial-file sizing, friendly error mapping,
|
|
4
|
+
* and the honest gezel User-Agent. Both the classic streaming downloader
|
|
5
|
+
* (`download-with-retry.ts`) and the Xet reconstruction downloader
|
|
6
|
+
* (`xet-download.ts`) build on these, so neither has to import the other at
|
|
7
|
+
* runtime (avoids a cycle).
|
|
8
|
+
*/
|
|
9
|
+
export declare const downloadLog: import("@bendyline/gezel").Logger;
|
|
10
|
+
/**
|
|
11
|
+
* Honest User-Agent sent on every model-download request. We identify
|
|
12
|
+
* ourselves as gezel rather than impersonating a browser or the huggingface
|
|
13
|
+
* client — HF's Xet backend serves anonymous public reads, and being
|
|
14
|
+
* transparent about who we are is the right posture for a third-party client
|
|
15
|
+
* fetching public weights on the user's behalf.
|
|
16
|
+
*/
|
|
17
|
+
export declare const GEZEL_DOWNLOAD_UA = "gezel/0.0.0 (+https://github.com/bendyline/gezel)";
|
|
18
|
+
/**
|
|
19
|
+
* Headers for an HF control-plane request. An optional operator token raises
|
|
20
|
+
* public-model rate limits, but is never forwarded to Xet/CAS/CDN hosts.
|
|
21
|
+
*/
|
|
22
|
+
export declare function huggingFaceRequestHeaders(url: string, token?: string | undefined): Record<string, string>;
|
|
23
|
+
/** Upper bound on *consecutive* failed attempts that made no headway. 5 covers
|
|
24
|
+
* the dominant on-device failure modes (transient ISP blip, mid-day
|
|
25
|
+
* congestion, brief HF rate-limit) without giving up too readily. An attempt
|
|
26
|
+
* that moved real bytes refunds this budget — see `DownloadRetryBudget`. */
|
|
27
|
+
export declare const DEFAULT_MAX_RETRIES = 5;
|
|
28
|
+
/** Absolute ceiling on attempts for one file, however much progress is being
|
|
29
|
+
* made. A 30 GB download over a link that drops every 200 MB legitimately
|
|
30
|
+
* needs a lot of resumes; this only exists so a pathological
|
|
31
|
+
* fails-after-one-chunk loop can't spin forever. */
|
|
32
|
+
export declare const MAX_TOTAL_ATTEMPTS = 100;
|
|
33
|
+
/** Forward progress that counts as "this transfer is alive" and refunds the
|
|
34
|
+
* consecutive-failure budget. Deliberately larger than one HTTP chunk so a
|
|
35
|
+
* server that hands us 64 KiB and hangs up can't refill the budget forever. */
|
|
36
|
+
export declare const PROGRESS_REFUND_BYTES: number;
|
|
37
|
+
/** No-bytes-arrived window before we declare a transfer dead. */
|
|
38
|
+
export declare const DEFAULT_CHUNK_TIMEOUT_MS = 20000;
|
|
39
|
+
export type DownloadEvent = {
|
|
40
|
+
type: 'progress';
|
|
41
|
+
bytesWritten: number;
|
|
42
|
+
totalBytes: number;
|
|
43
|
+
} | {
|
|
44
|
+
type: 'retrying';
|
|
45
|
+
/** Which attempt is starting (1-based). */
|
|
46
|
+
attempt: number;
|
|
47
|
+
maxAttempts: number;
|
|
48
|
+
/** Wait before next attempt. */
|
|
49
|
+
delayMs: number;
|
|
50
|
+
/** Friendly description of why the previous attempt failed. */
|
|
51
|
+
reason: string;
|
|
52
|
+
/** Bytes already on disk that the next attempt will resume from. */
|
|
53
|
+
resumeFromBytes: number;
|
|
54
|
+
};
|
|
55
|
+
export type DownloadResult = {
|
|
56
|
+
kind: 'ok';
|
|
57
|
+
bytesWritten: number;
|
|
58
|
+
partialPath: string;
|
|
59
|
+
/**
|
|
60
|
+
* sha256 of the file, computed inline while streaming, IFF the whole
|
|
61
|
+
* file was written from offset 0 in a single attempt (HTTP 200, no
|
|
62
|
+
* resume). Absent on resumed/appended transfers and the Xet path,
|
|
63
|
+
* where the inline hasher never saw the earlier bytes — the caller
|
|
64
|
+
* must fall back to reading the file back to verify in those cases.
|
|
65
|
+
*/
|
|
66
|
+
sha256?: string;
|
|
67
|
+
} | {
|
|
68
|
+
kind: 'aborted';
|
|
69
|
+
bytesWritten: number;
|
|
70
|
+
partialPath: string;
|
|
71
|
+
} | {
|
|
72
|
+
kind: 'error';
|
|
73
|
+
/** User-facing message. Already friendly — don't add prefixes in the UI. */
|
|
74
|
+
error: string;
|
|
75
|
+
/** Attempts taken before giving up. */
|
|
76
|
+
attemptsMade: number;
|
|
77
|
+
/** Whatever bytes are on the `.partial` file at give-up time. */
|
|
78
|
+
bytesWritten: number;
|
|
79
|
+
};
|
|
80
|
+
export declare function existingPartialSize(path: string): number;
|
|
81
|
+
export declare function retryDelayMs(retryIndex: number): number;
|
|
82
|
+
export declare function sleepRespectingAbort(ms: number, signal: AbortSignal | undefined): Promise<boolean>;
|
|
83
|
+
/**
|
|
84
|
+
* Attempt accounting for a resumable download.
|
|
85
|
+
*
|
|
86
|
+
* The naive "5 attempts per file, then give up" budget is what made the
|
|
87
|
+
* first-run model install fail with a bare "network error": a 12 GB GGUF over
|
|
88
|
+
* a link that drops every couple of minutes burns all five attempts inside the
|
|
89
|
+
* first ten minutes and quits — even though every one of those attempts moved
|
|
90
|
+
* hundreds of megabytes onto disk and the transfer was, in the only sense the
|
|
91
|
+
* user cares about, working.
|
|
92
|
+
*
|
|
93
|
+
* So the budget counts *consecutive failures that made no headway*. An attempt
|
|
94
|
+
* that pushed the byte high-water mark forward by at least
|
|
95
|
+
* `PROGRESS_REFUND_BYTES` resets the counter (and the backoff schedule with
|
|
96
|
+
* it, since the network clearly isn't down). `MAX_TOTAL_ATTEMPTS` is the
|
|
97
|
+
* backstop for a server that hands us a little data and dies every single
|
|
98
|
+
* time.
|
|
99
|
+
*
|
|
100
|
+
* A budget constructed with `maxConsecutive <= 1` never refunds, so callers
|
|
101
|
+
* that pass `maxRetries: 1` still get exactly one attempt.
|
|
102
|
+
*/
|
|
103
|
+
export declare class DownloadRetryBudget {
|
|
104
|
+
private readonly maxConsecutive;
|
|
105
|
+
private readonly maxTotal;
|
|
106
|
+
private consecutiveFailures;
|
|
107
|
+
private attemptsStarted;
|
|
108
|
+
private highWaterBytes;
|
|
109
|
+
constructor(maxConsecutive: number, startBytes?: number, maxTotal?: number);
|
|
110
|
+
/** True while another attempt is permitted. */
|
|
111
|
+
canAttempt(): boolean;
|
|
112
|
+
/** Call once at the top of each attempt. */
|
|
113
|
+
beginAttempt(): number;
|
|
114
|
+
/** Total attempts started so far — reported in the terminal error. */
|
|
115
|
+
get attemptsMade(): number;
|
|
116
|
+
/** Record a transient failure at `bytesWritten` bytes of on-disk progress. */
|
|
117
|
+
recordFailure(bytesWritten: number): void;
|
|
118
|
+
/** Wait to serve before the next attempt, based on the consecutive streak. */
|
|
119
|
+
nextDelayMs(): number;
|
|
120
|
+
/** 1-based number of the attempt about to start, for `retrying` events. */
|
|
121
|
+
get nextAttemptLabel(): number;
|
|
122
|
+
get maxAttempts(): number;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Map raw fetch/network errors to a single user-readable sentence.
|
|
126
|
+
* Keep these short — the UI shows them inline in a small banner.
|
|
127
|
+
*/
|
|
128
|
+
export declare function friendlyFetchError(err: unknown): string;
|
|
129
|
+
export declare function friendlyStreamError(err: unknown): string;
|
|
130
|
+
export declare function friendlyStatusError(status: number, statusText: string, _url: string): string;
|
|
131
|
+
export declare function rawErrorString(err: unknown): string;
|
|
132
|
+
/** Friendly-error helpers so providers that build their own non-fetch error
|
|
133
|
+
* events can produce consistent copy. */
|
|
134
|
+
export declare const friendlyErrors: {
|
|
135
|
+
fetch: typeof friendlyFetchError;
|
|
136
|
+
stream: typeof friendlyStreamError;
|
|
137
|
+
status: typeof friendlyStatusError;
|
|
138
|
+
};
|