@wecom/wecom-openclaw-plugin 2026.3.24-beta.2 → 2026.3.24-beta.4
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/dist/index.cjs.js +170 -91
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.esm.js +158 -79
- package/dist/index.esm.js.map +1 -1
- package/dist/src/onboarding.d.ts +7 -3
- package/dist/src/openclaw-compat.d.ts +38 -0
- package/package.json +1 -1
package/dist/src/onboarding.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 企业微信
|
|
2
|
+
* 企业微信 setupWizard — 声明式 CLI setup wizard 配置。
|
|
3
|
+
*
|
|
4
|
+
* 框架通过 plugin.setupWizard 字段识别并驱动 channel 的引导配置流程。
|
|
3
5
|
*/
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
+
import type { ChannelSetupWizard } from "openclaw/plugin-sdk/setup";
|
|
7
|
+
import type { ChannelSetupAdapter } from "openclaw/plugin-sdk/setup";
|
|
8
|
+
export declare const wecomSetupAdapter: ChannelSetupAdapter;
|
|
9
|
+
export declare const wecomSetupWizard: ChannelSetupWizard;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* 本模块在加载时一次性探测 SDK 导出,存在则直接 re-export SDK 版本,
|
|
8
8
|
* 不存在则导出 fallback 实现。其他模块统一从本文件导入,无需关心底层兼容细节。
|
|
9
9
|
*/
|
|
10
|
+
export declare const DEFAULT_ACCOUNT_ID = "default";
|
|
10
11
|
/** 与 openclaw plugin-sdk 中 WebMediaResult 兼容的类型 */
|
|
11
12
|
export type WebMediaResult = {
|
|
12
13
|
buffer: Buffer;
|
|
@@ -56,3 +57,40 @@ export declare function addWildcardAllowFrom(allowFrom: string[]): string[];
|
|
|
56
57
|
* 优先使用 SDK 版本,不可用时手动构建白名单(与 weclaw/src/media/local-roots.ts 逻辑一致)。
|
|
57
58
|
*/
|
|
58
59
|
export declare function getDefaultMediaLocalRoots(): Promise<readonly string[]>;
|
|
60
|
+
export declare function emptyPluginConfigSchema(): Record<string, unknown>;
|
|
61
|
+
/**
|
|
62
|
+
* 解析可选的分隔条目
|
|
63
|
+
* @param value 输入字符串,支持逗号、分号、换行符分隔
|
|
64
|
+
* @returns 解析后的字符串数组,如果输入为空则返回 undefined
|
|
65
|
+
*/
|
|
66
|
+
export declare function parseOptionalDelimitedEntries(value?: string): string[] | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* 构建账户范围的 DM 安全策略
|
|
69
|
+
*/
|
|
70
|
+
export declare function buildAccountScopedDmSecurityPolicy(params: {
|
|
71
|
+
cfg: Record<string, unknown>;
|
|
72
|
+
channelKey: string;
|
|
73
|
+
accountId?: string | null;
|
|
74
|
+
fallbackAccountId?: string | null;
|
|
75
|
+
policy?: string | null;
|
|
76
|
+
allowFrom?: Array<string | number> | null;
|
|
77
|
+
defaultPolicy?: string;
|
|
78
|
+
allowFromPathSuffix?: string;
|
|
79
|
+
policyPathSuffix?: string;
|
|
80
|
+
approveChannelId?: string;
|
|
81
|
+
approveHint?: string;
|
|
82
|
+
normalizeEntry?: (raw: string) => string;
|
|
83
|
+
}): {
|
|
84
|
+
policy: string;
|
|
85
|
+
allowFrom: Array<string | number>;
|
|
86
|
+
policyPath?: string;
|
|
87
|
+
allowFromPath: string;
|
|
88
|
+
approveHint: string;
|
|
89
|
+
normalizeEntry?: (raw: string) => string;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* 格式化配对审批提示信息(参考 moltbot 实现)
|
|
93
|
+
* @param channelId 频道ID
|
|
94
|
+
* @returns 配对审批提示字符串
|
|
95
|
+
*/
|
|
96
|
+
export declare function formatPairingApproveHint(channelId: string): string;
|