dsh-projection-guard
会话投影缓存守卫:逐行 JSON 降级,单个违规投影单元(如第三方插件存储 Map)不再拖垮会话标题与整个缓存;启动自愈自动补全缺失标题。
damonkoy
@damonkoy
⬇ 1
★ 1
main
安装
dsh plugin --profile web add github:damonkoy/dsh-projection-guard
需要可复现安装时,可在仓库后追加 #commit 固定提交。
会话投影缓存守卫:逐行 JSON 降级,单个违规投影单元(如第三方插件存储 Map)不再拖垮会话标题与整个缓存;启动自愈自动补全缺失标题。
该插件未提供要点说明,请参考仓库 README。
- 安装并启动 DeepSeek Harness:
npx @deepseek-ai/dsh web - 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
- 用 dsh plugins list 确认已安装,必要时重启 Harness 生效
插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。
| 代码仓库 | github.com/damonkoy/dsh-projection-guard |
| 许可证 | MIT |
| 主要语言 | main |
| 下载量 | 1 |
| GitHub 星标 | 1 |
| 最近推送 | 2026-08-15 |
| 收录日期 | 2026-09-19 |
| 分类 | 会话与消息 |
事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。
以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。
# dsh-projection-guard
[中文](README.zh.md)
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.
2. **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.
3. **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
```sh
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:
```json
{
"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
| Key | Default | Meaning |
| --- | --- | --- |
| `repairOnStart` | `true` | Backfill missing cached titles from persisted logs at startup. |
| `logDropped` | `true` | Warn per dropped non-JSON row (key + session id). |
Example (profile `cordis.patch.yml` overlay):
```yaml
- id: projection-guard
config:
repairOnStart: true
logDropped: true
```
## Development
```sh
npm test # unit tests for the guard core
```
## License
MIT
数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。