dsh-plugin-effort-declare 0.1.0 → 0.1.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.
@@ -17,6 +17,8 @@ Write `llm-pi-ai` settings only:
17
17
  - No fork of the official Models page
18
18
  - No parallel effort table
19
19
  - No per-model `reasoningEfforts` in the bundle layer (settings dict merge has no delete semantics)
20
+ - Do not auto-write efforts onto undeclared models at Host start (dict merge cannot delete; it would mutate models the user never saved)
21
+ - Do not hook `agent/request` to fill a default effort for subagents
20
22
  - Do not set route-level `reasoning` to `high`
21
23
 
22
24
  Any new model-visible input must land in a session-log-rebuildable mechanism. This plugin does not inject prompt text.
@@ -38,7 +40,7 @@ pnpm build
38
40
 
39
41
  Before sending a change, say whether it is a bugfix, UI improvement, or an alignment with a newer DSH / pi-ai schema. Update zh and en docs together. The root README and [INSTALL.en.md](./INSTALL.en.md) are for users; this file and the READMEs under `src/` and `tests/` are for people changing code.
40
42
 
41
- Canonical level names and `thinkingFormat` enums come from the installed `llm-pi-ai` schema / catalog. The repo keeps a fallback whitelist pinned by tests; if the schema drifts, update the tests first, then the UI.
43
+ Canonical level names and `thinkingFormat` enums come from the installed `llm-pi-ai` schema / catalog. The live `thinkingFormat` schema contract is [`tests/fixtures/pi-ai-thinking-format-union.ts`](./tests/fixtures/pi-ai-thinking-format-union.ts). When upgrading DSH, refresh that fixture from `dsh --dump-config` or the settings describe schema, then update `src/core/catalog.ts` and UI copy. Do not value-import `@deepseek-ai/dsh-llm-pi-ai` into the client bundle. Effort keys stay a locally pinned whitelist; if the schema drifts, change the fixture / tests first. Do not offer that list as writable dropdown choices.
42
44
 
43
45
  ## Publishing to npm
44
46
 
@@ -52,6 +54,8 @@ pnpm publish
52
54
 
53
55
  `pnpm publish` fails on an unclean Git tree. Commit first (and preferably push). Do not pass `--no-git-checks`.
54
56
 
57
+ After publish, users update with `dsh plugin --profile web update dsh-plugin-effort-declare` or `add dsh-plugin-effort-declare@latest`. Authors do not implement an update command; official `dsh plugin` forwards the rest of the line to pnpm.
58
+
55
59
  ## Security
56
60
 
57
61
  Do not paste API keys or `.credentials.yaml` values into logs, screenshots, docs, or issues.
package/CONTRIBUTING.md CHANGED
@@ -17,6 +17,8 @@
17
17
  - 不要 fork 官方模型页
18
18
  - 不要平行再存一份档位表
19
19
  - 不要在 bundle 层预置 per-model `reasoningEfforts`(settings 字典合并没有删除语义)
20
+ - 不要在 Host 启动时给未声明的模型自动写入档位(字典合并删不掉,会改用户没保存过的模型)
21
+ - 不要挂 `agent/request` 给 subagent 填默认档
20
22
  - 不要把路由级 `reasoning` 写成 `high`
21
23
 
22
24
  新增任何模型可见输入,必须走会话日志可重建的机制。本插件不向模型注入提示词。
@@ -38,7 +40,7 @@ pnpm build
38
40
 
39
41
  提交前请说明改动是修 bug、增强 UI,还是对齐新的 DSH / pi-ai schema。中英文档一起改。根 README 和 [INSTALL.md](./INSTALL.md) 面向使用者;本文件与 `src/`、`tests/` 的 README 面向改代码的人。
40
42
 
