J
dsh-weixin-media
jshaofa1-svg/dsh-weixin-media
Send WeChat iLink images, files, videos, and text with persistent fresh context_token tracking and inbound auto-ack status replies without patching ds-bot.
インストール
dsh plugin --profile web add github:jshaofa1-svg/dsh-weixin-mediaREADME
dsh-weixin-media
A standalone DeepSeek Harness (DSH) plugin that enables Bots to send images, files (Excel/PDF/Word/archives), videos, and text over WeChat iLink, while automatically capturing and persisting fresh inbound context_tokens.
Because it runs as an independent DSH plugin rather than patching ds-bot, upgrading ds-bot will never overwrite your WeChat media sending capability.
Features
- Zero duplicate configuration: Automatically reuses WeChat iLink connections and bot tokens managed by
ds-bot(~/.dsh/bot/state.json&~/.dsh/bot/secrets.json). - Fresh
context_tokenpersistence: Watches~/.dsh/bot/im/im_*.jsonand persists newly refreshed inboundcontext_tokens (with timestamps and send health state) into~/.dsh/weixin-media/context-tokens.json(0600), survivingds-botruntime resets. - Instant inbound status auto-ack: Automatically triggers WeChat typing indicator (
sendtyping) and replies with a configurable status message (default:收到,正在思考中…) when a new inbound WeChat message arrives, with anti-spam cooldown (cooldownMs) and silent-bot exclusions (excludeBots/excludeImIds, hot-configurable via~/.dsh/weixin-media/auto-ack.json). - Full iLink media upload & send: AES-128-ECB encryption →
ilink/bot/getuploadurl→ WeChat CDN upload →ilink/bot/sendmessageforimage_item,file_item,video_item, andtext_item. - Actionable diagnostics: Clearly distinguishes
ret=-2(expiredcontext_token) anderrcode=-14(expired QR session).
Registered Tools
weixin_send_media: Send an image, file, video, or text message to a paired WeChat user. Automatically resolves the calling Bot's WeChat connection (or specifybot_name/im_id).weixin_im_status: Inspect all configured WeChat iLink connections,context_tokenfreshness/age, and optionally run a read-onlygetconfighealth probe (probe: true).
Install
Via DSH Plugin Market (dsh-market)
Search dsh-weixin-media in DSH Plugin Market and click Install.
Via GitHub Release tarball / repo
Add to your DSH profile package.json:
{
"dependencies": {
"dsh-weixin-media": "github:jshaofa1-svg/dsh-weixin-media"
},
"dsh": {
"profile": {
"bundles": ["dsh-weixin-media"]
}
}
}
Then install dependencies and restart DeepSeek Harness.
License
MIT