@bendyline/gezel-inference 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +13 -2
- package/dist/cache/adapter.d.ts +115 -0
- package/dist/cache/adapter.js +23 -0
- package/dist/cache/budget.d.ts +15 -0
- package/dist/cache/budget.js +31 -0
- package/dist/cache/controller.d.ts +205 -0
- package/dist/cache/controller.js +377 -0
- package/dist/catalog/LICENSE +21 -0
- package/dist/catalog/chat-models/bt/btl4-35b-q4/manifest.json +146 -0
- package/dist/catalog/chat-models/bt/btl4-35b-q4/versions/1.0.0/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-35b-q4/versions/1.0.1/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/manifest.json +146 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/versions/1.0.0/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/versions/1.0.1/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/versions/1.0.2/manifest.json +15 -0
- package/dist/catalog/chat-models/de/deepseek-r1-8b-q4/manifest.json +166 -0
- package/dist/catalog/chat-models/de/deepseek-r1-8b-q4/versions/1.1.0/manifest.json +62 -0
- package/dist/catalog/chat-models/de/deepseek-r1-8b-q4/versions/1.1.1/manifest.json +61 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-mxfp4/manifest.json +125 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-mxfp4/versions/1.0.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2/manifest.json +125 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2/versions/1.0.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2/versions/1.1.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2q4/manifest.json +126 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2q4/versions/1.0.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q4/manifest.json +318 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q4/versions/1.0.0/manifest.json +225 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q4/versions/1.1.0/manifest.json +225 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/manifest.json +249 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.0.0/manifest.json +70 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.1.0/manifest.json +72 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.1.2/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.1.3/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.2.0/manifest.json +98 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/manifest.json +228 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.0.0/manifest.json +72 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.0.2/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.0.3/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.1.0/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/manifest.json +220 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.1.0/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.2.0/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.2.1/manifest.json +80 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.2.2/manifest.json +80 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.3.0/manifest.json +81 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/manifest.json +226 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.1.0/manifest.json +80 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.1.1/manifest.json +82 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.2.0/manifest.json +82 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.2.1/manifest.json +95 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.2.2/manifest.json +95 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.3.0/manifest.json +86 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/manifest.json +213 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.1.0/manifest.json +67 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.1.2/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.2.0/manifest.json +71 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.2.1/manifest.json +71 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.3.0/manifest.json +71 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/manifest.json +205 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.1.0/manifest.json +72 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.1.2/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.2.0/manifest.json +76 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.2.1/manifest.json +76 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.3.0/manifest.json +76 -0
- package/dist/catalog/chat-models/gl/glm-5.2-754b-q2/manifest.json +127 -0
- package/dist/catalog/chat-models/gl/glm-5.2-754b-q2/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/manifest.json +140 -0
- package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/versions/1.0.0/manifest.json +23 -0
- package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/versions/1.0.1/manifest.json +26 -0
- package/dist/catalog/chat-models/gp/gpt-oss-120b-q4/manifest.json +247 -0
- package/dist/catalog/chat-models/gp/gpt-oss-120b-q4/versions/1.0.0/manifest.json +137 -0
- package/dist/catalog/chat-models/gp/gpt-oss-120b-q4/versions/1.1.0/manifest.json +135 -0
- package/dist/catalog/chat-models/gp/gpt-oss-20b-q4/manifest.json +195 -0
- package/dist/catalog/chat-models/gp/gpt-oss-20b-q4/versions/1.1.0/manifest.json +72 -0
- package/dist/catalog/chat-models/gp/gpt-oss-20b-q4/versions/1.1.1/manifest.json +71 -0
- package/dist/catalog/chat-models/gr/granite4.2-30b-q4/manifest.json +200 -0
- package/dist/catalog/chat-models/gr/granite4.2-30b-q4/versions/1.0.0/manifest.json +72 -0
- package/dist/catalog/chat-models/gr/granite4.2-3b-q4/manifest.json +196 -0
- package/dist/catalog/chat-models/gr/granite4.2-3b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/gr/granite4.2-8b-q4/manifest.json +189 -0
- package/dist/catalog/chat-models/gr/granite4.2-8b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/index.json +1 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/manifest.json +235 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.0/manifest.json +124 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.1/manifest.json +124 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.2/manifest.json +123 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q6/manifest.json +257 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q6/versions/1.0.0/manifest.json +145 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q6/versions/1.0.1/manifest.json +145 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/manifest.json +285 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.0/manifest.json +174 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.1/manifest.json +174 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.2/manifest.json +173 -0
- package/dist/catalog/chat-models/lf/lfm2.5-2.6b-q4/manifest.json +162 -0
- package/dist/catalog/chat-models/lf/lfm2.5-2.6b-q4/versions/1.0.0/manifest.json +59 -0
- package/dist/catalog/chat-models/lf/lfm2.5-2.6b-q4/versions/1.0.1/manifest.json +58 -0
- package/dist/catalog/chat-models/ll/llama3.2-3b-q4/manifest.json +134 -0
- package/dist/catalog/chat-models/ll/llama3.2-3b-q4/versions/1.1.0/manifest.json +57 -0
- package/dist/catalog/chat-models/ll/llama3.2-3b-q4/versions/1.1.1/manifest.json +56 -0
- package/dist/catalog/chat-models/mi/minicpm5-1b-q4/manifest.json +156 -0
- package/dist/catalog/chat-models/mi/minicpm5-1b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/mi/minicpm5-2b-q4/manifest.json +161 -0
- package/dist/catalog/chat-models/mi/minicpm5-2b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/mi/mistral-7b-q4/manifest.json +159 -0
- package/dist/catalog/chat-models/mi/mistral-7b-q4/versions/1.1.0/manifest.json +62 -0
- package/dist/catalog/chat-models/mi/mistral-7b-q4/versions/1.1.1/manifest.json +61 -0
- package/dist/catalog/chat-models/mi/mistral-medium-3.5-128b-q4/manifest.json +275 -0
- package/dist/catalog/chat-models/mi/mistral-medium-3.5-128b-q4/versions/1.0.0/manifest.json +154 -0
- package/dist/catalog/chat-models/mi/mistral-medium-3.5-128b-q4/versions/1.0.1/manifest.json +153 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/manifest.json +135 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.1/manifest.json +20 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.2/manifest.json +20 -0
- package/dist/catalog/chat-models/na/nanbeige4.2-3b-q4/manifest.json +138 -0
- package/dist/catalog/chat-models/na/nanbeige4.2-3b-q4/versions/1.0.0/manifest.json +14 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/manifest.json +212 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/versions/1.0.0/manifest.json +94 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/versions/1.0.1/manifest.json +94 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/versions/1.0.2/manifest.json +93 -0
- package/dist/catalog/chat-models/ne/nemotron3-super-120b-q4/manifest.json +135 -0
- package/dist/catalog/chat-models/ne/nemotron3-super-120b-q4/versions/1.0.0/manifest.json +30 -0
- package/dist/catalog/chat-models/ne/nemotron3-super-120b-q4/versions/1.0.1/manifest.json +30 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q4/manifest.json +192 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q4/versions/1.0.0/manifest.json +74 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q4/versions/1.0.1/manifest.json +73 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q8/manifest.json +207 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q8/versions/1.0.0/manifest.json +89 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q8/versions/1.0.1/manifest.json +88 -0
- package/dist/catalog/chat-models/or/ornith-35b-q4/manifest.json +224 -0
- package/dist/catalog/chat-models/or/ornith-35b-q4/versions/1.0.0/manifest.json +94 -0
- package/dist/catalog/chat-models/or/ornith-35b-q4/versions/1.0.1/manifest.json +93 -0
- package/dist/catalog/chat-models/or/ornith-35b-q8/manifest.json +244 -0
- package/dist/catalog/chat-models/or/ornith-35b-q8/versions/1.0.0/manifest.json +114 -0
- package/dist/catalog/chat-models/or/ornith-35b-q8/versions/1.0.1/manifest.json +113 -0
- package/dist/catalog/chat-models/or/ornith-9b-q4/manifest.json +215 -0
- package/dist/catalog/chat-models/or/ornith-9b-q4/versions/1.0.0/manifest.json +84 -0
- package/dist/catalog/chat-models/or/ornith-9b-q4/versions/1.0.1/manifest.json +83 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q4/manifest.json +208 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q4/versions/1.0.0/manifest.json +74 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q8/manifest.json +223 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q8/versions/1.0.0/manifest.json +89 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q4/manifest.json +187 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q4/versions/1.0.0/manifest.json +53 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q4/versions/1.0.1/manifest.json +77 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q8/manifest.json +192 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q8/versions/1.0.0/manifest.json +58 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q8/versions/1.0.1/manifest.json +82 -0
- package/dist/catalog/chat-models/qw/qwen3.5-0.8b-q4/manifest.json +192 -0
- package/dist/catalog/chat-models/qw/qwen3.5-0.8b-q4/versions/1.0.0/manifest.json +75 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/manifest.json +315 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.0/manifest.json +164 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.1/manifest.json +164 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.2/manifest.json +164 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.3/manifest.json +163 -0
- package/dist/catalog/chat-models/qw/qwen3.5-27b-q4/manifest.json +217 -0
- package/dist/catalog/chat-models/qw/qwen3.5-27b-q4/versions/1.0.0/manifest.json +90 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/manifest.json +194 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/versions/1.1.0/manifest.json +77 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/versions/1.1.2/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/versions/1.1.3/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/manifest.json +188 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/versions/1.1.0/manifest.json +77 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/versions/1.1.2/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/versions/1.1.3/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/manifest.json +205 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/versions/1.1.0/manifest.json +82 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/versions/1.1.2/manifest.json +81 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/versions/1.1.3/manifest.json +81 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/manifest.json +230 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.0/manifest.json +92 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.4/manifest.json +91 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.5/manifest.json +91 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.6/manifest.json +115 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/manifest.json +240 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.0/manifest.json +102 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.2/manifest.json +103 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.3/manifest.json +103 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.4/manifest.json +127 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/manifest.json +233 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.0/manifest.json +92 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.1/manifest.json +93 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.2/manifest.json +93 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.3/manifest.json +117 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/manifest.json +252 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.0/manifest.json +112 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.1/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.2/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.3/manifest.json +137 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-iq1-s/manifest.json +195 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-iq1-s/versions/1.0.0/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q2/manifest.json +194 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q2/versions/1.0.0/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q3/manifest.json +194 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q3/versions/1.0.0/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q3/versions/1.0.1/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/manifest.json +291 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.1/manifest.json +93 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.2/manifest.json +92 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.3/manifest.json +116 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.4/manifest.json +116 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.5/manifest.json +116 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/manifest.json +278 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.1/manifest.json +104 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.2/manifest.json +103 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.3/manifest.json +127 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/manifest.json +278 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/versions/1.0.0/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/versions/1.0.1/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/versions/1.0.2/manifest.json +137 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq3/manifest.json +221 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq3/versions/1.0.0/manifest.json +36 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/manifest.json +429 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.0.0/manifest.json +36 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.1.0/manifest.json +205 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.1.1/manifest.json +244 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/manifest.json +203 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.0/manifest.json +21 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.1/manifest.json +31 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.2/manifest.json +30 -0
- package/dist/catalog/chat-models/raw-index.json +1 -0
- package/dist/catalog/chat-models/ta/talkie-1930-13b-q4/manifest.json +79 -0
- package/dist/catalog/chat-models/ta/talkie-1930-13b-q4/versions/1.0.0/manifest.json +15 -0
- package/dist/catalog/chat-models/ta/talkie-1930-13b-q4/versions/1.0.1/manifest.json +15 -0
- package/dist/catalog/chat-models/te/ternary-bonsai-27b-q2/manifest.json +204 -0
- package/dist/catalog/chat-models/te/ternary-bonsai-27b-q2/versions/1.0.0/manifest.json +70 -0
- package/dist/catalog/chat-models/te/ternary-bonsai-27b-q2/versions/1.0.1/manifest.json +70 -0
- package/dist/catalog/chat-models/un/underdog-saluki-27b-iq2-mix/manifest.json +164 -0
- package/dist/catalog/chat-models/un/underdog-saluki-27b-iq2-mix/versions/1.0.0/manifest.json +14 -0
- package/dist/catalog/knowledge-catalogs/be/bendyline-how-to-books/manifest.json +26 -0
- package/dist/catalog/knowledge-catalogs/be/bendyline-how-to-books/versions/2026.10.8/manifest.json +8950 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-alaska-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-alaska-part-0001/versions/2026.10.1/manifest.json +658 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-nevada-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-nevada-part-0001/versions/2026.10.1/manifest.json +666 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-300-399-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-300-399-part-0001/versions/2026.10.2/manifest.json +182 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-347-349/manifest.json +25 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-347-349/versions/2026.10.5/manifest.json +38 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0001/versions/2026.10.1/manifest.json +558 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0002/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0002/versions/2026.10.1/manifest.json +258 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0001/versions/2026.10.1/manifest.json +318 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0002/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0002/versions/2026.10.1/manifest.json +266 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0003/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0003/versions/2026.10.1/manifest.json +186 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0004/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0004/versions/2026.10.1/manifest.json +138 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0005/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0005/versions/2026.10.1/manifest.json +138 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-wyoming-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-wyoming-part-0001/versions/2026.10.3/manifest.json +626 -0
- package/dist/catalog/knowledge-catalogs/index.json +1 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-aspnet-core-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-aspnet-core-en/versions/2026.10.16/manifest.json +18270 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-ai-platform-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-ai-platform-en/versions/2026.10.16/manifest.json +1098 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-apps-compute-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-apps-compute-en/versions/2026.10.16/manifest.json +722 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-data-aiot-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-data-aiot-en/versions/2026.10.16/manifest.json +530 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-management-hybrid-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-management-hybrid-en/versions/2026.10.16/manifest.json +602 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-network-security-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-network-security-en/versions/2026.10.16/manifest.json +250 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-dotnet-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-dotnet-en/versions/2026.10.16/manifest.json +16794 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-entity-framework-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-entity-framework-en/versions/2026.10.16/manifest.json +1106 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-microsoft-365-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-microsoft-365-en/versions/2026.10.16/manifest.json +234 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-powershell-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-powershell-en/versions/2026.10.16/manifest.json +522 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-sql-server-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-sql-server-en/versions/2026.10.16/manifest.json +1850 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-apps-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-apps-en/versions/2026.10.16/manifest.json +1734 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-server-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-server-en/versions/2026.10.16/manifest.json +774 -0
- package/dist/catalog/knowledge-catalogs/raw-index.json +1 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/manifest.json +28 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.4.2/manifest.json +53 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.4.3/manifest.json +885 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.4.5/manifest.json +157 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/manifest.json +32 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.4.2/manifest.json +69 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.4.3/manifest.json +741 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.4.5/manifest.json +173 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/manifest.json +69 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/versions/2026.4.4/manifest.json +217 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/versions/2026.4.5/manifest.json +217 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/versions/2026.4.4/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.4.3/manifest.json +925 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/manifest.json +28 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.4.2/manifest.json +53 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.4.3/manifest.json +1665 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.4.5/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.4.3/manifest.json +1233 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.4.5/manifest.json +141 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.4.3/manifest.json +493 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/manifest.json +63 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/versions/2026.4.4/manifest.json +193 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/versions/2026.4.5/manifest.json +193 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/manifest.json +30 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.4.2/manifest.json +61 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.4.3/manifest.json +665 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.4.5/manifest.json +177 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.4.3/manifest.json +745 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/manifest.json +62 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/versions/2026.4.4/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/versions/2026.4.5/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/versions/2026.4.4/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/manifest.json +30 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.4.2/manifest.json +61 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.4.3/manifest.json +1253 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.4.5/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.4.3/manifest.json +1957 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/manifest.json +63 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/versions/2026.4.5/manifest.json +193 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/manifest.json +45 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/versions/2026.4.4/manifest.json +121 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/versions/2026.4.5/manifest.json +173 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/manifest.json +62 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/versions/2026.4.4/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/versions/2026.4.5/manifest.json +189 -0
- package/dist/catalog/provenance.json +8 -0
- package/dist/chat/catalog-model-lookup.d.ts +21 -0
- package/dist/chat/catalog-model-lookup.js +48 -0
- package/dist/chat/local-model-tier.d.ts +1 -0
- package/dist/chat/local-model-tier.js +2 -0
- package/dist/chat/vision-capability.d.ts +1 -0
- package/dist/chat/vision-capability.js +3 -0
- package/dist/engine-components.d.ts +30 -0
- package/dist/engine-components.js +144 -0
- package/dist/engines/electron-native-reuse.d.ts +65 -0
- package/dist/engines/electron-native-reuse.js +305 -0
- package/dist/engines/native-file-manifest.json +1320 -0
- package/dist/engines/native-manifest.d.ts +70 -0
- package/dist/engines/native-manifest.js +98 -0
- package/dist/engines/registry.d.ts +88 -0
- package/dist/engines/registry.js +217 -0
- package/dist/engines/resolver.d.ts +121 -0
- package/dist/engines/resolver.js +894 -0
- package/dist/engines/signature.d.ts +85 -0
- package/dist/engines/signature.js +231 -0
- package/dist/fs/atomic.d.ts +53 -0
- package/dist/fs/atomic.js +202 -0
- package/dist/fs/config-store.d.ts +14 -0
- package/dist/fs/config-store.js +101 -0
- package/dist/fs/home-permissions.d.ts +18 -0
- package/dist/fs/home-permissions.js +27 -0
- package/dist/fs/safe-paths.d.ts +107 -0
- package/dist/fs/safe-paths.js +264 -0
- package/dist/fs/security-json.d.ts +13 -0
- package/dist/fs/security-json.js +67 -0
- package/dist/http/auth-context.d.ts +23 -0
- package/dist/http/auth-context.js +1 -0
- package/dist/http/engine-runtime-context.d.ts +30 -0
- package/dist/http/engine-runtime-context.js +1 -0
- package/dist/http/external-conversation-contract.d.ts +49 -0
- package/dist/http/external-conversation-contract.js +1 -0
- package/dist/http/external-conversation-headers.d.ts +11 -0
- package/dist/http/external-conversation-headers.js +11 -0
- package/dist/http/inference-context.d.ts +36 -0
- package/dist/http/inference-context.js +1 -0
- package/dist/http/model-inventory-cache.d.ts +8 -0
- package/dist/http/model-inventory-cache.js +8 -0
- package/dist/http/openai-compat/action-ledger.d.ts +15 -0
- package/dist/http/openai-compat/action-ledger.js +119 -0
- package/dist/http/openai-compat/apple-model.d.ts +3 -0
- package/dist/http/openai-compat/apple-model.js +44 -0
- package/dist/http/openai-compat/caller-owned-profile.d.ts +7 -0
- package/dist/http/openai-compat/caller-owned-profile.js +18 -0
- package/dist/http/openai-compat/chat-progress.d.ts +9 -0
- package/dist/http/openai-compat/chat-progress.js +69 -0
- package/dist/http/openai-compat/chat-target.d.ts +76 -0
- package/dist/http/openai-compat/chat-target.js +97 -0
- package/dist/http/openai-compat/embeddings.d.ts +37 -0
- package/dist/http/openai-compat/embeddings.js +86 -0
- package/dist/http/openai-compat/request-tuning.d.ts +35 -0
- package/dist/http/openai-compat/request-tuning.js +87 -0
- package/dist/http/openai-compat/responses-streaming.d.ts +351 -0
- package/dist/http/openai-compat/responses-streaming.js +717 -0
- package/dist/http/openai-compat/responses-translate.d.ts +215 -0
- package/dist/http/openai-compat/responses-translate.js +377 -0
- package/dist/http/openai-compat/streaming-telemetry.d.ts +30 -0
- package/dist/http/openai-compat/streaming-telemetry.js +88 -0
- package/dist/http/openai-compat/streaming.d.ts +141 -0
- package/dist/http/openai-compat/streaming.js +687 -0
- package/dist/http/openai-compat/tool-call-stream-filter.d.ts +33 -0
- package/dist/http/openai-compat/tool-call-stream-filter.js +110 -0
- package/dist/http/openai-compat/translate.d.ts +254 -0
- package/dist/http/openai-compat/translate.js +485 -0
- package/dist/http/routes/engines.d.ts +13 -0
- package/dist/http/routes/engines.js +366 -0
- package/dist/http/routes/machine-engine-proxy.d.ts +26 -0
- package/dist/http/routes/machine-engine-proxy.js +43 -0
- package/dist/http/routes/model-bundles.d.ts +4 -0
- package/dist/http/routes/model-bundles.js +190 -0
- package/dist/http/routes/v1-chat.d.ts +72 -0
- package/dist/http/routes/v1-chat.js +645 -0
- package/dist/http/routes/v1-embeddings.d.ts +3 -0
- package/dist/http/routes/v1-embeddings.js +82 -0
- package/dist/http/routes/v1-knowledge.d.ts +4 -0
- package/dist/http/routes/v1-knowledge.js +304 -0
- package/dist/http/routes/v1-models-ensure.d.ts +32 -0
- package/dist/http/routes/v1-models-ensure.js +122 -0
- package/dist/http/routes/v1-models.d.ts +8 -0
- package/dist/http/routes/v1-models.js +189 -0
- package/dist/http/routes/v1-responses.d.ts +20 -0
- package/dist/http/routes/v1-responses.js +327 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/inference-service.d.ts +28 -0
- package/dist/inference-service.js +275 -0
- package/dist/knowledge/admission.d.ts +3 -0
- package/dist/knowledge/admission.js +22 -0
- package/dist/knowledge/bundled-catalog.d.ts +2 -0
- package/dist/knowledge/bundled-catalog.js +2 -0
- package/dist/knowledge/catalog-host.d.ts +103 -0
- package/dist/knowledge/catalog-host.js +180 -0
- package/dist/knowledge/catalog-source.d.ts +22 -0
- package/dist/knowledge/catalog-source.js +35 -0
- package/dist/knowledge/install.d.ts +55 -0
- package/dist/knowledge/install.js +274 -0
- package/dist/knowledge/manager.d.ts +287 -0
- package/dist/knowledge/manager.js +1540 -0
- package/dist/knowledge/registry.d.ts +35 -0
- package/dist/knowledge/registry.js +123 -0
- package/dist/knowledge/search-worker.d.ts +17 -0
- package/dist/knowledge/search-worker.js +36 -0
- package/dist/knowledge/shared-install-contract.d.ts +19 -0
- package/dist/knowledge/shared-install-contract.js +1 -0
- package/dist/knowledge/spatial-query.d.ts +11 -0
- package/dist/knowledge/spatial-query.js +33 -0
- package/dist/knowledge/trust-anchors.d.ts +11 -0
- package/dist/knowledge/trust-anchors.js +51 -0
- package/dist/knowledge/vector-floors.d.ts +44 -0
- package/dist/knowledge/vector-floors.js +92 -0
- package/dist/knowledge/worker-host.d.ts +9 -0
- package/dist/knowledge/worker-host.js +179 -0
- package/dist/kokoro-lexicon/LICENSE +202 -0
- package/dist/kokoro-lexicon/lexicon-gb-en.txt.gz +0 -0
- package/dist/kokoro-lexicon/lexicon-us-en.txt.gz +0 -0
- package/dist/kokoro-lexicon/manifest.json +23 -0
- package/dist/machine-engine/inspect-runtime.d.ts +3 -0
- package/dist/machine-engine/inspect-runtime.js +48 -0
- package/dist/machine-engine/knowledge-assets.d.ts +79 -0
- package/dist/machine-engine/knowledge-assets.js +505 -0
- package/dist/memory/embed-core.d.ts +131 -0
- package/dist/memory/embed-core.js +398 -0
- package/dist/memory/embed-worker.d.ts +23 -0
- package/dist/memory/embed-worker.js +49 -0
- package/dist/memory/embeddings.d.ts +105 -0
- package/dist/memory/embeddings.js +467 -0
- package/dist/model-profile/behaviors/tools-mlx-template-fix.d.ts +1 -0
- package/dist/model-profile/behaviors/tools-mlx-template-fix.js +2 -0
- package/dist/model-profile/behaviors/turn-ramble-detection.d.ts +1 -0
- package/dist/model-profile/behaviors/turn-ramble-detection.js +2 -0
- package/dist/model-profile/defaults.d.ts +1 -0
- package/dist/model-profile/defaults.js +2 -0
- package/dist/model-profile/index.d.ts +9 -0
- package/dist/model-profile/index.js +7 -0
- package/dist/model-profile/registry.d.ts +15 -0
- package/dist/model-profile/registry.js +18 -0
- package/dist/model-profile/runtime.d.ts +48 -0
- package/dist/model-profile/runtime.js +131 -0
- package/dist/model-profile/tool-grammar.d.ts +1 -0
- package/dist/model-profile/tool-grammar.js +2 -0
- package/dist/model-profile/tuning.d.ts +19 -0
- package/dist/model-profile/tuning.js +21 -0
- package/dist/model-profile/types.d.ts +1 -0
- package/dist/model-profile/types.js +2 -0
- package/dist/models/bundle-storage.d.ts +28 -0
- package/dist/models/bundle-storage.js +80 -0
- package/dist/models/catalog-drift.d.ts +48 -0
- package/dist/models/catalog-drift.js +94 -0
- package/dist/models/catalog-payload-identity.d.ts +107 -0
- package/dist/models/catalog-payload-identity.js +254 -0
- package/dist/models/ensure.d.ts +125 -0
- package/dist/models/ensure.js +205 -0
- package/dist/models/gezmodel.d.ts +47 -0
- package/dist/models/gezmodel.js +742 -0
- package/dist/models/install-registry.d.ts +101 -0
- package/dist/models/install-registry.js +216 -0
- package/dist/models/model-id.d.ts +22 -0
- package/dist/models/model-id.js +40 -0
- package/dist/models/storage-roots.d.ts +274 -0
- package/dist/models/storage-roots.js +865 -0
- package/dist/native-release-entry.d.ts +16 -0
- package/dist/native-release-entry.js +16 -0
- package/dist/perf/redact-path.d.ts +2 -0
- package/dist/perf/redact-path.js +27 -0
- package/dist/perf/responsiveness.d.ts +70 -0
- package/dist/perf/responsiveness.js +560 -0
- package/dist/providers/active-install-message.d.ts +42 -0
- package/dist/providers/active-install-message.js +49 -0
- package/dist/providers/apple-foundation-models/binary.d.ts +4 -0
- package/dist/providers/apple-foundation-models/binary.js +18 -0
- package/dist/providers/apple-foundation-models/helper.d.ts +66 -0
- package/dist/providers/apple-foundation-models/helper.js +262 -0
- package/dist/providers/apple-foundation-models/provider.d.ts +82 -0
- package/dist/providers/apple-foundation-models/provider.js +389 -0
- package/dist/providers/apple-foundation-models/status.d.ts +9 -0
- package/dist/providers/apple-foundation-models/status.js +49 -0
- package/dist/providers/audio/kokoro-frontend.d.ts +50 -0
- package/dist/providers/audio/kokoro-frontend.js +113 -0
- package/dist/providers/audio/managed-speech-model.d.ts +9 -0
- package/dist/providers/audio/managed-speech-model.js +86 -0
- package/dist/providers/audio/types.d.ts +202 -0
- package/dist/providers/audio/types.js +17 -0
- package/dist/providers/audio/whisper-cpp.d.ts +99 -0
- package/dist/providers/audio/whisper-cpp.js +420 -0
- package/dist/providers/audio-persister-contract.d.ts +13 -0
- package/dist/providers/audio-persister-contract.js +1 -0
- package/dist/providers/catalog-model-config.d.ts +63 -0
- package/dist/providers/catalog-model-config.js +95 -0
- package/dist/providers/code-block-salvage.d.ts +1 -0
- package/dist/providers/code-block-salvage.js +2 -0
- package/dist/providers/codex-cli/reasoning.d.ts +8 -0
- package/dist/providers/codex-cli/reasoning.js +17 -0
- package/dist/providers/complete-tool-call.d.ts +16 -0
- package/dist/providers/complete-tool-call.js +25 -0
- package/dist/providers/constrained-turn.d.ts +1 -0
- package/dist/providers/constrained-turn.js +2 -0
- package/dist/providers/deliverable-read-pacing.d.ts +1 -0
- package/dist/providers/deliverable-read-pacing.js +2 -0
- package/dist/providers/direct-file-work-prompt.d.ts +1 -0
- package/dist/providers/direct-file-work-prompt.js +2 -0
- package/dist/providers/ds4/build-provider.d.ts +100 -0
- package/dist/providers/ds4/build-provider.js +539 -0
- package/dist/providers/ds4/cache-adapter.d.ts +42 -0
- package/dist/providers/ds4/cache-adapter.js +110 -0
- package/dist/providers/ds4/dspark.d.ts +83 -0
- package/dist/providers/ds4/dspark.js +107 -0
- package/dist/providers/ds4/mtp.d.ts +32 -0
- package/dist/providers/ds4/mtp.js +46 -0
- package/dist/providers/ds4/provider.d.ts +67 -0
- package/dist/providers/ds4/provider.js +104 -0
- package/dist/providers/ds4/residency.d.ts +143 -0
- package/dist/providers/ds4/residency.js +139 -0
- package/dist/providers/ds4/stdout-parser.d.ts +47 -0
- package/dist/providers/ds4/stdout-parser.js +134 -0
- package/dist/providers/duplicate-tool-calls.d.ts +1 -0
- package/dist/providers/duplicate-tool-calls.js +2 -0
- package/dist/providers/file-repair-policy.d.ts +1 -0
- package/dist/providers/file-repair-policy.js +2 -0
- package/dist/providers/gpu-arbiter.d.ts +159 -0
- package/dist/providers/gpu-arbiter.js +301 -0
- package/dist/providers/image-persister-contract.d.ts +15 -0
- package/dist/providers/image-persister-contract.js +1 -0
- package/dist/providers/llama-cpp/build-metadata.d.ts +13 -0
- package/dist/providers/llama-cpp/build-metadata.js +39 -0
- package/dist/providers/llama-cpp/build-provider.d.ts +66 -0
- package/dist/providers/llama-cpp/build-provider.js +1491 -0
- package/dist/providers/llama-cpp/cache-adapter.d.ts +242 -0
- package/dist/providers/llama-cpp/cache-adapter.js +689 -0
- package/dist/providers/llama-cpp/devices.d.ts +130 -0
- package/dist/providers/llama-cpp/devices.js +256 -0
- package/dist/providers/llama-cpp/disk-cache.d.ts +8 -0
- package/dist/providers/llama-cpp/disk-cache.js +112 -0
- package/dist/providers/llama-cpp/engine-flags.d.ts +181 -0
- package/dist/providers/llama-cpp/engine-flags.js +279 -0
- package/dist/providers/llama-cpp/gguf-metadata-async.d.ts +11 -0
- package/dist/providers/llama-cpp/gguf-metadata-async.js +180 -0
- package/dist/providers/llama-cpp/gguf-metadata-worker.d.ts +7 -0
- package/dist/providers/llama-cpp/gguf-metadata-worker.js +27 -0
- package/dist/providers/llama-cpp/gguf-metadata.d.ts +198 -0
- package/dist/providers/llama-cpp/gguf-metadata.js +615 -0
- package/dist/providers/llama-cpp/gguf-quantization-backfill.d.ts +32 -0
- package/dist/providers/llama-cpp/gguf-quantization-backfill.js +75 -0
- package/dist/providers/llama-cpp/index.d.ts +10 -0
- package/dist/providers/llama-cpp/index.js +13 -0
- package/dist/providers/llama-cpp/kv-cache-type.d.ts +118 -0
- package/dist/providers/llama-cpp/kv-cache-type.js +140 -0
- package/dist/providers/llama-cpp/log.d.ts +92 -0
- package/dist/providers/llama-cpp/log.js +280 -0
- package/dist/providers/llama-cpp/models.d.ts +389 -0
- package/dist/providers/llama-cpp/models.js +1011 -0
- package/dist/providers/llama-cpp/offload-planner.d.ts +339 -0
- package/dist/providers/llama-cpp/offload-planner.js +524 -0
- package/dist/providers/llama-cpp/provider.d.ts +493 -0
- package/dist/providers/llama-cpp/provider.js +862 -0
- package/dist/providers/llama-cpp/reasoning-launch.d.ts +7 -0
- package/dist/providers/llama-cpp/reasoning-launch.js +14 -0
- package/dist/providers/llama-cpp/spec-draft.d.ts +44 -0
- package/dist/providers/llama-cpp/spec-draft.js +44 -0
- package/dist/providers/llama-cpp/stdout-parser.d.ts +70 -0
- package/dist/providers/llama-cpp/stdout-parser.js +197 -0
- package/dist/providers/local-tool-call-salvage.d.ts +1 -0
- package/dist/providers/local-tool-call-salvage.js +2 -0
- package/dist/providers/local-turn-policy.d.ts +1 -0
- package/dist/providers/local-turn-policy.js +2 -0
- package/dist/providers/mlx/async-file-handoff.d.ts +11 -0
- package/dist/providers/mlx/async-file-handoff.js +25 -0
- package/dist/providers/mlx/build-provider.d.ts +65 -0
- package/dist/providers/mlx/build-provider.js +717 -0
- package/dist/providers/mlx/cache-adapter.d.ts +161 -0
- package/dist/providers/mlx/cache-adapter.js +445 -0
- package/dist/providers/mlx/chat-protocol.d.ts +48 -0
- package/dist/providers/mlx/chat-protocol.js +8 -0
- package/dist/providers/mlx/config-parser.d.ts +29 -0
- package/dist/providers/mlx/config-parser.js +81 -0
- package/dist/providers/mlx/engine-gate.d.ts +51 -0
- package/dist/providers/mlx/engine-gate.js +207 -0
- package/dist/providers/mlx/engine-hold.d.ts +41 -0
- package/dist/providers/mlx/engine-hold.js +59 -0
- package/dist/providers/mlx/engine-log-router.d.ts +84 -0
- package/dist/providers/mlx/engine-log-router.js +137 -0
- package/dist/providers/mlx/engine-stats-sampler.d.ts +36 -0
- package/dist/providers/mlx/engine-stats-sampler.js +59 -0
- package/dist/providers/mlx/index.d.ts +10 -0
- package/dist/providers/mlx/index.js +10 -0
- package/dist/providers/mlx/log.d.ts +55 -0
- package/dist/providers/mlx/log.js +157 -0
- package/dist/providers/mlx/model-geometry.d.ts +35 -0
- package/dist/providers/mlx/model-geometry.js +118 -0
- package/dist/providers/mlx/models.d.ts +289 -0
- package/dist/providers/mlx/models.js +1079 -0
- package/dist/providers/mlx/provider.d.ts +404 -0
- package/dist/providers/mlx/provider.js +3017 -0
- package/dist/providers/mlx/python/cache_persist.py +348 -0
- package/dist/providers/mlx/python/cache_seed.py +402 -0
- package/dist/providers/mlx/python/gezel_mlx_server.py +4491 -0
- package/dist/providers/mlx/python/lfm2_compat.py +55 -0
- package/dist/providers/mlx/python/qwen3_5_text_compat.py +60 -0
- package/dist/providers/mlx/python/qwen4_ple.py +159 -0
- package/dist/providers/mlx/python/spec_decode.py +775 -0
- package/dist/providers/mlx/python/template_stability.py +133 -0
- package/dist/providers/mlx/python/think_budget.py +113 -0
- package/dist/providers/mlx/python/tool_args_json.py +297 -0
- package/dist/providers/mlx/python/tool_call_stream.py +265 -0
- package/dist/providers/mlx/python/tool_grammar.py +794 -0
- package/dist/providers/mlx/python/vision_inputs.py +64 -0
- package/dist/providers/mlx/python/wave_policy.py +147 -0
- package/dist/providers/mlx/reasoning-stream.d.ts +85 -0
- package/dist/providers/mlx/reasoning-stream.js +196 -0
- package/dist/providers/mlx/request-shape.d.ts +34 -0
- package/dist/providers/mlx/request-shape.js +42 -0
- package/dist/providers/mlx/runtime-diagnostics.d.ts +29 -0
- package/dist/providers/mlx/runtime-diagnostics.js +162 -0
- package/dist/providers/mlx/spec-drafter.d.ts +25 -0
- package/dist/providers/mlx/spec-drafter.js +73 -0
- package/dist/providers/mlx/stdout-parser.d.ts +60 -0
- package/dist/providers/mlx/stdout-parser.js +254 -0
- package/dist/providers/mlx/textual-tool-call-salvage.d.ts +46 -0
- package/dist/providers/mlx/textual-tool-call-salvage.js +396 -0
- package/dist/providers/mlx/tool-call-protocol.d.ts +65 -0
- package/dist/providers/mlx/tool-call-protocol.js +140 -0
- package/dist/providers/mlx/tool-call-stripper.d.ts +68 -0
- package/dist/providers/mlx/tool-call-stripper.js +153 -0
- package/dist/providers/mlx/tool-image-retention.d.ts +23 -0
- package/dist/providers/mlx/tool-image-retention.js +43 -0
- package/dist/providers/mlx/turn-telemetry.d.ts +22 -0
- package/dist/providers/mlx/turn-telemetry.js +45 -0
- package/dist/providers/mlx/venv.d.ts +91 -0
- package/dist/providers/mlx/venv.js +111 -0
- package/dist/providers/mlx/vision-mode.d.ts +92 -0
- package/dist/providers/mlx/vision-mode.js +187 -0
- package/dist/providers/mlx/vision.d.ts +2 -0
- package/dist/providers/mlx/vision.js +12 -0
- package/dist/providers/mlx/wire-transcript.d.ts +14 -0
- package/dist/providers/mlx/wire-transcript.js +43 -0
- package/dist/providers/native/capacity-broker.d.ts +812 -0
- package/dist/providers/native/capacity-broker.js +1058 -0
- package/dist/providers/native/capacity-budget.d.ts +133 -0
- package/dist/providers/native/capacity-budget.js +265 -0
- package/dist/providers/native/device-capacity-ledger.d.ts +31 -0
- package/dist/providers/native/device-capacity-ledger.js +196 -0
- package/dist/providers/native/device-capacity.d.ts +84 -0
- package/dist/providers/native/device-capacity.js +431 -0
- package/dist/providers/native/engine-api-key.d.ts +57 -0
- package/dist/providers/native/engine-api-key.js +72 -0
- package/dist/providers/native/engine-key.d.ts +18 -0
- package/dist/providers/native/engine-key.js +41 -0
- package/dist/providers/native/engine-router.d.ts +145 -0
- package/dist/providers/native/engine-router.js +191 -0
- package/dist/providers/native/gpu-panic-guard.d.ts +54 -0
- package/dist/providers/native/gpu-panic-guard.js +59 -0
- package/dist/providers/native/inference.d.ts +33 -0
- package/dist/providers/native/inference.js +49 -0
- package/dist/providers/native/local-engine-runtime.d.ts +412 -0
- package/dist/providers/native/local-engine-runtime.js +1714 -0
- package/dist/providers/native/measured-budget.d.ts +32 -0
- package/dist/providers/native/measured-budget.js +54 -0
- package/dist/providers/native/port.d.ts +11 -0
- package/dist/providers/native/port.js +29 -0
- package/dist/providers/native/provider-pool.d.ts +474 -0
- package/dist/providers/native/provider-pool.js +1166 -0
- package/dist/providers/native/supervisor.d.ts +503 -0
- package/dist/providers/native/supervisor.js +1466 -0
- package/dist/providers/observation-context.d.ts +16 -0
- package/dist/providers/observation-context.js +1 -0
- package/dist/providers/openai-compatible/sse.d.ts +1 -0
- package/dist/providers/openai-compatible/sse.js +2 -0
- package/dist/providers/patient-fetch.d.ts +36 -0
- package/dist/providers/patient-fetch.js +44 -0
- package/dist/providers/project-macro-loop-bail.d.ts +7 -0
- package/dist/providers/project-macro-loop-bail.js +21 -0
- package/dist/providers/prose-document-salvage.d.ts +1 -0
- package/dist/providers/prose-document-salvage.js +2 -0
- package/dist/providers/provider-disposal.d.ts +1 -0
- package/dist/providers/provider-disposal.js +2 -0
- package/dist/providers/queue.d.ts +15 -0
- package/dist/providers/queue.js +23 -0
- package/dist/providers/ramble-abort-message.d.ts +1 -0
- package/dist/providers/ramble-abort-message.js +2 -0
- package/dist/providers/ramble-detector.d.ts +1 -0
- package/dist/providers/ramble-detector.js +2 -0
- package/dist/providers/reasoning-depth.d.ts +1 -0
- package/dist/providers/reasoning-depth.js +2 -0
- package/dist/providers/required-input-reads.d.ts +1 -0
- package/dist/providers/required-input-reads.js +2 -0
- package/dist/providers/session-defaults.d.ts +13 -0
- package/dist/providers/session-defaults.js +49 -0
- package/dist/providers/session-hooks.d.ts +26 -0
- package/dist/providers/session-hooks.js +1 -0
- package/dist/providers/streaming-session.d.ts +1 -0
- package/dist/providers/streaming-session.js +2 -0
- package/dist/providers/terminal-tool-policy.d.ts +1 -0
- package/dist/providers/terminal-tool-policy.js +2 -0
- package/dist/providers/tool-arg-schema-coercion.d.ts +1 -0
- package/dist/providers/tool-arg-schema-coercion.js +2 -0
- package/dist/providers/tool-executor.d.ts +12 -0
- package/dist/providers/tool-executor.js +20 -0
- package/dist/providers/tool-failure-tracker.d.ts +1 -0
- package/dist/providers/tool-failure-tracker.js +2 -0
- package/dist/providers/tool-repeat-tracker.d.ts +1 -0
- package/dist/providers/tool-repeat-tracker.js +2 -0
- package/dist/providers/turn-timeout.d.ts +1 -0
- package/dist/providers/turn-timeout.js +1 -0
- package/dist/providers/types.d.ts +834 -0
- package/dist/providers/types.js +42 -0
- package/dist/providers/usage-builder.d.ts +1 -0
- package/dist/providers/usage-builder.js +2 -0
- package/dist/providers/vision-capability.d.ts +109 -0
- package/dist/providers/vision-capability.js +137 -0
- package/dist/python/mlx-runtime-status-bus.d.ts +39 -0
- package/dist/python/mlx-runtime-status-bus.js +27 -0
- package/dist/python/uv-runtime.d.ts +176 -0
- package/dist/python/uv-runtime.js +492 -0
- package/dist/relevance/install.d.ts +28 -0
- package/dist/relevance/install.js +114 -0
- package/dist/relevance/manager.d.ts +79 -0
- package/dist/relevance/manager.js +211 -0
- package/dist/relevance/registry.d.ts +11 -0
- package/dist/relevance/registry.js +158 -0
- package/dist/relevance/relevance-core.d.ts +67 -0
- package/dist/relevance/relevance-core.js +189 -0
- package/dist/relevance/relevance-model.d.ts +42 -0
- package/dist/relevance/relevance-model.js +292 -0
- package/dist/relevance/relevance-worker.d.ts +20 -0
- package/dist/relevance/relevance-worker.js +57 -0
- package/dist/relevance/settings.d.ts +30 -0
- package/dist/relevance/settings.js +81 -0
- package/dist/remotes/identity.d.ts +121 -0
- package/dist/remotes/identity.js +348 -0
- package/dist/remotes/pinned-fetch.d.ts +45 -0
- package/dist/remotes/pinned-fetch.js +193 -0
- package/dist/remotes/types.d.ts +54 -0
- package/dist/remotes/types.js +1 -0
- package/dist/runtime-lock.d.ts +29 -0
- package/dist/runtime-lock.js +85 -0
- package/dist/search/relevance-stage.d.ts +81 -0
- package/dist/search/relevance-stage.js +177 -0
- package/dist/secrets/types.d.ts +63 -0
- package/dist/secrets/types.js +64 -0
- package/dist/speech.d.ts +1 -0
- package/dist/speech.js +1 -0
- package/dist/system/darwin-memory.d.ts +26 -0
- package/dist/system/darwin-memory.js +81 -0
- package/dist/system/gezel-process-memory.d.ts +55 -0
- package/dist/system/gezel-process-memory.js +156 -0
- package/dist/system/memory.d.ts +154 -0
- package/dist/system/memory.js +501 -0
- package/dist/transformers-cache.d.ts +112 -0
- package/dist/transformers-cache.js +392 -0
- package/dist/utils/disk-space.d.ts +55 -0
- package/dist/utils/disk-space.js +72 -0
- package/dist/utils/download-common.d.ts +138 -0
- package/dist/utils/download-common.js +196 -0
- package/dist/utils/download-with-retry.d.ts +85 -0
- package/dist/utils/download-with-retry.js +522 -0
- package/dist/utils/extract-zip.d.ts +22 -0
- package/dist/utils/extract-zip.js +103 -0
- package/dist/utils/retire-model-worker.d.ts +15 -0
- package/dist/utils/retire-model-worker.js +24 -0
- package/dist/utils/service-worker-entry.d.ts +59 -0
- package/dist/utils/service-worker-entry.js +69 -0
- package/dist/utils/xet-download.d.ts +40 -0
- package/dist/utils/xet-download.js +526 -0
- package/dist/utils/xet.d.ts +86 -0
- package/dist/utils/xet.js +201 -0
- package/package.json +103 -3
- package/scripts/embedding-packaging.cjs +264 -0
- package/scripts/embedding-packaging.d.cts +16 -0
|
@@ -0,0 +1,865 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process';
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
3
|
+
import { createReadStream } from 'node:fs';
|
|
4
|
+
import { chmod, lstat, mkdir, readFile, readdir, realpath, rename, rm, writeFile, } from 'node:fs/promises';
|
|
5
|
+
import { delimiter, dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
6
|
+
import { promisify } from 'node:util';
|
|
7
|
+
import { createLogger } from '@bendyline/gezel';
|
|
8
|
+
import { windowsHeadlessSpawnOptions } from '@bendyline/gezel/native';
|
|
9
|
+
const execFileAsync = promisify(execFile);
|
|
10
|
+
const log = createLogger('assets');
|
|
11
|
+
// A first adoption can require hashing tens of gigabytes. Model inventory is
|
|
12
|
+
// requested by several UI paths, so share that work instead of letting each
|
|
13
|
+
// request start another full read of the same payload.
|
|
14
|
+
const readOnlyVerificationInFlight = new Map();
|
|
15
|
+
const verificationCacheWrites = new Map();
|
|
16
|
+
/**
|
|
17
|
+
* Public machine assets are intentionally separate from the machine
|
|
18
|
+
* service's private GEZEL_HOME state. The installer/service host supplies
|
|
19
|
+
* this variable; standalone CLI launches supply the same canonical path as a
|
|
20
|
+
* read-only overlay.
|
|
21
|
+
*/
|
|
22
|
+
export const SHARED_ASSETS_ENV = 'GEZEL_SHARED_ASSETS_DIR';
|
|
23
|
+
/**
|
|
24
|
+
* Additional gezel HOMES whose installed models this process may read but
|
|
25
|
+
* never write. Delimiter-separated absolute paths, lowest priority in the
|
|
26
|
+
* overlay.
|
|
27
|
+
*
|
|
28
|
+
* This exists for a daemon hosted by a third-party app through
|
|
29
|
+
* `@bendyline/gezel-app-sdk/host`: it owns a private home under
|
|
30
|
+
* `~/.gezel/apps/<appId>/`, so without this it would re-download weights the
|
|
31
|
+
* user's own Gezel install already has. Unlike {@link SHARED_ASSETS_ENV},
|
|
32
|
+
* which names a purpose-built public asset store, the entries here are
|
|
33
|
+
* ordinary homes, so the per-engine `engines/<engine>/models` suffix is
|
|
34
|
+
* applied for them. Read-only payloads still have to carry
|
|
35
|
+
* `manifest.fileSha256` to be adopted, so a home whose installs predate
|
|
36
|
+
* that field is simply skipped rather than trusted.
|
|
37
|
+
*/
|
|
38
|
+
export const READONLY_MODEL_HOMES_ENV = 'GEZEL_READONLY_MODEL_HOMES';
|
|
39
|
+
const SHARED_MODEL_ENGINES = [
|
|
40
|
+
'llama-cpp',
|
|
41
|
+
'ds4',
|
|
42
|
+
'mlx',
|
|
43
|
+
'video',
|
|
44
|
+
'sd-cpp',
|
|
45
|
+
'whisper-cpp',
|
|
46
|
+
'recognition',
|
|
47
|
+
];
|
|
48
|
+
/**
|
|
49
|
+
* Resolve a model store without ever treating the machine service's private
|
|
50
|
+
* home as a fallback. Local assets shadow machine assets with the same id.
|
|
51
|
+
*/
|
|
52
|
+
export function modelStorageRoots(opts) {
|
|
53
|
+
const env = opts.env ?? process.env;
|
|
54
|
+
const localRoot = join(opts.home, 'engines', opts.engine, 'models');
|
|
55
|
+
const configured = env[SHARED_ASSETS_ENV]?.trim();
|
|
56
|
+
const sharedAssetsRoot = configured && isAbsolute(configured) ? resolve(configured) : undefined;
|
|
57
|
+
const sharedModelRoot = sharedAssetsRoot
|
|
58
|
+
? join(sharedAssetsRoot, 'models', opts.engine)
|
|
59
|
+
: undefined;
|
|
60
|
+
if (env.GEZEL_SYSTEM_SCOPE === '1' && sharedModelRoot) {
|
|
61
|
+
return { writableRoot: sharedModelRoot, readOnlyRoots: [] };
|
|
62
|
+
}
|
|
63
|
+
const readOnlyRoots = [];
|
|
64
|
+
const seen = new Set([resolve(localRoot)]);
|
|
65
|
+
const addReadOnly = (root) => {
|
|
66
|
+
const resolved = resolve(root);
|
|
67
|
+
if (seen.has(resolved))
|
|
68
|
+
return;
|
|
69
|
+
seen.add(resolved);
|
|
70
|
+
readOnlyRoots.push(root);
|
|
71
|
+
};
|
|
72
|
+
if (sharedModelRoot)
|
|
73
|
+
addReadOnly(sharedModelRoot);
|
|
74
|
+
for (const home of readOnlyModelHomes(env)) {
|
|
75
|
+
addReadOnly(join(home, 'engines', opts.engine, 'models'));
|
|
76
|
+
}
|
|
77
|
+
return { writableRoot: localRoot, readOnlyRoots };
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Parse {@link READONLY_MODEL_HOMES_ENV}. Relative entries are dropped rather
|
|
81
|
+
* than resolved against the daemon's cwd — a model root is a machine-level
|
|
82
|
+
* location, and guessing one from whichever directory happened to launch the
|
|
83
|
+
* process is how a host ends up reading someone else's files.
|
|
84
|
+
*/
|
|
85
|
+
export function readOnlyModelHomes(env = process.env) {
|
|
86
|
+
const raw = env[READONLY_MODEL_HOMES_ENV]?.trim();
|
|
87
|
+
if (!raw)
|
|
88
|
+
return [];
|
|
89
|
+
const homes = [];
|
|
90
|
+
const seen = new Set();
|
|
91
|
+
for (const entry of raw.split(delimiter)) {
|
|
92
|
+
const trimmed = entry.trim();
|
|
93
|
+
if (!trimmed || !isAbsolute(trimmed))
|
|
94
|
+
continue;
|
|
95
|
+
const resolved = resolve(trimmed);
|
|
96
|
+
if (seen.has(resolved))
|
|
97
|
+
continue;
|
|
98
|
+
seen.add(resolved);
|
|
99
|
+
homes.push(resolved);
|
|
100
|
+
}
|
|
101
|
+
return homes;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Fail closed when an existing model-store component resolves through a
|
|
105
|
+
* symlink/junction or outside the configured root. On Windows, Node reports
|
|
106
|
+
* directory junctions as symbolic links and `realpath` resolves the final
|
|
107
|
+
* filesystem target, so this protects both recursive ACL work and ordinary
|
|
108
|
+
* publish/delete operations from descendant reparse redirection.
|
|
109
|
+
*
|
|
110
|
+
* Missing trailing components are allowed so callers can validate a publish
|
|
111
|
+
* target before creating it. Every existing ancestor, including `root`, is
|
|
112
|
+
* still checked.
|
|
113
|
+
*/
|
|
114
|
+
export async function assertModelStorePathSafe(root, target) {
|
|
115
|
+
const resolvedRoot = resolve(root);
|
|
116
|
+
const resolvedTarget = resolve(target);
|
|
117
|
+
const rel = relative(resolvedRoot, resolvedTarget);
|
|
118
|
+
if (rel.startsWith('..') || isAbsolute(rel)) {
|
|
119
|
+
throw new Error(`refusing a model-store path outside its root: ${resolvedTarget}`);
|
|
120
|
+
}
|
|
121
|
+
const components = rel ? rel.split(sep).filter(Boolean) : [];
|
|
122
|
+
let cursor = resolvedRoot;
|
|
123
|
+
let deepestExisting = resolvedRoot;
|
|
124
|
+
for (let index = -1; index < components.length; index += 1) {
|
|
125
|
+
if (index >= 0)
|
|
126
|
+
cursor = join(cursor, components[index]);
|
|
127
|
+
let info;
|
|
128
|
+
try {
|
|
129
|
+
info = await lstat(cursor);
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
if (error.code === 'ENOENT')
|
|
133
|
+
break;
|
|
134
|
+
throw error;
|
|
135
|
+
}
|
|
136
|
+
if (!info.isDirectory() || info.isSymbolicLink()) {
|
|
137
|
+
throw new Error(`refusing a linked or non-directory model-store path: ${cursor}`);
|
|
138
|
+
}
|
|
139
|
+
deepestExisting = cursor;
|
|
140
|
+
}
|
|
141
|
+
const [canonicalRoot, canonicalExisting] = await Promise.all([
|
|
142
|
+
realpath(resolvedRoot),
|
|
143
|
+
realpath(deepestExisting),
|
|
144
|
+
]);
|
|
145
|
+
const canonicalRel = relative(canonicalRoot, canonicalExisting);
|
|
146
|
+
if (canonicalRel.startsWith('..') || isAbsolute(canonicalRel)) {
|
|
147
|
+
throw new Error(`refusing a model-store path whose final target escapes its root: ${resolvedTarget}`);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* One-shot upgrade bridge for machine services that downloaded models into
|
|
152
|
+
* the formerly-private `<home>/engines/<engine>/models` tree. Both locations are on
|
|
153
|
+
* the same machine volume in supported installers, so directory renames are
|
|
154
|
+
* atomic and avoid copying multi-gigabyte weights.
|
|
155
|
+
*/
|
|
156
|
+
export async function migrateLegacySystemModels(home, env = process.env) {
|
|
157
|
+
if (env.GEZEL_SYSTEM_SCOPE !== '1' || !env[SHARED_ASSETS_ENV]?.trim())
|
|
158
|
+
return 0;
|
|
159
|
+
let moved = 0;
|
|
160
|
+
const publishFailures = [];
|
|
161
|
+
for (const engine of SHARED_MODEL_ENGINES) {
|
|
162
|
+
const roots = modelStorageRoots({ home, engine, env });
|
|
163
|
+
const legacyRoot = join(home, 'engines', engine, 'models');
|
|
164
|
+
if (resolve(legacyRoot) === resolve(roots.writableRoot))
|
|
165
|
+
continue;
|
|
166
|
+
const entries = await readdir(legacyRoot, { withFileTypes: true }).catch(() => null);
|
|
167
|
+
await mkdir(roots.writableRoot, { recursive: true });
|
|
168
|
+
await assertModelStorePathSafe(roots.writableRoot, roots.writableRoot);
|
|
169
|
+
if (entries) {
|
|
170
|
+
for (const entry of entries) {
|
|
171
|
+
if (!entry.isDirectory() || entry.isSymbolicLink())
|
|
172
|
+
continue;
|
|
173
|
+
const source = join(legacyRoot, entry.name);
|
|
174
|
+
const target = join(roots.writableRoot, entry.name);
|
|
175
|
+
await assertModelStorePathSafe(roots.writableRoot, target);
|
|
176
|
+
try {
|
|
177
|
+
await lstat(target);
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
catch {
|
|
181
|
+
// Missing target is the only state we migrate.
|
|
182
|
+
}
|
|
183
|
+
await rename(source, target);
|
|
184
|
+
moved += 1;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
// Releases before the public asset store did not record a complete
|
|
188
|
+
// per-file hash map. Backfill it while the bundle is still service-only,
|
|
189
|
+
// then widen read access. Also repairs bundles moved by an interrupted
|
|
190
|
+
// upgrade before this loop was introduced.
|
|
191
|
+
const sharedEntries = await readdir(roots.writableRoot, { withFileTypes: true }).catch(() => []);
|
|
192
|
+
for (const entry of sharedEntries) {
|
|
193
|
+
if (!entry.isDirectory() || entry.isSymbolicLink())
|
|
194
|
+
continue;
|
|
195
|
+
const modelDir = join(roots.writableRoot, entry.name);
|
|
196
|
+
try {
|
|
197
|
+
await publishMigratedModel(modelDir, env);
|
|
198
|
+
}
|
|
199
|
+
catch (error) {
|
|
200
|
+
// Publishing widens read access on ONE bundle. It must never decide
|
|
201
|
+
// whether the daemon boots.
|
|
202
|
+
//
|
|
203
|
+
// This ran unguarded through v1.26219.44 and took the whole service
|
|
204
|
+
// down: the Windows installer had just made Administrators the owner
|
|
205
|
+
// of every pre-existing model while granting the service only Modify,
|
|
206
|
+
// so `icacls /reset` — which needs WRITE_DAC — failed with "Access is
|
|
207
|
+
// denied", the throw escaped startService, and gezeld crash-looped on
|
|
208
|
+
// SCM 1066. The installer grant is fixed (see nsis-hooks.nsh), but the
|
|
209
|
+
// structural bug was that a per-model permission repair was allowed to
|
|
210
|
+
// be fatal at all. Degrade the bundle, not the machine.
|
|
211
|
+
//
|
|
212
|
+
// Consequence of skipping: that bundle keeps its narrower ACL, so other
|
|
213
|
+
// accounts cannot read it until the next successful publish. The broker
|
|
214
|
+
// itself still uses it, so on-device inference is unaffected.
|
|
215
|
+
publishFailures.push(`${entry.name}: ${error instanceof Error ? error.message : String(error)}`);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
if (publishFailures.length > 0) {
|
|
220
|
+
log.warn(`${publishFailures.length} shared model bundle(s) could not be published for ` +
|
|
221
|
+
`cross-account read access and stay broker-only: ${publishFailures.join('; ')}`);
|
|
222
|
+
}
|
|
223
|
+
return moved;
|
|
224
|
+
}
|
|
225
|
+
async function publishMigratedModel(modelDir, env) {
|
|
226
|
+
const manifestPath = join(modelDir, 'manifest.json');
|
|
227
|
+
const info = await lstat(manifestPath).catch(() => null);
|
|
228
|
+
if (!info?.isFile() || info.isSymbolicLink())
|
|
229
|
+
return;
|
|
230
|
+
let parsed;
|
|
231
|
+
try {
|
|
232
|
+
parsed = JSON.parse(await readFile(manifestPath, 'utf8'));
|
|
233
|
+
}
|
|
234
|
+
catch {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
const existing = parsed.fileSha256;
|
|
238
|
+
const hasValidHashes = !!existing &&
|
|
239
|
+
typeof existing === 'object' &&
|
|
240
|
+
!Array.isArray(existing) &&
|
|
241
|
+
Object.keys(existing).length > 0 &&
|
|
242
|
+
Object.entries(existing).every(([path, sha]) => isSafeModelPath(path) && isSha256(String(sha)));
|
|
243
|
+
if (!hasValidHashes) {
|
|
244
|
+
const fileSha256 = await hashModelPayloadFiles(modelDir);
|
|
245
|
+
if (Object.keys(fileSha256).length === 0)
|
|
246
|
+
return;
|
|
247
|
+
await writeFile(manifestPath, `${JSON.stringify({ ...parsed, fileSha256 }, null, 2)}\n`, 'utf8');
|
|
248
|
+
}
|
|
249
|
+
await makeSharedModelReadable(modelDir, env);
|
|
250
|
+
}
|
|
251
|
+
/** Search order: user-owned/writable first, then machine-owned/read-only. */
|
|
252
|
+
export function modelSearchRoots(roots) {
|
|
253
|
+
return [roots.writableRoot, ...roots.readOnlyRoots];
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* List ids across an overlay, de-duplicating in search order so a user-owned
|
|
257
|
+
* model intentionally shadows a machine model with the same catalog id.
|
|
258
|
+
*/
|
|
259
|
+
export async function listOverlayModelIds(roots) {
|
|
260
|
+
const seen = new Set();
|
|
261
|
+
const ids = [];
|
|
262
|
+
for (const root of modelSearchRoots(roots)) {
|
|
263
|
+
let entries;
|
|
264
|
+
try {
|
|
265
|
+
entries = await readdir(root);
|
|
266
|
+
}
|
|
267
|
+
catch {
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
for (const id of entries) {
|
|
271
|
+
// Dot-entries are never model ids: `publishStagedModel` parks the old
|
|
272
|
+
// install at `.<id>.gezmodel-backup-<uuid>` during a replace, and a
|
|
273
|
+
// crash mid-publish must not surface that backup as a duplicate model.
|
|
274
|
+
if (id.startsWith('.'))
|
|
275
|
+
continue;
|
|
276
|
+
if (seen.has(id))
|
|
277
|
+
continue;
|
|
278
|
+
seen.add(id);
|
|
279
|
+
ids.push(id);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return ids;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Return the first overlay root containing a readable model manifest.
|
|
286
|
+
* Presence of an incomplete directory in a higher-priority root does not
|
|
287
|
+
* hide a complete machine model.
|
|
288
|
+
*/
|
|
289
|
+
export async function findModelRoot(roots, id) {
|
|
290
|
+
for (const root of modelSearchRoots(roots)) {
|
|
291
|
+
try {
|
|
292
|
+
const info = await lstat(join(root, id, 'manifest.json'));
|
|
293
|
+
if (info.isFile() && !info.isSymbolicLink())
|
|
294
|
+
return root;
|
|
295
|
+
}
|
|
296
|
+
catch {
|
|
297
|
+
// Try the next overlay root.
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Resolve an id that a quant-suffix migration renamed away, by finding the
|
|
304
|
+
* install that records it as its {@link InstalledModelRenameRecord.renamedFrom}.
|
|
305
|
+
*
|
|
306
|
+
* Config pins, gezel frontmatter, eval caches, and session records all hold
|
|
307
|
+
* whatever id was current when they were written, and there is no way to
|
|
308
|
+
* find and rewrite every one of them. Keeping the former id resolvable is
|
|
309
|
+
* what makes the rename cosmetic rather than a breaking change.
|
|
310
|
+
*
|
|
311
|
+
* Only ever called on a miss, and only over directories whose name the
|
|
312
|
+
* former id prefixes — every rename target is the former id plus a suffix,
|
|
313
|
+
* so no other directory can be the answer.
|
|
314
|
+
*/
|
|
315
|
+
export async function findRenamedModelId(roots, formerId) {
|
|
316
|
+
if (!formerId)
|
|
317
|
+
return null;
|
|
318
|
+
for (const root of modelSearchRoots(roots)) {
|
|
319
|
+
let entries;
|
|
320
|
+
try {
|
|
321
|
+
entries = await readdir(root);
|
|
322
|
+
}
|
|
323
|
+
catch {
|
|
324
|
+
continue;
|
|
325
|
+
}
|
|
326
|
+
for (const id of entries) {
|
|
327
|
+
if (!id.startsWith(`${formerId}-`))
|
|
328
|
+
continue;
|
|
329
|
+
const parsed = await readFile(join(root, id, 'manifest.json'), 'utf8')
|
|
330
|
+
.then((raw) => JSON.parse(raw))
|
|
331
|
+
.catch(() => null);
|
|
332
|
+
if (parsed?.renamedFrom === formerId)
|
|
333
|
+
return id;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
return null;
|
|
337
|
+
}
|
|
338
|
+
export async function modelExistsOnlyReadOnly(roots, id) {
|
|
339
|
+
const root = await findModelRoot(roots, id);
|
|
340
|
+
return root !== null && resolve(root) !== resolve(roots.writableRoot);
|
|
341
|
+
}
|
|
342
|
+
export const READ_ONLY_MODEL_CODE = 'read-only-model';
|
|
343
|
+
/**
|
|
344
|
+
* Refusal to mutate a model that only exists in a read-only overlay root.
|
|
345
|
+
* Typed so HTTP routes can map it to a 4xx with the actionable message
|
|
346
|
+
* instead of letting it escape as an opaque 500.
|
|
347
|
+
*/
|
|
348
|
+
export class ReadOnlyModelError extends Error {
|
|
349
|
+
code = READ_ONLY_MODEL_CODE;
|
|
350
|
+
constructor(id) {
|
|
351
|
+
super(`model "${id}" is supplied by the read-only machine asset store; install a user-owned copy to replace it`);
|
|
352
|
+
this.name = 'ReadOnlyModelError';
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
export function readOnlyModelError(id) {
|
|
356
|
+
return new ReadOnlyModelError(id);
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Remove a model directory, tolerating the file locks that make a naive
|
|
360
|
+
* `rm` flaky on Windows. Antivirus / Search-Indexer transient holds clear in
|
|
361
|
+
* a few hundred ms, so we retry with backoff. A *persistent* lock (a running
|
|
362
|
+
* llama-server has the GGUF open) never clears on its own — we surface an
|
|
363
|
+
* actionable message rather than the raw `EBUSY`/`EPERM` so the UI can tell
|
|
364
|
+
* the user to switch models first, instead of the delete looking like a no-op.
|
|
365
|
+
*/
|
|
366
|
+
export async function removeModelDir(itemDir, writableRoot = dirname(itemDir)) {
|
|
367
|
+
await assertModelStorePathSafe(writableRoot, itemDir);
|
|
368
|
+
const maxAttempts = 4;
|
|
369
|
+
for (let attempt = 1;; attempt++) {
|
|
370
|
+
try {
|
|
371
|
+
await rm(itemDir, { recursive: true, force: true });
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
catch (err) {
|
|
375
|
+
const code = err?.code;
|
|
376
|
+
const locked = code === 'EBUSY' || code === 'EPERM' || code === 'EACCES' || code === 'ENOTEMPTY';
|
|
377
|
+
if (locked && attempt < maxAttempts) {
|
|
378
|
+
await new Promise((r) => setTimeout(r, 150 * attempt));
|
|
379
|
+
continue;
|
|
380
|
+
}
|
|
381
|
+
if (locked) {
|
|
382
|
+
throw new Error('Could not delete the model files — a file is still in use. If this model is loaded in a running chat, switch to another model (or wait a moment), then try deleting again.');
|
|
383
|
+
}
|
|
384
|
+
throw err;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Hash every published payload file except the self-describing manifest.
|
|
390
|
+
*
|
|
391
|
+
* `precomputed` lets a caller that has *already* streamed a file through
|
|
392
|
+
* SHA-256 (the install path verifies every shard against the catalog hash
|
|
393
|
+
* before this runs) hand those digests in, keyed by the same '/'-joined
|
|
394
|
+
* relative path this returns. Matching files are taken from the cache
|
|
395
|
+
* instead of re-read — a multi-GB install would otherwise hash the whole
|
|
396
|
+
* payload from disk twice. Files on disk but absent from the cache (stale
|
|
397
|
+
* shards from a prior install, a dropped mmproj) are still enumerated and
|
|
398
|
+
* hashed, so the returned map always describes the real on-disk payload.
|
|
399
|
+
*/
|
|
400
|
+
export async function hashModelPayloadFiles(modelDir, precomputed) {
|
|
401
|
+
const result = {};
|
|
402
|
+
const root = resolve(modelDir);
|
|
403
|
+
for (const path of await listModelPayloadFiles(root)) {
|
|
404
|
+
result[path] = precomputed?.[path] ?? (await sha256File(join(root, ...path.split('/'))));
|
|
405
|
+
}
|
|
406
|
+
return Object.fromEntries(Object.entries(result).sort(([a], [b]) => a.localeCompare(b)));
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Delete payload files in a model directory that the freshly-written install no
|
|
410
|
+
* longer references. When a model updates in place to a different quant/filename
|
|
411
|
+
* (e.g. gemma4-12b-q4 moving from `…-Q4_K_M.gguf` to `…-qat-UD-Q4_K_XL.gguf`),
|
|
412
|
+
* the rename publishes the new weights but the old file lingers — tens of GB of
|
|
413
|
+
* orphaned weights for one slot. `keep` is the set of '/'-joined relative paths
|
|
414
|
+
* the new manifest references (weights + shards + mmproj + draft). manifest.json
|
|
415
|
+
* and in-flight `.partial` files are never candidates (listModelPayloadFiles
|
|
416
|
+
* already excludes them). Returns the relative paths removed. Best-effort per
|
|
417
|
+
* file — a file we can't remove is left rather than aborting the install.
|
|
418
|
+
*/
|
|
419
|
+
export async function pruneModelPayloadFiles(modelDir, keep) {
|
|
420
|
+
const removed = [];
|
|
421
|
+
const root = resolve(modelDir);
|
|
422
|
+
for (const rel of await listModelPayloadFiles(root)) {
|
|
423
|
+
if (keep.has(rel))
|
|
424
|
+
continue;
|
|
425
|
+
try {
|
|
426
|
+
await rm(join(root, ...rel.split('/')), { force: true });
|
|
427
|
+
removed.push(rel);
|
|
428
|
+
}
|
|
429
|
+
catch {
|
|
430
|
+
// Leave a file we can't remove; the reclaim/prune runs again later.
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
return removed;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Revalidate a read-only machine model on first adoption. The user-owned
|
|
437
|
+
* cache records file identity + size + mtime; any change forces full SHA-256
|
|
438
|
+
* verification again. The cache itself never lives beside shared models.
|
|
439
|
+
*/
|
|
440
|
+
export async function verifyReadOnlyModelPayload(roots, modelRoot, id, expected, onReject) {
|
|
441
|
+
if (resolve(modelRoot) === resolve(roots.writableRoot)) {
|
|
442
|
+
try {
|
|
443
|
+
await assertModelStorePathSafe(roots.writableRoot, join(modelRoot, id));
|
|
444
|
+
return true;
|
|
445
|
+
}
|
|
446
|
+
catch (error) {
|
|
447
|
+
onReject?.(error instanceof Error ? error.message : String(error));
|
|
448
|
+
return false;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
const key = readOnlyVerificationKey(roots, modelRoot, id, expected);
|
|
452
|
+
let verification = readOnlyVerificationInFlight.get(key);
|
|
453
|
+
if (!verification) {
|
|
454
|
+
verification = (async () => {
|
|
455
|
+
try {
|
|
456
|
+
return await verifyReadOnlyModelPayloadUnchecked(roots, modelRoot, id, expected);
|
|
457
|
+
}
|
|
458
|
+
catch (err) {
|
|
459
|
+
return err instanceof Error ? err.message : String(err);
|
|
460
|
+
}
|
|
461
|
+
})();
|
|
462
|
+
readOnlyVerificationInFlight.set(key, verification);
|
|
463
|
+
void verification.then(() => {
|
|
464
|
+
if (readOnlyVerificationInFlight.get(key) === verification) {
|
|
465
|
+
readOnlyVerificationInFlight.delete(key);
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
const reason = await verification;
|
|
470
|
+
if (reason !== null)
|
|
471
|
+
onReject?.(reason);
|
|
472
|
+
return reason === null;
|
|
473
|
+
}
|
|
474
|
+
function readOnlyVerificationKey(roots, modelRoot, id, expected) {
|
|
475
|
+
const expectedFingerprint = createHash('sha256')
|
|
476
|
+
.update(JSON.stringify(Object.entries(expected ?? {})
|
|
477
|
+
.map(([path, sha]) => [path, sha.toLowerCase()])
|
|
478
|
+
.sort(([left], [right]) => left.localeCompare(right))))
|
|
479
|
+
.digest('hex');
|
|
480
|
+
return `${resolve(roots.writableRoot)}\n${resolve(modelRoot)}\n${id}\n${expectedFingerprint}`;
|
|
481
|
+
}
|
|
482
|
+
/** Returns null when the payload verifies, else a human-readable rejection reason. */
|
|
483
|
+
async function verifyReadOnlyModelPayloadUnchecked(roots, modelRoot, id, expected) {
|
|
484
|
+
if (resolve(modelRoot) === resolve(roots.writableRoot))
|
|
485
|
+
return null;
|
|
486
|
+
if (!expected || Object.keys(expected).length === 0) {
|
|
487
|
+
return 'shared manifest has no fileSha256 map (published before hash backfill?)';
|
|
488
|
+
}
|
|
489
|
+
if (Object.entries(expected).some(([path, sha]) => !isSafeModelPath(path) || !isSha256(sha))) {
|
|
490
|
+
return 'shared manifest fileSha256 map contains an unsafe path or malformed hash';
|
|
491
|
+
}
|
|
492
|
+
const modelDir = resolve(modelRoot, id);
|
|
493
|
+
const actualPaths = await listModelPayloadFiles(modelDir);
|
|
494
|
+
const expectedPaths = Object.keys(expected).sort();
|
|
495
|
+
if (actualPaths.length !== expectedPaths.length ||
|
|
496
|
+
actualPaths.some((path, index) => path !== expectedPaths[index])) {
|
|
497
|
+
const extra = actualPaths.filter((path) => !expectedPaths.includes(path));
|
|
498
|
+
const missing = expectedPaths.filter((path) => !actualPaths.includes(path));
|
|
499
|
+
return `shared payload files do not match the manifest (extra: [${extra.join(', ')}], missing: [${missing.join(', ')}])`;
|
|
500
|
+
}
|
|
501
|
+
const identities = {};
|
|
502
|
+
for (const path of expectedPaths) {
|
|
503
|
+
const absolute = join(modelDir, ...path.split('/'));
|
|
504
|
+
const info = await lstat(absolute);
|
|
505
|
+
if (!info.isFile() || info.isSymbolicLink()) {
|
|
506
|
+
return `shared payload entry is not a regular file: ${path}`;
|
|
507
|
+
}
|
|
508
|
+
identities[path] = {
|
|
509
|
+
dev: info.dev,
|
|
510
|
+
ino: info.ino,
|
|
511
|
+
size: info.size,
|
|
512
|
+
mtimeMs: info.mtimeMs,
|
|
513
|
+
sha256: expected[path].toLowerCase(),
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
const cachePath = join(dirname(roots.writableRoot), 'shared-model-verification.json');
|
|
517
|
+
const cacheKey = `${resolve(modelRoot)}\n${id}`;
|
|
518
|
+
const cache = await readVerificationCache(cachePath);
|
|
519
|
+
if (JSON.stringify(cache[cacheKey]) === JSON.stringify(identities))
|
|
520
|
+
return null;
|
|
521
|
+
for (const path of expectedPaths) {
|
|
522
|
+
const actual = await sha256File(join(modelDir, ...path.split('/')));
|
|
523
|
+
if (actual !== expected[path].toLowerCase()) {
|
|
524
|
+
return `shared payload hash mismatch for ${path}`;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
await updateVerificationCache(cachePath, cacheKey, identities);
|
|
528
|
+
return null;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Machine daemons use a restrictive umask for private state. After a model
|
|
532
|
+
* has been fully downloaded and hash-verified, make only that published
|
|
533
|
+
* bundle traversable/readable by ordinary users.
|
|
534
|
+
*
|
|
535
|
+
* Windows needs an explicit inheritance reset. A model imported through the
|
|
536
|
+
* private transaction area, or moved from the legacy private model store,
|
|
537
|
+
* keeps its old DACL when it is renamed within the ProgramData volume. Merely
|
|
538
|
+
* placing that directory below the public `assets` container therefore does
|
|
539
|
+
* not make it readable. Resetting the published tree makes it inherit the
|
|
540
|
+
* installer's read-only BUILTIN\Users ACE without granting users write access.
|
|
541
|
+
*/
|
|
542
|
+
export async function makeSharedModelReadable(modelDir, env = process.env) {
|
|
543
|
+
if (env.GEZEL_SYSTEM_SCOPE !== '1')
|
|
544
|
+
return;
|
|
545
|
+
const configured = env[SHARED_ASSETS_ENV]?.trim();
|
|
546
|
+
if (!configured || !isAbsolute(configured))
|
|
547
|
+
return;
|
|
548
|
+
const sharedModels = resolve(configured, 'models');
|
|
549
|
+
const target = resolve(modelDir);
|
|
550
|
+
const rel = relative(sharedModels, target);
|
|
551
|
+
if (!rel || rel.startsWith('..') || isAbsolute(rel)) {
|
|
552
|
+
throw new Error(`refusing to publish model outside the shared asset store: ${target}`);
|
|
553
|
+
}
|
|
554
|
+
// This must precede chmodTree and icacls /T: discovering a junction after a
|
|
555
|
+
// recursive permission rewrite is already too late.
|
|
556
|
+
await assertModelStorePathSafe(sharedModels, target);
|
|
557
|
+
await chmodTree(target);
|
|
558
|
+
if (process.platform === 'win32') {
|
|
559
|
+
await resetWindowsAclToInherited(target);
|
|
560
|
+
}
|
|
561
|
+
let ancestor = dirname(target);
|
|
562
|
+
while (ancestor === sharedModels || ancestor.startsWith(`${sharedModels}${sep}`)) {
|
|
563
|
+
const info = await lstat(ancestor);
|
|
564
|
+
if (!info.isDirectory() || info.isSymbolicLink()) {
|
|
565
|
+
throw new Error(`refusing a non-directory ancestor in the shared model store: ${ancestor}`);
|
|
566
|
+
}
|
|
567
|
+
try {
|
|
568
|
+
await chmod(ancestor, 0o755);
|
|
569
|
+
}
|
|
570
|
+
catch {
|
|
571
|
+
// Windows permissions are established by the installer DACL.
|
|
572
|
+
}
|
|
573
|
+
if (ancestor === sharedModels)
|
|
574
|
+
break;
|
|
575
|
+
ancestor = dirname(ancestor);
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
async function resetWindowsAclToInherited(target) {
|
|
579
|
+
try {
|
|
580
|
+
await execFileAsync('icacls.exe', [target, '/reset', '/T', '/L', '/Q'], {
|
|
581
|
+
maxBuffer: 256 * 1024,
|
|
582
|
+
...windowsHeadlessSpawnOptions(),
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
catch (error) {
|
|
586
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
587
|
+
throw new Error(`could not publish shared model permissions for ${target}: ${detail}`);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
async function chmodTree(path) {
|
|
591
|
+
const info = await lstat(path).catch(() => null);
|
|
592
|
+
if (!info)
|
|
593
|
+
return;
|
|
594
|
+
if (info.isSymbolicLink()) {
|
|
595
|
+
throw new Error(`refusing to publish a symlink in the shared model store: ${path}`);
|
|
596
|
+
}
|
|
597
|
+
if (!info.isDirectory()) {
|
|
598
|
+
try {
|
|
599
|
+
await chmod(path, 0o644);
|
|
600
|
+
}
|
|
601
|
+
catch {
|
|
602
|
+
// Windows permissions are established by the installer DACL.
|
|
603
|
+
}
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
606
|
+
const entries = await readdir(path, { withFileTypes: true }).catch(() => []);
|
|
607
|
+
for (const entry of entries) {
|
|
608
|
+
await chmodTree(join(path, entry.name));
|
|
609
|
+
}
|
|
610
|
+
try {
|
|
611
|
+
await chmod(path, 0o755);
|
|
612
|
+
}
|
|
613
|
+
catch {
|
|
614
|
+
// Windows permissions are established by the installer DACL.
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
/** Grace period before an abandoned download is reclaimed. Within it the
|
|
618
|
+
* `.partial` files still serve as resume credit for a retried install. */
|
|
619
|
+
export const ABANDONED_DOWNLOAD_TTL_MS = 7 * 24 * 60 * 60 * 1000;
|
|
620
|
+
/**
|
|
621
|
+
* Delete abandoned model downloads from the writable root.
|
|
622
|
+
*
|
|
623
|
+
* A directory qualifies only when ALL of these hold — the gates are meant to
|
|
624
|
+
* make "we delete something the user wanted" impossible:
|
|
625
|
+
* - no `manifest.json` (never completed an install, invisible to every
|
|
626
|
+
* listing surface),
|
|
627
|
+
* - contains at least one `.partial` file (the downloader's signature —
|
|
628
|
+
* a hand-placed model directory without one is never touched),
|
|
629
|
+
* - nothing in it was written for `ttlMs` (default 7 days — within that
|
|
630
|
+
* window the `.partial` files are resume credit for a retried install),
|
|
631
|
+
* - not currently being installed (`activeIds`).
|
|
632
|
+
*
|
|
633
|
+
* Only the writable root is swept — read-only machine roots belong to the
|
|
634
|
+
* machine service, which runs its own sweep. Callers run this once at boot;
|
|
635
|
+
* errors are contained per-directory so one unreadable entry can't stop the
|
|
636
|
+
* sweep.
|
|
637
|
+
*/
|
|
638
|
+
export async function reclaimAbandonedModelDownloads(opts) {
|
|
639
|
+
const ttlMs = opts.ttlMs ?? ABANDONED_DOWNLOAD_TTL_MS;
|
|
640
|
+
const now = opts.now ?? Date.now();
|
|
641
|
+
const reclaimed = [];
|
|
642
|
+
let entries;
|
|
643
|
+
try {
|
|
644
|
+
entries = await readdir(opts.writableRoot);
|
|
645
|
+
}
|
|
646
|
+
catch {
|
|
647
|
+
return reclaimed;
|
|
648
|
+
}
|
|
649
|
+
for (const id of entries) {
|
|
650
|
+
if (id.startsWith('.') || opts.activeIds?.has(id))
|
|
651
|
+
continue;
|
|
652
|
+
const dir = join(opts.writableRoot, id);
|
|
653
|
+
try {
|
|
654
|
+
const info = await lstat(dir);
|
|
655
|
+
if (!info.isDirectory() || info.isSymbolicLink())
|
|
656
|
+
continue;
|
|
657
|
+
await assertModelStorePathSafe(opts.writableRoot, dir);
|
|
658
|
+
const scan = await scanAbandonedCandidate(dir);
|
|
659
|
+
if (!scan || !scan.hasPartial || now - scan.newestMtimeMs < ttlMs)
|
|
660
|
+
continue;
|
|
661
|
+
await rm(dir, { recursive: true, force: true });
|
|
662
|
+
reclaimed.push({ id, bytes: scan.totalBytes });
|
|
663
|
+
}
|
|
664
|
+
catch {
|
|
665
|
+
// Skip directories we can't read or remove; the next sweep retries.
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
return reclaimed;
|
|
669
|
+
}
|
|
670
|
+
export async function inspectModelDirectory(dir) {
|
|
671
|
+
try {
|
|
672
|
+
const rootInfo = await lstat(dir);
|
|
673
|
+
if (!rootInfo.isDirectory() || rootInfo.isSymbolicLink())
|
|
674
|
+
return null;
|
|
675
|
+
let bytes = 0;
|
|
676
|
+
let newestMtimeMs = rootInfo.mtimeMs;
|
|
677
|
+
let hasPartial = false;
|
|
678
|
+
let hasManifest = false;
|
|
679
|
+
const visit = async (current) => {
|
|
680
|
+
for (const entry of await readdir(current, { withFileTypes: true })) {
|
|
681
|
+
const absolute = join(current, entry.name);
|
|
682
|
+
if (entry.isSymbolicLink())
|
|
683
|
+
continue;
|
|
684
|
+
if (entry.isDirectory()) {
|
|
685
|
+
await visit(absolute);
|
|
686
|
+
continue;
|
|
687
|
+
}
|
|
688
|
+
if (!entry.isFile())
|
|
689
|
+
continue;
|
|
690
|
+
const info = await lstat(absolute);
|
|
691
|
+
newestMtimeMs = Math.max(newestMtimeMs, info.mtimeMs);
|
|
692
|
+
bytes += info.size;
|
|
693
|
+
if (entry.name.endsWith('.partial'))
|
|
694
|
+
hasPartial = true;
|
|
695
|
+
if (entry.name === 'manifest.json')
|
|
696
|
+
hasManifest = true;
|
|
697
|
+
}
|
|
698
|
+
};
|
|
699
|
+
await visit(dir);
|
|
700
|
+
return {
|
|
701
|
+
bytes,
|
|
702
|
+
updatedAt: new Date(newestMtimeMs).toISOString(),
|
|
703
|
+
hasPartial,
|
|
704
|
+
hasManifest,
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
catch {
|
|
708
|
+
return null;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* List incomplete model downloads in the writable root — directories with no
|
|
713
|
+
* `manifest.json` (so they're invisible to `listInstalled` and every other
|
|
714
|
+
* listing surface) that nonetheless hold bytes. These are interrupted or
|
|
715
|
+
* unverified downloads: they can hold tens of GB yet the user has no way to
|
|
716
|
+
* see or manage them until the 7-day {@link reclaimAbandonedModelDownloads}
|
|
717
|
+
* sweep silently removes them. Surfacing them lets the UI offer resume/delete
|
|
718
|
+
* immediately. Currently-installing ids are excluded (they show as live
|
|
719
|
+
* progress elsewhere). Sorted largest-first — the most disk to reclaim.
|
|
720
|
+
*/
|
|
721
|
+
export async function listIncompleteModelDownloads(opts) {
|
|
722
|
+
const out = [];
|
|
723
|
+
let entries;
|
|
724
|
+
try {
|
|
725
|
+
entries = await readdir(opts.writableRoot);
|
|
726
|
+
}
|
|
727
|
+
catch {
|
|
728
|
+
return out;
|
|
729
|
+
}
|
|
730
|
+
for (const id of entries) {
|
|
731
|
+
if (id.startsWith('.') || opts.activeIds?.has(id))
|
|
732
|
+
continue;
|
|
733
|
+
const dir = join(opts.writableRoot, id);
|
|
734
|
+
try {
|
|
735
|
+
const info = await lstat(dir);
|
|
736
|
+
if (!info.isDirectory() || info.isSymbolicLink())
|
|
737
|
+
continue;
|
|
738
|
+
const scan = await scanAbandonedCandidate(dir);
|
|
739
|
+
if (!scan || scan.totalBytes === 0)
|
|
740
|
+
continue;
|
|
741
|
+
out.push({
|
|
742
|
+
id,
|
|
743
|
+
bytes: scan.totalBytes,
|
|
744
|
+
updatedAt: new Date(scan.newestMtimeMs).toISOString(),
|
|
745
|
+
hasPartial: scan.hasPartial,
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
catch {
|
|
749
|
+
// Skip directories we can't read; they simply don't surface.
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
out.sort((a, b) => b.bytes - a.bytes);
|
|
753
|
+
return out;
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Returns null when the directory holds a `manifest.json` (a real install —
|
|
757
|
+
* never a reclamation candidate), else its abandoned-download profile.
|
|
758
|
+
*/
|
|
759
|
+
async function scanAbandonedCandidate(dir) {
|
|
760
|
+
const profile = await inspectModelDirectory(dir);
|
|
761
|
+
if (!profile || profile.hasManifest)
|
|
762
|
+
return null;
|
|
763
|
+
return {
|
|
764
|
+
hasPartial: profile.hasPartial,
|
|
765
|
+
newestMtimeMs: new Date(profile.updatedAt).getTime(),
|
|
766
|
+
totalBytes: profile.bytes,
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
function isSafeModelPath(path) {
|
|
770
|
+
return (path.length > 0 &&
|
|
771
|
+
!path.startsWith('/') &&
|
|
772
|
+
!path.includes('\\') &&
|
|
773
|
+
path.split('/').every((segment) => segment.length > 0 && segment !== '.' && segment !== '..'));
|
|
774
|
+
}
|
|
775
|
+
async function listModelPayloadFiles(modelDir) {
|
|
776
|
+
const root = resolve(modelDir);
|
|
777
|
+
const result = [];
|
|
778
|
+
const visit = async (dir) => {
|
|
779
|
+
for (const entry of await readdir(dir, { withFileTypes: true })) {
|
|
780
|
+
const absolute = join(dir, entry.name);
|
|
781
|
+
if (entry.isSymbolicLink()) {
|
|
782
|
+
throw new Error(`refusing a symlink in a model bundle: ${absolute}`);
|
|
783
|
+
}
|
|
784
|
+
if (entry.isDirectory()) {
|
|
785
|
+
await visit(absolute);
|
|
786
|
+
}
|
|
787
|
+
else if (entry.isFile()) {
|
|
788
|
+
// `.partial` is an in-flight download (same rule as
|
|
789
|
+
// listBundleModelFiles); dot-files are OS droppings like .DS_Store.
|
|
790
|
+
// Neither is payload — an interrupted update or a Finder visit must
|
|
791
|
+
// not make an otherwise-complete shared model fail verification.
|
|
792
|
+
if (entry.name.endsWith('.partial') || entry.name.startsWith('.'))
|
|
793
|
+
continue;
|
|
794
|
+
const path = relative(root, absolute).split(sep).join('/');
|
|
795
|
+
if (path !== 'manifest.json')
|
|
796
|
+
result.push(path);
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
await visit(root);
|
|
801
|
+
return result.sort();
|
|
802
|
+
}
|
|
803
|
+
function isSha256(value) {
|
|
804
|
+
return /^[a-f0-9]{64}$/i.test(value);
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* Read buffer for hashing multi-GB model files off disk. The default
|
|
808
|
+
* `createReadStream` highWaterMark is 64 KB, which for a 7 GB file means
|
|
809
|
+
* ~110k `'data'` events — one event-loop turn each. Inside the daemon's busy
|
|
810
|
+
* event loop (chat, scheduler, index scans) those turns queue behind other
|
|
811
|
+
* work and the hash starves: a file that hashes in ~9s idle took 15+ minutes
|
|
812
|
+
* in the running service. A 16 MB buffer cuts it to ~400 turns, so a
|
|
813
|
+
* congested loop barely affects wall time (measured: a 6.3 GB file that
|
|
814
|
+
* hashed in ~9s idle did not finish in 2 min at 64 KB under a busy loop, but
|
|
815
|
+
* stayed ~10s at 16 MB). Hash correctness with this buffer is covered by the
|
|
816
|
+
* hashModelPayloadFiles tests in storage-roots.test.ts.
|
|
817
|
+
*/
|
|
818
|
+
export const MODEL_HASH_READ_BUFFER_BYTES = 16 * 1024 * 1024;
|
|
819
|
+
function sha256File(path) {
|
|
820
|
+
return new Promise((resolveHash, reject) => {
|
|
821
|
+
const hash = createHash('sha256');
|
|
822
|
+
const stream = createReadStream(path, { highWaterMark: MODEL_HASH_READ_BUFFER_BYTES });
|
|
823
|
+
stream.on('data', (chunk) => hash.update(chunk));
|
|
824
|
+
stream.on('error', reject);
|
|
825
|
+
stream.on('end', () => resolveHash(hash.digest('hex')));
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
async function readVerificationCache(path) {
|
|
829
|
+
try {
|
|
830
|
+
const parsed = JSON.parse(await readFile(path, 'utf8'));
|
|
831
|
+
return parsed && typeof parsed === 'object' && !Array.isArray(parsed)
|
|
832
|
+
? parsed
|
|
833
|
+
: {};
|
|
834
|
+
}
|
|
835
|
+
catch {
|
|
836
|
+
return {};
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
async function writeVerificationCache(path, cache) {
|
|
840
|
+
await mkdir(dirname(path), { recursive: true });
|
|
841
|
+
await writeFile(path, `${JSON.stringify(cache, null, 2)}\n`, {
|
|
842
|
+
encoding: 'utf8',
|
|
843
|
+
mode: 0o600,
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
/** Merge cache entries serially so concurrent checks for different models do
|
|
847
|
+
* not overwrite each other's freshly verified identity records. */
|
|
848
|
+
async function updateVerificationCache(path, key, identities) {
|
|
849
|
+
const previous = verificationCacheWrites.get(path) ?? Promise.resolve();
|
|
850
|
+
const write = previous
|
|
851
|
+
.catch(() => { })
|
|
852
|
+
.then(async () => {
|
|
853
|
+
const latest = await readVerificationCache(path);
|
|
854
|
+
latest[key] = identities;
|
|
855
|
+
await writeVerificationCache(path, latest);
|
|
856
|
+
});
|
|
857
|
+
verificationCacheWrites.set(path, write);
|
|
858
|
+
try {
|
|
859
|
+
await write;
|
|
860
|
+
}
|
|
861
|
+
finally {
|
|
862
|
+
if (verificationCacheWrites.get(path) === write)
|
|
863
|
+
verificationCacheWrites.delete(path);
|
|
864
|
+
}
|
|
865
|
+
}
|