DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Second Brain — DeepSeek Harness 插件(DSH Plugin)
← Plugins
S

@xianshu/dsh-second-brain

Second Brain

DeepSeek Harness (DSH) 插件:将本地第二大脑的有界、带时间戳快照(身份、状态指纹和指针)注入每个新会话的提示词中。只读、不写入、失败时明确报错、零依赖。第二大脑载入器:让每个新会话开局自带记忆快照。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:DiaryOfUranus/dsh-second-brain#6ce072f9f4f07aa99ae796f6f0346cfe8e374bfd
README兼容性版本

兼容性与来源证明

Second Brain 以 @xianshu/dsh-second-brain 发布,当前版本为 0.1.6。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/10/7

版本

0.1.6stable
2026/10/7
0.1.5stable
2026/10/7
0.1.4stable
2026/10/6

相关插件

正在加载相关插件…

最新版
0.1.6
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 1
周下载
0
最近提交
2026/10/7
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

README

dsh-second-brain

English · 中文说明 README.zh-CN.md

Give your DeepSeek Harness agent a memory that survives the session boundary. 让 DeepSeek Harness 每次开新会话时,自动带着你的第二大脑画像与状态。 记忆 / 工作流 / 本地优先 / 只读 / 零写入。

@xianshu/dsh-second-brain is a DeepSeek Harness (DSH) host plugin. It injects a bounded, timestamped snapshot of your local brain — identity, state fingerprint, open items count, and pointers — into every new session's prompt context.

The goal is simple: a fresh conversation should not start from zero. It should already know who this instance is and where the real state lives.

【Second Brain · opening snapshot】(read-only; not live state; do not write back)
brain root: C:\Users\you\.dsh\brain
fingerprint: version=v0.1.0  state_seq=120  git_backed=true  last_export=2026-10-06T12:51:29Z
permanent memory @2026-10-06T02:17:54.099Z
open items: 25
## 1. Who I am
- name / seat / host / brain root / generation pointer …
pointers: full state via `sb.cmd look`; open items in ledger.md; failure modes in failures.md.
boundary: this block is a snapshot. If it conflicts with a freshly read file, the file wins.

(above is a real block, reformatted to English labels for readability — the shipped block is Chinese, see README.zh-CN.md)

The problem

Agent platforms differ in what they give you out of the box:

PlatformCross-session memory
Some IDEs / agent workbenchesbuilt-in memory directory, seamless
DeepSeek Harnessnone — every new session starts blank

So a brain you maintain on disk stays an isolated repository: it only matters if someone remembers to go read it. This plugin closes that gap at the only place that always runs — prompt assembly.

What it does

  • Injects on every session. Hooked at ctx.systemPrompt.context({ name, order, text }), materialised by the host as a durable user-role snapshot.
  • Always fresh. text is a function, so the block is rebuilt at each assembly — when state_seq changes, the next assembly sees it.
  • Bounded. Hard maxChars cap. The block can never grow without limit into your context window (code default 1000; the bundled patch ships 1300).
  • Fail-loud. Below a floor of 300 chars the plugin refuses to register and prints why instead of silently dropping the pointer/boundary lines.
  • Read-only, zero-write. It only ever calls readFileSync. It never writes your brain.
  • Zero dependencies. Plain ESM, Node ≥ 18, no install-time scripts.

Install

Four routes, ordered by how much they require — the first needs neither git nor github.com.

RouteWhat you doRequires
A · npm (recommended)Settings → Plugins → Add plugin → @xianshu/dsh-second-braina reachable npm registry — no git, no github.com
B · FolderDownload the release .zip → extract → Add plugin with the extracted folder pathonly the download
C · Local clonegit clone this repo → Add plugin with the cloned folder pathgit
D · GitHub specAdd plugin with github:DiaryOfUranus/dsh-second-braingit on PATH, and reachable github.com:443 + codeload.github.com

Restart DSH afterwards — plugin modules load at boot, so editing files while the host is running does not hot-reload them.

Verified entrances (walked, not assumed)

Route A was walked end to end on a Windows host with no git on PATH and github.com:443 unreachable — the very machine where the old entry failed:

$ pnpm add @xianshu/dsh-second-brain                 # official npm registry
+ @xianshu/dsh-second-brain 0.1.5                     ✅
$ pnpm add @xianshu/dsh-second-brain                 # npmmirror (CN mirror) served it too
+ @xianshu/dsh-second-brain 0.1.5                     ✅
$ node -e "import('@xianshu/dsh-second-brain')"
name=second-brain-xianshu  inject=["systemPrompt"]    ✅
$ node node_modules/@xianshu/dsh-second-brain/test/probe-block.mjs
结论: 48/48 PASS                                      ✅

Route B was verified separately: pnpm link:<extracted folder> resolves the package name, cordis.patch.yml is present, and importing by package name builds a real 844-char block.

Why route D is listed last (measured, not assumed)

The github: form is resolved by the package manager, which shells out to git:

$ pnpm add github:DiaryOfUranus/dsh-second-brain
[ERROR] Command failed: git ls-remote "https://github.com/DiaryOfUranus/dsh-second-brain.git" HEAD
'git' is not recognized as an internal or external command

Measured on Windows (2026-10-06): with git absent from PATH it fails immediately; with git present it failed again at Failed to connect to github.com:443 after 21075 ms. Pinning a full commit SHA does not avoid this — pnpm still routes every github: spec through its git fetcher. Routes A and B touch none of that.

Correction. The v0.1.4 release notes and the README inside the v0.1.4 asset zip recommended the bare github: form without stating its prerequisites. This section supersedes them.

Bundle contract

Whichever route you take, the bundle is declared by package.json → dsh.bundle.patch → cordis.patch.yml, which inserts one profile row:

- insert:
    - id: second-brain-xianshu
      name: '@xianshu/dsh-second-brain'
      config:
        brainRoot: !!js process.env.DEEPSEEK_BRAIN
        maxChars: 1300
        order: 200

Verify it works

  1. Open a new session and ask: "what Second Brain information did you get at startup?" Answering correctly == injection is live.
  2. Or check the DSH log for: [second-brain-xianshu] ✅ 注入已注册:name=xianshu-second-brain order=200 块长=NNN 字符

Configuration

KeyDefaultMeaning
brainRoot~/.dsh/brain (or $DEEPSEEK_BRAIN)Where your brain files live
maxChars1000 (patch ships 1300)Hard cap of the injected block; floor 300
order200Layer order within the system prompt
injectonSet false (or env DSH_SB_INJECT=0) to disable without uninstalling

Installed == ON. v0.1.0 shipped with the opposite default and it was a foot-gun: the GUI install action is the consent. Turning it off must be explicit.

Files it reads (read-only)

<brainRoot>/VERSION.json           → version, state_seq, git_backed, last_export_at
<brainRoot>/MEMORY-PERMANENT.md    → §"Who I am" + §"How I work", trimmed by item boundary
<brainRoot>/ledger.md              → counts `- [ ]` only (never reads the body)

Missing files degrade gracefully: the block says so instead of throwing.

Safety model

Three explicit guarantees, all defaulting to the tightest setting:

  1. Bounded — a hard maxChars ceiling, because an injected block rides along on every request. Unbounded injection is a context-window bug waiting to happen.
  2. Read-only — open(...,'r') semantics only. The plugin never writes to your brain.
  3. Honest — the block self-describes as a snapshot, not live state, carries mtime and state_seq so a new session can judge its own freshness, and states that a freshly read file wins on conflict.

There is also a self-reference guard: the injected block is deliberately not to be read back by the brain as a source of fact. A system that treats its own output as external input rots; the timestamp and boundary line are the antidote.

Verification — run it yourself

node test/probe-block.mjs

The probe builds a throwaway fixture brain in a temp directory and asserts the invariants that must hold at any cap: block length ≤ cap, pointer/boundary lines survive, identity and fingerprint present, missing brain root degrades instead of throwing, and maxChars < 300 is refused loudly. No personal data required.

To probe your own real brain instead of the fixture:

SB_BRAIN="$HOME/.dsh/brain" node test/probe-block.mjs

Compatibility

  • Host: DeepSeek Harness desktop (host-side plugin; no client/UI code).
  • Runtime: Node ≥ 18, ESM. No dependencies, no build step, no postinstall.
  • Contract used: ctx.systemPrompt.context({ name, order, text }) and ctx.logger. It does not inject agents/sessions — it deliberately stays out of the session lifecycle.

Known boundaries (honest list)

  • The pointer line mentions sb.cmd look, the author's brain CLI. It is inert text for everyone else; making the pointer configurable is a planned change, not a shipped one.
  • Compression picks two sections by their exact Chinese headings (一、我是谁, 三、我怎么干活). If neither is found — e.g. a brain written in another language — the whole file is trimmed by item boundary instead. A configurable section list is on the roadmap.
  • The injected block's own labels are Chinese (脑根 / 指纹 / 边界 …). The plugin works regardless of your language, but a label map for other locales is not shipped yet.
  • Multi-instance concurrency is not stress-tested (the plugin is a pure function with no shared state, so it should be safe; it has not been measured).
  • Only verified against the DSH 0.2.x host line. Other versions: check that ctx.systemPrompt.context still exists.

Changelog

v0.1.4 is the first public release. Before shipping it, the acceptance probe caught two silent-drop defects, both now fixed and regression-tested:

  • a section was silently dropped when it happened to be the last one in the file (\Z is not an end-of-string anchor in JavaScript — it matches a literal Z);
  • a very long brain-root path at a tight cap could truncate the pointer/boundary lines away.

Related

  • second-brain-framework — the open-source Second Brain framework and governance toolkit that produces the brain files this plugin loads. Framework = the brain's structure; this plugin = the loader.

License

MIT © 天王星日记 / DiaryOfUranus — see LICENSE.

相关插件

继续浏览 memory-context 分类下经过校验的插件。

Hindsight Coding Agents@vectorize-io/hindsight-coding-agents面向编程代理的仅反思式 Hindsight 长期记忆(可插拔支持多种运行框架:opencode、……),自动在后台导入(无需设置 CLI)。Ab Memorydsh-ab-memory--- description: "dsh-ab-memory 包:一种跨会话、基于文件的智能体记忆,提供五个工具(remember / recall / forget / load_skill / distill)以及始终启用的轻量注入。" kind: "package-reference" ---Memsearch Dsh@zilliz/memsearch-dsh适用于 DeepSeek Harness 的 MemSearch 插件:在多个代理之间共享 Markdown 记忆,支持捕获、步骤前上下文注入、记忆召回技能和技能候选审核面板。Archive Manager@michengai/dsh-archive-manager归档、恢复、收藏和永久删除会话,并诊断损坏的会话日志。