dsh-message-gateway 0.1.11 → 0.1.13

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
@@ -21,7 +21,7 @@ A message-platform gateway plugin for the DSH Web GUI: a "Message platforms" ent
21
21
  - **WeCom AI bot persistent bridge**: official SDK WebSocket long connection with exponential backoff reconnect; incoming text messages are injected into an isolated dedicated agent session that wakes the DSH driver; replies stream back as chunks and finalize via `response_url`
22
22
  - **Group-chat @mention stripping**: the leading `@bot-name` is removed before the assistant sees the message
23
23
  - **Slash commands**: `/help` / `/time` / `/status` (Chinese aliases: 帮助/菜单/时间/状态)
24
- - **Enter-chat welcome**: a welcome message is auto-replied when a user enters a single chat for the first time that day
24
+ - **Enter-chat welcome**: optional configuration (`welcomeReply`, defaults to `false` for zero disturbance; when set to `true`, auto-replies a greeting when a user enters single chat for the first time that day)
25
25
  - **Proactive send channel**: `POST /gateway/send` (`{"chatid": "...", "content": "..."}`, single chat = userid, group chat = group id) sends markdown messages as the bot
26
26
  - **Universal proactive push**: `POST /gateway/push` (`{"platform": "...", "target": "...", "content": "...", "title": "optional"}`) pushes text to any platform target for task notifications / other plugins:
27
27
  - `platform` supports `telegram` (target = numeric chatId), `discord` (target = channelId), `wecom-aibot` (target = userid/group id), `email` (target = address, title becomes the subject)
@@ -29,6 +29,7 @@ A message-platform gateway plugin for the DSH Web GUI: a "Message platforms" ent
29
29
  - an unconnected platform returns `bridge not connected`
30
30
  - **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
31
31
  - **Slash commands**: `/help` / `/time` / `/status` / `/stats` (Chinese aliases: 帮助/菜单/时间/状态/统计); `/stats` shows per-bridge connection status and active chat count
32
+ - **Agent push tool** (`send_chat_message`): automatically registers a universal message-pushing tool for DSH agents, allowing AI assistants to proactively send summaries, task results, or alerts to Telegram, Discord, WeCom, or Email directly within conversations
32
33
  - **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))
33
34
  - **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))
34
35
  - **Multilingual**: Chinese / English / Español, following the DSH Web UI language (Spanish browsers auto-switch); defaults to Simplified Chinese
package/README.es.md CHANGED
@@ -21,7 +21,7 @@ Un plugin de pasarela de mensajería para la GUI web de DSH: una entrada "Plataf
21
21
  - **Puente persistente del Bot de IA de WeCom**: conexión larga WebSocket del SDK oficial con reconexión por retroceso exponencial; los mensajes de texto entrantes se inyectan en una sesión de agente dedicada y aislada que despierta al controlador de DSH; las respuestas se transmiten como fragmentos y finalizan vía `response_url`
22
22
  - **Eliminación de menciones @ en grupos**: se quita el `@nombre-del-bot` inicial antes de que el asistente vea el mensaje
23
23
  - **Comandos de barra**: `/help` / `/time` / `/status` (alias en chino: 帮助/菜单/时间/状态)
24
- - **Mensaje de bienvenida**: se responde automáticamente un saludo cuando un usuario entra a un chat individual por primera vez ese día
24
+ - **Mensaje de bienvenida**: configuración opcional (`welcomeReply`, por defecto `false` para cero interrupciones; al activarse en `true`, responde un saludo cuando un usuario entra al chat individual por primera vez ese día)
25
25
  - **Canal de envío proactivo**: `POST /gateway/send` (`{"chatid": "...", "content": "..."}`, chat individual = userid, grupo = id de grupo) envía mensajes markdown como el bot
26
26
  - **Push proactivo universal**: `POST /gateway/push` (`{"platform": "...", "target": "...", "content": "...", "title": "opcional"}`) envía texto a cualquier plataforma para notificaciones de tareas / otros plugins:
