@wecom/wecom-openclaw-plugin 2026.3.20 → 2026.3.24-beta.1

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.
@@ -1,3 +1,3 @@
1
- import { type ChannelPlugin } from "openclaw/plugin-sdk";
1
+ import { type ChannelPlugin } from "openclaw/plugin-sdk/core";
2
2
  import type { ResolvedWeComAccount } from "./utils.js";
3
3
  export declare const wecomPlugin: ChannelPlugin<ResolvedWeComAccount>;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * 负责私聊策略检查、配对流程
5
5
  */
6
- import type { RuntimeEnv } from "openclaw/plugin-sdk";
6
+ import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
7
7
  import type { WSClient, WsFrame } from "@wecom/aibot-node-sdk";
8
8
  import type { ResolvedWeComAccount } from "./utils.js";
9
9
  /**
@@ -3,7 +3,8 @@
3
3
  *
4
4
  * 负责群组策略检查(groupPolicy、群组白名单、群内发送者白名单)
5
5
  */
6
- import type { OpenClawConfig, RuntimeEnv } from "openclaw/plugin-sdk";
6
+ import type { OpenClawConfig } from "openclaw/plugin-sdk/core";
7
+ import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
7
8
  import type { ResolvedWeComAccount } from "./utils.js";
8
9
  /**
9
10
  * 群组策略检查结果
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * 企业微信渠道类型定义
3
3
  */
4
- import type { OpenClawConfig, RuntimeEnv } from "openclaw/plugin-sdk";
4
+ import type { OpenClawConfig } from "openclaw/plugin-sdk/core";
5
+ import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
5
6
  import type { ResolvedWeComAccount } from "./utils.js";
6
7
  import { WeComCommand } from "./const.js";
7
8
  /**
@@ -3,7 +3,8 @@
3
3
  *
4
4
  * 负责下载、检测格式、保存图片到本地,包含超时保护
5
5
  */
6
- import type { OpenClawConfig, RuntimeEnv } from "openclaw/plugin-sdk";
6
+ import type { OpenClawConfig } from "openclaw/plugin-sdk/core";
7
+ import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
7
8
  import type { WSClient } from "@wecom/aibot-node-sdk";
8
9
  import type { ResolvedWeComAccount } from "./utils.js";
9
10
  /**
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * 负责通过 WSClient 发送回复消息,包含超时保护
5
5
  */
6
- import type { RuntimeEnv } from "openclaw/plugin-sdk";
6
+ import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
7
7
  import { type WSClient, type WsFrame } from "@wecom/aibot-node-sdk";
8
8
  /**
9
9
  * 发送企业微信回复消息
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * 企业微信 onboarding adapter for CLI setup wizard.
3
3
  */
4
- import { type ChannelOnboardingAdapter } from "openclaw/plugin-sdk";
5
- export declare const wecomOnboardingAdapter: ChannelOnboardingAdapter;
4
+ import type { ChannelSetupWizardAdapter } from 'openclaw/plugin-sdk/setup';
5
+ export declare const wecomOnboardingAdapter: ChannelSetupWizardAdapter;
@@ -1,27 +1,19 @@
1
1
  /** Store 配置 */
2
2
  interface ReqIdStoreOptions {
3
- /** TTL 毫秒数,超时的 reqId 视为过期(默认 24 小时) */
3
+ /** TTL 毫秒数,超时的 reqId 视为过期(默认 7 天) */
4
4
  ttlMs?: number;
5
5
  /** 内存最大条目数(默认 200) */
6
6
  memoryMaxSize?: number;
7
- /** 磁盘最大条目数(默认 500) */
8
- fileMaxEntries?: number;
9
- /** 磁盘写入防抖时间(毫秒),默认 1000ms */
10
- flushDebounceMs?: number;
11
7
  }
12
8
  export interface PersistentReqIdStore {
13
- /** 设置 chatId 对应的 reqId(写入内存 + 防抖写磁盘) */
9
+ /** 设置 chatId 对应的 reqId(仅写入内存) */
14
10
  set(chatId: string, reqId: string): void;
15
- /** 获取 chatId 对应的 reqId(异步:优先内存,miss 时查磁盘并回填内存) */
11
+ /** 获取 chatId 对应的 reqId(仅内存) */
16
12
  get(chatId: string): Promise<string | undefined>;
17
13
  /** 同步获取 chatId 对应的 reqId(仅内存) */
18
14
  getSync(chatId: string): string | undefined;
19
15
  /** 删除 chatId 对应的 reqId */
20
16
  delete(chatId: string): void;
21
- /** 启动时从磁盘预热内存,返回加载条目数 */
22
- warmup(onError?: (error: unknown) => void): Promise<number>;
23
- /** 立即将内存数据刷写到磁盘(用于优雅退出) */
24
- flush(): Promise<void>;
25
17
  /** 清空内存缓存 */
26
18
  clearMemory(): void;
27
19
  /** 返回内存中的条目数 */
@@ -1,3 +1,3 @@
1
- import type { PluginRuntime } from "openclaw/plugin-sdk";
1
+ import type { PluginRuntime } from "openclaw/plugin-sdk/core";
2
2
  export declare function setWeComRuntime(r: PluginRuntime): void;
3
3
  export declare function getWeComRuntime(): PluginRuntime;
@@ -60,10 +60,14 @@ export declare function getReqIdForChat(chatId: string, accountId?: string): str
60
60
  export declare function deleteReqIdForChat(chatId: string, accountId?: string): void;
61
61
  /**
62
62
  * 启动时预热 reqId 缓存(从磁盘加载到内存)
63
+ *
64
+ * 注意:由于移除了磁盘存储,此函数现在只返回 0(无预热条目)
63
65
  */
64
66
  export declare function warmupReqIdStore(accountId?: string, log?: (...args: unknown[]) => void): Promise<number>;
65
67
  /**
66
68
  * 立即将 reqId 数据刷写到磁盘(用于优雅退出)
69
+ *
70
+ * 注意:由于移除了磁盘存储,此函数现在是无操作
67
71
  */
68
72
  export declare function flushReqIdStore(accountId?: string): Promise<void>;
69
73
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 企业微信公共工具函数
3
3
  */
4
- import type { OpenClawConfig } from "openclaw/plugin-sdk";
4
+ import type { OpenClawConfig } from "openclaw/plugin-sdk/core";
5
5
  /**
6
6
  * 企业微信群组配置
7
7
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wecom/wecom-openclaw-plugin",
3
- "version": "2026.3.20",
3
+ "version": "2026.3.24-beta.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",