DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

Session Query Vector — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
S

dsh-session-query-vector

Session Query Vector

由 Ollama 或任何兼容 OpenAI 的嵌入端点支持的 DSH 语义会话搜索后端

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

npx -y @deepseek-ai/dsh plugin --profile web add github:minhaoli/dsh-session-query-vector#dfda480ba8c14272ece0d037edb587f976787df8
README兼容性版本

兼容性与来源证明

Session Query Vector 以 dsh-session-query-vector 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

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

版本

0.1.0stable
2026/10/17

相关插件

正在加载相关插件…

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

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Ab Memorydsh-ab-memory--- description: "dsh-ab-memory 包:一种跨会话、基于文件的智能体记忆,提供五个工具(remember / recall / forget / load_skill / distill)以及始终启用的轻量注入。" kind: "package-reference" ---Archive Manager@michengai/dsh-archive-manager归档、恢复、收藏和永久删除会话,并诊断损坏的会话日志。Reme Dsh Plugin@agentscope-ai/reme-dsh-plugin面向 DeepSeek Harness 的 ReMe 记忆与上下文集成Memsearch Dsh@zilliz/memsearch-dsh适用于 DeepSeek Harness 的 MemSearch 插件:在多个代理之间共享 Markdown 记忆,支持捕获、步骤前上下文注入、记忆召回技能和技能候选审核面板。

README

dsh-session-query-vector

A semantic session-search backend for DSH, backed by Ollama or any OpenAI-compatible /v1/embeddings endpoint.

DSH ships a SQLite full-text backend (@deepseek-ai/dsh-session-query-sqlite) that answers "which session contained this word". This package replaces it with a vector backend that answers "which session was about this" — you ask in your own words, the query is embedded, and the closest chunks come back with their session and snippet.

It is a drop-in replacement for the official backend: both extend the same sessionQuery service, so exactly one of them may be mounted at a time.

Requirements

DSH0.2.1-rc.2 (developed and tested against it)
@deepseek-ai/cordis~4.0.5
@deepseek-ai/schemastery3.18.5 (ships with DSH)
Node.js22+ — the indexer uses the built-in node:sqlite (DatabaseSync)
An embedding endpointOllama locally, or any OpenAI-compatible API

Earlier DSH releases are untested.

Two pieces

PieceWhat it is
lib/index.jsThe query side — a SessionQueryEngine subclass mounted as a plugin. Answers searches by reading the index. Never embeds.
indexer.mjsThe index side — a standalone script. Walks ~/.dsh/sessions, embeds the message text, writes the vectors.

They are deliberately separate: search must stay fast, and embedding is slow. The query side never triggers an embedding on the search path; if the index is empty it returns nothing.

The two sides must use the same embedding model. Otherwise the stored vectors and the query vector live in different spaces and every score is noise. Configure embedModel identically in both.

Install

dsh plugin --profile <your-profile> add github:minhaoli/dsh-session-query-vector

The package declares dsh.bundle.patch, so dsh plugin add appends it to dsh.profile.bundles and the loader mounts it on the next start.

The bundle patch also disables the official backend, because both register sessionQuery:

# cordis.patch.yml shipped with this package
- id: session-query-sqlite
  disabled: true

- insert:
    - id: session-query-vector
      name: 'dsh-session-query-vector'
      config:
        provider: ollama
        baseUrl: 'http://127.0.0.1:11434'
        embedModel: bge-m3
        openAt: first-search

If you would rather keep the official backend, remove that first row and do not mount this package — they cannot coexist.

Configuration

Set these in your profile's cordis.patch.yml. A patch replaces the targeted row's whole config rather than merging into it, so restate every key you want to keep.

# ~/.dsh/profiles/<profile>/cordis.patch.yml
- insert:
    - id: session-query-vector
      name: 'dsh-session-query-vector'
      config:
        path: 'C:/Users/<you>/.dsh/storages/session-query-vector.sqlite'
        provider: openai
        baseUrl: 'https://api.siliconflow.cn/v1'
        apiKey: 'sk-...'
        embedModel: 'BAAI/bge-m3'
        openAt: first-search
        topK: 20
        minScore: 0.45
KeyDefaultMeaning
path~/.dsh/storages/session-query-vector.sqliteIndex database. Created on first use.
openAtfirst-searchstartup opens the DB at mount; first-search on the first query; never disables search entirely.
providerollamaollama or openai. openai means any OpenAI-compatible /v1/embeddings.
baseUrlhttp://127.0.0.1:11434Embedding endpoint. A trailing /v1 is stripped and re-added, so https://host/v1 and https://host both work.
apiKey""Sent as Authorization: Bearer when non-empty. Not needed for Ollama.
embedModelbge-m3Must match the indexer.
embedTimeoutMs120000Per-request timeout.
topK20Candidates pulled from the index before ranking.
minScore0.45Cosine floor.
relMargin0.10Relative cutoff: a hit is kept only if its score is within relMargin of the best hit.
snippetChars240Snippet length in the result.
readWindowMax50Read window for the engine's live-preferred reads.