27
27
  - `platform` admite `telegram` (target = chatId numérico), `discord` (target = channelId), `wecom-aibot` (target = userid/id de grupo), `email` (target = correo, title como asunto)
@@ -29,6 +29,7 @@ Un plugin de pasarela de mensajería para la GUI web de DSH: una entrada "Plataf
29
29
  - una plataforma no conectada devuelve `bridge not connected`
30
30
  - **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
31
31
  - **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
32
+ - **Herramienta de push para agentes** (`send_chat_message`): registra automáticamente una herramienta de envío de mensajes para los agentes de DSH, permitiendo que el asistente envíe resúmenes, resultados o alertas a Telegram, Discord, WeCom o Email directamente desde la conversación
32
33
  - **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))
33
34
  - **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))
34
35
  - **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/README.md CHANGED
@@ -21,7 +21,7 @@ DSH Web GUI 的消息平台网关插件:在侧边栏「新会话」按钮下
21
21
  - **企业微信智能机器人常驻桥**:官方 SDK WebSocket 长连接,断线自动指数退避重连;收到文本消息 → 注入隔离的专用 agent 会话唤醒 DSH 驱动 → 回复按 chunk 流式回发,结束时经 response_url 定稿
22
22
  - **群聊 @提及剥离**:去掉开头的 @机器人名后交给助手
23
23
  - **斜杠命令**:`/help` / `/time` / `/status`(含中文别名:帮助/菜单/时间/状态)
24
- - **进入会话欢迎语**:用户当天首次进入单聊时自动回复欢迎消息
24
+ - **进入会话欢迎语**:可选配置(配置项 `welcomeReply`,默认 `false` 保持免打扰,开启后用户当天首次进入单聊自动回复欢迎词)
25
25
  - **主动发送通道**:`POST /gateway/send`(`{"chatid": "...", "content": "..."}`,单聊=userid,群聊=群 ID)以机器人身份主动发送 markdown 消息
26
26
  - **通用主动推送**:`POST /gateway/push`(`{"platform": "...", "target": "...", "content": "...", "title": "可选"}`)向任意平台目标推送文本,供定时任务通知 / 其他插件调用:
27
27
  - `platform` 支持:`telegram`(target=chatId 数字)、`discord`(target=channelId)、`wecom-aibot`(target=userid/群ID)、`email`(target=收件地址,title 作邮件主题)
@@ -29,6 +29,7 @@ DSH Web GUI 的消息平台网关插件:在侧边栏「新会话」按钮下
29
29
  - 未连接的平台返回 `bridge not connected`
30
30
  - **消息路由规则**(插件配置 `routes`):按「平台 + 关键词前缀」把消息路由到指定 **agent 预设**(独立会话)与可选**专用模型 / skill**。例如配置 `{ id: "code", matchPlatform: "telegram", matchPrefix: "code ", agentPreset: "code" }` 后,Telegram 里发 `code 帮我写个函数` 会进入 code 预设的独立会话。按顺序匹配第一条命中;未命中走默认 agent
31
31
  - **斜杠命令**:`/help` / `/time` / `/status` / `/stats`(含中文别名:帮助/菜单/时间/状态/统计);`/stats` 展示各平台桥连接状态与活跃会话数
32
+ - **Agent 主动推送工具**(`send_chat_message`):自动向 DSH 注册通用推送工具,AI 助手在对话中可自主调用该工具将总结、任务结果或告警推送至 Telegram、Discord、企业微信或 Email
32
33
  - **Webhook 接收端点**:`POST /gateway/webhook/in` 接收外部系统消息(`text` / `content` / `message` 任一字段),注入专用 agent 会话并同步返回完整回复;可配置 HMAC-SHA256 签名密钥校验(契约见 [docs/webhooks.md](docs/webhooks.md))
33
34
  - **微信个人号(可选外部网关)**:对接本机 Wechaty HTTP 网关的扫码登录与状态轮询(契约见 [docs/wechaty-gateway.md](docs/wechaty-gateway.md))
34
35
  - **多语言**:中文 / English / Español,自动跟随 DSH Web 界面语言(西班牙语浏览器自动切换),默认简体中文