Introduction¶
One of the design principles of DeepSeek Harness (DSH) is “everything is a plugin.” When running the dsh web process locally, we can extend interface capabilities through plugins. For the bbs.dsher.cn forum, a bundle plugin was developed to integrate browsing, searching, posting, and other forum features into the DSH Web panel, avoiding frequent switching between browser tabs and the DSH interface.
Plugin Overview¶
This is a bundle plugin for DeepSeek Harness Web, maintained by kimirong. After installation, it creates a persistent floating button in the bottom-right corner of the dsh web interface (“dsher Community”). Clicking it opens the panel, allowing direct interaction with bbs.dsher.cn.
Installation and Activation¶
Prerequisite: DeepSeek Harness (with the dsh command) is installed on the machine, and dsh web is started.
1. Install the Plugin¶
Install directly from the GitHub repository; no need to publish to npm first:
# 将插件加入 web profile bundles
dsh plugin --profile web add github:kimirong/dsher-bbs-plugin
2. Restart the Service¶
After installation, the dsh web process must be fully restarted (not just refreshing the browser page) for the plugin to take effect.
dsh web
After restarting, a blue capsule button will appear in the bottom-right corner of the page. Click it to enter the community panel.
3. Common Issues¶
If you encounter the ERR_PNPM_ADDING_TO_ROOT error during installation, it is because pnpm 8+ validates add operations at the workspace root. You can resolve this by adding one line to ~/.dsh/profiles/web/.npmrc:
echo 'ignore-workspace-root-check=true' >> ~/.dsh/profiles/web/.npmrc
dsh plugin --profile web add github:kimirong/dsher-bbs-plugin
4. Update and Uninstall¶
dsh plugin --profile web update @kimirong/dsher-bbs-plugin # 更新到新版本
dsh plugin --profile web remove @kimirong/dsher-bbs-plugin # 卸载(自动从 bundles 剔除)
Features¶
- Floating entry in the bottom-right corner: A blue capsule button remains in the bottom-right corner of the page, does not occupy sidebar space, and is available at any time.
- Browsing and searching: Supports browsing categories/boards, post lists (with pagination), and viewing post details. The search box is integrated directly at the top of the browsing page.
- Posting and interaction: The panel supports creating posts, replying, and liking; post bodies support Markdown rendering.
- Image upload: Supports pasting screenshots directly into the body or reply box (automatically encoded and uploaded), or clicking the “🖼 Upload Image” button.
- One-click login: Opens a popup to follow the forum’s GitHub / Google OAuth flow; the session is connected automatically, with no need to manually copy cookies.
Typical Usage¶
After installing and restarting dsh web, you can start using it by clicking the floating button in the bottom-right corner. A typical workflow is as follows:
- Click the floating button to browse or search posts.
- Click “Post” or a reply box and enter Markdown content.
- Paste a screenshot or click the upload button to publish the content.
- Click the “One-Click Login” button to complete OAuth authentication.
Architecture and Technical Implementation¶
The plugin uses a Host/Client separation architecture and implements communication through HTTP routes rather than the official DSH @Remote mechanism.
Host side (server-side)¶
Responsible for interacting with the forum and exposing JSON RPC interfaces.
- File locations: src/host/index.ts, src/host/forum.ts
- Responsibilities:
- src/host/index.ts: Registers ctx.webServer routes /api/dsher-bbs/* and exposes forum capabilities as local JSON RPC.
- src/host/forum.ts: Uses the Node global fetch to access the forum and parses post lists and details via HTML regex (the forum uses Hono + htmx server-side rendering and has no public JSON API).
Client side (browser-side)¶
Responsible for UI rendering and user interaction.
- File locations: src/client/index.ts, src/client/Panel.tsx, src/client/rpc.ts
- Responsibilities:
- src/client/index.ts: Plugin entry point; registers the shell.overlay slot via ctx.inject(['slots']).
- src/client/Panel.tsx: React component that renders the floating button and panel UI, calling the Host through same-origin fetch('/api/dsher-bbs/<method>').
- src/client/rpc.ts: Wraps fetch.
Communication Pattern¶
It does not use the @Remote mechanism from @deepseek-ai/dsh-api-remotes, because the official client assembly is a static whitelist (it only imports /remote from the official package), so remotes from third-party standalone packages are not mounted automatically. Therefore, this package adopts self-hosted HTTP routes: the Host side registers webserver prefix routes, and the Client side uses same-origin fetch. This is a common deliverable pattern for standalone bundle plugins.
Limitations and Notes¶
- Rate limiting rules: The forum enforces rate limits for write operations; please note:
- 5 posts/hour
- 30 replies/hour
- 60 likes/hour
- 20 uploads/hour - HTML parsing fragility: Forum post bodies are rendered with
markedand not sanitized, presenting an XSS risk. Althoughforum.tsperforms basic sanitization, rendering third-party content still carries risk. Also, after forum redesigns, regex parsing logic may break and require synchronized updates. - Authentication and security:
- The/api/dsher-bbsroutes have no authentication and share the same origin and permissions as the DSH page. Anyone who can access that DSH page can call them.
- Session cookies exist only in the Host process memory; they are not written to disk or sent externally.
- One-click login depends onsrc/routes/dsh-login.tsxdeployed on the forum side, and that page only accepts requests fromlocalhost/127.0.0.1. - Development builds:
- Runnpm installto install dependencies.
- Runnpm run buildto compile (outputs arelib/index.mjsandlib/client.js).
- Runnpm run typecheckto perform type checking.
License¶
MIT.
Project address: https://github.com/kimirong/dsher-bbs-plugin