Все плагины

dsh-capability-gateway

dsh-capability-gateway · Версия 0.7.1 · Обновлён 29 нояб. 2026 г.

Единый инструмент capability позволяет по запросу искать, просматривать и вызывать активированные сторонние навыки и инструменты MCP. Это экономит место в промпте за счёт больших каталогов. К вызовам по-прежнему применяются разрешения и меры защиты хоста.

  • проверка каждой версии
  • Инструменты
  • MIT
  • Загрузок: 0

Описание

Ниже — оригинальный текст автора.

dsh-capability-gateway

English | 中文

One on-demand gateway for opted-in third-party skills and MCP tools in DeepSeek Harness.

Large tool catalogs compete for prompt space. This plugin serves selected skills and MCP tools through a single capability tool. Search by intent, read the schema or instructions, and invoke the capability on demand. Catalog trimming depends on the host version and tool mode.

It is a DeepSeek Harness host + client plugin. It does not proxy remote traffic, does not add a server, and does not send anything anywhere.

What it changes

  • Managed skills leave the model-facing skill catalog. They stay user-invocable and are loaded through capability.
  • Managed MCP servers are searchable and callable on demand through the gateway. Calls use the host's permission and guard chain. In native mode, DSH 0.2.1-rc.5 supports trimming tool declarations and DSH 0.2.2-rc.1 retains them.
  • PTC mode keeps run_code and the capability SDK binding. Where the host supports SDK trimming, the gateway omits managed MCP declarations. Search or inspect tools on demand and call them through tools.capability. Status and inventory show when the host retains the original SDK.
  • One tool (capability) searches, inspects, and invokes managed capabilities.
  • A bounded name index is added to the system prompt so the model knows which capabilities exist even when lexical search would miss them. Names only — no descriptions, no schemas.
  • A local journal records metadata about searches and calls (never query text, arguments or results), and can be exported as a weekly report.

Install

Starting with 0.6.1, the gateway accepts DSH 0.2 releases and prereleases from 0.2.1-rc.5 onward. Upgrades within that range require no plugin update to pass the compatibility check. DSH 0.3 prereleases and releases require separate validation. The gateway selects the host API at runtime. Automated regression covers 0.2.1-rc.5 and 0.2.2-rc.1.

# from your DSH profile directory
pnpm add link:/path/to/dsh-capability-gateway
# Or install from npm: pnpm add dsh-capability-gateway@0.7.1
# Or install a local package: pnpm add /path/to/dsh-capability-gateway-0.7.1.tgz

Register the bundle in ~/.dsh/profiles/<profile>/package.json so the plugin layer is applied:

{
  "dependencies": { "dsh-capability-gateway": "link:/path/to/dsh-capability-gateway" },
  "dsh": { "profile": { "bundles": [
    "@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-capability-gateway"
  ] } }
}

After installation, open Settings → Built-in plugins → Capability gateway → 配置. Select MCP services and skill directories, review additions/removals, then save. The host persists and reloads the config; refresh to confirm the effective scope. Hosts without a configuration editor retain existing behavior and can use native configuration management.

Alternatively, configure the scope manually:

# ~/.dsh/profiles/<profile>/cordis.patch.yml
- id: capability-gateway
  config:
    skillRoots:
      - '~/.agents/skills'
    mcpServers:
      - my-mcp-server

The package default manages nothing on purpose: what to wrap is install data, not package data. An id patch replaces the whole config object, so repeat every key you need.

Reload the plugin (or restart DSH). The settings page is at Settings → Built-in plugins → Capability gateway.

Configuration

KeyDefaultMeaning
enabledtruefalse makes the plugin inert and restores native exposure.
skillRoots[]Directories whose skills are served by the gateway.
mcpServers[]MCP server names whose mcp__<server>__* tools are managed.
wrapSkills / wrapMcptrueTurn either half on or off.
mcpKeywords{}{ "server": ["alias", ...] } for MCP entries.
skillKeywords{}{ "skill": ["alias", ...] }.
keywordPacks[]JSON files merged in order; aliases are additive.
promptHinttrueAdd the "capabilities are behind capability" pointer.
promptIndextrueAdd the bounded capability name index.
promptIndexChars2000Cap for the index (200–6000).
maxResults5Search candidates returned (1–10).
logDir$DSH_HOME/data/capability-gatewayJournal directory.

