DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Tokenslash — DeepSeek Harness 插件(DSH Plugin)
← Plugins
T

dsh-tokenslash

Tokenslash

TypeSafe Jev 面向 DeepSeek Harness (DSH) 的令牌优化套件:子代理路由器、分支解耦器、工具架构裁剪器、输出压缩器和设置界面

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:JessenReinhart/dsh-tokenslash#b9bb645c63fea0198176484e0e0fc5c959175f9b
README兼容性版本

兼容性与来源证明

Tokenslash 以 dsh-tokenslash 发布,当前版本为 1.0.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/9/28

版本

1.0.0stable
2026/9/28

相关插件

正在加载相关插件…

最新版
1.0.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 6
周下载
0
最近提交
2026/10/14
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Usage@linxin666/dsh-usage用于 dsh Web GUI 的使用统计插件:检测各提供商的余额和编程套餐配额,并实时记录令牌使用情况;侧边栏 Settings 行上方显示紧凑的价格概览卡片Client Ui Model Capabilities@linxin666/dsh-client-ui-model-capabilities为自定义 pi-ai 提供商声明每个模型的能力(图像输入和推理力度),可直接在 Models 设置卡片中编辑;写入官方 llm-pi-ai 设置命名空间,不更改 DSH 源代码。Codex Subscriptiondsh-codex-subscription通过 OAuth 在 DeepSeek Harness 中使用 ChatGPT 和 Codex 订阅,支持配额管理、安全重置、网页搜索、图像和快速模式Commandcode Provider@mars-sea/dsh-commandcode-provider适用于 Command Code 的非官方 DeepSeek Harness LLM 提供商插件,移植自 pi-commandcode-provider(MIT)。注册“commandcode”提供商路由,并在 Models 页面添加卡片和实时模型目录。

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