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 和評分是快照中的導航訊號。

安裝與排錯 · 專案問題反饋

同類專案