@openclaw-china/dingtalk 0.1.16 → 0.1.18

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.d.ts CHANGED
@@ -34,6 +34,7 @@ __exportStar(require("./ZodError.cjs"), exports);
34
34
  * - groupAllowFrom: 群聊白名单会话 ID 列表
35
35
  * - historyLimit: 历史消息数量限制
36
36
  * - textChunkLimit: 文本分块大小限制
37
+ * - enableAICard: 是否启用 AI Card 流式响应
37
38
  */
38
39
  declare const DingtalkConfigSchema: undefined<{
39
40
  /** 是否启用钉钉渠道 */
@@ -56,6 +57,8 @@ declare const DingtalkConfigSchema: undefined<{
56
57
  historyLimit: undefined<undefined<undefined>>;
57
58
  /** 文本分块大小限制 (钉钉单条消息最大 4000 字符) */
58
59
  textChunkLimit: undefined<undefined<undefined>>;
60
+ /** 是否启用 AI Card 流式响应 */
61
+ enableAICard: undefined<undefined<undefined>>;
59
62
  }, "strip", undefined, {
60
63
  enabled: boolean;
61
64
  dmPolicy: "open" | "pairing" | "allowlist";
@@ -63,6 +66,7 @@ declare const DingtalkConfigSchema: undefined<{
63
66
  requireMention: boolean;
64
67
  historyLimit: number;
65
68
  textChunkLimit: number;
69
+ enableAICard: boolean;
66
70
  clientId?: string | undefined;
67
71
  clientSecret?: string | undefined;
68
72
  allowFrom?: string[] | undefined;
@@ -78,6 +82,7 @@ declare const DingtalkConfigSchema: undefined<{
78
82
  groupAllowFrom?: string[] | undefined;
79
83
  historyLimit?: number | undefined;
80
84
  textChunkLimit?: number | undefined;
85
+ enableAICard?: boolean | undefined;
81
86
  }>;
82
87
  type DingtalkConfig = undefined<typeof DingtalkConfigSchema>;
83
88
 
@@ -138,6 +143,49 @@ interface SendResult {
138
143
  conversationId?: string;
139
144
  }
140
145
 
146
+ /**
147
+ * 钉钉 Onboarding 适配器
148
+ *
149
+ * 实现 ChannelOnboardingAdapter 接口,提供:
150
+ * - getStatus: 获取渠道配置状态
151
+ * - configure: 交互式配置向导
152
+ * - dmPolicy: DM 策略配置
153
+ * - disable: 禁用渠道
154
+ */
155
+
156
+ /**
157
+ * 配置接口类型
158
+ */
159
+ interface PluginConfig$1 {
160
+ channels?: {
161
+ dingtalk?: Partial<DingtalkConfig>;
162
+ };
163
+ }
164
+ /**
165
+ * WizardPrompter 接口(简化版)
166
+ */
167
+ interface WizardPrompter {
168
+ note: (message: string, title?: string) => Promise<void>;
169
+ text: (opts: {
170
+ message: string;
171
+ placeholder?: string;
172
+ initialValue?: string;
173
+ validate?: (value: string | undefined) => string | undefined;
174
+ }) => Promise<string | symbol>;
175
+ confirm: (opts: {
176
+ message: string;
177
+ initialValue?: boolean;
178
+ }) => Promise<boolean>;
179
+ select: <T>(opts: {
180
+ message: string;
181
+ options: Array<{
182
+ value: T;
183
+ label: string;
184
+ }>;
185
+ initialValue?: T;
186
+ }) => Promise<T | symbol>;
187
+ }
188
+
141
189
  /** 默认账户 ID */
142
190
  declare const DEFAULT_ACCOUNT_ID = "default";
143
191
  /**
@@ -231,6 +279,9 @@ declare const dingtalkPlugin: {
231
279
  type: string;
232
280
  minimum: number;
233
281
  };
282
+ enableAICard: {
283
+ type: string;
284
+ };
234
285
  };
235
286
  };
236
287
  };
@@ -315,6 +366,41 @@ declare const dingtalkPlugin: {
315
366
  cfg: PluginConfig;
316
367
  }) => PluginConfig;
317
368
  };
369
+ /**
370
+ * Onboarding 适配器
371
+ */
372
+ onboarding: {
373
+ channel: "dingtalk";
374
+ getStatus: (params: {
375
+ cfg: PluginConfig$1;
376
+ }) => Promise<{
377
+ channel: "dingtalk";
378
+ configured: boolean;
379
+ statusLines: string[];
380
+ selectionHint: string;
381
+ quickstartScore: number;
382
+ }>;
383
+ configure: (params: {
384
+ cfg: PluginConfig$1;
385
+ prompter: WizardPrompter;
386
+ }) => Promise<{
387
+ cfg: PluginConfig$1;
388
+ accountId: string;
389
+ }>;
390
+ dmPolicy: {
391
+ label: string;
392
+ channel: "dingtalk";
393
+ policyKey: string;
394
+ allowFromKey: string;
395
+ getCurrent: (cfg: PluginConfig$1) => "open" | "pairing" | "allowlist";
396
+ setPolicy: (cfg: PluginConfig$1, policy: "open" | "pairing" | "allowlist") => PluginConfig$1;
397
+ promptAllowFrom: (params: {
398
+ cfg: PluginConfig$1;
399
+ prompter: WizardPrompter;
400
+ }) => Promise<PluginConfig$1>;
401
+ };
402
+ disable: (cfg: PluginConfig$1) => PluginConfig$1;
403
+ };
318
404
  /**
319
405
  * 出站消息适配器
320
406
  * Requirements: 7.1, 7.6