dsh-preview-market
DSH 垂直预览市场:发现预览插件、查看已安装清单,并通过 dsh-market 或 dsh CLI 安装、启用/停用与配置。一键安装与启用/停用依赖 dsh-market;没有它时卡片只显示可复制的安装命令。
安装
dsh plugin --profile web add dsh-preview-market
沙箱测试结果
| 阶段 | 结果 |
|---|---|
| 1 安装 | ✓ |
| 2 列装 | ✓ |
| 3 挂载 | ✓ |
| 4 启动 | — |
四阶段在隔离沙箱里跑:安装(有网)→ 列装 → 挂载 → 启动(后三步断网)。
README
dsh-preview-market
A vertical preview market for DeepSeek Harness. A top-level settings section (and a Settings → Plugins tab) lists the preview plugins that exist for DSH, shows which ones the active profile already has, and hands installs/updates to dsh-market or the official dsh plugin command.
It is not a general plugin market, and it does not implement previews itself: every preview plugin stays an independent Loader entry with its own repository, version and settings. The market only provides the catalog, the installed view and the entry points.
Install
dsh plugin --profile <profile> add dsh-preview-market
Open Settings → Preview market (the same panel is also under Settings → Plugins).
Upgrading from dsh-media-preview / dsh-blend-preview / dsh-stl-preview? See [MIGRATION.md](MIGRATION.md).
What it does
- Catalog — first-party preview plugins with their formats, host requirements and versions.
- Installed view — reads the active profile's
package.json, matching catalog names by default and honouring a package'sdsh.previewmanifest when present; never imports child plugin code. - Install / update — delegates to
dsh-marketwhen it is present. Without it, the card shows the exactdsh plugin --profile <profile> add <package>@<version>command to copy. - Independent plugins — media, Blender and STL remain separate packages; this page has no renderer and does not merge their code.
Screenshots
Preview market
The top-level Settings → Preview market section, next to dsh-market, with the Discover / Installed tabs and the current four entries:
Installed cards and controls
Each installed entry keeps the same controls: status, copyable install command, enable/disable through dsh-market, and a Configure entry.
Current preview plugins
Plugin · Opens · Formats · Host requirement
dsh-preview-media · Video and audio · mp4/mov/webm/mkv + mp3/flac/wav/… · —
dsh-preview-blender · Blender scenes · .blend · Blender 3.6+
dsh-preview-stl · STL meshes · .stl · —
dsh-preview-snip · Tool: circle a region or quote text · no file extension · —
dsh-preview-media
Play video/audio in the right-Sidebar document preview, streamed over an authenticated HTTP Range route. Desktop seeking uses the token-guarded loopback origin; 0.1.5 also retries the authenticated route when the loopback reports a code-4 media error.
dsh-preview-blender
A .blend file is exported to a cached GLB by Blender headless, then rendered in a dependency-free WebGL viewport with scene statistics.
dsh-preview-stl
STL is parsed in the browser; the viewport reports size, volume, surface area and watertightness without uploading the mesh.
dsh-preview-snip
A preview-header tool: drag a rectangle over an image/PDF to attach a PNG, or quote selected text into the composer.
Catalog (0.1.10)
Every plugin is one file under [catalog/plugins/](catalog/plugins/), named <owner>__<repo>.json. A third-party submission adds exactly one file plus the regenerated catalog.json snapshot — no market code change. The Host loads, validates and merges all files at startup; the format and PR steps are in [catalog/README.md](catalog/README.md).
Preview entries use kind: "media" or "three" and declare their extensions; dsh-preview-snip uses kind: "tool", which has no file extensions and is displayed as a tool card.
Configuration
Settings → Plugins → Preview market (namespace preview-market):
Key · Default · Meaning
enabled · true · Register the routes, the top-level section and the Settings → Plugins tab.
routeRoot · /api/preview-market · Authenticated route root; must stay under /api.
profileDir · "" · Profile to inspect. Empty uses the Host profileContext, then $DSH_HOME/profiles/desktop.
debug · false · Reserved for request diagnostics.
Examples
- [
examples/profile-overrides.yml](examples/profile-overrides.yml) — a safe starting point for per-profile overrides (media chunk size, Blender path, STL unit scale). - [
catalog.json](catalog.json) — machine-readable snapshot of the shipped catalog, enforced by a unit test.
Development
node --test test/*.test.js
catalog.json is a machine-readable snapshot of the shipped catalog; regenerate it with npm run catalog:write and keep it in sync (a test enforces this).
Settings-section end-to-end (requires a running host with the plugin installed):
node scripts/e2e-section.mjs --base http://127.0.0.1:<port> --token <token>
Settings-tab end-to-end (requires a running host with the plugin installed):
node scripts/e2e-settings.mjs --base http://127.0.0.1:<port> --token <token>
Fallback install/copy check (requires a prof
…(truncated)
以上内容来自 npm 上的 README,我们只做格式化,不改内容。
版本
npm 上共发布:12,最后更新 2026-10-24