dsh-plugin-store v0.1.0
dsh-plugin-store v0.1.0
Native plugin store for DeepSeek Harness Web — packaged as a Cordis bundle (cordis.patch.yml).
Install directly from GitHub: dsh plugin --profile web add github:anjaymi/dsh-plugin-store#v0.1.0
Added (v0.1 · first in-harness plugin store)
- Host plugin (
lib/host.js, ESM) mounting the/api/dsh-plugin-storeprefix route on the shared loopback web server.GET ?method=bootstrapissues a per-process random token.GET ?method=listis a safe read-only view.POST(refresh,install,op,kill) requires same-origin and thex-dsh-plugin-store-tokenheader; request bodies are capped at 8 KB.
- Catalog pipeline:
- Bundled curated + discovery snapshot (
data/registry.snapshot.json), normalized on load so every entry starts atverified: null/verifyReason: catalog-only— catalog inclusion is never treated as verification. - Live refresh pulls
topic:dsh-plugin(top 30, no forks) and re-verifies each repo's current rootpackage.jsonforname,versionanddsh.bundlevia@deepseek-ai/dsh-home-paths+@deepseek-ai/dsh-atomic-writefor paths/cache. Only the bounded topic batch is structurally verified on refresh; curated entries stayverified: nulland are verified at install time. - 2-hour catalog cache (
catalog.json); a failed refresh keeps the previous catalog. - Real GitHub star counts flow through from the topic source (
stargazers_count); curated entries may keepnull. There is no local star ledger and no client-side star toggle.
- Bundled curated + discovery snapshot (
- Install:
- Strict
owner/repo[#subpath]spec only; the store refuses its own package and only installs repos already present in the catalog. - Background FIFO op queue (single live child),
dsh plugin --profile web add <spec>via a safely-spawned array argv (CLI located from the launcher entry, never the client). - Head-of-queue re-verification: re-fetches the root manifest and requires
dsh.bundleimmediately before the real profile is touched; a failure leaves the profile untouched. - Successful installs return a restart hint.
- Strict
- Client plugin (
lib/client.js) as a hand-writtenwindow.__ModuleLoader__.load({ id, factory })CommonJS factory:- Registers the 插件市场 / Plugin Store tab at slot
settings.plugins.tab, idmarket, order5. - Compact single-column UI: search, filters (全部 / 精选 / 新发现 / 结构已验证 / 已安装), category, 校验并安装 vs 安装, a 3-card loading skeleton, live task status, and mobile / focus / reduced-motion awareness. Unverified entries are not disabled — the Host is the authority.
- Styling uses only DSH CSS tokens (no hardcoded theme color, no
prefers-color-scheme, nodocumentElement.style.colorScheme); icons are inline SVG helpers (Lucide, GitHub mark, Star) — never Unicode★.
- Registers the 插件市场 / Plugin Store tab at slot
- Packaging (
package.json):filesincludesREADME.zh-CN.md,PRODUCT.md,DESIGN.md; keywords adddsh-plugin/deepseek-harness;dsh.client.injectadds@deepseek-ai/dsh-client-ui-slotsand@deepseek-ai/dsh-client-ui-settings;peerDependenciesadds@deepseek-ai/cordis ^4.0.1. - Product/design docs:
PRODUCT.md(register, users, personality, anti-goals, WCAG AA) andDESIGN.md(actual DSH tokens and the 18/14/12/11 type scale, 36/32px controls, 8px card radius/gap, 138px card min-height, Lucide icons, no shadows). - Tests (
tests/*.test.mjs,node:test): package/patch shape, client wrapper + slot contract + lifecycle (ctx.effectdisposer), no-absolute-paths, snapshot normalization, repo validation, origin+token security, install re-verification (injectable fake fetch/spawn), CLI candidate resolution against the real desktopdependencies/dsh/node_modules/@deepseek-ai/dsh/lib/bin.js, refresh that only batch-verifies the topic (never curated), installed-state GitHub mapping, and DSH-token / no-★/ no-colorSchemeclient checks.