b8yg7vjstj-ctrl/dsh-llamacpp-bridge
DeepSeek Harness plugin: local llama.cpp (llama-server) as a first-class model provider — process/router management, catalog sync with mmproj vision pairing, auto-start, stop-then-load switching, and a sidebar terminal monitor panel.
Project Overview项目介绍
dsh-llamacpp-bridge is a native double-bundle plugin built specifically for DSH's web profile, designed to integrate a local llama.cpp llama-server runtime as a first-class model provider called llamacpp inside DSH's model selector. The package is split into a Node ESM host that registers the llamacpp route, manages llama-server child processes, synchronizes the models directory, and exposes a same-origin HTTP/SSE data plane, while the browser-side client bundle renders a sidebar entry row, a self-contained terminal-output monitoring panel, and a graphical settings page. Installation is performed via dsh plugin --profile web add ./dsh-llamacpp-bridge-<version>.tgz from the Releases page, and the command automatically maintains ~/.dsh/profiles/web/package.json under dsh.profile.bundles; after installation the host must be restarted and the browser hard-refreshed with Cmd/Ctrl+Shift+R.
The typical workflow starts when a user picks a local GGUF model under the llamacpp group in the selector and sends a message: the plugin's ensure(model) step first stops the previously running model, then launches the target llama-server in either single-model -m <model> mode or --models-dir router mode, waits until the OpenAI-compatible port is actually ready, and only then routes the request. Vision projector files (mmproj-*.gguf) are paired with their base models via a three-tier mechanism that combines manual binding, a <model>-mmproj.gguf suffix convention, and a normalized-name prefix fuzzy match, after which the projector is passed automatically through --mmproj. The sidebar terminal panel streams SSE output in real time, supports keyword filtering, clearing, model switching, and a true terminal Ctrl+C → Y graceful stop. The plugin targets developers who want to power DSH conversations with local llama.cpp models, particularly on Apple Silicon Macs.
Dependencies include Node ≥ 20, an installed DSH web profile that can load the plugin's client half-bundle, and a locally built llama-server; macOS and Linux are supported, with Apple Silicon explicitly verified and Windows untested (the gracefulStop routine falls back to a pipe mode there). The models directory stays in sync through a startup full rescan, fingerprint-based lazy rescans, fs.watch, plus a 30-second polling fallback, and display names longer than 30 characters are truncated to the first 30 characters followed by ... while the internal id remains intact. First-run caveats include killing the host listening on port 3080 via lsof -nP -iTCP:3080 -sTCP:LISTEN then relaunching with dsh web, force-refreshing the browser to clear stale bundles, and avoiding ERR_PNPM_IGNORED_BUILDS by adding allowBuilds: { fsevents: true, sharp: true } to the profile's pnpm-workspace.yaml. Source builds require npm install first and then npm run link:dsh to link the @deepseek-ai/* type packages shipped alongside DSH, and the type layer uses minimal structural typing to keep the plugin compiling across DSH revisions. The license is MIT.
dsh-llamacpp-bridge 是一个面向 DeepSeek Harness(DSH)web profile 的双包原生插件,把本机 llama.cpp(llama-server)接入为 DSH 模型选择器中的 llamacpp 一等 Provider。它由 Node ESM 端的 host 与浏览器端的 client bundle 组成:host 注册 llamacpp 路由、管理 llama-server 子进程并提供同源 HTTP/SSE 数据面;client 在侧边栏渲染入口行、自持终端监控面板与设置页图形引导。安装方式为从 Release 下载 tgz 后执行 dsh plugin --profile web add ./dsh-llamacpp-bridge-<版本>.tgz,插件会自动写入 ~/.dsh/profiles/web/package.json 的 dsh.profile.bundles。
典型工作流:用户在模型选择器中选定 llamacpp 分组下的本地 GGUF 模型并发起消息,插件先确保旧模型停止、再 ensure 启动目标 llama-server(单模型模式或 --models-dir router 模式),就绪后才走 OpenAI 兼容端口;mmproj 视觉投影通过手动绑定、<模型名>-mmproj.gguf 后缀约定与 mmproj-*.gguf 前缀模糊配对三级机制自动跟随加载。侧边栏「llama.cpp 终端输出监控」面板提供实时 SSE 日志、关键字过滤、清屏、模型切换与 Ctrl+C → Y 优雅退出。它适合想用本机 GGUF 跑 DSH 推理的开发者,尤其是 Apple Silicon Mac 用户。
依赖与首次运行注意事项:要求 Node ≥ 20、DSH web profile、本机已编译出 llama-server;macOS / Linux 可用,Windows 未验证。模型目录通过启动全量重扫、目录指纹按需重扫、fs.watch 与 30 秒兜底轮询保持同步;显示名超过 30 字符会自动截断为前 30 字加 ...,但内部 id 保持完整。安装后必须重启 host(lsof -nP -iTCP:3080 -sTCP:LISTEN 取 PID 后 kill,再 dsh web)并在浏览器 Cmd/Ctrl+Shift+R 强制刷新,否则会撞上旧 bundle 缓存报错。从源码构建需先 npm install,再 npm run link:dsh 链接本机 DSH 的 @deepseek-ai/* 类型包,类型层采用最小结构类型以兼容 DSH 版本演进;遇到 ERR_PNPM_IGNORED_BUILDS 需在 profile 的 pnpm-workspace.yaml 中放行 fsevents/sharp。许可证为 MIT。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-llamacpp-bridge(b8yg7vjstj-ctrl/dsh-llamacpp-bridge)
仓库:https://github.com/b8yg7vjstj-ctrl/dsh-llamacpp-bridge
本站详情页:https://www.yhbd.top/plugins/b8yg7vjstj-ctrl-dsh-llamacpp-bridge/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-10-01 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:b8yg7vjstj-ctrl/dsh-llamacpp-bridge
把 b8yg7vjstj-ctrl/dsh-llamacpp-bridge 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-llamacpp-bridge
把本地 llama.cpp(llama-server) 变成 DeepSeek Harness 的一等模型 Provider:进程与路由管理、模型目录同步、按需自动启动、先停旧再起新的模型切换,以及侧边栏「llama.cpp 终端输出监控」面板。
English | 中文
这是什么
DeepSeek Harness(DSH)默认使用云端模型。本插件让你把本机的 llama.cpp 接入进来:在 DSH 的模型选择器里直接选 llamacpp 分组下的本地 GGUF 模型,发消息时自动拉起 llama-server,并把视觉投影文件(mmproj)、上下文长度、GPU 层数等一并交代清楚。
插件是标准的 DSH 双包插件(host + client):
- host(Node ESM):注册
llamacpp模型路由、管理llama-server子进程、同步模型目录、提供同源 HTTP/SSE 数据面; - client(浏览器 bundle):侧边栏入口行 + 自持面板 + 设置页图形引导。
特性
| 能力 | 说明 |
|---|---|
| 模型路由 | 注册 llamacpp provider,与云端 provider 并存;只拥有自己的路由,不干扰其它 provider 的模型订阅 |
| 按需自动启动 | 调用前 ensure(model):服务器没跑就先跑起来,就绪后才走 OpenAI 兼容端口 |
| 先停旧再起新 | 切换模型时先把先前模型停下来,再启动目标模型(日志会写明这两步),避免显存里同时挂着两个模型 |
| 两种运行模式 | 单模型直启(-m <model>)与 router 模式(--models-dir + /models/load、/models/unload 动态装卸) |
| 目录同步 | 启动全量重扫 + 读取时按目录指纹按需重扫 + fs.watch + 兜底轮询;目录稍后才出现也能自愈监听 |
| mmproj 视觉配对 | 三级配对:手动绑定 → 后缀约定 <模型名>-mmproj.gguf → 前缀模糊配对 mmproj-*.gguf(按归一化名打分);配上就自动带 --mmproj |
| 终端输出监控面板 | 侧边栏入口行(与任务看板同级)→ 自持面板:实时 SSE 日志、流别标签、时间戳、关键字过滤、清屏、模型切换、刷新 |
| 优雅退出 | 面板按钮走真终端交互:Ctrl+C(SIGINT 到前台进程组)→ 发送 Y 确认 → 等退出;不直接强杀(详见下文) |
| 图形化引导 | 设置页自动探测 ~/llama.cpp/build/bin 等位置,列出候选可执行文件与模型目录,也可手动浏览选择 |
| 显示名截断 | 模型显示名超过 30 字符自动截断为前 30 字符 + ...(id 保持完整,不影响选择与调用) |
P0–P3 需求覆盖
| 项 | 状态 | 实现位置 |
|---|---|---|
| ① 后端模型切换(非启动脚本全量列表) | ✅ | model-store 扫描整个模型目录,与“启动脚本里的列表”解耦 |
| ② Web UI 侧边栏入口(Ollama 风格图标 + 模型切换 + 终端输出) | ✅ | DOM 注入入口行 → 自持面板:模型切换 + SSE 实时日志 |
| ③ 对话开始时自动启动 llama.cpp | ✅ | adapter.stream() → server.ensure()(真正连接端口前等待就绪) |
| ④ 切换模型前先卸载旧模型 | ✅ | ensure():先 stop() 旧模型并确认停止,再启动目标模型 |
| ⑤ 不挂钩其它模型订阅 | ✅ | 仅 llm.registerAdapter(['llamacpp'], …) |
| ⑥ 安装即生成模型配置 | ✅ | 自有设置命名空间 llamacpp-bridge + 发现命名空间(含模型/投影器配对情况) |
| P1 目录新增模型自动同步 | ✅ | 启动重扫 + 指纹按需重扫 + fs.watch + 兜底轮询 |
| P1 mmproj 与模型一同加载 | ✅ | 三级配对 + --mmproj 参数 |
| P2 依显存设置上下文长度 | ✅ | autoContext + pickContextLength 启发式 |
| P3 长上下文提示(会话内询问) | ⚠️ | 上下文长度可在设置页设定;“对话中询问”尚无官方交互缝,未实现 |
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
sfyyy/dsh-vision-bridge
liustack/modlens
Alisa0808/vox-director
ysr666/dsh-vision-router
Clarklevis1995/dsh-mobile
Mars-Sea/dsh-commandcode-provider