41
- 上游档位名与 `thinkingFormat` 枚举以 DSH 安装里 `llm-pi-ai` 的 schema / catalog 为准。仓库内有一份回退白名单,并由测试钉住;schema 漂移时应先改测试再改 UI
43
+ 上游档位名与 `thinkingFormat` 枚举以 DSH 安装里 `llm-pi-ai` 的 schema / catalog 为准。`thinkingFormat` 的现场 schema 契约在 [`tests/fixtures/pi-ai-thinking-format-union.ts`](./tests/fixtures/pi-ai-thinking-format-union.ts)。升 DSH 时用 `dsh --dump-config` 或设置 describe 的 schema 更新该 fixture,再改 `src/core/catalog.ts` 与 UI。不要把 `@deepseek-ai/dsh-llm-pi-ai` 打进 client bundle。档位键仍由测试钉本地白名单;schema 漂移时应先改 fixture / 测试再改 UI。不要把这份名单当作可写入下拉选项。
42
44
 
43
45
  ## 发布到 npm
44
46
 
@@ -52,6 +54,8 @@ pnpm publish
52
54
 
53
55
  `pnpm publish` 在 Git 有未提交改动时会失败。应先 commit(建议再 push),不要用 `--no-git-checks` 绕过。
54
56
 
57
+ 发布后用户用 `dsh plugin --profile web update dsh-plugin-effort-declare` 或 `add dsh-plugin-effort-declare@latest` 更新。作者无需在插件里实现更新命令;官方 `dsh plugin` 会把参数转给 pnpm。
58
+
55
59
  ## 安全
56
60
 
57
61
  不要在日志、截图、文档或 issue 中粘贴 API 密钥或 `.credentials.yaml` 的值。
package/INSTALL.en.md CHANGED
@@ -9,14 +9,18 @@
9
9
 
10
10
  Back to the [README](./README.en.md). Requires DeepSeek Harness **0.1.0-rc.8 or newer**. Do not use `npm install`; use `dsh plugin` below.
11
11
 
12
- ## Desktop users: do this first
12
+ ## Third-party DSH: set DSH_HOME first
13
13
 
14
- `dsh plugin` installs into the **current** `DSH_HOME`. If unset, that is `.dsh` in your user folder **not** Desktop’s data directory.
14
+ `dsh plugin` installs into the **current** `DSH_HOME`. If unset, that is `.dsh` in your user folder. Third-party distributions often use a different home; point it at the home your DSH actually uses.
15
15
 
16
- PowerShell:
16
+ ```bash
17
+ # Linux / macOS
18
+ export DSH_HOME=/path/to/your/dsh-home
19
+ ```
17
20
 
18
21
  ```powershell
19
- $env:DSH_HOME = "$env:APPDATA\io.github.hairyf.deepseek-harness-desktop\data\dsh"
22
+ # Windows PowerShell
23
+ $env:DSH_HOME = "X:\path\to\your\dsh-home"
20
24
  ```
21
25
 
22
26
  Set this before the install command. The profile name is usually `web`.
@@ -35,6 +39,32 @@ dsh --profile web --dump-config
35
39
 
36
40
  The output should mention `dsh-plugin-effort-declare`.
37
41
 
42
+ ## Update
43
+
44
+ The plugin is published to npm. Updates also go through `dsh plugin` (the official CLI forwards the rest of the line to pnpm). Do not use `npm update`.
45
+
46
+ Third-party DSH still needs `DSH_HOME` set first, same as install.
47
+
48
+ Already installed from npm, upgrade to the newest version in the existing semver range:
49
+
50
+ ```bash
51
+ dsh plugin --profile web update dsh-plugin-effort-declare
52
+ ```
53
+
54
+ Latest release, including rewriting the dependency range:
55
+
56
+ ```bash
57
+ dsh plugin --profile web add dsh-plugin-effort-declare@latest
58
+ ```
59
+
60
+ Then restart DSH. Use `dsh --profile web --dump-config` to confirm the layer is still present.
61
+
62
+ Installed from GitHub: run `add` again, or pin a commit:
63
+
64
+ ```bash
65
+ dsh plugin --profile web add github:zimodzh/dsh-plugin-effort-declare
66
+ ```
67
+
38
68
  ## Other methods
