dsh-strata-sync 0.10.11 → 0.10.12

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/README.md CHANGED
@@ -65,6 +65,8 @@ Existing conversations keep their selected model route and preset revision. To m
65
65
 
66
66
  Keep **Follow Strata output limit** enabled for automatic selection. Turn it off to set a manual override under **Advanced settings**. The preview shows the server default, effective value and source separately.
67
67
 
68
+ Quantization does not change the choices for a verified model family: Qwen3.8 Flash Next offers `off / low / medium / xhigh`; the current DeepSeek Flash template offers `off / low / medium / high / max` and defaults to `high`. Older verified templates keep their supported choices. Sync updates the available choices without changing the selected effort. See [verified capabilities](https://github.com/ethan741205/dsh-strata-sync/blob/main/docs/CAPABILITIES.md).
69
+
68
70
  The fallback follows [Strata's local output formula](https://github.com/Niko1221/Strata/blob/main/apps/host/server/agent/profile.mjs): `max(4096, min(32768, floor(context × 0.3)))`.
69
71
 
70
72
  When synchronizing, the plugin normally sets a 4,096-token summary output cap and compaction headroom. For small windows using calculated output, both are limited to half the remaining conversation budget, rounded down; an 8K window therefore uses 2,048. The effective compaction trigger is the smaller of **80% of context** and **context − response output − headroom**. Recent-content retention is **(context − response output) × 16%**, rounded down. These compaction budgets are calculated by the plugin, not supplied by Strata.
package/dist/client.js CHANGED
@@ -540,7 +540,7 @@ REASONING_DEFAULT_CONFLICT: 'The provider default reasoning level is not support
540
540
  ['missing','unlimited'].includes(preview.server?.model?.outputLimitStatus)&&h('p',{className:'ss-muted'},t('Server has no fixed output limit.')),
541
541
  ['unavailable','unverified'].includes(preview.server?.model?.outputLimitStatus)&&h('p',{className:'ss-muted'},t('Server output limit could not be verified.')),
542
542
  h('p',null,t('Input types'),': ',preview.server?.model?.capabilities?.input?t(preview.server.model.capabilities.input.includes('image')?'Text + image':'Text'):t('Unconfirmed — keep current setting')),
543
- h('p',null,t('Reasoning levels'),': ',preview.capabilityEdits?.reasoningEfforts?Object.keys(preview.capabilityEdits.reasoningEfforts).join(' / '):t('Unconfirmed — keep current setting')),
543
+ h('p',{'data-testid':'reasoning-levels'},t('Reasoning levels'),': ',preview.capabilityEdits?.reasoningEfforts?Object.keys(preview.capabilityEdits.reasoningEfforts).join(' / '):t('Unconfirmed — keep current setting')),
544
544
  preview.capabilityEdits?.reasoningEfforts&&h('p',{className:'ss-muted'},t('Verified template: '),preview.server?.model?.capabilities?.reasoning?.family),
545
545
  h('p',{className:'ss-muted'},t('Only verified capabilities are synchronized. Unknown fields keep their existing values. Reasoning choices do not change the selected effort.')),
546
546
  h('p',{className:'ss-muted'},t('Context source: '),preview.server?.model?.contextSource||t('Server model metadata')),
package/dist/core.mjs CHANGED
@@ -22,6 +22,9 @@ const TEMPLATE_PROFILES = {
22
22
  '6f9bd1f87d9dad376b4c79683934b4254396d826ae514ab0244efa904ce1d1a4': {
23
23
  family: 'DeepSeek-V4.1-Flash', efforts: { off: 'none', low: 'low', high: 'high', max: 'max' },
24
24
  },
25
+ '06cada875e3a04665f9cf47deae9ef32e16ede2c6511205a4031c8b48140d01b': {
26
+ family: 'DeepSeek-V4.1-Flash', efforts: { off: 'none', low: 'low', medium: 'medium', high: 'high', max: 'max' },
27
+ },
25
28
  };
26
29
 
27
30
  export function planModelCapabilities(modalities, evidence = {}) {
@@ -259,7 +262,7 @@ export async function discoverStrata(baseURL, apiKey = '', options = {}) {
259
262
  try {
260
263
  props = await readJSON(`${normalized.slice(0, -3)}/props?model=${encodeURIComponent(selected.id)}`, apiKey, request);
261
264
  evidence = {
262
- verifiedStrata: typeof props.build_info === 'string' && /^Strata \d+\.\d+(?:\.\d+)?(?:\b|$)/u.test(props.build_info),
265
+ verifiedStrata: typeof props.build_info === 'string' && /^Strata (?:ds4-)?\d+\.\d+(?:\.\d+)?(?:\b|$)/u.test(props.build_info),
263
266
  modelMatched: selectedIds.has(props.model_alias),
264
267
  templateHash: typeof props.chat_template === 'string'
265
268
  ? createHash('sha256').update(props.chat_template.replace(/\r\n/g, '\n')).digest('hex') : null,
@@ -8,16 +8,19 @@ The selected `/v1/models` row must explicitly report `architecture.input_modalit
8
8
 
9
9
  ## Reasoning choices
10
10
 
11
- The optional, authenticated `GET /props?model=...` response must identify Strata in `build_info`, match the selected canonical model or one of its validated loaded aliases in `model_alias`, and return a reviewed `chat_template`. Aliases must resolve through `alias_of` to that loaded canonical text model. An alias belonging to another model is not accepted. The SHA-256 fingerprint is calculated after CRLF-to-LF normalization. Names, quantization labels, and a template merely mentioning reasoning are insufficient. Only matching fingerprints enable automatic reasoning synchronization.
11
+ The optional, authenticated `GET /props?model=...` response must identify Strata in `build_info` (including the DeepSeek engine's `Strata ds4-0.1` format), match the selected canonical model or one of its validated loaded aliases in `model_alias`, and return a reviewed `chat_template`. Aliases must resolve through `alias_of` to that loaded canonical text model. An alias belonging to another model is not accepted. The SHA-256 fingerprint is calculated after CRLF-to-LF normalization. Names, quantization labels, and a template merely mentioning reasoning are insufficient. Only matching fingerprints enable automatic reasoning synchronization.
12
12
 
13
13
  | Reviewed template | SHA-256 | DSH selection → template value |
14
14
  |---|---|---|
15
15
  | Qwen3.8-Flash-Next, checked on Huihui v2 UD-IQ4_XS | `12827f24b742ea4e80cdc12dbcf9622227056b9f797252a3149263d4f9aaadce` | `low → low`, `medium → medium`, `xhigh → xhigh` |
16
- | DeepSeek-V4.1-Flash, checked on IST-DAS 2.00 bpw and its Huihui variant | `6f9bd1f87d9dad376b4c79683934b4254396d826ae514ab0244efa904ce1d1a4` | `low → low`, `high → high`, `max → max` |
16
+ | DeepSeek-V4.1-Flash, current served template | `06cada875e3a04665f9cf47deae9ef32e16ede2c6511205a4031c8b48140d01b` | `low → low`, `medium → medium`, `high → high`, `max → max` |
17
+ | DeepSeek-V4.1-Flash, legacy pack template | `6f9bd1f87d9dad376b4c79683934b4254396d826ae514ab0244efa904ce1d1a4` | `low → low`, `high → high`, `max → max` |
17
18
 
18
- Both include `off` as an explicit thinking-disabled choice. The DeepSeek template maps low/high/max to 50/75/100 internally. It does **not** accept the named `medium` level, despite the broader vocabulary accepted by Strata's API parser. Numeric 1–100 efforts are not exposed because DSH's selector uses named levels. No duplicate high/max aliases are added to Qwen.
19
+ Every profile includes `off` as an explicit thinking-disabled choice. The current DeepSeek template maps low/medium/high/max to 50/62/75/100 internally and defaults to high. The legacy template lacks named `medium`; this is a template-version difference, not a quantization policy. Numeric 1–100 efforts are not exposed because DSH's selector uses named levels. No duplicate high/max aliases are added to Qwen.
19
20
 
20
- Inspection date: 2026-10-30. Qwen was read from the running server's `/props`; both DeepSeek tokenizer templates were inspected from installed packs without loading either model. This verifies template support, not model output quality. Template bytes and private configuration are not distributed with the plugin. Any changed or unreviewed template keeps existing reasoning settings, even if its filename is familiar.
21
+ Quantization names do not select effort options. Qwen variants sharing its reviewed template receive `off / low / medium / xhigh`; DeepSeek variants sharing the current served template receive `off / low / medium / high / max`. The same rule applies to Huihui variants. Unknown templates preserve existing settings rather than guessing from a familiar model or quantization label.
22
+
23
+ Inspection date: 2026-10-30. Qwen and the current DeepSeek template were read from the running server's `/props`; the legacy DeepSeek template was inspected from installed packs. The current server reports `Strata ds4-0.1`, the loaded canonical DeepSeek ID, 65,536 context and unlimited default output. Metadata-only discovery was verified against that snapshot. This verifies template support, not model output quality. Template bytes and private configuration are not distributed with the plugin. Any changed or unreviewed template keeps existing reasoning settings, even if its filename is familiar.
21
24
 
22
25
  ## Native DSH dispatch
23
26
 
@@ -65,6 +65,8 @@ dsh plugin --profile desktop add dsh-strata-sync --registry=https://registry.npm
65
65
 
66
66
  保持**输出上限跟随 Strata**开启,即可自动选择。关闭后可在**高级设置**输入手动覆盖值。预览会分别显示服务器默认值、实际应用值及其来源。
67
67
 
68
+ 量化版本不改变已验证模型家族的选项:Qwen3.8 Flash Next 提供 `off / low / medium / xhigh`;当前 DeepSeek Flash 模板提供 `off / low / medium / high / max`,原生默认是 `high`。旧模板仍采用其实际支持的选项;同步只更新可选等级,不改变当前选择。详见[已验证的能力](https://github.com/ethan741205/dsh-strata-sync/blob/main/docs/CAPABILITIES.md)。
69
+
68
70
  自动计算采用 [Strata 官方输出公式](https://github.com/Niko1221/Strata/blob/main/apps/host/server/agent/profile.mjs):`max(4096, min(32768, floor(context × 0.3)))`。
69
71
 
70
72
  同步时,摘要输出上限和压缩余量通常均为 4,096 tokens。小窗口使用自动计算输出时,两者最多为剩余对话预算的一半,向下取整;因此 8K 窗口使用 2,048。实际压缩阈值取**上下文的 80%**与**上下文 − 回复输出预算 − 压缩余量**中的较小值,近期内容保留量为 **(上下文 − 回复输出预算)× 16%**,向下取整。这些压缩预算由插件计算,并非 Strata 提供的设置。
@@ -65,6 +65,8 @@ dsh plugin --profile desktop add dsh-strata-sync --registry=https://registry.npm
65
65
 
66
66
  保持**輸出上限跟隨 Strata**開啟,即可自動選擇。關閉後可在**進階設定**輸入手動覆寫值。預覽會分別顯示伺服器預設值、實際套用值及其來源。
67
67
 
68
+ 量化版本不改變已驗證模型家族的選項:Qwen3.8 Flash Next 提供 `off / low / medium / xhigh`;目前 DeepSeek Flash 範本提供 `off / low / medium / high / max`,原生預設是 `high`。舊範本仍採用其實際支援的選項;同步只更新可選等級,不改變目前選擇。詳見[已驗證的能力](https://github.com/ethan741205/dsh-strata-sync/blob/main/docs/CAPABILITIES.md)。
69
+
68
70
  自動計算採用 [Strata 官方輸出公式](https://github.com/Niko1221/Strata/blob/main/apps/host/server/agent/profile.mjs):`max(4096, min(32768, floor(context × 0.3)))`。
69
71
 
70
72
  同步時,摘要輸出上限和壓縮餘裕通常均為 4,096 tokens。小視窗使用自動計算輸出時,兩者最多為剩餘對話預算的一半,向下取整;因此 8K 視窗使用 2,048。實際壓縮門檻取**上下文的 80%**與**上下文 − 回覆輸出預算 − 壓縮餘裕**中的較小值,近期內容保留量為 **(上下文 − 回覆輸出預算)× 16%**,向下取整。這些壓縮預算由外掛計算,並非 Strata 提供的設定。
@@ -11,13 +11,17 @@ Validation date: 2026-10-30 (Asia/Taipei).
11
11
 
12
12
  ## Automated verification
13
13
 
14
- All **162 automated tests pass** for the current runtime. Coverage includes:
14
+ All **171 automated tests pass** for the current runtime. Coverage includes:
15
+
16
+ - Current DeepSeek recognition accepts the `Strata ds4-0.1` build format and the reviewed served-template fingerprint. Unknown/malformed identities, wrong model aliases and unreviewed templates remain unconfirmed. Both legacy DeepSeek choices and the new `medium` choice are covered.
17
+ - Authenticated metadata-only checks against the running DeepSeek Huihui 2.00 bpw server confirmed 65,536 context, unlimited server output, a 19,660-token fallback, text/image input and `off / low / medium / high / max`, without warnings or configuration changes. No inference request was sent.
18
+ - Qwen and current DeepSeek retain their respective family choices across quantization labels. The three-language UI shows every current DeepSeek option, including `medium`, without introducing Qwen's `xhigh`.
15
19
 
16
20
  - Automatic output matches Strata's 30% formula with a 4,096 floor and 32,768 ceiling. Tests cover 8K through 1M contexts, rounding at the ceiling, unchanged server/manual precedence, valid small-window compaction budgets and all three UI translations. The 8K calculated-output case limits compaction headroom and summary cap to 2,048; 32K and larger retain 4,096.
17
21
 
18
22
  - Actual pi-ai context clamping across multiple input sizes, near-full and exhausted context, independent source length, additional prompt costs, disabled-mode zero discovery and restored native requests.
19
23
  - Native Cordis waterfall dispatch, immutable messages, concurrent summaries, duplicate hooks, cancellation, metadata failures, early stream closure, native errors and unload.
20
- - Verified model discovery, selected-provider/loaded-model matching, alias validation, input types, model-specific reasoning choices and eight mocked SDK wire cases.
24
+ - Verified model discovery, selected-provider/loaded-model matching, alias validation, input types, model-specific reasoning choices and thirteen mocked SDK wire cases. Off sends false thinking flags and omits the effort; other choices send true and their exact native effort name. These cases validate request mapping, not generated-answer quality.
21
25
  - Preference validation, synchronization write guards, stale-preview rejection, concurrent edits, backup and rollback, startup synchronization, hot reload and enabled Agent preset policies.
22
26
  - Synchronization during suspended generation and summary streams, including maintenance status, uses synthetic responses with a mocked ConfigEditor. Requests complete unchanged; simultaneous sync is rejected, new steps wait during writes, and both success and rollback release the barrier. These tests do not exercise a live desktop task or native ConfigEditor reload during a real model stream.
23
27
  - Three-language settings rendering, editable prompt preservation, custom divisors, preview ceilings, default-off behavior and preference conflicts.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-strata-sync",
3
- "version": "0.10.11",
3
+ "version": "0.10.12",
4
4
  "description": "Native DSH settings UI for synchronizing Strata Server models, context and compaction budgets",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",