dsh-plugin-effort-declare 0.1.1 → 0.1.3

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.
Files changed (42) hide show
  1. package/CONTRIBUTING.en.md +5 -1
  2. package/CONTRIBUTING.md +5 -1
  3. package/INSTALL.en.md +1 -1
  4. package/INSTALL.md +1 -1
  5. package/README.en.md +8 -7
  6. package/README.md +8 -7
  7. package/lib/client.js +389 -65
  8. package/lib/client.js.map +1 -1
  9. package/lib/types/client/EffortDeclareSection.d.ts +12 -2
  10. package/lib/types/client/EffortDeclareSection.d.ts.map +1 -1
  11. package/lib/types/client/build-info.d.ts +2 -0
  12. package/lib/types/client/build-info.d.ts.map +1 -0
  13. package/lib/types/client/index.d.ts.map +1 -1
  14. package/lib/types/client/load-drafts.d.ts +36 -6
  15. package/lib/types/client/load-drafts.d.ts.map +1 -1
  16. package/lib/types/client/locales.d.ts +1 -1
  17. package/lib/types/client/locales.d.ts.map +1 -1
  18. package/lib/types/core/attribution.d.ts +13 -0
  19. package/lib/types/core/attribution.d.ts.map +1 -0
  20. package/lib/types/core/catalog.d.ts +5 -3
  21. package/lib/types/core/catalog.d.ts.map +1 -1
  22. package/lib/types/core/drafts.d.ts +34 -2
  23. package/lib/types/core/drafts.d.ts.map +1 -1
  24. package/lib/types/core/efforts.d.ts.map +1 -1
  25. package/package.json +1 -1
  26. package/src/README.en.md +1 -1
  27. package/src/README.md +1 -1
  28. package/src/client/EffortDeclareSection.tsx +158 -46
  29. package/src/client/README.en.md +5 -3
  30. package/src/client/README.md +5 -3
  31. package/src/client/build-info.ts +12 -0
  32. package/src/client/effort-declare.module.css +8 -0
  33. package/src/client/globals.d.ts +5 -0
  34. package/src/client/index.ts +14 -9
  35. package/src/client/load-drafts.ts +124 -8
  36. package/src/client/locales.ts +3 -0
  37. package/src/core/README.en.md +4 -3
  38. package/src/core/README.md +4 -3
  39. package/src/core/attribution.ts +24 -0
  40. package/src/core/catalog.ts +5 -3
  41. package/src/core/drafts.ts +151 -4
  42. package/src/core/efforts.ts +4 -1
@@ -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 whitelist pinned by tests; if the schema drifts, update the tests first, then UI copy. Do not offer that list as writable dropdown choices.
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
 
@@ -50,6 +52,8 @@ pnpm pack # confirm the tarball contains lib/ and cordis.patch.yml
50
52
  pnpm publish
51
53
  ```
52
54
 
55
+ The settings footer version and copyright end year are frozen into the client bundle at `pnpm build` (`package.json` version plus the UTC year at that moment). Bump the version, then build / publish. Do not read the wall clock at DSH startup.
56
+
53
57
  `pnpm publish` fails on an unclean Git tree. Commit first (and preferably push). Do not pass `--no-git-checks`.
54
58
 
55
59
  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.
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
 
@@ -50,6 +52,8 @@ pnpm pack # 确认 tarball 含 lib/ 与 cordis.patch.yml
50
52
  pnpm publish
51
53
  ```
52
54
 
55
+ 页脚版本与版权结束年在 `pnpm build` 时写入 client bundle(`package.json` 的 version + 当时的 UTC 年)。先改 version 再 build / publish。不要在运行时读系统时钟。
56
+
53
57
  `pnpm publish` 在 Git 有未提交改动时会失败。应先 commit(建议再 push),不要用 `--no-git-checks` 绕过。
54
58
 
55
59
  发布后用户用 `dsh plugin --profile web update dsh-plugin-effort-declare` 或 `add dsh-plugin-effort-declare@latest` 更新。作者无需在插件里实现更新命令;官方 `dsh plugin` 会把参数转给 pnpm。
package/INSTALL.en.md CHANGED
@@ -83,7 +83,7 @@ dsh plugin --profile web add file:/absolute/path/to/dsh-plugin-effort-declare
83
83
 
84
84
  ## After install
85
85
 
86
- Restart DSH. 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**. The footer is the installed version (for example `0.1.3 © 2026 Stardust`); bumping `package.json` only shows up after you rebuild and reinstall. Add a custom provider on the Models page first; otherwise this page has nothing to edit.
87
87
 
88
88
  ## Uninstall
89
89
 
package/INSTALL.md CHANGED
@@ -83,7 +83,7 @@ dsh plugin --profile web add file:/绝对路径/dsh-plugin-effort-declare
83
83
 
84
84
  ## 装完之后
85
85
 
