@edge-sky/dsh-oauth-adapter 0.1.3-rc.0 → 0.1.3-rc.1

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 CHANGED
@@ -13,10 +13,12 @@ An OAuth account page for the DSH Web profile. It supports:
13
13
  | OpenRouter | Browser PKCE callback |
14
14
  | xAI | Device code |
15
15
 
16
- The adapter has only been tested with DSH `0.1.1-rc.2`; compatibility with future versions is need to test.
16
+ dsh-oauth-adapter`>= v0.1.3-rc.0` has been adapted for DSH`v0.1.2-rc.1`; for earlier versions, please use dsh-oauth-adapter `v0.1.2-rc.0`.
17
17
 
18
18
  ## Install
19
19
 
20
+ For DSH`~v0.1.2-rc.1`
21
+
20
22
  ```sh
21
23
  dsh plugin --profile web add @edge-sky/dsh-oauth-adapter
22
24
  ```
@@ -27,6 +29,20 @@ or
27
29
  npx @deepseek-ai/dsh plugin --profile web add @edge-sky/dsh-oauth-adapter
28
30
  ```
29
31
 
32
+ ----
33
+
34
+ For DSH`0.1.1-rc.2`
35
+
36
+ ```sh
37
+ dsh plugin --profile web add @edge-sky/dsh-oauth-adapter@v0.1.2-rc.0
38
+ ```
39
+
40
+ or
41
+
42
+ ```sh
43
+ npx @deepseek-ai/dsh plugin --profile web add @edge-sky/dsh-oauth-adapter@v0.1.2-rc.0
44
+ ```
45
+
30
46
  Start DSH:
31
47
 
32
48
  ```sh
@@ -39,6 +55,10 @@ npx @deepseek-ai/dsh web
39
55
 
40
56
  <img width="2270" height="1524" alt="image" src="https://github.com/user-attachments/assets/e0cc6591-73a4-4e87-9ef6-68950126b290" />
41
57
 
58
+ For models not explicitly listed as supported by the built-in pi-ai, you can add them manually (availability needs to be verified on your own).
59
+
60
+ <img width="774" height="724" alt="PixPin_2026-09-10_11-08-26" src="https://github.com/user-attachments/assets/e3adc9fc-36e6-414f-ae5b-1748ff5e8f70" />
61
+
42
62
 
43
63
  ## How it works
44
64
 
package/README.zh.md CHANGED
@@ -13,10 +13,12 @@
13
13
  | OpenRouter | 浏览器 PKCE 回调 |
14
14
  | xAI | 设备码 |
15
15
 
16
- 当前仅对 DSH`0.1.1-rc.2`进行了测试,其他版本的兼容性需要自行测试
16
+ dsh-oauth-adapter`>= v0.1.3-rc.0` 已适配 DSH`v0.1.2-rc.1`,早期版本请使用 dsh-oauth-adapter`v0.1.2-rc.0`
17
17
 
18
18
  ## 安装
19
19
 
20
+ 对于 DSH`~v0.1.2-rc.1`
21
+
20
22
  ```sh
21
23
  dsh plugin --profile web add @edge-sky/dsh-oauth-adapter
22
24
  ```
@@ -27,6 +29,21 @@ dsh plugin --profile web add @edge-sky/dsh-oauth-adapter
27
29
  npx @deepseek-ai/dsh plugin --profile web add @edge-sky/dsh-oauth-adapter
28
30
  ```
29
31
 
32
+ ----
33
+
34
+ 对于 DSH`0.1.1-rc.2`
35
+
36
+ ```sh
37
+ dsh plugin --profile web add @edge-sky/dsh-oauth-adapter@v0.1.2-rc.0
38
+ ```
39
+
40
+ 或
41
+
42
+ ```sh
43
+ npx @deepseek-ai/dsh plugin --profile web add @edge-sky/dsh-oauth-adapter@v0.1.2-rc.0
44
+ ```
45
+
46
+
30
47
  启动 DSH:
31
48
 
32
49
  ```sh
@@ -39,6 +56,12 @@ npx @deepseek-ai/dsh web
39
56
  <img width="2270" height="1524" alt="image" src="https://github.com/user-attachments/assets/8007002a-a036-4cf4-b015-d4e50eff25d9" />
