dsh-tool-vision 0.9.5 → 0.9.6
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 +2 -2
- package/README.zh.md +12 -12
- package/cordis.patch.yml +8 -8
- package/index.js +8 -8
- package/package.json +96 -92
package/README.md
CHANGED
|
@@ -42,9 +42,9 @@ bridge keeps its conversion inside that durable path:
|
|
|
42
42
|
key lives in that patch. Mount by package name
|
|
43
43
|
(`name: 'dsh-tool-vision'`) so the web client bundle is discovered.
|
|
44
44
|
|
|
45
|
-
## Compatibility (v0.9.
|
|
45
|
+
## Compatibility (v0.9.6)
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
Tested with DSH `0.1.7-rc.1` and `0.1.7-rc.2` (`next`); npm `latest` is `0.1.5-rc.3`.
|
|
48
48
|
This version uses Profile patch settings and browser `configForms`.
|
|
49
49
|
Older hosts require an older plugin release. Alpha builds remain `unknown`.
|
|
50
50
|
|
package/README.zh.md
CHANGED
|
@@ -15,17 +15,17 @@ DSH 0.1.1 已为 DeepSeek 视觉模型目录加入原生图片输入。本插件
|
|
|
15
15
|
|
|
16
16
|
- 除 dsh SDK 外零依赖 —— 兼容任意端点:OpenAI GPT-4o、Qwen-VL(DashScope)、GLM-4V(智谱)、Moonshot、Gemini 兼容端点、本地 Ollama 等。
|
|
17
17
|
- 注册在**全局工具层**:进程内所有 Agent 都能调用 `inspect_image`。
|
|
18
|
-
- **Web UI 设置栏(v0.3.0)**:设置 → 视觉模型 编辑 `tool-vision` 配置(API 地址、只写密钥、模型、桥接选项),写入当前 Profile patch,**改动即时生效无需重启**。插件按包名挂载(`name: 'dsh-tool-vision'`)以便 web 端发现客户端 bundle。
|
|
19
|
-
|
|
20
|
-
## 兼容性(v0.9.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
## v0.9.4:修复 Windows 图片桥导出文件名
|
|
25
|
-
|
|
26
|
-
- 导出文件名改为从完整附件 ID 生成稳定哈希;`sha256:...` 等 ID 不再写入 NTFS 备用数据流,避免出现可见主文件为 0 字节的情况。
|
|
27
|
-
- 写入前确保导出目录存在;进程内缓存按 `bridgeExportDir` 区分。
|
|
28
|
-
- 已通过 DSH `0.1.5-rc.3` 一次性 Profile 的安装、Web 启动、首页与客户端 Bundle HTTP 检查,以及卸载验证。
|
|
18
|
+
- **Web UI 设置栏(v0.3.0)**:设置 → 视觉模型 编辑 `tool-vision` 配置(API 地址、只写密钥、模型、桥接选项),写入当前 Profile patch,**改动即时生效无需重启**。插件按包名挂载(`name: 'dsh-tool-vision'`)以便 web 端发现客户端 bundle。
|
|
19
|
+
|
|
20
|
+
## 兼容性(v0.9.6)
|
|
21
|
+
|
|
22
|
+
已验证 DSH `0.1.7-rc.1` 与 `0.1.7-rc.2`(npm `next`);npm `latest` 是 `0.1.5-rc.3`。旧宿主请使用插件旧版;alpha 构建仍标记 `unknown`。
|
|
23
|
+
|
|
24
|
+
## v0.9.4:修复 Windows 图片桥导出文件名
|
|
25
|
+
|
|
26
|
+
- 导出文件名改为从完整附件 ID 生成稳定哈希;`sha256:...` 等 ID 不再写入 NTFS 备用数据流,避免出现可见主文件为 0 字节的情况。
|
|
27
|
+
- 写入前确保导出目录存在;进程内缓存按 `bridgeExportDir` 区分。
|
|
28
|
+
- 已通过 DSH `0.1.5-rc.3` 一次性 Profile 的安装、Web 启动、首页与客户端 Bundle HTTP 检查,以及卸载验证。
|
|
29
29
|
|
|
30
30
|
## 安装
|
|
31
31
|
|
|
@@ -62,7 +62,7 @@ DSH 0.1.1 已为 DeepSeek 视觉模型目录加入原生图片输入。本插件
|
|
|
62
62
|
| `maxImageBytes` | `10MB` | 本地图片大小上限 |
|
|
63
63
|
| `description` | 默认描述 | 工具描述(模型可见) |
|
|
64
64
|
| `bridgeTextOnly` | `true` | 把粘贴图片转成文本指引(发给看不懂图片的模型时) |
|
|
65
|
-
| `bridgeExportDir` | 临时目录 | 桥接图片导出目录(`os.tmpdir()/dsh-vision-bridge`);文件名使用附件 ID 的安全哈希 |
|
|
65
|
+
| `bridgeExportDir` | 临时目录 | 桥接图片导出目录(`os.tmpdir()/dsh-vision-bridge`);文件名使用附件 ID 的安全哈希 |
|
|
66
66
|
| `multimodalModels` | `[]` | 模型名单(逗号分隔)。每项按「完整 id / 末段裸 id / `provider/id`」三种写法匹配,大小写不敏感,支持 `*` `?` 通配(如 `*vl*`、`deepseek/*`)。含义由下面的模式决定 |
|
|
67
67
|
| `multimodalListMode` | `whitelist` | **名单模式(v0.9.0)**:`whitelist` 名单内模型直收图片块(旧行为);`blacklist` 名单内模型强制走桥接(用来纠正"声明支持图片但实际不支持"的模型);`off` 忽略名单。未知值一律回退 `whitelist` |
|
|
68
68
|
| `autoDetectMultimodal` | `true` | **自动识别(v0.9.0)**:按当前路由自己声明的 `inputModalities` 判定,再与名单合成(白名单取并集、黑名单取差集)。默认开启=识别到纯文本就交给桥接、识别到多模态就等同白名单成员直发图片;声明永远读"包装前"的真值,不会被 `bridgeAutoImage` 的假声明污染。设为 `false` 可退回"只认名单"的纯手工行为 |
|
package/cordis.patch.yml
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# dsh-tool-vision — bundle patch layer
|
|
2
|
-
#
|
|
3
|
-
# Declares the plugin as a Cordis loader entry, making the package a standard
|
|
4
|
-
# profile bundle: `dsh plugin --profile <p> add dsh-tool-vision` installs and
|
|
5
|
-
# mounts it without manual cordis.patch.yml edits.
|
|
6
|
-
- insert:
|
|
7
|
-
- id: tool-vision
|
|
8
|
-
name: 'dsh-tool-vision'
|
|
1
|
+
# dsh-tool-vision — bundle patch layer
|
|
2
|
+
#
|
|
3
|
+
# Declares the plugin as a Cordis loader entry, making the package a standard
|
|
4
|
+
# profile bundle: `dsh plugin --profile <p> add dsh-tool-vision` installs and
|
|
5
|
+
# mounts it without manual cordis.patch.yml edits.
|
|
6
|
+
- insert:
|
|
7
|
+
- id: tool-vision
|
|
8
|
+
name: 'dsh-tool-vision'
|
package/index.js
CHANGED
|
@@ -221,7 +221,7 @@ const Config = z.object({
|
|
|
221
221
|
/** Fixed session id override for callers without a dsh session context.
|
|
222
222
|
* Empty = auto (per-process stable id). */
|
|
223
223
|
sessionId: z.string().default(""),
|
|
224
|
-
}).volatile();
|
|
224
|
+
}).volatile();
|
|
225
225
|
|
|
226
226
|
const MIME_BY_EXT = {
|
|
227
227
|
".png": "image/png",
|
|
@@ -1165,7 +1165,7 @@ function apply(ctx, config) {
|
|
|
1165
1165
|
// would be undefined (apiKey included).
|
|
1166
1166
|
let current = config;
|
|
1167
1167
|
let sourceGetter = null;
|
|
1168
|
-
const getConfig = () => (sourceGetter ? sourceGetter() : typeof current.get === "function" ? current.get() : current);
|
|
1168
|
+
const getConfig = () => (sourceGetter ? sourceGetter() : typeof current.get === "function" ? current.get() : current);
|
|
1169
1169
|
// The registered settings scope, kept so tools can PERSIST what they measure.
|
|
1170
1170
|
// Null whenever no settings provider is mounted (composition-entry-only runs),
|
|
1171
1171
|
// in which case a probe still reports its verdict but cannot record it.
|
|
@@ -1435,12 +1435,12 @@ function apply(ctx, config) {
|
|
|
1435
1435
|
// `installSettingsSection` export (the provider now lives at ctx.settings).
|
|
1436
1436
|
// Inline the same logic via ctx.inject(["settings"]) — works on both
|
|
1437
1437
|
// 0.1.1 (module export wrapper) and 0.1.2 (ctx.settings) hosts.
|
|
1438
|
-
sourceGetter = () => typeof config.get === "function" ? config.get() : config;
|
|
1439
|
-
settingsScope = { update: (patch) => ctx.settings.update(NS, patch) };
|
|
1440
|
-
ctx.on("settings/document-updated", (id) => {
|
|
1441
|
-
if (id === NS) syncFeatures();
|
|
1442
|
-
});
|
|
1443
|
-
ctx.effect(() => () => uninstallFeatures());
|
|
1438
|
+
sourceGetter = () => typeof config.get === "function" ? config.get() : config;
|
|
1439
|
+
settingsScope = { update: (patch) => ctx.settings.update(NS, patch) };
|
|
1440
|
+
ctx.on("settings/document-updated", (id) => {
|
|
1441
|
+
if (id === NS) syncFeatures();
|
|
1442
|
+
});
|
|
1443
|
+
ctx.effect(() => () => uninstallFeatures());
|
|
1444
1444
|
|
|
1445
1445
|
// ── model catalog route: settings support, so it lives on THIS fiber ───────
|
|
1446
1446
|
// The master switch disposes the feature fiber on purpose (tools, bridge,
|
package/package.json
CHANGED
|
@@ -1,92 +1,96 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-tool-vision",
|
|
3
|
-
"version": "0.9.
|
|
4
|
-
"description": "DeepSeek Harness 外置视觉模型插件:inspect_image 把本地图片或 http(s) 图片 URL 发给任意 OpenAI 兼容端点,视觉模型看图的文字回答直接带回对话;附 Web UI 设置栏。",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "index.js",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "node tests/preview-regex.test.mjs && node tests/preview-route.test.mjs && node tests/auto-image.test.mjs && node tests/dispatch-image.test.mjs && node --test tests/bridge-export.test.mjs tests/vision-tools.test.js tests/vision-tools-tools.test.js && node --test tests/settings-scope-compat.test.mjs tests/settings-atomic-write.test.mjs tests/switch-behaviour.test.mjs tests/model-lists.test.mjs tests/model-probe.test.mjs",
|
|
9
|
-
"test:render": "node tests/render-panel.test.mjs"
|
|
10
|
-
},
|
|
11
|
-
"exports": {
|
|
12
|
-
".": "./index.js",
|
|
13
|
-
"./client": "./client.js",
|
|
14
|
-
"./package.json": "./package.json"
|
|
15
|
-
},
|
|
16
|
-
"dsh": {
|
|
17
|
-
"bundle": {
|
|
18
|
-
"patch": "./cordis.patch.yml"
|
|
19
|
-
},
|
|
20
|
-
"client": {
|
|
21
|
-
"platform": "web"
|
|
22
|
-
},
|
|
23
|
-
"compatibility": {
|
|
24
|
-
"dsh": ">=0.1.7-rc.1 <0.2.0",
|
|
25
|
-
"dshReleases": {
|
|
26
|
-
"0.1.5-rc.2": "incompatible",
|
|
27
|
-
"0.1.5-rc.3": "incompatible",
|
|
28
|
-
"0.1.6-alpha.1": "unknown",
|
|
29
|
-
"0.1.6-alpha.2": "unknown",
|
|
30
|
-
"0.1.7-alpha.1": "unknown",
|
|
31
|
-
"0.1.7-alpha.2": "unknown",
|
|
32
|
-
"0.1.7-rc.1": "compatible"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"README.
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
"dsh
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"@deepseek-ai/dsh-
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-tool-vision",
|
|
3
|
+
"version": "0.9.6",
|
|
4
|
+
"description": "DeepSeek Harness 外置视觉模型插件:inspect_image 把本地图片或 http(s) 图片 URL 发给任意 OpenAI 兼容端点,视觉模型看图的文字回答直接带回对话;附 Web UI 设置栏。",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "node tests/preview-regex.test.mjs && node tests/preview-route.test.mjs && node tests/auto-image.test.mjs && node tests/dispatch-image.test.mjs && node --test tests/bridge-export.test.mjs tests/vision-tools.test.js tests/vision-tools-tools.test.js && node --test tests/settings-scope-compat.test.mjs tests/settings-atomic-write.test.mjs tests/switch-behaviour.test.mjs tests/model-lists.test.mjs tests/model-probe.test.mjs",
|
|
9
|
+
"test:render": "node tests/render-panel.test.mjs"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": "./index.js",
|
|
13
|
+
"./client": "./client.js",
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
16
|
+
"dsh": {
|
|
17
|
+
"bundle": {
|
|
18
|
+
"patch": "./cordis.patch.yml"
|
|
19
|
+
},
|
|
20
|
+
"client": {
|
|
21
|
+
"platform": "web"
|
|
22
|
+
},
|
|
23
|
+
"compatibility": {
|
|
24
|
+
"dsh": ">=0.1.7-rc.1 <0.2.0",
|
|
25
|
+
"dshReleases": {
|
|
26
|
+
"0.1.5-rc.2": "incompatible",
|
|
27
|
+
"0.1.5-rc.3": "incompatible",
|
|
28
|
+
"0.1.6-alpha.1": "unknown",
|
|
29
|
+
"0.1.6-alpha.2": "unknown",
|
|
30
|
+
"0.1.7-alpha.1": "unknown",
|
|
31
|
+
"0.1.7-alpha.2": "unknown",
|
|
32
|
+
"0.1.7-rc.1": "compatible",
|
|
33
|
+
"0.1.7-rc.2": "compatible"
|
|
34
|
+
},
|
|
35
|
+
"node": ">=20.18",
|
|
36
|
+
"profiles": [
|
|
37
|
+
"web"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"index.js",
|
|
43
|
+
"client.js",
|
|
44
|
+
"cordis.patch.yml",
|
|
45
|
+
"README.md",
|
|
46
|
+
"README.zh.md",
|
|
47
|
+
"LICENSE",
|
|
48
|
+
"lib",
|
|
49
|
+
"vendor"
|
|
50
|
+
],
|
|
51
|
+
"homepage": "https://github.com/Scorp1o117/dsh-tool-vision",
|
|
52
|
+
"keywords": [
|
|
53
|
+
"dsh",
|
|
54
|
+
"dsh-plugin",
|
|
55
|
+
"deepseek-harness",
|
|
56
|
+
"vision",
|
|
57
|
+
"multimodal",
|
|
58
|
+
"image",
|
|
59
|
+
"openai-compatible",
|
|
60
|
+
"qwen-vl",
|
|
61
|
+
"glm-4v",
|
|
62
|
+
"ollama"
|
|
63
|
+
],
|
|
64
|
+
"license": "MIT",
|
|
65
|
+
"engines": {
|
|
66
|
+
"node": ">=20.18"
|
|
67
|
+
},
|
|
68
|
+
"repository": {
|
|
69
|
+
"type": "git",
|
|
70
|
+
"url": "git+https://github.com/Scorp1o117/dsh-tool-vision.git"
|
|
71
|
+
},
|
|
72
|
+
"bugs": {
|
|
73
|
+
"url": "https://github.com/Scorp1o117/dsh-tool-vision/issues"
|
|
74
|
+
},
|
|
75
|
+
"dependencies": {
|
|
76
|
+
"@deepseek-ai/schemastery": "^3.18.4"
|
|
77
|
+
},
|
|
78
|
+
"peerDependencies": {
|
|
79
|
+
"@deepseek-ai/dsh-settings": "^0.1.7-rc.1",
|
|
80
|
+
"@deepseek-ai/dsh-tools": "^0.1.7-rc.1",
|
|
81
|
+
"react": "^18.2.0"
|
|
82
|
+
},
|
|
83
|
+
"optionalDependencies": {
|
|
84
|
+
"potrace": "^2.1.8",
|
|
85
|
+
"puppeteer-core": "^25.6.0",
|
|
86
|
+
"sharp": ">=0.35.3 <1"
|
|
87
|
+
},
|
|
88
|
+
"devDependencies": {
|
|
89
|
+
"@deepseek-ai/dsh": "0.1.7-rc.2",
|
|
90
|
+
"@deepseek-ai/dsh-settings": "0.1.7-rc.2",
|
|
91
|
+
"@deepseek-ai/dsh-tools": "0.1.7-rc.2",
|
|
92
|
+
"jsdom": "^30.0.1",
|
|
93
|
+
"react": "^18.3.1",
|
|
94
|
+
"react-dom": "^18.3.1"
|
|
95
|
+
}
|
|
96
|
+
}
|