Aliases

A Chinese question rarely shares a token with an English skill description, and no lexical search can guess a vocabulary it has never seen. Aliases are how that gap gets closed, and they are always data:

skillKeywords:
  release-notes: [发布说明, 变更记录]

or a shareable pack, referenced from keywordPacks:

{ "release-notes": ["发布说明", "变更记录"] }

Missing or broken packs do not block startup; valid packs and entries remain usable. Status, inventory and the prompt mark alias coverage as incomplete. Settings identify each affected pack by its configuration index and list invalid entry positions. Correct the file and reload the plugin. Explicit skillKeywords must map names to arrays of up to 50 nonempty strings, each at most 80 Unicode characters; invalid values raise invalid_config before normalization. A skill can also declare its own aliases in SKILL.md with keywords:, which travels with the skill.

Settings workflows

The panel separates inventory, configuration, usage statistics and runtime records. Configure scope and try searches in Configuration, export reports from Usage statistics, and inspect individual events in Runtime records.

  • Scope selection starts from the inventory or Configuration. Review suggested skill directories and observable MCP services before saving. Configured entries remain visible when unavailable, and managing a directory includes skills added there later. Saving updates skillRoots and mcpServers and preserves the other settings. If a newly managed capability appears in the refreshed inventory, the Search lab opens with its name ready to try.
  • Search lab uses the viewed session and the same managed-catalog ranking as model searches. It displays the match reason and ranking score. Search trials leave tools and usage records untouched. If a query has no direct match, you can explicitly save it as a local alias for a managed skill or an eligible MCP service, then retry it. MCP service aliases help find that service's discovery entry. Alias saves require the host configuration editor.
  • Runtime records can be opened from a skill, MCP service or tool in the inventory. The filter includes recorded targets and search candidates. Paging, filtering and review refresh activity while retaining the loaded inventory. The panel's Refresh button also reloads the inventory.
  • Effects and diagnostics shows expected MCP declaration counts for the current inventory and presentation mode. Skills are counted separately; no token or cost savings are inferred. Call diagnostics use all retained events in the selected history scope, independent of list filters and pagination. Direct calls are observations, not automatic defects.

Concurrent configuration edits are rejected. Refresh and reload the selection before editing again. If saving disconnects or fails, confirm the effective scope before retrying. Page-based scope saving requires the host's configuration editor for this plugin entry.

The capability tool

ActionPurpose
searchFind candidates by goal, short keywords or a name.
loadReturn a skill's instructions and base directory.
describeReturn one MCP tool's exact JSON Schema.
callInvoke an MCP tool; arguments are validated against that schema first.
statusWhether the gateway is active and how much it manages.
inventoryCompact counts, roots, coverage and bounded anomalies.
history / statsThis session's recent routing metadata and window statistics.
reportExport a weekly summary as Markdown.

Search is deliberately conservative. Unmatched queries return not_found with a pointer to the native path rather than a fake match, and the gateway never calls an upstream tool on its own.

Reports follow the all-session or selected-session record scope and label it explicitly. An expired selection returns an error. Model action=report uses the calling session. Exact-name search remains scoped. Partial Skill/MCP discovery is marked in text and structured metadata and excluded from miss counts.

Privacy

Recorded per event: action, target name, route, outcome, error code, duration, candidate names and ranks, plugin version. Not recorded: query text, tool arguments, results, error bodies, credentials, file paths.

Everything is local. Nothing is uploaded. A report is produced only when you export it, and it contains counts and names only. Alias packs and the local retrieval snapshot are per-install data and are not part of the published package.

Limitations

  • Search is lexical, not semantic. Cross-language retrieval depends on aliases being present.
  • Retrieval quality is measured on a fixed task set (tests/retrieval.test.js); it is not a guarantee for every phrasing.
  • The journal covers the last 7 days / 10,000 events and is a sample, not an audit.
  • Capability names in the prompt are bounded; very large installs will show a truncated index.

Development

npm run check   # syntax
npm test        # unit, component, client-boot and retrieval tests
npm pack --dry-run

Design notes and the behaviour contract live in docs/DESIGN.md.

License

MIT

История версий

  • 0.7.129 нояб. 2026 г. · 7.3 MB
dsh-capability-gateway · плагин SoleAPI Agent | SoleAPI