39
69
 
40
70
  GitHub:
@@ -53,7 +83,7 @@ dsh plugin --profile web add file:/absolute/path/to/dsh-plugin-effort-declare
53
83
 
54
84
  ## After install
55
85
 
56
- Restart DSH (on Desktop, restart its backend). Open **Settings → Reasoning efforts**. Add a custom provider on the Models page first; otherwise this page has nothing to edit.
86
+ Restart DSH. Open **Settings → Reasoning efforts**. Add a custom provider on the Models page first; otherwise this page has nothing to edit.
57
87
 
58
88
  ## Uninstall
59
89
 
package/INSTALL.md CHANGED
@@ -9,14 +9,18 @@
9
9
 
10
10
  回到 [README](./README.md)。需要 DeepSeek Harness **0.1.0-rc.8 或更新**。不要用 `npm install`,必须用下面的 `dsh plugin` 命令。
11
11
 
12
- ## Desktop 用户请先做这一步
12
+ ## 第三方 DSH:先设置 DSH_HOME
13
13
 
14
- `dsh plugin` 会装进**当前** `DSH_HOME`。没设置时默认是用户目录下的 `.dsh`,**不是** Desktop 自己的数据目录。
14
+ `dsh plugin` 会装进**当前** `DSH_HOME`。没设置时默认是用户目录下的 `.dsh`。第三方发行版的数据目录往往不是这条路径,需要改成你这份 DSH 实际使用的 home。
15
15
 
16
- PowerShell:
16
+ ```bash
17
+ # Linux / macOS
18
+ export DSH_HOME=/path/to/your/dsh-home
19
+ ```
17
20
 
18
21
  ```powershell
19
- $env:DSH_HOME = "$env:APPDATA\io.github.hairyf.deepseek-harness-desktop\data\dsh"
22
+ # Windows PowerShell
23
+ $env:DSH_HOME = "X:\path\to\your\dsh-home"
20
24
  ```
21
25
 
22
26
  设好后再跑安装命令。配置档名称一般是 `web`。
@@ -35,6 +39,32 @@ dsh --profile web --dump-config
35
39
 
36
40
  输出里应出现 `dsh-plugin-effort-declare`。
37
41
 
42
+ ## 更新
43
+
44
+ 插件已发布到 npm。更新也走 `dsh plugin`(官方会把参数转给 pnpm),不要用 `npm update`。
45
+
46
+ 第三方 DSH 仍须先设置 `DSH_HOME`,与安装相同。
47
+
48
+ 已从 npm 安装过,升级到 semver 范围内的新版本:
49
+
50
+ ```bash
51
+ dsh plugin --profile web update dsh-plugin-effort-declare
52
+ ```
53
+
54
+ 要最新正式版(含改依赖范围):
55
+
56
+ ```bash
57
+ dsh plugin --profile web add dsh-plugin-effort-declare@latest
58
+ ```
59
+
60
+ 然后重启 DSH。可用 `dsh --profile web --dump-config` 确认层还在。
61
+
62
+ 从 GitHub 装的:再执行一次下面的命令,或使用带 commit 的规格:
63
+
64
+ ```bash
65
+ dsh plugin --profile web add github:zimodzh/dsh-plugin-effort-declare
66
+ ```
67
+
38
68
  ## 其他方式
39
69
 
40
70
  GitHub:
@@ -53,7 +83,7 @@ dsh plugin --profile web add file:/绝对路径/dsh-plugin-effort-declare
53
83
 
54
84
  ## 装完之后
55
85
 
56
- 重启 DSH(Desktop 请重启其后端)。打开 **设置 → 推理档位**。先在「模型」页添加第三方提供方,本页才会出现可编辑的条目。
86
+ 重启 DSH。打开 **设置 → 推理档位**。先在「模型」页添加第三方提供方,本页才会出现可编辑的条目。
57
87
 
