dsh-qoder-connect 0.2.0 → 0.2.2
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.en.md +20 -3
- package/README.md +23 -6
- package/assets/3.png +0 -0
- package/assets/5.png +0 -0
- package/assets/6.png +0 -0
- package/assets/8.png +0 -0
- package/lib/bin.js +1 -1
- package/lib/client.js +367 -204
- package/lib/index.d.ts +8 -10
- package/lib/index.js +32 -175
- package/lib/{variants-DuEgaUad.js → variants-CFI6-cGn.js} +93 -36
- package/package.json +27 -30
package/README.en.md
CHANGED
|
@@ -42,6 +42,10 @@ The *“Qoder sidebar display”* card controls both widgets' visibility and the
|
|
|
42
42
|
|
|
43
43
|

|
|
44
44
|
|
|
45
|
+
### Settings inside the Plugins panel
|
|
46
|
+
|
|
47
|
+
The same Qoder settings card has a second home: sidebar → **Plugins** panel → Installed → the *Qoder 连接器* card. Open the card's detail page and the full configuration sits between the description and the component list — PAT, per-variant switches, context windows, model toggles, check-in and sidebar-quota settings, identical to the *Settings → Plugin settings* card (both surfaces share one configuration). On hosts that do not declare the seat (older DSH), only the Settings entry exists and nothing else changes.
|
|
48
|
+
|
|
45
49
|
### Picking a model in a session
|
|
46
50
|
|
|
47
51
|
Once a PAT is saved, the model picker gains a Qoder group with per-model rate multipliers (`x0.5`, `x0`, …):
|
|
@@ -64,6 +68,8 @@ Each variant card's *Context window* tab lists capacities per model under the *
|
|
|
64
68
|
|
|
65
69
|
Both variant cards provide a *Model Toggles* tab (located between *Context window* and *Credit details*): search models on the fly, toggle individual models on or off, and use *Enable all* / *Disable all* batch buttons; hidden models will not appear in the session model picker.
|
|
66
70
|
|
|
71
|
+

