dsh-plugin-verified-search
f0909172434
Verified current-source search workflow for DeepSeek Harness
PROJECT TOPICS
PROJECT README
DeepSeek Harness 组合包(bundle)插件:为纯文本模型提供视觉能力。
vision_analyze 工具:读取图片文件 → 调用 VLM(默认 ModelScope Qwen/Qwen3-VL-8B-Instruct)→ 返回文字描述。
适合当前模型(如 deepseek-v4-flash)不支持图片输入时:
question 参数)dsh-vlm-bridge/
├── package.json # dsh.bundle manifest + dependencies
├── cordis.patch.yml # 插入 dsh-vlm-bridge 插件行的 patch 层
├── index.js # 插件实现(name / inject / Config / apply)
├── scripts/
│ ├── verify.mjs # 自检脚本(模块解析 + schema + 工具注册 + 真实 VLM E2E)
│ └── demo.png # E2E 测试用图(真实 UI 截图,非 1×1/64×64 占位)
└── README.md
dsh plugin --profile web add github:me9rez/dsh-vlm-bridge
# bundle 层在启动时读取,安装后需重启 dsh 进程
dsh --profile web --dump-config # 应看到 "# == dsh-vlm-bridge" 层
其他分发方式:
# 从 npm 安装(已发布后)
dsh plugin --profile web add dsh-vlm-bridge
# 从 tarball 安装(无需构建权限)
pnpm pack && dsh plugin --profile web add ./dsh-vlm-bridge-0.1.4.tgz
# 从本地目录安装(开发时)
dsh plugin --profile web add C:/workspace/dsh-vlm-bridge
# 维护
dsh plugin --profile web update dsh-vlm-bridge # 更新
dsh plugin --profile web remove dsh-vlm-bridge # 卸载(同时移除 bundle 层)
参考 dsh 生态做法(如
dsh-agent-teams的安装方式:dsh plugin --profile web add github:NanmiCoder/dsh-agent-teams)——dsh 支持直接从 GitHub 安装 bundle 包。
配置层由 cordis.patch.yml 提供:插入 dsh-vlm-bridge 插件行(id 可被用户层覆盖)。
单一来源:baseUrl/model 等只从 config 来(schema 默认值兜底);密钥只从 credentials 来。
| Config 字段(patch 层 config:) | 类型 | 默认值 | 说明 |
|---|---|---|---|
baseUrl |
string | https://api-inference.modelscope.cn/v1 |
VLM API 地址 |
model |
string | Qwen/Qwen3-VL-8B-Instruct |
VLM 模型名 |
cacheTtlMs |
number | 600000 |
识别结果缓存时长 ms |
cacheMax |
number | 64 |
缓存条目上限 |
fetchTimeoutMs |
number | 120000 |
VLM 请求超时 ms |
maxTokens |
number | 4096 |
VLM 输出 token 上限(图片详细描述易超过 1024,调大缓解截断/空内容) |
logFile |
string | os.tmpdir()/dsh-vlm-plugin/dsh-vlm-bridge.log(即 %TEMP%) |
日志路径 |
凭证(~/.dsh/.credentials.yaml,密钥唯一来源):VLM_API_KEY(必需)。
注意:VLM_BASE_URL / VLM_MODEL 不再从 credentials 读取(0.1.0 单一来源化),
要改端点/模型请在 config 里配。
示例(profile 的 cordis.patch.yml,覆盖 bundle 层已有的行):
# 顶层直接按 id 覆盖——不需要 insert/update 关键字。
# 覆盖 = 整行 config 替换:未写出的键回落 schema 默认值。
# 本 bundle 层 config 为空,所以只写想改的键即可。
- id: dsh-vlm-bridge
config:
model: glm-5.2-vision # 换 VLM
cacheTtlMs: 300000 # 想改就写,不想改可省(回落默认 600000)
若 bundle 未提供该行(如本地 --patch overlay),用 insert 提供:
- insert:
- id: dsh-vlm-bridge
name: dsh-vlm-bridge
config:
model: sensenova-6.8-flash-lite
覆盖规则:patch 按 id 整行替换 config,不深度合并。如果 bundle 层的行带显式 config,覆盖时必须重述想保留的全部键(否则回落到 schema 默认值);值等于 schema 默认的键可以省略。
@deepseek-ai/* 模块解析bundle 通过 pnpm link: 装进 profile 时是 junction 链接,Node 按 realpath 解析
bundle 内 import '@deepseek-ai/dsh-tools',即从 bundle 目录向上找 node_modules。
开发模式(bundle 源在外部目录):本机解法是在源目录旁建 junction 指向 dsh 安装目录的依赖:
New-Item -ItemType Junction -Path "C:\workspace\dsh-vlm-bridge\node_modules\@deepseek-ai" `
-Target "C:\Users\15165\.dsh\profiles\node_modules\@deepseek-ai"
GitHub / tarball / npm 安装:包被复制进 profile 依赖树,向上能找到 hoisted
的 @deepseek-ai,无此问题。
dsh publish 文档关于 git 安装的注意事项同样适用:若决定不预先打包 tarball, 用户需要在 pnpm-workspace.yaml 里授权
allowBuilds,否则 git 安装的 prepare 脚本会被 pnpm 10+ 拒绝运行。
node scripts/verify.mjs
覆盖:模块解析、Config schema 校验(默认值/非法配置报错)、apply() 工具注册、
真实 VLM 调用 E2E(需 credentials 里有 VLM_API_KEY,否则跳过 E2E)。
dsh-agent-teams 的 github:NanmiCoder/dsh-agent-teams 安装用法)。scripts/demo.png,不再依赖外部路径)。https://api-inference.modelscope.cn/v1 +
Qwen/Qwen3-VL-8B-Instruct(Sensenova 接口慢,降级为可配项)。maxTokens 可配置(默认 4096);空内容报错区分"推理占用全部 token"与"无输出";
截断时在结果末尾附加提示;logFile 默认值改为动态 os.tmpdir()(不再写死本机路径)。baseUrl/model 只从 config 来(schema 默认值兜底),
密钥 VLM_API_KEY 只从 credentials 来;新增 scripts/verify.mjs 自检脚本。CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。