58
88
  ## 卸载
59
89
 
package/README.en.md CHANGED
@@ -7,13 +7,21 @@
7
7
  </samp>
8
8
  </p>
9
9
 
10
+ <p align="center">
11
+ <a href="https://www.npmjs.com/package/dsh-plugin-effort-declare" target="_blank" rel="noopener noreferrer"><img alt="npm" src="https://img.shields.io/npm/v/dsh-plugin-effort-declare"></a>
12
+ <a href="https://github.com/zimodzh/dsh-plugin-effort-declare/commits/master" target="_blank" rel="noopener noreferrer"><img alt="last commit" src="https://img.shields.io/github/last-commit/zimodzh/dsh-plugin-effort-declare"></a>
13
+ <a href="https://github.com/zimodzh/dsh-plugin-effort-declare" target="_blank" rel="noopener noreferrer"><img alt="repo size" src="https://img.shields.io/github/repo-size/zimodzh/dsh-plugin-effort-declare"></a>
14
+ <a href="./LICENSE" target="_blank" rel="noopener noreferrer"><img alt="license" src="https://img.shields.io/github/license/zimodzh/dsh-plugin-effort-declare"></a>
15
+ <a href="https://github.com/deepseek-ai/deepseek-harness" target="_blank" rel="noopener noreferrer"><img alt="Agent" src="https://img.shields.io/badge/Agent-Deepseek%20Harness-000000"></a>
16
+ </p>
17
+
10
18
  Add reasoning-effort options to OpenAI-compatible models you added yourself, so the Effort row shows up in the composer.
11
19
 
12
- This is a community plugin. It is not an official DeepSeek project and is not endorsed by DeepSeek. Requires DeepSeek Harness **0.1.0-rc.8 or newer**.
20
+ > This is a community-maintained third-party plugin. It is not an official DeepSeek project and is not endorsed by DeepSeek. Requires **DeepSeek Harness 0.1.0-rc.8** or later. Versions before **DeepSeek Harness 0.1.0-rc.8** have not been tested and are not guaranteed to work.
13
21
 
14
22
  ## Why
15
23
 
16
- Custom providers you add on the Models page usually have no reasoning levels, so the composer hides Effort. This plugin adds a **Reasoning efforts** page in Settings: you pick which levels a model can offer. The per-turn choice and the HTTP request still go through DSH. This plugin only writes settings, not API keys.
24
+ Hand-added third-party providers on the Models page need a reasoning-level declaration before Effort appears in the composer. They usually do not declare it. This plugin therefore adds a **Reasoning efforts** page in Settings: you pick which levels a model can offer. The per-turn choice and the HTTP request still go through DSH. This plugin only writes settings, not API keys.
17
25
 
18
26
  - Does not change models you have not saved
19
27
  - Does not change the current or default effort
@@ -35,7 +43,13 @@ Do not use `npm install`. In a terminal:
35
43
  dsh plugin --profile web add dsh-plugin-effort-declare
