tofu-box 1.0.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 +21 -0
- package/README.md +42 -0
- package/package.json +48 -0
- package/patches/computer-use.yml +20 -0
- package/patches/mcp-ui.yml +5 -0
- package/patches/model-search.yml +5 -0
- package/patches/model-tuning.yml +24 -0
- package/patches/read-image-preview.yml +9 -0
- package/patches/shell-selector.yml +8 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 tofu-zyc (TOFU BOX)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# tofu-box(伞包)
|
|
2
|
+
|
|
3
|
+
一条命令装齐 [TOFU BOX](https://github.com/tofu-zyc/dsh-plugin-tofu-box) 的全套
|
|
4
|
+
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (dsh) 插件。
|
|
5
|
+
桌面端 / Web 端的插件管理页一次只能装一个包,本包把「六个一起装」压成一次。
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
dsh plugin --profile <你的profile> add tofu-box
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
桌面端:插件管理页的安装框里直接粘贴 `tofu-box` 即可。装完重启。
|
|
12
|
+
|
|
13
|
+
## 装到的是什么
|
|
14
|
+
|
|
15
|
+
| 子包 | 功能 |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| dsh-plugin-model-search | 模型选择菜单加搜索框 |
|
|
18
|
+
| dsh-plugin-model-tuning | 「设置 → 模型调参」:模型参数 / 标题路由 / 绘图 |
|
|
19
|
+
| dsh-plugin-read-image-preview | 工具结果图片渲染成可缩放卡片 |
|
|
20
|
+
| dsh-plugin-shell-selector | 「设置 → Shell」选择 AI 用的 shell |
|
|
21
|
+
| dsh-plugin-computer-use | 13 个 `computer_*` 桌面操作工具 |
|
|
22
|
+
| dsh-plugin-mcp-ui | 「设置 → MCP 服务器」管理页 |
|
|
23
|
+
|
|
24
|
+
各功能的说明、已知限制与兼容性见仓库
|
|
25
|
+
[README](https://github.com/tofu-zyc/dsh-plugin-tofu-box#中文)。
|
|
26
|
+
|
|
27
|
+
## 机制
|
|
28
|
+
|
|
29
|
+
本包不含任何代码,是 dsh 官方 `dsh-base` 同款的 bundle 模式:
|
|
30
|
+
`dependencies` 拉入六个子包(作为传递依赖,不会各自注册成独立层),
|
|
31
|
+
`dsh.bundle.patch` 用六个 patch 副本(`patches/`,与子包源文件逐字节一致,
|
|
32
|
+
`tools/check-umbrella-sync.mjs` 防漂移)在一个层里插入全部六条插件行。
|
|
33
|
+
Host 侧按闭包解析行,浏览器侧按行读各子包自己的 `dsh.client` 声明——
|
|
34
|
+
两条路径都是 dsh 的正式机制,无需 fork。
|
|
35
|
+
|
|
36
|
+
## 卸载与粒度
|
|
37
|
+
|
|
38
|
+
- 卸载整套:`dsh plugin --profile <p> remove tofu-box`。
|
|
39
|
+
- **本包与子包二选一,不要混装**:插件管理页按 profile 直接依赖展示,
|
|
40
|
+
伞包装完后是一个整体条目,不能在 GUI 里单独禁用/移除某一个子插件。
|
|
41
|
+
想按需取舍就别装本包,逐个安装对应的 `dsh-plugin-*` 子包。
|
|
42
|
+
- `dsh plugin update`(pnpm 语义)按 semver 更新子包,git 直装则永远追 HEAD。
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tofu-box",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"keywords": ["dsh-plugin", "deepseek-harness", "dsh", "tofu-box", "pack"],
|
|
6
|
+
"publishConfig": { "registry": "https://registry.npmjs.org" },
|
|
7
|
+
"repository": { "type": "git", "url": "git+https://github.com/tofu-zyc/dsh-plugin-tofu-box.git", "directory": "tofu-box" },
|
|
8
|
+
"bugs": { "url": "https://github.com/tofu-zyc/dsh-plugin-tofu-box/issues" },
|
|
9
|
+
"homepage": "https://github.com/tofu-zyc/dsh-plugin-tofu-box",
|
|
10
|
+
"description": "TOFU BOX 伞包:一条命令装齐 tofu-zyc 的全套 dsh 插件(model-search、model-tuning、read-image-preview、shell-selector、computer-use、mcp-ui)。本包不含代码,只做两件事:以 dependencies 拉入六个子包,以 patch 层注册它们的插件行——即 dsh-base 同款 bundle 模式。装本包或单装子包,二选一,不要混装。",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"dsh-plugin-model-search": "^1.1.1",
|
|
14
|
+
"dsh-plugin-model-tuning": "^2.0.1",
|
|
15
|
+
"dsh-plugin-read-image-preview": "^1.4.1",
|
|
16
|
+
"dsh-plugin-shell-selector": "^0.1.0",
|
|
17
|
+
"dsh-plugin-computer-use": "^2.4.1",
|
|
18
|
+
"dsh-plugin-mcp-ui": "^1.0.2"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"@deepseek-ai/dsh-tools": ">=0.1.6-alpha.1",
|
|
22
|
+
"@deepseek-ai/dsh-typert-protocol": ">=0.1.6-alpha.1",
|
|
23
|
+
"@deepseek-ai/schemastery": "^3.18.2",
|
|
24
|
+
"@deepseek-ai/dsh-session-title-llm": ">=0.1.6-alpha.2"
|
|
25
|
+
},
|
|
26
|
+
"peerDependenciesMeta": {
|
|
27
|
+
"@deepseek-ai/dsh-session-title-llm": { "optional": true }
|
|
28
|
+
},
|
|
29
|
+
"exports": {
|
|
30
|
+
"./package.json": "./package.json"
|
|
31
|
+
},
|
|
32
|
+
"dsh": {
|
|
33
|
+
"bundle": {
|
|
34
|
+
"patch": [
|
|
35
|
+
"./patches/model-search.yml",
|
|
36
|
+
"./patches/model-tuning.yml",
|
|
37
|
+
"./patches/read-image-preview.yml",
|
|
38
|
+
"./patches/shell-selector.yml",
|
|
39
|
+
"./patches/computer-use.yml",
|
|
40
|
+
"./patches/mcp-ui.yml"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"patches/",
|
|
46
|
+
"README.md"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# dsh-plugin-computer-use 自 wiring(dsh.bundle.patch 机制):安装即注册,
|
|
2
|
+
# 无需手改 profile 的 cordis.patch.yml。
|
|
3
|
+
#
|
|
4
|
+
# 只有一行 host 半区:注入 tools/attachments 两个服务,基于 Cua Driver
|
|
5
|
+
# 进程内 SDK 注册 13 个 computer_* 工具,并在 tools/pre-execute 上挂审批 gate。
|
|
6
|
+
# 不再需要 shell/fs(v1 的 PowerShell 脚本路径已移除)。
|
|
7
|
+
# UI 归 dsh-plugin-read-image-preview 的通用图像卡(computer_* 键已在其
|
|
8
|
+
# TOOL_LABELS 中注册);本包不带 client 半区。
|
|
9
|
+
#
|
|
10
|
+
# 行 config 全部可省略:
|
|
11
|
+
# maxDim: 模型帧长边上限(默认 1568;窗口截图经驱动 set_config 缩放,
|
|
12
|
+
# 桌面截图由插件自行解码缩放)
|
|
13
|
+
# settleMs: 动作序列步骤间的默认等待毫秒(默认 600)
|
|
14
|
+
# askPolicy: once-per-agent(默认,一次批准覆盖同 agent 后续动作)| always | never
|
|
15
|
+
# (会话审批策略为 never 时闸门自动放行,不会自锁)
|
|
16
|
+
# telemetry: 是否允许 Cua Driver 遥测(默认 false,注入禁用环境变量)
|
|
17
|
+
- insert:
|
|
18
|
+
- id: computer-use
|
|
19
|
+
name: dsh-plugin-computer-use
|
|
20
|
+
inject: [tools, attachments]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# dsh-plugin-model-tuning v2 — 自 wiring + 显式替换宿主自带的标题生成行。
|
|
2
|
+
#
|
|
3
|
+
# 顺序即语义:
|
|
4
|
+
# 1. 先 disable dsh-base 的 `session-title-llm` 行(@deepseek-ai/dsh-session-title-first-prompt-llm)。
|
|
5
|
+
# `ctx.sessionTitle.register()` 只允许一个 provider,第二次注册直接抛错,
|
|
6
|
+
# 所以必须先摘掉原行再插入本行;反过来 boot 会失败。
|
|
7
|
+
# 2. 再 insert 本包(v2 起一个包承担:模型参数页 + 标题路由 + 绘图工具/面板)。
|
|
8
|
+
#
|
|
9
|
+
# config 中标题预算字段与 dsh-base 的 `session-title-llm` 完全一致,因此无论
|
|
10
|
+
# 设置处于默认「继承」还是被卸载回退,标题生成的提示词预算、字节上限、
|
|
11
|
+
# 超时行为都不变。绘图 models/defaultModel 与标题 titleMode/titleProvider/
|
|
12
|
+
# titleModel 是 volatile 字段,热更新即时生效。
|
|
13
|
+
- id: session-title-llm
|
|
14
|
+
disabled: true
|
|
15
|
+
|
|
16
|
+
- insert:
|
|
17
|
+
- id: model-tuning
|
|
18
|
+
name: dsh-plugin-model-tuning
|
|
19
|
+
config:
|
|
20
|
+
targetWords: 5
|
|
21
|
+
targetCjkCharacters: 10
|
|
22
|
+
maxInputBytes: 4096
|
|
23
|
+
maxOutputTokens: 64
|
|
24
|
+
timeoutMs: 60000
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# dsh-plugin-read-image-preview 自 wiring(dsh.bundle.patch 机制):安装即注册,
|
|
2
|
+
# 无需在 profile 的 cordis.patch.yml 手动 insert。
|
|
3
|
+
#
|
|
4
|
+
# 两半同属一行:node half(index.js)在回环上注册取图路由,browser half
|
|
5
|
+
# (client.js,dsh.client 声明)把 read_image 的展示位接管为常驻预览卡。
|
|
6
|
+
- insert:
|
|
7
|
+
- id: read-image-preview
|
|
8
|
+
name: dsh-plugin-read-image-preview
|
|
9
|
+
inject: [webServer, fs]
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# One insert over the existing profile composition. This bundle deliberately does
|
|
2
|
+
# NOT override, disable, or replace any shipped row: the shell executor row
|
|
3
|
+
# (`pwsh-sandbox`) keeps providing `ctx.shell`, and this plugin only reads its
|
|
4
|
+
# live facts and writes the already-supported `shell.pwshPath` setting.
|
|
5
|
+
- insert:
|
|
6
|
+
- id: shell-selector
|
|
7
|
+
name: dsh-plugin-shell-selector
|
|
8
|
+
inject: [settings]
|