New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

dsh-session-search-warmup

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dsh-session-search-warmup

DSH 会话搜索预热:进程启动的安静窗口内静默构建官方 SQLite FTS5 索引,让官方搜索第一次查询即毫秒级响应

latest
Source
npmnpm
Version
0.3.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

dsh-session-search-warmup

Warms the official DSH session-search index during the quiet boot window, so the official search surface works on first query.

Why

The search engine (@deepseek-ai/dsh-session-query-sqlite) builds its index on the first search call. Its observation loop requires every persisted session log to stay byte-stable across two consecutive snapshots (two attempts). With a large corpus one pass takes tens of seconds, and any event appended to a live session log during that window aborts the build with SESSION_QUERY_PERSISTENCE_FAILED. Because no rows were ever committed, every later search repeats the same doomed full build.

At boot no live sessions exist, so the corpus is naturally quiet: one search right after activation commits the index, and all later searches are incremental (milliseconds).

What it does

  • On activation (host plane, after sessionQuery is available) it fires one searchSessions({ query: 'warmup', … }, {}) call.
  • If that attempt fails with SESSION_QUERY_PERSISTENCE_FAILED or SESSION_QUERY_ABORTED (transient "not quiet yet" conditions) it retries every 15 s, up to 20 attempts (~5 min), then gives up until the next boot.
  • Non-retryable errors stop the chain and are logged with the [session-search-warmup] prefix.

This plugin is fully independent: with or without dsh-session-search-plus installed, the official search surface (the stock sidebar search box, rail mode, fallback paths) is fast from the first query, because the warmup call commits the corpus-wide index that every official query then reuses. dsh-session-search-plus only replaces the sidebar search-box UI (private in-memory content index, /api/search-plus route, filter bar / dropdown / jump-highlight); the two compose but neither requires the other.

Requirements

  • The profile must mount @deepseek-ai/dsh-session-query-sqlite with openAt: first-search (or startup) and a durable path — otherwise the warmed index cannot survive a restart. On a profile with openAt: never (the base default) there is nothing to warm: the plugin stops quietly and logs an actionable [session-search-warmup] hint at boot.
  • Node >= 22 (node:sqlite).

Install

From the profile directory:

dsh plugin --profile web add dsh-session-search-warmup
# or: add "dsh-session-search-warmup": "file:/path/to/this/package" to
# package.json dependencies + the dsh.profile.bundles list, then
# pnpm install

Do not also insert the session-search-warmup row into the profile's own cordis.patch.yml — the loader refuses duplicate insert ids.

Verify

dsh --profile web --dump-config   # shows the session-search-warmup row

After boot, watch the host log for:

[session-search-warmup] full-text index warmed on attempt 1

and confirm the durable index has rows:

sqlite3 ~/.dsh/session-search.sqlite 'select count(*) from persisted_sessions;'

Development

pnpm install
pnpm run bundle   # build lib/
pnpm test

Keywords

dsh

FAQs

Package last updated on 16 Aug 2026

Related posts