dsh-keys-manager 0.2.1 → 0.2.3
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/CHANGELOG.md +97 -0
- package/README.md +108 -15
- package/README.zh-CN.md +80 -2
- package/bundle/cordis.patch.yml +5 -2
- package/lib/client/styles.d.ts +1 -1
- package/lib/client/types.d.ts +27 -2
- package/lib/client/ui.d.ts +14 -0
- package/lib/client.js +445 -18
- package/lib/domain.d.ts +63 -0
- package/lib/host-types.d.ts +29 -0
- package/lib/index.d.ts +973 -45
- package/lib/index.js +4257 -332
- package/lib/index.js.map +1 -1
- package/lib/providers.js +426 -0
- package/lib/providers.js.map +1 -1
- package/lib/store.js +4 -0
- package/lib/store.js.map +1 -1
- package/locale/en.json +27 -1
- package/locale/zh.json +27 -1
- package/package.json +14 -12
- package/scripts/prepare-release.mjs +431 -154
- package/scripts/verify-install.mjs +156 -0
package/locale/en.json
CHANGED
|
@@ -3,12 +3,26 @@
|
|
|
3
3
|
"title": "Keys Manager",
|
|
4
4
|
"description": "Multiple API keys per provider with sticky sessions, round-robin selection, retry failover, cooldown recovery, and searchable extra providers."
|
|
5
5
|
},
|
|
6
|
+
"filterAll": "All",
|
|
7
|
+
"filterBuiltin": "Built-in",
|
|
8
|
+
"filterPlugin": "Plugin",
|
|
9
|
+
"filterOauth": "OAuth-capable",
|
|
10
|
+
"filterTransport": "Transport",
|
|
11
|
+
"unattributed": "{n} unattributed",
|
|
12
|
+
"unattributedHint": "Stream attempts this route served with no account owner because its ownership read had not landed (or had failed). A failover retry is a new attempt, so one request can be counted more than once. The count clears when a read attributes the route.",
|
|
13
|
+
"managedFilteredEmpty": "No managed providers match the current filter.",
|
|
6
14
|
"addAccount": "Add account",
|
|
7
15
|
"adoptAccountTitle": "Sign in with an OAuth account to use this provider.",
|
|
8
16
|
"accountIdentity": "Account",
|
|
9
17
|
"accountProjected": "Serving provider",
|
|
10
18
|
"accountReauth": "Re-authenticate",
|
|
11
19
|
"accountActivate": "Set active",
|
|
20
|
+
"testKey": "Test",
|
|
21
|
+
"testRunning": "Testing…",
|
|
22
|
+
"testPassed": "Test passed · {ms} ms",
|
|
23
|
+
"testFailed": "Test failed: {error}",
|
|
24
|
+
"testTimedOut": "The test timed out without a result",
|
|
25
|
+
"testFailedUnknown": "The test did not complete and reported no reason",
|
|
12
26
|
"keyStatusEmpty": "No keys",
|
|
13
27
|
"noKeysAccount": "No accounts yet. Add an account to make this provider usable.",
|
|
14
28
|
"loginTitle": "Account sign-in",
|
|
@@ -21,5 +35,17 @@
|
|
|
21
35
|
"loginReady": "Signed in.",
|
|
22
36
|
"deleteAccountTitle": "Delete account “{alias}”?",
|
|
23
37
|
"deleteAccountBody": "This removes the account’s stored OAuth grant from the credential store. If it is the active account, the provider route stops serving it and falls back to its API-key pool; the provider stays managed.",
|
|
24
|
-
"deleteAccountBodyNoKeys": "This removes the account’s stored OAuth grant from the credential store. This route has no API-key pool, so it stops serving requests until an account is signed in again."
|
|
38
|
+
"deleteAccountBodyNoKeys": "This removes the account’s stored OAuth grant from the credential store. This route has no API-key pool, so it stops serving requests until an account is signed in again.",
|
|
39
|
+
"transportProviderHint": "Served by a transport plugin: its credential is managed inside this card.",
|
|
40
|
+
"transportTag": "Transport",
|
|
41
|
+
"transportSignIn": "Sign in",
|
|
42
|
+
"transportExpires": "Expires {time}",
|
|
43
|
+
"transportStatusActive": "Active",
|
|
44
|
+
"transportStatusExpired": "Token expired",
|
|
45
|
+
"transportStatusNeedsReauth": "Sign in again",
|
|
46
|
+
"transportStatusSignedOut": "Not signed in",
|
|
47
|
+
"transportRemoveTitle": "Remove the {name} transport account?",
|
|
48
|
+
"transportRemoveBody": "This removes the grant stored for this transport route from the credential store and cancels a sign-in still in progress; the route does not recreate it. Sign in again to restore service.",
|
|
49
|
+
"filterGroup": "Filters",
|
|
50
|
+
"transportEmpty": "No transport accounts yet."
|
|
25
51
|
}
|
package/locale/zh.json
CHANGED
|
@@ -3,12 +3,26 @@
|
|
|
3
3
|
"title": "密钥管理",
|
|
4
4
|
"description": "为同一个 Provider 配置多个 API Key,支持单会话固定、Round Robin、重试切换、冷却恢复,并提供可搜索的扩展 Provider。"
|
|
5
5
|
},
|
|
6
|
+
"filterAll": "全部",
|
|
7
|
+
"filterBuiltin": "内置",
|
|
8
|
+
"filterPlugin": "插件",
|
|
9
|
+
"filterOauth": "支持 OAuth",
|
|
10
|
+
"filterTransport": "传输",
|
|
11
|
+
"unattributed": "{n} 无归属",
|
|
12
|
+
"unattributedHint": "该路由在归属读取尚未落地(或已失败)期间应答的流尝试数;失败转移重试会各计一次,故单个请求可能被计多次。读取完成归属后清零。",
|
|
13
|
+
"managedFilteredEmpty": "当前筛选下没有已接管的 Provider。",
|
|
6
14
|
"addAccount": "添加账户",
|
|
7
15
|
"adoptAccountTitle": "使用 OAuth 账户登录后即可使用该 Provider。",
|
|
8
16
|
"accountIdentity": "账户",
|
|
9
17
|
"accountProjected": "服务中",
|
|
10
18
|
"accountReauth": "重新认证",
|
|
11
19
|
"accountActivate": "设为当前",
|
|
20
|
+
"testKey": "测试连接",
|
|
21
|
+
"testRunning": "测试中…",
|
|
22
|
+
"testPassed": "连接正常 · {ms} ms",
|
|
23
|
+
"testFailed": "连接失败:{error}",
|
|
24
|
+
"testTimedOut": "测试超时,未收到结果",
|
|
25
|
+
"testFailedUnknown": "测试未完成,未返回原因",
|
|
12
26
|
"keyStatusEmpty": "暂无密钥",
|
|
13
27
|
"noKeysAccount": "还没有账户。添加一个账户后即可使用该 Provider。",
|
|
14
28
|
"loginTitle": "账户登录",
|
|
@@ -21,5 +35,17 @@
|
|
|
21
35
|
"loginReady": "登录成功。",
|
|
22
36
|
"deleteAccountTitle": "删除账户“{alias}”?",
|
|
23
37
|
"deleteAccountBody": "这会从凭证库中删除该账户保存的 OAuth 授权。如果它是当前账户,该 Provider 路由将停用它并回落到 API-key 池;Provider 仍保持接管状态。",
|
|
24
|
-
"deleteAccountBodyNoKeys": "这会从凭证库中删除该账户保存的 OAuth 授权。该路由没有 API-key 池,删除后将停止服务,直到重新登录账户。"
|
|
38
|
+
"deleteAccountBodyNoKeys": "这会从凭证库中删除该账户保存的 OAuth 授权。该路由没有 API-key 池,删除后将停止服务,直到重新登录账户。",
|
|
39
|
+
"transportProviderHint": "该路由由传输插件提供,凭证就在本卡片中管理。",
|
|
40
|
+
"transportTag": "传输",
|
|
41
|
+
"transportSignIn": "登录",
|
|
42
|
+
"transportExpires": "有效期至 {time}",
|
|
43
|
+
"transportStatusActive": "正常",
|
|
44
|
+
"transportStatusExpired": "令牌已过期",
|
|
45
|
+
"transportStatusNeedsReauth": "需重新登录",
|
|
46
|
+
"transportStatusSignedOut": "未登录",
|
|
47
|
+
"transportRemoveTitle": "移除 {name} 传输账户?",
|
|
48
|
+
"transportRemoveBody": "这会从凭证库中删除该传输路由保存的授权,并取消仍在进行的登录;路由自身不会重建它。要恢复服务需要重新登录。",
|
|
49
|
+
"filterGroup": "筛选",
|
|
50
|
+
"transportEmpty": "还没有传输账户。"
|
|
25
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-keys-manager",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Multi-key management for DSH providers: sticky per-session round-robin, retry failover, cooldown recovery, and searchable extra providers.",
|
|
6
6
|
"repository": {
|
|
@@ -54,15 +54,6 @@
|
|
|
54
54
|
]
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
"scripts": {
|
|
58
|
-
"typecheck": "tsc --noEmit && tsc -p tsconfig.client.json --noEmit && tsc -p tsconfig.spec.json --noEmit",
|
|
59
|
-
"build": "tsc -p tsconfig.build.json && tsc -p tsconfig.client.json && node scripts/build-client.mjs && node scripts/verify-dist.mjs",
|
|
60
|
-
"build:client": "tsc -p tsconfig.client.json && node scripts/build-client.mjs",
|
|
61
|
-
"test": "vitest run",
|
|
62
|
-
"release:prepare": "node scripts/prepare-release.mjs",
|
|
63
|
-
"prepare": "pnpm run build",
|
|
64
|
-
"prepack": "pnpm run build"
|
|
65
|
-
},
|
|
66
57
|
"engines": {
|
|
67
58
|
"node": "^22.19 || >=24"
|
|
68
59
|
},
|
|
@@ -80,6 +71,9 @@
|
|
|
80
71
|
"@deepseek-ai/dsh-typert-registry": "^0.2.1-rc.2",
|
|
81
72
|
"react": "^18.2.0"
|
|
82
73
|
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"dsh-llm-omp-transports": "^0.2.3"
|
|
76
|
+
},
|
|
83
77
|
"devDependencies": {
|
|
84
78
|
"@deepseek-ai/cordis": "^4.0.5",
|
|
85
79
|
"@types/node": "^22.20.0",
|
|
@@ -87,6 +81,14 @@
|
|
|
87
81
|
"esbuild": "^0.28.2",
|
|
88
82
|
"react": "^18.3.1",
|
|
89
83
|
"typescript": "^5.9.3",
|
|
90
|
-
"vitest": "^4.1.8"
|
|
84
|
+
"vitest": "^4.1.8",
|
|
85
|
+
"yaml": "^2.9.1"
|
|
86
|
+
},
|
|
87
|
+
"scripts": {
|
|
88
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.client.json --noEmit && tsc -p tsconfig.spec.json --noEmit",
|
|
89
|
+
"build": "tsc -p tsconfig.build.json && tsc -p tsconfig.client.json && node scripts/build-client.mjs && node scripts/verify-dist.mjs",
|
|
90
|
+
"build:client": "tsc -p tsconfig.client.json && node scripts/build-client.mjs",
|
|
91
|
+
"test": "vitest run",
|
|
92
|
+
"release:prepare": "node scripts/prepare-release.mjs"
|
|
91
93
|
}
|
|
92
|
-
}
|
|
94
|
+
}
|