dsh-message-gateway 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -22,6 +22,12 @@ A message-platform gateway plugin for the DSH Web GUI: a "Message platforms" ent
22
22
  - **Slash commands**: `/help` / `/time` / `/status` (Chinese aliases: 帮助/菜单/时间/状态)
23
23
  - **Enter-chat welcome**: a welcome message is auto-replied when a user enters a single chat for the first time that day
24
24
  - **Proactive send channel**: `POST /gateway/send` (`{"chatid": "...", "content": "..."}`, single chat = userid, group chat = group id) sends markdown messages as the bot
25
+ - **Universal proactive push**: `POST /gateway/push` (`{"platform": "...", "target": "...", "content": "...", "title": "optional"}`) pushes text to any platform target for task notifications / other plugins:
26
+ - `platform` supports `telegram` (target = numeric chatId), `discord` (target = channelId), `wecom-aibot` (target = userid/group id), `email` (target = address, title becomes the subject)
27
+ - QQ has no active push since 2025-04-21 (passive replies only); calling it returns a clear error
28
+ - an unconnected platform returns `bridge not connected`
29
+ - **Message routing rules** (plugin config `routes`): route messages by "platform + keyword prefix" to a specific **agent preset** (isolated session) with an optional **dedicated model / skill**. E.g. `{ id: "code", matchPlatform: "telegram", matchPrefix: "code ", agentPreset: "code" }` makes `code write a function` on Telegram enter a code-preset session. First matching rule wins; unmatched messages use the default agent
30
+ - **Slash commands**: `/help` / `/time` / `/status` / `/stats` (Chinese aliases: 帮助/菜单/时间/状态/统计); `/stats` shows per-bridge connection status and active chat count
25
31
  - **Webhook receive endpoint**: `POST /gateway/webhook/in` accepts messages from external systems (any of `text` / `content` / `message`), injects them into the dedicated agent session and returns the full reply synchronously; an optional HMAC-SHA256 signing secret validates requests (contract: [docs/webhooks.md](docs/webhooks.md))
26
32
  - **WeChat personal accounts (optional external gateway)**: QR login and status polling against a local Wechaty HTTP gateway (contract: [docs/wechaty-gateway.md](docs/wechaty-gateway.md))
27
33
  - **Multilingual**: Chinese / English / Español, following the DSH Web UI language (Spanish browsers auto-switch); defaults to Simplified Chinese
package/README.es.md CHANGED
@@ -22,6 +22,12 @@ Un plugin de pasarela de mensajería para la GUI web de DSH: una entrada "Plataf
22
22
  - **Comandos de barra**: `/help` / `/time` / `/status` (alias en chino: 帮助/菜单/时间/状态)
23
23
  - **Mensaje de bienvenida**: se responde automáticamente un saludo cuando un usuario entra a un chat individual por primera vez ese día
24
24
  - **Canal de envío proactivo**: `POST /gateway/send` (`{"chatid": "...", "content": "..."}`, chat individual = userid, grupo = id de grupo) envía mensajes markdown como el bot
25
+ - **Push proactivo universal**: `POST /gateway/push` (`{"platform": "...", "target": "...", "content": "...", "title": "opcional"}`) envía texto a cualquier plataforma para notificaciones de tareas / otros plugins:
26
+ - `platform` admite `telegram` (target = chatId numérico), `discord` (target = channelId), `wecom-aibot` (target = userid/id de grupo), `email` (target = correo, title como asunto)
27
+ - QQ no admite push activo desde el 2025-04-21 (solo respuestas pasivas); devuelve un error claro
28
+ - una plataforma no conectada devuelve `bridge not connected`
29
+ - **Reglas de enrutado de mensajes** (configuración del plugin `routes`): enruta mensajes por "plataforma + prefijo de palabra clave" a un **preset de agente** específico (sesión aislada) con un **modelo / skill** opcional. Ej.: `{ id: "code", matchPlatform: "telegram", matchPrefix: "code ", agentPreset: "code" }` hace que `code escribe una función` en Telegram entre en una sesión de preset code. Gana la primera regla que coincida; los mensajes sin coincidencia usan el agente por defecto
30
+ - **Comandos de barra**: `/help` / `/time` / `/status` / `/stats` (alias en chino: 帮助/菜单/时间/状态/统计); `/stats` muestra el estado de conexión de cada puente y el número de chats activos
25
31
  - **Endpoint de recepción de webhooks**: `POST /gateway/webhook/in` acepta mensajes de sistemas externos (cualquiera de `text` / `content` / `message`), los inyecta en la sesión de agente dedicada y devuelve la respuesta completa de forma síncrona; un secreto de firma HMAC-SHA256 opcional valida las peticiones (contrato: [docs/webhooks.md](docs/webhooks.md))
26
32
  - **Cuentas personales de WeChat (pasarela externa opcional)**: inicio de sesión por QR y sondeo de estado contra una pasarela HTTP Wechaty local (contrato: [docs/wechaty-gateway.md](docs/wechaty-gateway.md))
27
33
  - **Multilingüe**: chino / inglés / español, siguiendo el idioma de la interfaz web de DSH (los navegadores en español cambian automáticamente); por defecto chino simplificado
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-message-gateway",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Universal message-platform gateway for the DSH web GUI: configure QQ / WeChat / WeCom / WeCom AI bot / Discord / Telegram / WhatsApp / Email / Webhooks connectors, save credentials, test connections, and run a persistent WeCom AI bot bridge with per-chat sessions and auto context compression, same as the web conversation.",
5
5
  "license": "MIT",
6
6
  "author": "Jaden Tang <jaden.tang@sjfood.com>",