deadbushxw/dsh-plugin-query-enhance ↗★ 0
dsh-plugin-query-enhance
DSH Host plugin: ask for the current profile's bundles or plugin entries by name, state, or module, and keep plugin_manager list_bundles from returning every bundle's full declared-row list. 适合插件开发者或重度用户,通过精简数据结构提升插件列表的加载性能。
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:deadbushxw/dsh-plugin-query-enhanceドキュメント
README 全文を読む ↗Usage
What the list actions return now
Neither action changed, including offset, limit, total and nextOffset. Only
each record is smaller. A bundle comes back as:
{"entries":[{"name":"@deepseek-ai/dsh-web-app","version":"0.1.2-alpha.1","enabled":true,
"installed":false,"optional":false,"removable":false,"rowCount":85}],
"total":11,"nextOffset":null}
Dropped, and why:
| Field | Why it is safe to drop |
|---|---|
rows | The bulk. Recoverable on demand with plugin_query includeRows=true, which returns the rows of the one bundle you name |
description | The package's own prose, written for a human browsing a package manager |
meta | Localized display text and icon paths, read by the Web Client, which does not go through this path anyway |
overrides | The built-in row ids the bundle replaces; summarised as overrideCount |
error.diagnostic, error.incompatible | Long-form failure text. The error code survives, because that is what decides the next step |
Two fields exist only to say what was omitted: rowCount is always present, so a
reader can tell "this bundle declares no plugins" from "this answer hides them",
and overrideCount appears only when the bundle overrides something.
A plugin entry comes back as:
{"entries":[{"entryId":"timer","moduleName":"@deepseek-ai/cordis-plugin-timer",
"enabled":true,"fiberPhase":"active"}],"total":187,"nextOffset":25}
patchId is the one field that summary drops: it is the profile patch row that
addresses the entry, which no documented operation takes as an argument.
entryId stays, because it is what set_plugin takes, and readOnlyReason stays,
because it explains a refused action.
Need the ids to call set_plugin? plugin_query name="..." includeRows=true returns
the rows a bundle declares, and a list_plugins summary keeps every entryId.
Anything more - the full bundle record, a plugin entry's patchId, error
diagnostics - comes from plugin_query with detail: "full", which is the only path
that returns a complete record.
plugin_query
Read-only, takes no arguments that change anything, and needs no approval.
| Parameter | Applies to | Meaning |
|---|---|---|
kind | both | "bundles" (default) or "plugins", for individual plugin entries |
name | bundles | Exact bundle package name, for example @deepseek-ai/dsh-base |
match | both | Case-insensitive substring over the name, the description, and the module names of the rows a bundle declares |
enabled | both | Keep only records whose saved enabled state equals this |
installed | bundles | Keep only bundles whose installed state equals this |
optional | bundles | Keep only bundles shipped switched off for the user to turn on |
hasError | bundles | true keeps only bundles that failed to load; false keeps only the ones that loaded |
detail | both | "summary" (default) or "full", the management record including description and rows |
includeRows | bundles | In a summary, also include the declared plugin rows |
limit | both | Page size, 1 to 100. Defaults to 10 |
offset | both | Zero-based offset into the filtered result. Defaults to 0 |
Filters combine with AND. Supplying a bundle-only filter with
kind: "plugins" is an error rather than a silently ignored condition, and so is an
empty name or match — an empty filter would quietly match everything, which is
the outcome this package exists to prevent.
Every answer carries total (the inventory size), matched (how many survived the
filters), and nextOffset. The pair total/matched is what makes a zero result
unambiguous: matched: 0 with total: 11 means the bundle exists and was filtered
out, and there is no need to repeat the call without filters to find out.
Examples:
plugin_query name="@deepseek-ai/dsh-base"
plugin_query match="cordis-plugin-hmr" # which bundle declares this module?
plugin_query enabled=false # what is switched off?
plugin_query hasError=true detail="full" # why did something fail to load?
plugin_query optional=true # what was shipped switched off?
plugin_query kind="plugins" enabled=false limit=50
Configuration
There is no configuration file and no settings page. Both settings live in the
bundle's own cordis.patch.yml, which is validated against the Config schema the
package exports. Edit it there and reinstall the bundle.
- insert:
- id: dsh-plugin-query-enhance
name: 'dsh-plugin-query-enhance'
config:
intercept: true
defaultDetail: summary
| Field | Default | Meaning |
|---|---|---|
intercept | true | Project plugin_manager list_bundles results. Set to false to keep the tool but stop rewriting that action's output |
defaultDetail | "summary" | The detail level plugin_query applies when a call omits detail |