Skip to main content

dsh-market/plugin/ui

42Stars1Forks5Issues0Watchers

DSH Sidebar Plugin: Injects a Plugin Market entry and 6-tab panel into the DSH sidebar, enabling browsing, search, personalized recommendations, one-click installation, installed plugin management, and GitHub starring.

Evidence4/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
TypeScript
License
NOASSERTION
Branch
master
deepseek-harnessdeepseek-harness-plugindeepseek-harness-pluginsdshdsh-bundledsh-marketdsh-plugindsh-plugins

Install

cmdweb profile
$ dsh plugin --profile web add @dsh-market/plugin

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin 2BingLing/dsh-market/plugin/ui for me: review the repository at https://github.com/2BingLing/dsh-market first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Description

DSH ecosystem's "Plugin Market" cordis plugin version: brings the entire market into the DSH sidebar—browse, search, personalized recommendations, one-click install/uninstall, GitHub starring, 6-Tab panel on demand, zero token constant residence.

Core Features

  • Sidebar Entry & Fullscreen Panel: Register sidebar.footer.action slot to show "Plugin Market" button, mount 6-Tab fullscreen floating panel at shell.overlay slot; button and panel toggle state shared across slots via store (plugin/ui/src/client/index.ts:13-61)
  • Browse & Search: Pull all indexed plugins from plugins.json, local Fuse.js keyword search, Chinese tag filtering, type/no-config filtering; 200+ results paginated in panel
  • Personalized Recommendations (5 Channels): Cold-start questionnaire / installed plugins / GitHub stars / local favorites / scenario recommendations (read session title + recent messages + tool names, zero token) form the profile together, each recommendation includes "why recommended" reason
  • One-Click Install & Uninstall: skill type git clone to skills directory, cordis type dsh plugin --profile X add <pkg>; each step with snapshot, failure retry (max 2 times), automatic rollback on failure; uninstall precisely removes by dependency key name (pnpm case-sensitive)
  • Installed Management & Self-Update: Auto-scan ~/.agents/skills and profile package.json to identify installed items; give update hints via npm registry (cordis type) and GitHub pushedAt (skill type); panel allows self-update of plugins themselves
  • GitHub Integration: Settings page supports device flow (GitHub App) or PAT two binding methods; PAT mode can directly star/unstar plugin repositories in panel, sync starred repositories into profile

Technical Implementation

  • Language: TypeScript (ESM, Node half + browser half dual entry; browser side uses React 18 + React.createElement without JSX)
  • Key Dependencies: @dsh-market/core (pure Node logic layer: search/profile/install/update/GitHub), @dsh-market/schema (shared types), fuse.js (local fuzzy search), react ^18 (browser-side panel)
  • Architecture Pattern: cordis dual-half plugin — Node half (apply(ctx)) registers POST JSON-RPC route for /market/api and gets agents/subagents/sessionQuery/llm services from harness; Browser half uses ctx.slots.inject to put trigger into sidebar.footer.action, put panel into shell.overlay; package-level declaration dsh.bundle.patch: ./cordis.patch.yml + dsh.client.inject three platform seed modules let host load and service-ify
  • Entry Files: plugin/ui/src/index.ts (Node half, exports name = 'dsh-market' and inject = ['webServer']) / plugin/ui/src/client/index.ts (browser half, exports inject = ['slots']) / plugin/ui/cordis.patch.yml (bundle injection declaration)

Use Cases

People just installed DSH not sure what to install—the plugin version uses "cold-start questionnaire + curated + scenario recommendations" so beginners can pick suitable plugins in 3 minutes; people who want to avoid remembering commands—one-click install avoids manually typing dsh plugin add or git clone; people with more and more plugins needing unified management—Installed Tab auto-detects skill directory and profile dependencies, gives update and uninstall entries; people who want recommendations based on their preferences—profile auto-updates with usage, gets smarter over time.

Prerequisites & Compatibility

