Plugin market
How Studio consumes DSH's official plugin index (format 1) — index sources, request model, the bundled community index, and the install path.
The plugin market uses DSH's official plugin index, a static format: 1 JSON document listing installable bundles with titles, icons, authors, versions, engines.dsh compatibility ranges, and install sources. Studio reads indexes through the Host's pluginMarket service. Desktop builds can configure a product index. The bundled community index can also serve as the default for a profile with no configured sources.
- Bundled community index:
assets/plugin-market/index.json, served by the Host atGET /api/agentkit.plugin-market/index.json. - User index sources: they belong to the current profile and are added, removed and switched on the Discover page.
- Installation, enable/disable, update and uninstall stay owned by the official DSH plugin manager.
Why the aggregation is gone
The previous implementation issued 16 external requests per cold load (npm search, GitHub search and 14 full packuments), serialized as badly as 24 seconds and rate-limited to 10 GitHub search requests per minute. An index puts everything a list page needs into one document: one GET per index source, with search, filtering, ordering and paging answered from the Host's memory.
Request model
| Operation | External requests |
|---|---|
List index sources (listIndexes) | 0 (configuration only) |
| First read of a source | 1 |
| Another read within the 10-minute TTL | 0 |
Explicit refresh (refresh: true) | 1 |
| Second page and later | 0 (the fetchedAt snapshot answers them) |
| Search / filter / order | 0 (in-memory index) |
Host defaults: cacheTtlMs 600000 (10 minutes), fetchTimeoutMs 15000, maxBytes 128 MiB, at most 100 entries per page. Documents are parsed on a Worker thread so a large index never blocks the Host event loop.
Index format
Root fields: format (must be 1), title (required, LocalizedText), description, metadata, plugins[]. Plugin fields: name (npm package name, unique in the document), title, description, icon, author, homepage, repository, metadata, versions[]. Version fields: version (exact SemVer), publishTimestamp (Unix seconds), source ({"type":"npm"}, {"type":"git","url","commit","path"}, or {"type":"tarball","url"}) and engines.dsh (a SemVer range).
{
"format": 1,
"title": { "en": "DSH Community Plugins", "zh": "DSH 社区插件" },
"metadata": {
"sortKeys": { "downloads": { "title": { "en": "Downloads", "zh": "下载量" }, "order": "desc" } }
},
"plugins": [
{
"name": "dshmarket",
"title": { "en": "dshmarket", "zh": "dshmarket" },
"metadata": { "keywords": ["dsh-plugin"], "sortKeys": { "downloads": 1289262 } },
"versions": [
{ "version": "1.73.20", "publishTimestamp": 1790476800, "source": { "type": "npm" }, "engines": { "dsh": ">=0.2.0" } }
]
}
]
}Members the format does not define are ignored, so it can grow without breaking readers; a malformed defined member rejects the whole document with its JSON path, so no broken entry disappears silently.
The bundled community index
| File | Purpose |
|---|---|
assets/plugin-market/index.json | The format: 1 document shipped with the package and served by the Host |
assets/plugin-market/sources.txt | Generation input: one npm package name per line |
scripts/build-plugin-market-index.mjs | Generator and validator |
pnpm build:plugin-index # regenerate (reads sources.txt; seeds the top 80 packages by downloads when empty)
pnpm check:plugin-index # offline; validates the committed documentInclusion rule: only valid SemVer versions that were published, are not deprecated and are not private, at most 20 per plugin; output is ordered by downloads and then by name and is deterministic (no timestamps, no randomness), so a refresh shows up in review as data changes only.
Desktop default index
Set desktop.defaultPluginIndexUrl in src/product.json to a directly readable HTTPS index URL without credentials, a query, or a fragment. Both macOS and Windows installers carry this setting. Use null to opt out of adding a product index.
On the first launch of a Desktop version carrying the URL, Studio puts it first in the profile, retains the order of other sources, and merges duplicate URLs. Discover opens the first source by default and lets users switch sources. If a user removes the product source, later launches of the same version honor that edit.
Keep the KS3 index URL stable. To publish a plugin or a new version, upload the versioned .tgz first, then add the new version and download URL to the same index.json. Refresh Discover to read the new document. Index content changes take effect through KS3 without rebuilding the desktop app.
Install path
The Host uses name@version with an optional registry for npm, git+<url>.git#<commit> with an optional &path:/<dir> for Git, and the download URL for a tarball. After confirmation, the DSH plugin manager handles download, compatibility checks, build-script approval, and rollback on failure.
Install from object storage
Pack the built DSH bundle as an npm tarball and upload it to object storage such as KS3. Serve it at a directly readable HTTPS URL with a versioned filename ending in .tgz or .tar.gz. Omit credentials, query parameters, and fragments. Match the listed name and version to the archive’s package.json, which must declare dsh.bundle.
{
"format": 1,
"title": "Studio plugins",
"plugins": [
{
"name": "@example/dsh-workspace-tools",
"versions": [
{
"version": "1.2.3",
"publishTimestamp": 1794600000,
"source": {
"type": "tarball",
"url": "https://downloads.example.com/plugins/workspace-tools-1.2.3.tgz"
}
}
]
}
]
}Publish index.json and add its URL under Plugins → Discover → Index sources. Select the source and choose Install. The plugin downloads from object storage and the package manager resolves its dependencies. Use a Studio Host that supports the tarball source.
Maintain a remote index
Keep index.json in Git and publish the reviewed version to a stable HTTPS URL. Users add the URL once per profile. Catalog updates can ship independently of Studio releases.
- Upload the new versioned
.tgzfirst and verify download access from the users’ network. Add new plugins topluginsand add releases of existing plugins toversionsunder the same package name. Record the publish time, download URL, and anyengines.dshrange declared by the package. Give each version its own file path. - Add a preview index in a test profile, load it in Discover, and install the new version. Then update
index.jsonat the stable URL. Users can select Refresh in Discover to read it again. If you serve the index through a CDN, refresh its cached copy ofindex.jsonas part of publishing. - Remove an entry from
versionsto withdraw a release. Remove the plugin entry when its last version is withdrawn. To roll back the catalog, republish the earlierindex.jsonand retain the archives it references. Each profile’s plugin manager controls installed bundles.
When it is not enabled
The official index service is mounted only with the experimental bundle @deepseek-ai/dsh-experimental-plugin-market-bundle ("Custom plugin indexes"). Studio enables it automatically the first time a profile starts with a given DSH version (the same default list also enables Computer Use, @deepseek-ai/dsh-cua-bundle), so the market works out of the box; when enabling fails or the installation does not carry the bundle, the market answers PLUGIN_MARKET_UNAVAILABLE and offers a one-click enable action.
The defaults apply once per DSH version: a person who switches a default bundle off keeps it off, a retryable failure (network, pnpm) leaves no marker so the next start retries, and AGENTKIT_STUDIO_DEFAULT_BUNDLES=0 turns the alignment off entirely.
Security and trust
An index is third-party content: titles, authors, labels and sources are declared by the document, and DSH validates its format, never its claims. An http: index — including the install specs it lists — can be modified in transit, so a network you do not control needs https:. URL icons are requested by the browser directly and expose your IP address to the image host. Check the source shown in the confirmation dialog before installing.
Source map
| Concern | Where |
|---|---|
| Bundled index source (default source, document reads) | src/plugin-market.mjs |
| Bundled index route | src/host/routes/plugin-market-index.mjs |
| Default-enabled bundles | src/host/default-bundles.mjs |
| Install / enable / update | The official pluginManager (Studio adds no wrapper) |
| Index generator | scripts/build-plugin-market-index.mjs |