DeepSHPlugins
dsh-session-search 项目预览
GITHUB / COMMUNITY PROJECT

dsh-session-search

会话与消息JavaScript

dsh-session-search:跨 Agent 会话搜索——直接扫描 dsh、Codex、Claude Code、pi、OpenCode 的历史对话,不建派生数据库;agent_session_search 工具提供大小写不敏感的字面搜索。

2 StarsTieboyh 更新时间 2026-08-13
访问 GitHub 仓库
dsh-session-search 项目预览

项目介绍

中文

dsh-session-search:跨 Agent 会话搜索——直接扫描 dsh、Codex、Claude Code、pi、OpenCode 的历史对话,不建派生数据库;agent_session_search 工具提供大小写不敏感的字面搜索。

English

Cross-agent session search — scans dsh, Codex, Claude Code, pi and OpenCode histories directly, no derived database; the agent_session_search tool does case-insensitive literal search.

项目信息与收录信号

快照 2026-09-11
作者 / 组织
Tieboyh
仓库
Tieboyh/dsh-session-search
GitHub Stars
2
Forks
0
开发语言
JavaScript
许可证
未记录
最近推送
2026-08-13
Manifest
未检测到 / 未记录

公开仓库不自动等于可商用;许可证与当前兼容性以原项目文档为准。Manifest 和数据评分不构成安装安全认证。

数据评分

53/ 100
维护活跃
80
文档与实用信息
85
生态关注度
14
安装便捷信号
80
项目声明信号
80

README 含完整安装与使用说明;关注度尚低(2)。

评分来自已有数据快照的五维模型,仅作浏览参考,不是实际使用评测或安全检测结论。

安装与使用

所有项目资料与许可均以对应 GitHub 仓库为准。

git clone https://github.com/Tieboyh/dsh-session-search.git

复制命令不会自动执行。请先阅读仓库文档,确认环境要求与许可证。

项目截图

仓库 README

GitHub 原文

已保存的仓库文档快照;文档抓取时间未记录,可能与上方目录介绍处于不同版本。安装前请核对当前仓库说明。

@dsh-external/dsh-session-search

Cross-agent session search plugin for DeepSeek Harness — directly scan past conversations from dsh, Codex, Claude Code, pi, and OpenCode without creating a derived database.

中文

Capabilities

ToolDescription
agent_session_searchCase-insensitive literal search across current source artifacts: matching session + strongest message + snippet + message window; supports sources/cwd/sort/limit filters
agent_session_readRead one discovered session's metadata and a message window (aroundSeq targeting)

Search observes the current source artifacts on each call and uses a case-insensitive literal substring match. English, Chinese, punctuation, and short queries all follow the same rule. Relevance is intentionally basic: the message with the most occurrences represents each session, with recency as the tie-breaker.

Supported session sources

SourceDefault locationRead mode
dsh~/.dsh/sessions/**/session.jsonl.zstdmulti-frame zstd, decoded frame by frame (node:zlib native)
codex~/.codex/sessions/** + archived_sessions/JSONL
claude~/.claude/projects/**JSONL
pi~/.pi/agent/sessions/**JSONL
opencode~/.local/share/opencode/opencode.dbSQLite read-only

All sources are read-only: session files are never modified, and the plugin creates no database, index, or persistent cache. OpenCode's own database is opened read-only as a source artifact.

Install (marisa / dshx)

git clone https://github.com/dsh-external/dsh-session-search.git
dshx install dsh-session-search ./dsh-session-search

Or install directly from a git URL. The plugin is mounted into ~/.dsh/config.yaml and takes effect on the next dsh web/TUI start (hot with Web HMR).

Manual mount (without dshx)

# ~/.dsh/config.yaml
- insert:
    - id: dsh-session-search
      name: '/absolute/path/to/dsh-session-search/lib/index.js'
      config:
        sources: { dsh: true, codex: true, claude: true, pi: true, opencode: true }
        maxResults: 10
        readWindow: 10

Configuration

KeyDefaultDescription
sourcesall enabledPer-source boolean switch (dsh/codex/claude/pi/opencode)
rootsper-source home defaultsPer-source root override
maxResults10Max sessions per search
readWindow10Default window for agent_session_read

Development

./scripts/build.sh   # compile src → lib with the dsh checkout's tsc (lib/ committed)
node tests/smoke.mjs # smoke test: scan real sessions and search

peerDependencies are provided by the host dsh's node_modules (cordis, @deepseek-ai/dsh-tools, @deepseek-ai/dsh-system-prompt, …); the build script creates the symlinks.

Implementation notes

  • Parsers are defensive: oversized, corrupt, or unreadable files are skipped without failing the whole scan.
  • dsh session logs are concatenated-frame zstd streams (one independent frame per appended event batch): frame boundaries are located with a structural scan, then decoded one frame at a time; a torn final frame (interrupted write) is skipped on that call.
  • sources is applied before discovery. For canonical plain JSONL sources, safe single-line queries use rg --fixed-strings --ignore-case only to select candidate files; escaped queries skip this optimization. Every candidate is parsed and matched again, so raw metadata never becomes a result.
  • Search processes one parsed session at a time and retains only bounded Top-K hits. DSH concatenated Zstd frames are decompressed and consumed one frame at a time instead of materializing the complete decoded log.
  • agent_session_read tries the source-native artifact id first and falls back to a source-scoped scan only when an external format does not expose a direct mapping. OpenCode selects the exact source row.
  • Every call observes current source state. There is no index lifecycle or stale derived state; a broad DSH search must still decompress the complete DSH corpus.
  • Matching is literal and case-insensitive. Results group by session, rank the strongest message by occurrence count, and use timestamps for stable tie-breaking.

License

BSD-3-Clause

使用前核对

安装步骤、兼容版本与授权范围以原项目当前文档为准。Stars 和评分是快照中的导航信号。

安装与排错 · 项目问题反馈

同类项目