dsh-thinkbar 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 +22 -0
- package/README.md +112 -0
- package/README.zh.md +112 -0
- package/cordis.patch.yml +3 -0
- package/lib/client.cjs +679 -0
- package/lib/client.cjs.map +1 -0
- package/lib/index.js +11 -0
- package/lib/index.js.map +1 -0
- package/lib/types/client/ModelTriggerBridge.d.ts +6 -0
- package/lib/types/client/ModelTriggerBridge.d.ts.map +1 -0
- package/lib/types/client/ReasoningWaitIndicator.d.ts +8 -0
- package/lib/types/client/ReasoningWaitIndicator.d.ts.map +1 -0
- package/lib/types/client/fill-face.d.ts +8 -0
- package/lib/types/client/fill-face.d.ts.map +1 -0
- package/lib/types/client/index.d.ts +11 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/model-trigger-adapter.d.ts +10 -0
- package/lib/types/client/model-trigger-adapter.d.ts.map +1 -0
- package/lib/types/client/reasoning-wait-projection.d.ts +30 -0
- package/lib/types/client/reasoning-wait-projection.d.ts.map +1 -0
- package/lib/types/client/service.d.ts +18 -0
- package/lib/types/client/service.d.ts.map +1 -0
- package/lib/types/client/thermometer.d.ts +48 -0
- package/lib/types/client/thermometer.d.ts.map +1 -0
- package/lib/types/client/use-model-trigger.d.ts +4 -0
- package/lib/types/client/use-model-trigger.d.ts.map +1 -0
- package/lib/types/index.d.ts +7 -0
- package/lib/types/index.d.ts.map +1 -0
- package/package.json +95 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DeepSeek
|
|
4
|
+
Copyright (c) 2026 dsh-thinkbar contributors
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# dsh-thinkbar
|
|
2
|
+
|
|
3
|
+
English | [中文](README.zh.md)
|
|
4
|
+
|
|
5
|
+
`dsh-thinkbar` is a Web UI plugin for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness). It fills the existing model selector while the visible assistant Step is streaming reasoning.
|
|
6
|
+
|
|
7
|
+
The indicator starts at 8%, fills toward 100% over 20 seconds with an ease-out curve, and moves through Harness info blue, red, orange, and yellow. It drains in 240 ms when text, a Tool call, the final message, or the Step boundary ends reasoning. Session changes clear the previous indicator, and reduced-motion mode skips the drain and particle movement.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
|
|
11
|
+
- DeepSeek Harness `0.1.1-rc.2`
|
|
12
|
+
- The standard DSH `web` Profile with the official model-selection plugin
|
|
13
|
+
- Node.js `^22.19.0` or `>=24.0.0`
|
|
14
|
+
|
|
15
|
+
This release supports exactly `0.1.1-rc.2`. Harness is a developer preview, and later source revisions are not assumed to be binary-compatible.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
After the package is published:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
dsh plugin --profile web add dsh-thinkbar
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
To test a local release tarball instead:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
dsh plugin --profile web add ./dsh-thinkbar-0.1.0.tgz
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Restart the Web Profile after installation. Bundle changes are applied when the Profile starts. Verify the Bundle layer and Loader row with:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
dsh --profile web --dump-config
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The output must contain exactly one `dsh-thinkbar` row.
|
|
38
|
+
|
|
39
|
+
## Upgrade and uninstall
|
|
40
|
+
|
|
41
|
+
Install the desired version explicitly, then restart:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
dsh plugin --profile web add dsh-thinkbar@0.1.0
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Remove the plugin and restart the Profile:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
dsh plugin --profile web remove dsh-thinkbar
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## How it works
|
|
54
|
+
|
|
55
|
+
The plugin derives `{ waitOrigin, streamTime, active, tailKind }` from the public Conversation event and view registries. A `step/start` records the clock without displaying anything; the first reasoning block activates the fill. Direct text and Tool-only responses never flash the indicator.
|
|
56
|
+
|
|
57
|
+
The original Harness does not provide an additive child Slot inside the model selector. The plugin therefore registers a lifecycle anchor in the public `conversation.input.right` Slot, identifies the single following semantic `button[aria-haspopup="menu"]` inside `[data-composer-card]`, and portals one plugin-owned layer into it. It does not depend on generated class names, model labels, localization, React internals, or the button's child structure.
|
|
58
|
+
|
|
59
|
+
If the model trigger cannot be identified uniquely, the plugin leaves the DOM unchanged and emits one browser-console compatibility warning:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
[dsh-thinkbar] Could not uniquely identify the DeepSeek Harness model selector; the indicator is disabled.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
There are no settings. The plugin has no Host behavior and does not change prompts, messages, schemas, tools, provider requests, or KV-cache behavior. It sends no telemetry and uploads no data.
|
|
66
|
+
|
|
67
|
+
## Troubleshooting
|
|
68
|
+
|
|
69
|
+
- **Nothing changes after installation:** restart the Web Profile and confirm `dsh-thinkbar` appears in `dsh --profile web --dump-config`.
|
|
70
|
+
- **The client bundle fails to load:** verify DSH is exactly `0.1.1-rc.2`, reinstall, restart, and inspect the browser console and Host stderr.
|
|
71
|
+
- **A compatibility warning appears:** confirm the official model-selection plugin is enabled and no other plugin has added another menu trigger after `conversation.input.right`.
|
|
72
|
+
- **No fill appears for a response:** the indicator activates only after the first reasoning event. Direct text or Tool-only output intentionally remains idle.
|
|
73
|
+
- **Removal appears ineffective:** restart the Profile after `dsh plugin --profile web remove dsh-thinkbar`.
|
|
74
|
+
|
|
75
|
+
## Development
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
pnpm install --frozen-lockfile
|
|
79
|
+
pnpm verify
|
|
80
|
+
pnpm pack
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`pnpm verify` runs TypeScript checking, unit/component tests, the standalone DSH client build, tarball-contract checks, and `publint`.
|
|
84
|
+
|
|
85
|
+
### Publishing
|
|
86
|
+
|
|
87
|
+
Log in to npm once with `npm login`. Every release after that is a single command:
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
npm run publish
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The release script verifies the npm identity, keeps the current version when it is still unpublished or increments the patch version when it already exists, runs the complete verification suite, packs one release tarball, writes its SHA-256 checksum, publishes that exact tarball, and verifies its registry integrity. Release files are written to `.smoke/release/`. It deliberately does not commit, tag, or push Git changes.
|
|
94
|
+
|
|
95
|
+
Exercise the complete flow without publishing:
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
npm run publish -- --dry-run
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The browser artifact is a DSH lazy-CJS factory, not an ordinary application module. Preserve its exact `window.__ModuleLoader__.load(...)` envelope.
|
|
102
|
+
|
|
103
|
+
Contributor references:
|
|
104
|
+
|
|
105
|
+
- [Upstream-compatible reasoning indicator research](docs/research/upstream-reasoning-indicator.md)
|
|
106
|
+
- [DSH plugin publishing research](docs/research/dsh-plugin-publishing.md)
|
|
107
|
+
|
|
108
|
+
Contributions should include focused tests, pass `pnpm verify`, and verify the packed tarball against a clean DSH `0.1.1-rc.2` Web Profile when changing event, Slot, DOM-adapter, or bundle behavior.
|
|
109
|
+
|
|
110
|
+
## License and attribution
|
|
111
|
+
|
|
112
|
+
MIT. The original reasoning indicator was extracted from DeepSeek Harness commit `6d7ae5aa57b4dedfc03b09de7cafb65c01338800`. DeepSeek Harness is Copyright (c) 2026 DeepSeek and distributed under the MIT License. Independent packaging and subsequent modifications are maintained by the `dsh-thinkbar` contributors.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# dsh-thinkbar
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 中文
|
|
4
|
+
|
|
5
|
+
`dsh-thinkbar` 是 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 的 Web UI 插件。当前可见助手 Step 正在流式输出 reasoning 时,它会填充现有模型选择器作为思考指示器。
|
|
6
|
+
|
|
7
|
+
指示器从 8% 起步,在 20 秒内按 ease-out 曲线填满,并沿 Harness info blue、红、橙、黄变化。reasoning 转为正文或 Tool call、助手消息完成或 Step 结束后,填充在 240ms 内抽空。切换会话会清除旧指示器;reduced-motion 模式会跳过抽空和粒子运动。
|
|
8
|
+
|
|
9
|
+
## 运行要求
|
|
10
|
+
|
|
11
|
+
- DeepSeek Harness `0.1.1-rc.2`
|
|
12
|
+
- 启用官方模型选择插件的标准 DSH `web` Profile
|
|
13
|
+
- Node.js `^22.19.0` 或 `>=24.0.0`
|
|
14
|
+
|
|
15
|
+
首版只兼容 `0.1.1-rc.2`。Harness 仍处于 developer preview,不假定后续源码版本保持二进制兼容。
|
|
16
|
+
|
|
17
|
+
## 安装
|
|
18
|
+
|
|
19
|
+
发布后从 npm 安装:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
dsh plugin --profile web add dsh-thinkbar
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
也可以安装本地 release tarball:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
dsh plugin --profile web add ./dsh-thinkbar-0.1.0.tgz
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
安装后重启 Web Profile;Bundle 变更会在 Profile 启动时生效。验证 Bundle layer 和 Loader row:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
dsh --profile web --dump-config
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
输出中必须恰好包含一个 `dsh-thinkbar` row。
|
|
38
|
+
|
|
39
|
+
## 升级和卸载
|
|
40
|
+
|
|
41
|
+
显式安装目标版本,然后重启:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
dsh plugin --profile web add dsh-thinkbar@0.1.0
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
删除插件后重启 Profile:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
dsh plugin --profile web remove dsh-thinkbar
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## 工作原理
|
|
54
|
+
|
|
55
|
+
插件通过公开的 Conversation event/view registry 推导 `{ waitOrigin, streamTime, active, tailKind }`。`step/start` 只记录时钟,不立即显示;首个 reasoning block 才激活填充。直接输出正文或仅输出 Tool 的响应不会闪现指示器。
|
|
56
|
+
|
|
57
|
+
原版 Harness 没有模型选择器内部的 additive child Slot。因此插件在公开的 `conversation.input.right` Slot 注册生命周期锚点,在 `[data-composer-card]` 内识别锚点之后唯一的语义按钮 `button[aria-haspopup="menu"]`,并用 Portal 插入一个插件自有填充层。它不依赖生成的 class、模型文案、本地化、React 私有字段或按钮内部子结构。
|
|
58
|
+
|
|
59
|
+
如果无法唯一识别模型按钮,插件不会修改 DOM,只在浏览器 console 输出一次兼容性告警:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
[dsh-thinkbar] Could not uniquely identify the DeepSeek Harness model selector; the indicator is disabled.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
插件没有设置项和 Host 行为,不会改变 prompt、消息、schema、工具、模型请求或 KV Cache,不包含遥测,也不会上传数据。
|
|
66
|
+
|
|
67
|
+
## 故障排查
|
|
68
|
+
|
|
69
|
+
- **安装后没有变化:**重启 Web Profile,并确认 `dsh --profile web --dump-config` 中存在 `dsh-thinkbar`。
|
|
70
|
+
- **client bundle 加载失败:**确认 DSH 精确为 `0.1.1-rc.2`,重新安装并重启,然后检查浏览器 console 和 Host stderr。
|
|
71
|
+
- **出现兼容性告警:**确认已启用官方模型选择插件,并且没有其他插件在 `conversation.input.right` 后增加菜单按钮。
|
|
72
|
+
- **响应期间没有填充:**指示器只在首个 reasoning 事件出现后激活;直接正文或仅 Tool 输出保持 idle。
|
|
73
|
+
- **卸载后仍显示:**执行 `dsh plugin --profile web remove dsh-thinkbar` 后必须重启 Profile。
|
|
74
|
+
|
|
75
|
+
## 本地开发
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
pnpm install --frozen-lockfile
|
|
79
|
+
pnpm verify
|
|
80
|
+
pnpm pack
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`pnpm verify` 会执行 TypeScript 检查、单元与组件测试、独立 DSH client 构建、tarball 契约检查和 `publint`。
|
|
84
|
+
|
|
85
|
+
### 发布
|
|
86
|
+
|
|
87
|
+
首次使用前执行一次 `npm login`。之后每次发布只需:
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
npm run publish
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
发布脚本会检查 npm 身份;当前版本未发布时直接使用,已存在时自动递增 patch 版本;然后执行完整验证、生成唯一 release tarball 及 SHA-256 checksum、发布该 tarball,并回读 registry 校验完整性。产物位于 `.smoke/release/`。脚本不会自动提交、打 Git tag 或 push。
|
|
94
|
+
|
|
95
|
+
不实际发布的完整演练:
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
npm run publish -- --dry-run
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
浏览器产物是 DSH lazy-CJS factory,不是普通应用模块;必须保留精确的 `window.__ModuleLoader__.load(...)` envelope。
|
|
102
|
+
|
|
103
|
+
Contributor 参考资料:
|
|
104
|
+
|
|
105
|
+
- [原版兼容思考指示器调研](docs/research/upstream-reasoning-indicator.md)
|
|
106
|
+
- [DSH plugin 发布机制调研](docs/research/dsh-plugin-publishing.md)
|
|
107
|
+
|
|
108
|
+
贡献代码应包含聚焦测试并通过 `pnpm verify`;修改事件、Slot、DOM Adapter 或 bundle 行为时,还需把最终 tarball 安装到干净的 DSH `0.1.1-rc.2` Web Profile 验证。
|
|
109
|
+
|
|
110
|
+
## 许可与归属
|
|
111
|
+
|
|
112
|
+
MIT。原始思考指示器从 DeepSeek Harness commit `6d7ae5aa57b4dedfc03b09de7cafb65c01338800` 抽离。DeepSeek Harness 为 Copyright (c) 2026 DeepSeek,并按 MIT License 分发;独立打包和后续修改由 `dsh-thinkbar` contributors 维护。
|
package/cordis.patch.yml
ADDED