|
|
72
|
+
|
|
67
73
|
### Daily Auto Check-In & Check-In Log
|
|
68
74
|
|
|
69
75
|
Enable daily automatic check-in in the settings card and set each variant's own moment (10:00 UTC+8 by default), then inspect check-in history logs, trigger a manual check-in, or clear logs in the *Check-in log* tab:
|
|
@@ -74,19 +80,30 @@ Enable daily automatic check-in in the settings card and set each variant's own
|
|
|
74
80
|
|
|
75
81
|
Prerequisites:
|
|
76
82
|
|
|
77
|
-
- DSH core `0.1.
|
|
83
|
+
- DSH core `0.1.7-rc.1` or newer (this plugin peers on the `@deepseek-ai/*` `>=0.1.7-rc.1` line);
|
|
78
84
|
- Node.js `^22.19.0 || >=24.0.0` (per `package.json` engines);
|
|
79
85
|
- your own Qoder account and at least one Personal Access Token.
|
|
80
86
|
|
|
81
87
|
```sh
|
|
82
88
|
# From GitHub (recommended)
|
|
83
89
|
dsh plugin --profile web add github:masknull/dsh-qoder-connect
|
|
84
|
-
# Or from npm
|
|
90
|
+
# Or from npm
|
|
85
91
|
dsh plugin --profile web add dsh-qoder-connect
|
|
86
92
|
```
|
|
87
93
|
|
|
88
94
|
Swap the `--profile` value for the profile you use (`web` / `desktop` / `tui`, e.g. `dsh plugin --profile desktop add dsh-qoder-connect`) — data stays inside that profile, so web / desktop / tui never collide. On a terminal-only profile (TUI) there is no browser card: manage the PAT and check status through the bundled CLI instead; the settings card and sidebar widgets require Web or Desktop.
|
|
89
95
|
|
|
96
|
+
> **DSH older than `0.1.7-rc.1`?** Use **[v0.2.0](https://github.com/masknull/dsh-qoder-connect/releases/tag/v0.2.0)** instead — the last release supporting the 0.1.5 line (DSH ≥ `0.1.5-rc.2`):
|
|
97
|
+
>
|
|
98
|
+
> ```sh
|
|
99
|
+
> # From GitHub (recommended, pin the tag)
|
|
100
|
+
> dsh plugin --profile web add github:masknull/dsh-qoder-connect#v0.2.0
|
|
101
|
+
> # Or from npm
|
|
102
|
+
> dsh plugin --profile web add dsh-qoder-connect@0.2.0
|
|
103
|
+
> ```
|
|
104
|
+
>
|
|
105
|
+
> Upgrading from 0.1.5? This release removed the automatic migration of the old host's `settings.yaml`. To carry your old configuration over, migrate through **[v0.1.9](https://github.com/masknull/dsh-qoder-connect/releases/tag/v0.1.9)** (the first release with the data migration) first, then upgrade to this release.
|
|
106
|
+
|
|
90
107
|
## Configuration
|
|
91
108
|
|
|
92
109
|
### Mint a PAT
|
|
@@ -98,7 +115,7 @@ Swap the `--profile` value for the profile you use (`web` / `desktop` / `tui`, e
|
|
|
98
115
|
|
|
99
116
|
### Save it on the card
|
|
100
117
|
|
|
101
|
-
DSH → Settings →
|
|
118
|
+
DSH → Settings → Plugin Settings (插件设置) → the Qoder card: paste the PAT into the password field and press *Save* (*“Validating and saving…”* while it runs). The token is validated against that variant's region first — a refusal saves nothing and the card says *“That PAT was rejected — generate a new one in your account settings and try again.”*. Do this on both cards to run both groups side by side.
|
|
102
119
|
|
|
103
120
|
### Environment-variable fallback
|
|
104
121
|
|
package/README.md
CHANGED
|
@@ -42,6 +42,10 @@
|
|
|
42
42
|
|
|
43
43
|

|
|
44
44
|
|
|
45
|
+
### 插件面板内的设置入口
|
|
46
|
+
|
|
47
|
+
同一张 Qoder 设置卡片还有第二个入口:左侧边栏「插件」面板 → 已安装 → 「Qoder 连接器」卡片,点开卡片详情页,完整设置就挂在插件的描述与组件列表之间(PAT、双区域开关、上下文窗口、模型开关、签到与侧栏额度设置,与「设置 → 插件设置」里完全一致,两处共用同一份配置)。宿主不提供该槽位时(旧版 DSH)只用「设置 → 插件设置」一个入口,功能不受影响。
|
|
48
|
+
|
|
45
49
|
### 会话内选择模型
|
|
46
50
|
|
|
47
51
|
保存 PAT 后,模型选择器出现 Qoder 分组,模型名后跟随价格倍率(`x0.5`、`x0` 等):
|
|
@@ -64,6 +68,8 @@
|
|
|
64
68
|
|
|
65
69
|
两张变体卡片均提供「模型开关」页(位于「上下文窗口」与「额度明细」之间):支持即时搜索模型、单独开启/关闭指定模型,以及全选后一键「批量开启」或「批量关闭」;关闭的模型不会出现在模型选择器中。
|
|
66
70
|
|
|
71
|
+

|
|
72
|
+
|
|
67
73
|
### 每日自动签到与签到日志
|
|
68
74
|
|
|
69
75
|
支持在设置卡片中开启每日自动签到,并自定义各版本的签到时刻(默认 10:00,按 UTC+8);在卡片底部的「签到日志」面板中查看签到流水、立即签到或清空日志:
|
|
@@ -74,19 +80,30 @@
|
|
|
74
80
|
|
|
75
81
|
前置条件:
|
|
76
82
|
|
|
77
|
-
- DSH 核心 `0.1.
|
|
83
|
+
- DSH 核心 `0.1.7-rc.1` 及以上(本插件 peer 依赖 `@deepseek-ai/*` `>=0.1.7-rc.1` 线);
|
|
78
84
|
- Node.js `^22.19.0 || >=24.0.0`(`package.json` engines);
|
|
79
85
|
- 你自己的 Qoder 账号,以及至少一枚个人访问令牌。
|
|
80
86
|
|
|
81
87
|
```sh
|
|
82
88
|
# 从 GitHub 安装(推荐)
|
|
83
89
|
dsh plugin --profile web add github:masknull/dsh-qoder-connect
|
|
84
|
-
#
|
|
90
|
+
# 或从 npm 安装
|
|
85
91
|
dsh plugin --profile web add dsh-qoder-connect
|
|
86
92
|
```
|
|
87
93
|
|
|
88
94
|
按你使用的 profile 换 `--profile` 的值(`web` / `desktop` / `tui`,如 `dsh plugin --profile desktop add dsh-qoder-connect`)。装到哪个 profile,数据就落在哪个 profile 目录里,web / desktop / tui 各自独立。没有浏览器卡片的终端环境(TUI)下依旧可用 CLI 保存 PAT 并驱动模型;设置卡片与侧栏额度卡需要 Web/Desktop 界面。
|
|
89
95
|
|
|
96
|
+
> **DSH 低于 `0.1.7-rc.1`?** 请改用最后一个支持 0.1.5 线的版本 **[v0.2.0](https://github.com/masknull/dsh-qoder-connect/releases/tag/v0.2.0)**(要求 DSH ≥ `0.1.5-rc.2`):
|
|
97
|
+
>
|
|
98
|
+
> ```sh
|
|
99
|
+
> # GitHub(推荐,指定 tag)
|
|
100
|
+
> dsh plugin --profile web add github:masknull/dsh-qoder-connect#v0.2.0
|
|
101
|
+
> # 或从 npm 安装
|
|
102
|
+
> dsh plugin --profile web add dsh-qoder-connect@0.2.0
|
|
103
|
+
> ```
|
|
104
|
+
>
|
|
105
|
+
> 从 0.1.5 升级上来的老用户:本版本已移除旧宿主 `settings.yaml` 的自动迁移;如需保留旧配置,请先经 **[v0.1.9](https://github.com/masknull/dsh-qoder-connect/releases/tag/v0.1.9)**(首个带数据迁移的版本)完成迁移后,再升级本版本。
|
|
106
|
+
|
|
90
107
|
## 配置与使用
|
|
91
108
|
|
|
92
109
|
### 生成 PAT
|
|
@@ -98,7 +115,7 @@ dsh plugin --profile web add dsh-qoder-connect
|
|
|
98
115
|
|
|
99
116
|
### 在卡片上保存
|
|
100
117
|
|
|
101
|
-
DSH → 设置 →
|
|
118
|
+
DSH → 设置 → 插件设置 → Qoder 卡片,展开后把 PAT 粘贴进密码输入框,点「保存」(期间显示「校验并保存中…」)。保存动作会先经 Qoder 校验令牌对该变体的区域有效,失败则不落盘并提示「PAT 无效或已过期 — 请到账号设置重新生成后再试。」两版各填各的卡片即可两组并存。
|
|
102
119
|
|
|
103
120
|
### 环境变量兜底
|
|
104
121
|
|
|
@@ -119,13 +136,13 @@ DSH → 设置 → 插件 → 对应卡片,展开后把 PAT 粘贴进密码输
|
|
|
119
136
|
|
|
120
137
|
```text
|
|
121
138
|
<profile>/.dsh-qoder-connect/
|
|
122
|
-
├── .qoder-auth.json #
|
|
139
|
+
├── .qoder-auth.json # 国内版 PAT({version:2, pat, region, savedAt})
|
|
123
140
|
├── .qoder-global-auth.json # 国际版 PAT
|
|
124
141
|
├── checkin-status.json # 签到状态与历史日志记录
|
|
125
142
|
└── state/
|
|
126
|
-
├── .qoder-catalog.json #
|
|
143
|
+
├── .qoder-catalog.json # 国内版按账号保存的模型目录
|
|
127
144
|
├── .qoder-global-catalog.json
|
|
128
|
-
├── .qoder-probe.json #
|
|
145
|
+
├── .qoder-probe.json # 国内版推理档位探测记录
|
|
129
146
|
├── .qoder-global-probe.json
|
|
130
147
|
├── .qoder-host-heartbeat.json # host 心跳(doctor 判断宿主是否在跑)
|
|
131
148
|
└── .qoder-machine-id # 传输层机器标识种子(不落 ~/.qoder)
|
package/assets/3.png
CHANGED
|
Binary file
|
package/assets/5.png
CHANGED
|
Binary file
|
package/assets/6.png
CHANGED
|
Binary file
|
package/assets/8.png
ADDED
|
Binary file
|
package/lib/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { D as FALLBACK_QODER_MODELS, E as qoderCatalogPath, T as QoderCatalogStore, V as qoderCredentialIdentity, b as createQoderTransport, f as QODER_CONNECT_VERSION, i as variantFor, l as qoderHostHeartbeatPath, m as QoderUpstreamClient, r as QODER_VARIANTS, s as isHeartbeatProcessAlive, t as CHINA_VARIANT, u as readHostHeartbeat, y as validateApiKey, z as QoderCredentialStore } from "./variants-
|
|
2
|
+
import { D as FALLBACK_QODER_MODELS, E as qoderCatalogPath, T as QoderCatalogStore, V as qoderCredentialIdentity, b as createQoderTransport, f as QODER_CONNECT_VERSION, i as variantFor, l as qoderHostHeartbeatPath, m as QoderUpstreamClient, r as QODER_VARIANTS, s as isHeartbeatProcessAlive, t as CHINA_VARIANT, u as readHostHeartbeat, y as validateApiKey, z as QoderCredentialStore } from "./variants-CFI6-cGn.js";
|
|
3
3
|
import { readFile } from "node:fs/promises";
|
|
4
4
|
import { realpathSync } from "node:fs";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|