将 LiuHe MCP 代码工具集(44 个工具)桥接进 dsh web:repo_map、符号搜索、带容错匹配的 edit_batch、带撤销日志的事务性编辑,以及确定性质量门禁——由崩溃隔离的 Rust tree-sitter 解析守护进程和 SQLite 索引支撑。
安装
# npm 包(预构建)
dsh plugin --profile web add @jieai/dsh-malong-bridge
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:wulun811/LiuHe#path:/malong/dsh/bundle
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
Official DSH (DeepSeek Harness) plugin for LiuHe / malong. One command puts all 44
malong__* MCP tools into dsh web, and malong's workspace automatically follows
the current conversation's workspace — no need to pass a path manually.
dsh plugin --profile web add @jieai/dsh-malong-bridge
pkill -f "dsh web"
dsh web --port 3456 --host 0.0.0.0
Works out of the box: the bridge locates the bundled server/mcp-server.js
(complete toolset backend; the only native dependency, better-sqlite3, ships
cross-platform precompiled binaries), so no extra deployment is needed.
pnpm 10 warns
Ignored build scripts: better-sqlite3: that is pnpm's default security policy (blocks dependency postinstall scripts). Runpnpm approve-buildsand checkbetter-sqlite3in the list (or edit~/.dsh/profiles/web/pnpm-workspace.yamland addbetter-sqlite3underonlyBuiltDependencies, thenpnpm rebuild better-sqlite3). Without this, better-sqlite3 has no native binary and tool calls will fail.Native build fallback: better-sqlite3 ships prebuilt binaries for common platforms (Node 20+); if your platform lacks a prebuilt and you have no build toolchain (Windows: Visual Studio Build Tools for node-gyp), the server automatically falls back to the vendored sql.js WASM backend (
malong/vendor/, zero native deps) — the startup log shows which backend is active. Both backends use SQLite with compatible data files.
Uninstall
dsh plugin --profile web remove @jieai/dsh-malong-bridge
pkill -f "dsh web"
dsh web --port 3456 --host 0.0.0.0
Configuration (optional, zero-config by default)
| Env var | Default | Description |
|---|---|---|
MALONG_SERVER_PATH |
bundled server/mcp-server.js |
Override the mcp-server entry (e.g. point at your own LiuHe dev copy) |
MALONG_STATE_DIR |
~/.local/state/malong-dsh |
Index/state storage dir (all workspaces isolated under it by hash) |
MALONG_TOOL_TIMEOUT_MS |
300000 |
Per tool call timeout |
You can also write a config: override on the malong-dsh-bridge entry in the
profile's cordis.patch.yml (user layer, applied later).
How It Works
DSH Agent → malong__read_symbol(...) (no workspace_dir)
→ dsh-bridge injects workspace_dir = current session workspace
→ malong mcp-server (spawned subprocess) → per-path-hash isolated indexes
- Dynamic workspace follow: every tool invocation carries the session
workspace (
exec.agent.session.header.cwd); the bridge injects it automatically; explicit paths from the model are respected (cross-workspace management). - State isolation: indexes are hash-isolated by workspace path under
MALONG_STATE_DIR, unrelated to any project directory. - Zero intrusion: does not touch dsh's node_modules; dsh upgrades are safe.
Platform support (automatic):
malong-parse(the Rust parsing service) ships as esbuild-style platform subpackages — the main package declares@jieai/malong-parse-linux-x64/-darwin-x64/-darwin-arm64/-win32-x64inoptionalDependencies, and npm/pnpm pulls only the binary for the current os/cpu at install time. Other platforms / custom binaries can be provided via theMALONG_PARSE_BINenv var.
Differences vs. the official dsh-mcp-client
The official dsh-mcp-client bridges a single MCP server; this plugin's bridge
adds dynamic workspace injection (fills workspace_dir per invocation from
the session workspace, so the model never needs to know the path) — a
capability unique to LiuHe.
Troubleshooting
| Symptom | Fix |
|---|---|
Log shows mcp tools/list timeout |
Verify the install is complete (dsh plugin reports no node_modules errors); restart dsh |
No malong__* tools in the conversation |
Confirm the bundle layer is attached (dsh web --dump-config | grep malong); hard-refresh the browser |
Call fails with missing_parameter: workspace_dir |
The conversation has no workspace (no cwd) to inject; pass a path in the prompt |
| Plugin stops working after a dsh upgrade | The plugin lives at the profile layer, upgrades do not affect it; if the cordis interface changes, reinstall the plugin |
Index Rules (Transparency)
- Default ignored:
node_modules,.git,dist,build,target,coverage,__pycache__,.venv,.malong,.ai-transactions,vendor, etc. - md/json not indexed: only code files are indexed; use a read tool for documents
.malongignorecustomization: a.malongignorefile at the project root excludes directories allowlist-style (one per line;*wildcards supported; max 100 entries)
License
MIT
链接
同类插件
Tencent/WeKnora#dsh-weknora★ 31680
把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己带引用的 RAG 或 ReAct agent 回答(含可续聊的 session id)。
superdesigndev/treg★ 3995
给 Agent 的工具目录:按「要做的事」检索约 2,600 个外部接口(SEO 与 SERP、外链、社交、人物与公司信息补全、广告库、抓取),查看参数与单次调用价格后直接调用,凭据由服务端注入。附带技能,MCP 行在未设置 TREG_TOKEN 前保持禁用。
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1130
把腾讯云 CloudBase 后端接入 DeepSeek Harness——在对话里搭好并部署全栈应用,查询结果渲染为表格卡片(分页、排序、导出 CSV),部署后可预览真实域名,并提供 CloudBase MCP 工具集(`mcp__cloudbase__*`),登录走 device-code 流程。
gitroomhq/postiz-agent#dsh-postiz★ 499
通过 MCP 将 DeepSeek Harness 连接到 Postiz:列出已连接的社交媒体渠道、获取各平台发帖规则,并向 X、LinkedIn、Instagram、Facebook、Threads、TikTok、YouTube、Reddit、Bluesky、Mastodon、Discord、Slack、Telegram 等平台排期、存草稿或发布帖子;附带 postiz 工作流技能。
EthanYoQ/Invoice-Downloader#dsh-invoice-downloader★ 477
面向 DeepSeek Harness 的本地 IMAP 发票下载、OCR 识别、归档与 Excel 报销汇总。
anysearch-team/anysearch-dsh★ 443
基于 AnySearch 的实时网页与垂直搜索插件,为 DeepSeek Harness 提供搜索工具。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。