DeepSHPlugins
dsh-projection-guard 项目预览
GITHUB / COMMUNITY PROJECT

dsh-projection-guard

会话与消息JavaScriptMIT

会话投影缓存守卫:逐行 JSON 降级,单个违规投影单元(如第三方插件存储 Map)不再拖垮会话标题与整个缓存;启动自愈自动补全缺失标题。

2 StarsDamonKoy 更新时间 2026-08-15
访问 GitHub 仓库
dsh-projection-guard 项目预览

项目介绍

中文

会话投影缓存守卫:逐行 JSON 降级,单个违规投影单元(如第三方插件存储 Map)不再拖垮会话标题与整个缓存;启动自愈自动补全缺失标题。

English

Guards the persisted session-projection cache: per-row JSON degradation so one misbehaving projection unit (e.g. a third-party plugin storing a Map) can never stall session titles or the whole cache again, plus a startup self-heal that backfills missing titles.

项目信息与收录信号

快照 2026-09-11
作者 / 组织
DamonKoy
仓库
DamonKoy/dsh-projection-guard
GitHub Stars
2
Forks
0
开发语言
JavaScript
许可证
MIT
最近推送
2026-08-15
Manifest
数据中检测到声明

公开仓库不自动等于可商用;许可证与当前兼容性以原项目文档为准。Manifest 和数据评分不构成安装安全认证。

数据评分

55/ 100
维护活跃
81
文档与实用信息
85
生态关注度
14
安装便捷信号
100
项目声明信号
85

README 含完整安装与使用说明;关注度尚低(2);标准命令一键安装。

评分来自已有数据快照的五维模型,仅作浏览参考,不是实际使用评测或安全检测结论。

安装与使用

所有项目资料与许可均以对应 GitHub 仓库为准。

dsh plugin --profile web add github:DamonKoy/dsh-projection-guard

复制命令不会自动执行。请先阅读仓库文档,确认环境要求与许可证。

项目截图

仓库 README

GitHub 原文

已保存的仓库文档快照;文档抓取时间未记录,可能与上方目录介绍处于不同版本。安装前请核对当前仓库说明。

dsh-projection-guard

中文

A DeepSeek Harness (DSH) plugin that guards the persisted session-projection cache against misbehaving projection units — so session titles (and every other projection) survive restarts no matter what third-party plugins do.

The bug it fixes

DSH persists per-session projection checkpoints (session titles, stats, permissions, …) into session_projcache.json. The write path serializes the whole per-session checkpoint in one JSON pass: if a *single* projection unit stores a non-JSON value (a Map, Set, class instance, cyclic or non-finite value — e.g. some third-party plugins), the entire write fails. The failure is fail-soft (log-only), so the cache silently stops updating. After a restart, every cold session loses its title projection and the UI falls back to showing the workspace folder name instead of the conversation title.

What this plugin does

  1. Per-row degradation (runtime wrapper). It wraps sessionProjectionCache.put() and drops only the rows that are not lossless JSON, keeping every healthy row durable. One bad unit can no longer stall the whole cache — titles, sessionListMetadata, stats etc. keep writing normally.
  1. Startup self-heal. On startup it scans persisted sessions whose cached title is missing and cold-reads their logs to backfill the title projection, so an already-stale cache recovers automatically.
  1. Observability. A read-only GET /projection-guard/status route reports wrapped-put call counts, dropped rows, and repaired titles (also shown as a small card in Settings when the client half is mounted).

No official or third-party files are modified — the guard is a pure runtime wrapper, so it survives dsh upgrades and works on any deployment.

Install

dsh plugin --profile web add github:DamonKoy/dsh-projection-guard

Restart dsh web. That's it.

Or add the repo as a profile dependency and include the bundle:

{
  "dependencies": {
    "dsh-projection-guard": "github:DamonKoy/dsh-projection-guard"
  },
  "dsh": {
    "profile": {
      "bundles": ["dsh-projection-guard"]
    }
  }
}

Then pnpm install in the profile directory and restart dsh web.

Configuration

KeyDefaultMeaning
repairOnStarttrueBackfill missing cached titles from persisted logs at startup.
logDroppedtrueWarn per dropped non-JSON row (key + session id).

Example (profile cordis.patch.yml overlay):

- id: projection-guard
  config:
    repairOnStart: true
    logDropped: true

Development

npm test          # unit tests for the guard core

License

MIT

使用前核对

安装步骤、兼容版本与授权范围以原项目当前文档为准。Stars 和评分是快照中的导航信号。

安装与排错 · 项目问题反馈

同类项目