PerryLink/dsh-library7

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

包名
dsh-library
版本
0.2.11
许可证
Apache-2.0
最近更新
2026年9月12日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PerryLink/dsh-library

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.

KeyDefaultMeaning
chunkSize900Sliding-window chunk size in characters (≤ 4000)
chunkOverlap120Overlap between consecutive windows; must be smaller than chunkSize
maxFileBytes5242880Files larger than this are rejected on library_add
embedding.dims256Hash-embedding dimensionality (≥ 8)
embedding.providerhashEmbedder 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 / ollamaModelhttp://127.0.0.1:11434 / nomic-embed-textLocal Ollama endpoint + model for the ollama provider (zero cloud)
embedding.timeoutMs / graceMs / maxOutputBytes / maxBatchItems30000 / 1000 / 1048576 / 64Embedder subprocess budget
search.topK8Results returned after the full pipeline
search.hybridWeight0.60 = keyword-only, 1 = semantic-only
search.minRelevance0.15Chunks below this relevance threshold are filtered out
search.diversityLambda0.5MMR trade-off: 1 = pure relevance, 0 = pure diversity
search.lostMiddleHead / lostMiddleTail1 / 1Strongest chunks pinned to head / tail
search.maxResultChars16000Character budget of the model-facing result page
injection.enabled / maxCharstrue / 12000library_search inject behavior and budget
citation.windowChars / minScore / minSemantic150 / 40 / 0.1library_cite_check thresholds
purge.signatureLength / maxProbes4 / 24Purge verification signatures and probe budget
diagnose.maxDuplicatePairs / sampleCap / positionBins24 / 200 / 5library_diagnose budget caps