dshbase

插件目录 / Knowledge / dsh-im-gateway

dsh-im-gateway

已验证 · 实测可装 jelech

✓ 持续维护 基于 6 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

2Stars
0Forks
0未关闭 issue
JavaScript语言
2026-08-15最近推送
跨平台平台

功能简介

IM网关:桥接消息到DSH会话

我们的评价
可用 — 实测通过,早期项目

IM网关:桥接消息到DSH会话 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-im-gateway

An IM gateway for the DeepSeek Harness: bridge messengers into harness agent sessions and control them with slash commands.

  • WeChat via Tencent's official iLink Bot transport (the same one OpenClaw's @tencent-weixin/openclaw-weixin uses) — QR login, long-poll, no public endpoint/ngrok required.
  • Slash commands modeled on Hermes Agent's messaging interface: /new, /sessions, /status, /model, …
  • One agent session per peer: every IM contact gets its own harness agent (same model, tools, workspace), so conversations have memory and stay isolated.

Architecture

IM (WeChat iLink)
      │  QR login + long-poll (native fetch)
      ▼
dsh-im-gateway (host plugin, one per process)
   ├── channel registry        lib/channels/wechat-ilink.js   ← transport adapters
   ├── peer → session map      lib/gateway.js                 ← agent lifecycle
   ├── slash commands          lib/commands.js
   └── HTTP bridge             lib/http.js                    ← browser panel
      │
      ▼
harness agents service → agent session → model/tools/workspace

Two halves, per the harness convention:

  • Host (index.js, lib/): the gateway. Runs once per process because the channel token and peer→session map must be shared, not per-session.
  • Client (client.js): an optional browser "IM 网关" settings section (QR login, status, test). Discovered automatically via the package's dsh.client declaration.

Commands

Command Action
/help List commands
/new (or /reset) Archive the current session and start a fresh one
/sessions List current + archived sessions for this peer
/status Show connection, model, and current session
/model [provider:model] Show current model, or switch (provider:model) into a new session

Roadmap: /retry, /undo, /compress, /usage, /personality, /stop (interrupt), and skill invocation.

Install

This is a Cordis plugin package that targets the harness host plane. It declares dsh.bundle, so the official dsh plugin command installs it and composes it automatically — no manual composition edit.

From GitHub (before/without npm publish)

dsh plugin --profile web add github:jelech/dsh-im-gateway

dsh plugin forwards to pnpm add, and github:user/repo is a native pnpm spec. The package's dsh.bundle declaration then joins it to the profile's bundle layers automatically (this package has no prepare/build script, so no allowBuilds step is needed).

From the npm registry (after publishing)

dsh plugin --profile web add dsh-im-gateway

From a local checkout

dsh plugin --profile web add file:/absolute/path/to/dsh-im-gateway

Restart the harness after installing (composition is read at boot). The gateway registers an imGateway service and, if the profile provides webServer, exposes /im-gateway/* plus the settings section.

For a manual install instead of dsh plugin, the equivalent is pnpm add dsh-im-gateway from the profile directory plus merging the insert row in cordis.patch.yml (see cordis.patch.yml in this repo).

Login

  1. Open 设置 → IM 网关 → 扫码登录微信 (browser), or call gateway.login() and scan the QR printed to the host console.
  2. Scan with WeChat and confirm. The token is held in memory for the process lifetime.
  3. Message the bot. Text messages are answered by the harness agent; /-prefixed messages are commands.

Notes & limitations

  • Text only for now. Media (image/voice/file) requires the iLink CDN AES-128-ECB path; it's isolated behind the channel interface and can be added without touching the gateway core.
  • iOS needs WeChat ≈ 8.0.70; Android may prompt for a WeChat update first (iLink requirement).
  • The browser panel renders the login QR locally on the host (via the qrcode npm package, served as SVG from /im-gateway/qrcode) — no third-party QR service and no external network round-trip for the login link.
  • The /im-gateway/* HTTP bridge registers raw routes on the harness web server; if your deployment enforces HTTP auth above the route layer, add it in lib/http.js.

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-im-gateway」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:jelech/dsh-im-gateway

Headless(CLI)profile:

dsh plugin --profile headless add github:jelech/dsh-im-gateway

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

使用场景

给 agent 一套记忆、知识库或检索层,让它不再跨会话丢上下文。

适合谁

跑长项目、想让 agent 记住决策、文档和偏好而不用每次重讲的人。

二次开发建议

记忆/检索后端是缝——插新存储、调蒸馏策略,或加引用与审计轨迹。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Knowledge 里更多

浏览全部 7795 个插件 →