@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.
- package/README.md +19 -1
- package/dist/index.cjs.js +26 -186
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.esm.js +16 -177
- package/dist/index.esm.js.map +1 -1
- package/dist/src/channel.d.ts +1 -1
- package/dist/src/dm-policy.d.ts +1 -1
- package/dist/src/group-policy.d.ts +2 -1
- package/dist/src/interface.d.ts +2 -1
- package/dist/src/media-handler.d.ts +2 -1
- package/dist/src/message-sender.d.ts +1 -1
- package/dist/src/onboarding.d.ts +2 -2
- package/dist/src/reqid-store.d.ts +3 -11
- package/dist/src/runtime.d.ts +1 -1
- package/dist/src/state-manager.d.ts +4 -0
- package/dist/src/utils.d.ts +1 -1
- package/package.json +1 -1
package/dist/src/channel.d.ts
CHANGED
package/dist/src/dm-policy.d.ts
CHANGED
|
@@ -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
|
|
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
|
* 群组策略检查结果
|
package/dist/src/interface.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 企业微信渠道类型定义
|
|
3
3
|
*/
|
|
4
|
-
import type { OpenClawConfig
|
|
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
|
|
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
|
/**
|
package/dist/src/onboarding.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 企业微信 onboarding adapter for CLI setup wizard.
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
export declare const wecomOnboardingAdapter:
|
|
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 视为过期(默认
|
|
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
|
|
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
|
/** 返回内存中的条目数 */
|
package/dist/src/runtime.d.ts
CHANGED
|
@@ -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
|
/**
|
package/dist/src/utils.d.ts
CHANGED