@omdp/dsh-key-fallback 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/lib/index.js +5 -0
  2. package/package.json +2 -1
package/lib/index.js CHANGED
@@ -55,6 +55,7 @@ function apply(ctx) {
55
55
  // 注册 settings 命名空间(官方助手 installSettingsSection,与 dshmarket 同款):
56
56
  // 让客户端 Settings → 插件的 keyed slot(settings.plugin.item, key='key-fallback')
57
57
  // 被 serve 并渲染状态卡。状态卡只读;轮换逻辑仍直接读 settings.yaml(原设计)。
58
+ // 诊断日志:确认注册链路是否真的执行(dsh-err.log 可查)。
58
59
  if (dshSettings && zs) {
59
60
  try {
60
61
  const ns = dshSettings.settingsNamespace(SETTINGS_NS)
@@ -69,9 +70,13 @@ function apply(ctx) {
69
70
  setSource: () => {},
70
71
  onChange: () => {},
71
72
  })
73
+ console.log('[key-fallback] settings namespace registered: ' + SETTINGS_NS)
72
74
  } catch (e) {
75
+ console.log('[key-fallback] settings register FAILED: ' + (e && e.message ? e.message : e))
73
76
  // 命名空间注册失败不影响核心轮换逻辑
74
77
  }
78
+ } else {
79
+ console.log('[key-fallback] settings register SKIPPED (dshSettings=' + (!!dshSettings) + ' zs=' + (!!zs) + ')')
75
80
  }
76
81
 
77
82
  const pools = new Map()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omdp/dsh-key-fallback",
3
3
  "description": "Minimal API key fallback for DeepSeek Harness: on a retryable request error, silently retry the same call with the next key in the pool.",
4
- "version": "1.0.3",
4
+ "version": "1.0.4",
5
5
  "type": "commonjs",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -32,6 +32,7 @@
32
32
  "peerDependencies": {
33
33
  "@deepseek-ai/cordis": "^4.0.1",
34
34
  "@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
35
+ "@deepseek-ai/dsh-settings": "^0.1.0-rc.7 || ^0.1.1-rc.2",
35
36
  "@deepseek-ai/schemastery": "^3.18.1"
36
37
  }
37
38
  }