dsh-web
zhu1090093659
DeepSeek Harness (DSH) Web 插件聚合生态 · 万物皆插件,通过创意工坊分发||DeepSeek Harness (DSH) Web Plugin Aggregation Ecosystem · Everything is a plugin, distributed via the Creative Workshop
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:z-col/dsh-workspace-groups
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English · 简体中文
A DeepSeek Harness (DSH) web client plugin: a complete workspace grouping manager. Turns the GUI sidebar's two-level workspace list (Projects → Sessions) into a three-level Category folder → Project folder → Session tree, backed by full group-management capabilities: manual group creation, rename/delete of any group, drag-and-drop grouping, free ordering of projects and groups, rule-based auto-classification, and tree-shaped search. Every action takes effect immediately and persists, with zero intrusion on official data.
dsh.workspace.groups.view.v1, survives refresh/restart)⋯ menu; deleting a group sends all of its projects back to the top level;
rule-category rename/delete rides the overlay (renamed / hidden),
the rule YAML stays untouchedpathPrefix /
pathExact / nameContains / basenameContains); edit the config to adjust grouping
without touching codeworkspaceOrder["__topLevel__"]~/.dsh/workspace-groups.manual.json), validated by the host and written
atomically (a malformed write returns 400 and keeps the previous file)~/.dsh/storages/workspace.json, session on-disk
structures, or the official @deepseek-ai/dsh-client-ui-workspace package; the rule YAML
is never rewrittenlib/ is prebuilt and shipped with the repo — installing from
Git runs no dependency scriptssidebar.workspaces slot (kind: 'single') at priority: -1, replacing the official
WorkspaceBrowser (registered at priority 0; lowest priority wins in a single slot).useWorkspaces / useSessions global hooks and
ctx.workspaces.* / ctx.sessions.* — grouping is purely a presentation-layer transform.GET /workspace-groups/config (Cache-Control: no-cache);
and PUT /workspace-groups/manual accepts the full overlay (manual groups, per-workspace
grouping overrides, group/project ordering, rule-category renames and hides), validates it
and writes it atomically to $DSH_HOME/workspace-groups.manual.json.null = forced
top-level, rules ignored) → YAML rule classification (hidden rule categories are inert)
→ top level (ungrouped projects render as top-level rows). The YAML is never
rewritten.Prerequisite: DeepSeek Harness installed (
dshavailable) with a target profile initialized (e.g. the built-inweb).
dsh plugin --profile web add github:z-col/dsh-workspace-groups
This automatically:
"dsh-workspace-groups": "github:z-col/dsh-workspace-groups" (pinned to
version/commit) to dependencies in ~/.dsh/profiles/web/package.json"dsh-workspace-groups" to dsh.profile.bundlesRestart the web profile after installing (both the bundle and the host half only load on restart):
# Stop the running dsh web process and start it again, e.g.:
dsh web
Verify the install:
dsh --profile web --dump-config | grep -A3 workspace-groups
# expect: - id: workspace-groups / name: dsh-workspace-groups / config: {}
curl http://127.0.0.1:3080/workspace-groups/config
# expect: the sidecar YAML parsed as JSON
dsh plugin --profile web remove dsh-workspace-groups
This removes the dependency from dependencies and the matching line from
dsh.profile.bundles. A web profile restart is required for it to take effect.
Manual equivalent (pick one, don't repeat): edit
~/.dsh/profiles/web/package.json, remove thedsh-workspace-groupsline fromdependenciesand"dsh-workspace-groups"fromdsh.profile.bundles, then runpnpm installin that directory.
Default location ~/.dsh/workspace-groups.yaml (override the home dir with the
$DSH_HOME env var). Template: workspace-groups.example.yaml at the repo root.
categories:
- name: DSH 插件
rules:
- pathPrefix: /Users/zcol/Project/SkillsManagePlugins
- nameContains: 插件
- basenameContains: plugin
- name: 个人项目
rules:
- pathPrefix: /Users/zcol/Project/yeluzi
Rule fields (each rule is an OR — any match classifies; categories are matched in order, first match wins):
| Field | Meaning |
|---|---|
pathPrefix |
Project absolute path prefix |
pathExact |
Project absolute path exact match |
nameContains |
Project display title contains (case-insensitive) |
basenameContains |
Project directory name contains (case-insensitive) |
Projects matching no category — or moved out of a group — render as top-level project rows (same level as the group folders), never hidden.
Besides the rule YAML there is a plugin-owned runtime overlay, recording only manual
UI operations, at $DSH_HOME/workspace-groups.manual.json (e.g. ~/.dsh/workspace-groups.manual.json):
{
"categories": ["临时", "归档"],
"assignments": {
"a1b2c3d4-e5f6-7890-abcd-ef1234567890": "临时",
"a1b2c3d4-e5f6-7890-abcd-ef1234567891": null
},
"categoryOrder": ["临时", "DSH 插件"],
"workspaceOrder": { "临时": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"] },
"renamed": { "DSH 插件": "插件集" },
"hidden": ["文档"]
}
categories — manually created group names (no rules; empty groups render too).assignments — workspace → group classification overrides keyed by the stable workspace id
(renames don't affect it). Takes precedence over YAML rules; a value of null means
forced top-level (even when a rule would match).categoryOrder — group display order (top-level rows are not listed here; they always
render after the group folders).workspaceOrder — per-group manual ordering of projects (written by drag ordering).renamed / hidden — UI rename/delete of rule categories (a hidden category's rules become
inert and its matches go top-level); the rule YAML stays untouched.PUT /workspace-groups/manual, atomic
replace); manual edits also take effect on next load. A malformed write returns 400 and
keeps the previous file — the rule YAML is never at risk.| Action | How |
|---|---|
| Create group | "新建分组" button in the section header (folder icon), enter a name in the dialog |
| Rename/delete group | hover ⋯ menu on any group (rule categories included); deleting sends its projects back to the top level |
| Drag project into group | drag a project row onto a target group row / any project row inside a group, release to move |
| Reorder projects | drag a project row onto another project row in the same group: top half = insert before, bottom half = insert after (indicator shows the spot); all project rows fold while dragging and restore on dragend |
| Reorder top-level projects | drag a top-level row onto another top-level row: top half = insert before, bottom half = insert after; order persists under workspaceOrder["__topLevel__"] |
| Move out of a group | drop anywhere on the top-level area (an insertion line shows the spot — reorder before/after a top-level row, or append below the last row; when the top level is empty a line shows under the last group), or the project row's "移出分组" menu (forced top-level) |
| Reorder groups | drag a group row onto another group row: top half = move before, bottom half = move after (indicator shows the spot; all groups fold while dragging, restored on dragend) |
This repo targets automatic discovery by the DSH plugin ecosystem (community marketplaces scan GitHub topics). Already set:
dsh-plugin (core tag; 1024Store
and similar marketplaces discover by this topic periodically, validating
package.json + the plugin bundle manifest (cordis.patch.yml))deepseek-harness / deepseek-harness-plugin / dshsidebar / workspace / workspace-groupspackage.json also provides keywords for npm/search indexing.
pnpm install
pnpm typecheck # host + client dual-program type checking
pnpm test # core rules, overlay, tree derivation unit tests
pnpm build # build lib/ (node half + client bundle)
pnpm watch # tsdown watch (client HMR)
node scripts/verify-groups.mjs # real-browser CDP verification (host restarted; self-spawns a headless Chrome, auto-restores the scene)
Artifact contract (mirrors the official client packages):
lib/index.js — host half (ESM; reads the sidecar + /workspace-groups/config route;
js-yaml inlined, no runtime dependencies)lib/client.js — browser half (window.__ModuleLoader__.load({id, factory}); only
requires platform seeds: react / react/jsx-runtime / @deepseek-ai/dsh-client-runtime/client /
@deepseek-ai/dsh-client-ui-primitives; cross-plugin value imports are rejected at build
time by the purity gate)lib/types/** — declaration filesRelease strategy:
lib/build artifacts are committed (nopreparescript), sodsh plugin add github:...never runs third-party build scripts — install and use.
src/
index.ts # host half: config snapshot route + manual write route
host-config.ts # sidecar YAML reading/validation
host-manual.ts # runtime overlay read/write/validation (atomic publish)
context-types.ts # host-side cordis service structure types
core/
types.ts # config types (shared by both halves)
matcher.ts # classification + manual override priority + ordering pure functions (shared)
client/
index.ts # apply: registers sidebar.workspaces (priority -1)
contract.ts # injected surface types
stores.ts # expansion-state store (persist: dsh.workspace.groups.view.v1)
tree.ts # three-level tree derivation + tree search derivation
GroupsBrowser.tsx # browser region component (group dialogs + drag grouping/ordering + insertion indicator)
rows.tsx # category/project/session/search-result rows (drag sources/targets)
locales.ts # zh/en copy
styles.css # inline styles
tests/
core.test.ts # classification rules + override priority + moveBefore/moveAfter + config parsing
manual.test.ts # overlay validation + atomic file round-trip
tree.test.ts # tree derivation rendering contract (manual group empty render / override priority)
store.test.ts # expansion semantics (collapse writes false, never deletes the key)
scripts/
verify-groups.mjs # real-browser CDP verification (self-spawns headless Chrome, auto-restores the scene)
Development docs (
docs/five-level framework andAGENTS.md) are engineering files for development, not shipped with the repo (excluded via.gitignore).
workspace.json / session on-disk / official store: zero intrusion.scripts/verify-groups.mjs: create group / drag /
order / collapse / rule-category menu / rename / delete-back-to-top-level /
scene restore; zero-intrusion assertions).workspaceOrder["__topLevel__"]; also
fixed a host validation bug that rejected __topLevel__ and a drop-positioning bug where
dropping between two top-level rows landed above the first; scene restored).core / manual / tree / store).node scripts/verify-groups.mjs (host restarted).MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: sidebar。