86
- 重启 DSH。打开 **设置 → 推理档位**。先在「模型」页添加第三方提供方,本页才会出现可编辑的条目。
86
+ 重启 DSH。打开 **设置 → 推理档位**。页脚是当前装上的版本(例如 `0.1.3 © 2026 Stardust`),改 `package.json` 后必须重新打包再安装才会变。先在「模型」页添加第三方提供方,本页才会出现可编辑的条目。
87
87
 
88
88
  ## 卸载
89
89
 
package/README.en.md CHANGED
@@ -8,16 +8,16 @@
8
8
  </p>
9
9
 
10
10
  <p align="center">
11
- <a href="https://www.npmjs.com/package/dsh-plugin-effort-declare"><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"><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"><img alt="repo size" src="https://img.shields.io/github/repo-size/zimodzh/dsh-plugin-effort-declare"></a>
14
- <a href="./LICENSE"><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"><img alt="Agent" src="https://img.shields.io/badge/Agent-Deepseek%20Harness-000000"></a>
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
16
  </p>
17
17
 
18
18
  Add reasoning-effort options to OpenAI-compatible models you added yourself, so the Effort row shows up in the composer.
19
19
 
20
- > 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 later**.
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.
21
21
 
22
22
  ## Why
23
23
 
@@ -34,6 +34,7 @@ Hand-added third-party providers on the Models page need a reasoning-level decla
34
34
  | Reasoning efforts page | Choose levels per model; change the gateway spelling if it differs |
35
35
  | Presets | DeepSeek compatible, OpenAI compatible, or on/off only. A preset **replaces** that dialect; it does not stack |
36
36
  | vs Models | Models owns the endpoint, keys, and model list; this page only declares which reasoning levels are offered |
37
+ | Version footer | Bottom of the page shows the plugin version and copyright years (frozen at pack time; opening DSH does not advance the year) |
37
38
 
38
39
  ## Install
39
40
 
@@ -51,7 +52,7 @@ dsh plugin --profile web update dsh-plugin-effort-declare
51
52
 
52
53
  Or `add dsh-plugin-effort-declare@latest`. Details: [install guide](./INSTALL.en.md) **Update**.
53
54
 
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).
55
+ Restart DSH, then open **Settings → Reasoning efforts**. The footer shows which version is installed. Add a custom provider on the Models page first. GitHub, local folder, and uninstall: [install guide](./INSTALL.en.md).
55
56
 
56
57
  ## Usage
57
58
 
package/README.md CHANGED
@@ -8,16 +8,16 @@
8
8
  </p>
9
9
 
10
10
  <p align="center">
11
- <a href="https://www.npmjs.com/package/dsh-plugin-effort-declare"><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"><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"><img alt="repo size" src="https://img.shields.io/github/repo-size/zimodzh/dsh-plugin-effort-declare"></a>
14
- <a href="./LICENSE"><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"><img alt="Agent" src="https://img.shields.io/badge/Agent-Deepseek%20Harness-000000"></a>
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
16
  </p>
17
17
 
18
18
  给自己添加的 OpenAI 兼容模型补上「推理强度」选项,对话里的 Effort 行就会出现。
19
19
 
20
- > 这是社区插件,不是 DeepSeek 官方项目,也未获官方背书。需要 DeepSeek Harness **0.1.0-rc.8 及以上**。
20
+ > 这是社区维护的第三方插件,不是 DeepSeek 官方项目,也未获官方背书。需要 **DeepSeek Harness 0.1.0-rc.8** 及以上, **DeepSeek Harness 0.1.0-rc.8** 之前的版本没测试过,不保证可用。
21
21
 
22
22
  ## 它解决什么
23
23
 
@@ -34,6 +34,7 @@
34
34
  | 推理档位页 | 按模型勾选可选档位;网关用的名字如果不同,可以改拼写 |
35
35
  | 预设 | DeepSeek 兼容、OpenAI 兼容、只开/关思考。点预设会换成那一套,不是叠加上去 |
36
36
  | 和「模型」页 | 「模型」管地址、密钥和模型名单;本页只管「能选哪些推理档」 |
37
+ | 版本页脚 | 页面底部显示当前插件版本与版权年(打包时写入;打开 DSH 不会跟着日历变) |
37
38
 
38
39
  ## 安装
39
40
 
@@ -51,7 +52,7 @@ dsh plugin --profile web update dsh-plugin-effort-declare
51
52
 
52
53
  或 `add dsh-plugin-effort-declare@latest`。详见 [安装说明](./INSTALL.md) 的「更新」。
53
54
 
54
- 装完后重启 DSH,打开 **设置 → 推理档位**。请先在「模型」页添加过第三方提供方。GitHub、本地文件夹和卸载也在 [安装说明](./INSTALL.md)。
55
+ 装完后重启 DSH,打开 **设置 → 推理档位**。页脚可核对装上的版本。请先在「模型」页添加过第三方提供方。GitHub、本地文件夹和卸载也在 [安装说明](./INSTALL.md)。
55
56
 
56
57
  ## 使用
57
58