Community plugin

JessenReinhart / dsh-tokenslash

A public repository discovered by a configured registry source.

  • JavaScript
  • MIT
  • 10 stars
  • Nov 3, 2026

About this plugin

Written by the registry from verified metadata, not from the README.

dsh-tokenslash is a DSH plugin published from the JessenReinhart/dsh-tokenslash repository.

  • Listing statusManifest verified
  • Manifest checkedNov 11, 2026
  • Packagedsh-tokenslash
  • Package version1.4.1
  • Source commit335071e
  • Repository createdSep 28, 2026

Capabilities and topics

cordisdeepseek-harness
From the repository README

README

Everything below this line is the repository's own document, cached here. This site did not write or review it.

Cached versionView on GitHub

Node.js 20+ License: MIT

TokenSlash

Keep the context that matters. Drop the overhead that doesn't.

TokenSlash is a Cordis plugin for DeepSeek Harness (DSH) that makes agent context more deliberate. It uses lightweight, structured decisions to select task-relevant tools and prompt sections, keep tool output manageable, and help agents route work without permanently losing access to capabilities.

Your agent should spend its context solving the task, not rereading the descriptions of tools it will never call.

What it does

CapabilityWhat you get
Task-aware prompt pruningSelects relevant tool schemas and prompt sections for the current task.
Output and observation hygieneCompacts oversized tool results and can mask older observations to keep context focused.
Subagent routingUses structured decisions to select model tiers and decide when a fork can run with less parent context.
Tool recoveryLets an agent inspect a pruned tool's schema or unlock that tool for the current turn.
Workflow guardrailsOptional goal, turn-completion, and tool-safety hooks.
VisibilityIn-chat savings telemetry, prune statistics, history, and a settings UI.

TokenSlash is configurable rather than one-size-fits-all. Tool pruning supports normal, extreme, and off modes; tools can be pinned, and individual modules can be enabled or disabled.

Quick start

Install from GitHub using the DSH plugin manager:

dsh plugin add github:jessenreinhart/dsh-tokenslash

Then open the DSH settings for TokenSlash, choose a triage provider, and configure the model and module switches for your setup.

  • Default preset: 9Router Proxy
  • Other presets: OpenCode Zen, TypeSafe Jev, OpenRouter, Inception Labs (Mercury Decide), LocalJev, and a custom endpoint
  • Runtime: Node.js 20+

The provider is used for narrow, structured decisions. It is not the conversational model that writes code or answers general questions.

Built-in agent tools

TokenSlash adds focused utilities that help an agent use its existing tools more efficiently.

ToolUse it for
tokenslash_indexGet a structural outline of a file: signatures, exports, symbols, and line ranges. Use it to locate the relevant part before requesting a larger read.
tokenslash_batchRun independent tool calls in parallel, or run calls sequentially when order matters.
tokenslash_peekInspect the schema of a pruned tool, or unlock it so the agent can use it during the current turn.
tokenslash_diagnoseClassify errors and test failures, suggest files to inspect, or rank candidate tests by relevance.
tokenslash_triageAsk the configured decision engine a narrow probability or multiple-choice question.

A note on triage

The triage engine is a micro-decision engine, not a chat model. Use it for decisions such as:

  • Is this task suitable for a cheaper subagent model?
  • Can this fork proceed without the parent's full conversation history?
  • Which tool group is relevant to this prompt?
  • Is this test failure likely to be flaky?

Do not use it to write code, inspect files, search the web, or answer open-ended questions. Keep those jobs with the main agent and its normal tools.

How pruning stays reversible

  1. Read the task. TokenSlash evaluates the current prompt with the configured decision provider.
  2. Keep the useful surface. Relevant tool groups and prompt sections stay available; irrelevant schemas can be pruned.
  3. Recover on demand. The agent can call tokenslash_peek to inspect or unlock a tool that turns out to be needed.
  4. Fail open. The default configuration favors preserving normal tool access when triage is unavailable or fails.

That last point matters: pruning should reduce clutter, not strand an agent halfway through a task.

Configuration

Most users can configure TokenSlash from the DSH settings UI. The main controls include:

SettingPurpose
Provider / modelSelect a supported decision endpoint and model.
Tool pruning modenormal for conservative pruning, extreme for more aggressive pruning, or off to disable tool pruning.
Pinned toolsKeep named tools available regardless of the pruning decision.
Fail openPreserve tool access when the decision provider cannot be used.
ModulesToggle routing, fork decoupling, prompt pruning, output compaction, observation masking, prefix-cache alignment, and guardrails.

See docs/TRIAGE.md for provider and decision-format details, and docs/COMPATIBILITY.md for the tested DSH/Cordis host contracts.

Benchmarks and measurement

Token savings depend on the task, available tool set, DSH runtime, and decision provider. A pruning pass can add overhead when most tools are still relevant, so there is no fixed savings percentage promised by this project.

The repository includes the benchmark harnesses and raw result files so you can inspect the measurements and compare them with your own workload:

Development

Requires Node.js 20 or later.

npm install
npm test

The test command runs the project's Node.js test suite.

Project links

License

MIT © Jessen Reinhart

Badge

Listed here? Link back with this badge — paste the snippet into your repository README.

Listed on DSH Plugin badge
[![Listed on DSH Plugin](https://dsh-plugin.com/badges/listed.svg)](https://dsh-plugin.com/plugins/JessenReinhart/dsh-tokenslash)