40
57
 
41
58
 
59
+ 对于内置 pi-ai 未写明支持的模型,支持手动添加(可用性需自行验证)
60
+
61
+ <img width="778" height="723" alt="PixPin_2026-09-10_11-02-42" src="https://github.com/user-attachments/assets/e6b10f86-591d-4801-a758-c8b56c83a18d" />
62
+
63
+
64
+
42
65
  ## 工作原理
43
66
 
44
67
  DSH 通过 `@deepseek-ai/dsh-llm-pi-ai` 适配器接入 pi-ai,但并没有提供 OAuth 的入口。`@edge-sky/dsh-oauth-adapter` 通过 DSH Authorization Service 暴露 pi-ai 已有的 provider 登录流程。浏览器链接、设备码、文本与密码输入、登录方式选择、取消和撤回提示均通过同一套 provider-neutral 传输完成。
@@ -129,6 +129,7 @@ export function materialize(provider, state, catalog = providerFactories[provide
129
129
  requestImageMaxBytes: parsed.requestImageMaxBytes ?? 1048576,
130
130
  retryPolicy: resolveRetryPolicy(parsed.retryPolicy, `oauth-models/${provider}`),
131
131
  configuredMaxTokens: caps,
132
+ modelErrors: new Map(),
132
133
  piProvider,
133
134
  },
134
135
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@edge-sky/dsh-oauth-adapter",
3
3
  "description": "Web OAuth account surface for official DSH authorization flows",
4
- "version": "0.1.3-rc.0",
4
+ "version": "0.1.3-rc.1",
5
5
  "author": {
6
6
  "name": "edge-sky",
7
7
  "url": "https://github.com/edge-sky"
@@ -13,7 +13,6 @@
13
13
  "type": "git",
14
14
  "url": "git+https://github.com/edge-sky/dsh-oauth-adapter.git"
15
15
  },
16
- "packageManager": "pnpm@11.7.0",
17
16
  "engines": {
18
17
  "node": "^22.19.0 || >=24.0.0"
19
18
  },
@@ -45,14 +44,6 @@
45
44
  "lib/**/*.js",
46
45
  "lib/**/*.d.ts"
47
46
  ],
48
- "scripts": {
49
- "build": "tsdown && pnpm run build:host && pnpm run build:client:types",
50
- "build:host": "tsc -p tsconfig.json",
51
- "build:client:types": "tsc -p tsconfig.client.json",
52
- "test": "pnpm run build && vitest run",
53
- "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit",
54
- "prepack": "pnpm run typecheck && pnpm test"
55
- },
56
47
  "license": "MIT",
