@gloablehive/ipad-wechat-plugin 1.0.0 → 1.0.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.
@@ -0,0 +1,603 @@
1
+ /**
2
+ * iPad WeChat API Client (聚合聊天开放平台)
3
+ *
4
+ * Gateway: https://chat-api.juhebot.com/open/GuidRequest
5
+ * 文档: data/ipad-wechat/AI-READABLE-OVERVIEW.md
6
+ * API Paths: data/ipad-wechat/apifox/apis/
7
+ */
8
+ const GATEWAY_URL = "https://chat-api.juhebot.com/open/GuidRequest";
9
+ /**
10
+ * Call JuHeBot API Gateway
11
+ */
12
+ async function callApi(config, path, data) {
13
+ const requestBody = {
14
+ app_key: config.appKey,
15
+ app_secret: config.appSecret,
16
+ path,
17
+ data: {
18
+ guid: config.guid,
19
+ ...data,
20
+ },
21
+ };
22
+ console.log('[JuHeBot API] Request:', { path, data: requestBody.data });
23
+ const response = await fetch(GATEWAY_URL, {
24
+ method: "POST",
25
+ headers: {
26
+ "Content-Type": "application/json",
27
+ },
28
+ body: JSON.stringify(requestBody),
29
+ });
30
+ const result = await response.json();
31
+ console.log('[JuHeBot API] Response:', result);
32
+ // Handle error response
33
+ if (result.err_code !== undefined && result.err_code !== 0) {
34
+ throw new Error(`API Error: ${result.err_msg} (code: ${result.err_code})`);
35
+ }
36
+ if (result.code !== undefined && result.code !== 0) {
37
+ throw new Error(`API Error: ${result.msg} (code: ${result.code})`);
38
+ }
39
+ return result;
40
+ }
41
+ export function createIPadClient(config) {
42
+ return {
43
+ // ========== 实例管理 (Instance) ==========
44
+ /**
45
+ * 获取实例状态
46
+ * Path: /instance/get_status
47
+ */
48
+ async getDeviceStatus() {
49
+ return await callApi(config, "/instance/get_status", {});
50
+ },
51
+ /**
52
+ * 恢复实例
53
+ * Path: /instance/restore
54
+ */
55
+ async restoreInstance() {
56
+ return await callApi(config, "/instance/restore", {});
57
+ },
58
+ /**
59
+ * 停止实例
60
+ * Path: /instance/stop
61
+ */
62
+ async stopInstance() {
63
+ return await callApi(config, "/instance/stop", {});
64
+ },
65
+ /**
66
+ * 设置实例通知地址 (回调地址)
67
+ * Path: /instance/set_notify_url
68
+ */
69
+ async setNotifyUrl(notifyUrl) {
70
+ await callApi(config, "/instance/set_notify_url", { notifyUrl });
71
+ },
72
+ /**
73
+ * 设置实例桥接ID
74
+ * Path: /instance/set_bridge_id
75
+ */
76
+ async setBridgeId(bridgeId) {
77
+ await callApi(config, "/instance/set_bridge_id", { bridgeId });
78
+ },
79
+ // ========== 用户 (User) ==========
80
+ /**
81
+ * 获取登录账号信息
82
+ * Path: /user/get_profile
83
+ */
84
+ async getLoginAccountInfo() {
85
+ const res = await callApi(config, "/user/get_profile", {});
86
+ return res.data || {};
87
+ },
88
+ /**
89
+ * 获取个人二维码
90
+ * Path: /user/get_qrcode
91
+ */
92
+ async getQRCode() {
93
+ return await callApi(config, "/user/get_qrcode", {});
94
+ },
95
+ /**
96
+ * 退出登录
97
+ * Path: /user/logout
98
+ */
99
+ async logout() {
100
+ return await callApi(config, "/user/logout", {});
101
+ },
102
+ // ========== 联系人 (Contact) ==========
103
+ /**
104
+ * 同步联系人
105
+ * Path: /contact/init_contact
106
+ */
107
+ async syncContacts() {
108
+ const res = await callApi(config, "/contact/init_contact", {});
109
+ return res.data?.contacts || [];
110
+ },
111
+ /**
112
+ * 获取联系人详细
113
+ * Path: /contact/get_contact
114
+ */
115
+ async getContactDetail(wechatId) {
116
+ const res = await callApi(config, "/contact/get_contact", { userId: wechatId });
117
+ return res.data || {};
118
+ },
119
+ /**
120
+ * 批量获取联系人简要信息
121
+ * Path: /contact/batch_get_contact_brief_info
122
+ */
123
+ async batchGetContactBriefInfo(wechatIds) {
124
+ const res = await callApi(config, "/contact/batch_get_contact_brief_info", { userIds: wechatIds });
125
+ return res.data?.contacts || [];
126
+ },
127
+ /**
128
+ * 搜索联系人
129
+ * Path: /contact/search_contact
130
+ */
131
+ async searchContact(searchType, value) {
132
+ return await callApi(config, "/contact/search_contact", { searchType, value });
133
+ },
134
+ /**
135
+ * 添加好友
136
+ * Path: /contact/add_friend
137
+ */
138
+ async addFriend(v3, verifyMessage) {
139
+ return await callApi(config, "/contact/add_friend", { v3, verifyMessage });
140
+ },
141
+ /**
142
+ * 验证好友申请
143
+ * Path: /contact/verify_friend
144
+ */
145
+ async verifyFriend(who, status, ticket) {
146
+ return await callApi(config, "/contact/verify_friend", { who, status, ticket });
147
+ },
148
+ /**
149
+ * 修改好友备注
150
+ * Path: /contact/modify_remark
151
+ */
152
+ async updateFriendRemark(wechatId, remark) {
153
+ await callApi(config, "/contact/modify_remark", { userId: wechatId, remark });
154
+ },
155
+ /**
156
+ * 删除好友
157
+ * Path: /contact/del_friend
158
+ */
159
+ async deleteFriend(wechatId) {
160
+ return await callApi(config, "/contact/del_friend", { userId: wechatId });
161
+ },
162
+ /**
163
+ * 置顶聊天
164
+ * Path: /contact/modify_contact_top_flag
165
+ */
166
+ async setContactTop(wechatId, flag) {
167
+ return await callApi(config, "/contact/modify_contact_top_flag", { userId: wechatId, flag });
168
+ },
169
+ // ========== 消息发送 (Msg) ==========
170
+ /**
171
+ * 发送文本消息
172
+ * Path: /msg/send_text
173
+ */
174
+ async sendFriendMessage(params) {
175
+ const res = await callApi(config, "/msg/send_text", {
176
+ toUser: params.friendWechatId,
177
+ content: params.content,
178
+ });
179
+ return {
180
+ messageId: res.data?.messageId || `msg_${Date.now()}`,
181
+ msgSvrId: res.data?.msgSvrId || "",
182
+ };
183
+ },
184
+ /**
185
+ * 发送群@消息
186
+ * Path: /msg/send_room_at
187
+ */
188
+ async sendRoomMessage(params) {
189
+ const res = await callApi(config, "/msg/send_room_at", {
190
+ roomId: params.roomId,
191
+ content: params.content,
192
+ });
193
+ return {
194
+ messageId: res.data?.messageId || `msg_${Date.now()}`,
195
+ msgSvrId: res.data?.msgSvrId || "",
196
+ };
197
+ },
198
+ /**
199
+ * 发送图片
200
+ * Path: /msg/send_image
201
+ */
202
+ async sendFriendMedia(params) {
203
+ const res = await callApi(config, "/msg/send_image", {
204
+ toUser: params.friendWechatId,
205
+ filePath: params.filePath,
206
+ });
207
+ return {
208
+ messageId: res.data?.messageId || `msg_${Date.now()}`,
209
+ msgSvrId: res.data?.msgSvrId || "",
210
+ };
211
+ },
212
+ /**
213
+ * 发送图片到群
214
+ * Path: /msg/send_image (复用)
215
+ */
216
+ async sendRoomMedia(params) {
217
+ const res = await callApi(config, "/msg/send_image", {
218
+ roomId: params.roomId,
219
+ filePath: params.filePath,
220
+ });
221
+ return {
222
+ messageId: res.data?.messageId || `msg_${Date.now()}`,
223
+ msgSvrId: res.data?.msgSvrId || "",
224
+ };
225
+ },
226
+ /**
227
+ * 发送视频
228
+ * Path: /msg/send_video
229
+ */
230
+ async sendVideo(params) {
231
+ const res = await callApi(config, "/msg/send_video", params);
232
+ return {
233
+ messageId: res.data?.messageId || `msg_${Date.now()}`,
234
+ msgSvrId: res.data?.msgSvrId || "",
235
+ };
236
+ },
237
+ /**
238
+ * 发送文件
239
+ * Path: /msg/send_file
240
+ */
241
+ async sendFile(params) {
242
+ const res = await callApi(config, "/msg/send_file", params);
243
+ return {
244
+ messageId: res.data?.messageId || `msg_${Date.now()}`,
245
+ msgSvrId: res.data?.msgSvrId || "",
246
+ };
247
+ },
248
+ /**
249
+ * 发送位置
250
+ * Path: /msg/send_location
251
+ */
252
+ async sendLocation(params) {
253
+ return await callApi(config, "/msg/send_location", params);
254
+ },
255
+ /**
256
+ * 发送名片
257
+ * Path: /msg/send_share_card
258
+ */
259
+ async sendCard(params) {
260
+ return await callApi(config, "/msg/send_share_card", params);
261
+ },
262
+ /**
263
+ * 发送链接卡片
264
+ * Path: /msg/send_link_card
265
+ */
266
+ async sendLink(params) {
267
+ return await callApi(config, "/msg/send_link_card", params);
268
+ },
269
+ /**
270
+ * 发送表情
271
+ * Path: /msg/send_emoji
272
+ */
273
+ async sendEmoji(params) {
274
+ return await callApi(config, "/msg/send_emoji", params);
275
+ },
276
+ /**
277
+ * 发送表情URL
278
+ * Path: /msg/send_emoji_url
279
+ */
280
+ async sendEmojiUrl(params) {
281
+ return await callApi(config, "/msg/send_emoji_url", params);
282
+ },
283
+ /**
284
+ * 发送拍一拍
285
+ * Path: /msg/send_pat
286
+ */
287
+ async sendPat(roomId, userId) {
288
+ return await callApi(config, "/msg/send_pat", { roomId, userId });
289
+ },
290
+ /**
291
+ * 撤回消息
292
+ * Path: /msg/recall
293
+ */
294
+ async recallMessage(msgId) {
295
+ return await callApi(config, "/msg/recall", { msgId });
296
+ },
297
+ /**
298
+ * 发送引用消息
299
+ * Path: /msg/send_refer_msg
300
+ */
301
+ async sendReferMsg(params) {
302
+ return await callApi(config, "/msg/send_refer_msg", params);
303
+ },
304
+ // ========== 群组 (Room) ==========
305
+ /**
306
+ * 获取群信息
307
+ * Path: /room/get_chatroom_detail
308
+ */
309
+ async getRoomInfo(roomId) {
310
+ const res = await callApi(config, "/room/get_chatroom_detail", { roomId });
311
+ return res.data || {};
312
+ },
313
+ /**
314
+ * 获取群成员详细
315
+ * Path: /room/get_chatroom_member_detail
316
+ */
317
+ async getRoomMembers(roomId) {
318
+ const res = await callApi(config, "/room/get_chatroom_member_detail", { roomId });
319
+ return res.data?.members || [];
320
+ },
321
+ /**
322
+ * 创建群组
323
+ * Path: /room/create_chatroom
324
+ */
325
+ async createRoom(memberIds) {
326
+ const res = await callApi(config, "/room/create_chatroom", { memberIds });
327
+ return { roomId: res.data?.roomId || "" };
328
+ },
329
+ /**
330
+ * 添加群成员
331
+ * Path: /room/add_chatroom_member
332
+ */
333
+ async addRoomMember(roomId, memberId) {
334
+ await callApi(config, "/room/add_chatroom_member", { roomId, memberId });
335
+ },
336
+ /**
337
+ * 邀请群成员
338
+ * Path: /room/invite_chatroom_member
339
+ */
340
+ async inviteRoomMember(roomId, memberId) {
341
+ await callApi(config, "/room/invite_chatroom_member", { roomId, memberId });
342
+ },
343
+ /**
344
+ * 移除群成员
345
+ * Path: /room/del_chatroom_member
346
+ */
347
+ async removeRoomMember(roomId, memberId) {
348
+ await callApi(config, "/room/del_chatroom_member", { roomId, memberId });
349
+ },
350
+ /**
351
+ * 修改群名称
352
+ * Path: /room/modify_chatroom_name
353
+ */
354
+ async updateRoomName(roomId, name) {
355
+ await callApi(config, "/room/modify_chatroom_name", { roomId, name });
356
+ },
357
+ /**
358
+ * 设置群公告
359
+ * Path: /room/set_chatroom_announcement
360
+ */
361
+ async setRoomAnnouncement(roomId, announcement) {
362
+ await callApi(config, "/room/set_chatroom_announcement", { roomId, announcement });
363
+ },
364
+ /**
365
+ * 修改群显示昵称
366
+ * Path: /room/modify_chatroom_display_name
367
+ */
368
+ async setRoomDisplayName(roomId, displayName) {
369
+ await callApi(config, "/room/modify_chatroom_display_name", { roomId, displayName });
370
+ },
371
+ /**
372
+ * 是否显示群成员昵称
373
+ * Path: /room/modify_chatroom_show_name_flag
374
+ */
375
+ async setRoomShowNameFlag(roomId, flag) {
376
+ await callApi(config, "/room/modify_chatroom_show_name_flag", { roomId, flag });
377
+ },
378
+ /**
379
+ * 是否保存到通讯录
380
+ * Path: /room/modify_chatroom_contact_flag
381
+ */
382
+ async setRoomContactFlag(roomId, flag) {
383
+ await callApi(config, "/room/modify_chatroom_contact_flag", { roomId, flag });
384
+ },
385
+ /**
386
+ * 是否折叠群
387
+ * Path: /room/modify_chatroom_fold_flag
388
+ */
389
+ async setRoomFoldFlag(roomId, flag) {
390
+ await callApi(config, "/room/modify_chatroom_fold_flag", { roomId, flag });
391
+ },
392
+ /**
393
+ * 消息免打扰
394
+ * Path: /room/modify_chatroom_disturb_flag
395
+ */
396
+ async setRoomDisturbFlag(roomId, flag) {
397
+ await callApi(config, "/room/modify_chatroom_disturb_flag", { roomId, flag });
398
+ },
399
+ /**
400
+ * 添加群成员为好友
401
+ * Path: /room/add_chatroom_member_friend
402
+ */
403
+ async addRoomMemberAsFriend(roomId, memberId) {
404
+ return await callApi(config, "/room/add_chatroom_member_friend", { roomId, memberId });
405
+ },
406
+ /**
407
+ * 退出群
408
+ * Path: /room/quit_chatroom
409
+ */
410
+ async quitRoom(roomId) {
411
+ return await callApi(config, "/room/quit_chatroom", { roomId });
412
+ },
413
+ /**
414
+ * 转让群主
415
+ * Path: /room/tranfer_chatroom_owner
416
+ */
417
+ async transferRoomOwner(roomId, newOwnerId) {
418
+ return await callApi(config, "/room/tranfer_chatroom_owner", { roomId, newOwnerId });
419
+ },
420
+ /**
421
+ * 获取群二维码
422
+ * Path: /room/get_chatroom_qrcode
423
+ */
424
+ async getRoomQRCode(roomId) {
425
+ return await callApi(config, "/room/get_chatroom_qrcode", { roomId });
426
+ },
427
+ /**
428
+ * 置顶消息
429
+ * Path: /room/set_top_msg
430
+ */
431
+ async setTopMsg(roomId, msgId) {
432
+ return await callApi(config, "/room/set_top_msg", { roomId, msgId });
433
+ },
434
+ /**
435
+ * 取消置顶消息
436
+ * Path: /room/remove_top_msg
437
+ */
438
+ async removeTopMsg(roomId, msgId) {
439
+ return await callApi(config, "/room/remove_top_msg", { roomId, msgId });
440
+ },
441
+ // ========== 朋友圈 (SNS) ==========
442
+ /**
443
+ * 获取朋友圈动态
444
+ * Path: /sns/sns_timeline
445
+ */
446
+ async getMoments(limit = 20) {
447
+ const res = await callApi(config, "/sns/sns_timeline", { limit });
448
+ return res.data?.moments || [];
449
+ },
450
+ /**
451
+ * 获取好友朋友圈动态
452
+ * Path: /sns/sns_userpage
453
+ */
454
+ async getFriendMoments(wechatId, limit = 20) {
455
+ const res = await callApi(config, "/sns/sns_userpage", { userId: wechatId, limit });
456
+ return res.data?.moments || [];
457
+ },
458
+ /**
459
+ * 发布朋友圈
460
+ * Path: /sns/sns_post
461
+ */
462
+ async publishMoment(content, images) {
463
+ await callApi(config, "/sns/sns_post", { content, images });
464
+ },
465
+ /**
466
+ * 删除朋友圈
467
+ * Path: /sns/sns_delete
468
+ */
469
+ async deleteMoment(snsId) {
470
+ await callApi(config, "/sns/sns_delete", { snsId });
471
+ },
472
+ /**
473
+ * 朋友圈评论
474
+ * Path: /sns/sns_comment
475
+ */
476
+ async commentMoment(snsId, content, replyId) {
477
+ return await callApi(config, "/sns/sns_comment", { snsId, content, replyId });
478
+ },
479
+ /**
480
+ * 删除评论
481
+ * Path: /sns/sns_delete_comment
482
+ */
483
+ async deleteComment(snsId, commentId) {
484
+ await callApi(config, "/sns/sns_delete_comment", { snsId, commentId });
485
+ },
486
+ /**
487
+ * 点赞/取消点赞
488
+ * Path: /sns/sns_like
489
+ */
490
+ async likeMoment(snsId, type) {
491
+ return await callApi(config, "/sns/sns_like", { snsId, type });
492
+ },
493
+ // ========== 云存储 (Cloud) ==========
494
+ /**
495
+ * 上传文件
496
+ * Path: /cloud/upload
497
+ */
498
+ async uploadFile(filePath) {
499
+ return await callApi(config, "/cloud/upload", { filePath });
500
+ },
501
+ /**
502
+ * 上传大文件
503
+ * Path: /cloud/upload_big
504
+ */
505
+ async uploadBigFile(filePath) {
506
+ return await callApi(config, "/cloud/upload_big", { filePath });
507
+ },
508
+ /**
509
+ * CDN 上传
510
+ * Path: /cloud/cdn_upload
511
+ */
512
+ async cdnUpload(filePath) {
513
+ return await callApi(config, "/cloud/cdn_upload", { filePath });
514
+ },
515
+ /**
516
+ * 下载文件
517
+ * Path: /cloud/download
518
+ */
519
+ async downloadFile(fileId, savePath) {
520
+ return await callApi(config, "/cloud/download", { fileId, savePath });
521
+ },
522
+ /**
523
+ * CDN 下载
524
+ * Path: /cloud/cdn_download
525
+ */
526
+ async cdnDownload(url, savePath) {
527
+ return await callApi(config, "/cloud/cdn_download", { url, savePath });
528
+ },
529
+ };
530
+ }
531
+ /**
532
+ * API 路径映射表 (完整)
533
+ */
534
+ export const API_PATHS = {
535
+ // 实例管理
536
+ instanceGetStatus: "/instance/get_status",
537
+ instanceRestore: "/instance/restore",
538
+ instanceStop: "/instance/stop",
539
+ instanceSetNotifyUrl: "/instance/set_notify_url",
540
+ instanceSetBridgeId: "/instance/set_bridge_id",
541
+ // 用户
542
+ userGetProfile: "/user/get_profile",
543
+ userGetQRCode: "/user/get_qrcode",
544
+ userLogout: "/user/logout",
545
+ // 联系人
546
+ contactInitContact: "/contact/init_contact",
547
+ contactGetContact: "/contact/get_contact",
548
+ contactBatchGetBriefInfo: "/contact/batch_get_contact_brief_info",
549
+ contactSearchContact: "/contact/search_contact",
550
+ contactAddFriend: "/contact/add_friend",
551
+ contactVerifyFriend: "/contact/verify_friend",
552
+ contactModifyRemark: "/contact/modify_remark",
553
+ contactDelFriend: "/contact/del_friend",
554
+ contactModifyTopFlag: "/contact/modify_contact_top_flag",
555
+ // 消息
556
+ msgSendText: "/msg/send_text",
557
+ msgSendRoomAt: "/msg/send_room_at",
558
+ msgSendImage: "/msg/send_image",
559
+ msgSendVideo: "/msg/send_video",
560
+ msgSendFile: "/msg/send_file",
561
+ msgSendLocation: "/msg/send_location",
562
+ msgSendShareCard: "/msg/send_share_card",
563
+ msgSendLinkCard: "/msg/send_link_card",
564
+ msgSendEmoji: "/msg/send_emoji",
565
+ msgSendEmojiUrl: "/msg/send_emoji_url",
566
+ msgSendPat: "/msg/send_pat",
567
+ msgRecall: "/msg/recall",
568
+ msgSendReferMsg: "/msg/send_refer_msg",
569
+ // 群组
570
+ roomCreateChatroom: "/room/create_chatroom",
571
+ roomGetDetail: "/room/get_chatroom_detail",
572
+ roomGetMembers: "/room/get_chatroom_member_detail",
573
+ roomAddMember: "/room/add_chatroom_member",
574
+ roomInviteMember: "/room/invite_chatroom_member",
575
+ roomDelMember: "/room/del_chatroom_member",
576
+ roomModifyName: "/room/modify_chatroom_name",
577
+ roomSetAnnouncement: "/room/set_chatroom_announcement",
578
+ roomModifyDisplayName: "/room/modify_chatroom_display_name",
579
+ roomModifyShowNameFlag: "/room/modify_chatroom_show_name_flag",
580
+ roomModifyContactFlag: "/room/modify_chatroom_contact_flag",
581
+ roomModifyFoldFlag: "/room/modify_chatroom_fold_flag",
582
+ roomModifyDisturbFlag: "/room/modify_chatroom_disturb_flag",
583
+ roomAddMemberFriend: "/room/add_chatroom_member_friend",
584
+ roomQuit: "/room/quit_chatroom",
585
+ roomTransferOwner: "/room/tranfer_chatroom_owner",
586
+ roomGetQRCode: "/room/get_chatroom_qrcode",
587
+ roomSetTopMsg: "/room/set_top_msg",
588
+ roomRemoveTopMsg: "/room/remove_top_msg",
589
+ // 朋友圈
590
+ snsTimeline: "/sns/sns_timeline",
591
+ snsUserpage: "/sns/sns_userpage",
592
+ snsPost: "/sns/sns_post",
593
+ snsDelete: "/sns/sns_delete",
594
+ snsComment: "/sns/sns_comment",
595
+ snsDeleteComment: "/sns/sns_delete_comment",
596
+ snsLike: "/sns/sns_like",
597
+ // 云存储
598
+ cloudUpload: "/cloud/upload",
599
+ cloudUploadBig: "/cloud/upload_big",
600
+ cloudCdnUpload: "/cloud/cdn_upload",
601
+ cloudDownload: "/cloud/download",
602
+ cloudCdnDownload: "/cloud/cdn_download",
603
+ };
package/index.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import { defineChannelPluginEntry } from "openclaw/plugin-sdk/core";
9
- import { ipadWeChatPlugin } from "./src/channel.js";
9
+ import { ipadWeChatPlugin, handleInboundMessage } from "./src/channel.js";
10
10
 
