dsh-keys-manager 0.2.3 → 0.2.5

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/locale/en.json CHANGED
@@ -46,6 +46,16 @@
46
46
  "transportStatusSignedOut": "Not signed in",
47
47
  "transportRemoveTitle": "Remove the {name} transport account?",
48
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
+ "transportModels": "Models",
50
+ "transportModelsAll": "All models",
51
+ "transportModelsSelected": "{n} of {total} selected",
52
+ "transportModelsLoading": "Loading models…",
53
+ "transportModelsClear": "Clear selection",
54
+ "transportModelsHint": "Leave every model unchecked to use the full catalog; saving narrows the list this route advertises.",
55
+ "transportModelsMissingCatalog": "The installed transport build ships no model catalog for this route; the list stays empty until dsh-llm-omp-transports is rebuilt or upgraded.",
49
56
  "filterGroup": "Filters",
50
- "transportEmpty": "No transport accounts yet."
57
+ "transportEmpty": "No transport accounts yet.",
58
+ "signInAgain": "Sign in again",
59
+ "loginPasteHint": "Paste the full URL from your browser address bar, or just the authorization code.",
60
+ "loginReveal": "Show pasted code"
51
61
  }
package/locale/zh.json CHANGED
@@ -46,6 +46,16 @@
46
46
  "transportStatusSignedOut": "未登录",
47
47
  "transportRemoveTitle": "移除 {name} 传输账户?",
48
48
  "transportRemoveBody": "这会从凭证库中删除该传输路由保存的授权,并取消仍在进行的登录;路由自身不会重建它。要恢复服务需要重新登录。",
49
+ "transportModels": "模型",
50
+ "transportModelsAll": "全部模型",
51
+ "transportModelsSelected": "已选 {n}/{total}",
52
+ "transportModelsLoading": "正在加载模型…",
53
+ "transportModelsClear": "清除选择",
54
+ "transportModelsHint": "不勾选任何模型表示使用全部模型;保存后该路由的模型列表随之收窄。",
55
+ "transportModelsMissingCatalog": "已安装的传输构建没有为该路由提供模型目录;列表会一直为空,直到重新构建或升级 dsh-llm-omp-transports。",
49
56
  "filterGroup": "筛选",
50
- "transportEmpty": "还没有传输账户。"
57
+ "transportEmpty": "还没有传输账户。",
58
+ "signInAgain": "重新登录",
59
+ "loginPasteHint": "从浏览器地址栏复制完整 URL,或只粘贴授权码。",
60
+ "loginReveal": "显示粘贴的内容"
51
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-keys-manager",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
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": {
@@ -37,7 +37,9 @@
37
37
  "bundle",
38
38
  "locale",
39
39
  "icon.svg",
40
- "scripts"
40
+ "scripts",
41
+ "!lib/omp-oauth/metafile.json",
42
+ "!scripts/omp-oauth"
41
43
  ],
42
44
  "dsh": {
43
45
  "bundle": {
@@ -72,10 +74,13 @@
72
74
  "react": "^18.2.0"
73
75
  },
74
76
  "dependencies": {
75
- "dsh-llm-omp-transports": "^0.2.3"
77
+ "dsh-llm-omp-transports": "^0.2.5"
76
78
  },
77
79
  "devDependencies": {
78
80
  "@deepseek-ai/cordis": "^4.0.5",
81
+ "@oh-my-pi/pi-ai": "18.12.3",
82
+ "@oh-my-pi/pi-catalog": "18.12.3",
83
+ "@oh-my-pi/pi-utils": "18.12.3",
79
84
  "@types/node": "^22.20.0",
80
85
  "@types/react": "~18.3.31",
81
86
  "esbuild": "^0.28.2",
@@ -86,7 +91,7 @@
86
91
  },
87
92
  "scripts": {
88
93
  "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",
94
+ "build": "node scripts/omp-oauth/build-oauth.mjs && tsc -p tsconfig.build.json && tsc -p tsconfig.client.json && node scripts/build-client.mjs && node scripts/verify-dist.mjs",
90
95
  "build:client": "tsc -p tsconfig.client.json && node scripts/build-client.mjs",
91
96
  "test": "vitest run",
92
97
  "release:prepare": "node scripts/prepare-release.mjs"
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Assert the built package contains every path the bundle manifest and the
3
- * Web module loader resolve at runtime.
3
+ * Web module loader resolve at runtime, and that no runtime artifact carries a
4
+ * build-time omp import.
4
5
  */
5
6
  import { access, readFile } from 'node:fs/promises'
6
7
 
@@ -9,6 +10,7 @@ const REQUIRED = [
9
10
  'lib/index.d.ts',
10
11
  'lib/client.js',
11
12
  'lib/client/index.d.ts',
13
+ 'lib/omp-oauth/oauth.mjs',
12
14
  'bundle/cordis.patch.yml',
13
15
  'locale/en.json',
14
16
  'locale/zh.json',
@@ -27,4 +29,19 @@ const client = await readFile('lib/client.js', 'utf8')
27
29
  if (!client.includes('dsh-keys-manager')) throw new Error('lib/client.js does not identify the bundle')
28
30
  if (!client.includes('__ModuleLoader__')) throw new Error('lib/client.js is not a module-loader bundle')
29
31
 
32
+ // `@oh-my-pi/*` is a build-time pin: it is inlined into `lib/omp-oauth/oauth.mjs`
33
+ // and must never be resolvable from a published file. A specifier that survives
34
+ // the build would fail at the user's machine, not here — so check every module
35
+ // specifier in the shipped runtime files.
36
+ for (const path of ['lib/index.js', 'lib/omp-oauth/oauth.mjs']) {
37
+ const source = await readFile(path, 'utf8')
38
+ for (const match of source.matchAll(/(?:^|[^\w$])(?:from|import)\s*\(?\s*['"]([^'"]+)['"]/g)) {
39
+ const specifier = match[1]
40
+ if (specifier.startsWith('node:')) continue
41
+ if (/^@oh-my-pi\/|^bun:/.test(specifier)) {
42
+ throw new Error(`${path} imports the build-time package ${specifier}`)
43
+ }
44
+ }
45
+ }
46
+
30
47
  console.log(`verified ${REQUIRED.length} artifacts`)