When developing an Agent in the DeepSeek Harness (DSH) environment, accessing mp.weixin.qq.com directly often encounters issues such as dynamic rendering, anti-scraping, or content truncation. The dsh-wx-archive plugin is maintained by opencamel and is designed to provide Agents with a stable capability for archiving and reading the full text of WeChat Official Account articles. The plugin integrates with the 2100laike WeChat archive service and can return article content in Markdown format.
Core Features¶
The plugin mainly provides the following capabilities:
- Archiving and Reading: Supports archiving and full-text reading of WeChat Official Account articles.
- Automatic Deduplication: If an article has already been archived on the server, the latest full text is returned directly, without consuming quota.
- Automatic Archiving: When an unarchived article is encountered, an archive task is automatically submitted, and the full Markdown is returned after crawling completes.
- Version Control: Supports forcing a refresh of modified articles via the
refresh: trueparameter. - Image Handling: Images are transferred to a CDN to prevent broken links, and deletion of the original article does not affect archived content.
Installation¶
Installing the plugin requires specifying the target environment with --profile. Plugins are installed per profile, so Web GUI and Headless CLI each need to be installed once.
# Web GUI 用户
dsh plugin --profile web add github:opencamel/dsh-wx-archive#v0.1.3
# 纯 CLI 用户
dsh plugin --profile headless add github:opencamel/dsh-wx-archive#v0.1.3
After installation, the dsh process must be restarted for the changes to take effect. If the plugin is installed while the GUI is running, the tool will not appear in the current session; exit and restart it.
Configuration¶
The plugin is configured via cordis.patch.yml. The file path is located at ~/.dsh/profiles/<name>/cordis.patch.yml (for example, the web profile corresponds to ~/.dsh/profiles/web/cordis.patch.yml).
Configuration changes take effect without a restart, but plugin installation/uninstallation still requires a restart.
- insert:
- id: dsh-wx-archive
name: dsh-wx-archive
config:
apiBaseUrl: 'https://api.2100laike.com'
token: '' # 可选 PAT,提升额度
waitTimeoutSec: 60 # 新文章等待抓取完成的轮询上限(秒)
pollIntervalSec: 2 # 轮询间隔(秒)
maxContentChars: 30000 # 返回正文最大字符数,超出截断
Quota Management¶
- Anonymous use: 8 times per day per plugin instance; the counter resets after a restart.
- After registering a PAT: Quota increases to 100 times per day. The registration address is app.2100laike.com/register.
- Permissions: After registration, logging in to the web interface increases the quota; to use a PAT, create one in developer settings, with at least the
api:writescope.
Usage¶
When an Agent encounters an mp.weixin.qq.com link, it should call the wx_archive tool.
- Basic call:
# 调用工具 wx_archive(url)
wx_archive(url="https://mp.weixin.qq.com/s/...")
- Force refresh:
# 使用 refresh: true 强制重抓被修改过的文章
wx_archive(url="https://mp.weixin.qq.com/s/...", refresh=True)
Notes¶
- Link requirements: Temporary WeChat share links (signed links) are not supported. You must use permanent links
https://mp.weixin.qq.com/s/.... - Runtime dependencies: It only depends on the official
@deepseek-ai/*packages, does not useevalorchild_process, does not read local credentials, environment variables, or sensitive paths, and has no telemetry behavior. - Configuration item:
maxContentCharshas a minimum of 1000; values below 1000 are treated as 1000.
Ecosystem Background¶
DeepSeek Harness (DSH) adopts the “everything is a plugin” philosophy. This plugin is a community-maintained project and has no direct affiliation with DeepSeek or High-Flyer.