@tencent-weixin/openclaw-weixin 2.1.6 → 2.1.7
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/CHANGELOG.md +11 -0
- package/CHANGELOG.zh_CN.md +11 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/src/channel.ts +9 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
This project follows the [Keep a Changelog](https://keepachangelog.com/) format.
|
|
6
6
|
|
|
7
|
+
## [2.1.7] - 2026-04-07
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **Plugin registration re-entrance:** Lazy-import `monitorWeixinProvider` inside `startAccount` in `channel.ts` to avoid pulling in the monitor → process-message → command-auth chain at plugin registration time, which could re-enter the plugin/provider registry before the account starts.
|
|
12
|
+
- **Initialization side effect:** Lazy-import `resolveSenderCommandAuthorizationWithRuntime` / `resolveDirectDmAuthorizationOutcome` in `process-message.ts` to prevent `ensureContextWindowCacheLoaded` from being triggered during module initialization, which caused `loadOpenClawPlugins` re-entrance.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **Tool-call outbound path:** `sendWeixinOutbound` now applies `StreamingMarkdownFilter` to the outbound text, consistent with the model-output path in `process-message`.
|
|
17
|
+
|
|
7
18
|
## [2.1.4] - 2026-04-03
|
|
8
19
|
|
|
9
20
|
### Changed
|
package/CHANGELOG.zh_CN.md
CHANGED
|
@@ -4,6 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
本项目遵循 [Keep a Changelog](https://keepachangelog.com/) 格式。
|
|
6
6
|
|
|
7
|
+
## [2.1.7] - 2026-04-07
|
|
8
|
+
|
|
9
|
+
### 修复
|
|
10
|
+
|
|
11
|
+
- **插件注册重入:** `channel.ts` 中将 `monitorWeixinProvider` 改为在 `startAccount` 内部懒加载(`await import(...)`),避免插件注册阶段提前拉取 monitor → process-message → command-auth 依赖链,导致 plugin/provider registry 重入。
|
|
12
|
+
- **初始化副作用:** `process-message.ts` 中将 `resolveSenderCommandAuthorizationWithRuntime` / `resolveDirectDmAuthorizationOutcome` 改为懒加载,避免模块初始化时触发宿主的 `ensureContextWindowCacheLoaded` 副作用,进而导致 `loadOpenClawPlugins` 重入。
|
|
13
|
+
|
|
14
|
+
### 变更
|
|
15
|
+
|
|
16
|
+
- **tool-call 外发路径:** `sendWeixinOutbound` 现在对发送文本应用 `StreamingMarkdownFilter`,与 `process-message` 中的 model-output 路径保持一致。
|
|
17
|
+
|
|
7
18
|
## [2.1.4] - 2026-04-03
|
|
8
19
|
|
|
9
20
|
### 变更
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
package/src/channel.ts
CHANGED
|
@@ -24,9 +24,11 @@ import {
|
|
|
24
24
|
waitForWeixinLogin,
|
|
25
25
|
} from "./auth/login-qr.js";
|
|
26
26
|
import type { WeixinQrStartResult, WeixinQrWaitResult } from "./auth/login-qr.js";
|
|
27
|
-
|
|
27
|
+
// Lazy-imported inside startAccount to avoid pulling in the monitor -> process-message ->
|
|
28
|
+
// command-auth chain during plugin registration, which can re-enter plugin/provider registry
|
|
29
|
+
// resolution before the account actually starts.
|
|
28
30
|
import { sendWeixinMediaFile } from "./messaging/send-media.js";
|
|
29
|
-
import { sendMessageWeixin } from "./messaging/send.js";
|
|
31
|
+
import { sendMessageWeixin, StreamingMarkdownFilter } from "./messaging/send.js";
|
|
30
32
|
import { downloadRemoteImageToTemp } from "./cdn/upload.js";
|
|
31
33
|
|
|
32
34
|
/** Returns true when mediaUrl refers to a local filesystem path (absolute or relative). */
|
|
@@ -119,7 +121,10 @@ async function sendWeixinOutbound(params: {
|
|
|
119
121
|
if (!params.contextToken) {
|
|
120
122
|
aLog.warn(`sendWeixinOutbound: contextToken missing for to=${params.to}, sending without context`);
|
|
121
123
|
}
|
|
122
|
-
const
|
|
124
|
+
const f = new StreamingMarkdownFilter();
|
|
125
|
+
const rawText = params.text ?? "";
|
|
126
|
+
const filteredText = f.feed(rawText) + f.flush();
|
|
127
|
+
const result = await sendMessageWeixin({ to: params.to, text: filteredText, opts: {
|
|
123
128
|
baseUrl: account.baseUrl,
|
|
124
129
|
token: account.token,
|
|
125
130
|
contextToken: params.contextToken,
|
|
@@ -383,6 +388,7 @@ export const weixinPlugin: ChannelPlugin<ResolvedWeixinAccount> = {
|
|
|
383
388
|
const logPath = aLog.getLogFilePath();
|
|
384
389
|
ctx.log?.info?.(`[${account.accountId}] weixin logs: ${logPath}`);
|
|
385
390
|
|
|
391
|
+
const { monitorWeixinProvider } = await import("./monitor/monitor.js");
|
|
386
392
|
return monitorWeixinProvider({
|
|
387
393
|
baseUrl: account.baseUrl,
|
|
388
394
|
cdnBaseUrl: account.cdnBaseUrl,
|