DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-token-slim

s

dsh-token-slim

Discovered

Token optimization plugin suite for DeepSeek Harness (DSH): noise-filter, context-audit, selective-context — grounded in a research report on Claude Code session techniques and LLM context-compression

dsh-token-slim

Token optimization plugin suite for DeepSeek Harness (DSH). Three composable Cordis plugins that apply the techniques researched in docs/RESEARCH.md to the extension points DSH already provides — without touching the shipped compaction engine.

+-----------------------+      +------------------------+      +--------------------------+
| noise-filter          |      | context-audit          |      | selective-context        |
| tools/post-execute    |      | tokenMeter + tools     |      | agent/pre-step           |
| compress noisy bash   |      | health report + advice |      | conservative retention   |
| outputs line-by-line  |      | + compaction savings   |      | (experimental, opt-in)   |
+-----------------------+      +------------------------+      +--------------------------+
PluginDSH extension pointResearch basisDefault
dsh-token-slim/noise-filtertools/post-execute"quiet flags / output limits" (Claude blog), rtk / squeezon
dsh-token-slim/context-audittokenMeter.measure + tools.register + session/event/context habit, token-cost awarenesson
dsh-token-slim/selective-contextagent/pre-stepSelective Context / memory-compaction papersoff (experimental)

Why

In agentic coding tools every token that enters the context is re-read on every later turn. The highest-leverage optimizations are therefore: (1) keep noisy command output out of the context, (2) know how much context you are burning and what to do about it, (3) when under pressure, keep only the high-value history. DSH already ships the compression engine (tokenMeter, compaction, toolResultPruner); this suite adds the content-aware and user-facing layers around it. See docs/RESEARCH.md for the full report.

Install

The plugins run inside a DSH deployment, which already provides @deepseek-ai/cordis and @deepseek-ai/schemastery as peers.

npm install dsh-token-slim        # into the deployment's node_modules

Then add rows to the deployment's cordis.yml (host or an agent preset):

- id: noise-filter
  name: dsh-token-slim/noise-filter

- id: context-audit
  name: dsh-token-slim/context-audit

- id: selective-context
  name: dsh-token-slim/selective-context
  disabled: true   # experimental — read the docs before enabling
  config:
    enabled: false

All three plugins publish no services, so they sit loose in a preset (or host) composition; see compositions/cordis.example.yml.

Note on realms: if you mount these rows inside a group with an isolate realm, they must stay in the same group as the host services they consume (tools, tokenMeter). In a plain preset without realms there is nothing to do.

Plugins

noise-filter

Rewrites successful bash tool results whose command matches a known noisy class (test runners, build tools, git, listing). Line-by-line:

  • keep — failures, errors, warnings, stack frames, summary lines;
  • drop — per-case passes, progress bars, spinners, separators;
  • ambiguous — head/tail retained, middle suppressed.

Every rewrite appends a marker line and leaves the exit code untouched. A result below minChars / minSavingsChars is never touched.

- id: noise-filter
  name: dsh-token-slim/noise-filter
  config:
    minChars: 2000            # only consider results above this size
    minSavingsChars: 500      # only rewrite when at least this much is saved
    headLines: 10             # ambiguous head/tail retention
    tailLines: 10
    enableClasses: [test, build, git, list]
    keepPatterns: []          # extra regex sources, appended to defaults
    noisePatterns: []
    marker: '[dsh-token-slim] suppressed {suppressed} of {total} lines ({before} -> {after} chars); errors preserved'

context-audit

Registers a model-visible tool token_audit. Reading tokenMeter.measure(session) it reports:

  • total / surface token counts and pressure percent against a configured limit;
  • the largest tool-result offenders (seq, tokens, % of surface);
  • cumulative compaction savings tracked from compaction/summary events;
  • actionable suggestions (compact, prune, clear, subagent, continue) each with an honest heuristic savings estimate.
- id: context-audit
  name: dsh-token-slim/context-audit
  config:
    contextLimitTokens: 200000
    topOffenders: 8
    toolName: token_audit
    trackCompaction: true

selective-context (experimental, off by default)

Hooks agent/pre-step and, only when the projected surface is above pressureThresholdTokens, drops tool-result messages that are all of: older than minAgeTurns, at least minTokens tokens, and ≥ noiseRatioThreshold noise-classified lines (any single high-value line keeps the whole message). At most maxDropPerStep messages are dropped per step. Enable only after validating on your own workloads.

- id: selective-context
  name: dsh-token-slim/selective-context
  config:
    enabled: true
    pressureThresholdTokens: 150000
    minTokens: 2000
    minAgeTurns: 3
    noiseRatioThreshold: 0.95
    maxDropPerStep: 2

Development

npm install --omit=peer
npm test                       # node --test on the pure modules

The pure decision cores (src/noise-filter/filter.js, src/context-audit/audit.js, src/selective-context/retention.js) are fully unit-tested and have no runtime dependencies; the Cordis entry files (src/*/plugin.js) only need a DSH deployment to run.

Documentation

License

MIT — see LICENSE.

Comments

Loading…

Similar plugins

dsh-context-compression-improved

Improved fork of dsh-context-compression-selector with an orthogonal code-skeleton compression gate

Terminal & ClientsSessions & MessagesManifest valid

★ 0

dsh plugin --profile web add dsh-context-compression-improved

by Zoria-Lind

Layered token-optimization pipeline for DeepSeek Harness: output ladder, MCP lazy loading,compaction driver, cache-hit reporting. Built on real DSH plugin APIs; ~40-60% input saved in long sessions.

Sessions & MessagesTools & CapabilitiesManifest valid

★ 15

↓ 234/wk

MIT

JavaScript

Sep 17, 2026

dsh plugin --profile agent add dsh-token-optimizer

by GooDAnDReaDY

AST-based context compression, test log filtering, and token budget guard for DeepSeek Harness: strips redundant syntax, prunes noisy log lines, and enforces a token ceiling so the context window neve

Tools & CapabilitiesMemory & ContextTerminal & ClientsDevelopment & InfrastructureManifest valid

★ 2

↓ 1.2k/wk

MIT

JavaScript

Sep 26, 2026

dsh plugin --profile web add @goodandready/dsh-context-lens

by ZSeven-W

DeepSeek Harness (DSH) plugin: dispatch work to DSH agents from Claude Code / Codex — native subagent progress, in-host worker sessions with per-tier presets, and a multimodal bridge that lends the te

Tools & CapabilitiesWorkflow & AutomationSecurity & AuditVision & MultimodalManifest valid

★ 153

MIT

JavaScript

Sep 24, 2026

dsh plugin --profile web add @zseven-w/dsh-crew

by naitoupi

DeepSeek Harness (DSH) plugin: ? optimize the composer draft with the current model. Installable bundle (dsh.bundle + dsh.client); Settings tab: on/off switch, generation params, editable system promp

Development & InfrastructureSessions & MessagesManifest valid

★ 0

MIT

JavaScript

Sep 21, 2026

dsh plugin --profile web add prompt-optimizer-plugin

by huguangyu666

DeepSeek Harness plugin: import claude-code / codex / reasonix / zcode sessions

Sessions & MessagesTerminal & ClientsDevelopment & InfrastructureManifest valid

★ 7

↓ 147/wk

MIT

JavaScript

Sep 15, 2026

dsh plugin --profile web add dsh-plugin-session-import