@wps365/openclaw-wpsxiezuo 1.6.0

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.
Files changed (62) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +335 -0
  3. package/README_ZH-CN.md +318 -0
  4. package/bin/cli.mjs +677 -0
  5. package/dist/channel/event-crypto.d.ts +19 -0
  6. package/dist/channel/event-handlers.d.ts +61 -0
  7. package/dist/channel/event-types.d.ts +88 -0
  8. package/dist/channel/index.d.ts +8 -0
  9. package/dist/channel/plugin.d.ts +11 -0
  10. package/dist/channel/register-tool-bridge.d.ts +14 -0
  11. package/dist/channel/sdk-client-options.d.ts +24 -0
  12. package/dist/channel/sdk-helpers.d.ts +12 -0
  13. package/dist/channel/sdk-provider.d.ts +23 -0
  14. package/dist/channel/types.d.ts +324 -0
  15. package/dist/core/config.d.ts +267 -0
  16. package/dist/core/errors.d.ts +36 -0
  17. package/dist/core/index.d.ts +18 -0
  18. package/dist/core/lazy-client-store.d.ts +28 -0
  19. package/dist/core/media-utils.d.ts +27 -0
  20. package/dist/core/reaction.d.ts +29 -0
  21. package/dist/core/token-store.d.ts +34 -0
  22. package/dist/core/user-token-store.d.ts +35 -0
  23. package/dist/core/wps-client.d.ts +42 -0
  24. package/dist/index.d.ts +17 -0
  25. package/dist/index.js +33 -0
  26. package/dist/messaging/handler.d.ts +73 -0
  27. package/dist/messaging/inbound/content-parser.d.ts +17 -0
  28. package/dist/messaging/inbound/handler.d.ts +44 -0
  29. package/dist/messaging/inbound/index.d.ts +5 -0
  30. package/dist/messaging/inbound/media-prefetch.d.ts +43 -0
  31. package/dist/messaging/inbound/pairing-allow-store.d.ts +11 -0
  32. package/dist/messaging/index.d.ts +3 -0
  33. package/dist/messaging/outbound.d.ts +15 -0
  34. package/dist/session/idempotency.d.ts +8 -0
  35. package/dist/session/index.d.ts +5 -0
  36. package/dist/session/resolver.d.ts +17 -0
  37. package/dist/session/types.d.ts +37 -0
  38. package/dist/tools/oapi/calendar.d.ts +106 -0
  39. package/dist/tools/oapi/chat.d.ts +10 -0
  40. package/dist/tools/oapi/delegated-auth.d.ts +14 -0
  41. package/dist/tools/oapi/drive.d.ts +112 -0
  42. package/dist/tools/oapi/index.d.ts +24 -0
  43. package/dist/tools/oapi/media.d.ts +32 -0
  44. package/dist/tools/oapi/messaging.d.ts +10 -0
  45. package/dist/tools/oapi/todo.d.ts +96 -0
  46. package/dist/tools/oapi/user.d.ts +10 -0
  47. package/dist/tools/oauth/index.d.ts +65 -0
  48. package/openclaw.plugin.json +154 -0
  49. package/package.json +91 -0
  50. package/scripts/upgrade.sh +37 -0
  51. package/skills/wps-auth-provider.md +63 -0
  52. package/skills/wps-calendar/SKILL.md +147 -0
  53. package/skills/wps-channel-rules/SKILL.md +50 -0
  54. package/skills/wps-chat/SKILL.md +106 -0
  55. package/skills/wps-drive/SKILL.md +79 -0
  56. package/skills/wps-im-read/SKILL.md +88 -0
  57. package/skills/wps-im-send/SKILL.md +183 -0
  58. package/skills/wps-media/SKILL.md +101 -0
  59. package/skills/wps-message-handler.md +48 -0
  60. package/skills/wps-todo/SKILL.md +65 -0
  61. package/skills/wps-user/SKILL.md +105 -0
  62. package/skills/wps-xiezuo-session-mapper.md +62 -0
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: wps-xiezuo-session-mapper
3
+ description: 管理 WPS Xiezuo 会话与 Openclaw session 的映射关系
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # WPS Xiezuo Session 映射 Skill
8
+
9
+ ## 功能说明
10
+
11
+ 本 Skill 负责管理 WPS Xiezuo 会话与 Openclaw session 之间的映射关系,确保:
12
+
13
+ - 同一 WPS Xiezuo 会话的消息映射到同一个 Openclaw session
14
+ - Session 隔离,避免跨会话信息泄露
15
+ - Session 生命周期管理
16
+
17
+ ## 映射策略
18
+
19
+ ### 策略 1: 基于会话 ID(推荐)
20
+
21
+ ```
22
+ WPS conversationId -> Openclaw sessionId
23
+ ```
24
+
25
+ 适用场景:群聊、单聊
26
+
27
+ ### 策略 2: 基于用户 ID
28
+
29
+ ```
30
+ WPS userId -> Openclaw sessionId
31
+ ```
32
+
33
+ 适用场景:个人助手模式
34
+
35
+ ## Session 生命周期
36
+
37
+ - **创建**: 首次收到消息时自动创建
38
+ - **续期**: 每次交互自动续期 TTL
39
+ - **过期**: 超过 TTL 后自动清理
40
+ - **手动清理**: 支持通过命令清理指定 session
41
+
42
+ ## 配置参数
43
+
44
+ - `strategy`: 映射策略(`wps-conversation-id` | `wps-user-id`)
45
+ - `ttl`: Session 过期时间(秒,默认: 3600)
46
+ - `maxSessions`: 最大 session 数量(默认: 1000)
47
+
48
+ ## 使用示例
49
+
50
+ ```typescript
51
+ // 获取或创建 session
52
+ const sessionId = await sessionMapper.getOrCreate({
53
+ conversationId: 'conv_123',
54
+ userId: 'user_456'
55
+ });
56
+
57
+ // 续期 session
58
+ await sessionMapper.renew(sessionId);
59
+
60
+ // 清理过期 session
61
+ await sessionMapper.cleanup();
62
+ ```