DSH Plugins Marketplace

DSH Plugins

Plugins

/

Sessions & Messages

/

dsh-reference-session-collector

d

dsh-reference-session-collector

Manifest valid

Read-only session-log projector (drsc) for DSH: scans ~/.dsh/sessions/**, decodes zstd/tiled-frame logs with a vendored leaf decoder and rewrites per-session projections into its own SQLite (node:sqli

UI (client)hasBundlePatch

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)。 环境变量:DSH_REFERENCE_SESSION_COLLECTOR_DIR 覆盖库目录; DSH_REFERENCE_SESSION_COLLECTOR_SYNC_INTERVAL_MS 调同步周期(0=关闭)。

状态与开发

开发中(核心链路已全通):投影核心/落库(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 逐字同构移植。

Compatibility

DSH 0.2.1-rc.2: failedDSH 0.2.1-rc.1: failedDSH 0.2.1-alpha.5: failed

Versions

Latest versionPublishedSize
0.2.0-beta.0——

Comments

Loading…

Similar plugins

dsh-trilogy

by TodayJin

该仓库暂未提供项目说明。

Memory & ContextSessions & MessagesManifest valid

★ 2

MIT

JavaScript

Sep 28, 2026

dsh plugin --profile web add dsh-trilogy

by drscrewdriver

Improved fork of dsh-context-compression-selector with an orthogonal code-skeleton compression gate

Terminal & ClientsSessions & MessagesManifest valid

★ 5

↓ 4.8k/wk

MIT

TypeScript

Oct 18, 2026

dsh plugin --profile web add dsh-context-compression-improved

by jh1016248

DSH(DeepSeek Harness)插件:会话标题栏一键导出当前会话 —— 「保存 MD」下载纯净 Markdown,「保存 HTML」下载带左侧目录、表格与代码块渲染的网页。自动过滤模型思考过程与工具调用记录,只保留用户与助手的正文,适合归档、分享与撰写报告。安装:dsh plugin --profile web add dsh-save-session

Development & InfrastructureManifest valid

★ 0

↓ 690/wk

MIT

JavaScript

Sep 11, 2026

dsh plugin --profile web add dsh-save-session

by LeslieWylie

Search, list and read past and current sessions through the harness's own `sessionQuery` service: uses the SQLite FTS5 index where a deployment enables it, and falls back to a bounded newest-first sca

Sessions & MessagesManifest valid

★ 5

MIT

JavaScript

Aug 18, 2026

dsh plugin --profile web add dsh-session-search-pro

by lpf20200901

给 AI 编码助手的跨会话长期记忆:自动注入、只推变化。DSH 插件 + 零依赖 CLI。

Development & InfrastructureMemory & ContextManifest valid

★ 0

MIT

JavaScript

Oct 15, 2026

dsh plugin --profile web add dsh-memory-delta

by xuzihao66

Cut the input-token cost of long DeepSeek Harness sessions: source-side tool-output compression on tools/post-execute plus per-agent tool-catalogue visibility, with a measurement script.

Tools & CapabilitiesSessions & MessagesManifest valid

★ 2

MIT

JavaScript

Oct 14, 2026

dsh plugin --profile web add dsh-token-frugal