dshbase

插件目录 / Knowledge / dsh-context-proxy

dsh-context-proxy

已验证 · 实测可装 EvilIrving

✓ 持续维护 基于 8 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

1Stars
0Forks
0未关闭 issue
—语言
2026-08-14最近推送
跨平台平台

功能简介

On-demand context retrieval for DeepSeek Harness: context_query / context_slice / context_grep tools.

✅
我们的评价
可用 — 实测通过,早期项目

On-demand context retrieval for DeepSeek Harness: context_query / context_slice / context_grep tools. 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

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

Tool Backing seam Returns
context_query sessionQuery.filterEvents lightweight { seq, type, text } matches by seq/type/surface/text
context_slice sessionQuery.readEvent one event plus a bounded before/after window
context_grep subprocess (packaged rg) or sessionQuery.filterEvents matches 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.

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-context-proxy」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

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

Headless(CLI)profile:

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

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Knowledge 里更多

浏览全部 7819 个插件 →