dsh-plugin-verified-search
f0909172434
Verified current-source search workflow for DeepSeek Harness
PROJECT TOPICS
PROJECT README
An independent, local-only retrieval plugin for DeepSeek Harness. It gives any tool-capable chat model one explicit search_local_memory tool instead of injecting retrieval into every turn.
This is the RAG branch of the Mindspace/DSH plugin family. Its retrieval design is based on lessons from ARPM, but it is not a direct transplant of ARPM's chat route:
defineTool mechanism so the active model decides when to search;compaction/end ingestion, per-session isolation, source provenance, document revisions, and a local model lifecycle;This repository is not coupled to mindspace-dsh-session-memory, and the two are not developed as one monolithic plugin.
| Capability | This repository: Local RAG | Structured-memory plugin |
|---|---|---|
| Responsibility | On-demand retrieval over large documents and older summaries | User profile, preferences, AI instructions, relationship mission, and roleplay preset |
| Model access | Standard tool calling | Governed personalization supplied to the active session |
| Package/repository | mindspace-dsh-local-rag |
mindspace-dsh-session-memory |
| Persistence | <DSH_HOME>/mindspace-local-rag/ |
Its own independent data store |
| Dependency | Does not depend on structured memory | Does not depend on Local RAG |
Local RAG can be installed or removed independently, but a profile must enable exactly one structured-memory implementation that provides the sessionMemory service. When an integrated DSH checkout already bundles V2 memory, do not also mount the legacy mindspace-dsh-session-memory package: the duplicate service registration fails during cold start. Conversation summaries in this RAG come directly from native DSH compaction events; they are not read from the structured-memory plugin.
compaction/end summaries are deduplicated against older summaries and the recent uncompacted surface before indexing.local-rag://source/... address; the model can filter a second search by source/document or page through bounded extracted text without receiving a filesystem path.Requirements: Node.js 22.19+ (or 24+), pnpm, and a local DeepSeek Harness checkout.
pnpm install
pnpm run check
pnpm dsh plugin --profile web add A:\path\to\mindspace-dsh-local-rag\dist\mindspace-dsh-local-rag-0.3.3.tgz
pnpm dsh web
Open Settings → Local RAG. Files can be uploaded and searched lexically before an embedding model is running. The first plugin install also obtains the Node ONNX native runtime; this is the model runtime, and it is not loaded during DSH cold start. The built-in verified model is shibing624/text2vec-base-chinese (ONNX, 768 dimensions, approximately 407 MB); the catalog is extensible but does not advertise unverified downloads.
The plugin stores its model and index beneath:
<DSH_HOME>/mindspace-local-rag/
Importing before the model is ready is safe. Downloading does not load ONNX or silently rebuild vectors; start the model explicitly and rebuild only when the settings page reports stale vectors.
The registered guidance is intentionally small:
Initial model retrieval needs only query and scope; a returned documentId or sourceId may be used for a same-source follow-up. Candidate counts, RRF parameters, output limits, filesystem paths, download sources, and model choice remain deployment-controlled.
The settings page provides:
No remote embedding API is used. Network access is required only while downloading the pinned model artifacts.
pnpm install
pnpm run build
pnpm run test
pnpm pack --pack-destination dist
The suite covers real PDF/DOCX parsing, TSV provenance, deterministic RRF, scope isolation, lexical degradation, persistence/migration, committed compaction validation and deduplication, chunked upload safety, ModelScope-to-Hugging-Face fallback, resumable downloads, integrity and model lifecycle, strict Remote parity, and bounded tool output.
0.3.3 is the startup-reliability fix for the governed dual-corpus release. It intentionally avoids reranking and user-configurable Top-K until retrieval quality has been measured with real files, compaction summaries, and revision workflows.
MIT licensed.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。