dsh-tool-drawer 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.
- package/README-zh.md +13 -6
- package/README.md +13 -6
- package/lib/drawer.js +23 -5
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +6 -5
package/README-zh.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**把工具都收进抽屉,要用的时候再摆上桌面。**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
DSH 每一步都会把每个工具的完整说明塞进模型上下文。多装几个插件和 MCP 之后,光是「有哪些工具」就吃掉一大块窗口。这个插件让模型平时只看到桌面上那几样常用的,其余都躺在抽屉里——需要对哪个,拉开抽屉取出来用,用完再放回去。
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## 桌面和抽屉
|
|
10
10
|
|
|
11
|
-
- **桌面** ——
|
|
12
|
-
- **抽屉** ——
|
|
11
|
+
- **桌面** —— 伸手就能拿到的常用工具,它们的说明一直在上下文里。
|
|
12
|
+
- **抽屉** —— 其他所有工具。平时不占地方,模型点名要的时候才被取出来。
|
|
13
13
|
|
|
14
14
|
## 两种模式
|
|
15
15
|
|
|
@@ -36,11 +36,17 @@ DeepSeek Harness 每一步都会把每个工具的完整说明塞进模型上下
|
|
|
36
36
|
|
|
37
37
|
## 安装
|
|
38
38
|
|
|
39
|
+
```powershell
|
|
40
|
+
dsh plugin --profile <profile> add dsh-tool-drawer
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
或者从本地目录链接安装:
|
|
44
|
+
|
|
39
45
|
```powershell
|
|
40
46
|
dsh plugin --profile <profile> add link:/path/to/dsh-tool-drawer
|
|
41
47
|
```
|
|
42
48
|
|
|
43
|
-
|
|
49
|
+
然后把 `dsh-tool-drawer` 加进 profile 的 `package.json` 的 `dsh.profile.bundles`,重启 DSH。
|
|
44
50
|
|
|
45
51
|
## 设置
|
|
46
52
|
|
|
@@ -53,6 +59,7 @@ dsh plugin --profile <profile> add link:/path/to/dsh-tool-drawer
|
|
|
53
59
|
| DSH | 验证日期 |
|
|
54
60
|
|---|---|
|
|
55
61
|
| 0.2.2-rc.3 | 2026-11-16 |
|
|
62
|
+
| 0.2.2-rc.5 | 2026-11-18 |
|
|
56
63
|
|
|
57
64
|
## 注意
|
|
58
65
|
|
package/README.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](README-zh.md)
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**Put every tool in a drawer, and bring one to the desk only when it is needed.**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
DSH sends the full description of every tool on every single step. With a few plugins and MCP servers, merely listing them eats a large slice of the context window. This plugin keeps only the everyday tools on the desk; everything else stays in a drawer and is taken out when the model asks for it.
|
|
8
8
|
|
|
9
|
-
## The
|
|
9
|
+
## The desk and the drawer
|
|
10
10
|
|
|
11
|
-
- **Desk** — the tools
|
|
12
|
-
- **Drawer** — everything else. It costs nothing until it is needed
|
|
11
|
+
- **Desk** — the everyday tools within reach; their descriptions are always in the prompt.
|
|
12
|
+
- **Drawer** — everything else. It costs nothing until it is needed.
|
|
13
13
|
|
|
14
14
|
## Two modes
|
|
15
15
|
|
|
@@ -36,11 +36,17 @@ Nothing is persisted, no tool registration is changed, and no preset is touched.
|
|
|
36
36
|
|
|
37
37
|
## Install
|
|
38
38
|
|
|
39
|
+
```powershell
|
|
40
|
+
dsh plugin --profile <profile> add dsh-tool-drawer
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Or link a local checkout:
|
|
44
|
+
|
|
39
45
|
```powershell
|
|
40
46
|
dsh plugin --profile <profile> add link:/path/to/dsh-tool-drawer
|
|
41
47
|
```
|
|
42
48
|
|
|
43
|
-
Then add `dsh-tool-drawer` to `dsh.profile.bundles` in the profile's `package.json` and restart DSH.
|
|
49
|
+
Then add `dsh-tool-drawer` to `dsh.profile.bundles` in the profile's `package.json` and restart DSH.
|
|
44
50
|
|
|
45
51
|
## Settings
|
|
46
52
|
|
|
@@ -53,6 +59,7 @@ The panel follows DSH's language: English by default; DSH's Chinese locale (incl
|
|
|
53
59
|
| DSH | Verified |
|
|
54
60
|
|---|---|
|
|
55
61
|
| 0.2.2-rc.3 | 2026-11-16 |
|
|
62
|
+
| 0.2.2-rc.5 | 2026-11-18 |
|
|
56
63
|
|
|
57
64
|
## Notes
|
|
58
65
|
|
package/lib/drawer.js
CHANGED
|
@@ -63,6 +63,23 @@ export function parseToolList(raw) {
|
|
|
63
63
|
return out
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Dereference a host-provided volatile setting reference.
|
|
68
|
+
*
|
|
69
|
+
* Before `apply` runs, the host evaluates the plugin's Config schema
|
|
70
|
+
* (`internal/config` waterfall); every field declared `.volatile()` arrives
|
|
71
|
+
* not as a value but as a frozen `{ get() }` reference, and setting-page
|
|
72
|
+
* changes are committed into those references in place. Reading through
|
|
73
|
+
* `get()` on every call is what makes hot changes apply without a restart.
|
|
74
|
+
* Plain values (unit tests, hosts without the schema step) pass through.
|
|
75
|
+
* @param {unknown} value - a config field as mounted by the host.
|
|
76
|
+
* @returns {unknown} the field's current value.
|
|
77
|
+
*/
|
|
78
|
+
export function pickRef(value) {
|
|
79
|
+
if (value !== null && typeof value === 'object' && typeof value.get === 'function') return value.get()
|
|
80
|
+
return value
|
|
81
|
+
}
|
|
82
|
+
|
|
66
83
|
/**
|
|
67
84
|
* Normalize the live plugin config.
|
|
68
85
|
* @param {Record<string, unknown>} raw - plugin config as mounted by the profile.
|
|
@@ -70,12 +87,13 @@ export function parseToolList(raw) {
|
|
|
70
87
|
*/
|
|
71
88
|
export function resolveConfig(raw) {
|
|
72
89
|
const source = raw !== null && typeof raw === 'object' ? raw : {}
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
const
|
|
90
|
+
const modeRaw = pickRef(source.mode)
|
|
91
|
+
const mode = MODES.includes(modeRaw) ? modeRaw : 'proxy'
|
|
92
|
+
const listed = parseToolList(pickRef(source.coreTools))
|
|
93
|
+
const maxActive = Number(pickRef(source.maxActive))
|
|
94
|
+
const searchLimit = Number(pickRef(source.searchLimit))
|
|
77
95
|
return {
|
|
78
|
-
enabled: source.enabled !== false,
|
|
96
|
+
enabled: pickRef(source.enabled) !== false,
|
|
79
97
|
mode,
|
|
80
98
|
core: new Set(listed.length > 0 ? listed : DEFAULT_CORE),
|
|
81
99
|
maxActive: Number.isFinite(maxActive) ? Math.max(1, Math.min(128, Math.trunc(maxActive))) : 20,
|
package/locale/en.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Tool drawer",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "Put every tool in a drawer: everyday tools stay on the desk, everything else is fetched when needed."
|
|
5
5
|
}
|
|
6
6
|
}
|
package/locale/zh.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-tool-drawer",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Put every tool in a drawer: everyday tools stay on the desk, everything else is fetched on demand.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -31,18 +31,19 @@
|
|
|
31
31
|
"@deepseek-ai/dsh-client-ui-settings"
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
|
-
"verifiedWith": "0.2.2-rc.
|
|
34
|
+
"verifiedWith": "0.2.2-rc.5",
|
|
35
35
|
"compatibility": {
|
|
36
36
|
"dsh": ">=0.2.2-rc.3",
|
|
37
37
|
"dshReleases": {
|
|
38
|
-
"0.2.2-rc.3": "compatible"
|
|
38
|
+
"0.2.2-rc.3": "compatible",
|
|
39
|
+
"0.2.2-rc.5": "compatible"
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
},
|
|
42
43
|
"peerDependencies": {
|
|
43
44
|
"@deepseek-ai/cordis": "^4.1.0",
|
|
44
|
-
"@deepseek-ai/dsh-tools": ">=0.2.2-rc.3",
|
|
45
45
|
"@deepseek-ai/dsh-system-prompt": ">=0.2.2-rc.3",
|
|
46
|
+
"@deepseek-ai/dsh-tools": ">=0.2.2-rc.3",
|
|
46
47
|
"@deepseek-ai/schemastery": "^3.18.2"
|
|
47
48
|
},
|
|
48
49
|
"peerDependenciesMeta": {
|