xiamubumu/dsh-capability-composer ↗★ 0

dsh-capability-composer

DSH plugin: shrink what the model sees, not what runs. Composes plugins and skills into named sets resolved per session / workspace / global. Only the core tools plus the meta-tools (search_plugins / load_plugin / invoke_tool) stay resident; everything else is reached on demand. Plugins and skills keep running — only the catalog shrinks. 适合需要运行大量插件但又想避免模型上下文被工具定义撑爆的场景。

Package
dsh-capability-composer
Compatibility
Unverified
Cordis peer range
~4.0.2
Version
1.0.0
License
MIT
Last updated
Oct 14, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xiamubumu/dsh-capability-composer

Configuration

State file

There is exactly one:

/capability-composer/compositions.json

The resolution order for ``:

PlatformPath
AllDSH_HOME environment variable (takes priority)
Windows%APPDATA%\dsh-desktop\harness
macOS~/Library/Application Support/dsh-desktop/harness
Linux$XDG_CONFIG_HOME/dsh-desktop/harness or ~/.config/dsh-desktop/harness

If none of them exists, it errors out and exits — it never guesses a hard-coded path and silently writes into it.

A compositions.json.bak backup is made automatically before every write.

Two other runtime files (both are caches; delete them and they are rebuilt automatically):

FilePurpose
capability-composer/entry-id-map.jsoncache from package name → entry id
.composer-resident-toolsthe auto section of the resident tool list

First install starts empty

A fresh machine gets defaultState() — four empty slots, no compositions, no pins. No seed and no "starter pack" is shipped: every composition in such a file would be somebody else's, and a new user opening the composer must not find arrangements they never created.

Your existing compositions.json is never overwritten and never cleared — an empty state is written only when the file is absent or unreadable.

Environment variables

This plugin has no cordis config; everything is tuned through environment variables.

VariableDefaultEffect
DSH_COMPOSER_MIDDLEWARE_FULLonfull pass-through on the execution side (invoke_tool can reach MCP tools and tools of dependency agents)
DSH_COMPOSER_TOOL_SEARCHonregister the search_plugins searcher
DSH_COMPOSER_PRUNE_PLUGIN_SECTIONSonprune the system-prompt sections registered by plugins, according to the composition
DSH_COMPOSER_CATALOG_FALLBACKonfallback source for catalog data
DSH_COMPOSER_CACHE_SAFEoncache-safe mode
DSH_COMPOSER_GUARDonguard check
DSH_COMPOSER_DIAGondiagnostics log
DSH_COMPOSER_AUTOLOAD_MAX0auto-load limit
DSH_COMPOSER_SHRINK_ENTRIESoffcatalog entry shrinking
DSH_COMPOSER_HISTORY_REWRITEoffhistory rewrite
DSH_COMPOSER_RESIDENT_BUDGET—resident budget
DSH_COMPOSER_RESIDENT_FILE—resident tool list file
DSH_COMPOSER_EXTRA_TOOLS—extra tools to keep resident
DSH_COMPOSER_RESIDENT_EXCLUDE—resident exclusion list
DSH_SEMGREP_SHORT_PATHC:\dshsesemgrep short-path junction (see below)

About DSH_SEMGREP_SHORT_PATH: this is the only absolute path with a default value in this plugin's runtime code. It has to match the junction path hard-coded by the semgrep plugin patch in the marketplace, otherwise that patch cannot self-heal. It can be overridden with an environment variable; when semgrep is not installed, the relevant function simply returns not-installed — it is code that never executes.