dsh-tool-deny 0.1.1 → 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.md +20 -3
- package/README.zh.md +20 -3
- package/index.js +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
# dsh-tool-deny
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
<p>
|
|
6
|
+
<strong>English</strong> · <a href="README.zh.md">简体中文</a>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p>
|
|
10
|
+
<a href="https://www.npmjs.com/package/dsh-tool-deny"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-tool-deny?color=5b8def&label=npm"></a>
|
|
11
|
+
<a href="https://github.com/hhuangpanda/dsh-tool-deny/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/hhuangpanda/dsh-tool-deny/actions/workflows/ci.yml/badge.svg"></a>
|
|
12
|
+
<a href="https://awesome-dsh-plugin.com/p/hhuangpanda/dsh-tool-deny/"><img alt="Awesome DSH Plugin" src="https://awesome-dsh-plugin.com/badge.svg"></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<img alt="dsh-tool-deny" src="assets/splash.png" width="800">
|
|
16
|
+
|
|
17
|
+
</div>
|
|
4
18
|
|
|
5
19
|
Choose which tools each agent preset gets in [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (dsh).
|
|
6
20
|
|
|
@@ -21,7 +35,10 @@ Hidden tools cost no tokens, because their definitions are never sent to the mod
|
|
|
21
35
|
|
|
22
36
|
## Requirements
|
|
23
37
|
|
|
24
|
-
|
|
38
|
+
| Plugin version | Supported dsh versions |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| 0.1.2 and later | 0.2.1-rc.1 to the latest 0.2 release |
|
|
41
|
+
| 0.1.1 and earlier | 0.2.1-rc.1 to 0.2.2-rc.1 (`hideByPreset` does nothing on 0.2.2-rc.2 and later) |
|
|
25
42
|
|
|
26
43
|
## Install
|
|
27
44
|
|
|
@@ -99,7 +116,7 @@ At the root, `hideSections` applies to every preset named in `hideByPreset`. The
|
|
|
99
116
|
|
|
100
117
|
- **Failures are quiet.** If you remove the row or the plugin stops loading, the tools come back with no error. Don't rely on it as your only safeguard for a sensitive agent.
|
|
101
118
|
- **Lists are by name.** A new tool added by a plugin update stays visible until you add it.
|
|
102
|
-
- **Unknown names are skipped.** A tool name that doesn't exist logs a warning and is otherwise ignored, so check your spelling.
|
|
119
|
+
- **Unknown names are skipped.** A tool name in `hide` or `hideByPreset` that doesn't exist logs a warning and is otherwise ignored. A misspelled `deny` name gets no warning and simply never matches, so check your spelling.
|
|
103
120
|
- **It hides tools, not plugins.** The plugin keeps running. Anything it does beyond its tools, such as acting as the provider behind `web_search`, is unchanged.
|
|
104
121
|
- **Preset switches can drop tools.** Switching a new session to another preset and back can leave out `subagent`, which is dsh behavior. Starting a fresh session restores it.
|
|
105
122
|
|
package/README.zh.md
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
# dsh-tool-deny
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
<p>
|
|
6
|
+
<a href="README.md">English</a> · <strong>简体中文</strong>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p>
|
|
10
|
+
<a href="https://www.npmjs.com/package/dsh-tool-deny"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-tool-deny?color=5b8def&label=npm"></a>
|
|
11
|
+
<a href="https://github.com/hhuangpanda/dsh-tool-deny/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/hhuangpanda/dsh-tool-deny/actions/workflows/ci.yml/badge.svg"></a>
|
|
12
|
+
<a href="https://awesome-dsh-plugin.com/p/hhuangpanda/dsh-tool-deny/"><img alt="Awesome DSH Plugin" src="https://awesome-dsh-plugin.com/badge.svg"></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<img alt="dsh-tool-deny" src="assets/splash.png" width="800">
|
|
16
|
+
|
|
17
|
+
</div>
|
|
4
18
|
|
|
5
19
|
为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(dsh)中的每个智能体预设(preset)选择可用的工具。
|
|
6
20
|
|
|
@@ -21,7 +35,10 @@
|
|
|
21
35
|
|
|
22
36
|
## 环境要求
|
|
23
37
|
|
|
24
|
-
|
|
38
|
+
| 插件版本 | 支持的 dsh 版本 |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| 0.1.2 及更高 | 0.2.1-rc.1 至最新的 0.2 版本 |
|
|
41
|
+
| 0.1.1 及更早 | 0.2.1-rc.1 至 0.2.2-rc.1(在 0.2.2-rc.2 及以上版本中 `hideByPreset` 不生效) |
|
|
25
42
|
|
|
26
43
|
## 安装
|
|
27
44
|
|
|
@@ -99,7 +116,7 @@ config:
|
|
|
99
116
|
|
|
100
117
|
- **失效时不会报错。** 如果移除了该行,或插件无法加载,工具会悄悄恢复。不要把它作为敏感智能体的唯一保护措施。
|
|
101
118
|
- **按名称列出。** 插件更新新增的工具在你添加之前仍然可见。
|
|
102
|
-
- **未知名称会被跳过。**
|
|
119
|
+
- **未知名称会被跳过。** `hide` 或 `hideByPreset` 中不存在的工具名只会记录一条警告,其余情况下被忽略。`deny` 中拼错的名称不会有警告,只是永远不会匹配,请仔细检查拼写。
|
|
103
120
|
- **隐藏的是工具,而不是插件。** 插件仍在运行。它在工具之外的行为(例如作为 `web_search` 背后的提供方)不会改变。
|
|
104
121
|
- **切换预设可能丢失工具。** 将新会话切换到另一个预设再切回来,可能会丢失 `subagent`,这是 dsh 本身的行为。开启新会话即可恢复。
|
|
105
122
|
|
package/index.js
CHANGED
|
@@ -50,7 +50,7 @@ function hideByPreset(ctx, toolNamesByPreset, sectionNames) {
|
|
|
50
50
|
if (toolNames) undoByAgent.set(agent, hide(agent.ctx, sctx.logger, toolNames, sectionNames))
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
for (const agent of sctx.agents.
|
|
53
|
+
for (const agent of sctx.agents.list()) refresh(agent)
|
|
54
54
|
sctx.on("agent/created", ({ agent }) => {
|
|
55
55
|
refresh(agent)
|
|
56
56
|
return undefined
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-tool-deny",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Hide or refuse named tools per agent preset in DeepSeek Harness. Can also hide system prompts added by tools. Useful when plugins force tools on all agent presets.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"index.js",
|
|
22
22
|
"cordis.patch.yml",
|
|
23
23
|
"README.md",
|
|
24
|
+
"README.zh.md",
|
|
24
25
|
"LICENSE"
|
|
25
26
|
],
|
|
26
27
|
"keywords": [
|