DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins

dsh-reference-session-collector

Reference Session Collector

DSH Web plugin: Session Raw Text Projection Synchronizer (DRS)—read-only scans ~/.dsh/sessions session logs, decodes them, and projects them into its own SQLite database (segments/replaces/FTS5). It provides surface marking, recall reconciliation, and content search through /api/dsh-reference-sessio

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add dsh-reference-session-collector@0.2.6
READMECompatibilityVersions

Description

DSH Web plugin: Session Raw Text Projection Synchronizer (DRS)—read-only scans ~/.dsh/sessions session logs, decodes them, and projects them into its own SQLite database (segments/replaces/FTS5). It provides surface marking, recall reconciliation, and content search through /api/dsh-reference-session-collector. It never writes to session files.

Compatibility and provenance

Reference Session Collector is published as dsh-reference-session-collector and currently resolves to version 0.2.6. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
npm
Registry updated
11/4/2026

Versions

0.2.6stable
11/2/2026
0.2.5stable
11/1/2026
0.2.4stable
10/30/2026
Show 6 more versionsCollapse versions
0.2.3stable
10/28/2026
0.2.2stable
10/26/2026
0.2.1stable
10/23/2026
0.2.0stable
10/20/2026
0.2.0-beta.0beta
10/20/2026
0.1.0stable
10/20/2026

Related plugins

Loading related plugins…

Latest
0.2.6
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
6.4 MB
Files
33
Surface
web
License
MIT
Source
npm
Weekly downloads
3,439
Security scan
✓ v0.2.6 scan passed
View source ↗Project homepage ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in memory-context.

Hindsight Coding Agents@vectorize-io/hindsight-coding-agentsReflect-only Hindsight long-term memory for coding agents (harness-pluggable: opencode, …), with automatic background ingestion (no setup CLI).Memory Plugin@openviking/dsh-memory-pluginOpenViking memory and context bundle for DeepSeek HarnessArchive Manager@michengai/dsh-archive-manager归档、恢复、收藏和永久删除会话,并诊断损坏的会话日志。 · Archive, restore, favorite, and permanently delete sessions, and diagnose damaged session logs.Memory@furongjun1999/dsh-memoryLingshu (Lingshu·líng shū) DeepSeek Harness plugin: a complete brain—long-term memory/knowledge flywheel/self-awareness/recursive reflection integrated with DSH, with conversations automatically distilled into the md_cg cognitive graph (md documents)

README

dsh-reference-session-collector (DRSC) — 会话原文投影同步器