57
48
  "dsh": {
58
49
  "bundle": {
@@ -69,21 +60,21 @@
69
60
  },
70
61
  "peerDependencies": {
71
62
  "@deepseek-ai/cordis": ">=4.0.2",
72
- "@deepseek-ai/dsh-authorization": ">=0.1.2-rc.1 <0.2.0-0",
73
- "@deepseek-ai/dsh-client-locale": ">=0.1.2-rc.1 <0.2.0-0",
74
- "@deepseek-ai/dsh-client-ui-settings": ">=0.1.2-rc.1 <0.2.0-0",
75
- "@deepseek-ai/dsh-client-ui-slots": ">=0.1.2-rc.1 <0.2.0-0",
76
- "@deepseek-ai/dsh-credentials": ">=0.1.2-rc.1 <0.2.0-0",
77
- "@deepseek-ai/dsh-host-webserver": ">=0.1.2-rc.1 <0.2.0-0",
78
- "@deepseek-ai/dsh-invariants": ">=0.1.2-rc.1 <0.2.0-0",
79
- "@deepseek-ai/dsh-llm": ">=0.1.2-rc.1 <0.2.0-0",
80
- "@deepseek-ai/dsh-llm-pi-ai": ">=0.1.2-rc.1 <0.2.0-0",
81
- "@deepseek-ai/dsh-settings": ">=0.1.2-rc.1 <0.2.0-0",
63
+ "@deepseek-ai/dsh-authorization": ">=0.1.5-rc.2 <0.1.6-0",
64
+ "@deepseek-ai/dsh-client-locale": ">=0.1.5-rc.2 <0.1.6-0",
65
+ "@deepseek-ai/dsh-client-ui-settings": ">=0.1.5-rc.2 <0.1.6-0",
66
+ "@deepseek-ai/dsh-client-ui-slots": ">=0.1.5-rc.2 <0.1.6-0",
67
+ "@deepseek-ai/dsh-credentials": ">=0.1.5-rc.2 <0.1.6-0",
68
+ "@deepseek-ai/dsh-host-webserver": ">=0.1.5-rc.2 <0.1.6-0",
69
+ "@deepseek-ai/dsh-invariants": ">=0.1.5-rc.2 <0.1.6-0",
70
+ "@deepseek-ai/dsh-llm": ">=0.1.5-rc.2 <0.1.6-0",
71
+ "@deepseek-ai/dsh-llm-pi-ai": ">=0.1.5-rc.2 <0.1.6-0",
72
+ "@deepseek-ai/dsh-settings": ">=0.1.5-rc.2 <0.1.6-0",
82
73
  "react": ">=18.2.0",
83
- "@deepseek-ai/dsh-client-ui-settings-models": ">=0.1.2-rc.1 <0.2.0-0",
84
- "@deepseek-ai/dsh-attachment": ">=0.1.2-rc.1 <0.2.0-0",
85
- "@deepseek-ai/dsh-fs": ">=0.1.2-rc.1 <0.2.0-0",
86
- "@deepseek-ai/dsh-client-ui-renderer": ">=0.1.2-rc.1 <0.2.0-0"
74
+ "@deepseek-ai/dsh-client-ui-settings-models": ">=0.1.5-rc.2 <0.1.6-0",
75
+ "@deepseek-ai/dsh-attachment": ">=0.1.5-rc.2 <0.1.6-0",
76
+ "@deepseek-ai/dsh-fs": ">=0.1.5-rc.2 <0.1.6-0",
77
+ "@deepseek-ai/dsh-client-ui-renderer": ">=0.1.5-rc.2 <0.1.6-0"
87
78
  },
88
79
  "peerDependenciesMeta": {
89
80
  "@deepseek-ai/cordis": {
@@ -135,20 +126,20 @@
135
126
  "dependencies": {
136
127
  "@deepseek-ai/schemastery": "^3.18.2",
137
128
  "ws": "^8.18.3",
138
- "@earendil-works/pi-ai": "0.84.4"
129
+ "@earendil-works/pi-ai": "0.85.1"
139
130
  },
140
131
  "devDependencies": {
141
132
  "@deepseek-ai/cordis": "^4.0.2",
142
- "@deepseek-ai/dsh-authorization": "0.1.2-rc.1",
143
- "@deepseek-ai/dsh-client-locale": "0.1.2-rc.1",
144
- "@deepseek-ai/dsh-client-ui-settings": "0.1.2-rc.1",
145
- "@deepseek-ai/dsh-client-ui-slots": "0.1.2-rc.1",
146
- "@deepseek-ai/dsh-credentials": "0.1.2-rc.1",
147
- "@deepseek-ai/dsh-host-webserver": "0.1.2-rc.1",
148
- "@deepseek-ai/dsh-invariants": "0.1.2-rc.1",
149
- "@deepseek-ai/dsh-llm": "0.1.2-rc.1",
150
- "@deepseek-ai/dsh-llm-pi-ai": "0.1.2-rc.1",
151
- "@deepseek-ai/dsh-settings": "0.1.2-rc.1",
133
+ "@deepseek-ai/dsh-authorization": "0.1.5-rc.2",
134
+ "@deepseek-ai/dsh-client-locale": "0.1.5-rc.2",
135
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.5-rc.2",
136
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.5-rc.2",
137
+ "@deepseek-ai/dsh-credentials": "0.1.5-rc.2",
138
+ "@deepseek-ai/dsh-host-webserver": "0.1.5-rc.2",
139
+ "@deepseek-ai/dsh-invariants": "0.1.5-rc.2",
140
+ "@deepseek-ai/dsh-llm": "0.1.5-rc.2",
141
+ "@deepseek-ai/dsh-llm-pi-ai": "0.1.5-rc.2",
142
+ "@deepseek-ai/dsh-settings": "0.1.5-rc.2",
152
143
  "@types/node": "^22.20.0",
153
144
  "@types/react": "~18.3.1",
154
145
  "@types/react-dom": "~18.3.1",
@@ -158,19 +149,44 @@
158
149
  "tsdown": "^0.22.2",
159
150
  "typescript": "^6.0.3",
160
151
  "vitest": "^4.1.8",
161
- "@deepseek-ai/dsh-client-ui-settings-models": "0.1.2-rc.1",
162
- "@deepseek-ai/dsh-attachment": "0.1.2-rc.1",
163
- "@deepseek-ai/dsh-fs": "0.1.2-rc.1",
164
- "@deepseek-ai/dsh-settings-file": "0.1.2-rc.1",
165
- "@deepseek-ai/dsh-credentials-local": "0.1.2-rc.1",
166
- "@deepseek-ai/dsh-client-ui-renderer": "0.1.2-rc.1",
152
+ "@deepseek-ai/dsh-client-ui-settings-models": "0.1.5-rc.2",
153
+ "@deepseek-ai/dsh-attachment": "0.1.5-rc.2",
154
+ "@deepseek-ai/dsh-fs": "0.1.5-rc.2",
155
+ "@deepseek-ai/dsh-settings-file": "0.1.5-rc.2",
156
+ "@deepseek-ai/dsh-credentials-local": "0.1.5-rc.2",
157
+ "@deepseek-ai/dsh-client-ui-renderer": "0.1.5-rc.2",
167
158
  "jsdom": "^26.1.0",
168
- "@deepseek-ai/dsh-client-ui-primitives": "0.1.2-rc.1",
169
- "@deepseek-ai/dsh-client-store": "0.1.2-rc.1",
170
- "@deepseek-ai/dsh-atomic-write": "0.1.2-rc.1",
171
- "@deepseek-ai/dsh-home-paths": "0.1.2-rc.1",
172
- "@deepseek-ai/dsh-launch-environment": "0.1.2-rc.1",
173
- "@deepseek-ai/dsh-session": "0.1.2-rc.1",
174
- "@deepseek-ai/dsh-scope": "0.1.2-rc.1"
159
+ "@deepseek-ai/dsh-client-ui-primitives": "0.1.5-rc.2",
160
+ "@deepseek-ai/dsh-client-store": "0.1.5-rc.2",
161
+ "@deepseek-ai/dsh-atomic-write": "0.1.5-rc.2",
162
+ "@deepseek-ai/dsh-home-paths": "0.1.5-rc.2",
163
+ "@deepseek-ai/dsh-launch-environment": "0.1.5-rc.2",
164
+ "@deepseek-ai/dsh-session": "0.1.5-rc.2",
165
+ "@deepseek-ai/dsh-scope": "0.1.5-rc.2",
166
+ "clsx": "^2.0.0",
167
+ "anser": "^2.3.5",
168
+ "shiki": "^4.3.1",
169
+ "@shikijs/langs": "^4.3.1",
170
+ "mdast-util-from-markdown": "^2.0.3",
171
+ "mdast-util-gfm": "^3.1.0",
172
+ "mdast-util-math": "^3.0.0",
173
+ "micromark-extension-gfm": "^3.0.0",
174
+ "micromark-extension-math": "^3.1.0",
175
+ "micromark-core-commonmark": "^2.0.3",
176
+ "micromark-util-character": "^2.1.1",
177
+ "micromark-util-classify-character": "^2.0.1",
178
+ "micromark-util-symbol": "^2.0.1",
179
+ "micromark-factory-space": "^2.0.1",
180
+ "micromark-util-sanitize-uri": "^2.0.1",
181
+ "katex": "^0.16.47",
182
+ "zustand": "~4.4.7",
183
+ "immer": "^10.1.1"
184
+ },
185
+ "scripts": {
186
+ "build": "tsdown && pnpm run build:host && pnpm run build:client:types",
187
+ "build:host": "tsc -p tsconfig.json",
188
+ "build:client:types": "tsc -p tsconfig.client.json",
189
+ "test": "pnpm run build && vitest run",
190
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit"
175
191
  }
176
- }
192
+ }