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. 适合插件开发者或重度用户,通过精简数据结构提升插件列表的加载性能。

パッケージ
dsh-plugin-query-enhance
互換性
未検証
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/10/02

インストール

$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:

FieldWhy it is safe to drop
rowsThe bulk. Recoverable on demand with plugin_query includeRows=true, which returns the rows of the one bundle you name
descriptionThe package's own prose, written for a human browsing a package manager
metaLocalized display text and icon paths, read by the Web Client, which does not go through this path anyway
overridesThe built-in row ids the bundle replaces; summarised as overrideCount
error.diagnostic, error.incompatibleLong-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.

ParameterApplies toMeaning
kindboth"bundles" (default) or "plugins", for individual plugin entries
namebundlesExact bundle package name, for example @deepseek-ai/dsh-base
matchbothCase-insensitive substring over the name, the description, and the module names of the rows a bundle declares
enabledbothKeep only records whose saved enabled state equals this
installedbundlesKeep only bundles whose installed state equals this
optionalbundlesKeep only bundles shipped switched off for the user to turn on
hasErrorbundlestrue keeps only bundles that failed to load; false keeps only the ones that loaded
detailboth"summary" (default) or "full", the management record including description and rows
includeRowsbundlesIn a summary, also include the declared plugin rows
limitbothPage size, 1 to 100. Defaults to 10
offsetbothZero-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
FieldDefaultMeaning
intercepttrueProject 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