Skip to content

dsh-plugin-store v0.1.0

Choose a tag to compare

@anjaymi anjaymi released this 15 Aug 07:19
· 3 commits to main since this release

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-store prefix route on the shared loopback web server.
    • GET ?method=bootstrap issues a per-process random token.
    • GET ?method=list is a safe read-only view.
    • POST (refresh, install, op, kill) requires same-origin and the x-dsh-plugin-store-token header; request bodies are capped at 8 KB.
  • Catalog pipeline:
    • Bundled curated + discovery snapshot (data/registry.snapshot.json), normalized on load so every entry starts at verified: 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 root package.json for name, version and dsh.bundle via @deepseek-ai/dsh-home-paths + @deepseek-ai/dsh-atomic-write for paths/cache. Only the bounded topic batch is structurally verified on refresh; curated entries stay verified: null and 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 keep null. There is no local star ledger and no client-side star toggle.
  • 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.bundle immediately before the real profile is touched; a failure leaves the profile untouched.
    • Successful installs return a restart hint.
  • Client plugin (lib/client.js) as a hand-written window.__ModuleLoader__.load({ id, factory }) CommonJS factory:
    • Registers the 插件市场 / Plugin Store tab at slot settings.plugins.tab, id market, order 5.
    • 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, no documentElement.style.colorScheme); icons are inline SVG helpers (Lucide, GitHub mark, Star) — never Unicode .
  • Packaging (package.json): files includes README.zh-CN.md, PRODUCT.md, DESIGN.md; keywords add dsh-plugin / deepseek-harness; dsh.client.inject adds @deepseek-ai/dsh-client-ui-slots and @deepseek-ai/dsh-client-ui-settings; peerDependencies adds @deepseek-ai/cordis ^4.0.1.
  • Product/design docs: PRODUCT.md (register, users, personality, anti-goals, WCAG AA) and DESIGN.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.effect disposer), no-absolute-paths, snapshot normalization, repo validation, origin+token security, install re-verification (injectable fake fetch/spawn), CLI candidate resolution against the real desktop dependencies/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-colorScheme client checks.