Endpoint contracts

Ollama (provider: ollama)

POST {baseUrl}/api/embeddings
content-type: application/json

{ "model": "bge-m3", "prompt": "the text to embed" }

Response: { "embedding": [0.013, -0.021, ...] }.

Pull the model first:

ollama pull bge-m3

OpenAI-compatible (provider: openai)

POST {baseUrl}/v1/embeddings
authorization: Bearer <apiKey>
content-type: application/json

{ "model": "BAAI/bge-m3", "input": ["chunk one", "chunk two"] }

Response: { "data": [{ "index": 0, "embedding": [...] }, ...] }. Results are sorted by data[].index before use — some providers return them out of order.

A trailing /v1 on baseUrl is stripped before /v1/embeddings is appended, so https://api.siliconflow.cn/v1 does not become /v1/v1/embeddings.

Any endpoint that satisfies this contract works: SiliconFlow, OpenAI, Azure OpenAI, Together, a local vLLM or LM Studio server, and so on. Set baseUrl, apiKey and embedModel to whatever that provider names the model.

Building the index

indexer.mjs is not run by DSH — start it yourself, after the query side is configured. It must be able to import the @deepseek-ai/* packages, so run it with the DSH runtime (see below).

# layered: layer 1 (user messages) first, then layer 2 (assistant messages)
node indexer.mjs

node indexer.mjs --layer=1        # only user messages — fastest path to a usable search
node indexer.mjs --layer=2        # only assistant messages
node indexer.mjs --limit=200      # cap sessions this run
node indexer.mjs --status         # print progress, index nothing
node indexer.mjs --force          # re-index unchanged sessions
node indexer.mjs --quiet          # no progress lines, only key events
node indexer.mjs --skip-active=5  # skip sessions written in the last 5 minutes
Environment variableDefaultMeaning
DSH_HOME~/.dshDSH home. Everything else derives from it.
DSH_MODULES$DSH_HOME/node_modules/@deepseek-aiWhere to resolve @deepseek-ai/*. Override for the packaged desktop app.
VEC_DB$DSH_HOME/storages/session-query-vector.sqliteIndex path — must equal the plugin's path.
VEC_SESSIONS$DSH_HOME/sessionsSession log root.
VEC_PROVIDERollamaollama or openai — must equal the plugin's provider.
VEC_BASE_URLhttp://127.0.0.1:11434Must equal the plugin's baseUrl.
VEC_API_KEY""Must equal the plugin's apiKey.
VEC_MODELbge-m3Must equal the plugin's embedModel.
VEC_CHUNK1200Characters per chunk.
VEC_BATCH16Chunks per embedding request.
VEC_SUBAGENTS—Set to 1 to include subagent sessions.

Running the indexer against the packaged desktop app

The Electron app's @deepseek-ai/* modules live inside app.asar, which plain node cannot read. Point DSH_MODULES at the asar and run the indexer under the app's own binary in Node mode:

$env:ELECTRON_RUN_AS_NODE = '1'
$env:DSH_MODULES = 'D:/APP/deepseek harness/resources/app.asar/dsh/node_modules/@deepseek-ai/'
& 'D:\APP\deepseek harness\DeepSeek Harness.exe' indexer.mjs --status

From a source checkout, plain node indexer.mjs works — DSH_MODULES already points at real files.

Index schema

One SQLite file, application_id = 1146308690 (distinct from the official backend's), user_version = 1. A file whose application_id belongs to something else is refused rather than clobbered.

TablePurpose
vec_chunks(session_id, seq, type, time, chunk_idx, text, dim, vector BLOB)One row per embedded chunk. Primary key (session_id, seq, chunk_idx).
vec_sessions(id, revision, indexed_at, chunks, cwd, layer)Per-session bookkeeping; revision drives the incremental skip.
vec_queries(text, vector, dim, at)Query-vector cache, so repeating a search skips the embedding round trip.

All tables are STRICT. Each session is one transaction, so an interrupted run never leaves a half-written session.

Failure modes worth knowing

  • Empty results, no error. The index has not been built, or was built with a different model. Check --status.
  • database ... belongs to another application. path points at a file this package did not create.
  • database ... is not an empty or recognized index. The file exists with tables but no application_id — point path somewhere else or delete it.
  • /v1/v1/embeddings 404. You set baseUrl with a trailing /v1 and the code already handles it; a 404 here means the provider's path differs from the OpenAI contract.
  • Both backends mounted. sessionQuery is registered twice and the second mount fails. Disable session-query-sqlite.

Companion plugins

  • dsh-session-tree — sidebar with tags, grouping and drag-to-move.
  • dsh-session-manager — agent tools and REST API for session housekeeping.
  • dsh-session-search — in-conversation find bar (DOM-based, complementary to this).
  • dsh-ui-reload — one-click frontend reload button.

License

MIT — see LICENSE.