Introduction¶
In DSH (DeepSeek Harness), each session’s log is saved locally in isolation. When an issue recurs across multiple sessions, or when you want to trace how a particular conversation was worked through, you’re usually left manually digging through dozens of log files. It’s both time-consuming and prone to oversights.
dsh-session-search solves the problem of cross-session memory retrieval: it performs full-text search across all local DSH session logs (zstd-compressed JSONL, default location ~/.dsh/sessions) for a given topic, quickly identifying which session handled it and how, thereby consolidating solutions scattered across multiple sessions back into one place.
Plugin Overview & Problems Solved¶
- Plugin name: dsh-session-search (npm package
@deepwhale-cn/dsh-session-search) - Maintainer: feely0208
- Category: Memory
- Core value: Local, offline full-text search over DSH session logs, with per-session aggregation (title / workspace / hit count / samples), making it easy to revisit and reuse ideas and operations from past sessions.
Core Features¶
- Local full-text search: Reads local DSH session logs (zstd-compressed JSONL files) and searches within the
~/.dsh/sessionsdirectory. - Keywords & regex: Supports plain keyword search as well as
--regexto enable regex matching. - Workspace filtering: Narrow the search scope by specifying a workspace via
--workspace. - Output formats: Supports
--jsonfor JSON output, or--html report.htmlto generate an HTML report. - Session aggregation: Aggregates results by session, including title, workspace, hit count, and sample content for quick browsing and pinpointing.
- Ecosystem integration: Pairs with dsh-agent-forensics to fully reconstruct context, and with dsh-token-cost for cost tracking.
Installation & Setup¶
In a DSH environment, install via the official package name:
dsh plugin --profile web add @deepwhale-cn/dsh-session-search
You can also install directly via npm:
npm i @deepwhale-cn/dsh-session-search
Or install from this repository:
dsh plugin install ./
Once installed, you can use the CLI tool to run searches.
Typical Usage¶
- Basic keyword search
dsh-session-search --keyword keyword
- Regex search
dsh-session-search --keyword keyword --regex
- Search within a specific workspace
dsh-session-search --keyword keyword --workspace workspace
- Output as JSON
dsh-session-search --keyword keyword --json
- Generate an HTML report
dsh-session-search --keyword keyword --html report.html
Use Cases & Notes¶
- Use cases: Quickly locating a topic, idea, or operation among a large volume of historical sessions; ideal for users who keep session logs locally and want to search them efficiently.
- Notes:
- The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license before installing.
- The search scope is limited to local session logs. It does not connect to the network and does not upload any data.
Summary¶
dsh-session-search turns DSH’s session logs into a searchable knowledge base, helping you quickly retrieve previously discussed solutions and ideas across multiple sessions.
- Directory page: https://www.skillhub.cn/plugins/feely0208/dsh-session-search
- GitHub: https://github.com/feely0208/dsh-session-search