@edge-sky/dsh-oauth-adapter 0.1.2-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.i18n.yaml +2 -2
- package/README.md +27 -4
- package/README.zh.md +28 -4
- package/lib/client.js +581 -8
- package/lib/index.d.ts +7 -3
- package/lib/index.js +82 -78
- package/lib/model-auth.d.ts +8 -0
- package/lib/model-auth.js +48 -0
- package/lib/model-catalog.d.ts +27 -0
- package/lib/model-catalog.js +146 -0
- package/lib/model-discovery.d.ts +22 -0
- package/lib/model-discovery.js +147 -0
- package/lib/model-service.d.ts +64 -0
- package/lib/model-service.js +376 -0
- package/lib/model-types.d.ts +94 -0
- package/lib/model-types.js +25 -0
- package/lib/protocol.d.ts +3 -2
- package/lib/protocol.js +27 -0
- package/lib/types/client/OAuthModelsSection.d.ts +11 -0
- package/lib/types/client/index.d.ts +2 -2
- package/lib/types/client/locales.d.ts +35 -0
- package/lib/types/client/store.d.ts +17 -0
- package/lib/types/client/styles.d.ts +1 -1
- package/lib/types/model-types.d.ts +94 -0
- package/lib/types/protocol.d.ts +3 -2
- package/package.json +86 -43
package/README.i18n.yaml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
# Bilingual-pair consistency record: the git blob hash of each side as of the
|
|
2
2
|
# last confirmed-consistent state. Both languages carry equal authority.
|
|
3
|
-
README.md:
|
|
4
|
-
README.zh.md:
|
|
3
|
+
README.md: 745b055c42ba308b7e9f33819f6c084bad98dda4
|
|
4
|
+
README.zh.md: 6bcdf2437386378d19e0045d8c6397ba65637374
|
package/README.md
CHANGED
|
@@ -13,12 +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
|
-
|
|
17
|
-
|
|
18
|
-
The adapter has only been tested with DSH `0.1.1-rc.2`; compatibility with future versions is not guaranteed.
|
|
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`.
|
|
19
17
|
|
|
20
18
|
## Install
|
|
21
19
|
|
|
20
|
+
For DSH`~v0.1.2-rc.1`
|
|
21
|
+
|
|
22
22
|
```sh
|
|
23
23
|
dsh plugin --profile web add @edge-sky/dsh-oauth-adapter
|
|
24
24
|
```
|
|
@@ -29,16 +29,36 @@ or
|
|
|
29
29
|
npx @deepseek-ai/dsh plugin --profile web add @edge-sky/dsh-oauth-adapter
|
|
30
30
|
```
|
|
31
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
|
+
|
|
32
46
|
Start DSH:
|
|
33
47
|
|
|
34
48
|
```sh
|
|
35
49
|
npx @deepseek-ai/dsh web
|
|
36
50
|
```
|
|
37
51
|
|
|
38
|
-
<img width="
|
|
52
|
+
<img width="2940" height="1766" alt="image" src="https://github.com/user-attachments/assets/cbd98703-ee7a-491b-aa2f-02e42b99f6b9" />
|
|
53
|
+
|
|
54
|
+
|
|
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
|
|
|
@@ -47,3 +67,6 @@ DSH integrates pi-ai through the `@deepseek-ai/dsh-llm-pi-ai` adapter, but does
|
|
|
47
67
|
Because DSH does not currently mount the `ctx.authorization` service, this plugin also mounts it manually.
|
|
48
68
|
|
|
49
69
|
The plugin itself does not manage OAuth credentials or maintain login state. Maybe DSH support this sign-in method in the future; but for now, this plugin lets you enjoy it.
|
|
70
|
+
|
|
71
|
+
If this plugins is has helped you, please give a star for me, or create issues if you have any suggestion~
|
|
72
|
+
|
package/README.zh.md
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
| OpenRouter | 浏览器 PKCE 回调 |
|
|
14
14
|
| xAI | 设备码 |
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
当前仅对 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`
|
|
19
17
|
|
|
20
18
|
## 安装
|
|
21
19
|
|
|
20
|
+
对于 DSH`~v0.1.2-rc.1`
|
|
21
|
+
|
|
22
22
|
```sh
|
|
23
23
|
dsh plugin --profile web add @edge-sky/dsh-oauth-adapter
|
|
24
24
|
```
|
|
@@ -29,17 +29,39 @@ dsh plugin --profile web add @edge-sky/dsh-oauth-adapter
|
|
|
29
29
|
npx @deepseek-ai/dsh plugin --profile web add @edge-sky/dsh-oauth-adapter
|
|
30
30
|
```
|
|
31
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
|
+
|
|
32
47
|
启动 DSH:
|
|
33
48
|
|
|
34
49
|
```sh
|
|
35
50
|
npx @deepseek-ai/dsh web
|
|
36
51
|
```
|
|
37
52
|
|
|
38
|
-
<img width="
|
|
53
|
+
<img width="2940" height="1766" alt="image" src="https://github.com/user-attachments/assets/7f1dc846-9cea-468c-8a1e-27f4fa34a4fe" />
|
|
54
|
+
|
|
39
55
|
|
|
40
56
|
<img width="2270" height="1524" alt="image" src="https://github.com/user-attachments/assets/8007002a-a036-4cf4-b015-d4e50eff25d9" />
|
|
41
57
|
|
|
42
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
|
+
|
|
43
65
|
## 工作原理
|
|
44
66
|
|
|
45
67
|
DSH 通过 `@deepseek-ai/dsh-llm-pi-ai` 适配器接入 pi-ai,但并没有提供 OAuth 的入口。`@edge-sky/dsh-oauth-adapter` 通过 DSH Authorization Service 暴露 pi-ai 已有的 provider 登录流程。浏览器链接、设备码、文本与密码输入、登录方式选择、取消和撤回提示均通过同一套 provider-neutral 传输完成。
|
|
@@ -47,3 +69,5 @@ DSH 通过 `@deepseek-ai/dsh-llm-pi-ai` 适配器接入 pi-ai,但并没有提
|
|
|
47
69
|
由于 DSH 目前并没有挂载`ctx.authorization`服务,因此该插件同时手动对其进行了挂载
|
|
48
70
|
|
|
49
71
|
插件本身并不承担 OAuth 凭证管理与维持登录态的职责,或许将来 DSH 会官方支持这一登录方式,但至少现在你可以通过这个插件体验它
|
|
72
|
+
|
|
73
|
+
如果这个插件帮到了你,还请留下你的小星星,如果有任何建议,欢迎 issues~
|