Introduction¶
If you use the OpenClaw standalone gateway (openclaw gateway --profile dsh) to serve a Feishu bot, you will encounter a specific issue: the conversation records between you and the bot only exist in the agent session files written by the gateway, and cannot be seen on the dsh web page. To review a conversation, you have to log in to the server and dig through files, or write a script to parse them yourself.
dsh-plugin-feishu-chat solves exactly this problem: it mirrors the records from the session files onto the dsh web page, providing a viewing panel with auto-refresh. Below is an introduction to its features, principles, and installation methods.
What is it?¶
dsh-plugin-feishu-chat (package name dsh-feishu-chat-viewer, version 1.0.0) is a client-side plugin for DeepSeek Harness Web (dsh web), maintained by scubiry-glitch and licensed under MIT. It adds a 💬 Feishu button to the session header action area; clicking it opens a panel that displays your private chat history with the Feishu bot in real-time.
The data flow is as follows:
Feishu ←Long Connection→ OpenClaw Standalone Gateway (agent dsh)
│ Write conversation
▼
agent session files sessions/*.jsonl
│ Read (Node half, same-origin route)
▼
dsh web ──/feishu-chat.json──▶ Browser panel (client plugin)
Core Features¶
- Adds a 💬 Feishu button to the session header action area; clicking it opens a panel displaying private chat records with the Feishu bot;
- The panel auto-refreshes every 5 seconds, and the button has a message count badge (badge refreshes every 30 seconds);
- Data comes from the agent session files
sessions/*.jsonlwritten by the OpenClaw standalone gateway; - Does not depend on the OpenClaw gateway process being alive; as long as the session file exists, the history can be viewed;
- The panel display is completely unaffected by gateway model configuration: if the model is unavailable, the bot simply stops generating new replies, and a gateway process crash does not affect the already-disk-persisted session files;
- Accessed via same-origin routing; regardless of whether the page is opened via
127.0.0.1:3080, LAN, or Cloudflare Tunnel, there are no cross-origin/CSP issues.
How it Works¶
The plugin runs inside dsh web and is divided into two halves:
-
The Node half registers a same-origin route
/feishu-chat.jsonwithin the dsh web process and is responsible for reading the agent session files and returning the data; -
The Browser half is responsible for rendering the panel and directly requests the same-origin
/feishu-chat.jsonto get the data.
Because it uses a same-origin route instead of an external independent port, the browser side does not encounter CORS restrictions, which is the key to its stable operation across various access methods. Conversely, if a cross-origin address (e.g., hardcoded 127.0.0.1:18791) is used, the panel will report Failed to fetch.
Installation and Enablement¶
The official provides a one-click script installation. First clone the repository, then execute the installation script, and finally restart dsh web:
git clone https://github.com/scubiry-glitch/dsh-plugin-feishu-chat.git
cd dsh-plugin-feishu-chat
./install.sh # Install to /root/.dsh/profiles/ and write cordis.patch.yml
pm2 restart dsh-web # Restart and refresh the page
If you don’t want to use the script, you can also install it manually in three steps:
# 1. Put the package into the web profile's node_modules (actual directory, do not put it in the npx cache directory!)
mkdir -p /root/.dsh/profiles/node_modules/dsh-feishu-chat-viewer/lib
cp -r lib package.json /root/.dsh/profiles/node_modules/dsh-feishu-chat-viewer/
Then append to /root/.dsh/profiles/web/cordis.patch.yml:
- insert:
- id: feishu-chat-viewer
name: 'dsh-feishu-chat-viewer'
Finally restart:
pm2 restart dsh-web
After the steps above, refresh the page to see the 💬 Feishu button in the session header. The plugin depends on dsh-auth-gate 0.7.2 (see package.json).
Configuration¶
Three adjustable items:
| Item | Location | Default Value |
|---|---|---|
Session Directory SESS_DIR |
Top constant in lib/index.js |
/root/.openclaw-dsh/agents/dsh/sessions |
| Refresh Interval | lib/client.js |
Panel 5s / Badge 30s |
Display Count MAX_MSGS |
lib/index.js |
100 |
If your standalone gateway uses a different profile name, just change SESS_DIR to point to the corresponding directory.
Troubleshooting¶
Several common symptoms and solutions:
| Symptom | Cause | Solution |
|---|---|---|
| Plugin button does not appear | Page cached old bundle | Force refresh (Cmd/Ctrl+Shift+R); verify that window.__DSH_BOOT__ contains the plugin id |
Panel shows Failed to fetch |
Used a cross-origin address | Must use same-origin /feishu-chat.json |
Startup crash ERR_PACKAGE_PATH_NOT_EXPORTED |
package.json exports missing . entry |
Keep ".": "./lib/index.js" |
| Package was “deleted out of thin air” | Package placed in npm/npx cache directory, cleaned by GC | Place it in /root/.dsh/profiles/node_modules/ (profile’s own directory) |
Among these, “package must be placed in the profile’s own directory” and “exports must retain the . entry” are the most common pitfalls during manual installation. It is recommended to verify these points before proceeding.
Applicable Scenarios and Notes¶
The user profile this plugin is suitable for is clear: developers who use the OpenClaw standalone gateway to serve Feishu bots while keeping the dsh web page open daily. It does not change where the conversation takes place—you chat as usual in Feishu. It is only responsible for making the records visible and reviewable on the web page.
Two reminders before installation:
-
The plugin runs with the permissions of the current dsh process. Check the source code and license before installing. The license for this project is MIT, and the repository is public, so you can review
lib/index.jsandlib/client.jsdirectly; -
When installing manually, strictly place the package according to the paths above to avoid being cleaned up by GC or causing startup errors.
Conclusion¶
dsh-plugin-feishu-chat does something simple: it mirrors the disk-written session files from the OpenClaw standalone gateway to the dsh web page via a same-origin route, equipped with an auto-refresh panel. It embodies the DSH philosophy of “everything is a plugin”—filling gaps in page capabilities with a client-side plugin.
- Directory Page: https://www.skillhub.cn/plugins/scubiry-glitch/dsh-plugin-feishu-chat
- GitHub: https://github.com/scubiry-glitch/dsh-plugin-feishu-chat
It should be noted that skillhub.cn is an independent community plugin directory and has no official affiliation with DeepSeek / Huafan.