@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,522 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared resumable-download helper used by every model installer.
|
|
3
|
+
*
|
|
4
|
+
* Before this existed, llama-cpp / mlx / sd-cpp each had their own
|
|
5
|
+
* fetch-and-stream-to-file loop with subtly different behavior:
|
|
6
|
+
* - none of them implemented HTTP Range resumption, so a 9 GB-of-10 GB
|
|
7
|
+
* network failure burned the whole transfer.
|
|
8
|
+
* - error messages bubbled out as raw Node errno strings like
|
|
9
|
+
* `getaddrinfo ENOTFOUND` or "fetch failed", which the UI then
|
|
10
|
+
* rendered verbatim. The user sees "network error" and has no
|
|
11
|
+
* useful action.
|
|
12
|
+
* - no retry. One transient ECONNRESET = full restart.
|
|
13
|
+
*
|
|
14
|
+
* Shared helper:
|
|
15
|
+
* - Resumable via `Range: bytes=N-` when the previous partial file
|
|
16
|
+
* is present. HuggingFace CDN honors this; falls back gracefully
|
|
17
|
+
* when the server replies with `200` instead of `206` (mid-file
|
|
18
|
+
* restart).
|
|
19
|
+
* - Auto-retry with exponential backoff + jitter. The budget counts
|
|
20
|
+
* *consecutive failures that made no headway* (default 5) rather than
|
|
21
|
+
* attempts-per-file, so a big transfer over a flaky link keeps resuming
|
|
22
|
+
* as long as it is actually advancing. Yields `retrying` events so the UI
|
|
23
|
+
* can surface "Retrying in 4s (attempt 3/5)…" instead of a stuck banner.
|
|
24
|
+
* - Per-chunk idle-timeout — a stalled connection that returns no
|
|
25
|
+
* bytes for `chunkTimeoutMs` aborts and is retried.
|
|
26
|
+
* - Friendly error mapping for the common cases (DNS, refused,
|
|
27
|
+
* reset, timeout). Raw errors logged at debug; the surfaced
|
|
28
|
+
* message is user-readable.
|
|
29
|
+
* - Honors `AbortSignal`. On abort: no retry, no `.partial` cleanup
|
|
30
|
+
* (leave the file so a resumed run can pick up).
|
|
31
|
+
*
|
|
32
|
+
* The helper does NOT do sha256 verification, manifest writes, or
|
|
33
|
+
* post-download rename. Those stay in the per-provider installer
|
|
34
|
+
* because they have provider-specific shapes (multi-file MLX, GGUF
|
|
35
|
+
* metadata extraction for llama-cpp). The helper is purely
|
|
36
|
+
* "stream this URL to this path, resume if you can, retry if it
|
|
37
|
+
* fails, yield progress so the caller can stream events".
|
|
38
|
+
*/
|
|
39
|
+
import { createHash } from 'node:crypto';
|
|
40
|
+
import { createWriteStream } from 'node:fs';
|
|
41
|
+
import { rm, truncate } from 'node:fs/promises';
|
|
42
|
+
import { DEFAULT_CHUNK_TIMEOUT_MS, DEFAULT_MAX_RETRIES, DownloadRetryBudget, existingPartialSize, friendlyErrors, friendlyFetchError, friendlyStatusError, friendlyStreamError, huggingFaceRequestHeaders, downloadLog as log, rawErrorString, sleepRespectingAbort, } from './download-common.js';
|
|
43
|
+
import { downloadXet } from './xet-download.js';
|
|
44
|
+
import { parseLinkHeader } from './xet.js';
|
|
45
|
+
// Public re-exports: external consumers import the event/result contract and
|
|
46
|
+
// friendly-error helpers from here (the primary download entry point).
|
|
47
|
+
export { friendlyErrors } from './download-common.js';
|
|
48
|
+
/**
|
|
49
|
+
* Drive the download. Yields `progress` + `retrying` events; the
|
|
50
|
+
* async-generator's RETURN value carries the terminal outcome.
|
|
51
|
+
*
|
|
52
|
+
* Typical caller pattern:
|
|
53
|
+
*
|
|
54
|
+
* ```ts
|
|
55
|
+
* const gen = downloadWithRetry({ url, destPath, approxSizeBytes });
|
|
56
|
+
* while (true) {
|
|
57
|
+
* const next = await gen.next();
|
|
58
|
+
* if (next.done) {
|
|
59
|
+
* if (next.value.kind === 'ok') ... finalize, rename, sha256 check, etc.
|
|
60
|
+
* if (next.value.kind === 'aborted') ... bail, leave .partial for resume
|
|
61
|
+
* if (next.value.kind === 'error') ... yield to caller's SSE
|
|
62
|
+
* break;
|
|
63
|
+
* }
|
|
64
|
+
* // forward progress / retrying event up the chain
|
|
65
|
+
* yieldUpstream(next.value);
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export async function* downloadWithRetry(opts) {
|
|
70
|
+
const partialPath = `${opts.destPath}.partial`;
|
|
71
|
+
const fetchImpl = opts.fetchImpl ?? globalThis.fetch;
|
|
72
|
+
const maxAttempts = opts.maxRetries ?? DEFAULT_MAX_RETRIES;
|
|
73
|
+
const chunkTimeoutMs = opts.chunkTimeoutMs ?? DEFAULT_CHUNK_TIMEOUT_MS;
|
|
74
|
+
if (opts.maxBytes !== undefined && existingPartialSize(partialPath) > opts.maxBytes) {
|
|
75
|
+
return {
|
|
76
|
+
kind: 'error',
|
|
77
|
+
error: `Download exceeds the ${opts.maxBytes} byte limit`,
|
|
78
|
+
attemptsMade: 0,
|
|
79
|
+
bytesWritten: existingPartialSize(partialPath),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
const budget = new DownloadRetryBudget(maxAttempts, existingPartialSize(partialPath));
|
|
83
|
+
let lastFriendlyError = 'download failed';
|
|
84
|
+
while (budget.canAttempt()) {
|
|
85
|
+
budget.beginAttempt();
|
|
86
|
+
if (opts.signal?.aborted) {
|
|
87
|
+
return {
|
|
88
|
+
kind: 'aborted',
|
|
89
|
+
bytesWritten: existingPartialSize(partialPath),
|
|
90
|
+
partialPath,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
const resumeFrom = existingPartialSize(partialPath);
|
|
94
|
+
const attemptResult = yield* runSingleAttempt({
|
|
95
|
+
url: opts.url,
|
|
96
|
+
partialPath,
|
|
97
|
+
approxSizeBytes: opts.approxSizeBytes,
|
|
98
|
+
fetchImpl,
|
|
99
|
+
chunkTimeoutMs,
|
|
100
|
+
resumeFrom,
|
|
101
|
+
signal: opts.signal,
|
|
102
|
+
maxBytes: opts.maxBytes,
|
|
103
|
+
});
|
|
104
|
+
if (attemptResult.kind === 'xet') {
|
|
105
|
+
// HuggingFace serves this file via Xet content-addressed storage; the
|
|
106
|
+
// reconstruction downloader speaks that protocol and drives its own
|
|
107
|
+
// retry/resume from here, honoring the same byte cap.
|
|
108
|
+
return yield* downloadXet({
|
|
109
|
+
detection: attemptResult.detection,
|
|
110
|
+
destPath: opts.destPath,
|
|
111
|
+
approxSizeBytes: opts.approxSizeBytes,
|
|
112
|
+
fetchImpl,
|
|
113
|
+
maxRetries: opts.maxRetries,
|
|
114
|
+
chunkTimeoutMs: opts.chunkTimeoutMs,
|
|
115
|
+
signal: opts.signal,
|
|
116
|
+
maxBytes: opts.maxBytes,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
if (attemptResult.kind === 'ok') {
|
|
120
|
+
return {
|
|
121
|
+
kind: 'ok',
|
|
122
|
+
bytesWritten: attemptResult.bytesWritten,
|
|
123
|
+
partialPath,
|
|
124
|
+
...(attemptResult.sha256 ? { sha256: attemptResult.sha256 } : {}),
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
if (attemptResult.kind === 'aborted') {
|
|
128
|
+
return {
|
|
129
|
+
kind: 'aborted',
|
|
130
|
+
bytesWritten: attemptResult.bytesWritten,
|
|
131
|
+
partialPath,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
if (attemptResult.kind === 'fatal') {
|
|
135
|
+
// Non-retryable: 4xx, sha mismatch, malformed Content-Length, etc.
|
|
136
|
+
return {
|
|
137
|
+
kind: 'error',
|
|
138
|
+
error: attemptResult.friendlyError,
|
|
139
|
+
attemptsMade: budget.attemptsMade,
|
|
140
|
+
bytesWritten: attemptResult.bytesWritten,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
// Transient — schedule a retry (or give up if we're out of attempts).
|
|
144
|
+
lastFriendlyError = attemptResult.friendlyError;
|
|
145
|
+
budget.recordFailure(attemptResult.bytesWritten);
|
|
146
|
+
log.warn(`[download] attempt ${budget.attemptsMade} failed at ${attemptResult.bytesWritten} bytes: ${attemptResult.friendlyError} (rawError=${attemptResult.rawError})`);
|
|
147
|
+
if (!budget.canAttempt())
|
|
148
|
+
break;
|
|
149
|
+
const delay = budget.nextDelayMs();
|
|
150
|
+
yield {
|
|
151
|
+
type: 'retrying',
|
|
152
|
+
attempt: budget.nextAttemptLabel,
|
|
153
|
+
maxAttempts: budget.maxAttempts,
|
|
154
|
+
delayMs: delay,
|
|
155
|
+
reason: attemptResult.friendlyError,
|
|
156
|
+
resumeFromBytes: attemptResult.bytesWritten,
|
|
157
|
+
};
|
|
158
|
+
const aborted = await sleepRespectingAbort(delay, opts.signal);
|
|
159
|
+
if (aborted) {
|
|
160
|
+
return {
|
|
161
|
+
kind: 'aborted',
|
|
162
|
+
bytesWritten: existingPartialSize(partialPath),
|
|
163
|
+
partialPath,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
const attemptsMade = budget.attemptsMade;
|
|
168
|
+
return {
|
|
169
|
+
kind: 'error',
|
|
170
|
+
error: `${lastFriendlyError} (gave up after ${attemptsMade} attempt${attemptsMade === 1 ? '' : 's'})`,
|
|
171
|
+
attemptsMade,
|
|
172
|
+
bytesWritten: existingPartialSize(partialPath),
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
// ── Inner attempt loop ─────────────────────────────────────────────
|
|
176
|
+
function isRedirect(status) {
|
|
177
|
+
return status === 301 || status === 302 || status === 303 || status === 307 || status === 308;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Parse the total size out of a `Content-Range` header — `bytes 100-499/500`
|
|
181
|
+
* (a 206) or `bytes * /500` (a 416). Returns null when absent or `*` (unknown
|
|
182
|
+
* total). This is the server's *authoritative* size, unlike the catalog's
|
|
183
|
+
* `approxSizeBytes`, so it's safe to key over-append repair on it.
|
|
184
|
+
*/
|
|
185
|
+
function parseContentRangeTotal(header) {
|
|
186
|
+
if (!header)
|
|
187
|
+
return null;
|
|
188
|
+
const m = header.match(/\/(\d+)\s*$/);
|
|
189
|
+
if (!m?.[1])
|
|
190
|
+
return null;
|
|
191
|
+
const total = Number.parseInt(m[1], 10);
|
|
192
|
+
return Number.isFinite(total) ? total : null;
|
|
193
|
+
}
|
|
194
|
+
async function* runSingleAttempt(opts) {
|
|
195
|
+
const { url, partialPath, approxSizeBytes, fetchImpl, chunkTimeoutMs, resumeFrom, signal, maxBytes, } = opts;
|
|
196
|
+
// Build per-attempt AbortController so a stalled chunk can cancel the
|
|
197
|
+
// fetch without losing the caller's signal.
|
|
198
|
+
const ac = new AbortController();
|
|
199
|
+
const abortFromCaller = () => ac.abort();
|
|
200
|
+
signal?.addEventListener('abort', abortFromCaller);
|
|
201
|
+
const headersFor = (requestUrl) => ({
|
|
202
|
+
...huggingFaceRequestHeaders(requestUrl),
|
|
203
|
+
...(resumeFrom > 0 ? { Range: `bytes=${resumeFrom}-` } : {}),
|
|
204
|
+
});
|
|
205
|
+
// Fetch with manual redirect so we can inspect the 302 before following it.
|
|
206
|
+
// HuggingFace `/resolve/` URLs 302 to either a classic CDN blob (follow it)
|
|
207
|
+
// or, for Xet-backed files, a CAS bridge with an `X-Xet-Hash` header that a
|
|
208
|
+
// plain GET can't read (it 403s) — in that case we bubble a `xet` sentinel
|
|
209
|
+
// so the caller delegates to the reconstruction downloader. Non-redirect
|
|
210
|
+
// (2xx / small git-blob) responses are streamed directly.
|
|
211
|
+
let res;
|
|
212
|
+
try {
|
|
213
|
+
res = await fetchImpl(url, {
|
|
214
|
+
headers: headersFor(url),
|
|
215
|
+
redirect: 'manual',
|
|
216
|
+
signal: ac.signal,
|
|
217
|
+
});
|
|
218
|
+
let hops = 0;
|
|
219
|
+
while (isRedirect(res.status) && hops++ < 5) {
|
|
220
|
+
const xetHash = res.headers.get('x-xet-hash');
|
|
221
|
+
if (xetHash) {
|
|
222
|
+
const authUrl = parseLinkHeader(res.headers.get('link'))['xet-auth'];
|
|
223
|
+
try {
|
|
224
|
+
await res.body?.cancel();
|
|
225
|
+
}
|
|
226
|
+
catch {
|
|
227
|
+
/* redirect body may already be closed */
|
|
228
|
+
}
|
|
229
|
+
if (authUrl) {
|
|
230
|
+
signal?.removeEventListener('abort', abortFromCaller);
|
|
231
|
+
return { kind: 'xet', detection: { xetHash, authUrl } };
|
|
232
|
+
}
|
|
233
|
+
// Xet without an auth link — fall through and try to follow anyway.
|
|
234
|
+
}
|
|
235
|
+
const location = res.headers.get('location');
|
|
236
|
+
if (!location)
|
|
237
|
+
break; // not a followable redirect; let status mapping handle it
|
|
238
|
+
try {
|
|
239
|
+
await res.body?.cancel();
|
|
240
|
+
}
|
|
241
|
+
catch {
|
|
242
|
+
/* */
|
|
243
|
+
}
|
|
244
|
+
const redirectUrl = new URL(location, url).toString();
|
|
245
|
+
res = await fetchImpl(redirectUrl, {
|
|
246
|
+
headers: headersFor(redirectUrl),
|
|
247
|
+
redirect: 'manual',
|
|
248
|
+
signal: ac.signal,
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
catch (err) {
|
|
253
|
+
signal?.removeEventListener('abort', abortFromCaller);
|
|
254
|
+
if (signal?.aborted) {
|
|
255
|
+
return { kind: 'aborted', bytesWritten: resumeFrom };
|
|
256
|
+
}
|
|
257
|
+
return {
|
|
258
|
+
kind: 'transient',
|
|
259
|
+
friendlyError: friendlyFetchError(err),
|
|
260
|
+
rawError: rawErrorString(err),
|
|
261
|
+
bytesWritten: resumeFrom,
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
// Status mapping:
|
|
265
|
+
// 206 Partial Content → server honored Range; append to .partial.
|
|
266
|
+
// 200 OK → server ignored Range (or no Range sent). Start over.
|
|
267
|
+
// 416 Range Not Satisfiable → file already complete on server side
|
|
268
|
+
// OR our resumeFrom is past EOF. Treat as "we have everything";
|
|
269
|
+
// caller's sha256 check decides if the on-disk file is valid.
|
|
270
|
+
// 4xx (other) → fatal; bad URL / auth / missing file. No retry.
|
|
271
|
+
// 5xx → transient; retry.
|
|
272
|
+
if (res.status === 416 && resumeFrom > 0) {
|
|
273
|
+
// 416 means our Range start is at/past EOF: the `.partial` is either
|
|
274
|
+
// exactly complete OR over-sized (a prior resume appended past the true
|
|
275
|
+
// end — see the write-cap below for how that's now prevented, but old
|
|
276
|
+
// partials on disk predate it). The server's Content-Range carries the
|
|
277
|
+
// real size; if the partial exceeds it, trim the excess so the caller's
|
|
278
|
+
// sha256 check can pass instead of forcing a multi-GB re-download. If the
|
|
279
|
+
// trimmed bytes turn out to be wrong, that check fails and the caller
|
|
280
|
+
// discards + restarts. When the size is unknown, keep the file and let the
|
|
281
|
+
// caller validate.
|
|
282
|
+
signal?.removeEventListener('abort', abortFromCaller);
|
|
283
|
+
const serverSize = parseContentRangeTotal(res.headers.get('content-range'));
|
|
284
|
+
if (serverSize != null && resumeFrom > serverSize) {
|
|
285
|
+
try {
|
|
286
|
+
await truncate(partialPath, serverSize);
|
|
287
|
+
return { kind: 'ok', bytesWritten: serverSize };
|
|
288
|
+
}
|
|
289
|
+
catch {
|
|
290
|
+
await rm(partialPath, { force: true });
|
|
291
|
+
return {
|
|
292
|
+
kind: 'transient',
|
|
293
|
+
friendlyError: 'could not repair an over-sized partial download; restarting',
|
|
294
|
+
rawError: '416-truncate-failed',
|
|
295
|
+
bytesWritten: 0,
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return { kind: 'ok', bytesWritten: resumeFrom };
|
|
300
|
+
}
|
|
301
|
+
if (res.status === 200 && resumeFrom > 0) {
|
|
302
|
+
// Server ignored Range — start fresh.
|
|
303
|
+
await rm(partialPath, { force: true });
|
|
304
|
+
}
|
|
305
|
+
if (!res.ok || !res.body) {
|
|
306
|
+
signal?.removeEventListener('abort', abortFromCaller);
|
|
307
|
+
if (res.status >= 400 && res.status < 500 && res.status !== 408 && res.status !== 429) {
|
|
308
|
+
return {
|
|
309
|
+
kind: 'fatal',
|
|
310
|
+
friendlyError: friendlyStatusError(res.status, res.statusText, url),
|
|
311
|
+
bytesWritten: resumeFrom,
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
return {
|
|
315
|
+
kind: 'transient',
|
|
316
|
+
friendlyError: friendlyStatusError(res.status, res.statusText, url),
|
|
317
|
+
rawError: `HTTP ${res.status}`,
|
|
318
|
+
bytesWritten: resumeFrom,
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
// Establish the total-bytes denominator for progress reporting.
|
|
322
|
+
// When resuming, Content-Length is the REMAINING bytes; Content-Range
|
|
323
|
+
// (`bytes 100-499/500`) carries the full total. Prefer Content-Range
|
|
324
|
+
// when present.
|
|
325
|
+
const contentRange = res.headers.get('content-range');
|
|
326
|
+
const contentLength = res.headers.get('content-length');
|
|
327
|
+
let bytesWritten = res.status === 200 ? 0 : resumeFrom;
|
|
328
|
+
// The server's authoritative total, when it tells us: Content-Range carries
|
|
329
|
+
// the full size on a 206; Content-Length is the full size on a 200 and the
|
|
330
|
+
// REMAINING size on a 206. Null when the server omits both (some HF mirrors)
|
|
331
|
+
// — then we fall back to the catalog's approximate size for the progress
|
|
332
|
+
// denominator only, never for the write cap (capping on an approximate size
|
|
333
|
+
// could truncate a legitimately-larger file).
|
|
334
|
+
let serverTotal = parseContentRangeTotal(contentRange);
|
|
335
|
+
if (serverTotal == null && contentLength) {
|
|
336
|
+
const len = Number.parseInt(contentLength, 10);
|
|
337
|
+
if (Number.isFinite(len)) {
|
|
338
|
+
serverTotal = res.status === 206 ? resumeFrom + len : len;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
const totalBytes = serverTotal ?? approxSizeBytes;
|
|
342
|
+
if (maxBytes !== undefined && serverTotal !== null && serverTotal > maxBytes) {
|
|
343
|
+
await res.body.cancel().catch(() => { });
|
|
344
|
+
signal?.removeEventListener('abort', abortFromCaller);
|
|
345
|
+
return {
|
|
346
|
+
kind: 'fatal',
|
|
347
|
+
friendlyError: `Download exceeds the ${maxBytes} byte limit`,
|
|
348
|
+
bytesWritten: resumeFrom,
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
// Append-mode stream so a resumed download just keeps writing.
|
|
352
|
+
const fileStream = createWriteStream(partialPath, {
|
|
353
|
+
flags: res.status === 200 ? 'w' : 'a',
|
|
354
|
+
});
|
|
355
|
+
// Hash the bytes as they stream past — but ONLY on a fresh full transfer
|
|
356
|
+
// (HTTP 200 writes the whole file from offset 0). On a 206 resume the
|
|
357
|
+
// hasher never saw the earlier bytes already on disk, so an inline digest
|
|
358
|
+
// would be wrong; leave it null and let the caller read the file back.
|
|
359
|
+
// This turns the common single-pass install's "verifying" phase from a
|
|
360
|
+
// second full read of a multi-GB file into a free digest comparison.
|
|
361
|
+
const inlineHasher = res.status === 200 ? createHash('sha256') : null;
|
|
362
|
+
// Capture stream errors instead of letting them surface as uncaught
|
|
363
|
+
// exceptions in the (Electron) main process. The common case is benign:
|
|
364
|
+
// when we `destroy()` the stream on a stalled chunk, a caller cancel, or
|
|
365
|
+
// a read error, any in-flight `fs` write completes against the destroyed
|
|
366
|
+
// stream and emits ERR_STREAM_DESTROYED. The flag also lets the write
|
|
367
|
+
// loop notice a *real* I/O failure (e.g. disk full) and bail into the
|
|
368
|
+
// retry path instead of silently reporting success.
|
|
369
|
+
let streamError = null;
|
|
370
|
+
fileStream.on('error', (err) => {
|
|
371
|
+
streamError ??= err;
|
|
372
|
+
});
|
|
373
|
+
// Destroy the stream and wait for it to fully close. The permanent
|
|
374
|
+
// 'error' handler above swallows the ERR_STREAM_DESTROYED that destroy()
|
|
375
|
+
// triggers on a pending write. Idempotent.
|
|
376
|
+
const closeStream = async () => {
|
|
377
|
+
if (!fileStream.destroyed)
|
|
378
|
+
fileStream.destroy();
|
|
379
|
+
if (fileStream.closed)
|
|
380
|
+
return;
|
|
381
|
+
await new Promise((resolve) => fileStream.once('close', () => resolve()));
|
|
382
|
+
};
|
|
383
|
+
// Wait for the stream to drain (backpressure) before pulling more bytes,
|
|
384
|
+
// so a fast CDN can't outrun a slower disk and balloon memory on a
|
|
385
|
+
// multi-GB GGUF. Resolves immediately if the stream already errored or
|
|
386
|
+
// was destroyed, so we never hang waiting for a 'drain' that won't come.
|
|
387
|
+
const awaitDrain = () => new Promise((resolve) => {
|
|
388
|
+
if (streamError || fileStream.destroyed)
|
|
389
|
+
return resolve();
|
|
390
|
+
const cleanup = () => {
|
|
391
|
+
fileStream.off('drain', onDone);
|
|
392
|
+
fileStream.off('error', onDone);
|
|
393
|
+
};
|
|
394
|
+
const onDone = () => {
|
|
395
|
+
cleanup();
|
|
396
|
+
resolve();
|
|
397
|
+
};
|
|
398
|
+
fileStream.once('drain', onDone);
|
|
399
|
+
fileStream.once('error', onDone);
|
|
400
|
+
});
|
|
401
|
+
const reader = res.body.getReader();
|
|
402
|
+
let lastReportedAt = Date.now();
|
|
403
|
+
try {
|
|
404
|
+
while (true) {
|
|
405
|
+
// Chunk timeout: race the reader.read() against a timer. If the
|
|
406
|
+
// timer fires first, we treat it as a stall and bail with a
|
|
407
|
+
// transient error so the outer loop can retry.
|
|
408
|
+
const readPromise = reader.read();
|
|
409
|
+
let timeout;
|
|
410
|
+
const timeoutPromise = new Promise((resolve) => {
|
|
411
|
+
timeout = setTimeout(() => resolve({ timedOut: true }), chunkTimeoutMs);
|
|
412
|
+
});
|
|
413
|
+
const raced = await Promise.race([readPromise, timeoutPromise]).finally(() => {
|
|
414
|
+
if (timeout)
|
|
415
|
+
clearTimeout(timeout);
|
|
416
|
+
});
|
|
417
|
+
if ('timedOut' in raced) {
|
|
418
|
+
try {
|
|
419
|
+
ac.abort();
|
|
420
|
+
}
|
|
421
|
+
catch {
|
|
422
|
+
/* */
|
|
423
|
+
}
|
|
424
|
+
await closeStream();
|
|
425
|
+
signal?.removeEventListener('abort', abortFromCaller);
|
|
426
|
+
return {
|
|
427
|
+
kind: 'transient',
|
|
428
|
+
friendlyError: `connection stalled — no data for ${Math.round(chunkTimeoutMs / 1000)}s`,
|
|
429
|
+
rawError: 'chunk-timeout',
|
|
430
|
+
bytesWritten,
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
const { value, done } = raced;
|
|
434
|
+
if (done)
|
|
435
|
+
break;
|
|
436
|
+
if (value) {
|
|
437
|
+
// A real write error (disk full, etc.) recorded by the 'error'
|
|
438
|
+
// handler — surface it so the catch below turns it into a retry.
|
|
439
|
+
if (streamError)
|
|
440
|
+
throw streamError;
|
|
441
|
+
// Never let the file grow past the size the server declared. Guards
|
|
442
|
+
// against a quirky CDN / Xet reconstruction over-delivering and
|
|
443
|
+
// leaving an over-sized `.partial` that can never match its sha256
|
|
444
|
+
// (the exact failure that stranded a download in "Checking…" forever).
|
|
445
|
+
// Only enforced when the server gave us an authoritative total.
|
|
446
|
+
let chunk = value;
|
|
447
|
+
if (maxBytes !== undefined && bytesWritten + chunk.byteLength > maxBytes) {
|
|
448
|
+
await closeStream();
|
|
449
|
+
signal?.removeEventListener('abort', abortFromCaller);
|
|
450
|
+
return {
|
|
451
|
+
kind: 'fatal',
|
|
452
|
+
friendlyError: `Download exceeds the ${maxBytes} byte limit`,
|
|
453
|
+
bytesWritten,
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
if (serverTotal != null && bytesWritten + chunk.byteLength > serverTotal) {
|
|
457
|
+
chunk = chunk.subarray(0, Math.max(0, serverTotal - bytesWritten));
|
|
458
|
+
}
|
|
459
|
+
if (chunk.byteLength > 0) {
|
|
460
|
+
inlineHasher?.update(chunk);
|
|
461
|
+
bytesWritten += chunk.byteLength;
|
|
462
|
+
if (!fileStream.write(chunk))
|
|
463
|
+
await awaitDrain();
|
|
464
|
+
if (streamError)
|
|
465
|
+
throw streamError;
|
|
466
|
+
}
|
|
467
|
+
// Past the declared size the trim above zeroes every chunk, so the
|
|
468
|
+
// file can't grow further; we keep draining until the stream ends on
|
|
469
|
+
// its own rather than cancelling (cancelling here would strand a mock
|
|
470
|
+
// /server that under-declares Content-Length then resumes via Range).
|
|
471
|
+
const now = Date.now();
|
|
472
|
+
if (now - lastReportedAt > 250) {
|
|
473
|
+
lastReportedAt = now;
|
|
474
|
+
yield { type: 'progress', bytesWritten, totalBytes };
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
catch (err) {
|
|
480
|
+
await closeStream();
|
|
481
|
+
signal?.removeEventListener('abort', abortFromCaller);
|
|
482
|
+
if (signal?.aborted) {
|
|
483
|
+
return { kind: 'aborted', bytesWritten };
|
|
484
|
+
}
|
|
485
|
+
return {
|
|
486
|
+
kind: 'transient',
|
|
487
|
+
friendlyError: friendlyStreamError(err),
|
|
488
|
+
rawError: rawErrorString(err),
|
|
489
|
+
bytesWritten,
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
signal?.removeEventListener('abort', abortFromCaller);
|
|
493
|
+
// Flush + close. A failure here (or any error the 'error' handler caught
|
|
494
|
+
// along the way, e.g. the open ENOENT'd or the disk filled) becomes a
|
|
495
|
+
// transient retry rather than a thrown generator / uncaught exception.
|
|
496
|
+
try {
|
|
497
|
+
await new Promise((resolve, reject) => {
|
|
498
|
+
fileStream.end((err) => (err ? reject(err) : resolve()));
|
|
499
|
+
});
|
|
500
|
+
if (streamError)
|
|
501
|
+
throw streamError;
|
|
502
|
+
}
|
|
503
|
+
catch (err) {
|
|
504
|
+
await closeStream();
|
|
505
|
+
return {
|
|
506
|
+
kind: 'transient',
|
|
507
|
+
friendlyError: friendlyStreamError(err),
|
|
508
|
+
rawError: rawErrorString(err),
|
|
509
|
+
bytesWritten,
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
// Emit one final progress event so the UI shows 100% before the
|
|
513
|
+
// caller's verification phase begins. Many CDNs deliver the final
|
|
514
|
+
// chunk on the close signal, after our 250ms throttle has fired
|
|
515
|
+
// for the second-to-last chunk.
|
|
516
|
+
yield { type: 'progress', bytesWritten, totalBytes };
|
|
517
|
+
return {
|
|
518
|
+
kind: 'ok',
|
|
519
|
+
bytesWritten,
|
|
520
|
+
...(inlineHasher ? { sha256: inlineHasher.digest('hex') } : {}),
|
|
521
|
+
};
|
|
522
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface ExtractZipOptions {
|
|
2
|
+
signal?: AbortSignal;
|
|
3
|
+
/** Called as bytes land on disk, against the archive's total unpacked size. */
|
|
4
|
+
onProgress?: (bytesWritten: number, totalBytes: number) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Extract every entry of a zip archive into `destDir`, overwriting files that
|
|
8
|
+
* are already there.
|
|
9
|
+
*
|
|
10
|
+
* Use this instead of `new AdmZip(path).extractAllTo(dir)` for anything large.
|
|
11
|
+
* AdmZip reads the whole archive into memory, then inflates and writes every
|
|
12
|
+
* entry synchronously. In embedded mode the daemon runs on Electron's main
|
|
13
|
+
* thread, so extracting the 641 MB Windows CUDA engine (1.4 GB unpacked) that
|
|
14
|
+
* way blocked it for ~18 s. A window brought back from behind another app
|
|
15
|
+
* could not repaint and showed only its sage background, and the person quit
|
|
16
|
+
* it mid-extraction (2026-10-11). Here each entry streams through yauzl's
|
|
17
|
+
* inflate, so the event loop keeps turning.
|
|
18
|
+
*
|
|
19
|
+
* Every entry is checked before the first byte is written, so a bad archive
|
|
20
|
+
* leaves nothing behind.
|
|
21
|
+
*/
|
|
22
|
+
export declare function extractZip(zipPath: string, destDir: string, opts?: ExtractZipOptions): Promise<void>;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { createWriteStream } from 'node:fs';
|
|
2
|
+
import { mkdir } from 'node:fs/promises';
|
|
3
|
+
import { dirname } from 'node:path';
|
|
4
|
+
import { Transform } from 'node:stream';
|
|
5
|
+
import { pipeline } from 'node:stream/promises';
|
|
6
|
+
import * as yauzl from 'yauzl';
|
|
7
|
+
import { safeJoin } from '../fs/safe-paths.js';
|
|
8
|
+
/**
|
|
9
|
+
* Extract every entry of a zip archive into `destDir`, overwriting files that
|
|
10
|
+
* are already there.
|
|
11
|
+
*
|
|
12
|
+
* Use this instead of `new AdmZip(path).extractAllTo(dir)` for anything large.
|
|
13
|
+
* AdmZip reads the whole archive into memory, then inflates and writes every
|
|
14
|
+
* entry synchronously. In embedded mode the daemon runs on Electron's main
|
|
15
|
+
* thread, so extracting the 641 MB Windows CUDA engine (1.4 GB unpacked) that
|
|
16
|
+
* way blocked it for ~18 s. A window brought back from behind another app
|
|
17
|
+
* could not repaint and showed only its sage background, and the person quit
|
|
18
|
+
* it mid-extraction (2026-10-11). Here each entry streams through yauzl's
|
|
19
|
+
* inflate, so the event loop keeps turning.
|
|
20
|
+
*
|
|
21
|
+
* Every entry is checked before the first byte is written, so a bad archive
|
|
22
|
+
* leaves nothing behind.
|
|
23
|
+
*/
|
|
24
|
+
export async function extractZip(zipPath, destDir, opts = {}) {
|
|
25
|
+
const { signal, onProgress } = opts;
|
|
26
|
+
signal?.throwIfAborted();
|
|
27
|
+
const zip = await openZip(zipPath);
|
|
28
|
+
try {
|
|
29
|
+
const entries = await readEntries(zip, destDir);
|
|
30
|
+
const totalBytes = entries.reduce((sum, { entry }) => sum + entry.uncompressedSize, 0);
|
|
31
|
+
let bytesWritten = 0;
|
|
32
|
+
onProgress?.(0, totalBytes);
|
|
33
|
+
for (const { entry, dest } of entries) {
|
|
34
|
+
signal?.throwIfAborted();
|
|
35
|
+
if (entry.fileName.endsWith('/')) {
|
|
36
|
+
await mkdir(dest, { recursive: true });
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
await mkdir(dirname(dest), { recursive: true });
|
|
40
|
+
const input = await openEntryStream(zip, entry);
|
|
41
|
+
const counter = new Transform({
|
|
42
|
+
transform(chunk, _encoding, callback) {
|
|
43
|
+
bytesWritten += chunk.length;
|
|
44
|
+
onProgress?.(bytesWritten, totalBytes);
|
|
45
|
+
callback(null, chunk);
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
const output = createWriteStream(dest);
|
|
49
|
+
if (signal)
|
|
50
|
+
await pipeline(input, counter, output, { signal });
|
|
51
|
+
else
|
|
52
|
+
await pipeline(input, counter, output);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
zip.close();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function openZip(zipPath) {
|
|
60
|
+
return new Promise((resolve, reject) => {
|
|
61
|
+
yauzl.open(zipPath, { lazyEntries: true, autoClose: false, decodeStrings: true, validateEntrySizes: true }, (err, zip) => {
|
|
62
|
+
if (err || !zip) {
|
|
63
|
+
reject(new Error(`not a readable ZIP archive: ${err?.message ?? 'unknown error'}`));
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
resolve(zip);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function readEntries(zip, destDir) {
|
|
72
|
+
return new Promise((resolve, reject) => {
|
|
73
|
+
const entries = [];
|
|
74
|
+
zip.on('error', reject);
|
|
75
|
+
zip.on('end', () => resolve(entries));
|
|
76
|
+
zip.on('entry', (entry) => {
|
|
77
|
+
const name = entry.fileName;
|
|
78
|
+
const unixMode = (entry.externalFileAttributes >>> 16) & 0xffff;
|
|
79
|
+
if ((unixMode & 0o170000) === 0o120000) {
|
|
80
|
+
reject(new Error(`symbolic links are not supported: ${name}`));
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const dest = safeJoin(destDir, name);
|
|
84
|
+
if (!dest) {
|
|
85
|
+
reject(new Error(`unsafe archive path: ${name}`));
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
entries.push({ entry, dest });
|
|
89
|
+
zip.readEntry();
|
|
90
|
+
});
|
|
91
|
+
zip.readEntry();
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
function openEntryStream(zip, entry) {
|
|
95
|
+
return new Promise((resolve, reject) => {
|
|
96
|
+
zip.openReadStream(entry, (err, stream) => {
|
|
97
|
+
if (err || !stream)
|
|
98
|
+
reject(err ?? new Error(`could not read ${entry.fileName}`));
|
|
99
|
+
else
|
|
100
|
+
resolve(stream);
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Worker } from 'node:worker_threads';
|
|
2
|
+
/** How long shutdown waits for a model worker's in-flight work. */
|
|
3
|
+
export declare const MODEL_WORKER_DRAIN_MS = 5000;
|
|
4
|
+
/**
|
|
5
|
+
* Terminate a model worker without aborting the process.
|
|
6
|
+
*
|
|
7
|
+
* Tearing down a thread while onnxruntime is running in it — or while it is
|
|
8
|
+
* still loading onnxruntime's native addon for its first request — aborts the
|
|
9
|
+
* whole process ("terminating due to uncaught exception of type Napi::Error").
|
|
10
|
+
* `process.exit` tears down every live worker, so shutdown must terminate model
|
|
11
|
+
* workers itself, and only once they are idle. Waits up to `drainMs` for
|
|
12
|
+
* `isIdle()`; returns false, leaving the worker running, if it never gets
|
|
13
|
+
* there.
|
|
14
|
+
*/
|
|
15
|
+
export declare function retireModelWorker(worker: Worker, isIdle: () => boolean, drainMs: number): Promise<boolean>;
|