DSH Plugins Marketplace

DSH Plugins

Plugins

/

Tools & Capabilities

/

dsh-context-proxy

d

dsh-context-proxy

Manifest valid

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

hasBundlePatch

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.

Comments

Loading…

Similar plugins

dsh-context-offload

by Hanochhu

Context offloading for DeepSeek Harness: consumed tool calls and their results are replaced in the model-visible history by a short stub, while the originals stay in the session log for replay.

Sessions & MessagesManifest valid

★ 0

MIT

JavaScript

Sep 24, 2026

dsh plugin --profile web add dsh-context-offload

A `search` tool that learns to pick between fast and thorough search strategies using a contextual bandit (Thompson sampling), improving from real usage instead of a fixed heuristic.

Tools & CapabilitiesManifest valid

★ 0

dsh plugin --profile web add dsh-tool-bandit-search

by chunsi-w

Bounded context compaction, session-scoped summary reuse, explicit memory controls, and diagnostic-preserving tool pruning for DeepSeek Harness.

Tools & CapabilitiesManifest valid

★ 9

↓ 224/wk

MIT

JavaScript

Oct 4, 2026

dsh plugin --profile web add dsh-ctxopt-compaction

Session context handoff for DeepSeek Harness — stop re-reading and re-deriving context every session. A single skill (layer ①) that keeps the next session warm.

Tools & CapabilitiesManifest valid

★ 0

dsh plugin --profile web add dsh-token-handoff

by TritiumWang

Request-level one-time prompt injection without further context pollution. SillyTavern-style UI and data compatibility, keyword/regex/constant triggers, and a lore_lookup tool for on-demand searching.

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 3

MIT

JavaScript

Sep 6, 2026

dsh plugin --profile web add dsh-universal-worldbook

by kpl0111

Token-efficient tool-result pruning for DeepSeek Harness: compact previews, targeted recall, and long-session context control.

Manifest valid

★ 0

↓ 24/wk

MIT

JavaScript

Aug 16, 2026

dsh plugin --profile web add dsh-context-guard