DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Semantic Search — DeepSeek Harness 插件(DSH Plugin)
← Plugins
S

dsh-semantic-search

Semantic Search

用于本地语义代码搜索的 DeepSeek Harness (dsh) 插件。为工作区构建片段级索引(支持多种语言的符号感知分块),计算本地嵌入(默认使用轻量级词法 TF-IDF 特征向量,或使用可配置的 OpenAI 兼容嵌入端点),并使用混合检索回答自然语言查询(向量余弦相似度 + BM25,通过倒数排名融合进行合并)

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:JohnXu22786/semantic-search#601c3f581506ee202591b2202e18ccd8abad380a
README兼容性版本

说明

用于本地语义代码搜索的 DeepSeek Harness (dsh) 插件。为工作区构建片段级索引(支持多种语言的符号感知分块),计算本地嵌入(默认使用轻量级词法 TF-IDF 特征向量,或使用可配置的 OpenAI 兼容嵌入端点),并使用混合检索回答自然语言查询(向量余弦相似度 + BM25,通过倒数排名融合进行合并)。随附 dsh 工具 sema_search / sema_reindex / sema_stats,以及独立 CLI。

兼容性与来源证明

Semantic Search 以 dsh-semantic-search 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/8/20

版本

0.1.0stable
2026/8/20

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 2
周下载
0
最近提交
2026/9/12
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

相关插件

继续浏览 developer-tools 分类下经过校验的插件。

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Sdk Minimal@deepseek-ai/dsh-sdk-minimal独立的最小 SDK 配置包:JSON-RPC、一个 DeepSeek 适配器、持久化 Shell 和 JSONL 会话Sdk App@deepseek-ai/dsh-sdk-appdsh SDK 配置包:基于 dsh-base 提供 stdio JSON-RPC 服务和进程生命周期管理Subagent Codex@deepseek-ai/dsh-subagent-codex基于官方 app-server 协议的一次性 Codex 子代理提供程序

README

dsh-semantic-search

Local semantic code search for DeepSeek Harness (dsh) — and any Node script.

中文文档:README.zh.md

sema builds a fragment-level index of a workspace: source is tokenized by a language-aware tokenizer (camel/snake/kebab splitting, CJK n-grams), chunked with symbol-aware boundaries (functions/classes stay intact), and embedded into fixed dimension vectors — locally and dependency-free by default (feature-hashed lexical TF-IDF), or via any OpenAI-compatible embedding endpoint. Queries run a hybrid retrieval (vector cosine + BM25, fused with reciprocal-rank fusion) over the index, so meaning-based search works even when exact terms don't match.

Ships as a dsh plugin bundle — the sema_search, sema_reindex and sema_stats tools on the harness tool registry — plus a standalone sema CLI.


Highlights

  • Works offline by default — the built-in lexical provider needs no network, no model download, no API key. Use it as a fast BM25-plus code search.
  • Symbol-aware chunking — boundaries from a conservative per-language table (16 languages) keep functions/classes intact; a missed boundary degrades to a plain chunk rather than breaking.
  • CJK-aware tokenizer — n-gram tokenization (default bigrams) aligns Chinese queries and documents without a segmentation library; full-width punctuation is folded, not treated as a hard break.
  • Hybrid retrieval with RRF — vector cosine + BM25 channels are fused by reciprocal-rank fusion, so a document found by one channel still ranks.
  • Graceful degradation — if a configured remote provider is unreachable, the index falls back to the local lexical provider (configurable via allowFallback).
  • Incremental refresh + file watching — sema_reindex diffs by size+mtime, and an optional watcher keeps the index live.
  • Persistence — the index is saved to <root>/.sema atomically (JSON metadata
    • binary vectors), with staleness detection when the provider/dimension changes.
  • Deterministic — the same workspace and options produce the same index and the same ranked answers.

Supported languages

TypeScript, JavaScript, Python, Go, Rust, Java, Kotlin, Scala, C, C++, C#, Objective-C, Ruby, PHP, Swift, Bash, plus common data/markup formats (JSON, YAML, TOML, Markdown, HTML, XML...).


Installation

As a dsh bundle

The package declares "dsh": { "bundle": { "patch": "./cordis.patch.yml" } }. The patch inserts one plugin row that mounts the bundle and registers sema_search / sema_reindex / sema_stats on ctx.tools.

# from npm (name reserved; publish pending access setup)
npm install -g dsh-semantic-search

# straight from this repository
dsh plugin --profile demo add github:JohnXu22786/semantic-search

# or from a local checkout
dsh plugin --profile demo add /path/to/semantic-search

As a standalone CLI

npm install -g dsh-semantic-search   # or: npm run build && node bin/sema.mjs
sema --help

CLI usage

sema index                build the full index from the workspace
sema reindex [--full]     incremental refresh (or full rebuild with --full)
sema search <query...>    hybrid vector + BM25 search, prints top hits
sema stats [--json]       index health, provider, and sizing numbers

Global options:

--root <dir>          workspace root (default: current directory)
--data-dir <dir>      index storage directory (default: <root>/.sema)
--provider <kind>     embedding provider: lexical | openai (default: lexical)
--dim <n>             embedding dimension (lexical default: 4096; openai 0 = auto)
--base-url <url>      OpenAI-compatible embeddings endpoint base URL
--model <name>        embeddings model name (openai only)
--api-key <key>       API key (openai only; env: SEMA_EMBEDDING_API_KEY)
--top <n>             hits to print for search (default: 20)
--json                machine-readable output where supported
--help                show this help

CLI exit codes

  • 0 — success (including a search with zero hits and a --version/--help call).
  • 1 — a runtime failure (config error, build/index/search error).
  • 2 — a usage error: unknown command, unknown flag, or a missing query.

Configuration

The plugin is configurable through the bundle row's config (see cordis.patch.yml for an example), the CLI flags above, or defaults in code:

OptionDefaultMeaning
rootcwdworkspace root to index
dataDir.semaindex storage directory
provider.kindlexicallexical (offline) or openai
provider.dimension0 (lexical: 4096)embedding dimension; 0 = auto-infer from the endpoint
provider.baseUrlhttps://api.openai.com/v1OpenAI-compatible endpoint root
provider.modeltext-embedding-3-smallembedding model name
provider.apiKeyEnvSEMA_EMBEDDING_API_KEYenv var holding the API key
allowFallbacktruefall back to the lexical provider when a remote one fails
include / ignoredefaultsglob sets of files to index / skip
maxLinesPerChunk80hard chunk size upper bound
nGram2CJK n-gram size (1 disables n-gramming)
topK20hits returned by default
rrfK60RRF fusion constant
vectorK300candidates per channel before fusion
autosavetruepersist the index after builds
autoIndextruebuild lazily on first search
watchtruewatch the workspace for changes

Development

npm ci
npm test          # build + run the node:test suite (76 tests)
npm run typecheck
npm run build     # tsc -> lib/

License

MIT — see LICENSE. © 2026 dsh-semantic-search contributors.