@bendyline/gezel-inference 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +13 -2
- package/dist/cache/adapter.d.ts +115 -0
- package/dist/cache/adapter.js +23 -0
- package/dist/cache/budget.d.ts +15 -0
- package/dist/cache/budget.js +31 -0
- package/dist/cache/controller.d.ts +205 -0
- package/dist/cache/controller.js +377 -0
- package/dist/catalog/LICENSE +21 -0
- package/dist/catalog/chat-models/bt/btl4-35b-q4/manifest.json +146 -0
- package/dist/catalog/chat-models/bt/btl4-35b-q4/versions/1.0.0/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-35b-q4/versions/1.0.1/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/manifest.json +146 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/versions/1.0.0/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/versions/1.0.1/manifest.json +15 -0
- package/dist/catalog/chat-models/bt/btl4-compact-iq2/versions/1.0.2/manifest.json +15 -0
- package/dist/catalog/chat-models/de/deepseek-r1-8b-q4/manifest.json +166 -0
- package/dist/catalog/chat-models/de/deepseek-r1-8b-q4/versions/1.1.0/manifest.json +62 -0
- package/dist/catalog/chat-models/de/deepseek-r1-8b-q4/versions/1.1.1/manifest.json +61 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-mxfp4/manifest.json +125 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-mxfp4/versions/1.0.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2/manifest.json +125 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2/versions/1.0.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2/versions/1.1.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2q4/manifest.json +126 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q2q4/versions/1.0.0/manifest.json +27 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q4/manifest.json +318 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q4/versions/1.0.0/manifest.json +225 -0
- package/dist/catalog/chat-models/de/deepseek-v4-flash-284b-q4/versions/1.1.0/manifest.json +225 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/manifest.json +249 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.0.0/manifest.json +70 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.1.0/manifest.json +72 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.1.2/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.1.3/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q4/versions/1.2.0/manifest.json +98 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/manifest.json +228 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.0.0/manifest.json +72 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.0.2/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.0.3/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-12b-q8/versions/1.1.0/manifest.json +78 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/manifest.json +220 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.1.0/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.2.0/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.2.1/manifest.json +80 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.2.2/manifest.json +80 -0
- package/dist/catalog/chat-models/ge/gemma4-26b-q4/versions/1.3.0/manifest.json +81 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/manifest.json +226 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.1.0/manifest.json +80 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.1.1/manifest.json +82 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.2.0/manifest.json +82 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.2.1/manifest.json +95 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.2.2/manifest.json +95 -0
- package/dist/catalog/chat-models/ge/gemma4-31b-q4/versions/1.3.0/manifest.json +86 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/manifest.json +213 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.1.0/manifest.json +67 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.1.2/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.2.0/manifest.json +71 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.2.1/manifest.json +71 -0
- package/dist/catalog/chat-models/ge/gemma4-e2b-q4/versions/1.3.0/manifest.json +71 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/manifest.json +205 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.1.0/manifest.json +72 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.1.2/manifest.json +75 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.2.0/manifest.json +76 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.2.1/manifest.json +76 -0
- package/dist/catalog/chat-models/ge/gemma4-e4b-q4/versions/1.3.0/manifest.json +76 -0
- package/dist/catalog/chat-models/gl/glm-5.2-754b-q2/manifest.json +127 -0
- package/dist/catalog/chat-models/gl/glm-5.2-754b-q2/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/manifest.json +140 -0
- package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/versions/1.0.0/manifest.json +23 -0
- package/dist/catalog/chat-models/gl/glm-5.3-flash-320b-q2/versions/1.0.1/manifest.json +26 -0
- package/dist/catalog/chat-models/gp/gpt-oss-120b-q4/manifest.json +247 -0
- package/dist/catalog/chat-models/gp/gpt-oss-120b-q4/versions/1.0.0/manifest.json +137 -0
- package/dist/catalog/chat-models/gp/gpt-oss-120b-q4/versions/1.1.0/manifest.json +135 -0
- package/dist/catalog/chat-models/gp/gpt-oss-20b-q4/manifest.json +195 -0
- package/dist/catalog/chat-models/gp/gpt-oss-20b-q4/versions/1.1.0/manifest.json +72 -0
- package/dist/catalog/chat-models/gp/gpt-oss-20b-q4/versions/1.1.1/manifest.json +71 -0
- package/dist/catalog/chat-models/gr/granite4.2-30b-q4/manifest.json +200 -0
- package/dist/catalog/chat-models/gr/granite4.2-30b-q4/versions/1.0.0/manifest.json +72 -0
- package/dist/catalog/chat-models/gr/granite4.2-3b-q4/manifest.json +196 -0
- package/dist/catalog/chat-models/gr/granite4.2-3b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/gr/granite4.2-8b-q4/manifest.json +189 -0
- package/dist/catalog/chat-models/gr/granite4.2-8b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/index.json +1 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/manifest.json +235 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.0/manifest.json +124 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.1/manifest.json +124 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q4/versions/1.0.2/manifest.json +123 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q6/manifest.json +257 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q6/versions/1.0.0/manifest.json +145 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q6/versions/1.0.1/manifest.json +145 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/manifest.json +285 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.0/manifest.json +174 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.1/manifest.json +174 -0
- package/dist/catalog/chat-models/la/laguna-s-2.1-118b-q8/versions/1.0.2/manifest.json +173 -0
- package/dist/catalog/chat-models/lf/lfm2.5-2.6b-q4/manifest.json +162 -0
- package/dist/catalog/chat-models/lf/lfm2.5-2.6b-q4/versions/1.0.0/manifest.json +59 -0
- package/dist/catalog/chat-models/lf/lfm2.5-2.6b-q4/versions/1.0.1/manifest.json +58 -0
- package/dist/catalog/chat-models/ll/llama3.2-3b-q4/manifest.json +134 -0
- package/dist/catalog/chat-models/ll/llama3.2-3b-q4/versions/1.1.0/manifest.json +57 -0
- package/dist/catalog/chat-models/ll/llama3.2-3b-q4/versions/1.1.1/manifest.json +56 -0
- package/dist/catalog/chat-models/mi/minicpm5-1b-q4/manifest.json +156 -0
- package/dist/catalog/chat-models/mi/minicpm5-1b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/mi/minicpm5-2b-q4/manifest.json +161 -0
- package/dist/catalog/chat-models/mi/minicpm5-2b-q4/versions/1.0.0/manifest.json +57 -0
- package/dist/catalog/chat-models/mi/mistral-7b-q4/manifest.json +159 -0
- package/dist/catalog/chat-models/mi/mistral-7b-q4/versions/1.1.0/manifest.json +62 -0
- package/dist/catalog/chat-models/mi/mistral-7b-q4/versions/1.1.1/manifest.json +61 -0
- package/dist/catalog/chat-models/mi/mistral-medium-3.5-128b-q4/manifest.json +275 -0
- package/dist/catalog/chat-models/mi/mistral-medium-3.5-128b-q4/versions/1.0.0/manifest.json +154 -0
- package/dist/catalog/chat-models/mi/mistral-medium-3.5-128b-q4/versions/1.0.1/manifest.json +153 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/manifest.json +135 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.1/manifest.json +20 -0
- package/dist/catalog/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.2/manifest.json +20 -0
- package/dist/catalog/chat-models/na/nanbeige4.2-3b-q4/manifest.json +138 -0
- package/dist/catalog/chat-models/na/nanbeige4.2-3b-q4/versions/1.0.0/manifest.json +14 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/manifest.json +212 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/versions/1.0.0/manifest.json +94 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/versions/1.0.1/manifest.json +94 -0
- package/dist/catalog/chat-models/ne/nemotron3-nano-30b-q4/versions/1.0.2/manifest.json +93 -0
- package/dist/catalog/chat-models/ne/nemotron3-super-120b-q4/manifest.json +135 -0
- package/dist/catalog/chat-models/ne/nemotron3-super-120b-q4/versions/1.0.0/manifest.json +30 -0
- package/dist/catalog/chat-models/ne/nemotron3-super-120b-q4/versions/1.0.1/manifest.json +30 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q4/manifest.json +192 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q4/versions/1.0.0/manifest.json +74 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q4/versions/1.0.1/manifest.json +73 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q8/manifest.json +207 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q8/versions/1.0.0/manifest.json +89 -0
- package/dist/catalog/chat-models/ne/nemotron3.5-lightning-30b-q8/versions/1.0.1/manifest.json +88 -0
- package/dist/catalog/chat-models/or/ornith-35b-q4/manifest.json +224 -0
- package/dist/catalog/chat-models/or/ornith-35b-q4/versions/1.0.0/manifest.json +94 -0
- package/dist/catalog/chat-models/or/ornith-35b-q4/versions/1.0.1/manifest.json +93 -0
- package/dist/catalog/chat-models/or/ornith-35b-q8/manifest.json +244 -0
- package/dist/catalog/chat-models/or/ornith-35b-q8/versions/1.0.0/manifest.json +114 -0
- package/dist/catalog/chat-models/or/ornith-35b-q8/versions/1.0.1/manifest.json +113 -0
- package/dist/catalog/chat-models/or/ornith-9b-q4/manifest.json +215 -0
- package/dist/catalog/chat-models/or/ornith-9b-q4/versions/1.0.0/manifest.json +84 -0
- package/dist/catalog/chat-models/or/ornith-9b-q4/versions/1.0.1/manifest.json +83 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q4/manifest.json +208 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q4/versions/1.0.0/manifest.json +74 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q8/manifest.json +223 -0
- package/dist/catalog/chat-models/or/ornith1.5-35b-a3b-q8/versions/1.0.0/manifest.json +89 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q4/manifest.json +187 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q4/versions/1.0.0/manifest.json +53 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q4/versions/1.0.1/manifest.json +77 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q8/manifest.json +192 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q8/versions/1.0.0/manifest.json +58 -0
- package/dist/catalog/chat-models/or/ornith1.5-9b-q8/versions/1.0.1/manifest.json +82 -0
- package/dist/catalog/chat-models/qw/qwen3.5-0.8b-q4/manifest.json +192 -0
- package/dist/catalog/chat-models/qw/qwen3.5-0.8b-q4/versions/1.0.0/manifest.json +75 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/manifest.json +315 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.0/manifest.json +164 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.1/manifest.json +164 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.2/manifest.json +164 -0
- package/dist/catalog/chat-models/qw/qwen3.5-122b-a10b-q4/versions/1.0.3/manifest.json +163 -0
- package/dist/catalog/chat-models/qw/qwen3.5-27b-q4/manifest.json +217 -0
- package/dist/catalog/chat-models/qw/qwen3.5-27b-q4/versions/1.0.0/manifest.json +90 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/manifest.json +194 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/versions/1.1.0/manifest.json +77 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/versions/1.1.2/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-2b-q4/versions/1.1.3/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/manifest.json +188 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/versions/1.1.0/manifest.json +77 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/versions/1.1.2/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-4b-q4/versions/1.1.3/manifest.json +76 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/manifest.json +205 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/versions/1.1.0/manifest.json +82 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/versions/1.1.2/manifest.json +81 -0
- package/dist/catalog/chat-models/qw/qwen3.5-9b-q4/versions/1.1.3/manifest.json +81 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/manifest.json +230 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.0/manifest.json +92 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.4/manifest.json +91 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.5/manifest.json +91 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q4/versions/1.1.6/manifest.json +115 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/manifest.json +240 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.0/manifest.json +102 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.2/manifest.json +103 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.3/manifest.json +103 -0
- package/dist/catalog/chat-models/qw/qwen3.6-27b-q8/versions/1.0.4/manifest.json +127 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/manifest.json +233 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.0/manifest.json +92 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.1/manifest.json +93 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.2/manifest.json +93 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q4/versions/1.0.3/manifest.json +117 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/manifest.json +252 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.0/manifest.json +112 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.1/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.2/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.6-35b-a3b-q8/versions/1.0.3/manifest.json +137 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-iq1-s/manifest.json +195 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-iq1-s/versions/1.0.0/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q2/manifest.json +194 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q2/versions/1.0.0/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q3/manifest.json +194 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q3/versions/1.0.0/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q3/versions/1.0.1/manifest.json +19 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/manifest.json +291 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.1/manifest.json +93 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.2/manifest.json +92 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.3/manifest.json +116 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.4/manifest.json +116 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q4/versions/1.0.5/manifest.json +116 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/manifest.json +278 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.0/manifest.json +20 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.1/manifest.json +104 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.2/manifest.json +103 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q6/versions/1.0.3/manifest.json +127 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/manifest.json +278 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/versions/1.0.0/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/versions/1.0.1/manifest.json +113 -0
- package/dist/catalog/chat-models/qw/qwen3.8-27b-q8/versions/1.0.2/manifest.json +137 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq3/manifest.json +221 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq3/versions/1.0.0/manifest.json +36 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/manifest.json +429 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.0.0/manifest.json +36 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.1.0/manifest.json +205 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.1.1/manifest.json +244 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/manifest.json +203 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.0/manifest.json +21 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.1/manifest.json +31 -0
- package/dist/catalog/chat-models/qw/qwen3.8-flash-next-q2/versions/1.0.2/manifest.json +30 -0
- package/dist/catalog/chat-models/raw-index.json +1 -0
- package/dist/catalog/chat-models/ta/talkie-1930-13b-q4/manifest.json +79 -0
- package/dist/catalog/chat-models/ta/talkie-1930-13b-q4/versions/1.0.0/manifest.json +15 -0
- package/dist/catalog/chat-models/ta/talkie-1930-13b-q4/versions/1.0.1/manifest.json +15 -0
- package/dist/catalog/chat-models/te/ternary-bonsai-27b-q2/manifest.json +204 -0
- package/dist/catalog/chat-models/te/ternary-bonsai-27b-q2/versions/1.0.0/manifest.json +70 -0
- package/dist/catalog/chat-models/te/ternary-bonsai-27b-q2/versions/1.0.1/manifest.json +70 -0
- package/dist/catalog/chat-models/un/underdog-saluki-27b-iq2-mix/manifest.json +164 -0
- package/dist/catalog/chat-models/un/underdog-saluki-27b-iq2-mix/versions/1.0.0/manifest.json +14 -0
- package/dist/catalog/knowledge-catalogs/be/bendyline-how-to-books/manifest.json +26 -0
- package/dist/catalog/knowledge-catalogs/be/bendyline-how-to-books/versions/2026.10.8/manifest.json +8950 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-alaska-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-alaska-part-0001/versions/2026.10.1/manifest.json +658 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-nevada-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-nevada-part-0001/versions/2026.10.1/manifest.json +666 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-300-399-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-300-399-part-0001/versions/2026.10.2/manifest.json +182 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-347-349/manifest.json +25 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-us-347-349/versions/2026.10.5/manifest.json +38 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0001/versions/2026.10.1/manifest.json +558 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0002/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-utah-part-0002/versions/2026.10.1/manifest.json +258 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0001/versions/2026.10.1/manifest.json +318 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0002/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0002/versions/2026.10.1/manifest.json +266 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0003/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0003/versions/2026.10.1/manifest.json +186 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0004/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0004/versions/2026.10.1/manifest.json +138 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0005/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-washington-part-0005/versions/2026.10.1/manifest.json +138 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-wyoming-part-0001/manifest.json +24 -0
- package/dist/catalog/knowledge-catalogs/ca/caselaw-wyoming-part-0001/versions/2026.10.3/manifest.json +626 -0
- package/dist/catalog/knowledge-catalogs/index.json +1 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-aspnet-core-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-aspnet-core-en/versions/2026.10.16/manifest.json +18270 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-ai-platform-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-ai-platform-en/versions/2026.10.16/manifest.json +1098 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-apps-compute-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-apps-compute-en/versions/2026.10.16/manifest.json +722 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-data-aiot-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-data-aiot-en/versions/2026.10.16/manifest.json +530 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-management-hybrid-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-management-hybrid-en/versions/2026.10.16/manifest.json +602 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-network-security-en/manifest.json +23 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-azure-network-security-en/versions/2026.10.16/manifest.json +250 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-dotnet-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-dotnet-en/versions/2026.10.16/manifest.json +16794 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-entity-framework-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-entity-framework-en/versions/2026.10.16/manifest.json +1106 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-microsoft-365-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-microsoft-365-en/versions/2026.10.16/manifest.json +234 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-powershell-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-powershell-en/versions/2026.10.16/manifest.json +522 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-sql-server-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-sql-server-en/versions/2026.10.16/manifest.json +1850 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-apps-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-apps-en/versions/2026.10.16/manifest.json +1734 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-server-en/manifest.json +22 -0
- package/dist/catalog/knowledge-catalogs/mi/microsoftdocs-windows-server-en/versions/2026.10.16/manifest.json +774 -0
- package/dist/catalog/knowledge-catalogs/raw-index.json +1 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-american-south/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-andes-amazon/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-australia-nz/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-brazil/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-britain-ireland/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-california-southwest/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-canada-alaska/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-central-eastern-europe/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-asia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-east-southern-africa/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mediterranean/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-mexico-central-america/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-middle-east/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-midwest/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-north-africa/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northeast/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-eurasia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-northern-europe/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-islands/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-pacific-northwest/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-rockies-plains/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-south-asia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southeast-asia/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-southern-cone/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-west-central-africa/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/manifest.json +48 -0
- package/dist/catalog/knowledge-catalogs/re/regional-western-europe/versions/2026.10.3/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/manifest.json +28 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.4.2/manifest.json +53 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.4.3/manifest.json +885 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-arts/versions/2026.4.5/manifest.json +157 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/manifest.json +32 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.4.2/manifest.json +69 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.4.3/manifest.json +741 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-astronomy/versions/2026.4.5/manifest.json +173 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/manifest.json +69 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/versions/2026.4.4/manifest.json +217 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-biology/versions/2026.4.5/manifest.json +217 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/versions/2026.4.4/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-business/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-film-tv/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.4.3/manifest.json +925 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-food-drink/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/manifest.json +28 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.4.2/manifest.json +53 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.4.3/manifest.json +1665 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-games/versions/2026.4.5/manifest.json +133 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.4.3/manifest.json +1233 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-language/versions/2026.4.5/manifest.json +141 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.4.3/manifest.json +493 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-law/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/manifest.json +63 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/versions/2026.4.4/manifest.json +193 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-literature/versions/2026.4.5/manifest.json +193 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/manifest.json +30 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.4.2/manifest.json +61 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.4.3/manifest.json +665 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-mathematics/versions/2026.4.5/manifest.json +177 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.4.3/manifest.json +745 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-medicine/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/manifest.json +62 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/versions/2026.4.4/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-military/versions/2026.4.5/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-music/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/manifest.json +64 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/versions/2026.4.4/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-politics/versions/2026.4.5/manifest.json +197 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/manifest.json +30 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.4.2/manifest.json +61 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.4.3/manifest.json +1253 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-religion-philosophy/versions/2026.4.5/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/manifest.json +29 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.4.2/manifest.json +57 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.4.3/manifest.json +1957 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-science/versions/2026.4.5/manifest.json +185 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/manifest.json +63 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-sports/versions/2026.4.5/manifest.json +193 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/art.json +11 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/manifest.json +45 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/versions/2026.4.4/manifest.json +121 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-technology/versions/2026.4.5/manifest.json +173 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/art.json +12 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/logo.webp +0 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/manifest.json +62 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/versions/2026.4.4/manifest.json +189 -0
- package/dist/catalog/knowledge-catalogs/wi/wikipedia-transportation/versions/2026.4.5/manifest.json +189 -0
- package/dist/catalog/provenance.json +8 -0
- package/dist/chat/catalog-model-lookup.d.ts +21 -0
- package/dist/chat/catalog-model-lookup.js +48 -0
- package/dist/chat/local-model-tier.d.ts +1 -0
- package/dist/chat/local-model-tier.js +2 -0
- package/dist/chat/vision-capability.d.ts +1 -0
- package/dist/chat/vision-capability.js +3 -0
- package/dist/engine-components.d.ts +30 -0
- package/dist/engine-components.js +144 -0
- package/dist/engines/electron-native-reuse.d.ts +65 -0
- package/dist/engines/electron-native-reuse.js +305 -0
- package/dist/engines/native-file-manifest.json +1320 -0
- package/dist/engines/native-manifest.d.ts +70 -0
- package/dist/engines/native-manifest.js +98 -0
- package/dist/engines/registry.d.ts +88 -0
- package/dist/engines/registry.js +217 -0
- package/dist/engines/resolver.d.ts +121 -0
- package/dist/engines/resolver.js +894 -0
- package/dist/engines/signature.d.ts +85 -0
- package/dist/engines/signature.js +231 -0
- package/dist/fs/atomic.d.ts +53 -0
- package/dist/fs/atomic.js +202 -0
- package/dist/fs/config-store.d.ts +14 -0
- package/dist/fs/config-store.js +101 -0
- package/dist/fs/home-permissions.d.ts +18 -0
- package/dist/fs/home-permissions.js +27 -0
- package/dist/fs/safe-paths.d.ts +107 -0
- package/dist/fs/safe-paths.js +264 -0
- package/dist/fs/security-json.d.ts +13 -0
- package/dist/fs/security-json.js +67 -0
- package/dist/http/auth-context.d.ts +23 -0
- package/dist/http/auth-context.js +1 -0
- package/dist/http/engine-runtime-context.d.ts +30 -0
- package/dist/http/engine-runtime-context.js +1 -0
- package/dist/http/external-conversation-contract.d.ts +49 -0
- package/dist/http/external-conversation-contract.js +1 -0
- package/dist/http/external-conversation-headers.d.ts +11 -0
- package/dist/http/external-conversation-headers.js +11 -0
- package/dist/http/inference-context.d.ts +36 -0
- package/dist/http/inference-context.js +1 -0
- package/dist/http/model-inventory-cache.d.ts +8 -0
- package/dist/http/model-inventory-cache.js +8 -0
- package/dist/http/openai-compat/action-ledger.d.ts +15 -0
- package/dist/http/openai-compat/action-ledger.js +119 -0
- package/dist/http/openai-compat/apple-model.d.ts +3 -0
- package/dist/http/openai-compat/apple-model.js +44 -0
- package/dist/http/openai-compat/caller-owned-profile.d.ts +7 -0
- package/dist/http/openai-compat/caller-owned-profile.js +18 -0
- package/dist/http/openai-compat/chat-progress.d.ts +9 -0
- package/dist/http/openai-compat/chat-progress.js +69 -0
- package/dist/http/openai-compat/chat-target.d.ts +76 -0
- package/dist/http/openai-compat/chat-target.js +97 -0
- package/dist/http/openai-compat/embeddings.d.ts +37 -0
- package/dist/http/openai-compat/embeddings.js +86 -0
- package/dist/http/openai-compat/request-tuning.d.ts +35 -0
- package/dist/http/openai-compat/request-tuning.js +87 -0
- package/dist/http/openai-compat/responses-streaming.d.ts +351 -0
- package/dist/http/openai-compat/responses-streaming.js +717 -0
- package/dist/http/openai-compat/responses-translate.d.ts +215 -0
- package/dist/http/openai-compat/responses-translate.js +377 -0
- package/dist/http/openai-compat/streaming-telemetry.d.ts +30 -0
- package/dist/http/openai-compat/streaming-telemetry.js +88 -0
- package/dist/http/openai-compat/streaming.d.ts +141 -0
- package/dist/http/openai-compat/streaming.js +687 -0
- package/dist/http/openai-compat/tool-call-stream-filter.d.ts +33 -0
- package/dist/http/openai-compat/tool-call-stream-filter.js +110 -0
- package/dist/http/openai-compat/translate.d.ts +254 -0
- package/dist/http/openai-compat/translate.js +485 -0
- package/dist/http/routes/engines.d.ts +13 -0
- package/dist/http/routes/engines.js +366 -0
- package/dist/http/routes/machine-engine-proxy.d.ts +26 -0
- package/dist/http/routes/machine-engine-proxy.js +43 -0
- package/dist/http/routes/model-bundles.d.ts +4 -0
- package/dist/http/routes/model-bundles.js +190 -0
- package/dist/http/routes/v1-chat.d.ts +72 -0
- package/dist/http/routes/v1-chat.js +645 -0
- package/dist/http/routes/v1-embeddings.d.ts +3 -0
- package/dist/http/routes/v1-embeddings.js +82 -0
- package/dist/http/routes/v1-knowledge.d.ts +4 -0
- package/dist/http/routes/v1-knowledge.js +304 -0
- package/dist/http/routes/v1-models-ensure.d.ts +32 -0
- package/dist/http/routes/v1-models-ensure.js +122 -0
- package/dist/http/routes/v1-models.d.ts +8 -0
- package/dist/http/routes/v1-models.js +189 -0
- package/dist/http/routes/v1-responses.d.ts +20 -0
- package/dist/http/routes/v1-responses.js +327 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/inference-service.d.ts +28 -0
- package/dist/inference-service.js +275 -0
- package/dist/knowledge/admission.d.ts +3 -0
- package/dist/knowledge/admission.js +22 -0
- package/dist/knowledge/bundled-catalog.d.ts +2 -0
- package/dist/knowledge/bundled-catalog.js +2 -0
- package/dist/knowledge/catalog-host.d.ts +103 -0
- package/dist/knowledge/catalog-host.js +180 -0
- package/dist/knowledge/catalog-source.d.ts +22 -0
- package/dist/knowledge/catalog-source.js +35 -0
- package/dist/knowledge/install.d.ts +55 -0
- package/dist/knowledge/install.js +274 -0
- package/dist/knowledge/manager.d.ts +287 -0
- package/dist/knowledge/manager.js +1540 -0
- package/dist/knowledge/registry.d.ts +35 -0
- package/dist/knowledge/registry.js +123 -0
- package/dist/knowledge/search-worker.d.ts +17 -0
- package/dist/knowledge/search-worker.js +36 -0
- package/dist/knowledge/shared-install-contract.d.ts +19 -0
- package/dist/knowledge/shared-install-contract.js +1 -0
- package/dist/knowledge/spatial-query.d.ts +11 -0
- package/dist/knowledge/spatial-query.js +33 -0
- package/dist/knowledge/trust-anchors.d.ts +11 -0
- package/dist/knowledge/trust-anchors.js +51 -0
- package/dist/knowledge/vector-floors.d.ts +44 -0
- package/dist/knowledge/vector-floors.js +92 -0
- package/dist/knowledge/worker-host.d.ts +9 -0
- package/dist/knowledge/worker-host.js +179 -0
- package/dist/kokoro-lexicon/LICENSE +202 -0
- package/dist/kokoro-lexicon/lexicon-gb-en.txt.gz +0 -0
- package/dist/kokoro-lexicon/lexicon-us-en.txt.gz +0 -0
- package/dist/kokoro-lexicon/manifest.json +23 -0
- package/dist/machine-engine/inspect-runtime.d.ts +3 -0
- package/dist/machine-engine/inspect-runtime.js +48 -0
- package/dist/machine-engine/knowledge-assets.d.ts +79 -0
- package/dist/machine-engine/knowledge-assets.js +505 -0
- package/dist/memory/embed-core.d.ts +131 -0
- package/dist/memory/embed-core.js +398 -0
- package/dist/memory/embed-worker.d.ts +23 -0
- package/dist/memory/embed-worker.js +49 -0
- package/dist/memory/embeddings.d.ts +105 -0
- package/dist/memory/embeddings.js +467 -0
- package/dist/model-profile/behaviors/tools-mlx-template-fix.d.ts +1 -0
- package/dist/model-profile/behaviors/tools-mlx-template-fix.js +2 -0
- package/dist/model-profile/behaviors/turn-ramble-detection.d.ts +1 -0
- package/dist/model-profile/behaviors/turn-ramble-detection.js +2 -0
- package/dist/model-profile/defaults.d.ts +1 -0
- package/dist/model-profile/defaults.js +2 -0
- package/dist/model-profile/index.d.ts +9 -0
- package/dist/model-profile/index.js +7 -0
- package/dist/model-profile/registry.d.ts +15 -0
- package/dist/model-profile/registry.js +18 -0
- package/dist/model-profile/runtime.d.ts +48 -0
- package/dist/model-profile/runtime.js +131 -0
- package/dist/model-profile/tool-grammar.d.ts +1 -0
- package/dist/model-profile/tool-grammar.js +2 -0
- package/dist/model-profile/tuning.d.ts +19 -0
- package/dist/model-profile/tuning.js +21 -0
- package/dist/model-profile/types.d.ts +1 -0
- package/dist/model-profile/types.js +2 -0
- package/dist/models/bundle-storage.d.ts +28 -0
- package/dist/models/bundle-storage.js +80 -0
- package/dist/models/catalog-drift.d.ts +48 -0
- package/dist/models/catalog-drift.js +94 -0
- package/dist/models/catalog-payload-identity.d.ts +107 -0
- package/dist/models/catalog-payload-identity.js +254 -0
- package/dist/models/ensure.d.ts +125 -0
- package/dist/models/ensure.js +205 -0
- package/dist/models/gezmodel.d.ts +47 -0
- package/dist/models/gezmodel.js +742 -0
- package/dist/models/install-registry.d.ts +101 -0
- package/dist/models/install-registry.js +216 -0
- package/dist/models/model-id.d.ts +22 -0
- package/dist/models/model-id.js +40 -0
- package/dist/models/storage-roots.d.ts +274 -0
- package/dist/models/storage-roots.js +865 -0
- package/dist/native-release-entry.d.ts +16 -0
- package/dist/native-release-entry.js +16 -0
- package/dist/perf/redact-path.d.ts +2 -0
- package/dist/perf/redact-path.js +27 -0
- package/dist/perf/responsiveness.d.ts +70 -0
- package/dist/perf/responsiveness.js +560 -0
- package/dist/providers/active-install-message.d.ts +42 -0
- package/dist/providers/active-install-message.js +49 -0
- package/dist/providers/apple-foundation-models/binary.d.ts +4 -0
- package/dist/providers/apple-foundation-models/binary.js +18 -0
- package/dist/providers/apple-foundation-models/helper.d.ts +66 -0
- package/dist/providers/apple-foundation-models/helper.js +262 -0
- package/dist/providers/apple-foundation-models/provider.d.ts +82 -0
- package/dist/providers/apple-foundation-models/provider.js +389 -0
- package/dist/providers/apple-foundation-models/status.d.ts +9 -0
- package/dist/providers/apple-foundation-models/status.js +49 -0
- package/dist/providers/audio/kokoro-frontend.d.ts +50 -0
- package/dist/providers/audio/kokoro-frontend.js +113 -0
- package/dist/providers/audio/managed-speech-model.d.ts +9 -0
- package/dist/providers/audio/managed-speech-model.js +86 -0
- package/dist/providers/audio/types.d.ts +202 -0
- package/dist/providers/audio/types.js +17 -0
- package/dist/providers/audio/whisper-cpp.d.ts +99 -0
- package/dist/providers/audio/whisper-cpp.js +420 -0
- package/dist/providers/audio-persister-contract.d.ts +13 -0
- package/dist/providers/audio-persister-contract.js +1 -0
- package/dist/providers/catalog-model-config.d.ts +63 -0
- package/dist/providers/catalog-model-config.js +95 -0
- package/dist/providers/code-block-salvage.d.ts +1 -0
- package/dist/providers/code-block-salvage.js +2 -0
- package/dist/providers/codex-cli/reasoning.d.ts +8 -0
- package/dist/providers/codex-cli/reasoning.js +17 -0
- package/dist/providers/complete-tool-call.d.ts +16 -0
- package/dist/providers/complete-tool-call.js +25 -0
- package/dist/providers/constrained-turn.d.ts +1 -0
- package/dist/providers/constrained-turn.js +2 -0
- package/dist/providers/deliverable-read-pacing.d.ts +1 -0
- package/dist/providers/deliverable-read-pacing.js +2 -0
- package/dist/providers/direct-file-work-prompt.d.ts +1 -0
- package/dist/providers/direct-file-work-prompt.js +2 -0
- package/dist/providers/ds4/build-provider.d.ts +100 -0
- package/dist/providers/ds4/build-provider.js +539 -0
- package/dist/providers/ds4/cache-adapter.d.ts +42 -0
- package/dist/providers/ds4/cache-adapter.js +110 -0
- package/dist/providers/ds4/dspark.d.ts +83 -0
- package/dist/providers/ds4/dspark.js +107 -0
- package/dist/providers/ds4/mtp.d.ts +32 -0
- package/dist/providers/ds4/mtp.js +46 -0
- package/dist/providers/ds4/provider.d.ts +67 -0
- package/dist/providers/ds4/provider.js +104 -0
- package/dist/providers/ds4/residency.d.ts +143 -0
- package/dist/providers/ds4/residency.js +139 -0
- package/dist/providers/ds4/stdout-parser.d.ts +47 -0
- package/dist/providers/ds4/stdout-parser.js +134 -0
- package/dist/providers/duplicate-tool-calls.d.ts +1 -0
- package/dist/providers/duplicate-tool-calls.js +2 -0
- package/dist/providers/file-repair-policy.d.ts +1 -0
- package/dist/providers/file-repair-policy.js +2 -0
- package/dist/providers/gpu-arbiter.d.ts +159 -0
- package/dist/providers/gpu-arbiter.js +301 -0
- package/dist/providers/image-persister-contract.d.ts +15 -0
- package/dist/providers/image-persister-contract.js +1 -0
- package/dist/providers/llama-cpp/build-metadata.d.ts +13 -0
- package/dist/providers/llama-cpp/build-metadata.js +39 -0
- package/dist/providers/llama-cpp/build-provider.d.ts +66 -0
- package/dist/providers/llama-cpp/build-provider.js +1491 -0
- package/dist/providers/llama-cpp/cache-adapter.d.ts +242 -0
- package/dist/providers/llama-cpp/cache-adapter.js +689 -0
- package/dist/providers/llama-cpp/devices.d.ts +130 -0
- package/dist/providers/llama-cpp/devices.js +256 -0
- package/dist/providers/llama-cpp/disk-cache.d.ts +8 -0
- package/dist/providers/llama-cpp/disk-cache.js +112 -0
- package/dist/providers/llama-cpp/engine-flags.d.ts +181 -0
- package/dist/providers/llama-cpp/engine-flags.js +279 -0
- package/dist/providers/llama-cpp/gguf-metadata-async.d.ts +11 -0
- package/dist/providers/llama-cpp/gguf-metadata-async.js +180 -0
- package/dist/providers/llama-cpp/gguf-metadata-worker.d.ts +7 -0
- package/dist/providers/llama-cpp/gguf-metadata-worker.js +27 -0
- package/dist/providers/llama-cpp/gguf-metadata.d.ts +198 -0
- package/dist/providers/llama-cpp/gguf-metadata.js +615 -0
- package/dist/providers/llama-cpp/gguf-quantization-backfill.d.ts +32 -0
- package/dist/providers/llama-cpp/gguf-quantization-backfill.js +75 -0
- package/dist/providers/llama-cpp/index.d.ts +10 -0
- package/dist/providers/llama-cpp/index.js +13 -0
- package/dist/providers/llama-cpp/kv-cache-type.d.ts +118 -0
- package/dist/providers/llama-cpp/kv-cache-type.js +140 -0
- package/dist/providers/llama-cpp/log.d.ts +92 -0
- package/dist/providers/llama-cpp/log.js +280 -0
- package/dist/providers/llama-cpp/models.d.ts +389 -0
- package/dist/providers/llama-cpp/models.js +1011 -0
- package/dist/providers/llama-cpp/offload-planner.d.ts +339 -0
- package/dist/providers/llama-cpp/offload-planner.js +524 -0
- package/dist/providers/llama-cpp/provider.d.ts +493 -0
- package/dist/providers/llama-cpp/provider.js +862 -0
- package/dist/providers/llama-cpp/reasoning-launch.d.ts +7 -0
- package/dist/providers/llama-cpp/reasoning-launch.js +14 -0
- package/dist/providers/llama-cpp/spec-draft.d.ts +44 -0
- package/dist/providers/llama-cpp/spec-draft.js +44 -0
- package/dist/providers/llama-cpp/stdout-parser.d.ts +70 -0
- package/dist/providers/llama-cpp/stdout-parser.js +197 -0
- package/dist/providers/local-tool-call-salvage.d.ts +1 -0
- package/dist/providers/local-tool-call-salvage.js +2 -0
- package/dist/providers/local-turn-policy.d.ts +1 -0
- package/dist/providers/local-turn-policy.js +2 -0
- package/dist/providers/mlx/async-file-handoff.d.ts +11 -0
- package/dist/providers/mlx/async-file-handoff.js +25 -0
- package/dist/providers/mlx/build-provider.d.ts +65 -0
- package/dist/providers/mlx/build-provider.js +717 -0
- package/dist/providers/mlx/cache-adapter.d.ts +161 -0
- package/dist/providers/mlx/cache-adapter.js +445 -0
- package/dist/providers/mlx/chat-protocol.d.ts +48 -0
- package/dist/providers/mlx/chat-protocol.js +8 -0
- package/dist/providers/mlx/config-parser.d.ts +29 -0
- package/dist/providers/mlx/config-parser.js +81 -0
- package/dist/providers/mlx/engine-gate.d.ts +51 -0
- package/dist/providers/mlx/engine-gate.js +207 -0
- package/dist/providers/mlx/engine-hold.d.ts +41 -0
- package/dist/providers/mlx/engine-hold.js +59 -0
- package/dist/providers/mlx/engine-log-router.d.ts +84 -0
- package/dist/providers/mlx/engine-log-router.js +137 -0
- package/dist/providers/mlx/engine-stats-sampler.d.ts +36 -0
- package/dist/providers/mlx/engine-stats-sampler.js +59 -0
- package/dist/providers/mlx/index.d.ts +10 -0
- package/dist/providers/mlx/index.js +10 -0
- package/dist/providers/mlx/log.d.ts +55 -0
- package/dist/providers/mlx/log.js +157 -0
- package/dist/providers/mlx/model-geometry.d.ts +35 -0
- package/dist/providers/mlx/model-geometry.js +118 -0
- package/dist/providers/mlx/models.d.ts +289 -0
- package/dist/providers/mlx/models.js +1079 -0
- package/dist/providers/mlx/provider.d.ts +404 -0
- package/dist/providers/mlx/provider.js +3017 -0
- package/dist/providers/mlx/python/cache_persist.py +348 -0
- package/dist/providers/mlx/python/cache_seed.py +402 -0
- package/dist/providers/mlx/python/gezel_mlx_server.py +4491 -0
- package/dist/providers/mlx/python/lfm2_compat.py +55 -0
- package/dist/providers/mlx/python/qwen3_5_text_compat.py +60 -0
- package/dist/providers/mlx/python/qwen4_ple.py +159 -0
- package/dist/providers/mlx/python/spec_decode.py +775 -0
- package/dist/providers/mlx/python/template_stability.py +133 -0
- package/dist/providers/mlx/python/think_budget.py +113 -0
- package/dist/providers/mlx/python/tool_args_json.py +297 -0
- package/dist/providers/mlx/python/tool_call_stream.py +265 -0
- package/dist/providers/mlx/python/tool_grammar.py +794 -0
- package/dist/providers/mlx/python/vision_inputs.py +64 -0
- package/dist/providers/mlx/python/wave_policy.py +147 -0
- package/dist/providers/mlx/reasoning-stream.d.ts +85 -0
- package/dist/providers/mlx/reasoning-stream.js +196 -0
- package/dist/providers/mlx/request-shape.d.ts +34 -0
- package/dist/providers/mlx/request-shape.js +42 -0
- package/dist/providers/mlx/runtime-diagnostics.d.ts +29 -0
- package/dist/providers/mlx/runtime-diagnostics.js +162 -0
- package/dist/providers/mlx/spec-drafter.d.ts +25 -0
- package/dist/providers/mlx/spec-drafter.js +73 -0
- package/dist/providers/mlx/stdout-parser.d.ts +60 -0
- package/dist/providers/mlx/stdout-parser.js +254 -0
- package/dist/providers/mlx/textual-tool-call-salvage.d.ts +46 -0
- package/dist/providers/mlx/textual-tool-call-salvage.js +396 -0
- package/dist/providers/mlx/tool-call-protocol.d.ts +65 -0
- package/dist/providers/mlx/tool-call-protocol.js +140 -0
- package/dist/providers/mlx/tool-call-stripper.d.ts +68 -0
- package/dist/providers/mlx/tool-call-stripper.js +153 -0
- package/dist/providers/mlx/tool-image-retention.d.ts +23 -0
- package/dist/providers/mlx/tool-image-retention.js +43 -0
- package/dist/providers/mlx/turn-telemetry.d.ts +22 -0
- package/dist/providers/mlx/turn-telemetry.js +45 -0
- package/dist/providers/mlx/venv.d.ts +91 -0
- package/dist/providers/mlx/venv.js +111 -0
- package/dist/providers/mlx/vision-mode.d.ts +92 -0
- package/dist/providers/mlx/vision-mode.js +187 -0
- package/dist/providers/mlx/vision.d.ts +2 -0
- package/dist/providers/mlx/vision.js +12 -0
- package/dist/providers/mlx/wire-transcript.d.ts +14 -0
- package/dist/providers/mlx/wire-transcript.js +43 -0
- package/dist/providers/native/capacity-broker.d.ts +812 -0
- package/dist/providers/native/capacity-broker.js +1058 -0
- package/dist/providers/native/capacity-budget.d.ts +133 -0
- package/dist/providers/native/capacity-budget.js +265 -0
- package/dist/providers/native/device-capacity-ledger.d.ts +31 -0
- package/dist/providers/native/device-capacity-ledger.js +196 -0
- package/dist/providers/native/device-capacity.d.ts +84 -0
- package/dist/providers/native/device-capacity.js +431 -0
- package/dist/providers/native/engine-api-key.d.ts +57 -0
- package/dist/providers/native/engine-api-key.js +72 -0
- package/dist/providers/native/engine-key.d.ts +18 -0
- package/dist/providers/native/engine-key.js +41 -0
- package/dist/providers/native/engine-router.d.ts +145 -0
- package/dist/providers/native/engine-router.js +191 -0
- package/dist/providers/native/gpu-panic-guard.d.ts +54 -0
- package/dist/providers/native/gpu-panic-guard.js +59 -0
- package/dist/providers/native/inference.d.ts +33 -0
- package/dist/providers/native/inference.js +49 -0
- package/dist/providers/native/local-engine-runtime.d.ts +412 -0
- package/dist/providers/native/local-engine-runtime.js +1714 -0
- package/dist/providers/native/measured-budget.d.ts +32 -0
- package/dist/providers/native/measured-budget.js +54 -0
- package/dist/providers/native/port.d.ts +11 -0
- package/dist/providers/native/port.js +29 -0
- package/dist/providers/native/provider-pool.d.ts +474 -0
- package/dist/providers/native/provider-pool.js +1166 -0
- package/dist/providers/native/supervisor.d.ts +503 -0
- package/dist/providers/native/supervisor.js +1466 -0
- package/dist/providers/observation-context.d.ts +16 -0
- package/dist/providers/observation-context.js +1 -0
- package/dist/providers/openai-compatible/sse.d.ts +1 -0
- package/dist/providers/openai-compatible/sse.js +2 -0
- package/dist/providers/patient-fetch.d.ts +36 -0
- package/dist/providers/patient-fetch.js +44 -0
- package/dist/providers/project-macro-loop-bail.d.ts +7 -0
- package/dist/providers/project-macro-loop-bail.js +21 -0
- package/dist/providers/prose-document-salvage.d.ts +1 -0
- package/dist/providers/prose-document-salvage.js +2 -0
- package/dist/providers/provider-disposal.d.ts +1 -0
- package/dist/providers/provider-disposal.js +2 -0
- package/dist/providers/queue.d.ts +15 -0
- package/dist/providers/queue.js +23 -0
- package/dist/providers/ramble-abort-message.d.ts +1 -0
- package/dist/providers/ramble-abort-message.js +2 -0
- package/dist/providers/ramble-detector.d.ts +1 -0
- package/dist/providers/ramble-detector.js +2 -0
- package/dist/providers/reasoning-depth.d.ts +1 -0
- package/dist/providers/reasoning-depth.js +2 -0
- package/dist/providers/required-input-reads.d.ts +1 -0
- package/dist/providers/required-input-reads.js +2 -0
- package/dist/providers/session-defaults.d.ts +13 -0
- package/dist/providers/session-defaults.js +49 -0
- package/dist/providers/session-hooks.d.ts +26 -0
- package/dist/providers/session-hooks.js +1 -0
- package/dist/providers/streaming-session.d.ts +1 -0
- package/dist/providers/streaming-session.js +2 -0
- package/dist/providers/terminal-tool-policy.d.ts +1 -0
- package/dist/providers/terminal-tool-policy.js +2 -0
- package/dist/providers/tool-arg-schema-coercion.d.ts +1 -0
- package/dist/providers/tool-arg-schema-coercion.js +2 -0
- package/dist/providers/tool-executor.d.ts +12 -0
- package/dist/providers/tool-executor.js +20 -0
- package/dist/providers/tool-failure-tracker.d.ts +1 -0
- package/dist/providers/tool-failure-tracker.js +2 -0
- package/dist/providers/tool-repeat-tracker.d.ts +1 -0
- package/dist/providers/tool-repeat-tracker.js +2 -0
- package/dist/providers/turn-timeout.d.ts +1 -0
- package/dist/providers/turn-timeout.js +1 -0
- package/dist/providers/types.d.ts +834 -0
- package/dist/providers/types.js +42 -0
- package/dist/providers/usage-builder.d.ts +1 -0
- package/dist/providers/usage-builder.js +2 -0
- package/dist/providers/vision-capability.d.ts +109 -0
- package/dist/providers/vision-capability.js +137 -0
- package/dist/python/mlx-runtime-status-bus.d.ts +39 -0
- package/dist/python/mlx-runtime-status-bus.js +27 -0
- package/dist/python/uv-runtime.d.ts +176 -0
- package/dist/python/uv-runtime.js +492 -0
- package/dist/relevance/install.d.ts +28 -0
- package/dist/relevance/install.js +114 -0
- package/dist/relevance/manager.d.ts +79 -0
- package/dist/relevance/manager.js +211 -0
- package/dist/relevance/registry.d.ts +11 -0
- package/dist/relevance/registry.js +158 -0
- package/dist/relevance/relevance-core.d.ts +67 -0
- package/dist/relevance/relevance-core.js +189 -0
- package/dist/relevance/relevance-model.d.ts +42 -0
- package/dist/relevance/relevance-model.js +292 -0
- package/dist/relevance/relevance-worker.d.ts +20 -0
- package/dist/relevance/relevance-worker.js +57 -0
- package/dist/relevance/settings.d.ts +30 -0
- package/dist/relevance/settings.js +81 -0
- package/dist/remotes/identity.d.ts +121 -0
- package/dist/remotes/identity.js +348 -0
- package/dist/remotes/pinned-fetch.d.ts +45 -0
- package/dist/remotes/pinned-fetch.js +193 -0
- package/dist/remotes/types.d.ts +54 -0
- package/dist/remotes/types.js +1 -0
- package/dist/runtime-lock.d.ts +29 -0
- package/dist/runtime-lock.js +85 -0
- package/dist/search/relevance-stage.d.ts +81 -0
- package/dist/search/relevance-stage.js +177 -0
- package/dist/secrets/types.d.ts +63 -0
- package/dist/secrets/types.js +64 -0
- package/dist/speech.d.ts +1 -0
- package/dist/speech.js +1 -0
- package/dist/system/darwin-memory.d.ts +26 -0
- package/dist/system/darwin-memory.js +81 -0
- package/dist/system/gezel-process-memory.d.ts +55 -0
- package/dist/system/gezel-process-memory.js +156 -0
- package/dist/system/memory.d.ts +154 -0
- package/dist/system/memory.js +501 -0
- package/dist/transformers-cache.d.ts +112 -0
- package/dist/transformers-cache.js +392 -0
- package/dist/utils/disk-space.d.ts +55 -0
- package/dist/utils/disk-space.js +72 -0
- package/dist/utils/download-common.d.ts +138 -0
- package/dist/utils/download-common.js +196 -0
- package/dist/utils/download-with-retry.d.ts +85 -0
- package/dist/utils/download-with-retry.js +522 -0
- package/dist/utils/extract-zip.d.ts +22 -0
- package/dist/utils/extract-zip.js +103 -0
- package/dist/utils/retire-model-worker.d.ts +15 -0
- package/dist/utils/retire-model-worker.js +24 -0
- package/dist/utils/service-worker-entry.d.ts +59 -0
- package/dist/utils/service-worker-entry.js +69 -0
- package/dist/utils/xet-download.d.ts +40 -0
- package/dist/utils/xet-download.js +526 -0
- package/dist/utils/xet.d.ts +86 -0
- package/dist/utils/xet.js +201 -0
- package/package.json +103 -3
- package/scripts/embedding-packaging.cjs +264 -0
- package/scripts/embedding-packaging.d.cts +16 -0
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import { createLogger } from '@bendyline/gezel';
|
|
2
|
+
import { findBareInvokeToolCallSpans, findClaudeInvokeToolCallSpans, findGlmToolCallSpans, findHermesFunctionToolCallSpans, findHermesFunctionToolCallSpansLenient, findProseToolCallSpans, findShellToolCallSpans, findTruncatedJsonEnvelope, findUnrecognizedToolEnvelope, findXmlTagToolCallSpans, isPayloadMutationToolName, isWriteShapedToolName, parseJsonEnvelopeToolCalls, salvageWriteShapedTruncation, stripBareInvokeToolCallsFromText, stripClaudeInvokeToolCallsFromText, stripGlmToolCallsFromText, stripHermesFunctionToolCallsFromText, stripJsonEnvelopesFromText, stripProseToolCallsFromText, stripShellToolCallsFromText, stripXmlTagToolCallsFromText, } from '../local-tool-call-salvage.js';
|
|
3
|
+
const log = createLogger('mlx');
|
|
4
|
+
/**
|
|
5
|
+
* The salvage passes that read tool calls out of a generation's visible text,
|
|
6
|
+
* run after the structured calls and the stripped-marker repair. Each pass is
|
|
7
|
+
* gated on every earlier one having found nothing, so one intent never fires
|
|
8
|
+
* twice. Truncated calls are reported through `truncatedCallIds` and
|
|
9
|
+
* `droppedTruncatedPayloadCalls`, which the tool loop reads afterwards.
|
|
10
|
+
*/
|
|
11
|
+
export function salvageTextualToolCalls(input) {
|
|
12
|
+
const { knownToolNames, seq, turn, structuredCalls, repairedCalls, codeBlockRepaired, truncatedCallIds, droppedTruncatedPayloadCalls, emitWarning, } = input;
|
|
13
|
+
let turnContent = input.turnContent;
|
|
14
|
+
let unknownCall = null;
|
|
15
|
+
// Third salvage path: small models sometimes emit
|
|
16
|
+
// `name(args)` directly in their text — usually inside a
|
|
17
|
+
// markdown code block — instead of issuing a real
|
|
18
|
+
// function-call. The stripper misses it (no `<|tool_call|>`
|
|
19
|
+
// markers) and the user sees the call rendered as decoration
|
|
20
|
+
// while nothing happens. If no real or marker-repaired calls
|
|
21
|
+
// fired this turn, scan the streamed text for a prose-shaped
|
|
22
|
+
// call and promote it. Strict gating (known-tools set + JSON
|
|
23
|
+
// parse) prevents false positives.
|
|
24
|
+
const proseRepaired = [];
|
|
25
|
+
if (structuredCalls.length === 0 && repairedCalls.length === 0 && turnContent.length > 0) {
|
|
26
|
+
const parsedSpans = findProseToolCallSpans(turnContent, knownToolNames);
|
|
27
|
+
for (const [idx, parsed] of parsedSpans.entries()) {
|
|
28
|
+
proseRepaired.push({
|
|
29
|
+
id: `prose-repair-${seq}-${turn}-${idx}`,
|
|
30
|
+
type: 'function',
|
|
31
|
+
function: {
|
|
32
|
+
name: parsed.name,
|
|
33
|
+
arguments: JSON.stringify(parsed.arguments),
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
if (parsedSpans.length > 0) {
|
|
38
|
+
// Strip every prose body (and any wrapping ```fence```)
|
|
39
|
+
// so the persisted assistant bubble doesn't show the
|
|
40
|
+
// calls as decoration alongside the actual tool widgets.
|
|
41
|
+
turnContent = stripProseToolCallsFromText(turnContent, parsedSpans);
|
|
42
|
+
}
|
|
43
|
+
else if (/[a-zA-Z_][a-zA-Z0-9_]*\s*\(/.test(turnContent)) {
|
|
44
|
+
// Diagnostic: the content has SHAPE that looks like a
|
|
45
|
+
// tool call (an identifier followed by `(`) but the
|
|
46
|
+
// salvage parser found nothing. Surface a debug-level
|
|
47
|
+
// preview so a regression here is visible in the daemon
|
|
48
|
+
// log without re-running the whole eval. The match
|
|
49
|
+
// could be JS / Python / prose narration — the regex
|
|
50
|
+
// alone isn't enough to promote, but it's a strong
|
|
51
|
+
// signal that the parser missed something the model
|
|
52
|
+
// intended as a call.
|
|
53
|
+
const match = turnContent.match(/([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/);
|
|
54
|
+
const wanted = match?.[1] ?? '?';
|
|
55
|
+
const headPos = Math.max(0, (match?.index ?? 0) - 40);
|
|
56
|
+
const preview = turnContent.slice(headPos, headPos + 240).replace(/\s+/g, ' ');
|
|
57
|
+
log.debug(`turn#${seq}.${turn} prose-salvage found 0 spans despite \`${wanted}(\`-shaped text — preview: ${preview}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
// Fourth salvage path: Anthropic-style XML self-closing tags
|
|
61
|
+
// (`<browser_navigate url="..." />`). Wild-caught on Qwen 3.6
|
|
62
|
+
// 27B at MLX after the `<|tool_call|>` channel was closed off
|
|
63
|
+
// via prompt — the model picks the next-most-familiar tool-use
|
|
64
|
+
// shape from training data. Run before the JSON envelope
|
|
65
|
+
// salvage so a tag like `<list_projects />` isn't mis-parsed
|
|
66
|
+
// by the JSON walker.
|
|
67
|
+
const xmlTagRepaired = [];
|
|
68
|
+
if (structuredCalls.length === 0 &&
|
|
69
|
+
repairedCalls.length === 0 &&
|
|
70
|
+
proseRepaired.length === 0 &&
|
|
71
|
+
turnContent.length > 0) {
|
|
72
|
+
const xmlSpans = findXmlTagToolCallSpans(turnContent, knownToolNames);
|
|
73
|
+
for (const [idx, parsed] of xmlSpans.entries()) {
|
|
74
|
+
xmlTagRepaired.push({
|
|
75
|
+
id: `xml-tag-repair-${seq}-${turn}-${idx}`,
|
|
76
|
+
type: 'function',
|
|
77
|
+
function: {
|
|
78
|
+
name: parsed.name,
|
|
79
|
+
arguments: JSON.stringify(parsed.arguments),
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
if (xmlSpans.length > 0) {
|
|
84
|
+
turnContent = stripXmlTagToolCallsFromText(turnContent, xmlSpans);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// Anthropic-style `<function_calls><invoke name="X">...</invoke></function_calls>`
|
|
88
|
+
// markup. The literal Claude tool-use XML format that Qwen
|
|
89
|
+
// 3.6 reaches for after the simpler self-closing XML form is
|
|
90
|
+
// closed off. Parameters arrive as nested
|
|
91
|
+
// `<parameter name="K">value</parameter>` elements.
|
|
92
|
+
const claudeInvokeRepaired = [];
|
|
93
|
+
if (structuredCalls.length === 0 &&
|
|
94
|
+
repairedCalls.length === 0 &&
|
|
95
|
+
proseRepaired.length === 0 &&
|
|
96
|
+
xmlTagRepaired.length === 0 &&
|
|
97
|
+
turnContent.length > 0) {
|
|
98
|
+
const invokeSpans = findClaudeInvokeToolCallSpans(turnContent, knownToolNames);
|
|
99
|
+
for (const [idx, parsed] of invokeSpans.entries()) {
|
|
100
|
+
claudeInvokeRepaired.push({
|
|
101
|
+
id: `claude-invoke-repair-${seq}-${turn}-${idx}`,
|
|
102
|
+
type: 'function',
|
|
103
|
+
function: {
|
|
104
|
+
name: parsed.name,
|
|
105
|
+
arguments: JSON.stringify(parsed.arguments),
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
if (invokeSpans.length > 0) {
|
|
110
|
+
turnContent = stripClaudeInvokeToolCallsFromText(turnContent, invokeSpans);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// GLM-4.5/4.6 native `<tool_call>NAME<arg_key>K</arg_key><arg_value>V</arg_value></tool_call>`
|
|
114
|
+
// markup. GLM-family models (laguna-s-118b, a GLM-4.5-Air
|
|
115
|
+
// derivative) emit this verbatim as content on the MLX textual
|
|
116
|
+
// path — no `<function=`, no `="`, so none of the shapes above
|
|
117
|
+
// match it and the turn stalls with zero tool calls. Run before
|
|
118
|
+
// the Hermes/shell paths (both key on `<tool_call>` too, but on
|
|
119
|
+
// `<function=` / `name key="value"` bodies GLM never produces).
|
|
120
|
+
const glmRepaired = [];
|
|
121
|
+
if (structuredCalls.length === 0 &&
|
|
122
|
+
repairedCalls.length === 0 &&
|
|
123
|
+
proseRepaired.length === 0 &&
|
|
124
|
+
xmlTagRepaired.length === 0 &&
|
|
125
|
+
claudeInvokeRepaired.length === 0 &&
|
|
126
|
+
turnContent.length > 0) {
|
|
127
|
+
const glmSpans = findGlmToolCallSpans(turnContent, knownToolNames);
|
|
128
|
+
for (const [idx, parsed] of glmSpans.entries()) {
|
|
129
|
+
if (parsed.truncated && !isWriteShapedToolName(parsed.name)) {
|
|
130
|
+
emitWarning(`The model's \`${parsed.name}\` call was cut off mid-stream and was skipped so a partial mutation could not land. Retry with a smaller payload.`);
|
|
131
|
+
if (isPayloadMutationToolName(parsed.name)) {
|
|
132
|
+
droppedTruncatedPayloadCalls.push({ name: parsed.name, args: parsed.arguments });
|
|
133
|
+
}
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
const id = `glm-repair-${seq}-${turn}-${idx}`;
|
|
137
|
+
glmRepaired.push({
|
|
138
|
+
id,
|
|
139
|
+
type: 'function',
|
|
140
|
+
function: {
|
|
141
|
+
name: parsed.name,
|
|
142
|
+
arguments: JSON.stringify(parsed.arguments),
|
|
143
|
+
},
|
|
144
|
+
});
|
|
145
|
+
if (parsed.truncated)
|
|
146
|
+
truncatedCallIds.add(id);
|
|
147
|
+
}
|
|
148
|
+
if (glmSpans.length > 0) {
|
|
149
|
+
turnContent = stripGlmToolCallsFromText(turnContent, glmSpans);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
// Hermes-2-Pro / Functionary `<function=NAME><parameter=K>V</parameter></function>`
|
|
153
|
+
// markup, often wrapped in Qwen's canonical `<tool_call>`
|
|
154
|
+
// envelope (Qwen 3.6 has been trained on both corpora and at
|
|
155
|
+
// heavy quant mixes them).
|
|
156
|
+
const hermesRepaired = [];
|
|
157
|
+
// Ids of synthesized tool calls whose underlying salvage span
|
|
158
|
+
// was marked `truncated` — the bridge will execute them with
|
|
159
|
+
// whatever content arrived, then we'll append an
|
|
160
|
+
// auto-continuation hint to the tool's result so the model
|
|
161
|
+
// knows to call the tool again with the remaining bytes.
|
|
162
|
+
// Cleared and rebuilt every iteration; consumed in the
|
|
163
|
+
// tool-execution loop further down.
|
|
164
|
+
if (structuredCalls.length === 0 &&
|
|
165
|
+
repairedCalls.length === 0 &&
|
|
166
|
+
proseRepaired.length === 0 &&
|
|
167
|
+
xmlTagRepaired.length === 0 &&
|
|
168
|
+
claudeInvokeRepaired.length === 0 &&
|
|
169
|
+
glmRepaired.length === 0 &&
|
|
170
|
+
turnContent.length > 0) {
|
|
171
|
+
let hermesSpans = findHermesFunctionToolCallSpans(turnContent, knownToolNames);
|
|
172
|
+
if (hermesSpans.length === 0 && /<function=/i.test(turnContent)) {
|
|
173
|
+
// Streaming-truncated case (Qwen 3.6 27B write_file bodies
|
|
174
|
+
// that exceed max_tokens): the strict regex needs
|
|
175
|
+
// `</parameter>` + `</function>` closers, the lenient
|
|
176
|
+
// parser accepts the open-only shape and extends the last
|
|
177
|
+
// parameter value to EOF. Gated on the cheap text-contains
|
|
178
|
+
// check so prose unrelated to tool calls isn't re-scanned.
|
|
179
|
+
const lenient = findHermesFunctionToolCallSpansLenient(turnContent, knownToolNames);
|
|
180
|
+
if (lenient.length > 0) {
|
|
181
|
+
log.info(`turn#${seq}.${turn} salvaged ${lenient.length} Hermes-style tool call(s) via lenient parser (truncated stream): ${lenient.map((s) => s.name).join(', ')}`);
|
|
182
|
+
hermesSpans = lenient;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
for (const [idx, parsed] of hermesSpans.entries()) {
|
|
186
|
+
if (parsed.truncated && !isWriteShapedToolName(parsed.name)) {
|
|
187
|
+
emitWarning(`The model's \`${parsed.name}\` call was cut off mid-stream and was skipped so a partial mutation could not land. Retry with a smaller payload.`);
|
|
188
|
+
if (isPayloadMutationToolName(parsed.name)) {
|
|
189
|
+
droppedTruncatedPayloadCalls.push({ name: parsed.name, args: parsed.arguments });
|
|
190
|
+
}
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
const id = `hermes-repair-${seq}-${turn}-${idx}`;
|
|
194
|
+
hermesRepaired.push({
|
|
195
|
+
id,
|
|
196
|
+
type: 'function',
|
|
197
|
+
function: {
|
|
198
|
+
name: parsed.name,
|
|
199
|
+
arguments: JSON.stringify(parsed.arguments),
|
|
200
|
+
},
|
|
201
|
+
});
|
|
202
|
+
if (parsed.truncated)
|
|
203
|
+
truncatedCallIds.add(id);
|
|
204
|
+
}
|
|
205
|
+
if (hermesSpans.length > 0) {
|
|
206
|
+
turnContent = stripHermesFunctionToolCallsFromText(turnContent, hermesSpans);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
// Shell-style `<tool_call>name key="value"` per line, no
|
|
210
|
+
// close tag, no JSON envelope. The most degraded form of
|
|
211
|
+
// Qwen's canonical `<tool_call>` template — wild-caught on
|
|
212
|
+
// Qwen 3.6 27B at heavy quant after the canonical, XML, and
|
|
213
|
+
// Claude-invoke shapes were all closed off via prompt.
|
|
214
|
+
const shellRepaired = [];
|
|
215
|
+
if (structuredCalls.length === 0 &&
|
|
216
|
+
repairedCalls.length === 0 &&
|
|
217
|
+
proseRepaired.length === 0 &&
|
|
218
|
+
xmlTagRepaired.length === 0 &&
|
|
219
|
+
claudeInvokeRepaired.length === 0 &&
|
|
220
|
+
glmRepaired.length === 0 &&
|
|
221
|
+
hermesRepaired.length === 0 &&
|
|
222
|
+
turnContent.length > 0) {
|
|
223
|
+
const shellSpans = findShellToolCallSpans(turnContent, knownToolNames);
|
|
224
|
+
for (const [idx, parsed] of shellSpans.entries()) {
|
|
225
|
+
shellRepaired.push({
|
|
226
|
+
id: `shell-repair-${seq}-${turn}-${idx}`,
|
|
227
|
+
type: 'function',
|
|
228
|
+
function: {
|
|
229
|
+
name: parsed.name,
|
|
230
|
+
arguments: JSON.stringify(parsed.arguments),
|
|
231
|
+
},
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
if (shellSpans.length > 0) {
|
|
235
|
+
turnContent = stripShellToolCallsFromText(turnContent, shellSpans);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
// Fifth salvage path: JSON-envelope shape some small models
|
|
239
|
+
// (Qwen 3.5/3.6) emit verbatim — `{"tool": "X", "args": {}}`
|
|
240
|
+
// typically inside a markdown json fence — instead of a real
|
|
241
|
+
// `tool_calls` event. Promote it the same way as the prose
|
|
242
|
+
// salvage. Gated on no other salvage having fired so we don't
|
|
243
|
+
// double-issue when the model coincidentally emitted both.
|
|
244
|
+
//
|
|
245
|
+
// We extract *every* envelope in the streamed content (Qwen
|
|
246
|
+
// sometimes chains multiple back-to-back) and surface a
|
|
247
|
+
// truncation warning when the model stopped mid-envelope —
|
|
248
|
+
// both fixes for the user-visible "only the first call fires
|
|
249
|
+
// and then it stops" symptom.
|
|
250
|
+
const envelopeRepaired = [];
|
|
251
|
+
let envelopeTruncated = null;
|
|
252
|
+
if (structuredCalls.length === 0 &&
|
|
253
|
+
repairedCalls.length === 0 &&
|
|
254
|
+
proseRepaired.length === 0 &&
|
|
255
|
+
xmlTagRepaired.length === 0 &&
|
|
256
|
+
claudeInvokeRepaired.length === 0 &&
|
|
257
|
+
glmRepaired.length === 0 &&
|
|
258
|
+
hermesRepaired.length === 0 &&
|
|
259
|
+
shellRepaired.length === 0 &&
|
|
260
|
+
turnContent.length > 0) {
|
|
261
|
+
const parsedCalls = parseJsonEnvelopeToolCalls(turnContent, knownToolNames);
|
|
262
|
+
envelopeTruncated = findTruncatedJsonEnvelope(turnContent);
|
|
263
|
+
for (const [idx, parsed] of parsedCalls.entries()) {
|
|
264
|
+
envelopeRepaired.push({
|
|
265
|
+
id: `json-envelope-repair-${seq}-${turn}-${idx}`,
|
|
266
|
+
type: 'function',
|
|
267
|
+
function: {
|
|
268
|
+
name: parsed.name,
|
|
269
|
+
arguments: JSON.stringify(parsed.arguments),
|
|
270
|
+
},
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
if (envelopeRepaired.length > 0 || envelopeTruncated) {
|
|
274
|
+
// Strip every salvaged envelope (and any truncated tail)
|
|
275
|
+
// from visible content so the user doesn't see the call
|
|
276
|
+
// body rendered alongside the actual tool bubbles.
|
|
277
|
+
turnContent = stripJsonEnvelopesFromText(turnContent, parsedCalls, envelopeTruncated?.matchStart);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
// Hide unrecognized-name JSON envelopes from the bubble even
|
|
281
|
+
// though we can't promote them. The downstream "Did you mean…?"
|
|
282
|
+
// branch will retry on the model's behalf; surfacing the failed
|
|
283
|
+
// first attempt as raw JSON in the user's view is just noise.
|
|
284
|
+
// Detection is done here (vs. inside the retry branch below)
|
|
285
|
+
// so the strip runs before `fullText += turnContent`.
|
|
286
|
+
if (structuredCalls.length === 0 &&
|
|
287
|
+
repairedCalls.length === 0 &&
|
|
288
|
+
proseRepaired.length === 0 &&
|
|
289
|
+
xmlTagRepaired.length === 0 &&
|
|
290
|
+
claudeInvokeRepaired.length === 0 &&
|
|
291
|
+
glmRepaired.length === 0 &&
|
|
292
|
+
hermesRepaired.length === 0 &&
|
|
293
|
+
shellRepaired.length === 0 &&
|
|
294
|
+
envelopeRepaired.length === 0 &&
|
|
295
|
+
!envelopeTruncated &&
|
|
296
|
+
turnContent.length > 0) {
|
|
297
|
+
const miss = findUnrecognizedToolEnvelope(turnContent, knownToolNames);
|
|
298
|
+
unknownCall = miss;
|
|
299
|
+
if (miss) {
|
|
300
|
+
turnContent = stripJsonEnvelopesFromText(turnContent, [
|
|
301
|
+
{ matchStart: miss.matchStart, matchEnd: miss.matchEnd },
|
|
302
|
+
]);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
// Truncation-with-partial-args salvage. When the model started
|
|
306
|
+
// a write-shaped call (`write_file`, `write_artifact`,
|
|
307
|
+
// `append_to_file`) but the stream ended mid-content, promote
|
|
308
|
+
// the partial body to a synthesized tool_call so the bytes
|
|
309
|
+
// we DID receive land on disk — and tag the call id as
|
|
310
|
+
// truncated so the tool-result auto-continuation hint below
|
|
311
|
+
// tells the model to issue `append_to_file` for the missing
|
|
312
|
+
// tail. Shared logic with Ollama + llama-cpp providers via
|
|
313
|
+
// {@link salvageWriteShapedTruncation}.
|
|
314
|
+
//
|
|
315
|
+
// Gating: only fires when NO other salvage produced a call
|
|
316
|
+
// for this iteration (otherwise we'd double-fire the same
|
|
317
|
+
// intent).
|
|
318
|
+
const truncatedSalvage = [];
|
|
319
|
+
if (structuredCalls.length === 0 &&
|
|
320
|
+
repairedCalls.length === 0 &&
|
|
321
|
+
proseRepaired.length === 0 &&
|
|
322
|
+
xmlTagRepaired.length === 0 &&
|
|
323
|
+
claudeInvokeRepaired.length === 0 &&
|
|
324
|
+
glmRepaired.length === 0 &&
|
|
325
|
+
hermesRepaired.length === 0 &&
|
|
326
|
+
shellRepaired.length === 0 &&
|
|
327
|
+
envelopeRepaired.length === 0 &&
|
|
328
|
+
turnContent.length > 0) {
|
|
329
|
+
const salvage = salvageWriteShapedTruncation(turnContent, knownToolNames, `truncated-salvage-mlx-${seq}-${turn}`);
|
|
330
|
+
if (salvage.synthesizedCall) {
|
|
331
|
+
const s = salvage.synthesizedCall;
|
|
332
|
+
truncatedSalvage.push({
|
|
333
|
+
id: s.id,
|
|
334
|
+
type: 'function',
|
|
335
|
+
function: {
|
|
336
|
+
name: s.name,
|
|
337
|
+
arguments: JSON.stringify(s.argsObject),
|
|
338
|
+
},
|
|
339
|
+
});
|
|
340
|
+
truncatedCallIds.add(s.id);
|
|
341
|
+
log.info(`turn#${seq}.${turn} salvaged truncated ${s.name} call (path=${s.argsObject.path}, partial=${s.argsObject.content.length} bytes) — continuation hint will fire on the tool result`);
|
|
342
|
+
turnContent = salvage.strippedContent;
|
|
343
|
+
// Clear envelopeTruncated so the post-loop warning path
|
|
344
|
+
// doesn't ALSO fire — we've handled this truncation as a
|
|
345
|
+
// real salvage now.
|
|
346
|
+
envelopeTruncated = null;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
// Bare `invoke NAME {json}` — a weak-model prose shape (wild-caught
|
|
350
|
+
// on gemma4-e2b-q4/MLX) that no earlier layer recognizes: the model
|
|
351
|
+
// never emits Gemma's `<|tool_call>` trigger so the grammar can't
|
|
352
|
+
// engage, and it narrates the call as `invoke write_file {…}` instead.
|
|
353
|
+
// Last-resort salvage, gated on nothing else having fired.
|
|
354
|
+
const bareInvokeRepaired = [];
|
|
355
|
+
if (structuredCalls.length === 0 &&
|
|
356
|
+
repairedCalls.length === 0 &&
|
|
357
|
+
proseRepaired.length === 0 &&
|
|
358
|
+
xmlTagRepaired.length === 0 &&
|
|
359
|
+
claudeInvokeRepaired.length === 0 &&
|
|
360
|
+
glmRepaired.length === 0 &&
|
|
361
|
+
hermesRepaired.length === 0 &&
|
|
362
|
+
shellRepaired.length === 0 &&
|
|
363
|
+
envelopeRepaired.length === 0 &&
|
|
364
|
+
truncatedSalvage.length === 0 &&
|
|
365
|
+
codeBlockRepaired.length === 0 &&
|
|
366
|
+
turnContent.length > 0) {
|
|
367
|
+
const bareSpans = findBareInvokeToolCallSpans(turnContent, knownToolNames);
|
|
368
|
+
for (const [idx, parsed] of bareSpans.entries()) {
|
|
369
|
+
bareInvokeRepaired.push({
|
|
370
|
+
id: `bare-invoke-repair-${seq}-${turn}-${idx}`,
|
|
371
|
+
type: 'function',
|
|
372
|
+
function: {
|
|
373
|
+
name: parsed.name,
|
|
374
|
+
arguments: JSON.stringify(parsed.arguments),
|
|
375
|
+
},
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
if (bareSpans.length > 0) {
|
|
379
|
+
turnContent = stripBareInvokeToolCallsFromText(turnContent, bareSpans);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
return {
|
|
383
|
+
turnContent,
|
|
384
|
+
proseRepaired,
|
|
385
|
+
xmlTagRepaired,
|
|
386
|
+
claudeInvokeRepaired,
|
|
387
|
+
glmRepaired,
|
|
388
|
+
hermesRepaired,
|
|
389
|
+
shellRepaired,
|
|
390
|
+
envelopeRepaired,
|
|
391
|
+
envelopeTruncated,
|
|
392
|
+
unknownCall,
|
|
393
|
+
truncatedSalvage,
|
|
394
|
+
bareInvokeRepaired,
|
|
395
|
+
};
|
|
396
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { ToolExecutor } from '../tool-executor.js';
|
|
2
|
+
import type { ExternalToolSpec } from '../types.js';
|
|
3
|
+
export interface ChatCompletionTool {
|
|
4
|
+
type: 'function';
|
|
5
|
+
function: {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
parameters: unknown;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface ToolCallDelta {
|
|
12
|
+
index: number;
|
|
13
|
+
id?: string;
|
|
14
|
+
type?: 'function';
|
|
15
|
+
function?: {
|
|
16
|
+
name?: string;
|
|
17
|
+
arguments?: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare const APPEND_TO_FILE_CONTINUATION_TOOL: ChatCompletionTool;
|
|
21
|
+
export declare function chatCompletionToolName(tool: ChatCompletionTool): string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Names of the advertised `tools` the session may call this turn. Differs
|
|
24
|
+
* from the advertised set only under a callable restriction — see
|
|
25
|
+
* `ToolExecutor.isRestrictedFromCalling`. Caller-executed external tools
|
|
26
|
+
* never resolve to a bridge, so they always stay callable.
|
|
27
|
+
*/
|
|
28
|
+
export declare function callableRequestToolNames(tools: readonly ChatCompletionTool[] | undefined, bridges: ToolExecutor): string[];
|
|
29
|
+
/**
|
|
30
|
+
* Narrow the engine's tool grammar to what the session may call while the
|
|
31
|
+
* request keeps advertising every tool: `body.tools` is rendered into the
|
|
32
|
+
* prompt, so narrowing it instead would rewrite the prompt and cost a full
|
|
33
|
+
* re-prefill on an untrimmable cache. No-op without a restriction or a
|
|
34
|
+
* grammar hint.
|
|
35
|
+
*/
|
|
36
|
+
export declare function applyCallableToolGrammar(body: Record<string, unknown>, bridges: ToolExecutor): void;
|
|
37
|
+
/**
|
|
38
|
+
* Required top-level properties absent from one parsed tool call.
|
|
39
|
+
*
|
|
40
|
+
* This deliberately checks presence only. A present-but-wrongly-typed value
|
|
41
|
+
* remains the MCP validator's job; the MLX Hermes grammar promises only that
|
|
42
|
+
* every declared required key is emitted before the call can close. Seeing a
|
|
43
|
+
* missing key is therefore evidence that the live constrained-decoding path
|
|
44
|
+
* broke its own contract, not an ordinary model validation miss.
|
|
45
|
+
*/
|
|
46
|
+
export declare function missingTopLevelRequiredToolArgs(schema: Record<string, unknown> | undefined, args: Record<string, unknown>): string[];
|
|
47
|
+
export declare function hermesRequiredArgGrammarRequested(body: Record<string, unknown>): boolean;
|
|
48
|
+
export declare function validatorReportedMissingRequiredArgs(output: string): boolean;
|
|
49
|
+
/** OpenAI-compatible streaming tool-call accumulator used by the MLX provider. */
|
|
50
|
+
export declare class MlxToolCallAccumulator {
|
|
51
|
+
private readonly byIndex;
|
|
52
|
+
size(): number;
|
|
53
|
+
ingest(delta: ToolCallDelta): void;
|
|
54
|
+
finalize(): Array<{
|
|
55
|
+
id: string;
|
|
56
|
+
type: 'function';
|
|
57
|
+
function: {
|
|
58
|
+
name: string;
|
|
59
|
+
arguments: string;
|
|
60
|
+
};
|
|
61
|
+
}>;
|
|
62
|
+
}
|
|
63
|
+
export declare function toChatCompletionsTools(bridges: ToolExecutor): ChatCompletionTool[];
|
|
64
|
+
/** Caller-executed tools (see `SessionOpts.externalTools`) in the same shape. */
|
|
65
|
+
export declare function externalToolsAsChatCompletions(tools: readonly ExternalToolSpec[] | undefined): ChatCompletionTool[];
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// Minimal `append_to_file` surfaced ONLY during a write-continuation. The
|
|
2
|
+
// base immediate-write surface is write_file-only; on truncation we add
|
|
3
|
+
// this so the model can emit the file's missing tail instead of
|
|
4
|
+
// re-writing the whole thing (which would just truncate again).
|
|
5
|
+
// Constructed inline so it doesn't depend on the role-filtered bridge
|
|
6
|
+
// surface, which deliberately hides append_to_file from builders.
|
|
7
|
+
export const APPEND_TO_FILE_CONTINUATION_TOOL = {
|
|
8
|
+
type: 'function',
|
|
9
|
+
function: {
|
|
10
|
+
name: 'append_to_file',
|
|
11
|
+
description: 'Append text to the END of an existing workspace file. Use this to write the remaining tail of a file whose previous write_file was truncated mid-content. Do not repeat content already on disk — start exactly where the file currently ends.',
|
|
12
|
+
parameters: {
|
|
13
|
+
type: 'object',
|
|
14
|
+
properties: {
|
|
15
|
+
path: { type: 'string', description: 'Workspace-relative path of the file to append to.' },
|
|
16
|
+
content: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'Text appended verbatim at the current end of the file.',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
required: ['path', 'content'],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
export function chatCompletionToolName(tool) {
|
|
26
|
+
return tool.function.name;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Names of the advertised `tools` the session may call this turn. Differs
|
|
30
|
+
* from the advertised set only under a callable restriction — see
|
|
31
|
+
* `ToolExecutor.isRestrictedFromCalling`. Caller-executed external tools
|
|
32
|
+
* never resolve to a bridge, so they always stay callable.
|
|
33
|
+
*/
|
|
34
|
+
export function callableRequestToolNames(tools, bridges) {
|
|
35
|
+
return (tools ?? [])
|
|
36
|
+
.map((tool) => chatCompletionToolName(tool))
|
|
37
|
+
.filter((name) => !!name && !bridges.isRestrictedFromCalling(name));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Narrow the engine's tool grammar to what the session may call while the
|
|
41
|
+
* request keeps advertising every tool: `body.tools` is rendered into the
|
|
42
|
+
* prompt, so narrowing it instead would rewrite the prompt and cost a full
|
|
43
|
+
* re-prefill on an untrimmable cache. No-op without a restriction or a
|
|
44
|
+
* grammar hint.
|
|
45
|
+
*/
|
|
46
|
+
export function applyCallableToolGrammar(body, bridges) {
|
|
47
|
+
const hint = body.tool_grammar;
|
|
48
|
+
if (!bridges.hasCallableRestriction() || !hint || typeof hint !== 'object')
|
|
49
|
+
return;
|
|
50
|
+
if (!Array.isArray(body.tools))
|
|
51
|
+
return;
|
|
52
|
+
body.tool_grammar = {
|
|
53
|
+
...hint,
|
|
54
|
+
allowed_names: callableRequestToolNames(body.tools, bridges),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Required top-level properties absent from one parsed tool call.
|
|
59
|
+
*
|
|
60
|
+
* This deliberately checks presence only. A present-but-wrongly-typed value
|
|
61
|
+
* remains the MCP validator's job; the MLX Hermes grammar promises only that
|
|
62
|
+
* every declared required key is emitted before the call can close. Seeing a
|
|
63
|
+
* missing key is therefore evidence that the live constrained-decoding path
|
|
64
|
+
* broke its own contract, not an ordinary model validation miss.
|
|
65
|
+
*/
|
|
66
|
+
export function missingTopLevelRequiredToolArgs(schema, args) {
|
|
67
|
+
const required = schema?.required;
|
|
68
|
+
if (!Array.isArray(required))
|
|
69
|
+
return [];
|
|
70
|
+
const missing = [];
|
|
71
|
+
for (const key of required) {
|
|
72
|
+
if (typeof key === 'string' &&
|
|
73
|
+
!missing.includes(key) &&
|
|
74
|
+
!Object.prototype.hasOwnProperty.call(args, key)) {
|
|
75
|
+
missing.push(key);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return missing;
|
|
79
|
+
}
|
|
80
|
+
export function hermesRequiredArgGrammarRequested(body) {
|
|
81
|
+
const hint = body.tool_grammar;
|
|
82
|
+
if (!hint || typeof hint !== 'object' || Array.isArray(hint))
|
|
83
|
+
return false;
|
|
84
|
+
const record = hint;
|
|
85
|
+
return (record.format === 'hermes' && (record.mode === undefined || record.mode === 'name-and-params'));
|
|
86
|
+
}
|
|
87
|
+
export function validatorReportedMissingRequiredArgs(output) {
|
|
88
|
+
return /rejected by validator[\s\S]*missing required fields?:/i.test(output);
|
|
89
|
+
}
|
|
90
|
+
/** OpenAI-compatible streaming tool-call accumulator used by the MLX provider. */
|
|
91
|
+
export class MlxToolCallAccumulator {
|
|
92
|
+
byIndex = new Map();
|
|
93
|
+
size() {
|
|
94
|
+
return this.byIndex.size;
|
|
95
|
+
}
|
|
96
|
+
ingest(delta) {
|
|
97
|
+
const idx = delta.index;
|
|
98
|
+
let entry = this.byIndex.get(idx);
|
|
99
|
+
if (!entry) {
|
|
100
|
+
entry = { id: '', name: '', arguments: '' };
|
|
101
|
+
this.byIndex.set(idx, entry);
|
|
102
|
+
}
|
|
103
|
+
if (delta.id)
|
|
104
|
+
entry.id = delta.id;
|
|
105
|
+
if (delta.function?.name)
|
|
106
|
+
entry.name = delta.function.name;
|
|
107
|
+
if (delta.function?.arguments)
|
|
108
|
+
entry.arguments += delta.function.arguments;
|
|
109
|
+
}
|
|
110
|
+
finalize() {
|
|
111
|
+
return Array.from(this.byIndex.entries())
|
|
112
|
+
.sort((a, b) => a[0] - b[0])
|
|
113
|
+
.map(([, v]) => ({
|
|
114
|
+
id: v.id,
|
|
115
|
+
type: 'function',
|
|
116
|
+
function: { name: v.name, arguments: v.arguments },
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
export function toChatCompletionsTools(bridges) {
|
|
121
|
+
return bridges.getOpenAITools().map((tool) => ({
|
|
122
|
+
type: 'function',
|
|
123
|
+
function: {
|
|
124
|
+
name: tool.name,
|
|
125
|
+
description: tool.description,
|
|
126
|
+
parameters: tool.parameters,
|
|
127
|
+
},
|
|
128
|
+
}));
|
|
129
|
+
}
|
|
130
|
+
/** Caller-executed tools (see `SessionOpts.externalTools`) in the same shape. */
|
|
131
|
+
export function externalToolsAsChatCompletions(tools) {
|
|
132
|
+
return (tools ?? []).map((tool) => ({
|
|
133
|
+
type: 'function',
|
|
134
|
+
function: {
|
|
135
|
+
name: tool.name,
|
|
136
|
+
description: tool.description ?? '',
|
|
137
|
+
parameters: tool.parameters,
|
|
138
|
+
},
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Streaming-safe filter for chat-template tool-call markers that leak
|
|
3
|
+
* into mlx_vlm.server's content stream.
|
|
4
|
+
*
|
|
5
|
+
* Gemma 3+ tokenizers emit tool calls with literal special-token text
|
|
6
|
+
* when the chat template doesn't fully consume them. Two open variants
|
|
7
|
+
* have been observed in the wild:
|
|
8
|
+
*
|
|
9
|
+
* `<|tool_call|>` — canonical, what the chat template SHOULD emit
|
|
10
|
+
* `<|tool_call>` — short form, missing the trailing `|>`; appears on
|
|
11
|
+
* tighter quants of Gemma 4 E4B
|
|
12
|
+
*
|
|
13
|
+
* Close has four observed variants: `<tool_call|>`, `</tool_call|>`,
|
|
14
|
+
* `<tool_call>`, `</tool_call>`. We accept all four.
|
|
15
|
+
*
|
|
16
|
+
* mlx_vlm.server still ships a structured `tool_calls` delta when the
|
|
17
|
+
* markers parse cleanly, but ALSO leaks the raw text. The structured
|
|
18
|
+
* call is what we want; the text is noise. Stripped bodies are kept on
|
|
19
|
+
* the side so a second pass can attempt repair (`parseGemmaToolCall`)
|
|
20
|
+
* before falling back to a user-visible warning.
|
|
21
|
+
*
|
|
22
|
+
* Streaming safety: deltas can split markers across chunk boundaries,
|
|
23
|
+
* so we hold back any tail that could be a prefix of any open variant
|
|
24
|
+
* until enough additional bytes arrive to disambiguate. End-of-turn
|
|
25
|
+
* `flush()` drops anything still inside an unclosed marker (treats it
|
|
26
|
+
* as truncated noise).
|
|
27
|
+
*/
|
|
28
|
+
export declare class LeakyToolCallStripper {
|
|
29
|
+
private buffer;
|
|
30
|
+
private inside;
|
|
31
|
+
private currentBody;
|
|
32
|
+
private readonly bodies;
|
|
33
|
+
/**
|
|
34
|
+
* Indices into {@link bodies} that came from an EOS-flush (no
|
|
35
|
+
* `</tool_call>` close marker arrived before the stream ended).
|
|
36
|
+
* Layer 3 reads this to decide whether a successfully-parsed Gemma
|
|
37
|
+
* marker call should also be tagged as truncated — its `content`
|
|
38
|
+
* arg may be partial, in which case the auto-continuation hint
|
|
39
|
+
* should fire on the tool result.
|
|
40
|
+
*/
|
|
41
|
+
private readonly eosFlushedIndices;
|
|
42
|
+
/**
|
|
43
|
+
* Push a streamed chunk and return whatever's safe to emit. Holds
|
|
44
|
+
* back any trailing fragment that could be the start of a marker
|
|
45
|
+
* until enough additional bytes arrive to disambiguate.
|
|
46
|
+
*/
|
|
47
|
+
push(chunk: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* Final drain at end-of-turn. If we're still mid-marker the model
|
|
50
|
+
* never finished closing it — drop the buffered content as noise
|
|
51
|
+
* rather than leak a half-marker.
|
|
52
|
+
*/
|
|
53
|
+
flush(): string;
|
|
54
|
+
/**
|
|
55
|
+
* Bodies of all complete (or unclosed-at-flush) marker spans seen
|
|
56
|
+
* this stream. Surface area for `parseGemmaToolCall`.
|
|
57
|
+
*/
|
|
58
|
+
getStrippedBodies(): readonly string[];
|
|
59
|
+
/**
|
|
60
|
+
* Indices into {@link getStrippedBodies}() that came from an
|
|
61
|
+
* EOS-flush — i.e. the close marker never arrived. Used by the
|
|
62
|
+
* provider's Layer 3 truncation-salvage logic to tag those parsed
|
|
63
|
+
* calls with the continuation-hint behavior even when they parsed
|
|
64
|
+
* successfully (since their string args may be partial).
|
|
65
|
+
*/
|
|
66
|
+
getEosFlushedBodyIndices(): ReadonlySet<number>;
|
|
67
|
+
private drain;
|
|
68
|
+
}
|