WeKnora
Tencent
Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
PerryLink/dsh-library
Local document knowledge base for DeepSeek Harness: library_add/remove/list, hybrid semantic+keyword library_search with diversity re-ranking, relevance filtering and lost-in-the-middle avoidance, citation-aware injection, library_cite_check and library_diagnose — SQLite-backed index via the storage domain, local embedding, zero model downloads.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:PerryLink/dsh-library
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
npm i -g dsh1024 once, then dsh1024 plugin --profile web add dsh-library (counts toward the deepseek1024.com install ranking).
Local document knowledge base for DeepSeek Harness.
Import, retrieve, verify — hybrid search with citations your agent can check.
📖 Ecosystem knowledge base — measured data, not marketing: plugin development guide · plugin-selection data · maintenance criteria.
这个插件是 DSH 插件家族的一员(40+ 个,全部 Apache-2.0)。如果你在用,给个 star —— 它不会解锁任何功能,但会让下一个人在搜索里更容易找到它。
English: part of a 40+ plugin family for DeepSeek Harness. If it is useful, a star helps the next person find it — nothing is gated behind it.
| Surface | Status |
|---|---|
| Harness | DeepSeek Harness dsh-v0.2.1-alpha.1 (verified 2026-09-25: dual typecheck rulers + 89 tests + self-contained/artifacts gates; peer range >=0.1.2-rc.1 <0.2.0 \|\| >=0.1.5-alpha.1 <0.2.0 \|\| >=0.1.6-0 <0.2.0 \|\| >=0.1.7-0 <0.2.0). Home of the family's only exercised alpha.2 host smoke (2026-09-11). |
| Node | ^22.19.0 \|\| >=24.0.0 |
| Storage | Any storage-domain backend (JSON or SQLite); the index lives in the host's storage domain |
| Models | None required — the built-in embedder is deterministic hashing (zero downloads) |
dsh-library turns local md/txt documents into a queryable knowledge base with a quality pipeline your agent can trust:
library_add / library_remove / library_list — import a document by path (chunked and embedded), remove one with purge verification (signatures of the removed content are probed against the remaining index and any residue is reported), and list document metadata.library_search — hybrid semantic + keyword ranking, maximal-marginal-relevance diversity re-rank, relevance filtering, and lost-in-the-middle avoidance (strongest chunks pinned to head and tail). With inject: true the result page is injected into the calling agent; every hit carries a [n] source marker and the injection is reconstructable from the library/inject session event (host-gated; see Permissions & data).library_cite_check — verify the [n] citations in an answer against the search result page with a fuzzy token match AND a semantic similarity check.library_diagnose — chunk-size histogram, near-duplicate chunk pairs, a self-retrieval probe, and the middle-penalty signal./library — one-line index summaries per library.document ── library_add ─▶ chunk (sliding window) ─▶ embed (hash / external cmd)
│
storage domain (documents / chunks / purges)
│
query ── library_search ─▶ hybrid score ─▶ MMR re-rank ─▶ relevance filter
│ ─▶ lost-in-middle order
▼
result page with [n] markers ── inject: true ─▶ agent + library/inject event (host-gated)
# 1. install the bundle into your profile
dsh plugin --profile web add "github:PerryLink/dsh-library#main"
# or from npm (published releases)
dsh plugin --profile web add dsh-library
# 2. restart and verify the row
dsh --profile web --dump-config | grep -A2 'id: dsh-library'
Then ask the agent to import and use a document:
> Add ./docs/spec.md to library docs, then answer: what does the spec say about retries? Cite [n] markers.
main): dsh plugin --profile web add "github:PerryLink/dsh-library#main" — the prepare script builds with production dependencies only.dsh plugin --profile web add dsh-library.pnpm pack in this repo, then dsh plugin --profile web add ./dsh-library-<version>.tgz.dsh plugin --profile web remove dsh-library (or remove the row from the profile patch).If pnpm reports
ERR_PNPM_IGNORED_BUILDSfor this package (esbuild's harmless platform-binary validation), addallowBuilds: { esbuild: true }to yourpnpm-workspace.yaml— thedshCLI prints the exact snippet.
All tunables are Schemastery Config fields (changeable from cordis.yml). An id-targeted override replaces the whole row — restate every key you need. cordis.patch.yml documents each key inline.
| Key | Default | Meaning |
|---|---|---|
chunkSize |
900 |
Sliding-window chunk size in characters (≤ 4000) |
chunkOverlap |
120 |
Overlap between consecutive windows; must be smaller than chunkSize |
maxFileBytes |
5242880 |
Files larger than this are rejected on library_add |
embedding.dims |
256 |
Hash-embedding dimensionality (≥ 8) |
embedding.provider |
hash |
Embedder backend: hash (built-in, zero downloads), command (external subprocess, requires embedding.command), or ollama (local Ollama, probed and degraded to hash when unreachable) |
embedding.command |
'' |
Optional external embedder command (space-separated argv, no shell) over ctx.subprocess; setting it selects the command provider |
embedding.ollamaUrl / ollamaModel |
http://127.0.0.1:11434 / nomic-embed-text |
Local Ollama endpoint + model for the ollama provider (zero cloud) |
embedding.timeoutMs / graceMs / maxOutputBytes / maxBatchItems |
30000 / 1000 / 1048576 / 64 |
Embedder subprocess budget |
search.topK |
8 |
Results returned after the full pipeline |
search.hybridWeight |
0.6 |
0 = keyword-only, 1 = semantic-only |
search.minRelevance |
0.15 |
Chunks below this relevance threshold are filtered out |
search.diversityLambda |
0.5 |
MMR trade-off: 1 = pure relevance, 0 = pure diversity |
search.lostMiddleHead / lostMiddleTail |
1 / 1 |
Strongest chunks pinned to head / tail |
search.maxResultChars |
16000 |
Character budget of the model-facing result page |
injection.enabled / maxChars |
true / 12000 |
library_search inject behavior and budget |
citation.windowChars / minScore / minSemantic |
150 / 40 / 0.1 |
library_cite_check thresholds |
purge.signatureLength / maxProbes |
4 / 24 |
Purge verification signatures and probe budget |
diagnose.maxDuplicatePairs / sampleCap / positionBins |
24 / 200 / 5 |
library_diagnose budget caps |
| Tool | Notes |
|---|---|
library_add |
{ path, library, name? } → document id; file read through the harness filesystem service |
library_remove |
{ library, documentId } → removal summary + purge verdict (residue reported) |
library_list |
{ library? } → document metadata (never text) |
library_search |
{ query, library, topK?, inject? } → ranked hits with [n] markers; inject: true seeds the calling agent |
library_cite_check |
{ library, query, answer } → per-citation valid/invalid verdicts (fuzzy + semantic) |
library_diagnose |
{ library } → chunk stats, duplicates, self-retrieval, middle penalty |
/library [name] |
Command: per-library document/chunk summaries |
library_add at (through the harness filesystem service and its policy) and writes into its own dsh_library storage domain. No network requests; an optional external embedder runs through ctx.subprocess without shell interpretation.library/inject (id, query, chunk ids, page size) and library/purge (verdict) are log-only audit events — the model-visible injected page is reconstructable from them. The append is host-gated: harnesses whose known-type set covers the vocabulary get the events, ignorable-envelope builds get them with the marker, and envelope-less builds (0.1.1-rc.2, 0.1.2-rc.1) skip the append — the logged tool/call + tool/result events remain the reconstructable audit trail there.
0.1.2-rc.1 (adapted 2026-09-02): the session envelope keeps its ignorable field for stored-log read compatibility only - Session.append still cannot stamp it, so audit-gate behavior is unchanged.library_remove probes the remaining index with deterministic signatures of the removed content and reports residue instead of assuming success.embedding.command (any subprocess embedder) or embedding.provider: ollama (a local Ollama embedding model) for stronger semantics.library_cite_check validates against the search result page (the [n] numbering), not against free-form source names; the fuzzy score is a bounded token-sequence partial ratio.md/txt); PDF/docx extraction is out of scope for v0.1.0.library/inject / library/purge are only appended on harnesses that can carry them (see Permissions & data); on the published 0.1.2-rc.1 line (as on earlier envelope-less lines) they are not appended, and every fact stays reconstructable from the tool call/result log.pnpm install # node ^22.19 || >=24
pnpm run typecheck # tsc: src + tests against the local harness checkout
pnpm run typecheck:ci # tsc against the published 0.1.7-rc.2 types (no paths)
pnpm test # vitest: quality ports, core vocabulary, real-stack assembly
pnpm run build # tsdown bundle + tsc declarations (lib/)
pnpm run verify:self-contained # dependency specs resolve from the registry
pnpm run verify:artifacts # built ESM face + bundle patch present
pnpm pack # the published tarball
dsh, dsh-plugin, deepseek-harness, deepseek, cordis, rag, knowledge-base, retrieval, embedding, vector-search, citation-validation, document-library
This project is one of the 44 DeepSeek Harness plugins maintained by PerryLink. If this one helps you, the others likely will too:
| Plugin | One-liner |
|---|---|
| dsh-auto-review | Second-model auto-review on the approval chain, fail-closed by default |
| dsh-autotier | Automatic strong/cheap model-tier routing with deterministic risk guards and a /tier command |
| dsh-background-agents | Durable background child agents with a Web UI sidebar, messaging and interrupt |
| dsh-budget | Cost governance for DeepSeek Harness: budgets, carbon, and latency in one panel. |
| dsh-catalog | DSH Desktop Market standard catalog source for the PerryLink family |
| dsh-cert-mcp | Read-only MCP server exposing the certification registry: grades, snapshots and five-dimension evidence |
| dsh-checkpoint-rewind | Claude Code /rewind-equivalent: snapshots, session forks, one-shot restore |
| dsh-claude-move | Migrate Claude Code sessions, memory, skills and CLAUDE.md into DSH |
| dsh-click | Cross-platform native desktop control for DeepSeek Harness — Windows first. |
| dsh-composer-history | Terminal-style input history for the web composer: arrows, Ctrl+R search |
| dsh-data-quality | Dataset quality checks and citation cross-checks (the optional numeric bridge consumed here) |
| dsh-defend | Prompt-injection, jailbreak, and secret-leak defense for DeepSeek Harness. |
| dsh-doublecheck | Engineering-discipline guard: requirements grill, test gates, adversary review |
| dsh-draw | Unified static-image generation routing for DeepSeek Harness. |
| dsh-fast | Read-only performance diagnostics for DeepSeek Harness. |
| dsh-fund-research | Deterministic research reports for Chinese public mutual funds |
| dsh-github | GitHub PR/issues integration for DSH, every write gated by approval |
| dsh-industry-research | Industry research orchestration that seals its deliverables through this plugin's ctx.researchReport.assemble |
| dsh-laya | Laya typed decisions (noul/choice/score) as a first-class Cordis service and model-visible tools |
| dsh-library | Local document knowledge base for DeepSeek Harness. |
| dsh-local-ai | Local-model (Ollama) integration for DeepSeek Harness. |
| dsh-lsp-actions | LSP diagnostics, formatting, completion, code actions and rename over language servers |
| dsh-mask | PII masking middleware: anonymize at the model boundary, restore at the display layer |
| dsh-mcp-panel | Read-only MCP runtime panel: /mcp command + Settings tab with status, tools and errors |
| dsh-memento | Approval-gated cross-session memory: ctx.memory seam + SQLite + memory tool |
| dsh-observe | OpenTelemetry and Langfuse observability exporter for DeepSeek Harness. |
| dsh-output-styles | Claude Code outputStyles-equivalent runtime style switching |
| dsh-permission-rules | Claude Code-style declarative allow/deny/ask permission rules with audit |
| dsh-plugin-certification | Community certification registry with repro-checkable grades and badges |
| dsh-plugin-doctor | Zero-dependency static + sandbox smoke detector for DSH plugins |
| dsh-plugin-guide | Plugin-development knowledge base as an on-demand agent skill |
| dsh-plugin-kit | Shared zero-runtime-dependency toolkit for the PerryLink DSH plugins |
| dsh-plugin-upgrade | One-package, one-corridor-index plugin upgrade skill: routes a repository to the matching closed corridor card |
| dsh-reach | Multi-channel approval/question bridge: WeChat/Telegram/Feishu, session console |
| dsh-research-report | Verifiable research-report engine: content-addressed evidence ledger and sealed versions |
| dsh-score | Multi-dimensional quality scoring for DeepSeek Harness plugins. |
| dsh-session-pin | Pin sessions in the Web sidebar with durable ordering |
| dsh-session-sync | Cross-device session sync for DeepSeek Harness — a dedicated git mirror of your session store. |
| dsh-skill-pack-security | Security-audit skill pack: secret scan, dependency and supply-chain review |
| dsh-talk | Voice-first session loop for DeepSeek Harness: talk to it, hear it answer. |
| dsh-team-rooms | Cross-session team rooms: shared message bus, task board and timeline |
| dsh-test-drive | Isolated install-and-smoke test drives for DeepSeek Harness plugins. |
| dsh-ticktick | TickTick/Dida365 task bridge: session-header panel + 11 tools |
| dsh-translate | Vendor parameter translation and deterministic JSON repair for DeepSeek Harness. |
All PerryLink plugins are browsable in the built-in DSH Desktop Market: Market → Sources → add source → paste https://perrylink-dsh-catalog.perrylink.workers.dev/catalog-source.json → select it. Installation still goes through the Market's npm-identity verification and your confirmation.
Apache License 2.0 © 2026 dsh-library contributors
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: developer-tools、document-library、memory、rag、vector-search。