@rezti/dsh-rez-wechat 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/lib/index.js +7 -10
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { WeixinChannel } from './channel.js';
2
2
  export const name = 'rez-wechat';
3
- export const inject = ['systemPrompt'];
3
+ export const inject = ['systemPrompt', 'webServer'];
4
4
  const GUIDANCE = [
5
5
  '企业微信群发送走官方 dsh-mcp-client + wecom-mcp(mcp__wechat__*),密钥 REZ_WECHAT_WEBHOOK。',
6
6
  '个人微信是 QClaw 同款 ClawBot 通道:在 Rez 面板「微信」页扫码一次,然后直接在微信里说话,dsh 会自动回。不要再跑 npx weixin-mcp login,也不要调用 mcp__weixin__*。',
@@ -102,14 +102,11 @@ export function apply(ctx) {
102
102
  order: 162,
103
103
  text: GUIDANCE,
104
104
  }), 'dsh-rez-wechat: prompt');
105
- const bag = ctx;
106
- if (bag.webServer !== undefined) {
107
- const routes = weixinRoutes(channel);
108
- ctx.effect(() => {
109
- const disposers = routes.map(route => bag.webServer.register(route));
110
- return () => { for (const dispose of disposers)
111
- dispose(); };
112
- }, 'dsh-rez-wechat: weixin routes');
113
- }
105
+ const routes = weixinRoutes(channel);
106
+ ctx.effect(() => {
107
+ const disposers = routes.map(route => ctx.webServer.register(route));
108
+ return () => { for (const dispose of disposers)
109
+ dispose(); };
110
+ }, 'dsh-rez-wechat: weixin routes');
114
111
  ctx.effect(() => () => { channel.dispose(); }, 'dsh-rez-wechat: weixin channel');
115
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rezti/dsh-rez-wechat",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "ReZ-TI WeChat/WeCom bridges. Personal WeChat is QClaw/ClawBot scan-and-chat via dsh-wechat-bridge; WeCom group send uses wecom-mcp.",
5
5
  "type": "module",
6
6
  "engines": {