dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
LLM Wiki workbench for dsh-better-sidebar: browse and lint a Karpathy-style interlinked markdown wiki, open pages with the native markdown viewer, clickable [[wikilinks]] and provenance/relative .md links, and backlinks. Ships the llm-wiki agent skill.
English | 简体中文
LLM Wiki workbench for the
sidebar shipped with DeepSeek Harness itself: browse and lint a Karpathy-style interlinked
markdown wiki directly in the right Sidebar, render pages with clickable [[wikilinks]],
relative .md / provenance links and backlinks, and ship the llm-wiki agent skill — packaged as
one DSH plugin.
v2.0.0 is the built-in-sidebar rewrite. v1.x targeted the third-party
dsh-better-sidebarplugin and registered abetterSidebartab + file viewer. DeepSeek Harness now ships its own right Sidebar (@deepseek-ai/dsh-client-ui-sidebar-right), which conflicts with that plugin. v2 talks to the built-in sidebar instead: no third-party sidebar plugin is required or supported.
conf: low, contested), one-click open as
a file resource, a refresh button, and the page-refresh shortcut bound to the product command..md files that live inside a wiki root are claimed by this plugin's
own resource tab type and rendered with markdown-it
(GFM tables, fenced code, blockquotes, lists, images). Files outside a wiki root keep the
product's native document preview untouched.[[wikilinks]] — [[target]] / [[target|label]] resolve against the wiki map;
unresolved links render struck-through with a tooltip. Rendered from the source text, so nothing
is written back and the file on disk is never modified.[[page#section]] opens the page and scrolls to the matching heading, and
[[#section]] jumps within the current page. Matching accepts the heading text or its slug
(GitHub-style, Unicode-aware, so CJK headings work too)..md links — provenance markers (^([来源](raw/...))) and
any relative markdown link open through the same resource path as the catalog.scripts/wiki_lint.py.wiki/, the tab auto-discovers sibling
directories that look like a wiki (SCHEMA.md/index.md + a section or raw/ dir) and shows a
switcher in the tab header; page rendering follows the file's owning wiki root via longest-prefix
match. Extra roots can be registered explicitly via the wikiRoots plugin config (see
Multiple wikis).llm-wiki skill — skills/llm-wiki/SKILL.md + scripts/wiki_lint.py are mounted
by a dedicated dsh-skill-filesystem instance scoped to this package, so the plugin and its
skill install and uninstall as one unit.@deepseek-ai/dsh-client-ui-sidebar-right, 0.1.7-rc.2 or newer)No third-party sidebar plugin is needed. dsh-better-sidebar must not be installed: it
provides its own sidebar and conflicts with the built-in one.
The default wiki lives at <session workspace>/wiki (the sidebar file routes enforce the workspace
fence, so workspace-relative is the supported location). Additional wikis may live in any directory
inside the workspace — see Multiple wikis.
dsh plugin --profile web add "github:ApeInCodeMountain/llm-wiki-sidebar"
Then restart dsh --profile web and hard-refresh the browser.
dsh plugin --profile web add llm-wiki-sidebar
The served browser bundle lib/client.js is generated (it inlines the vendored markdown-it), so
build it once after cloning:
git clone https://github.com/ApeInCodeMountain/llm-wiki-sidebar
cd llm-wiki-sidebar && node scripts/build-client.mjs
cp -r . ~/.dsh/profiles/web/llm-wiki-sidebar
ln -sfn ../llm-wiki-sidebar ~/.dsh/profiles/web/node_modules/llm-wiki-sidebar
# register as a link: dependency so pnpm keeps the symlink
node -e "const fs=require('fs');const f=process.env.HOME+'/.dsh/profiles/web/package.json';const j=JSON.parse(fs.readFileSync(f));j.dependencies['llm-wiki-sidebar']='link:llm-wiki-sidebar';fs.writeFileSync(f,JSON.stringify(j,null,2)+'\n')"
Then restart dsh --profile web and hard-refresh the browser (Cmd/Ctrl+Shift+R).
Remove the package via dsh plugin --profile web remove llm-wiki-sidebar (or delete both rows
from ~/.dsh/profiles/web/cordis.patch.yml, the profile package.json entry, the
node_modules/llm-wiki-sidebar symlink and the ~/.dsh/profiles/web/llm-wiki-sidebar
directory); restart DSH. Uninstalling also withdraws the packaged llm-wiki skill (it lives
inside the plugin directory).
llm-wiki skill creates wiki/ with SCHEMA.md, index.md, log.md and the layered
directories, then ingests sources.[[wikilinks]], provenance links and
backlinks. Use Source to read the raw markdown.wiki-<topic>/) with the
same layered layout — the sidebar discovers it automatically and the tab header gains a wiki
switcher. Each wiki keeps its own slug namespace; cross-wiki references use relative .md links.A workspace can hold several independent knowledge bases. The host unions three sources (dedupli- cated by root, in this order):
<workspace>/wiki, always listed; a workspace with only it renders without a
switcher.wikiRoots in the plugin row's config: (workspace-relative or absolute
inside the workspace). Registered roots are listed even before they exist (exists: false) and
are never subject to exclude.SCHEMA.md or index.md and at least one of entities/ concepts/ comparisons/ queries/ raw/, so ordinary project folders are never misreported. exclude (basenames) skips noisy
directories.A file belongs to the longest matching registered root, so wikilinks, provenance links and
backlinks work in every wiki. Wiki roots are always validated to stay inside the session workspace
(lib/wiki-root.js) — paths escaping the workspace are refused. wiki_lint.py takes the wiki root
as its argument, so each wiki lints separately.
Example config in ~/.dsh/profiles/web/cordis.patch.yml:
- insert:
- id: llm-wiki-sidebar
name: 'llm-wiki-sidebar'
config:
wikiRoots: ['wiki-game', 'kb/research']
exclude: ['node_modules', 'archive']
| Piece | Extension point |
|---|---|
| Browse + lint tab | page type llm-wiki via ctx.sidebarRightTabs.register, body in the keyed sidebar.right.pane.tab seat |
| Wiki page rendering | resource type llm-wiki-page via ctx.sidebarRightTabs.register (dsh-resource://file/** + canOpen for wiki .md), same body seat |
| Opening a page | tab.actions.openResource(dsh-resource://file/session/<sessionId>/<path>) |
| Page text | ctx.remote.workspaceFiles.read (paged line reads, sandbox-aware) |
| Catalog / lint / map / registries | this plugin's own host routes (below) |
Only wiki .md files are claimed; every other address keeps the product's native document
preview. The plugin never reads or patches another plugin's DOM.
| Route | Body | Purpose |
|---|---|---|
POST /llm-wiki/api/wikis | { cwd } | wiki roots exposed by the workspace (default + config + discovery) |
POST /llm-wiki/api/scan | { cwd, wiki? } | wiki page catalog |
POST /llm-wiki/api/lint | { cwd, wiki? } | lint report |
POST /llm-wiki/api/map | { cwd, wiki? } | slug→page map + backlink graph + raw index |
wiki is optional on scan/lint/map: omitted selects the default <cwd>/wiki; otherwise it is a
workspace-relative or workspace-absolute root resolved by resolveWikiRoot().
All routes enforce the same browser-trust fence as the /api gateway
(loopback/trusted Host + same-origin markers) and read only through the
sandbox-aware fs service. The plugin never writes to disk.
node scripts/build-client.mjs # regenerate lib/client.js from lib/client.src.js
node --check lib/client.js && node --check lib/index.js && node --check lib/wiki-root.js
node test/impl.test.mjs # unit + regression (no browser required)
lib/client.js is generated: edit lib/client.src.js, then run the build. The vendored
markdown-it build and its MIT license text live in lib/vendor/.
The v1 design notes for the old DOM-text-pairing pipeline are kept in the repository for history and no longer describe the implementation: v2 renders instead of patching another plugin's DOM, so that pipeline was removed together with the better-sidebar dependency.
llm-wiki skill from the hermes-agent project — the packaged
skills/llm-wiki skill is a DSH edition of that pattern.lib/vendor/markdown-it.LICENSE.lib/index.js is a behavioral port of the
/api gateway's fence from @deepseek-ai/dsh-client-connection (MIT).