dsh-advancesearch: Search all sessions in DSH workspace and browse history across Agents

Preface

When running long sessions and multiple projects in parallel with DeepSeek Harness, the list of titles quickly gets long, and finding a configuration or conclusion discussed in a particular session by eye is unrealistic. If you also use coding agents such as Claude Code, Codex, and ZCode, the history is spread across different directories on the local machine, making unified search even harder.

Below is the community plugin dsh-advancesearch (maintainer wanetcn, category: workflow). It provides a global search entry point in the Web workspace and can optionally scan session logs of other local agents. It also bundles an MCP server so that the agent in the current session can search that history by keywords.

What it is

dsh-advancesearch is an advanced search plugin for DeepSeek Harness: it searches the names and content of all DSH sessions by keyword, and provides a search button and a results overlay in the Web workspace UI.

Beyond DSH sessions themselves, with the option enabled it can also search local history from Claude Code, Codex, ZCode, Gemini CLI, and other coding agents (titles + content). The plugin also includes a zero-dependency MCP stdio server; after installation it is auto-registered, and the model can directly call the tool to retrieve agent history.

  • Plugin directory: https://www.skillhub.cn/plugins/wanetcn/dsh-advancesearch
  • Source code: https://github.com/wanetcn/dsh-advancesearch
  • License: MIT (as stated in the README)

Architecture and core capabilities

Host side: authenticated search API

The Host entry point is index.js. The plugin exposes authenticated routes through the official DSH sessionQuery service (the full-text index in dsh-session-query-sqlite):

GET /api/dsh-advancesearch?q=<keyword>[&limit=20]
GET /api/dsh-advancesearch?q=<keyword>&sessionId=<id>[&limit=20]
  • limit ranges from 1–50, default 20.
  • It requires browser session credentials (the same-origin cookie as the GUI); untrusted origins are rejected by DSH’s trust fence (the same connection.requestRejection mechanism as in dsh-host-open-in-app).
  • Combinations that do not mount the session-query backend will return 501 SESSION_QUERY_SEARCH_DISABLED.

Client side: workspace search button and overlay

The Client is client.js, loaded in the official dsh.client browser-plugin format (window.__ModuleLoader__):

  1. It registers a search button in the sidebar bottom sidebar.footer.action slot (text: 搜索会话; icon-only when the sidebar is collapsed).
  2. After clicking, it opens a global search layer in the shell.overlay slot: enter a keyword → press Enter → list matching sessions (title + best snippet, with the keyword highlighted) → click a session to expand each matching entry within that session.

Search modes (DSH sessions)

Mode Data source Description
Search by session (default) sessionQuery.searchSessions() Full-text search across all session titles and content; returns the best matching snippet for each session
Search within a session sessionQuery.searchEvents() Lists matching event snippets one by one within a single session (with indices and types)

Titles are taken from readTitleSnapshots() (the official title-collapsed result); search covers both in-progress sessions and persisted sessions.

External agent sessions

When options such as Claude / Codex / ZCode are checked, the Host scans session logs on the local machine (title + content):

  • ~/.claude/projects
  • ~/.codex/sessions
  • ~/.zcode/cli/db

The checked state is persisted.

The mcp/ directory under the plugin is a zero-dependency MCP stdio server and is auto-registered after the plugin is installed. Tool names have the mcp__agent-session-search__ prefix; you can view invocation parameters and results on the trajectory page.

Tool Function
search_agent_sessions Keyword search across Claude / Codex / ZCode sessions (title + content); returns title, timestamp, snippet, and path
read_agent_session Read the full text of the most recent messages in a session
open_agent_app Launch the corresponding agent desktop app
reveal_agent_session Show the session record file in Finder

The MCP server path is resolved dynamically relative to the plugin root via !!js; command prefers the environment variable DSH_DESKTOP_NODE_EXECUTABLE, otherwise it uses node.

If you do not install the DSH plugin and only use it in an MCP client such as Claude Desktop, see the standalone integration instructions in mcp/README.md in the repository.

Search semantics (as described in the README): literal matching, case-insensitive, flexible whitespace (for example, web app can match concatenated forms like WebApp).

Installation and enablement

In the DSH profile directory (for example ~/.dsh/profiles/web/), run:

pnpm add file:/path/to/dsh-advancesearch
# or after publishing:
pnpm add github:<you>/dsh-advancesearch

Add a line in cordis.patch.yml in the same directory to enable it:

- name: dsh-advancesearch

After restarting DSH (or, if HMR is enabled, saving the config is enough), a search button appears at the bottom of the sidebar in the Web UI.

In package.json, peerDependencies requires @deepseek-ai/cordis around ~4.0.4; the client platform is web (dsh.client.platform = web).

Typical usage

Search DSH sessions in the Web workspace

  1. Click the search button at the bottom of the sidebar to open the global search layer.
  2. Enter a keyword and press Enter, then browse results aggregated by session.
  3. If you need to see each match within a session, click that session to expand the details.

For scripted or integration usage, you can call GET /api/dsh-advancesearch as described above (it requires valid browser session credentials).

Enable cross-agent history

In the search UI, check the agent types to include (Claude / Codex / ZCode, etc.), then run a keyword search; the checked state is retained on next open.

Let the agent search history itself during a session

After installing the plugin and restarting, you can describe what you need in natural language, and the agent will call the MCP tools. Reproducible scenarios in the README include:

Search Codex history

You: I remember configuring some service in codex, help me find it and see how it was configured at the time

agent: (calls search_agent_sessions, query="服务配置", agents=["codex"])
agent: (calls read_agent_session, reads the original messages of the most relevant session)

Find discussions across agents

You: Search all agents for discussions about this project, and read me the original text of the most relevant session

agent: (search_agent_sessions, query="项目部署", agents=["claude","codex","zcode"])
agent: (read_agent_session, …)

Continue an earlier task, or open the app / locate files

You can combine search_agent_sessions → read_agent_session; you can also call open_agent_app or reveal_agent_session to launch the desktop app or show the record file in Finder.

Use cases and notes

Who it is for

  • People who accumulate many sessions over time in the DSH Web workspace and need to recall discussions by content rather than titles.
  • People who use multiple coding agents and want to search history scattered across the local machine from one entry point or in one conversation turn.
  • People who want the current agent to automatically search and read external agent sessions via MCP, reducing manual directory browsing.

Permissions and security

The plugin runs with the permissions of the current DSH process; after being enabled, it reads local agent session directories and accesses sessionQuery via the Host route. Before installation you should read the source code and the MIT license to confirm that the paths and data scope match your environment policy.

Known limitations (README)

  • Search relies on the dsh-session-query-sqlite full-text index; deployments with openAt: "never" are not supported.
  • The overlay uses inline styles and theme variables as fallbacks, and is not integrated with the official locale system (UI text is in Chinese).
  • The pagination cursor nextCursor is not exposed in the UI for now; the default is 20 items per session/page.

The DeepSeek Harness ecosystem emphasizes “everything is a plugin”; community directories such as SkillHub are independent sites and are not officially affiliated with DeepSeek / High-Flyer. This plugin currently has 0 stars on GitHub; features and limitations are subject to the repository README.

Summary

dsh-advancesearch ties together DSH full-text session search, a workspace search button, local agent history scanning for Claude / Codex / ZCode and others, and MCP tools into one workflow: humans can quickly locate sessions in the Web, and agents can also search and read history themselves during conversations.

  • Plugin directory: https://www.skillhub.cn/plugins/wanetcn/dsh-advancesearch
  • Source code with detailed API and MCP documentation: https://github.com/wanetcn/dsh-advancesearch
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye