deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
Unofficial project, independently developed and maintained by community members. 非官方项目,由社区成员独立开发和维护。
English · 中文说明
Highlight any sentence in your DeepSeek Harness (DSH) conversation, attach a sticky note to it, and keep all notes in a right-side panel — filterable by current workspace (directory) or current session. Notes persist across restarts and can be sent straight back into the composer.
在 DeepSeek Harness (DSH) 的会话消息中选中任意句子划线并记一张小便签;右侧面板聚合展示全部便签,支持按当前目录 / 本会话过滤;便签跨重启持久化,还可一键发送到对话框继续追问。

~/.dsh/storages/session-notes/notes.json; fs-service write with shell fallback, serialized queue.Two forms are supported: A. resident profile plugin(常驻,重启后仍在,推荐)and B. dynamic cordis package(动态,免装即用,重启即失)。
Clone this repo anywhere on disk.
Link it into your web profile and install:
cd ~/.dsh/profiles/web
# package.json → "dependencies": { "dsh-session-notes": "link:<abs path to this repo>" }
pnpm install
Append to ~/.dsh/profiles/web/cordis.patch.yml:
- insert:
- id: session-notes
name: 'dsh-session-notes'
Restart dsh web. The host half serves /session-notes/api/*; the client half is picked up via the package's dsh.client declaration and bundled for every page load (UI survives refresh).
Runs in the current dsh web process — no build step, no npm.
Clone or download this repo.
Open a DSH session (创造模式 / cordis preset — the one with cordis_define / cordis_run tools) and ask the agent:
帮我安装这个插件:仓库 https://github.com/iptton-ai/dsh-plugin-session-notes。 用 cordis_define 定义(读取 src/host.js 作为 code.host、src/client.js 作为 code.client,plugin id 前缀 snote), 然后 cordis_run 激活并批准。
Or, if you prefer doing it by hand: paste the two function bodies from src/host.js and src/client.js into cordis_define's code.host / code.client, then cordis_run the returned package and approve it in the UI.
Refresh the page, open a session, and select some message text.
Dynamic plugins live for the lifetime of the
dsh webprocess. After a DSH restart, re-run step 2 (your notes on disk are kept).
| Piece | Where | What |
|---|---|---|
| Zero-DOM highlight engine | src/client.js |
Matches each note's quote against the message flow with whitespace-folding + gap-aware text assembly (block/<br> boundaries insert \n, inline-adjacent nodes join seamlessly — mirrors Selection.toString()), then registers Ranges into CSS.highlights (::highlight(snote-hl)). Falls back to <mark> wrapping on engines without the Highlight API. |
| Message-flow anchor | src/client.js |
A hidden entry in the conversation.composer.dock slot walks up to the scroll container — no product class names, no DOM replacement. |
| Side panel / popups / selection button | src/client.js |
Additive slot entries only: shell.overlay, conversation.session.header.utilities. |
| Persistence | src/host.js |
Package-private RPC (notes/list|add|update|delete|diag) over harness.handle; stores JSON under ~/.dsh/storages/session-notes/; per-call danger-full-access sandbox policy for its own storage file (the default workspace-write fence excludes ~/.dsh). |
The host half explicitly passes sandboxPolicy: { mode: 'danger-full-access' } only for its own storage file (~/.dsh/storages/session-notes/notes.json), because the deployment-default workspace-write fence does not include the DSH home directory. The plugin never touches other paths.
Session Notes(会话划线便签) 是一个 DeepSeek Harness (DSH) 的动态 Cordis 插件:像在书上做批注一样,在 AI 会话里边聊边划线、记便签。
~/.dsh/storages/session-notes/notes.json,跨重启保留;fs 服务写入失败时自动降级 shell 通道,写队列失败隔离。这是一个 DSH 动态 Cordis 插件,直接运行在当前 dsh web 进程里 —— 无需构建、无需 npm。
克隆或下载本仓库。
打开一个带 cordis_define / cordis_run 工具的 DSH 会话(创造模式 / cordis 预设),对 agent 说:
帮我安装这个插件:仓库 https://github.com/iptton-ai/dsh-plugin-session-notes。 用 cordis_define 定义(读取 src/host.js 作为 code.host、src/client.js 作为 code.client,plugin id 前缀 snote), 然后 cordis_run 激活并批准。
也可以手动:把 src/host.js、src/client.js 两个函数体分别粘贴进 cordis_define 的 code.host / code.client,再 cordis_run 激活返回的 package 并在界面上批准。
刷新页面,打开会话,选中一段消息文字即可开始。
动态插件的生命周期与
dsh web进程一致。DSH 重启后重新执行第 2 步即可(磁盘上的便签数据不会丢)。
| 模块 | 位置 | 说明 |
|---|---|---|
| 零 DOM 高亮引擎 | src/client.js |
用空白折叠 + 间隙感知拼接(块级/<br> 边界补 \n、inline 紧邻节点无缝相连,与 Selection.toString() 语义一致)把每条便签的引用文本匹配回消息流,然后构造 Range 注册进 CSS.highlights(::highlight(snote-hl) 伪元素绘制)。不支持该 API 的浏览器自动回退 <mark> 包裹方案。 |
| 消息流锚点 | src/client.js |
在 conversation.composer.dock 插槽注册一个隐藏锚点组件,向上定位消息滚动容器 —— 不依赖产品 class 名,不替换任何产品 UI。 |
| 面板 / 弹窗 / 选区按钮 | src/client.js |
全部为增量插槽项:shell.overlay、conversation.session.header.utilities。 |
| 持久化 | src/host.js |
通过 harness.handle 提供包私有 RPC(notes/list|add|update|delete|diag);JSON 存储于 ~/.dsh/storages/session-notes/;对自己的存储文件按调用声明 danger-full-access 沙箱策略(部署默认的 workspace-write 围栏不覆盖 ~/.dsh)。 |
Host 半仅对自己的存储文件(~/.dsh/storages/session-notes/notes.json)显式传 sandboxPolicy: { mode: 'danger-full-access' },原因是部署默认的 workspace-write 文件围栏不包含 DSH 主目录。插件不触碰其他任何路径。
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。