DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-superagent-multi-channel

d

dsh-superagent-multi-channel

Manifest valid★ 2

DSH Multi-channel Superagent: supports GitLab, Yunxiao Projex, WeChat, DingTalk and WeCom, multiple instances per channel|DSH Multi-channel Superagent: integrates with GitLab, Yunxiao Projex, WeChat, DingTalk and WeCom, with multiple instances supported per channel

UI (client)hasBundlePatch

dsh-superagent multi-channel

Language: English · 中文

A DSH plugin that wires Feishu, GitHub, WeChat, WeCom, DingTalk and Alibaba Cloud Yunxiao Projex into one assess → ticket → execute → reply loop.

Version 2.5.3 · 109 test files / 1,675 passing · MIT · installs beside the official dsh-superagent

An extension of the official open-source superagent: the two official sources (Feishu, GitHub) stay as they are, and WeChat, WeCom, DingTalk and Yunxiao Projex are added and aligned to the same capability surface (reception scope, authorization list, thread context, worker reads, search, label refresh, reply and status write-back). See the capability matrix.

Architecture: one loop, six sources


In one sentence

Someone mentions the bot or messages it on any of six channels → the plugin reads the context under the policy and decides whether to take it → an isolated executor session works in its own directory → the result goes back to the same thread, and a work item's board status can follow along.

The life of one message

Lifecycle

  • Trigger — all six sources produce one Trigger shape (thread, sender, structured @, native id).
  • Assess — the policy names "who may originate work" and "what counts as addressed"; the model reads the thread and answers accept / observe / refuse, recording the evidence strength.
  • Ticket — one ticket binds one source thread; later messages arrive as inputs for the executor.
  • Execute — the executor session sees only its ticket's scope, works in its own directory/branch, delivers with orchestrator_report.
  • Reply & write back — the reply lands in the original thread (comment/message, idempotency-marked); a work item's status can move to "in progress" and "done". Everything is in the local stateDir; a person can take over at any step.

Three real scenarios

  1. A Yunxiao defect — someone @-mentions the bot on a work item ("login 502 intermittently") → the assessment reads the item and its comments → a ticket opens → the executor fixes it in an isolated directory → the result is a comment, and the board moves from "in progress" to "to test".
  2. A WeChat ops group — "@bot can you check the expiring certificate?" → the reply goes only into that thread.
  3. A WeCom direct message — "change this copy" → the reply returns to the same conversation, split into ordered parts, with a file delivered as a comment/link when needed.

What decides it becomes work?

Gates and assessment

Four gates (enabled source → allowed list → structured mention → assessment). Failing any one only observes the message: no ticket, no reply, no remote change.

Feature checklist

StageWhat exists
Receivesix sources normalised to one Trigger; groups/DMs; structured @; optional images; dedupe by platform id
Authorizeper-source "who may originate work" + admission table (listed/unlisted × @/un-@/DM)
Assessrule switches, mode (off/observe/auto), deadline, model and effort; every decision records strength and evidence
Ticketone ticket per thread; inputs delivered any time; interruptible, supplementable, human-takeover
Executeisolated executor session and directory/branch; structured report; files returned
Replyback to the original thread; idempotent marker; optional work-item status write-back; visible retries
Read originalsper-source worker resources, read-only
Paneloverview/sources/triggers/assessment/execution/settings/prompts/deployment; prompts and six skills overridable
Securitylocal state, 0600 secrets, reply-only, platform limits stated

Six sources, one panel

Six sources

SourceReceptionHighlights
Feishu (official)history pollingtopic/reply chains, AppLink deep links, images, worker reads feishu/<id>/…
GitHub (official)notification pollingissue/PR context, gh for code, PR/issue links
WeChat (added)sidecar polling (two profiles: personal iLink / team replica)structured @, voice transcripts, downloadable images, worker reads weixin/<id>/message·thread·around, post-reattach catch-up; personal (default) = iLink single-chat assistant, team = Windows dev-group replica (group trigger, history/roster, text/file/@ send)
WeCom (added)signed callback (plugin mounts /wecom/<instance>)@ judgement, inbound images, contact-list names, worker reads wecom/<id>/message
DingTalk (added)Stream (deployment injects the SDK connection)staffId @, Markdown 5000, worker reads dingtalk/<id>/message
Yunxiao Projex (added)work-item pollingrequirement/bug/task + comments, status write-back, attachment comments, worker reads projex/<id>/item·comments

Capability comparison (against Feishu and GitHub)

Feishu and GitHub are the two Sources the upstream superagent ships; the other four are this bundle's additions. ✅ present · ➖ not applicable · ❌ impossible on the backend (stated, never faked).

