DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Session Query Vector — DSH Plugin for DeepSeek Harness
← Plugins
S

dsh-session-query-vector

Session Query Vector

Semantic session search backend for DSH, backed by Ollama or any OpenAI-compatible embedding endpoint

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:minhaoli/dsh-session-query-vector#dfda480ba8c14272ece0d037edb587f976787df8
READMECompatibilityVersions

Compatibility and provenance

Session Query Vector is published as dsh-session-query-vector and currently resolves to version 0.1.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
10/17/2026

Versions

0.1.0stable
10/17/2026

Related plugins

Loading related plugins…

Latest
0.1.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
10/17/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in

Related plugins

More verified plugins in memory-context.

Ab Memorydsh-ab-memory--- description: "The dsh-ab-memory package: a cross-session, file-backed agent memory with five tools (remember / recall / forget / load_skill / distill) and an always-on light injection." kind: "package-reference" ---Archive Manager@michengai/dsh-archive-manager归档、恢复、收藏和永久删除会话,并诊断损坏的会话日志。 · Archive, restore, favorite, and permanently delete sessions, and diagnose damaged session logs.Reme Dsh Plugin@agentscope-ai/reme-dsh-pluginReMe memory and context integration for DeepSeek HarnessMemsearch Dsh@zilliz/memsearch-dshMemSearch plugin for DeepSeek Harness: shared markdown memory across agents, with capture, pre-step context injection, memory-recall skill, and a skill-candidate review panel.

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.