Introduction¶
The philosophy of DSH is “everything is a plugin.” Even when multiple plugins are available, actual agent usage can still be unstable: sometimes the needed plugins aren’t used, and sometimes the model needs to make temporary judgments. dsh-capability-index aims to solve the problem of “whether plugin library utilization is predictable”: after a task-oriented request triggers a rule, it automatically injects the Top-K plugin prompt blocks that might be applicable and brings in the capability descriptions (use_when / not_for) declared by the plugin authors. Ultimately, the decision to call a tool remains with the model.
What is This¶
dsh-capability-index is a meta-plugin for DeepSeek Harness (DSH). It does not directly replace tool comparison plugins, but rather provides a snapshot of the current plugin library’s prompts to the main session when a task-oriented request occurs.
Current status is v0.2 / early version, license is MIT. Repository addresses are:
- Directory page: https://www.skillhub.cn/plugins/777-Zen/dsh-capability-index
- GitHub: https://github.com/777-Zen/dsh-capability-index
Core Features¶
Inject Top-K Prompts After Trigger¶
After a task-oriented request hits a trigger rule, the plugin injects the Top-K plugin prompt blocks that might be applicable. The prompt blocks carry the capability descriptions (use_when / not_for) declared by the plugin authors.
Injection via runtime-context Channel¶
The plugin is injected via the native DSH runtime-context channel. Prompts are only replaced when content changes, not accumulated round-by-round.
Three-Level Deliberation¶
The plugin’s decision chain consists of three levels of deliberation:
- Semantic vector recall serves as the primary signal.
- Rule vocabulary gatekeeper filtering.
- Injection of conflict prompts in the ambiguous area, decided by the model.
Semantic vector recall uses bge-small-zh-v1.5, q8 quantization, and approximately 24MB local weights. The default vector hit threshold is 0.58. Semantic recall supports asynchronous pre-fetching and can be degraded to pure rules.
not_for Gatekeeper¶
Before the recommendation is finalized, the plugin performs a dual-signal verification on candidates. Definite conflicts are hard-blocked and removed; ambiguous areas are downgraded and warned. The model’s final decision power remains unchanged.
Read-Only Boundary and Index Scope¶
The plugin is read-only and advisory in nature:
- Does not rewrite tool definitions of other plugins.
- Does not force invocation.
- Does not automatically download/install missing plugins.
- Does not replace
dsh-tool-search.
The index scope is the set of tools visible to the current session model: tools.schemas(agent). Invisible tools are not included in the index.
Installation and Enablement¶
First, confirm you are in the DSH checkout root directory. The installation command is as follows, where <path> needs to be replaced with the absolute path of this directory:
pnpm dsh plugin --profile <name> add <path>\dsh-capability-index
After installing once, use the following command to confirm if it has entered the plugin tree:
pnpm dsh --profile <name> --dump-config | Select-String capability-index
It takes effect after restarting the web application. Afterwards, the entry for this plugin should be visible on the “Settings → Plugins” page.
To disable or enable, set the corresponding line to disabled: true in the profile patch layer, then restart:
disabled: true
Session-level toggles use DSH’s preset mechanism. No code is loaded when disabled.
Typical Usage¶
Run regression in the repository:
npm run verify
Run the simulator:
npm run simulate
Current regression status: 80 passed / 0 failed / 2 known-fail.
Configuration¶
The plugin supports optional configuration for config.embed, notForGate, and decisionLog in cordis.patch.yml. The fields are as follows:
config:
embed:
enabled:
model:
dtype:
cacheDir:
endpoint:
threshold:
notForGate:
enabled:
hardSim:
softSim:
demoteFactor:
decisionLog:
enabled:
Description:
embed.enabledcontrols the semantic embedding switch.embed.modelandembed.dtypecorrespond to the semantic model and quantization type.embed.cacheDiris used for the local weight cache directory.embed.endpointis used for the weight download endpoint.embed.thresholdis the vector hit threshold, default0.58.notForGatecontrols parameters related to thenot_forgatekeeper.decisionLog.enabledcontrols whether decision logs are written to disk.
Decision logs are written locally to decisions.jsonl and can be disabled. Both decision logs and vector weight cache are stored locally:
DSH_HOME/.cache/dsh-capability-index/
Vector weights are only downloaded once via hf-mirror for the first time.
Applicable Scenarios and Notes¶
Suitable for developers who wish to reduce plugin omission in DSH sessions. Note the following facts before use:
- The plugin runs with the current DSH process permissions. Check the source code and
MITlicense before installing. - DSH is currently in developer preview. Upon official release, the injection channel, declaration conventions, and trigger vocabulary table may have compatibility changes.
- Reliance on
@huggingface/transformersis provided by the deployment environment; falls back if missing. - Prompts are injected into the main session; sub-agent sessions do not receive prompt blocks.
- Experimental evidence has a small sample size; conclusions are directional and do not constitute statistical significance verification.
- Both decision logs and vector weight cache are stored locally; no data is uploaded.