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
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PerryLink/dsh-library说明文档
阅读完整 README ↗Configuration
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 |