dsh-strata-sync 0.10.7 → 0.10.8
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 +3 -3
- package/dist/client.js +8 -8
- package/dist/index.js +13 -16
- package/docs/CAPABILITIES.md +1 -1
- package/docs/README.zh-CN.md +3 -3
- package/docs/README.zh-TW.md +3 -3
- package/docs/VALIDATION.md +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ The plugin reads Strata's model information, previews the changes, and updates D
|
|
|
11
11
|
- **Sync model settings:** context window, response output limit, and confirmed input types and reasoning levels.
|
|
12
12
|
- **Align compaction budgets:** update the matching policies in enabled DSH Agent presets.
|
|
13
13
|
- **Control summary length:** edit the supplemental prompt and adjust two target-length ratios.
|
|
14
|
-
- **Sync on startup:** optionally synchronize once
|
|
14
|
+
- **Sync on startup:** optionally synchronize once when DSH starts.
|
|
15
15
|
- **Review and recover:** preview differences, back up settings, and view the last synchronization result.
|
|
16
16
|
|
|
17
17
|
Strata Server is read-only to this plugin. Synchronization does not switch or load server models, change server settings, or send test inference requests. Unconfirmed model capabilities keep their existing DSH values.
|
|
@@ -48,10 +48,10 @@ The main flow appears first: **Check differences → Review changes → Back up
|
|
|
48
48
|
|
|
49
49
|
1. Select your Strata provider and click **Save preferences**.
|
|
50
50
|
2. Click **Check differences** to inspect the loaded model and proposed changes.
|
|
51
|
-
3.
|
|
51
|
+
3. Click **Back up and sync**.
|
|
52
52
|
4. **Start a new conversation** to use the updated model and Agent preset settings.
|
|
53
53
|
|
|
54
|
-
Existing conversations keep their selected model route and preset revision. To make future setup automatic, enable **Automatically sync when DSH starts** and save. This option is off by default and takes effect on the next start; it
|
|
54
|
+
Existing conversations keep their selected model route and preset revision. To make future setup automatic, enable **Automatically sync when DSH starts** and save. This option is off by default and takes effect on the next start; it can run during tasks and does not poll continuously.
|
|
55
55
|
|
|
56
56
|
## Model and output settings
|
|
57
57
|
|
package/dist/client.js
CHANGED
|
@@ -13,9 +13,9 @@ window.__ModuleLoader__.load({
|
|
|
13
13
|
"Server output limit could not be verified.": {"zh-Hant":"無法確認伺服器的輸出上限。","zh-Hans":"无法确认服务器的输出上限。"},
|
|
14
14
|
"Leave blank to use the server output default; if absent or unlimited, use 30% of context, up to 16,384. An explicit override takes priority.": {"zh-Hant":"留空會採用伺服器輸出預設值;未提供或無固定上限時,使用上下文的 30%,最多 16,384。明確填寫的覆寫值優先。","zh-Hans":"留空采用服务器输出默认值;未提供或无固定上限时,使用上下文的 30%,最多 16,384。明确填写的覆盖值优先。"},
|
|
15
15
|
"Strata returned an invalid output limit. Review the server setting before syncing.": {"zh-Hant":"Strata 回傳無效的輸出上限,請先檢查伺服器設定。","zh-Hans":"Strata 返回无效的输出上限,请先检查服务器设置。"},
|
|
16
|
-
"Runs once on the next DSH start
|
|
17
|
-
"zh-Hant": "下次啟動 DSH
|
|
18
|
-
"zh-Hans": "下次启动 DSH
|
|
16
|
+
"Runs once on the next DSH start; no periodic server checks.": {
|
|
17
|
+
"zh-Hant": "下次啟動 DSH 時同步一次,不再定期檢查伺服器。",
|
|
18
|
+
"zh-Hans": "下次启动 DSH 时同步一次,不再定期检查服务器。"
|
|
19
19
|
},
|
|
20
20
|
"Image": {"zh-Hant":"圖片","zh-Hans":"图片"},
|
|
21
21
|
"View mapping": {"zh-Hant":"查看參數對應","zh-Hans":"查看参数映射"},
|
|
@@ -239,9 +239,9 @@ window.__ModuleLoader__.load({
|
|
|
239
239
|
"zh-Hant": "正在載入同步設定…",
|
|
240
240
|
"zh-Hans": "正在加载同步设置…"
|
|
241
241
|
},
|
|
242
|
-
"
|
|
243
|
-
"zh-Hant": "
|
|
244
|
-
"zh-Hans": "
|
|
242
|
+
"A synchronization is applying settings. Please wait.": {
|
|
243
|
+
"zh-Hant": "正在套用同步設定,請稍候。",
|
|
244
|
+
"zh-Hans": "正在应用同步设置,请稍候。"
|
|
245
245
|
},
|
|
246
246
|
"Strata provider": {
|
|
247
247
|
"zh-Hant": "Strata 供應者",
|
|
@@ -511,7 +511,7 @@ REASONING_DEFAULT_CONFLICT: 'The provider default reasoning level is not support
|
|
|
511
511
|
h('style',null,css+workflowCss),
|
|
512
512
|
h('header',null,h('h2',null,'dsh-strata-sync'),h('p',{className:'ss-muted'},t('Sync the model and context budgets from Strata Server to DSH.'))),
|
|
513
513
|
!state&&!loadError&&h('div',{className:'ss-status',role:'status'},t('Loading sync settings...')),
|
|
514
|
-
state?.busy&&h('div',{className:'ss-status',role:'status'},t('
|
|
514
|
+
state?.busy&&h('div',{className:'ss-status',role:'status'},t('A synchronization is applying settings. Please wait.')),
|
|
515
515
|
(error||loadError)&&h('div',{className:'ss-status ss-error',role:'alert'},diagnostic(error||loadError)),
|
|
516
516
|
notice&&h('div',{className:'ss-status',role:'status'},t(notice)),
|
|
517
517
|
conflict&&h('div',{className:'ss-status ss-error'},
|
|
@@ -577,7 +577,7 @@ REASONING_DEFAULT_CONFLICT: 'The provider default reasoning level is not support
|
|
|
577
577
|
h('p',{className:'ss-muted'},t(form.manual?'A manual limit takes priority over the server default and automatic calculation.':'Turn off Follow Strata output limit to enter a manual override.')))),
|
|
578
578
|
h('label',{className:'ss-check'},h('input',{type:'checkbox',checked:form.follow,onChange:e=>edit({follow:e.target.checked}),disabled:pending||!state}),t('Follow the loaded Strata model as the default')),
|
|
579
579
|
h('label',{className:'ss-check'},h('input',{type:'checkbox',checked:form.auto,onChange:e=>edit({auto:e.target.checked}),disabled:pending||!state}),t('Automatically sync when DSH starts')),
|
|
580
|
-
h('p',{className:'ss-muted'},t('Runs once on the next DSH start
|
|
580
|
+
h('p',{className:'ss-muted'},t('Runs once on the next DSH start; no periodic server checks.'))),
|
|
581
581
|
h('details',{className:'ss-card ss-options','data-testid':'summary-target'},
|
|
582
582
|
h('summary',{className:'ss-option-title'},h('span',null,t('Dynamic summary target')),h('span',{className:'ss-badge'},t(form.summaryGuidance?'Enabled':'Optional'))),
|
|
583
583
|
h('label',{className:'ss-check'},h('input',{type:'checkbox','data-testid':'summary-guidance-toggle','aria-label':t('Enable summary guidance'),checked:form.summaryGuidance,onChange:e=>edit({summaryGuidance:e.target.checked}),disabled:pending||!state}),t('Enable summary guidance')),
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import z from '@deepseek-ai/schemastery';
|
|
|
5
5
|
import { discoverStrata, planBudget, StrataSyncError } from './core.mjs';
|
|
6
6
|
import { DEFAULT_SUMMARY_TEMPLATE, validSummaryDivisor, validSummaryTemplate, installSummaryGuidance } from './summary.mjs';
|
|
7
7
|
|
|
8
|
-
export const inject = ['configEditor', 'connection', '
|
|
8
|
+
export const inject = ['configEditor', 'connection', 'credentials', 'agentPresets'];
|
|
9
9
|
export const Config = z.object({
|
|
10
10
|
providerId: z.string().default(''),
|
|
11
11
|
autoSync: z.boolean().default(false),
|
|
@@ -134,10 +134,6 @@ export function apply(ctx, initialConfig) {
|
|
|
134
134
|
if (candidates.length !== 1) refuse('provider-required', 'Choose which existing provider connects to Strata Server.');
|
|
135
135
|
return candidates[0];
|
|
136
136
|
}
|
|
137
|
-
function busy() {
|
|
138
|
-
// DSH 0.2.1-rc.3 reports maintenance as idle while manual compaction can still run.
|
|
139
|
-
return ctx.agents.list().some((agent) => agent.status !== 'idle' || agent.phase?.kind === 'maintenance');
|
|
140
|
-
}
|
|
141
137
|
function refreshSettings() {
|
|
142
138
|
settings = { providerId: '', autoSync: false, followLoadedModel: true, ...entry(PACKAGE).options.config };
|
|
143
139
|
}
|
|
@@ -160,7 +156,8 @@ export function apply(ctx, initialConfig) {
|
|
|
160
156
|
});
|
|
161
157
|
} catch { /* The page remains usable when the required provider is absent. */ }
|
|
162
158
|
return { ...publicSettings(), defaultSummaryPromptTemplate: DEFAULT_SUMMARY_TEMPLATE, settingsRevision: hash(publicSettings()),
|
|
163
|
-
|
|
159
|
+
// UI busy describes a configuration write, never a running Agent task.
|
|
160
|
+
busy: !!writeBarrier, providers, lastPreview, lastApplied, lastError };
|
|
164
161
|
}
|
|
165
162
|
async function credential(providerId, route) {
|
|
166
163
|
if (route.apiKeyEnv) {
|
|
@@ -272,7 +269,7 @@ export function apply(ctx, initialConfig) {
|
|
|
272
269
|
const warnings = [...discovered.warnings ?? [], ...(before.owners.some((owner) => owner.targets.some((target) => target.config.auto === false)) ? ['DSH_AUTO_COMPACTION_DISABLED'] : [])];
|
|
273
270
|
const presetIds = before.owners.flatMap((owner) => owner.presetId ? [owner.presetId] : []);
|
|
274
271
|
const view = { providerId, server: { baseURL: discovered.baseURL, model: discovered.model, warnings }, budget, current, compactions, capabilityEdits, capabilityStatus,
|
|
275
|
-
presetIds, needsNewConversation: presetIds.length > 0, changes, fingerprint, busy:
|
|
272
|
+
presetIds, needsNewConversation: presetIds.length > 0, changes, fingerprint, busy: !!writeBarrier };
|
|
276
273
|
previewSnapshots.set(view, before);
|
|
277
274
|
lastPreview = view;
|
|
278
275
|
lastError = null;
|
|
@@ -302,7 +299,7 @@ export function apply(ctx, initialConfig) {
|
|
|
302
299
|
ensureOpen();
|
|
303
300
|
payload(request, ['fingerprint', 'providerId', 'outputTokens']);
|
|
304
301
|
if (typeof request.fingerprint !== 'string' || !request.fingerprint) refuse('preview-required', 'Preview the proposed changes before applying them.');
|
|
305
|
-
|
|
302
|
+
|
|
306
303
|
const view = await preview({ ...(request.providerId ? { providerId: request.providerId } : {}), ...(own(request, 'outputTokens') ? { outputTokens: request.outputTokens } : {}) });
|
|
307
304
|
ensureOpen();
|
|
308
305
|
if (view.fingerprint !== request.fingerprint) refuse('stale-preview', 'The server or DSH settings changed. Review a fresh preview.');
|
|
@@ -312,7 +309,7 @@ export function apply(ctx, initialConfig) {
|
|
|
312
309
|
lastApplied = appliedSummary(view, null, false);
|
|
313
310
|
return { applied: false, backupPath: null, preview: view };
|
|
314
311
|
}
|
|
315
|
-
|
|
312
|
+
|
|
316
313
|
writeBarrier = new Promise((resolve) => { releaseWrite = resolve; });
|
|
317
314
|
let backupPath;
|
|
318
315
|
const completed = [];
|
|
@@ -320,7 +317,7 @@ export function apply(ctx, initialConfig) {
|
|
|
320
317
|
backupPath = await backup();
|
|
321
318
|
ensureOpen();
|
|
322
319
|
assertSnapshot(before);
|
|
323
|
-
|
|
320
|
+
|
|
324
321
|
const modelId = view.server.model.id;
|
|
325
322
|
const llmNext = clone(before.llm);
|
|
326
323
|
const route = llmNext.providers[view.providerId];
|
|
@@ -354,7 +351,7 @@ export function apply(ctx, initialConfig) {
|
|
|
354
351
|
if (hash(original) === hash(next)) continue;
|
|
355
352
|
await ctx.configEditor.edit(entry(name, id), (current) => {
|
|
356
353
|
ensureOpen();
|
|
357
|
-
|
|
354
|
+
|
|
358
355
|
// ConfigEditor may queue this callback behind another settings edit.
|
|
359
356
|
// Recheck every owner when our first write actually begins.
|
|
360
357
|
if (completed.length === 0) assertSnapshot(before);
|
|
@@ -393,7 +390,7 @@ export function apply(ctx, initialConfig) {
|
|
|
393
390
|
if (typeof request.expectedRevision !== 'string' || request.expectedRevision !== hash(publicSettings())) {
|
|
394
391
|
refuse('stale-settings', 'Sync preferences changed. Reload the latest preferences before saving.');
|
|
395
392
|
}
|
|
396
|
-
|
|
393
|
+
|
|
397
394
|
const next = { ...settings };
|
|
398
395
|
if (own(request, 'providerId')) {
|
|
399
396
|
if (typeof request.providerId !== 'string') refuse('invalid-request', 'Provider must be a string.');
|
|
@@ -432,7 +429,7 @@ export function apply(ctx, initialConfig) {
|
|
|
432
429
|
if (hash(current) !== hash(original) || hash(publicSettings(current)) !== request.expectedRevision) {
|
|
433
430
|
refuse('stale-settings', 'Sync preferences changed while saving. Reload the latest preferences.');
|
|
434
431
|
}
|
|
435
|
-
|
|
432
|
+
|
|
436
433
|
return next;
|
|
437
434
|
});
|
|
438
435
|
settings = next;
|
|
@@ -517,7 +514,7 @@ export function apply(ctx, initialConfig) {
|
|
|
517
514
|
try {
|
|
518
515
|
refreshSettings();
|
|
519
516
|
if (!settings.autoSync) { startup.pending = false; clearInterval(timer); return; }
|
|
520
|
-
if (
|
|
517
|
+
if (inFlight || startup.running) return;
|
|
521
518
|
} catch (error) {
|
|
522
519
|
// The host can withdraw a required entry during reload. Do not leave an
|
|
523
520
|
// unhandled timer rejection or retry an unsupported profile indefinitely.
|
|
@@ -526,7 +523,7 @@ export function apply(ctx, initialConfig) {
|
|
|
526
523
|
clearInterval(timer);
|
|
527
524
|
return;
|
|
528
525
|
}
|
|
529
|
-
//
|
|
526
|
+
// Concurrent sync/disposed attempts keep the one
|
|
530
527
|
// startup operation pending; successful/no-op and terminal errors consume it.
|
|
531
528
|
startup.running = true;
|
|
532
529
|
let deferred = false;
|
|
@@ -548,7 +545,7 @@ export function apply(ctx, initialConfig) {
|
|
|
548
545
|
// edits are rejected as nested HMR transactions. Mirror Hmr.watchConfig():
|
|
549
546
|
// detach only timer creation, while every write still uses ConfigEditor and
|
|
550
547
|
// its normal runExclusive queue. `executing` is a version-specific host seam.
|
|
551
|
-
// This timer only waits for startup readiness
|
|
548
|
+
// This timer only waits for startup readiness; no recurring server polling.
|
|
552
549
|
const createTimer = () => setInterval(() => { void poll(); }, 1_000);
|
|
553
550
|
const executing = ctx.get('hmr')?.executing;
|
|
554
551
|
if (startup.pending) timer = typeof executing?.exit === 'function' ? executing.exit(createTimer) : createTimer();
|
package/docs/CAPABILITIES.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Verified model capabilities
|
|
2
2
|
|
|
3
|
-
Capability synchronization uses the preview, backup, rollback and
|
|
3
|
+
Capability synchronization uses the preview, backup, rollback and coordinated configuration-write workflow. It does not send generation requests or alter Strata Server.
|
|
4
4
|
|
|
5
5
|
## Input types
|
|
6
6
|
|
package/docs/README.zh-CN.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
- **同步模型设置:**上下文窗口、回复输出上限,以及已确认的输入类型和推理等级。
|
|
12
12
|
- **对齐压缩预算:**更新已启用的 DSH Agent 预设中,对应模型的压缩策略。
|
|
13
13
|
- **控制摘要长度:**编辑补充提示词,调整两项目标长度比例。
|
|
14
|
-
- **启动时同步:**可选择在 DSH
|
|
14
|
+
- **启动时同步:**可选择在 DSH 启动后同步一次。
|
|
15
15
|
- **预览与恢复:**检查差异、备份设置,并查看最近一次同步结果。
|
|
16
16
|
|
|
17
17
|
插件只读访问 Strata Server。同步不会切换或加载服务器模型、修改服务器设置,也不会发送测试推理请求。无法确认的模型能力会保留 DSH 原有值。
|
|
@@ -48,10 +48,10 @@ dsh plugin --profile desktop add dsh-strata-sync --registry=https://registry.npm
|
|
|
48
48
|
|
|
49
49
|
1. 选择 Strata 提供方,点击**保存偏好**。
|
|
50
50
|
2. 点击**检查差异**,查看已加载模型与拟修改的设置。
|
|
51
|
-
3.
|
|
51
|
+
3. 点击**备份并同步**。
|
|
52
52
|
4. **开启新对话**,使用更新后的模型与 Agent 预设。
|
|
53
53
|
|
|
54
|
-
已有对话会保留原先选定的模型路由和预设版本。如需自动设置,可勾选**启动 DSH
|
|
54
|
+
已有对话会保留原先选定的模型路由和预设版本。如需自动设置,可勾选**启动 DSH 时自动同步**并保存。此选项默认关闭,下次启动才生效;可在任务执行中同步,不会持续轮询。
|
|
55
55
|
|
|
56
56
|
## 模型与输出设置
|
|
57
57
|
|
package/docs/README.zh-TW.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
- **同步模型設定:**上下文視窗、回覆輸出上限,以及已確認的輸入類型和推理等級。
|
|
12
12
|
- **對齊壓縮預算:**更新已啟用的 DSH Agent 預設中,對應模型的壓縮政策。
|
|
13
13
|
- **控制摘要長度:**編輯補充提示詞,調整兩項目標長度比例。
|
|
14
|
-
- **啟動時同步:**可選擇在 DSH
|
|
14
|
+
- **啟動時同步:**可選擇在 DSH 啟動後同步一次。
|
|
15
15
|
- **預覽與復原:**檢查差異、備份設定,並查看最近一次同步結果。
|
|
16
16
|
|
|
17
17
|
外掛僅以唯讀方式存取 Strata Server。同步不會切換或載入伺服器模型、修改伺服器設定,也不會傳送測試推論請求。無法確認的模型能力會保留 DSH 原有值。
|
|
@@ -48,10 +48,10 @@ dsh plugin --profile desktop add dsh-strata-sync --registry=https://registry.npm
|
|
|
48
48
|
|
|
49
49
|
1. 選擇 Strata 提供方,點選**儲存偏好**。
|
|
50
50
|
2. 點選**檢查差異**,查看已載入模型與預計修改的設定。
|
|
51
|
-
3.
|
|
51
|
+
3. 點選**備份並同步**。
|
|
52
52
|
4. **開啟新對話**,使用更新後的模型與 Agent 預設。
|
|
53
53
|
|
|
54
|
-
既有對話會保留原先選定的模型路由和預設版本。如需自動設定,可勾選**啟動 DSH
|
|
54
|
+
既有對話會保留原先選定的模型路由和預設版本。如需自動設定,可勾選**啟動 DSH 時自動同步**並儲存。此選項預設關閉,下次啟動才生效;可在任務執行中同步,不會持續輪詢。
|
|
55
55
|
|
|
56
56
|
## 模型與輸出設定
|
|
57
57
|
|
package/docs/VALIDATION.md
CHANGED
|
@@ -11,12 +11,13 @@ Validation date: 2026-10-30 (Asia/Taipei).
|
|
|
11
11
|
|
|
12
12
|
## Automated verification
|
|
13
13
|
|
|
14
|
-
All **
|
|
14
|
+
All **160 automated tests pass** for the current runtime. Coverage includes:
|
|
15
15
|
|
|
16
16
|
- 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.
|
|
17
17
|
- Native Cordis waterfall dispatch, immutable messages, concurrent summaries, duplicate hooks, cancellation, metadata failures, early stream closure, native errors and unload.
|
|
18
18
|
- Verified model discovery, selected-provider/loaded-model matching, alias validation, input types, model-specific reasoning choices and eight mocked SDK wire cases.
|
|
19
|
-
- Preference validation,
|
|
19
|
+
- Preference validation, synchronization write guards, stale-preview rejection, concurrent edits, backup and rollback, startup synchronization, hot reload and enabled Agent preset policies.
|
|
20
|
+
- 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.
|
|
20
21
|
- Three-language settings rendering, editable prompt preservation, custom divisors, preview ceilings, default-off behavior and preference conflicts.
|
|
21
22
|
|
|
22
23
|
The package verifier checks the public file list, English root README selection, translated documentation links, entry points, source/build consistency and publishing metadata. It excludes private configuration, user conversations, credentials, backups and the native-prompt test fixture from the public package.
|