CapabilityFeishu (official)GitHub (official)WeChatWeComDingTalkYunxiao Projex
Receive messages✅ poll history + events✅ poll notifications✅ sidecar poll✅ signed callback (plugin mounts /wecom/<instance>)✅ stream (needs a connect injected; no SDK shipped)✅ poll work items/comments
Assess / decide / execute / reply loop✅✅✅✅✅✅
Structured @ judgement✅ open_id➖✅ ats (markup fallback, strength in facts)✅ mentionsAgent✅ ats staffId➖
Direct messages✅➖✅✅✅➖
Outbound text✅ markdown✅ comment✅ + mention-back✅ plain 2048✅ markdown 5000✅ RICHTEXT/Markdown comment
Outbound files➖ (CLI)➖✅ sendFiles❌ API text only➖ (webhook)✅ attachments
Idempotent send✅ keyed✅ marker✅ keyed❌ none (stated)❌ none (stated)✅ marker
Thread context for the assessment✅ thread/root/parent✅ PR/issue✅ thread/parent; root→no_root✅ thread; root/parent→no_*✅ thread; root/parent→no_*✅ item body + comments
Worker reads of the original✅ feishu/<t>/…✅ github/<t>/…✅ weixin/<t>/…✅ wecom/<t>/message✅ dingtalk/<t>/message✅ projex/<t>/item, /comments
Inbound images for the assessment✅➖✅ [image:<id>], /media✅ MediaId, /cgi-bin/media/get➖ (text stream)✅ item/comment images archived
Panel search✅ message id✅ issue/PR number✅ native id✅ decimal MsgId✅ msgId✅ serial or page URL
Reply→parent mapping✅✅✅ (quote id)➖ no quote in callback➖➖
Display-name refresh✅ chat names✅ repo names✅ rooms/members✅ department users (refreshLabels)❌ needs contact permission API, not offered✅ status vocabulary
Member/roster sync into Policy✅ chat members✅ collaborators✅ group members❌ group members unreadable; user list only fills names❌ same✅ project members
Health entriesfeishu + historygithubweixinwecomdingtalkprojex
History backfill✅ chat history✅ notifications✅ post re-attach catch-up (marked historical)❌ callback only❌ stream only✅ first-sight comments
Message deep link✅ AppLink✅ issue/PR URL❌❌❌✅ item page
Multiple instances✅✅✅✅✅✅

Platform limits, not bugs: WeChat/WeCom/DingTalk have no per-message deep link; WeCom and DingTalk have no history to backfill (callback/stream only); DingTalk needs an injected connect() (src/sources/dingtalk-watch.ts); WeCom/DingTalk cannot enumerate chat members; DingTalk stream events carry text, so no image is claimed.

WeChat's two profiles (personal / team)

One WeChat source serves two profiles behind the frozen contract; the Node side only knows the contract, so switching profile means switching the sidecar and the panel's URL/launcher. The default profile is personal:

ProfilePortBackendOSCostGroups / @MembersHistorySendDefault use
personal (default)9300weixin-ilink-bridge (ilink / Tencent iLink)any OSfreeDMs only; no groups, no @observedrealtime onlytextpersonal assistant / remote control / self-dispatched tasks
team8788weixin-db-bridge (pc-db / wechatauto, needs wechatauto-replica)Windows only (WeChat 4.1.12+)freegroups + DMs (DB-triggered group messages); inbound @ undetectablefull rosterfull DBread-only by default; --profile team enables text/file/group-@ (UIA)dev-group replica: group trigger, history/roster, text/file/@
  • Default policy: personal iLink is the default (free, cross-OS, DMs only, self-dispatched tasks); team uses replica for Windows dev groups (DB-triggered group messages, full history/roster, sends text/file/group-@ with --profile team). team needs wechatauto-replica installed and WeChat 4.1.12+; no voice, no Moments, no friends/create-group. The release ships only these two backends and two launchers — wxautox4 / gate-guard are not bundled by default, and licensing of any optional wxautox4 backend is the deployer's responsibility.
  • Coexistence: ilink has no UI dependency and read-only pc-db does not touch the desktop UI, so either can run without driving the interface; team's send path (UIA/OCR) does drive it, so one UI-automation client per account; only one instance may hold the account login/decryption keys at a time, and ilink is a Bot identity that cannot double-send to the same conversation as a desktop client.
  • 4.1.12.55 finding: this build turns the WeChat 4.x Qt accessibility gate off by default (the mmui tree is not materialised on a cold start). wechatauto ships hot activation, so team's replica DB read passes fully on 4.1.12.55 and can go to production (its --profile team send uses UIA/OCR); personal's ilink is client-version independent. See the compat-4.1.12.55 report and sidecar/README.

Choosing a backend (either one is enough)

