Passer au contenu principal
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.

Installer

dsh plugin --profile web add github:jshaofa1-svg/dsh-weixin-media

README

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_token persistence: Watches ~/.dsh/bot/im/im_*.json and persists newly refreshed inbound context_tokens (with timestamps and send health state) into ~/.dsh/weixin-media/context-tokens.json (0600), surviving ds-bot runtime 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/sendmessage for image_item, file_item, video_item, and text_item.
  • Actionable diagnostics: Clearly distinguishes ret=-2 (expired context_token) and errcode=-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 specify bot_name / im_id).
  • weixin_im_status: Inspect all configured WeChat iLink connections, context_token freshness/age, and optionally run a read-only getconfig health 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

Plugins associés