只读扫描 ~/.dsh/sessions/** 会话日志,解码后投影进插件自有 SQLite (segments / replaces / FTS5),经单条 fenced HTTP 路由对外提供 surface 标记、召回对账与中文可用的内容检索面。绝不写会话文件。

Session Reference Projector (DRSC) — English summary

DRSC is a read-only projector over the host's session logs. It walks ~/.dsh/sessions/**, decodes zstd/teiled-frame logs with a vendored leaf decoder, and rewrites per-session projections into ~/.dsh-reference-session-collector/projection.db (SQLite via node:sqlite, four tables + one FTS5 virtual table). A single fenced HTTP route (GET/POST /api/dsh-reference-session-collector) exposes status, session listings, per-session segment windows, the surface ledger, recall/compress pair accounting and full-text search. Token counts share the exact same DeepSeek-V4 tokenizer and formula as CCI's verify, falling back to a labelled chars/4 basis when assets are absent. DRSC never writes to any session file; its only writes land in its own data directory.

定位 / Positioning

消费方用 DRSC 做什么分期
CCI(context-compression)surface 标记(compressed/surface_text/replaced_by)、召回对账(Σb 回吐、Σ(a−b) 毛节省)、verify 免全量解码一期
steward(会话管家)内容搜索语料源切换(search_text/time/on_surface 检索面)二期
prime-memory历史投影只读:op=session&turn= 锚点回填 l0 旧行 turn/step(l0 写路径不迁)三期

状态 / Status

已交付(v0.1.0):宿主半身全量——纯投影核心、SQLite 投影库 (node:sqlite, FTS5)、增量同步引擎(watermark 预查/归档集跟随/interval 调度)、三层缓存查询面、fenced HTTP 路由;门禁链 pnpm check 全绿 (9 测试文件 / 66 测试)含 dist 冒烟。剩余:消费方接线(一期 CCI 对账 / 二期 steward 语料切换 / 三期 memory 锚点回填)与效率基准 T9.1。

其余 8 语文档:README.en / ja / ko / de / es / fr / ru / it。

架构

~/.dsh/sessions/**(只读)──→ ProjectionSync(增量, watermark=bytes+mtime)
                                   │ projectSessionEvents(纯核心)
                                   ▼
        ~/.dsh-reference-session-collector/projection.db(四表 + fts5 + 缓存三层)
                                   │
              ┌────────────────────┼───────────────────┐
   /api/dsh-reference-session-collector     CCI(一期)      steward(二期)/memory(三期)
   (status/surface/recall/…)     monitor 对账      语料源/锚点回填

HTTP 路由表

单条 fenced 路由 GET/POST /api/dsh-reference-session-collector,op 分发:

op参数返回
status—库自检 + 缓存统计 + 上次同步结果
sessionsoffset/limit会话汇总表分页
sessionsession=<id>,可选 turn=<区间>、fields=searchsegments 明细(fields=search 返 time/search_text/on_surface 检索面)
surfacesession=<id>surface 台账(当前表面行 + 被替换指针)
recallsession=<id>替换对分类账(compress/recall、Σb、Σ(a−b))
searchq=<词>,可选 session=FTS5 BM25 命中(中英同构切词)
sync(POST){op:'sync'}accepted + 上次结果(后台增量同步)

只读纪律

  • 会话文件(~/.dsh/sessions/**)与 workspace.json 一律只读;
  • 插件的全部写入落在 ~/.dsh-reference-session-collector/projection.db;
  • 每 session 全量重写式替换(事务内 DELETE+INSERT),幂等可重放;
  • 脱敏责任不在 DRSC:projection.db 存原文,泄露面=会话文件本身。

分期路线

  1. 一期:投影库 + HTTP 面 + CCI 对账接线(monitor 探针 + verify 对账列);
  2. 二期:steward 内容搜索语料源切换(interval 同步缺省 30s 保新鲜度 ≤1 分钟);
  3. 三期:memory 历史锚点回填(op=session&turn= 匹配补 l0 旧行 turn/step, 匹配不上留 NULL 不伪造);向量层(BGE-M3 int8 vec 列)为独立可选批任务。

Token 口径

deepseek-v4-tokenizer(flash→pro 顺序解析,资产带 SHA-256 验证)与 CCI verify 同公式同词表;资产缺席降级 chars/4 并在 sessions.basis 如实标注。

安装 / 运行

dsh plugin --profile web add dsh-reference-session-collector

要求 node ≥ 22(zlib.zstdDecompressSync + node:sqlite;按内置模块实际门槛,建议 ≥22.16)。 环境变量:DSH_REFERENCE_SESSION_COLLECTOR_DIR 覆盖库目录; DSH_REFERENCE_SESSION_COLLECTOR_SYNC_INTERVAL_MS 调同步周期(0=关闭); DSH_REFERENCE_SESSION_COLLECTOR_SYNC_BUDGET_MS 调单轮时间预算(缺省 20000;0=不限)。

规模边界

  • 单轮有时间预算(缺省 20s < interval 30s):预算只拦「尚未开始的会话」—— syncOne 里 readFileSync / decode / project / replaceSession 全是不可中断的同步段,预算拦不住它们。 第一个会话总是放行,否则预算小于单会话耗时时会出现零进度轮。
  • 不完整轮禁止剪枝:预算中断、发现被 DISCOVERY_LIMIT 截断、sessions 根缺失三种情况下, 「这轮没扫到」≠「宿主已删除」,一律不动手删投影(误删不可逆,宁留陈旧行)。
  • 续扫游标:预算中断后下一轮从断点环形起扫(内存态,重启归零)。没有它就会出现活锁 —— 预算总在 walk 头部耗尽,尾部会话永远轮不到,而头部每轮 stat-skip 全命中(表面「同步一直正常」)。
  • 单会话仍无上界:一个超大 session 的一次全量重写(事务内 DELETE+INSERT)不受轮预算保护, 也不可中断。要治需在投影层分块 + 增量 upsert(会触及幂等重放契约),目前是已知边界。

状态与开发

开发中(核心链路已全通):投影核心/落库(L1)、同步引擎(L3)、宿主半与 路由(L4)已落地,门禁全绿(typecheck/lint/build/smoke,37/37 测试); 收尾中:查询面正式测试(T4.2)、跨仓接线(cci 一期 / steward 二期 / memory 三期)。进度簿:.agents/plans/drs-start/ (spec / findings / checklist / tasks)。

pnpm install && pnpm typecheck && pnpm lint && pnpm test && pnpm build

Vendored

src/session-file-decode.ts、src/token-count.ts、src/deepseek-v4-tokenizer.ts 为 CCI 文件级回搬件(禁止分叉,头注登记 provenance 与唯一授权 diff); 检索视界/切词逻辑为 steward 逐字同构移植。