hy-sde/dsh-tool-library-search--packages-tool-library-search ↗★ 1
@hy-sde-org/dsh-tool-library-search
Model-facing library_search tool: free cross-ecosystem (npm/crates.io/Maven/Go/PyPI/RubyGems + GitHub) 'has this already been built?' search — exact-name ranked, stars/downloads as fitness signals, no API key required
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add 'github:hy-sde/dsh-tool-library-search#3733e6d774a0cf9f03a281fd2fc748693454b085&path:packages/tool-library-search'说明文档
阅读完整 README ↗Configuration
import toolLibrarySearch from '@hy-sde-org/dsh-tool-library-search'
ctx.plugin(toolLibrarySearch, {
timeoutMs: 12000, // per-source transport timeout (default 10000; validated 1..120000)
maxResults: 20, // default result cap after merge+rank (default 15; validated 1..100)
perSourceLimit: 8, // per-source hit cap before merge; >100 pages GitHub when a token is set (validated 1..500)
githubToken: 'ghp_…', // optional: raises GitHub repo-search quota 10/min → 30/min AND enables paging; sent ONLY to api.github.com
semantic: true, // enable README-similarity rerank (default false)
embedderModel: 'Xenova/all-MiniLM-L6-v2', // optional local model id
semanticPoolSize: 50, // candidates entering the rerank before maxResults cut (validated 1..500)
prompt: true, // register the library:search prompt section (default true; false suppresses it)
})
Out-of-range or non-integer numeric config fails fast at plugin apply time.
Per-call args.maxResults is likewise validated and caps the result without
over-fetching (the search pool is sized from the effective cap up front).
Install the optional peer to activate semantic rerank:
npm i @huggingface/transformers(orpnpm add @huggingface/transformers). The first call downloads ~25 MB of model weights; subsequent calls reuse the in-memory pipeline. Without the peer the tool still fully works lexically.
Install as a preset/patch row via the bundled cordis.patch.yml (row id hy-sde-libsearch-tool-library-search), which also registers the library:search prompt section.