DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Tokenslash — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
T

dsh-tokenslash

Tokenslash

TypeSafe Jev token optimization suite for DeepSeek Harness (DSH): Subagent Router, Fork Decoupler, Tool Schema Pruner, Output Compactor, and Settings UI

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:JessenReinhart/dsh-tokenslash#b9bb645c63fea0198176484e0e0fc5c959175f9b
READMECompatibilityVersions

Compatibility and provenance

Tokenslash is published as dsh-tokenslash and currently resolves to version 1.0.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
9/28/2026

Versions

1.0.0stable
9/28/2026

Related plugins

Loading related plugins…

Latest
1.0.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 6
Weekly downloads
0
Last push
10/14/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in models-usage.

Usage@linxin666/dsh-usageUsage statistics plugin for the dsh web GUI: per-provider balance and coding-plan quota detection plus a live token usage ledger, with a compact price glance card above the sidebar's Settings rowClient Ui Model Capabilities@linxin666/dsh-client-ui-model-capabilitiesPer-model capability declarations (image input and reasoning efforts) for custom pi-ai providers, edited in place on the Models settings cards; writes the official llm-pi-ai settings namespace, no DSH source changes.Codex Subscriptiondsh-codex-subscriptionUse ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images, and Fast modeCommandcode Provider@mars-sea/dsh-commandcode-providerUnofficial DeepSeek Harness LLM provider plugin for Command Code, ported from pi-commandcode-provider (MIT). Registers the 'commandcode' provider route with a Models-page card and live model catalog.

README

dsh-tokenslash

TokenSlash optimization suite for DeepSeek Harness (DSH). Routes subagents to cheaper model tiers, prunes noisy tool output, compacts context, and guards goal budgets via TypeSafe Jev triage decisions.

Features

  • System prompt & tool schema pruning — system-prompt/assemble waterfall strips unused tool schemas and related verbose prompt sections based on intent, saving 3K-8K input tokens per turn.
  • Subagent routing — tokenslash_triage decisions fork work to cheap/medium/smart tiers, saves tokens per decouple.
  • Tool output pruning — post-execute hook strips oversized JSON payloads over 10KB to compact summaries.
  • Output compacting — prompt-assemble hook summarizes history when context exceeds ~8K tokens.
  • Goal guard — warns at 80% of max goal rounds, emits notice via ctx.app.notice/ctx.notice.
  • Provider fan-out — OpenCode Zen, 9Router, OpenRouter, TypeSafe Jev, Custom endpoint with cached model discovery.
  • Telemetry — tokens saved, USD estimate, per-module counts, rolling history, JSON persistence via toJSON/fromJSON.
  • Settings UI — host settings section + web client (lib/client.js, ModelPicker/SettingsCard components).

Installation

Requires Node.js >=20, ESM ("type": "module").

npm install dsh-tokenslash
# or drop into DSH packages dir and restart host

Plugin mounts via cordis.patch.yml (id: tokenslash). Host entry lib/index.js exports apply/inject; browser entry lib/client.js re-exports web slots.

Configuration

KeyTypeDefaultPurpose
enabledbooleantrueMaster switch
providerstringopencodeActive Jev provider id
customBaseUrlstringhttp://127.0.0.1:20128/v1/systemoneBase URL when provider=custom
apiKeystring""Bearer token for auth providers
modelstringjev-1.13-freeDefault triage model
decoupleThresholdnumber (0-1)0.85Confidence cutoff for subagent fork
modelTiers.cheapstring (CSV)gemini-2.5-flash, deepseek-chat, gpt-4o-miniCheap tier list
modelTiers.mediumstring (CSV)gemini-2.5-pro, claude-3-5-haikuMedium tier list
modelTiers.smartstring (CSV)deepseek-reasoner, claude-3-7-sonnet, gpt-4oSmart tier list
toolPruningModestring"normal"Pruning mode: "normal" (intent-based, keep core tools), "extreme" (prune all tools), "off" (no tool pruning)
modules.subagentRoutingbooleantrueEnable routing hook + auto-route handler
modules.toolPruningbooleantrueEnable tool output prune hook
modules.promptPruningbooleantrueEnable system prompt & tool schema pruning before model request
modules.outputCompactingbooleantrueEnable compact hook
modules.goalGuardbooleantrueEnable goal budget warnings

Helpers:

  • parseConfig(raw) — schema-validated config with defaults.
  • parseModelTiers(tiers) — CSV/array → { cheap, medium, smart } arrays.
  • getConfigForProvider(provider, overrides) — resolves baseUrl/model per provider.
  • getProviderConfig(provider, config) / listProviders() / fetchModels(provider, opts) — cached (5 min TTL) model discovery; clearModelsCache() busts cache.

API Endpoints

Base prefix: /api/dsh-tokenslash

MethodPathBody / QueryResponse
GET/config—Current config JSON
POST/configSaveSchema (provider, customBaseUrl, apiKey, model, decoupleThreshold, modelTiers, modules, enabled){ ok, config }
POST/triage{ questions, model? }Jev triage JSON
POST/describe{ task, context?, model? }Triage describe result
POST/test{ provider?, customBaseUrl?, apiKey?, model?, timeoutMs? }{ ok, provider, model } or error
GET/models—{ models, current, provider }
GET/stats—Telemetry stats
GET/history?limit=Nlimit ≤ 500{ history }

Host tool: tokenslash_triage — input { questions: object, model?: string }, calls jevClient.triage.

Architecture

lib/index.js          apply()/inject() — bridge routes, settings section, tool, agent hooks
lib/config.js         ConfigSchema, parseConfig, parseModelTiers, getConfigForProvider
lib/providers.js      getProviderConfig, listProviders, fetchModels (TTL cache)
lib/jev-client.js     JevClient — buildUrl/buildHeaders/request(+retry/timeout), triage, testConnection, getModels
lib/telemetry.js      TokenslashTelemetry — record/getStats/getHistory/reset/toJSON/fromJSON
lib/routes/bridge.js  createBridgeRoutes — config/triage/describe/test/models/stats/history
lib/hooks/routing.js  pre-execute: triage route/prune questions, veto on "no"/"false"
lib/hooks/prune.js    post-execute: compact payloads >10KB via triage
lib/hooks/compact.js  prompt-assemble: summarize when tokens >8K
lib/hooks/goal-guard.js goal hook: notice at ≥80% round budget
lib/client.js         browser entry, re-exports client/slots apply/inject + CSS
lib/types.d.ts        Config, TriageResult/TriageDecision, TelemetryStats/Entry, ProviderConfig, ModelTiers

Retry/timeout defaults: JevClient 15s timeout, 2 retries; testConnection 8s/1 retry; fetchModels 10s.

Development

node --test test/config.test.js test/providers.test.js test/jev-client.test.js test/telemetry.test.js
node --test test/hooks/

fetch mocked globally per test; no network calls. Types: import from ./lib/types.d.ts.

License

MIT