dsh-provider-qoder 0.3.1 → 0.3.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.md CHANGED
@@ -1,18 +1,22 @@
1
- # DSH Qoder Subscription Plugin
1
+ # dsh-provider-qoder
2
+
3
+ [![npm version](https://img.shields.io/npm/v/dsh-provider-qoder.svg?color=blue)](https://www.npmjs.com/package/dsh-provider-qoder)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
5
+ [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
2
6
 
3
7
  English | [简体中文](./README_CN.md)
4
8
 
5
- `dsh-provider-qoder` integrates your Qoder subscription into DeepSeek Harness (DSH), supporting text and image input, streaming text, reasoning content, and tool calls across Global and China Qoder services.
9
+ Use your Qoder subscription in DeepSeek Harness (DSH), supporting multimodality, web search, and tool calls across Global and China Qoder services.
6
10
 
7
11
  The plugin handles authentication and model communication, while tool execution, workspace operations, and permission management are handled by DSH.
8
- This project is a community adapter plugin.
12
+ This project is a community adapter plugin and is not affiliated with Qoder or DeepSeek.
9
13
 
10
14
  ## Features
11
15
 
12
16
  - Configure subscription access via Qoder Personal Access Token (PAT).
13
17
  - Supports both Global (`global`) and China (`china`) services.
14
18
  - Discovers available models for your account, allows selecting enabled models, and displays pricing multipliers and reasoning effort options when reported by the service.
15
- - Supports streaming responses, reasoning content, multimodality, search, tool calls, and multi-turn interactions.
19
+ - Supports multimodality, search, and tool calls.
16
20
  - View account information, quota, and reset dates in Settings.
17
21
 
18
22
  ## Installation
@@ -55,60 +59,23 @@ Fetching models uses the **saved PAT and service region**. If you switch account
55
59
 
56
60
  The model picker refreshes Qoder metadata for enabled models when opened, with a five-minute cache after a successful fetch. When settings are writable, refreshed multipliers and capabilities are also synchronized to the saved catalog shown in **Custom Settings**, without enabling additional models. Failed refreshes retain the last known metadata.
57
61
 
58
- ### 3. View Account & Quota
59
-
60
- Open **Settings → Qoder** to view account and quota details.
61
-
62
- ## FAQ
63
-
64
- ### The plugin fails to start, or credentials cannot be saved
65
-
66
- Ensure you have restarted the profile where the plugin was installed, and that the profile provides the DSH managed credentials service. If prompted that the storage is not writable, a writable credential store needs to be configured on the host side. The plugin does not read PATs from environment variables.
67
-
68
- ### PAT is saved, but model fetching or requests fail
69
-
70
- Verify that the PAT is valid and matches the saved service region. If modified, save first before fetching models. The save action itself does not validate the token. If your account quota is exhausted, you will need to resolve your subscription quota first.
71
-
72
- ### Models remain unavailable after switching regions
73
-
74
- Global and China model catalogs are stored separately. Switching regions does not automatically update your PAT or refetch that region's models; after saving the matching PAT, fetch and save the models for the selected region.
75
-
76
- ### Are requests automatically retried?
77
-
78
- Model-generation retries are managed by DSH. To enable them, the running profile should include `@deepseek-ai/dsh-llm-retry`. The plugin reports empty responses, rate limits, server errors, timeouts, and transport errors using DSH's default retry policy; authentication, invalid requests, cancellations, quota issues, and protocol formatting errors are not retried by default. The Qoder transport may independently retry an idempotent model-catalog, subscriber-profile, or quota read once, but never retries a model-generation POST internally.
79
-
80
- ## Install from Source & Development
81
-
82
- Run in an environment with Git, Node.js, and pnpm installed. Node.js must support the `--experimental-strip-types` and `--test-isolation=none` flags used by the project's test scripts.
62
+ <p align="center">
63
+ <img src="./assets/credentials-settings.png" alt="Qoder credentials and model configuration" width="680" />
64
+ </p>
83
65
 
84
- ```sh
85
- git clone https://github.com/mo-n/dsh-provider-qoder.git
86
- cd dsh-provider-qoder
87
- pnpm install --frozen-lockfile
88
- pnpm run build
89
- ```
90
-
91
- Install the built repository directory into your DSH profile. The path below is a placeholder example; replace it with the actual absolute path:
92
-
93
- ```sh
94
- dsh plugin --profile web add /absolute/path/to/dsh-provider-qoder
95
- ```
96
-
97
- After restarting the profile, follow the configuration steps above. If running the CLI within a DSH source workspace, you can use `pnpm dsh` from that workspace.
98
-
99
- For development, run watch mode in the plugin directory:
66
+ ### 3. View Account & Quota
100
67
 
101
- ```sh
102
- pnpm run dev
103
- ```
68
+ Open **Settings → Qoder** to view account and quota details, and configure the web search policy as needed:
104
69
 
105
- Before committing changes, run:
70
+ <p align="center">
71
+ <img src="./assets/account-quota.png" alt="Qoder account quota and search settings" width="650" />
72
+ </p>
106
73
 
107
- ```sh
108
- pnpm run check
109
- ```
74
+ ## Upcoming Features
110
75
 
111
- This command runs non-UI mocked tests, builds the ESM package and type declarations, checks build artifacts, and previews the package tarball without sending real Qoder model requests or publishing npm packages.
76
+ - [ ] Context window tier switching
77
+ - [ ] Request rate-limiting queue mechanism
78
+ - [ ] Connect with Qoder's Protobuf protocol
112
79
 
113
80
  ## References
114
81
 
package/README_CN.md CHANGED
@@ -1,18 +1,24 @@
1
- # DSH Qoder 订阅插件
1
+ # dsh-provider-qoder
2
+
3
+ [![npm version](https://img.shields.io/npm/v/dsh-provider-qoder.svg?color=blue)](https://www.npmjs.com/package/dsh-provider-qoder)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
5
+ [![DSH Plugin](https://img.shields.io/badge/DSH-Plugin-6f42c1.svg)](https://github.com/mo-n/dsh-provider-qoder)
6
+ [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
7
+
2
8
 
3
9
  [English](./README.md) | 简体中文
4
10
 
5
- `dsh-provider-qoder` 将你的 Qoder 订阅接入 DeepSeek Harness(DSH),支持文本与图片输入、流式文本、推理内容和工具调用,可选择国际版或中国区 Qoder 服务。
11
+ 在 DeepSeek Harness(DSH) 中使用 Qoder 订阅,支持多模态、联网搜索和工具调用,可选择国际版或中国区 Qoder 服务。
6
12
 
7
13
  插件负责认证和模型通信,工具执行、工作区操作及权限管理由 DSH 负责。
8
- 本项目是社区适配插件。
14
+ 本项目是社区适配插件,与 Qoder、DeepSeek 官方均无关联。
9
15
 
10
16
  ## 功能
11
17
 
12
18
  - 通过 Qoder Personal Access Token(PAT,个人访问令牌)配置订阅访问。
13
19
  - 支持国际版(`global`)和中国区(`china`)服务。
14
20
  - 获取账号可用模型,选择启用的模型,并在服务返回相关信息时显示价格倍率和推理强度选项。
15
- - 支持流式回答、推理内容、多模态、搜索、工具调用及多轮交互。
21
+ - 支持多模态、搜索以及工具调用。
16
22
  - 在设置中查看账号信息、额度和重置时间。
17
23
 
18
24
  ## 安装
@@ -55,60 +61,23 @@ dsh plugin --profile web add dsh-provider-qoder
55
61
 
56
62
  展开模型选择器时会自动刷新已启用 Qoder 模型的元数据,成功获取后缓存 5 分钟。设置可写时,更新后的倍率和能力信息也会同步到**自定义设置**显示的已保存目录,不会自动启用其他模型。刷新失败时保留最近一次成功获取的信息。
57
63
 
58
- ### 3. 查看账号与额度
59
-
60
- 打开 **设置 → Qoder** 查看账号和额度。
61
-
62
- ## 常见问题
63
-
64
- ### 插件无法启动,或凭据无法保存
65
-
66
- 确认已重启安装插件的 profile,且该 profile 提供 DSH 托管凭据服务。如果提示存储不可写,需要在宿主侧配置可写的凭据存储。插件不会从环境变量读取 PAT。
67
-
68
- ### 已保存 PAT,但获取模型或请求失败
69
-
70
- 确认 PAT 有效且与已保存的服务区域匹配。修改后先保存,再获取模型。保存操作本身不会验证令牌。若账号额度已用尽,需先处理订阅额度问题。
71
-
72
- ### 切换区域后,模型仍不可用
73
-
74
- Global 与 China 的模型目录会分别保存。切换区域不会自动替换 PAT,也不会自动重新获取该区域的模型;请先保存匹配区域的 PAT,再获取并保存所选区域的模型。
75
-
76
- ### 请求是否会自动重试?
77
-
78
- 模型生成重试由 DSH 管理。需要启用时,运行中的 profile 应包含 `@deepseek-ai/dsh-llm-retry`。插件使用 DSH 默认重试策略报告空响应、限流、服务端、超时和传输错误;认证、无效请求、取消、额度及协议格式错误默认不重试。Qoder transport 可以独立重试一次幂等的模型目录、订阅者资料或配额读取,但绝不会在内部重试模型生成 POST。
79
-
80
- ## 从源码安装与开发
64
+ <p align="center">
65
+ <img src="./assets/credentials-settings.png" alt="Qoder 凭据与模型配置" width="680" />
66
+ </p>
81
67
 
82
- 在已安装 Git、Node.js 和 pnpm 的环境中执行。Node.js 需支持项目测试脚本使用的 `--experimental-strip-types` 和 `--test-isolation=none` 参数。
83
-
84
- ```sh
85
- git clone https://github.com/mo-n/dsh-provider-qoder.git
86
- cd dsh-provider-qoder
87
- pnpm install --frozen-lockfile
88
- pnpm run build
89
- ```
90
-
91
- 将构建后的仓库目录安装到 DSH profile。以下路径为占位示例,请替换为实际绝对路径:
92
-
93
- ```sh
94
- dsh plugin --profile web add /absolute/path/to/dsh-provider-qoder
95
- ```
96
-
97
- 重启 profile 后,按前文完成配置。若在 DSH 源码工作区中运行 CLI,可使用该工作区的 `pnpm dsh` 命令。
68
+ ### 3. 查看账号与额度
98
69
 
99
- 开发时,在插件目录运行监听构建:
70
+ 打开 **设置 → Qoder** 查看账号额度,并可按需切换联网搜索策略:
100
71
 
101
- ```sh
102
- pnpm run dev
103
- ```
72
+ <p align="center">
73
+ <img src="./assets/account-quota.png" alt="Qoder 账号额度与搜索设置" width="650" />
74
+ </p>
104
75
 
105
- 提交修改前运行:
106
-
107
- ```sh
108
- pnpm run check
109
- ```
110
76
 
111
- 该命令运行模拟网络的非 UI 测试、构建 ESM 包与类型声明、检查构建产物并预览打包内容,不会发起真实 Qoder 模型请求或发布 npm 包。
77
+ ## 后续计划功能
78
+ - [ ] 支持上下文窗口(Context Window)档位切换
79
+ - [ ] 请求限流排队机制
80
+ - [ ] 接入 Qoder 的 Protobuf 协议
112
81
 
113
82
  ## 参考项目
114
83
 
package/lib/client.js CHANGED
@@ -1173,14 +1173,17 @@ window.__ModuleLoader__.load({
1173
1173
  return Object.entries(values).reduce((next, [key, value]) => next.replace(new RegExp(`\\{${key}\\}`, "g"), String(value)), text);
1174
1174
  };
1175
1175
  function apply(ctx) {
1176
- ctx.inject(["settingsScope"], (child) => {
1177
- const scopes = child.settingsScope;
1178
- mount(child, scopes.bind({ namespace: settingsNamespace }));
1179
- });
1180
- ctx.inject(["configForms"], (child) => {
1181
- const forms = child.configForms;
1182
- mount(child, forms.get(settingsNamespace));
1183
- });
1176
+ const configForms = ctx.get?.("configForms");
1177
+ if (configForms) {
1178
+ mount(ctx, configForms.get(settingsNamespace));
1179
+ return;
1180
+ }
1181
+ const settingsScope = ctx.get?.("settingsScope");
1182
+ if (settingsScope) {
1183
+ mount(ctx, settingsScope.bind({ namespace: settingsNamespace }));
1184
+ return;
1185
+ }
1186
+ console.warn("[provider-qoder] Neither configForms nor settingsScope available; settings panel will not mount");
1184
1187
  }
1185
1188
  function mount(ctx, modelScope) {
1186
1189
  ctx.effect(() => ctx.locale.register(localeNamespace, {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-provider-qoder",
3
3
  "description": "Global Qoder subscription adapter for the DeepSeek Harness LLM seam",
4
- "version": "0.3.1",
4
+ "version": "0.3.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },