onclaw-dev/dsh-ima-copilot
腾讯 IMA 是一个非常好的知识库应用,但是他们提供的skill版本针对公开知识库的检索方式只提供了基于文件标题的关键字检索,好一阵无语。为了补足在harness的这种知识库检索能力,基于tencent-ima-copilot-mcp迭代了对应的dsh版本。
Project Overview项目介绍
dsh-ima-copilot is a native DeepSeek Harness plugin that wires Tencent IMA Copilot knowledge-base question answering directly into the host. It registers an ima_ask tool so an agent can semantically query one or more IMA knowledge bases, summarise the reply, and return the answer body together with reference IDs, titles, and knowledge-base names. The plugin talks to IMA over its web session endpoint, relies on the DSH native Connection or Gateway Remote adapter interfaces, and ships as an npm package or GitHub tarball installed with dsh plugin --profile web add dsh-ima-copilot (or add https://github.com/onclaw-dev/dsh-ima-copilot.git), followed by restarting the Web profile and confirming the entry appears in dsh --profile web --dump-config.
The intended workflow starts in the DSH web settings page under "Settings → Plugins → IMA Copilot", where the user pastes the full X-Ima-Cookie and X-Ima-Bkn request headers harvested from the browser DevTools Network panel on an /cgi-bin/assistant/qa call, then lists knowledge-base IDs harvested from an init_session payload, one per line or comma separated. Once saved through the DSH Credentials API, the agent can call ima_ask(question, knowledgeBaseId?); with a single knowledge base the target is picked automatically, while multi-base setups require an explicit ID, otherwise the request fails locally with a configuration hint before any IMA call. Each invocation rebuilds a one-shot IMA session, so no cross-call conversation history is retained, and the plugin is best suited for developers and teams who want DSH agents to cite private or team IMA libraries without standing up a separate MCP or Python daemon.
Runtime requirements are Node.js ^22.19.0 or >=24.0.0, plus @deepseek-ai/dsh-client-ui-settings-plugins for the settings UI; plaintext credentials are never rendered back in the web page and only travel through the DSH Credentials API. Defaults are a 300-second per-request timeout, up to 3 retries on transient failures, and a concurrency cap of 1. The compatibility matrix verifies the same untouched package against DSH releases from dsh-v0.1.0-rc.7 through dsh-v0.1.5-alpha.1, with dsh-v0.1.2-alpha.1 and dsh-v0.1.3-alpha.1 marked unsupported because of an upstream Node 24 client-loader bug and unpublished exact dependencies respectively; live IMA verification was never executed because IMA's web API is not a public stable contract, so users must observe the upstream service terms, and the plugin itself is MIT-licensed, derived from highkay/tencent-ima-copilot-mcp, and unaffiliated with Tencent or DeepSeek.
dsh-ima-copilot 是面向腾讯 IMA Copilot 的 DeepSeek Harness 原生插件,将知识库问答注册为 ima_ask 工具,使 Agent 可按问题语义检索 IMA 知识库、归纳答案并返回引用资料。它无需运行独立 MCP、Python 服务或常驻子进程,通过 DSH 原生 Connection 或 Gateway Remote 接口集成,并随 npm 包或 GitHub 仓库经由 dsh plugin --profile web add 命令安装至 Web profile。
典型用法是先在 DSH Web 设置页“设置 → 插件 → IMA Copilot”中填写 Cookie、BKN 凭证与知识库 ID,再让 Agent 调用 ima_ask(question, knowledgeBaseId?) 即可拿到 answer 和 references。该插件适合需要在 DSH 会话中直接引用 IMA 个人或团队知识库、又要避免维护额外进程的开发者与团队,但它不保留跨调用对话历史,配置缺失或 ID 不在列表时会在访问 IMA 前失败并返回提示。
依赖方面要求 Node.js ^22.19.0 或 >=24.0.0,Web 设置页依赖 @deepseek-ai/dsh-client-ui-settings-plugins,凭证明文不回显且仅通过 DSH Credentials API 读写,默认超时 300 秒、最多重试 3 次、并发上限 1。版本兼容验证矩阵覆盖 dsh-v0.1.0-rc.7 至 dsh-v0.1.5-alpha.1,部分 alpha 版因上游缺陷仅完成源码审计。IMA API 并非公开稳定接口,真实凭证在线验证未执行,项目按 MIT 授权,与腾讯或 DeepSeek 官方无隶属关系,使用者需自行遵守相关服务条款。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-ima-copilot(onclaw-dev/dsh-ima-copilot)
仓库:https://github.com/onclaw-dev/dsh-ima-copilot
本站详情页:https://www.yhbd.top/plugins/onclaw-dev-dsh-ima-copilot/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-09-09 · 主语言 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 dsh-ima-copilot
把 onclaw-dev/dsh-ima-copilot 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-ima-copilot
腾讯 IMA Copilot 的 DeepSeek Harness 原生插件。它将知识库问答注册为 ima_ask 工具,
让 Agent 可以按问题语义检索 IMA 知识库、归纳答案并返回引用资料,无需额外运行 MCP、
Python 服务或常驻子进程。

功能
- 使用原生
ima_ask工具查询一个或多个 IMA 知识库。 - 返回回答正文以及资料 ID、标题和知识库名称等引用信息。
- 通过 Web 设置页维护认证信息和知识库 ID,更新后无需重启 DSH。
- 提供超时、并发限制、瞬时失败重试和请求取消处理。
- 凭证仅通过 DSH Credentials API 读写,不在 Web 页面回显。
安装
运行环境:
- Node.js
^22.19.0或>=24.0.0 - 兼容的 DSH 版本见版本兼容验证矩阵
- Web 设置页需要
@deepseek-ai/dsh-client-ui-settings-plugins
从 npm 安装:
dsh plugin --profile web add dsh-ima-copilot
dsh web
也可以从 GitHub 安装:
dsh plugin --profile web add https://github.com/onclaw-dev/dsh-ima-copilot.git
dsh web
安装后重启 Web profile。以下命令的输出中应包含 ima-copilot:
dsh --profile web --dump-config
配置
打开“设置 → 插件 → IMA Copilot”,填写:
| 字段 | DSH 凭证引用 | 说明 |
|---|---|---|
| X-Ima-Cookie | IMA_X_IMA_COOKIE |
IMA 请求的完整 Cookie |
| X-Ima-Bkn | IMA_X_IMA_BKN |
IMA 请求头中的业务密钥 |
| 知识库 ID | IMA_KNOWLEDGE_BASE_IDS |
每行一个 ID,也可使用逗号分隔 |
获取配置值:
- 登录 IMA Copilot。
- 打开浏览器开发者工具的 Network 面板,在 IMA 中发送一条消息。
- 找到
/cgi-bin/assistant/qa请求,从同一请求的原始请求头复制完整x-ima-cookie和x-ima-bkn。不要使用包含省略号的截断值。 - 在目标知识库页面找到
init_session请求,从请求体读取knowledge_base_id。
保存知识库 ID 时需要提交完整列表,新列表会替换旧列表。设置页只显示凭证是否已配置, 不会读取或展示已保存的明文。
工具说明
ima_ask
| 参数 | 必填 | 说明 |
|---|---|---|
question |
是 | 要向 IMA 知识库提出的非空问题 |
knowledgeBaseId |
否 | 目标知识库 ID;配置多个知识库时必填 |
返回结果包含回答正文和引用资料:
{
"answer": "回答正文",
"references": [
{
"id": "资料 ID",
"title": "资料标题",
"knowledgeBase": "知识库名称"
}
]
}
配置单个知识库时插件会自动选择;配置多个知识库时必须传入列表中的
knowledgeBaseId。配置缺失、列表为空或 ID 不在列表中时,请求会在访问 IMA 前失败并
返回配置提示。
每次调用都会读取最新凭证、创建一次性 IMA 会话并在结束后释放资源,因此不保留跨调用的 对话历史。默认请求超时为 300 秒,瞬时失败最多重试 3 次,并发上限为 1。
版本兼容验证矩阵
下表最后验证于 2026-09-09。“通过”表示同一个未改写插件包已在该 DSH Release 的精确依赖 环境中完成安装、Client 启动和 Host 工具契约测试;不等同于使用真实 IMA 凭证完成在线问答。
| DeepSeek Harness Release | 适配接口 | 结果 | 说明 |
|---|---|---|---|
dsh-v0.1.0-rc.7 |
Connection | 通过 | 已完成同包验证 |
dsh-v0.1.0-rc.8 |
Connection | 通过 | 已完成同包验证 |
dsh-v0.1.1-rc.1 |
Connection | 通过 | 已完成同包验证 |
dsh-v0.1.1-rc.2 |
Connection | 通过 | 已完成同包验证 |
dsh-v0.1.2-alpha.1 |
Gateway Remote | 不支持 | 上游 Node 24 Client Loader 缺陷,仅完成源码审计 |
dsh-v0.1.2-alpha.2 |
Gateway Remote | 通过 | 已完成同包验证 |
dsh-v0.1.2-alpha.3 |
Gateway Remote | 通过 | 已完成同包验证 |
dsh-v0.1.2-alpha.4 |
Gateway Remote | 通过 | 已完成同包验证 |
dsh-v0.1.2-alpha.5 |
Gateway Remote | 通过 | 已完成同包验证 |
dsh-v0.1.2-rc.1 |
Gateway Remote | 通过 | 已完成同包验证 |
dsh-v0.1.3-alpha.1 |
Gateway Remote | 不支持 | 精确依赖未发布,不能声明 registry 安装支持 |
dsh-v0.1.3-alpha.2 |
Gateway Remote | 通过 | 已覆盖凭证服务延迟就绪场景 |
dsh-v0.1.5-alpha.1 |
Gateway Remote | 通过 | 已完成同包验证 |
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
mindscale-noah/MindMemOS
Aik358/dsh-auto-memory
AskTheWay/dsh-auto-memory
fishzjp/qa-skills
WeirdSky924/agent-handoff-skill