DeepSHPlugins
dsh-context-proxy 專案預覽
GITHUB / COMMUNITY PROJECT

dsh-context-proxy

會話與訊息TypeScriptMIT

按需取回薄層:context_query / context_slice / context_grep 三個工具讀取已持久化的歷史,引用可回放。

1 StarsEvilIrving 更新時間 2026-08-14
訪問 GitHub 倉庫
dsh-context-proxy 專案預覽

專案介紹

中文

按需取回薄層:context_query / context_slice / context_grep 三個工具讀取已持久化的歷史,引用可回放。

English

Thin on-demand context retrieval: context_query / context_slice / context_grep tools that read already-persisted history back with replay-safe citations.

專案資訊與收錄訊號

快照 2026-09-11
作者 / 組織
EvilIrving
倉庫
EvilIrving/dsh-context-proxy
GitHub Stars
1
Forks
0
開發語言
TypeScript
許可證
MIT
最近推送
2026-08-14
Manifest
資料中檢測到宣告

公開倉庫不自動等於可商用;許可證與當前相容性以原專案文件為準。Manifest 和資料評分不構成安裝安全認證。

資料評分

50/ 100
維護活躍
81
文件與實用資訊
85
生態關注度
9
安裝便捷訊號
75
專案宣告訊號
100

README 含完整安裝與使用說明;關注度尚低(1)。

評分來自已有資料快照的五維模型,僅作瀏覽參考,不是實際使用評測或安全檢測結論。

安裝與使用

所有專案資料與許可均以對應 GitHub 倉庫為準。

dsh plugin --profile web add github:EvilIrving/dsh-context-proxy

複製命令不會自動執行。請先閱讀倉庫文件,確認環境要求與許可證。

專案截圖

倉庫 README

GitHub 原文

已儲存的倉庫文件快照;文件抓取時間未記錄,可能與上方目錄介紹處於不同版本。安裝前請核對當前倉庫說明。

儲存庫檔案保留原文,指令與授權文字不作自動改寫。

dsh-context-proxy

Thin on-demand context-retrieval layer for the DeepSeek Harness.

Awesome DSH Plugin

Automatic truncation, spill-to-disk, compaction, and token metering are already owned by output-retention, spill-policy, compaction-basic, and session-query. This package adds only the missing piece: three model-facing tools that read already-persisted history back on demand.

Install

dsh plugin --profile <name> add github:EvilIrving/dsh-context-proxy

Or, from a checkout:

dsh plugin --profile <name> add ./dsh-context-proxy

The bundle patch inserts one plugin row (dsh-context-proxy). sessionQuery and subprocess are optional backends (ctx.get): without a sessionQuery backend each tool degrades to an isError result instead of waiting forever.

Tools

ToolBacking seamReturns
context_querysessionQuery.filterEventslightweight { seq, type, text } matches by seq/type/surface/text
context_slicesessionQuery.readEventone event plus a bounded before/after window
context_grepsubprocess (packaged rg) or sessionQuery.filterEventsmatches with { text, citation }

Citations are replay-safe: context_query/context_slice cite session:<seq> (rebuildable from the canonical log), and context_grep cites either a spill path (path:line, fast local path) or session:<seq> (semantic-text fallback when no spill path is supplied or available).

Config

export interface Config {
  readWindowDefault: number  // default before/after for context_slice (default 0)
  grepMaxBytes: number       // rg stdout in-memory cap (default 1 MiB)
  rgGraceMs: number          // rg termination grace (default 5000)
}

Dependencies

  • sessionQuery and subprocess are optional services read via

ctx.get(...). A missing sessionQuery backend degrades each tool to an isError result (session query backend unavailable) instead of leaving the plugin waiting forever; the same applies to subprocess for context_grep with an explicit path.

  • tools is a hard dependency (inject).
  • The packaged ripgrep binary comes from @vscode/ripgrep — the same mechanism

dsh-tool-fs-search uses — so no system rg install is required and no shell layer exists between the argv vector and ripgrep.

Model Experience

Request context and condition

What the model sees

Three tool schemas (context_query, context_slice, context_grep) are registered into the agent's tool set. Each result is a compact JSON object of matches/items plus citations; no prose is returned for the model to parse ids out of.

Token effect

Zero-direct effect until a tool is invoked; each invocation's cost is bounded by the query/slice window and the grepMaxBytes cap.

KV Cache effect

Append-only: tool results append to the surface; they never rewrite earlier request tokens.

Known Limitations and Deferred Work

  • context_grep line parse is path:line:text — a spill path containing a

newline (not expressible in the durable locator) would confuse the parser; absolute spill paths never contain one.

  • Fallback text scan is literal, not regex — when no spill path is

supplied, context_grep falls back to sessionQuery's literal, case-insensitive, whitespace-flexible scan, not a regex search.

  • Bundle writing is not sandboxed — nothing here writes files; retrieval

only reads through the seams.

使用前核對

安裝步驟、相容版本與授權範圍以原專案當前文件為準。Stars 和評分是快照中的導航訊號。

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

同類專案