11
11
  export default defineChannelPluginEntry({
12
12
  id: "ipad-wechat",
@@ -21,9 +21,14 @@ export default defineChannelPluginEntry({
21
21
  auth: "plugin",
22
22
  handler: async (req, res) => {
23
23
  try {
24
- const payload = req.body;
24
+ const payload = (req as any).body;
25
25
  // Handle inbound message
26
26
  console.log("[iPad WeChat] Received webhook:", payload);
27
+
28
+ if (payload) {
29
+ await handleInboundMessage(api, payload);
30
+ }
31
+
27
32
  res.statusCode = 200;
28
33
  res.end("ok");
29
34
  return true;
@@ -39,15 +39,22 @@
39
39
  "configSchema": {
40
40
  "type": "object",
41
41
  "properties": {
42
- "apiKey": {
42
+ "appKey": {
43
43
  "type": "string",
44
- "description": "iPad WeChat API key for authentication",
44
+ "description": "JuHeBot App Key (聚合聊天开放平台)",
45
45
  "secret": true,
46
46
  "required": true
47
47
  },
48
- "baseUrl": {
48
+ "appSecret": {
49
49
  "type": "string",
50
- "description": "iPad WeChat API base URL"
50
+ "description": "JuHeBot App Secret",
51
+ "secret": true,
52
+ "required": true
53
+ },
54
+ "guid": {
55
+ "type": "string",
56
+ "description": "实例/设备 ID (Guid)",
57
+ "required": true
51
58
  },
52
59
  "accountId": {
53
60
  "type": "string",
@@ -78,7 +85,7 @@
78
85
  "default": "allowlist"
79
86
  }
80
87
  },
81
- "required": ["apiKey", "baseUrl"]
88
+ "required": ["appKey", "appSecret", "guid"]
82
89
  },
83
90
  "permissions": {
84
91
  "channels": ["ipad-wechat"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gloablehive/ipad-wechat-plugin",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "description": "OpenClaw channel plugin for iPad WeChat protocol - enables sending/receiving WeChat messages through iPad protocol",
6
6
  "main": "index.ts",
@@ -20,11 +20,12 @@
20
20
  }
21
21
  },
22
22
  "dependencies": {
23
- "@gloablehive/wechat-cache": "^1.0.0",
23
+ "@gloablehive/wechat-cache": "^1.0.1",
24
24
  "openclaw": ">=1.0.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^20.0.0",
28
+ "tsx": "^4.21.0",
28
29
  "typescript": "^5.0.0"
29
30
  }
30
31
  }