dshbase

插件目录 / Knowledge / dsh-session-search

dsh-session-search

已验证 · 实测可装 Tieboyh

✓ 持续维护 基于 5 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

2Stars
0Forks
0未关闭 issue
JavaScript语言
2026-08-15最近推送
跨平台平台

功能简介

无索引跨 agent 会话搜索

✅
我们的评价
可用 — 实测通过,早期项目

无索引跨 agent 会话搜索 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

@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

Tool Description
agent_session_search Case-insensitive literal search across current source artifacts: matching session + strongest message + snippet + message window; supports sources/cwd/sort/limit filters
agent_session_read Read 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

Source Default location Read mode
dsh ~/.dsh/sessions/**/session.jsonl.zstd multi-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.db SQLite 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

Key Default Description
sources all enabled Per-source boolean switch (dsh/codex/claude/pi/opencode)
roots per-source home defaults Per-source root override
maxResults 10 Max sessions per search
readWindow 10 Default 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

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-session-search」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:Tieboyh/dsh-session-search

Headless(CLI)profile:

dsh plugin --profile headless add github:Tieboyh/dsh-session-search

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

使用场景

给 agent 一套记忆、知识库或检索层,让它不再跨会话丢上下文。

适合谁

跑长项目、想让 agent 记住决策、文档和偏好而不用每次重讲的人。

二次开发建议

记忆/检索后端是缝——插新存储、调蒸馏策略,或加引用与审计轨迹。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Knowledge 里更多

浏览全部 7797 个插件 →