@mofeng2223/dsh-claude-provider 0.6.9 → 0.6.11
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/cordis.patch.yml +7 -0
- package/lib/client.js +1631 -966
- package/package.json +4 -4
- package/src/index.js +6 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mofeng2223/dsh-claude-provider",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"description": "Custom Claude provider support for DeepSeek Harness 0.2.
|
|
3
|
+
"version": "0.6.11",
|
|
4
|
+
"description": "Custom Claude provider support for DeepSeek Harness 0.2.3-alpha.2",
|
|
5
5
|
"author": "mofeng2223",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"type": "module",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@deepseek-ai/schemastery": "3.
|
|
27
|
+
"@deepseek-ai/schemastery": "3.20.0-alpha.1",
|
|
28
28
|
"js-yaml": "^4.3.2"
|
|
29
29
|
},
|
|
30
30
|
"exports": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@deepseek-ai/dsh-client-ui-settings-models": "0.2.
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-settings-models": "0.2.3-alpha.2",
|
|
66
66
|
"acorn": "8.19.0",
|
|
67
67
|
"prettier": "3.10.1"
|
|
68
68
|
}
|
package/src/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export const CLAUDE_PROVIDER_TYPE = 'claude-adaptive'
|
|
|
7
7
|
export const CLAUDE_PROVIDER_SETTINGS_NS = 'dsh-claude-provider'
|
|
8
8
|
|
|
9
9
|
export const Config = z.object({
|
|
10
|
+
credentialOnboarding: z.boolean().default(true).volatile(),
|
|
10
11
|
providerTypes: z.dict(z.const(CLAUDE_PROVIDER_TYPE)).default({}).volatile(),
|
|
11
12
|
})
|
|
12
13
|
|
|
@@ -225,7 +226,11 @@ async function discoveryApiKey(ctx, request) {
|
|
|
225
226
|
if (typeof request.apiKey === 'string' && request.apiKey.trim().length > 0) return request.apiKey
|
|
226
227
|
const ref = configuredCredentialRef(ctx, request.provider)
|
|
227
228
|
if (ref === undefined) throw new Error('Claude 模型目录:请先填写 API 密钥')
|
|
228
|
-
const
|
|
229
|
+
const credentials = ctx.get('credentials')
|
|
230
|
+
const environment = ctx.get('launchEnvironment')
|
|
231
|
+
const value = credentials !== undefined
|
|
232
|
+
? (await credentials.resolve(ref))?.value
|
|
233
|
+
: environment !== undefined ? environment.get(ref)?.value : process.env[ref]
|
|
229
234
|
if (typeof value !== 'string' || value.trim().length === 0) {
|
|
230
235
|
throw new Error(`Claude 模型目录:未找到已保存的凭据 ${ref}`)
|
|
231
236
|
}
|