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. 适合需要运行大量插件但又想避免模型上下文被工具定义撑爆的场景。
Install
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xiamubumu/dsh-capability-composerREADME
Read the full README ↗Configuration
State file
There is exactly one:
/capability-composer/compositions.json
The resolution order for ``:
| Platform | Path |
|---|---|
| All | DSH_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):
| File | Purpose |
|---|---|
capability-composer/entry-id-map.json | cache from package name → entry id |
.composer-resident-tools | the 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.
| Variable | Default | Effect |
|---|---|---|
DSH_COMPOSER_MIDDLEWARE_FULL | on | full pass-through on the execution side (invoke_tool can reach MCP tools and tools of dependency agents) |
DSH_COMPOSER_TOOL_SEARCH | on | register the search_plugins searcher |
DSH_COMPOSER_PRUNE_PLUGIN_SECTIONS | on | prune the system-prompt sections registered by plugins, according to the composition |
DSH_COMPOSER_CATALOG_FALLBACK | on | fallback source for catalog data |
DSH_COMPOSER_CACHE_SAFE | on | cache-safe mode |
DSH_COMPOSER_GUARD | on | guard check |
DSH_COMPOSER_DIAG | on | diagnostics log |
DSH_COMPOSER_AUTOLOAD_MAX | 0 | auto-load limit |
DSH_COMPOSER_SHRINK_ENTRIES | off | catalog entry shrinking |
DSH_COMPOSER_HISTORY_REWRITE | off | history 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_PATH | C:\dshse | semgrep 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.