DSH Plugins Marketplace

DSH Plugins

Plugins

/

Development & Infrastructure

/

dsh-token-optimizer

S

dsh-token-optimizer

Manifest valid★ 4

Deterministic, recoverable tool-result compression and cache-aware compaction for DeepSeek Harness.

UI (client)hasBundlePatch

dsh-token-optimizer

Deterministic, recoverable tool-result compression and cache-aware compaction for DeepSeek Harness 0.1.5-rc.1.

中文文档

What it does

  • Compresses large successful text tool results before they repeatedly enter the model context.
  • Compresses PTC sub-dispatch log copies without changing the complete structured values received by run_code programs.
  • Archives every lossy replacement and exposes retrieve_spill for exact, session-authorized recovery.
  • Provides a root-level BasicCompactionEngine adapter with a 62.5% default threshold while preserving DSH's cache-aware replay, branded Session API, and routed image accounting.
  • Adds a Web conversation dashboard through the split Conversation, Renderer, and Session client contracts.

Install

Install the 0.2.1 bundle into a DSH 0.1.5-rc.1 Web profile:

dsh plugin --profile web add dsh-token-optimizer@0.2.1

Restart the existing dsh web process after installation. The bundle enables recoverable tool-result compression, spill retrieval, projection, the Web dashboard, and the 62.5% automatic compaction engine across all four shipped agent modes. No user preset copy is required.

The root engine observes each agent's pressure and overflow lifecycle. In Standard, PTC, and Creator modes it runs before the isolated stock engine, so the surface is reduced at 62.5% and the stock 80% fallback has no second reduction to perform. Minimal mode has no preset compaction group and uses the root engine directly. The optional preset-cordis.yml fragment remains for deployments that deliberately want to replace a preset's isolated provider itself; do not edit shipped presets. Existing user-copied presets are not modified automatically and should be revalidated against the DSH 0.1.5-rc.1 composition before reuse.

DSH 0.1.5-rc.1 ships its own spill subsystem (dsh-spill-local plus dsh-spill-policy at maxInlineBytes: 50000). The optimizer keeps its durable archive as the retrieval authority and mirrors each replacement into that backend when it is present, so the two coexist without compressing the same result twice.

Verify

pnpm install
pnpm run check
npm pack --dry-run

The current test suite covers deterministic compression, persistent recovery, session lineage authorization, compaction defaults, DSH projection behavior, and real tool-runtime integration.

Compatibility

dsh-token-optimizerDeepSeek HarnessStatus
0.1.90.1.1-rc.2Superseded
0.2.00.1.2-rc.1Superseded
0.2.10.1.5-rc.1Current release

0.2.0 removed the retired dsh-client-runtime dependency, uses the split Conversation/Renderer/Session client graph, folds projections through the on-demand Session log API, and handles PTC durable dispatch logs. See the 0.1.2-rc.1 compatibility research.

0.2.1 adapts to the SpillSource discriminated union that dsh-spill gained — tool producers must now declare kind: 'tool' — and raises every declared DSH range to 0.1.5-rc.1. No other plugin surface changed between the two releases. See the 0.1.5-rc.1 compatibility audit.

The DSH packages remain optional peer dependencies so the profile runtime supplies the matching services.

License

MIT

Compatibility

DSH 0.2.1-rc.4: failedDSH 0.2.1-rc.3: failedDSH 0.2.2-rc.1: failed

Versions

Latest versionPublishedSize
0.2.6——
0.1.8——
0.1.9——
0.2.0——
0.2.1——
0.2.2——
0.2.3——
0.2.4——
0.2.5——

Comments

Loading…

Similar plugins

dsh-context-guard

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

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

↓ 194/wk

MIT

JavaScript

Oct 4, 2026

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

by omdsh-dev

Better compaction for DeepSeek Harness: native/goal/handoff modes, budget controls and visualization.

Manifest valid

★ 4

↓ 665/wk

Apache-2.0

JavaScript

Nov 18, 2026

dsh plugin --profile web add dsh-better-compact

by dingchenhui0618-arch

Local mirrored A/B benchmark for DeepSeek Harness context compression: input tokens, turns, tool success, fact coverage, answer diff, JSON + SVG.

Tools & CapabilitiesManifest valid

★ 0

MIT

JavaScript

Oct 28, 2026

dsh plugin --profile web add dsh-compress-bench

DeepSeek Harness plugin that trims tool output (head/tail plus grep folding), adds optional prompt shaping (Caveman and Ponytail), instant local responses, RTK command-output compaction, context-press

Tools & CapabilitiesManifest valid

★ 1

MIT

TypeScript

dsh plugin --profile web add dsh-token-saver

by mrbeandev

Deterministic, zero-LLM, byte-budget context compaction for DeepSeek Harness, with byte-exact recall of compacted history

Manifest valid

★ 0

MIT

JavaScript

Sep 30, 2026

dsh plugin --profile web add dsh-hypercompact