dsh-cline-pass 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-cline-pass contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ The Cline Pass routing behavior implemented here (the two routing pipelines, the
26
+ pin encoding for each, upstream channel enumeration, and the failover
27
+ semantics) follows findings published by the MIT-licensed cline-pass-switcher
28
+ project: https://github.com/munmunjaklin458-afk/cline-pass-switcher
package/README.en.md ADDED
@@ -0,0 +1,124 @@
1
+ # dsh-cline-pass
2
+
3
+ Connect [Cline Pass](https://cline.bot/cline-pass) subscription models to the [DeepSeek Harness](https://github.com/deepseek-ai). Install it as a dsh plugin and the models appear in the model list without running a proxy service.
4
+
5
+ ## Features
6
+
7
+ - Use Cline Pass subscription models from dsh
8
+ - Streaming, tool calls, image input, and reasoning
9
+ - Multiple accounts with optional round-robin rotation
10
+ - Probe, test, pin, or exclude upstream channels
11
+ - Automatic failover before the first token
12
+ - Web settings panel and `cline_pass_*` tools
13
+
14
+ ## Requirements
15
+
16
+ - dsh `>= 0.1.2-alpha.3 < 0.2.0`
17
+ - Node.js `>= 20.3`
18
+ - A Cline Pass API key
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ dsh plugin --profile web add dsh-cline-pass
24
+ ```
25
+
26
+ You can also install a local directory or tarball:
27
+
28
+ ```bash
29
+ dsh plugin --profile web add /path/to/dsh-cline-pass
30
+ dsh plugin --profile web add ./dsh-cline-pass-0.1.0.tgz
31
+ ```
32
+
33
+ Restart dsh after installation.
34
+
35
+ ## Configure
36
+
37
+ With the Web profile, open **Settings → Cline Pass** to save and test a key. Keys are stored in the dsh credential store and shown only in masked form.
38
+
39
+ You can also set an environment variable before starting dsh:
40
+
41
+ ```bash
42
+ export CLINE_PASS_API_KEY=sk_xxx
43
+ dsh --profile web
44
+ ```
45
+
46
+ ### Multiple accounts
47
+
48
+ Add accounts in the settings panel and select single-account or round-robin mode. You can also use the tool interface:
49
+
50
+ ```text
51
+ cline_pass_accounts action=add name=main key=sk_xxx
52
+ cline_pass_accounts action=add name=backup key=sk_yyy
53
+ cline_pass_accounts action=mode mode=roundrobin
54
+ ```
55
+
56
+ ### Configuration file
57
+
58
+ To override defaults, add a `cline-pass` section to your profile's `$DSH_HOME/profiles/<name>/cordis.patch.yml`:
59
+
60
+ ```yaml
61
+ - id: cline-pass
62
+ config:
63
+ accountMode: roundrobin
64
+ accounts:
65
+ main:
66
+ apiKeyEnv: CLINE_PASS_MAIN_KEY
67
+ backup:
68
+ apiKeyEnv: CLINE_PASS_BACKUP_KEY
69
+ ```
70
+
71
+ Common settings include `baseURL`, `knownModels`, `models`, `perModel`, `exposeCatalog`, and `historyLimit`. The default gateway is `https://api.cline.bot/api/v1`.
72
+
73
+ ## Upstream channels
74
+
75
+ For a new model, click **Auto-configure** in the panel to probe, validate, and configure channels. Expand a model row to adjust channel order or exclude a channel.
76
+
77
+ You can also run the tools in this order:
78
+
79
+ ```text
80
+ cline_pass_probe model=cline-pass/glm-5.2
81
+ cline_pass_validate model=cline-pass/glm-5.2
82
+ cline_pass_pin model=cline-pass/glm-5.2 upstreams=["alibaba","baseten"] pinMode=preferred
83
+ ```
84
+
85
+ `pinMode` supports `strict` and `preferred`. `preferred` tries channels in order and fails over before the first token when needed. Use `exclude` to block specific channels.
86
+
87
+ ## Tools
88
+
89
+ | Tool | Purpose |
90
+ | --- | --- |
91
+ | `cline_pass_status` | Show route and account status |
92
+ | `cline_pass_models` | List models and channels |
93
+ | `cline_pass_probe` | Probe channels |
94
+ | `cline_pass_validate` | Test each channel |
95
+ | `cline_pass_test` | Verify the current settings |
96
+ | `cline_pass_pin` | Save channel settings |
97
+ | `cline_pass_accounts` | Manage accounts |
98
+ | `cline_pass_history` | Read request history |
99
+
100
+ ## Development
101
+
102
+ ```bash
103
+ npm test
104
+ npm run test:client
105
+ npm run test:mount
106
+ ```
107
+
108
+ Live gateway checks are also available:
109
+
110
+ ```bash
111
+ npm run test:live
112
+ npm run test:live:image
113
+ npm run test:live:reasoning
114
+ ```
115
+
116
+ These commands need a valid Cline Pass key and make a small number of paid requests.
117
+
118
+ ## Acknowledgements
119
+
120
+ Upstream channel and failover behavior was informed by the MIT-licensed [`cline-pass-switcher`](https://github.com/munmunjaklin458-afk/cline-pass-switcher).
121
+
122
+ ## License
123
+
124
+ [MIT](LICENSE)
package/README.md ADDED
@@ -0,0 +1,124 @@
1
+ # dsh-cline-pass
2
+
3
+ 将 [Cline Pass](https://cline.bot/cline-pass) 订阅模型接入 [DeepSeek Harness](https://github.com/deepseek-ai)。安装为 dsh 插件后,模型会直接出现在模型列表中,无需运行代理服务。
4
+
5
+ ## 功能
6
+
7
+ - 使用 Cline Pass 订阅模型
8
+ - 支持流式输出、工具调用、图片和 reasoning
9
+ - 管理多个账号并轮询使用
10
+ - 探测、测试、钉住或排除上游渠道
11
+ - 在首个 token 前自动故障转移
12
+ - 提供 Web 设置面板和 `cline_pass_*` 工具
13
+
14
+ ## 要求
15
+
16
+ - dsh `>= 0.1.2-alpha.3`
17
+ - Node.js `>= 20.3`
18
+ - Cline Pass API Key
19
+
20
+ ## 安装
21
+
22
+ ```bash
23
+ dsh plugin --profile web add dsh-cline-pass
24
+ ```
25
+
26
+ 也可以安装本地目录或 tarball:
27
+
28
+ ```bash
29
+ dsh plugin --profile web add /path/to/dsh-cline-pass
30
+ dsh plugin --profile web add ./dsh-cline-pass-0.1.0.tgz
31
+ ```
32
+
33
+ 安装后重启 dsh。
34
+
35
+ ## 配置
36
+
37
+ Web profile 可以在 **设置 → Cline Pass** 中保存和测试 Key。Key 会存入 dsh 凭据库,界面只显示掩码。
38
+
39
+ 也可以在启动 dsh 前设置环境变量:
40
+
41
+ ```bash
42
+ export CLINE_PASS_API_KEY=sk_xxx
43
+ dsh --profile web
44
+ ```
45
+
46
+ ### 多账号
47
+
48
+ 在设置面板中添加账号,并选择单账号或轮询模式。也可以调用工具:
49
+
50
+ ```text
51
+ cline_pass_accounts action=add name=main key=sk_xxx
52
+ cline_pass_accounts action=add name=backup key=sk_yyy
53
+ cline_pass_accounts action=mode mode=roundrobin
54
+ ```
55
+
56
+ ### 配置文件
57
+
58
+ 需要覆盖默认值时,在 profile 的 `$DSH_HOME/profiles/<name>/cordis.patch.yml` 中添加:
59
+
60
+ ```yaml
61
+ - id: cline-pass
62
+ config:
63
+ accountMode: roundrobin
64
+ accounts:
65
+ main:
66
+ apiKeyEnv: CLINE_PASS_MAIN_KEY
67
+ backup:
68
+ apiKeyEnv: CLINE_PASS_BACKUP_KEY
69
+ ```
70
+
71
+ 常用设置包括 `baseURL`、`knownModels`、`models`、`perModel`、`exposeCatalog` 和 `historyLimit`。默认网关地址为 `https://api.cline.bot/api/v1`。
72
+
73
+ ## 上游渠道
74
+
75
+ 首次使用模型时,可以在面板点击 **一键配置**,自动探测、校验和配置渠道。展开模型行可调整渠道顺序或排除渠道。
76
+
77
+ 也可以按以下顺序调用工具:
78
+
79
+ ```text
80
+ cline_pass_probe model=cline-pass/glm-5.2
81
+ cline_pass_validate model=cline-pass/glm-5.2
82
+ cline_pass_pin model=cline-pass/glm-5.2 upstreams=["alibaba","baseten"] pinMode=preferred
83
+ ```
84
+
85
+ `pinMode` 支持 `strict` 和 `preferred`。`preferred` 会按顺序尝试渠道,并在首个 token 前失败时自动切换。`exclude` 可排除指定渠道。
86
+
87
+ ## 工具
88
+
89
+ | 工具 | 用途 |
90
+ | --- | --- |
91
+ | `cline_pass_status` | 查看路由和账号状态 |
92
+ | `cline_pass_models` | 查看模型和渠道 |
93
+ | `cline_pass_probe` | 探测渠道 |
94
+ | `cline_pass_validate` | 测试每个渠道 |
95
+ | `cline_pass_test` | 验证当前设置 |
96
+ | `cline_pass_pin` | 保存渠道设置 |
97
+ | `cline_pass_accounts` | 管理账号 |
98
+ | `cline_pass_history` | 查看请求历史 |
99
+
100
+ ## 开发
101
+
102
+ ```bash
103
+ npm test
104
+ npm run test:client
105
+ npm run test:mount
106
+ ```
107
+
108
+ 访问真实网关的测试还包括:
109
+
110
+ ```bash
111
+ npm run test:live
112
+ npm run test:live:image
113
+ npm run test:live:reasoning
114
+ ```
115
+
116
+ 这些命令需要有效的 Cline Pass Key,并会产生少量请求费用。
117
+
118
+ ## 致谢
119
+
120
+ 上游渠道和故障转移行为参考了 MIT 许可的 [`cline-pass-switcher`](https://github.com/munmunjaklin458-afk/cline-pass-switcher)。
121
+
122
+ ## License
123
+
124
+ [MIT](LICENSE)
@@ -0,0 +1,27 @@
1
+ # dsh bundle patch: mounts the self-contained Cline Pass provider.
2
+ #
3
+ # The row is host-plane: it registers an LLM provider route on the harness LLM
4
+ # seam (so `cline-pass/*` models appear to every agent and to the model picker)
5
+ # and registers the `cline_pass_*` management tools in the host tool registry.
6
+ #
7
+ # Defaults are ready to use: base URL https://api.cline.bot/api/v1, one route
8
+ # named `cline-pass`, and the API key read from the CLINE_PASS_API_KEY
9
+ # credential/env. Override any of it in your profile's own
10
+ # $DSH_HOME/profiles/<name>/cordis.patch.yml, which is applied after every
11
+ # bundle layer:
12
+ #
13
+ # - id: cline-pass
14
+ # config:
15
+ # apiKeyEnv: CLINE_PASS_API_KEY
16
+ # accounts:
17
+ # main:
18
+ # displayName: Main account
19
+ # apiKeyEnv: CLINE_PASS_API_KEY
20
+ # backup:
21
+ # displayName: Backup account
22
+ # apiKeyEnv: CLINE_PASS_BACKUP_KEY
23
+ # accountMode: roundrobin
24
+
25
+ - insert:
26
+ - id: cline-pass
27
+ name: dsh-cline-pass