36
44
  ```
37
45
 
38
- If you use **DeepSeek Harness Desktop**, set `DSH_HOME` first or the package lands in the wrong folder. See the [install guide](./INSTALL.en.md).
46
+ If you use third-party DSH, you must set `DSH_HOME` first, or the package lands in another directory. See the [install guide](./INSTALL.en.md). To update an npm install:
47
+
48
+ ```bash
49
+ dsh plugin --profile web update dsh-plugin-effort-declare
50
+ ```
51
+
52
+ Or `add dsh-plugin-effort-declare@latest`. Details: [install guide](./INSTALL.en.md) **Update**.
39
53
 
40
54
  Restart DSH, then open **Settings → Reasoning efforts**. Add a custom provider on the Models page first. GitHub, local folder, and uninstall: [install guide](./INSTALL.en.md).
41
55
 
package/README.md CHANGED
@@ -7,13 +7,21 @@
7
7
  </samp>
8
8
  </p>
9
9
 
10
+ <p align="center">
11
+ <a href="https://www.npmjs.com/package/dsh-plugin-effort-declare" target="_blank" rel="noopener noreferrer"><img alt="npm" src="https://img.shields.io/npm/v/dsh-plugin-effort-declare"></a>
12
+ <a href="https://github.com/zimodzh/dsh-plugin-effort-declare/commits/master" target="_blank" rel="noopener noreferrer"><img alt="last commit" src="https://img.shields.io/github/last-commit/zimodzh/dsh-plugin-effort-declare"></a>
13
+ <a href="https://github.com/zimodzh/dsh-plugin-effort-declare" target="_blank" rel="noopener noreferrer"><img alt="repo size" src="https://img.shields.io/github/repo-size/zimodzh/dsh-plugin-effort-declare"></a>
14
+ <a href="./LICENSE" target="_blank" rel="noopener noreferrer"><img alt="license" src="https://img.shields.io/github/license/zimodzh/dsh-plugin-effort-declare"></a>
15
+ <a href="https://github.com/deepseek-ai/deepseek-harness" target="_blank" rel="noopener noreferrer"><img alt="Agent" src="https://img.shields.io/badge/Agent-Deepseek%20Harness-000000"></a>
16
+ </p>
17
+
10
18
  给自己添加的 OpenAI 兼容模型补上「推理强度」选项,对话里的 Effort 行就会出现。
11
19
 
12
- 这是社区插件,不是 DeepSeek 官方项目,也未获官方背书。需要 DeepSeek Harness **0.1.0-rc.8 或更新**。
20
+ > 这是社区维护的第三方插件,不是 DeepSeek 官方项目,也未获官方背书。需要 **DeepSeek Harness 0.1.0-rc.8** 及以上, **DeepSeek Harness 0.1.0-rc.8** 之前的版本没测试过,不保证可用。
13
21
 
14
22
  ## 它解决什么
15
23
 
16
- 你在「模型」页手工加的第三方接口,通常没有推理档位,所以对话里看不到 Effort。装上本插件后,设置里会多一页 **推理档位**:勾选这个模型能提供哪些档。对话里怎么选、请求怎么发给接口,仍由 DSH 处理。本插件只改设置,不改密钥。
24
+ 在「模型」页手工加的第三方供应商,需要先声明能选哪些推理档,对话里才会出现 Effort。但通常它们不会声明。所以本插件在设置里加一页 **推理档位**:勾选这个模型能提供哪些档位。对话里怎么选、请求怎么发给接口,仍由 DSH 处理。本插件只改设置,不改密钥。
17
25
 
18
26
  - 不会自动改你没保存过的模型
19
27
  - 不会改你当前选中的档位,也不会改默认档位
@@ -35,7 +43,13 @@
35
43
  dsh plugin --profile web add dsh-plugin-effort-declare
36
44
  ```
37
45
 
38
- 若使用 **DeepSeek Harness Desktop**,必须先设置 `DSH_HOME`,否则会装到另一份目录。步骤见 [安装说明](./INSTALL.md)
46
+ 若使用第三方DSH,必须先设置 `DSH_HOME`,否则会装到另一份目录。步骤见 [安装说明](./INSTALL.md)。更新已安装的 npm 包:
47
+
48
+ ```bash
49
+ dsh plugin --profile web update dsh-plugin-effort-declare
50
+ ```
51
+
52
+ 或 `add dsh-plugin-effort-declare@latest`。详见 [安装说明](./INSTALL.md) 的「更新」。
39
53
 
40
54
  装完后重启 DSH,打开 **设置 → 推理档位**。请先在「模型」页添加过第三方提供方。GitHub、本地文件夹和卸载也在 [安装说明](./INSTALL.md)。
41
55