Pick personal or team in the source card — either profile alone gives you a working WeChat channel; you do not run both. The card already carries what each profile needs:

  • Defaults are filled in. baseUrl follows the profile automatically (http://127.0.0.1:9300 for personal, http://127.0.0.1:8788 for team); timeoutSeconds is 180 s (the team send path drives the desktop UI and is slower); pollSeconds is 5 s. You rarely type anything, and every value can still be changed.
  • team wants WeChat 4.1.12.55. With team selected the card shows an Install WeChat 4.1.12.55 button; clicking it opens https://github.com/Rodert/wechat-win-versions/releases/tag/v4.1.12.55 in the browser.
  • A busy port is not a problem. If the chosen port is taken, the bridge starts on a free OS-assigned port; the card's read-only Current bridge address fact shows the actual http://127.0.0.1:<port>, so there is nothing to change by hand.
  • Dead switches are gone. autoReplies, acknowledge, ackText and progressAfterSeconds no longer appear in the panel; canned replies, a pre-assessment receipt and "still working" notes are not part of this channel.

Full background and the "why" live in the capability matrix.

Panel tour

The plugin has its own sidebar entry, "Superagent multi-channel", beside the official one. The screenshots below are real captures; project IDs, token paths, organisation IDs, names and chat names are masked.

Policy and assessment

Yunxiao Projex source card

Prompts

Install and first run

Install flow

  1. Install the bundle from the plugin manager (directory, npm package or tarball), or from the market once listed.
  2. Configure: leave stateDir empty to adopt an existing ~/.dsh/state/superagent (no migration); two superagent installs each need their own directory.
  3. Refresh the web page and open "Superagent multi-channel".
  4. Connect a source: fill its card and use the card's Check / Read action before enabling it.

More in deployment; per-channel steps in EXTENSIONS.md.

Security and boundaries

Security boundaries

  • Reply only: no broadcasts, no group invites, no friend requests.
  • Secrets stay local: tokens/keys live in 0600 files rather than settings; screenshots and logs never print them.
  • Idempotency and dedupe: comments carry a marker, callbacks dedupe by platform message id; WeCom and DingTalk have no server-side idempotency key and say so in facts.
  • No faked platform behaviour: WeChat/WeCom/DingTalk have no message deep link, the two push backends have no history to page, and DingTalk's stream needs an injected SDK connection. See the capability matrix.

FAQ

Does it auto-reply to everyone? No. Only threads the assessment accepted get a reply; a message from an unlisted person is observed at most. Where does data go? Everything stays in the local stateDir; data reaches a platform only when the plugin calls that platform's API to read or reply. Can it run beside the official superagent? Install both, but enable one at a time (a Host accepts one Source kind per id); each keeps its own stateDir. Does upgrading lose data? No. stateDir is unchanged and, since 2.3.0, the agent presets keep the shared ids so old sessions resume. A source receives nothing? See the troubleshooting table in docs/008-cookbook.md: WeCom callback URL and token, DingTalk's injected stream connection, the WeChat bridge /health.

Documentation map

DocumentWhat it coversLength / Audience
docs/README.en-US.mdReading order and the full map (中文:docs/README.md)46 lines · start here
docs/000-philosophy.mdWhy assess → ticket → execute35 lines · everyone, ~10 min
docs/001-domain.mdTrigger / Thread / Ticket / Assignment114 lines · developers, integrators
docs/002-authorization.mdPolicy, allowed lists, addressed detection157 lines · admins, security review
docs/003-execution.mdExecutor sessions, directories, delivery205 lines · developers, operators
docs/004-prompts.mdPrompts and skills98 lines · prompt maintainers
docs/005-panel.en-US.mdThe panel page by page (with screenshots)60 lines · everyday users
docs/006-deployment.mdDeployment, settings, upgrades, coexistence298 lines · deployers, operators
docs/007-architecture.mdArchitecture, module and test tables713 lines · maintainers, contributors (as an index)
docs/008-cookbook.en-US.mdRecipes and troubleshooting51 lines · on-call, troubleshooting
docs/extensions/capability-matrix.mdSix-source comparison and platform limits42 lines · selection, review
docs/extensions/ADR-005 … ADR-012 (each in English and Chinese)40–356 lines each · decision history
docs/gallery.en.htmlIllustrated preview (中文:docs/gallery.html)image pages · demo, review

Develop and test

pnpm typecheck   # tsc --noEmit
pnpm test        # vitest run --maxWorkers=2
pnpm build       # tsdown, eight entries

Latest full regression (2026-11-17, 2.5.1): tsc 0; 103 files passed, 1,674 passed / 27 skipped; tsdown build complete. Two suites fail on macOS only and are unrelated to the plugin's logic: tests/source-actions.spec.ts spawns a Windows .cmd launcher (spawn cmd.exe ENOENT), and tests/weixin-bridge-contract.spec.ts starts the iLink mock server, whose beforeAll times out here. Both fail the same way on 2.5.0.

License

MIT, with the upstream dsh-superagent notices kept. WeChat UI automation is a third-party tool without Tencent's authorization and may break at any time; use it within ADR-005's boundary (reply only when mentioned, no broadcasts, no bulk friend requests, one account online at a time).


Screenshots are real captures with sensitive fields (project/organisation IDs, token paths, names, chat names, session titles) masked; the architecture and lifecycle images are diagrams drawn from the current implementation.

Comments

Loading…