zhaoyuntao-wl / dsh-plugin-thread

已收录

DeepSeek Harness plugin - Thread session memory adapter (dsh-thread)

main会话 查看源代码

安装

npx -y @deepseek-ai/dsh plugin --profile web add github:zhaoyuntao-wl/dsh-plugin-thread

此安装命令根据 GitHub 仓库地址生成,是未经验证的安装起点。

README

维护者编写的文档快照。

在 GitHub 查看 ↗
提交版本 2bd47f7同步于 2026年8月18日

dsh-plugin-thread

CI

A DeepSeek Harness plugin that brings Thread — a base-agnostic session memory layer for coding agents — to dsh as a one-package closed loop:

  • Lossless capture: subscribes to session/event and persists the full event stream (user messages, assistant replies, tool calls/results) to dual SQLite databases.
  • Status-card injection: injects a per-turn status card via agent/pre-step — goals, active decisions, and feedback stay resident with O(1) bounded context.
  • Embedded MCP server: query_session_memory retrieval (semantic BM25 + structured queries) via the dsh-thread binary, mountable as a zero-code MCP overlay.

Guarantees: decisions never lost, goals never drift, no repeated questions — across long tasks, compaction boundaries, and new sessions.

Repository relationship: this is the dsh deep-adapter for Thread. The general kernel (@thread-memory/core) and the thin Qoder adapter live in the main Thread repository.

Install

dsh plugin add dsh-thread

Zero configuration: @thread-memory/core + better-sqlite3 resolve as dependencies; capture and injection start as soon as the plugin is activated.

Note (native module): if the plugin fails to start with "Could not locate the bindings file", pnpm 10 ignored the better-sqlite3 build script during install. Fix with one command in the profile directory:

cd ~/.dsh/profiles/<your-profile>
pnpm rebuild better-sqlite3

This is a pnpm 10 onlyBuiltDependencies policy, not a plugin bug.

Enable (profile)

All dsh plugins must be referenced in a profile's bundles to take effect. In ~/.dsh/profiles/<your-profile>/package.json:

{
  "name": "dsh-profile-my",
  "private": true,
  "dependencies": {},
  "dsh": {
    "profile": {
      "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-headless", "dsh-thread"]
    }
  }
}

To use query_session_memory in-session / in the Web UI, add the MCP overlay in the profile's cordis.patch.yml:

- insert:
    - id: mcp-thread
      name: '@deepseek-ai/dsh-mcp-client'
      config:
        serverName: thread
        transport: stdio
        command: npx
        args: ['dsh-thread']
        failOnStartupError: true

Session isolation

When two agents work in parallel on unrelated tasks in the same project, isolate a session with natural language ("隔离/静默/别打扰") or /isolate — its dialogue context (messages/decisions/feedback) becomes visible only to itself, and the status card stops being disturbed by the other agent's updates; tool events stay shared (project facts stay continuous). /unisolate lifts isolation (history stays isolated), and /thread-publish <goal|decision|feedback> <id> (or natural language "把这个决策共享出去") promotes a row back to shared visibility on demand.

Version pinning

Peer dependencies use ^0.1.0-rc.6 (compatible with the rc.6/rc.7 train); adapts to the dsh release train, compat matrix in CI.

Development

pnpm install
pnpm build
pnpm typecheck
pnpm test
pnpm lint

@thread-memory/core is linked via file:../thread/packages/core during development (CI runs the full chain only once core is published to npm and the dependency switches to a version; see .github/workflows/ci.yml).

License

MIT

仓库信息

开发语言
TypeScript
许可证
MIT
最后更新
2026年8月18日 05:09

谨慎安装

请检查源代码、权限、生命周期脚本、依赖与网络访问;不受信任的插件应先在隔离环境中测试。