@xpert-ai/plugin-community-wechat 0.1.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.
- package/README.md +353 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +139 -0
- package/dist/lib/constants.d.ts +23 -0
- package/dist/lib/constants.js +23 -0
- package/dist/lib/conversation-user-key.d.ts +13 -0
- package/dist/lib/conversation-user-key.js +28 -0
- package/dist/lib/conversation.service.d.ts +215 -0
- package/dist/lib/conversation.service.js +1179 -0
- package/dist/lib/decorators.d.ts +2 -0
- package/dist/lib/decorators.js +3 -0
- package/dist/lib/entities/index.d.ts +4 -0
- package/dist/lib/entities/index.js +4 -0
- package/dist/lib/entities/wechat-personal-account.entity.d.ts +19 -0
- package/dist/lib/entities/wechat-personal-account.entity.js +83 -0
- package/dist/lib/entities/wechat-personal-conversation-binding.entity.d.ts +14 -0
- package/dist/lib/entities/wechat-personal-conversation-binding.entity.js +65 -0
- package/dist/lib/entities/wechat-personal-message-log.entity.d.ts +27 -0
- package/dist/lib/entities/wechat-personal-message-log.entity.js +108 -0
- package/dist/lib/entities/wechat-personal-trigger-binding.entity.d.ts +17 -0
- package/dist/lib/entities/wechat-personal-trigger-binding.entity.js +71 -0
- package/dist/lib/handoff/index.d.ts +4 -0
- package/dist/lib/handoff/index.js +4 -0
- package/dist/lib/handoff/wechat-personal-chat-callback.processor.d.ts +26 -0
- package/dist/lib/handoff/wechat-personal-chat-callback.processor.js +312 -0
- package/dist/lib/handoff/wechat-personal-chat-dispatch.service.d.ts +26 -0
- package/dist/lib/handoff/wechat-personal-chat-dispatch.service.js +187 -0
- package/dist/lib/handoff/wechat-personal-chat-run-state.service.d.ts +21 -0
- package/dist/lib/handoff/wechat-personal-chat-run-state.service.js +39 -0
- package/dist/lib/handoff/wechat-personal-chat.types.d.ts +69 -0
- package/dist/lib/handoff/wechat-personal-chat.types.js +2 -0
- package/dist/lib/message.d.ts +49 -0
- package/dist/lib/message.js +64 -0
- package/dist/lib/remote-components/wechat-personal-workbench/app.js +1831 -0
- package/dist/lib/tokens.d.ts +1 -0
- package/dist/lib/tokens.js +1 -0
- package/dist/lib/types.d.ts +48 -0
- package/dist/lib/types.js +365 -0
- package/dist/lib/views/wechat-personal-view.provider.d.ts +17 -0
- package/dist/lib/views/wechat-personal-view.provider.js +441 -0
- package/dist/lib/wechat-personal-channel.strategy.d.ts +33 -0
- package/dist/lib/wechat-personal-channel.strategy.js +197 -0
- package/dist/lib/wechat-personal-integration.strategy.d.ts +56 -0
- package/dist/lib/wechat-personal-integration.strategy.js +217 -0
- package/dist/lib/wechat-personal.client.d.ts +29 -0
- package/dist/lib/wechat-personal.client.js +146 -0
- package/dist/lib/wechat-personal.controller.d.ts +50 -0
- package/dist/lib/wechat-personal.controller.js +270 -0
- package/dist/lib/wechat-personal.middleware.d.ts +20 -0
- package/dist/lib/wechat-personal.middleware.js +267 -0
- package/dist/lib/wechat-personal.plugin.d.ts +2 -0
- package/dist/lib/wechat-personal.plugin.js +58 -0
- package/dist/lib/wechat-personal.templates.d.ts +2 -0
- package/dist/lib/wechat-personal.templates.js +100 -0
- package/dist/lib/workflow/index.d.ts +5 -0
- package/dist/lib/workflow/index.js +5 -0
- package/dist/lib/workflow/wechat-personal-trigger-aggregation.service.d.ts +10 -0
- package/dist/lib/workflow/wechat-personal-trigger-aggregation.service.js +39 -0
- package/dist/lib/workflow/wechat-personal-trigger-aggregation.types.d.ts +30 -0
- package/dist/lib/workflow/wechat-personal-trigger-aggregation.types.js +2 -0
- package/dist/lib/workflow/wechat-personal-trigger-flush.processor.d.ts +8 -0
- package/dist/lib/workflow/wechat-personal-trigger-flush.processor.js +39 -0
- package/dist/lib/workflow/wechat-personal-trigger.strategy.d.ts +65 -0
- package/dist/lib/workflow/wechat-personal-trigger.strategy.js +511 -0
- package/dist/lib/workflow/wechat-personal-trigger.types.d.ts +10 -0
- package/dist/lib/workflow/wechat-personal-trigger.types.js +2 -0
- package/dist/xpert-wechat-personal-admin-assistant.yaml +103 -0
- package/dist/xpert-wechat-personal-user-assistant.yaml +127 -0
- package/package.json +79 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
team:
|
|
2
|
+
name: wechat-personal-user-assistant
|
|
3
|
+
type: agent
|
|
4
|
+
title: 个人微信会话助手
|
|
5
|
+
description: 通过 wx2.0 接收个人微信消息并自然回复微信用户的 Agent
|
|
6
|
+
avatar:
|
|
7
|
+
emoji:
|
|
8
|
+
id: speech_balloon
|
|
9
|
+
background: rgb(220, 252, 231)
|
|
10
|
+
options:
|
|
11
|
+
templateKey: wechat-personal-user-assistant
|
|
12
|
+
dataXpert:
|
|
13
|
+
managedBy: data-xpert
|
|
14
|
+
templateKey: wechat-personal-user-assistant
|
|
15
|
+
assistantKind: wechat-personal-user-assistant
|
|
16
|
+
businessDomain: wechat-personal
|
|
17
|
+
wechatPersonalRole: user
|
|
18
|
+
requiredPlugin: '@xpert-ai/plugin-community-wechat'
|
|
19
|
+
requiredPlugins:
|
|
20
|
+
- '@xpert-ai/plugin-community-wechat'
|
|
21
|
+
requiredCapabilities:
|
|
22
|
+
- wechat_personal_bridge
|
|
23
|
+
- wechat-personal-runtime
|
|
24
|
+
- wechat-personal-workbench
|
|
25
|
+
agentConfig:
|
|
26
|
+
recursionLimit: 10000
|
|
27
|
+
features:
|
|
28
|
+
sandbox:
|
|
29
|
+
enabled: false
|
|
30
|
+
version: "1"
|
|
31
|
+
agent:
|
|
32
|
+
key: Agent_WechatPersonalUser
|
|
33
|
+
copilotModel:
|
|
34
|
+
referencedId: null
|
|
35
|
+
modelType: llm
|
|
36
|
+
model: qwen3.6-plus
|
|
37
|
+
options:
|
|
38
|
+
context_size: 1000000
|
|
39
|
+
temperature: 0.4
|
|
40
|
+
maxRetries: 4
|
|
41
|
+
max_tokens: 4096
|
|
42
|
+
top_p: 0.95
|
|
43
|
+
knowledgebases: []
|
|
44
|
+
toolsets: []
|
|
45
|
+
tags: []
|
|
46
|
+
nodes:
|
|
47
|
+
- type: agent
|
|
48
|
+
key: Agent_WechatPersonalUser
|
|
49
|
+
position:
|
|
50
|
+
x: 860
|
|
51
|
+
y: 20
|
|
52
|
+
entity:
|
|
53
|
+
key: Agent_WechatPersonalUser
|
|
54
|
+
name: wechat-personal-user-assistant
|
|
55
|
+
title: 个人微信会话助手
|
|
56
|
+
description: 通过 wx2.0 接收个人微信消息并自然回复微信用户的 Agent
|
|
57
|
+
avatar:
|
|
58
|
+
emoji:
|
|
59
|
+
id: speech_balloon
|
|
60
|
+
background: rgb(220, 252, 231)
|
|
61
|
+
prompt: >
|
|
62
|
+
You are a Personal WeChat conversation assistant connected through the Xpert personal WeChat plugin.
|
|
63
|
+
|
|
64
|
+
Reply naturally in the context of the current WeChat conversation. Your final answer will be sent
|
|
65
|
+
directly to the WeChat user, so keep it concise, conversational, and suitable for a chat bubble.
|
|
66
|
+
Do not mention internal plugin names, system configuration, callback URLs, API tokens, integration
|
|
67
|
+
ids, queue ids, or hidden routing details.
|
|
68
|
+
|
|
69
|
+
In private chats, answer the user's message directly. In group chats, reply only because the plugin
|
|
70
|
+
has already determined that the message mentioned the assistant or matched configured keywords. Do
|
|
71
|
+
not broaden the conversation beyond the triggered message unless the user asks.
|
|
72
|
+
|
|
73
|
+
If important context is missing, ask one clear clarifying question first. Do not invent facts,
|
|
74
|
+
identities, business records, prices, dates, or previous messages. If the user requests an action
|
|
75
|
+
that needs external systems or permissions you do not have, explain what information or access is
|
|
76
|
+
needed.
|
|
77
|
+
|
|
78
|
+
Personal WeChat runtime tools are available only for setup, status, callback, account, conversation,
|
|
79
|
+
and log administration requests. Do not use them for ordinary replies. Your final answer is
|
|
80
|
+
automatically sent back to WeChat by the plugin after the Agent finishes.
|
|
81
|
+
|
|
82
|
+
Prefer Chinese when the user writes Chinese; otherwise mirror the user's language. Avoid markdown
|
|
83
|
+
tables unless explicitly requested, because the reply is sent as plain WeChat text.
|
|
84
|
+
collaboratorNames: []
|
|
85
|
+
toolsetIds: []
|
|
86
|
+
knowledgebaseIds: []
|
|
87
|
+
hash: wechat-personal-user-agent-v1
|
|
88
|
+
- type: workflow
|
|
89
|
+
key: Trigger_WechatPersonal
|
|
90
|
+
position:
|
|
91
|
+
x: 520
|
|
92
|
+
y: 20
|
|
93
|
+
entity:
|
|
94
|
+
type: trigger
|
|
95
|
+
key: Trigger_WechatPersonal
|
|
96
|
+
title: 触发器
|
|
97
|
+
from: wechat_personal
|
|
98
|
+
config:
|
|
99
|
+
enabled: true
|
|
100
|
+
sessionTimeoutSeconds: 3600
|
|
101
|
+
summaryWindowSeconds: 0
|
|
102
|
+
groupTriggerMode: mention_or_keywords
|
|
103
|
+
integrationId: ""
|
|
104
|
+
hash: wechat-personal-user-trigger-v1
|
|
105
|
+
- type: workflow
|
|
106
|
+
key: Middleware_WechatPersonalRuntime
|
|
107
|
+
position:
|
|
108
|
+
x: 1160
|
|
109
|
+
y: 332
|
|
110
|
+
entity:
|
|
111
|
+
type: middleware
|
|
112
|
+
key: Middleware_WechatPersonalRuntime
|
|
113
|
+
title: Personal WeChat Runtime Tools
|
|
114
|
+
provider: WechatPersonalRuntimeMiddleware
|
|
115
|
+
required: true
|
|
116
|
+
options:
|
|
117
|
+
integrationId: ""
|
|
118
|
+
hash: wechat-personal-user-middleware-v1
|
|
119
|
+
connections:
|
|
120
|
+
- type: workflow
|
|
121
|
+
key: Trigger_WechatPersonal/Agent_WechatPersonalUser
|
|
122
|
+
from: Trigger_WechatPersonal
|
|
123
|
+
to: Agent_WechatPersonalUser
|
|
124
|
+
- type: workflow
|
|
125
|
+
key: Agent_WechatPersonalUser/Middleware_WechatPersonalRuntime
|
|
126
|
+
from: Agent_WechatPersonalUser
|
|
127
|
+
to: Middleware_WechatPersonalRuntime
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xpert-ai/plugin-community-wechat",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Personal WeChat bridge integration for wx2.0 callbacks, Xpert Agent dispatch, and text replies.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/xpert-ai/xpert-plugins",
|
|
8
|
+
"directory": "community/integrations/wechat"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"module": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": "./package.json",
|
|
16
|
+
".": {
|
|
17
|
+
"@xpert-plugins-starter/source": "./src/index.ts",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"import": "./dist/index.js",
|
|
20
|
+
"default": "./dist/index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"!**/*.tsbuildinfo"
|
|
26
|
+
],
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"tslib": "^2.3.0"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"@langchain/core": ">=0.3.0",
|
|
32
|
+
"@nestjs/cache-manager": "^3.0.1",
|
|
33
|
+
"@nestjs/common": "^11.1.6",
|
|
34
|
+
"@nestjs/core": "^11.1.6",
|
|
35
|
+
"@nestjs/typeorm": "^11.0.0",
|
|
36
|
+
"@xpert-ai/contracts": "^3.11.0",
|
|
37
|
+
"@xpert-ai/plugin-sdk": "^3.11.0",
|
|
38
|
+
"cache-manager": "^7.2.0",
|
|
39
|
+
"react": ">=18",
|
|
40
|
+
"react-dom": ">=18",
|
|
41
|
+
"typeorm": "^0.3.24",
|
|
42
|
+
"zod": "3.25.67"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@langchain/core": "0.3.72",
|
|
46
|
+
"@nestjs/cache-manager": "^3.0.1",
|
|
47
|
+
"@nestjs/common": "^11.1.6",
|
|
48
|
+
"@nestjs/core": "^11.1.6",
|
|
49
|
+
"@nestjs/typeorm": "^11.0.0",
|
|
50
|
+
"@swc/core": "~1.5.7",
|
|
51
|
+
"@swc/helpers": "~0.5.11",
|
|
52
|
+
"@swc/jest": "~0.2.38",
|
|
53
|
+
"@types/jest": "^29.5.14",
|
|
54
|
+
"@types/node": "^20.19.9",
|
|
55
|
+
"@xpert-ai/chatkit-types": "^0.3.13",
|
|
56
|
+
"@xpert-ai/contracts": "^3.11.0",
|
|
57
|
+
"@xpert-ai/plugin-sdk": "3.10.1",
|
|
58
|
+
"cache-manager": "^7.2.0",
|
|
59
|
+
"echarts": "5.5.0",
|
|
60
|
+
"esbuild": "^0.27.0",
|
|
61
|
+
"jest": "^29.7.0",
|
|
62
|
+
"reflect-metadata": "^0.2.2",
|
|
63
|
+
"rxjs": "^7.8.1",
|
|
64
|
+
"ts-node": "10.9.1",
|
|
65
|
+
"typeorm": "^0.3.24",
|
|
66
|
+
"typescript": "^5.9.2",
|
|
67
|
+
"zod": "3.25.67"
|
|
68
|
+
},
|
|
69
|
+
"xpert": {
|
|
70
|
+
"plugin": {
|
|
71
|
+
"level": "system"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"scripts": {
|
|
75
|
+
"build": "node scripts/build-remote-components.mjs && tsc -p tsconfig.lib.json && node scripts/copy-assets.mjs",
|
|
76
|
+
"test": "jest --config jest.config.ts --runInBand",
|
|
77
|
+
"typecheck": "tsc -p tsconfig.spec.json --noEmit && node scripts/build-remote-components.mjs --check"
|
|
78
|
+
}
|
|
79
|
+
}
|