TtTRz/dsh-wecom ↗★ 2

dsh-wecom

dsh-wecom: a WeCom AI Bot channel for DeepSeek Harness — each chat runs a persistent, preset-backed agent over the official long connection. 适合需要在企业微信中部署和运行DSH托管智能体的团队或个人。

패키지
dsh-wecom
호환성
미검증
Harness peer 범위
>=0.1.0-rc.6
Cordis peer 범위
>=4.0.1
버전
0.5.3
라이선스
MIT
최근 업데이트
2026. 9. 28.

같은 패키지 이름의 다른 저장소

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:TtTRz/dsh-wecom

⚙️ Configuration

Tune the mounted row in ~/.dsh/profiles/web/cordis.patch.yml:

- id: wecom-channel
  name: dsh-wecom
  config:
    botId: !!js process.env.WECOM_BOT_ID
    credentialName: WECOM_BOT_SECRET
    namespace: default
    # cwd is optional: defaults to ~/.wecom-sessions (DSH_WECOM_CWD overrides)
    cwd: /data/wecom
    preset: standard
    dmPolicy: open
    dmAllowlist: []
    groupPolicy: allowlist
    groupAllowlist: [wr_your_group_chatid]
    greeting: Hello, I am an assistant.

Multiple bots (one row per bot)

One composition row = one WeCom bot. Mount the same plugin again with a distinct namespace to run a second bot — its own botId/credential, access policy, preset, and model route — in the same process:

- insert:
    - id: wecom-channel-lab
      name: dsh-wecom
      config:
        botId: !!js process.env.WECOM_BOT_ID_2
        credentialName: WECOM_BOT_SECRET_2
        namespace: lab
        preset: standard

Each non-default bot publishes wecomChannelStatus. and stores its routing state in .dsh-wecom-state..json. The default bot uses wecomChannelStatus and .dsh-wecom-state.json. A dashboard can consume these services without designating one bot as the primary UI host.

Configuration reference

FieldDefaultMeaning
cwd~/.wecom-sessionsAgent working directory: WeCom sessions, uploads (.wecom-uploads/), and .dsh-wecom-state.json live here; the sidebar workspace "WeCom" is claimed on it. DSH_WECOM_CWD overrides it. Must be absolute
presetstandardPreset mounted into each conversation agent
provider / modelunsetFixed model route for every WeCom conversation; both must be set together. When unset, new conversations use the harness default selection and resumed conversations inherit their last logged model
dmPolicy / groupPolicyopenopen / allowlist / disabled
dmAllowlist[]Single-chat userid allowlist
groupAllowlist[]Group-chat chatid allowlist
instructionsenterprise-chat guidanceInstruction section layered on the persona every turn
imageModeautoauto attaches images when the model can view them; always / never force it
streamingtrueStream model text token-by-token; false sends only the ack + final answer
streamFlushMs250Cadence (ms) for flushing accumulated streamed text
showReasoningtrueWrap model reasoning in WeCom's native `` card
showToolCallstrueRender a compact tool-call activity list inside the `` card
maxConcurrent4Global cap on concurrent turns
turnTimeoutMs300000No-progress timeout; session events and stream frames reset the deadline
approvalModechatIn-chat sandbox-escalation approvals: chat answers from the chat (reply 批准/拒绝), notify only pushes the ask, off is fully silent (web UI decides)
approvalTimeoutMs300000How long an in-chat approval waits before failing closed (cancelled)
approvalAllowlist[]Userids allowed to answer in-chat approvals; empty admits every admitted sender
approvalHint回复「批准」继续,回复「拒绝」取消。Reply-word hint appended to the pushed approval request

Configuration reference

FieldDefaultMeaning
cwd~/.wecom-sessionsAgent working directory: WeCom sessions, uploads (.wecom-uploads/), and .dsh-wecom-state.json live here; the sidebar workspace "WeCom" is claimed on it. DSH_WECOM_CWD overrides it. Must be absolute
presetstandardPreset mounted into each conversation agent
provider / modelunsetFixed model route for every WeCom conversation; both must be set together. When unset, new conversations use the harness default selection and resumed conversations inherit their last logged model
dmPolicy / groupPolicyopenopen / allowlist / disabled
dmAllowlist[]Single-chat userid allowlist
groupAllowlist[]Group-chat chatid allowlist
instructionsenterprise-chat guidanceInstruction section layered on the persona every turn
imageModeautoauto attaches images when the model can view them; always / never force it
streamingtrueStream model text token-by-token; false sends only the ack + final answer
streamFlushMs250Cadence (ms) for flushing accumulated streamed text
showReasoningtrueWrap model reasoning in WeCom's native `` card
showToolCallstrueRender a compact tool-call activity list inside the `` card
maxConcurrent4Global cap on concurrent turns
turnTimeoutMs300000No-progress timeout; session events and stream frames reset the deadline
approvalModechatIn-chat sandbox-escalation approvals: chat answers from the chat (reply 批准/拒绝), notify only pushes the ask, off is fully silent (web UI decides)
approvalTimeoutMs300000How long an in-chat approval waits before failing closed (cancelled)
approvalAllowlist[]Userids allowed to answer in-chat approvals; empty admits every admitted sender
approvalHint回复「批准」继续,回复「拒绝」取消。Reply-word hint appended to the pushed approval request