DeepSeek Harness 插件

dsh-kb-rag-breeze13

Local literature knowledge-base RAG tools for DSH: hybrid retrieval + rerank + cited answers over a SQLite index (bundled Python engine).(英文原文)

跳到安装方式

来源信息

GitHub 仓库
Breeze136/dsh-kb-rag
最近更新
2026年8月19日
分类
文档与渲染
GitHub stars
4
载体类型
plugin
包路径
npm-package
目录证据
上游声明已找到 dsh.bundle
证据路径
npm-package/package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/Breeze136/dsh-kb-rag/tree/HEAD/npm-package
插件名:dsh-kb-rag-breeze13
作者:Breeze136

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-kb-rag

![npm version](https://www.npmjs.com/package/dsh-kb-rag) ![npm downloads](https://www.npmjs.com/package/dsh-kb-rag) ![GitHub release](https://github.com/Breeze136/dsh-kb-rag/releases) ![MIT](LICENSE) ![Awesome DSH Plugin](https://beancookie.github.io/awesome-dsh-plugin) ![dsh.so security](https://www.dsh.so/artifact/kb-rag/)

Static DSH plugin (Host side): local literature knowledge-base RAG. Lightweight, fast, precise — search + cited QA, token-saving.

Import PDF / TXT / MD / DOCX files, whole folders, or a Zotero library into a local knowledge base (workspace /.kb), and run BM25 + FAISS vector + bge-reranker hybrid search so the model answers with exact provenance.

Features (8 model tools)

ToolPurpose
kb_ingestIngest files/folders (PDF/TXT/MD/DOCX, recursive scan) with incremental skip, dedup, section-aware chunking + vectorization
kb_zoteroBatch-migrate a local Zotero library (items with PDF attachments) into the KB
kb_searchHybrid search Top-N snippets + exact sources (title/authors/year/journal/DOI/section/score)
kb_ragRetrieve evidence snippets (Top-3 by default) for the model to answer directly, with citation numbers per claim
kb_scopeSet/view query scope (kb / both / web) and strict mode
kb_statsDoc/chunk/vector counts and recent ingest list
kb_dedupRemove duplicate documents (keeps the earliest)
kb_clearWipe all documents and indexes (requires explicit confirm: true)

Citation format: with DOI → authors, year, journal (clickable); without DOI → [authors, year, filename]. kb_search/kb_rag also return a related-literature list (same authors / same journal / nearby year / thematically similar) that the answer's "suggested additions" cites. Every answer ends with that note; in strict mode the answer stays within KB evidence only.

Install & Enable

Option 1 — one command (recommended, DSH profiles)

The package declares dsh.bundle, so dsh plugin add installs and activates it in one step:

dsh plugin --profile <name> add dsh-kb-rag

Requires pnpm on PATH (the official DSH plugin flow uses pnpm). Then restart DSH and open a new session — the 8 tools register automatically.

Option 2 — plugin marketplace (no terminal)

Install dsh-plugin-registry once; its Settings "plugin marketplace" panel lists kb-rag (listed in the curated awesome-dsh-plugin list) with one-click install.

Option 3 — manual

npm install dsh-kb-rag

Then activate it: add "dsh-kb-rag" to dsh.profile.bundles in the profile's package.json, or copy the bundled cordis.patch.yml insert into your own patch layer. Restart DSH and open a new session.

Guide for other Harness users

The DSH plugin loader resolves package names from the deployment's node_modules, same as official static plugins. It does not auto-download uninstalled packages at startup — the install step must run once in the deployment/profile directory first. After loading, model sessions get the 8 tools above automatically; tools are injected at session creation, so use a new conversation after the restart.

Requirements

  • Node.js ≥ 18 (host process)
  • Python 3.9+ with the packages below (if missing at first search/ingest, you will be prompted to install them):
pip install pymupdf faiss-cpu sentence-transformers

The plugin auto-checks these Python dependencies at startup: if anything is missing it prints the module and the corresponding pip install command to the host log (it does not auto-install from the network and does not block plugin loading).

The embedding model BAAI/bge-small-zh-v1.5 and reranker BAAI/bge-reranker-base download automatically on first use (local HF cache; on restricted networks set HF_ENDPOINT=https://hf-mirror.com).

  • Peer dependencies: @deepseek-ai/cordis ^4, @deepseek-ai/dsh-tools (host tool registration API).

Usage Examples

1. Ingest: kb_ingest(paths=["papers/", "notes.md"]) 2. Zotero: kb_zotero(dry_run=true) to preview, then drop dry_run for the real migration 3. Search: kb_search(query="attention is all you need", top_k=5, filters={year: ">=2018"}) 4. QA: kb_rag(query="What positional encodings does the Transformer use?", strict=true) 5. Scope: kb_scope(scope="both"); see what's in the library: kb_stats()

Data persists in the session workspace /.kb by default; every tool accepts kb_root to override.

Notes

  • This is a Host-side static plugin (all tools run server-side) and deliberately ships no browser UI / management panel: every operation and inspection happens through conversation and tool returns (search results render with clickable DOI links) — a positioning choice, not a gap.
  • The engine runs as a resident subprocess via the bundled kb_engine.py (JSON-lines protocol) and exits when the session ends.
  • On restricted networks (no HF / pip access), prepare the model cache and Python dependencies beforehand.

Security

See [SECURITY.md](SECURITY.md) for the complete execution model: what the plugin spawns, reads, writes, and downloads — and why automated scanners flag process-spawning plugins as "shell".

License

MIT