DependencyMin VersionDescription
DeepSeek Harness (cordis web profile)Not declaredplugin/ui/package.json doesn't declare peerDependencies; injected via dsh.bundle.patch + dsh.client.inject; host web profile must enable three platform seed modules: @deepseek-ai/dsh-client-runtime / -locale / -ui-slots
Node>=20engines field in root package.json (plugin/ui and plugin/core themselves don't declare engines)
PlatformmacOS / Windows / LinuxNode half command executor on Windows uses ComSpec ?? cmd.exe, directory deletion has built-in 5 retries + rmdir /s /q fallback; other platforms use default shell
Native ModulesNoneOnly depends on Node built-in modules (node:fs / node:child_process / node:http / node:path) and browser fetch, no native binding introduced

Installation

dsh plugin --profile web add github:2BingLing/dsh-market/plugin/ui

After installation, restart harness, "Plugin Market" icon button appears at bottom of DSH sidebar; click to open 6-Tab panel: Recommendations / Search / Bundles / Favorites / Installed / Settings.

Configuration Options

ConfigTypeDescriptionDefault
DSH_HOMEpath env varOverride DSH home directory (skills / profiles / data subdirectories all derived from it)~/.dsh
DSH_SKILLS_DIRpath env varInstallation directory for skill-type pluginsPriority: $DSH_HOME/skills, else ~/.agents/skills
DSH_PROFILES_DIRpath env varDirectory where profile dependency lists are located$DSH_HOME/profiles
DSH_MARKET_DATA_DIRpath env varThis plugin's data directory (profile / settings / GitHub binding / install snapshots)$DSH_HOME/plugins/dsh-market
Recommendation Mode (modeOverride)auto / novice / veterannovice prefers curated general items, veteran increases personalization weight, auto uses profile auto-modeauto
Target ProfilestringWhere one-click install / uninstall / self-update takes effectweb
GitHub Bindingdevice flow token or PATUsed to sync star list and star repositories in panel (PAT required for direct starring)Not bound

Local config files land under $DSH_MARKET_DATA_DIR/: profile.json (profile) / settings.json (mode + profile override) / binding.json (GitHub credentials) / snapshots/ (snapshots of each install, used for rollback on failure).

FAQ

Q: What's the relationship between this sub-package and the dsh-market root repo? Which one should I install?

A: Root repository is a monorepo (collector data pipeline + web static site + plugin/core logic layer + plugin/ui plugin version). Installing plugin/ui gets you the sidebar panel; plugin/core is a dependency of plugin/ui, the host will automatically bring it when installing ui. Web version (dsh.market) and plugin version only share the same plugins.json data, they're independent—installing the plugin doesn't affect the website, and vice versa.

Q: Will failed installation leave half-finished products?

A: No. The installer takes snapshots before execution (old skill directory backed up to .bak-<timestamp>, old profile package.json content), automatically rolls back on failure; clone and dsh plugin add each step retries up to 2 times before giving up; UI echoes each step's status in real-time (pending/running/done/failed/skipped).

Q: Is this plugin's data still there after uninstalling plugins?

A: This plugin's own local data (profile, settings, GitHub binding, favorites, install snapshots) all stay in ~/.dsh/plugins/dsh-market/, profile can continue after reinstall; it only removes third-party plugins you installed from the market (delete skill directory or remove package from profile dependencies).

Q: How to handle "EPERM" in self-update?

A: Because harness is running, pnpm replacing files in plugin directory may get blocked. UI gives executable fix instructions: first stop harness, then run npx @deepseek-ai/dsh plugin --profile <profile> add @dsh-market/plugin@latest, then restart harness.

Q: Which features need internet, which work offline?

A: Browse/search/recommendations/one-click install/uninstall/self-update/GitHub starring all need internet; local profile, favorites, settings, Fuse index can reuse last cached data offline. Device flow token doesn't support starring (GitHub API doesn't allow), PAT required.

Q: What are the prerequisites for AI semantic search, AI agent install, and scenario recommendations?

A: These three call harness internal services—"scenario recommendation" needs sessionQuery, "AI semantic search" needs llm, "AI agent install" needs subagents and agents. When host version is older or corresponding services aren't registered, UI will degrade or return clear errors, doesn't affect basic browse/search/local install.

Q: What's the principle of one-click install? Can it rollback on failure?

A: skill type = git clone --depth 1 <repo> <skillsDir>/<name>-latest, skip if already installed; cordis type = dsh plugin --profile <target> add <pkg>, skip if already installed. Each step takes "pre-install snapshot" before execution, any failure immediately rolls back (delete new directory / restore old package.json), max 2 retries.

Learning Curve

Beginner — works out of box with zero config, advanced features (GitHub binding, self-update, AI agent install) hidden in "Settings" to enable as needed; no commands to memorize.

Known Issues & Limitations

  • Self-update EPERM: When harness process holds plugin directory files, pnpm overwrite is rejected, UI must prompt user to stop harness first, then install @latest, then restart (plugin/ui/src/index.ts:179-202)
  • cordis plugin uninstall depends on case-sensitive key names: Market plugin.name is original GitHub repo case (e.g., DSH-better-sidebar), direct inference will fail to uninstall, must use localName (actual dependency key name / directory name of installed item) to correctly remove (plugin/ui/src/index.ts:366-374 / plugin/core/src/installer.ts:329-333)
  • Deleting skill directory on Windows may be occupied: Built-in 5 retries + rmdir /s /q system command fallback, but may still need to close occupying process to fully delete (plugin/core/src/installer.ts:289-310)
  • AI semantic search fixed recall of 60 candidates: When plugin count grows, recall depth doesn't increase proportionally, avoids token runaway, but limits long-tail recall (plugin/ui/src/index.ts:286-337)
  • AI agent install and AI semantic search need host services: Depends on harness exposing subagents / llm / sessionQuery services, older host versions may be missing, UI returns clear error (plugin/ui/src/index.ts:286-414)
  • GitHub device flow token cannot star: Device flow is GitHub App OAuth, API doesn't expose user/starred endpoint, starring must use PAT in "Settings" (plugin/ui/src/client/panel.tsx:175-179)
  • Bundles Tab is browse entry, doesn't directly install: v0.1 implementation is "click to open package author's repo page, package author provides installation method", doesn't directly take over bundle installation (plugin/ui/src/client/panel.tsx:1571-1574)

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/2BingLing/dsh-market/plugin/ui)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory