@edge-sky/dsh-oauth-adapter 0.1.2-rc.0 → 0.1.3-beta.4

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 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: 6e18cc90e25e581abecfbf502af2022922b408d8
4
- README.zh.md: 807ae07ac4b6d42bee91ceac3c874406ecc32ab0
3
+ README.md: c30bed23d84ddcd11616cb323d9698c0105ac0dd
4
+ README.zh.md: e77381a4a09dcf7bdfc88d2ec65d57df894f931b
package/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # dsh-oauth-adapter
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@edge-sky/dsh-oauth-adapter)](https://www.npmjs.com/package/@edge-sky/dsh-oauth-adapter)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@edge-sky/dsh-oauth-adapter)](https://www.npmjs.com/package/@edge-sky/dsh-oauth-adapter)
5
+ [![license](https://img.shields.io/npm/l/@edge-sky/dsh-oauth-adapter)](https://www.npmjs.com/package/@edge-sky/dsh-oauth-adapter)
6
+
3
7
  English | [中文](README.zh.md)
4
8
 
5
9
  An OAuth account page for the DSH Web profile. It supports:
@@ -13,21 +17,19 @@ An OAuth account page for the DSH Web profile. It supports:
13
17
  | OpenRouter | Browser PKCE callback |
14
18
  | xAI | Device code |
15
19
 
16
- Each account is shown only as available when the installed `@deepseek-ai/dsh-llm-pi-ai` actually registers its OAuth flow. This keeps older or differently bundled pi-ai versions fail-closed instead of exposing a login button that cannot work.
17
-
18
- The adapter has only been tested with DSH `0.1.1-rc.2`; compatibility with future versions is not guaranteed.
20
+ This checkout targets DSH `0.2.0-rc.2`. Once an adapter release with the DSH 0.2 peer range is published, install that release. Earlier DSH releases require an earlier adapter release.
19
21
 
20
22
  ## Install
21
23
 
24
+ For DSH `0.2.0-rc.2`, after the compatible adapter release is published:
25
+
22
26
  ```sh
23
27
  dsh plugin --profile web add @edge-sky/dsh-oauth-adapter
24
28
  ```
25
29
 
26
- or
30
+ Or for the official desktop, use `@edge-sky/dsh-oauth-adapter`
27
31
 
28
- ```sh
29
- npx @deepseek-ai/dsh plugin --profile web add @edge-sky/dsh-oauth-adapter
30
- ```
32
+ For DSH `0.1.2-rc.1` through `0.1.5-rc.1`, use an adapter release from the `0.1.3` series. For DSH `0.1.1-rc.2`, use `@edge-sky/dsh-oauth-adapter@0.1.2-rc.0`.
31
33
 
32
34
  Start DSH:
33
35
 
@@ -35,15 +37,24 @@ Start DSH:
35
37
  npx @deepseek-ai/dsh web
36
38
  ```
37
39
 
38
- <img width="2270" height="1524" alt="image" src="https://github.com/user-attachments/assets/78a59190-8029-4c60-bc50-b763312540f7" />
40
+ <img width="2940" height="1766" alt="image" src="https://github.com/user-attachments/assets/cbd98703-ee7a-491b-aa2f-02e42b99f6b9" />
41
+
42
+
39
43
 
40
44
  <img width="2270" height="1524" alt="image" src="https://github.com/user-attachments/assets/e0cc6591-73a4-4e87-9ef6-68950126b290" />
41
45
 
46
+ 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).
47
+
48
+ <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" />
49
+
42
50
 
43
51
  ## How it works
44
52
 
45
53
  DSH integrates pi-ai through the `@deepseek-ai/dsh-llm-pi-ai` adapter, but does not provide an OAuth entry point. `@edge-sky/dsh-oauth-adapter` exposes pi-ai's existing provider login flows through the DSH Authorization Service. Browser links, device codes, text and secret input, method selection, cancellation, and withdrawn prompts all use the same provider-neutral transport.
46
54
 
47
- Because DSH does not currently mount the `ctx.authorization` service, this plugin also mounts it manually.
55
+ The profile patch mounts an authorization fallback when the host does not provide `ctx.authorization`.
56
+
57
+ DSH owns OAuth credentials and login state. This adapter stores model configuration in `dsh-oauth-adapter.modelStore`; see [model migration and recovery](docs/oauth-models.md).
58
+
59
+ If this plugins is has helped you, please give a star for me, or create issues if you have any suggestion~
48
60
 
49
- 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.
package/README.zh.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # dsh-oauth-adapter
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@edge-sky/dsh-oauth-adapter)](https://www.npmjs.com/package/@edge-sky/dsh-oauth-adapter)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@edge-sky/dsh-oauth-adapter)](https://www.npmjs.com/package/@edge-sky/dsh-oauth-adapter)
5
+ [![license](https://img.shields.io/npm/l/@edge-sky/dsh-oauth-adapter)](https://www.npmjs.com/package/@edge-sky/dsh-oauth-adapter)
6
+
3
7
  [English](README.md) | 中文
4
8
 
5
9
  为 DSH Web profile 提供独立的 OAuth 账户页面。当前支持:
@@ -13,21 +17,20 @@
13
17
  | OpenRouter | 浏览器 PKCE 回调 |
14
18
  | xAI | 设备码 |
15
19
 
16
- 只有当当前安装的 `@deepseek-ai/dsh-llm-pi-ai` 确实注册了对应 OAuth 流程时,账户才会显示为可用。这样旧版或采用不同 pi-ai bundle 的 DSH 会安全地禁用登录按钮,而不会暴露无法完成的流程。
17
-
18
- 当前仅对 DSH`0.1.1-rc.2`进行了测试,不保证未来版本的兼容性
20
+ 当前源码面向 DSH `0.2.0-rc.2`。发布声明 DSH 0.2 peer 依赖范围的适配器版本后,请安装该版本。较早的 DSH 版本需使用对应的适配器旧版本。
19
21
 
20
22
  ## 安装
21
23
 
24
+ 对于 DSH `0.2.0-rc.2`:
25
+
22
26
  ```sh
23
27
  dsh plugin --profile web add @edge-sky/dsh-oauth-adapter
24
28
  ```
25
29
 
26
- 或
30
+ 或使用于官方桌面端 `@edge-sky/dsh-oauth-adapter`
27
31
 
28
- ```sh
29
- npx @deepseek-ai/dsh plugin --profile web add @edge-sky/dsh-oauth-adapter
30
- ```
32
+
33
+ 对于 DSH `0.1.2-rc.1` 至 `0.1.5-rc.1`,请使用适配器 `0.1.3` 系列;对于 DSH `0.1.1-rc.2`,请使用 `@edge-sky/dsh-oauth-adapter@0.1.2-rc.0`。
31
34
 
32
35
  启动 DSH:
33
36
 
@@ -35,15 +38,24 @@ npx @deepseek-ai/dsh plugin --profile web add @edge-sky/dsh-oauth-adapter
35
38
  npx @deepseek-ai/dsh web
36
39
  ```
37
40
 
38
- <img width="2270" height="1524" alt="image" src="https://github.com/user-attachments/assets/134ec856-e17b-4800-bb87-069851986d3e" />
41
+ <img width="2940" height="1766" alt="image" src="https://github.com/user-attachments/assets/7f1dc846-9cea-468c-8a1e-27f4fa34a4fe" />
42
+
39
43
 
40
44
  <img width="2270" height="1524" alt="image" src="https://github.com/user-attachments/assets/8007002a-a036-4cf4-b015-d4e50eff25d9" />
41
45
 
42
46
 
47
+ 对于内置 pi-ai 未写明支持的模型,支持手动添加(可用性需自行验证)
48
+
49
+ <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" />
50
+
51
+
52
+
43
53
  ## 工作原理
44
54
 
45
55
  DSH 通过 `@deepseek-ai/dsh-llm-pi-ai` 适配器接入 pi-ai,但并没有提供 OAuth 的入口。`@edge-sky/dsh-oauth-adapter` 通过 DSH Authorization Service 暴露 pi-ai 已有的 provider 登录流程。浏览器链接、设备码、文本与密码输入、登录方式选择、取消和撤回提示均通过同一套 provider-neutral 传输完成。
46
56
 
47
- 由于 DSH 目前并没有挂载`ctx.authorization`服务,因此该插件同时手动对其进行了挂载
57
+ 当宿主未提供 `ctx.authorization` 时,profile patch 会挂载授权服务后备实现。
58
+
59
+ OAuth 凭据和登录状态由 DSH 管理。适配器将模型配置保存在 `dsh-oauth-adapter.modelStore`;参见[模型迁移与恢复](docs/oauth-models.zh.md)。
48
60
 
49
- 插件本身并不承担 OAuth 凭证管理与维持登录态的职责,或许将来 DSH 会官方支持这一登录方式,但至少现在你可以通过这个插件体验它
61
+ 如果这个插件帮到了你,还请留下你的小星星,如果有任何建议,欢迎 issues~