@qihoo/tuitui-openclaw-channel 1.0.23 → 1.0.25
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 +2 -2
- package/index.ts +21 -21
- package/openclaw.plugin.json +174 -182
- package/package.json +37 -37
- package/skills/tuitui-im-read/SKILL.md +143 -143
- package/src/accounts.ts +49 -28
- package/src/channel.ts +295 -283
- package/src/const.ts +2 -2
- package/src/deduplicator.ts +120 -120
- package/src/env.ts +15 -15
- package/src/filespace.ts +226 -45
- package/src/histories.ts +130 -130
- package/src/inbound.ts +524 -523
- package/src/inbound_body_parse.ts +100 -100
- package/src/monitor.ts +331 -0
- package/src/outbound.ts +447 -608
- package/src/robot_api.ts +270 -123
- package/src/tools.ts +164 -141
- package/src/types.ts +158 -167
- package/src/utils.ts +10 -6
- package/src/websocket.ts +106 -106
- package/memory/2026-04-02.md +0 -32
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# openclaw-tuitui-channel
|
|
2
|
-
|
|
1
|
+
# openclaw-tuitui-channel
|
|
2
|
+
|
|
3
3
|
tuitui-channel
|
package/index.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import type { OpenClawPluginApi } from 'openclaw/plugin-sdk';
|
|
2
|
-
import { emptyPluginConfigSchema } from 'openclaw/plugin-sdk/core';
|
|
3
|
-
import {
|
|
4
|
-
import { registerTuituiTools } from './src/tools';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
registerTuituiTools(api);
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
console.log(`[${CHANNEL_ID}] Tuitui Extension Loaded!`);
|
|
21
|
-
export default plugin;
|
|
1
|
+
import type { OpenClawPluginApi } from 'openclaw/plugin-sdk';
|
|
2
|
+
import { emptyPluginConfigSchema } from 'openclaw/plugin-sdk/core';
|
|
3
|
+
import { registerTuiTuiChannel } from './src/channel';
|
|
4
|
+
import { registerTuituiTools } from './src/tools';
|
|
5
|
+
import { registerMonitorHooks } from './src/monitor';
|
|
6
|
+
import { CHANNEL_ID, CHANNEL_NAME } from './src/const';
|
|
7
|
+
import { id } from './openclaw.plugin.json';
|
|
8
|
+
|
|
9
|
+
const plugin = {
|
|
10
|
+
id, // plugin id not is CHANNEL_ID
|
|
11
|
+
name: CHANNEL_NAME,
|
|
12
|
+
description: `${CHANNEL_NAME} chat integration for OpenClaw via WebSocket`,
|
|
13
|
+
configSchema: emptyPluginConfigSchema(),
|
|
14
|
+
register(api: OpenClawPluginApi) {
|
|
15
|
+
registerTuiTuiChannel(api);
|
|
16
|
+
registerTuituiTools(api);
|
|
17
|
+
registerMonitorHooks(api);
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
console.log(`[${CHANNEL_ID}] Tuitui Extension Loaded!`);
|
|
21
|
+
export default plugin;
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,183 +1,175 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "tuitui-openclaw-channel",
|
|
3
|
-
"channels": ["tuitui"],
|
|
4
|
-
"skills": ["./skills"],
|
|
5
|
-
"configSchema": {
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"properties": {}
|
|
9
|
-
},
|
|
10
|
-
"channelConfigs": {
|
|
11
|
-
"tuitui": {
|
|
12
|
-
"schema": {
|
|
13
|
-
"type": "object",
|
|
14
|
-
"additionalProperties": false,
|
|
15
|
-
"properties": {
|
|
16
|
-
"enabled": { "type": "boolean", "default": true },
|
|
17
|
-
"appId": { "type": "string", "default": "" },
|
|
18
|
-
"appSecret": { "type": "string" },
|
|
19
|
-
"dmPolicy": {
|
|
20
|
-
"type": "string",
|
|
21
|
-
"default": "pairing",
|
|
22
|
-
"enum": ["pairing", "allowlist", "open", "disabled"]
|
|
23
|
-
},
|
|
24
|
-
"allowFrom": {
|
|
25
|
-
"type": "array",
|
|
26
|
-
"default": [],
|
|
27
|
-
"items": { "type": "string" }
|
|
28
|
-
},
|
|
29
|
-
"groupPolicy": {
|
|
30
|
-
"type": "string",
|
|
31
|
-
"default": "allowlist",
|
|
32
|
-
"enum": ["allowlist", "disabled"]
|
|
33
|
-
},
|
|
34
|
-
"requireMention": { "type": "boolean", "default": true },
|
|
35
|
-
"groupAllowFrom": {
|
|
36
|
-
"type": "array",
|
|
37
|
-
"default": [],
|
|
38
|
-
"items": { "type": "string" }
|
|
39
|
-
},
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"
|
|
89
|
-
"help": "
|
|
90
|
-
"order":
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"accounts.*.
|
|
138
|
-
"help": "
|
|
139
|
-
"order":
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
"
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
"
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
"
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
"
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
"
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
"
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
"accounts.*.emojiReaction": {
|
|
176
|
-
"help": "在收到消息后,大模型给出反应结果前,先对原消息发送一个\"收到\"的表情回复。",
|
|
177
|
-
"order": 310,
|
|
178
|
-
"advanced": true
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"id": "tuitui-openclaw-channel",
|
|
3
|
+
"channels": ["tuitui"],
|
|
4
|
+
"skills": ["./skills"],
|
|
5
|
+
"configSchema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {}
|
|
9
|
+
},
|
|
10
|
+
"channelConfigs": {
|
|
11
|
+
"tuitui": {
|
|
12
|
+
"schema": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"properties": {
|
|
16
|
+
"enabled": { "type": "boolean", "default": true },
|
|
17
|
+
"appId": { "type": "string", "default": "" },
|
|
18
|
+
"appSecret": { "type": "string" },
|
|
19
|
+
"dmPolicy": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"default": "pairing",
|
|
22
|
+
"enum": ["pairing", "allowlist", "open", "disabled"]
|
|
23
|
+
},
|
|
24
|
+
"allowFrom": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"default": [],
|
|
27
|
+
"items": { "type": "string" }
|
|
28
|
+
},
|
|
29
|
+
"groupPolicy": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"default": "allowlist",
|
|
32
|
+
"enum": ["allowlist", "disabled"]
|
|
33
|
+
},
|
|
34
|
+
"requireMention": { "type": "boolean", "default": true },
|
|
35
|
+
"groupAllowFrom": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"default": [],
|
|
38
|
+
"items": { "type": "string" }
|
|
39
|
+
},
|
|
40
|
+
"emojiReaction": { "type": "boolean", "default": true },
|
|
41
|
+
"monitorEnabled": { "type": "boolean", "default": false },
|
|
42
|
+
"accounts": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"additionalProperties": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"properties": {
|
|
48
|
+
"enabled": { "type": "boolean", "default": true },
|
|
49
|
+
"appId": { "type": "string", "default": "" },
|
|
50
|
+
"appSecret": { "type": "string" },
|
|
51
|
+
"dmPolicy": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"default": "pairing",
|
|
54
|
+
"enum": ["pairing", "allowlist", "open", "disabled"]
|
|
55
|
+
},
|
|
56
|
+
"allowFrom": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"default": [],
|
|
59
|
+
"items": { "type": "string" }
|
|
60
|
+
},
|
|
61
|
+
"groupPolicy": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"default": "allowlist",
|
|
64
|
+
"enum": ["allowlist", "disabled"]
|
|
65
|
+
},
|
|
66
|
+
"requireMention": { "type": "boolean", "default": true },
|
|
67
|
+
"groupAllowFrom": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": { "type": "string" }
|
|
70
|
+
},
|
|
71
|
+
"emojiReaction": { "type": "boolean", "default": true },
|
|
72
|
+
"monitorEnabled": { "type": "boolean", "default": false }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"uiHints": {
|
|
79
|
+
"enabled": { "order": 1, "help": "开启或关闭" },
|
|
80
|
+
"appId": {
|
|
81
|
+
"help": "推推机器人身份 AppId(你可以推推搜索【推推机器人助手】,和它聊天自助申请推推机器人)",
|
|
82
|
+
"order": 2
|
|
83
|
+
},
|
|
84
|
+
"appSecret": {
|
|
85
|
+
"help": "推推机器人密钥 Secret(推推机器人的 App Secret)",
|
|
86
|
+
"order": 3
|
|
87
|
+
},
|
|
88
|
+
"dmPolicy": {
|
|
89
|
+
"help": "私聊策略(pairing=配对(默认);allowlist=白名单;open=允许所有(不安全);disabled=禁用私聊)",
|
|
90
|
+
"order": 10,
|
|
91
|
+
"advanced": true
|
|
92
|
+
},
|
|
93
|
+
"allowFrom": {
|
|
94
|
+
"help": "私聊白名单-域账号(dmPolicy=allowlist 时生效;pairing 下可用于显式放行用户)。对群聊/团队也能生效",
|
|
95
|
+
"order": 11,
|
|
96
|
+
"advanced": true
|
|
97
|
+
},
|
|
98
|
+
"groupPolicy": {
|
|
99
|
+
"help": "群聊/团队策略(allowlist=白名单;disabled=禁用)",
|
|
100
|
+
"order": 12,
|
|
101
|
+
"advanced": true
|
|
102
|
+
},
|
|
103
|
+
"requireMention": {
|
|
104
|
+
"help": "群组/团队是否需要 @ 机器人才触发 Agent(默认 true)。注意:如果你关闭了这个开关,且有多个龙虾机器人在同一个群里,他们会聊的停不下来",
|
|
105
|
+
"order": 13,
|
|
106
|
+
"advanced": true
|
|
107
|
+
},
|
|
108
|
+
"groupAllowFrom": {
|
|
109
|
+
"help": "群组/团队白名单-包含群ID、团队ID或频道ID(仅在 groupPolicy=allowlist 生效)",
|
|
110
|
+
"order": 14,
|
|
111
|
+
"advanced": true
|
|
112
|
+
},
|
|
113
|
+
"emojiReaction": {
|
|
114
|
+
"help": "在收到消息后,大模型给出反应结果前,先对原消息发送一个\"收到\"的表情回复。",
|
|
115
|
+
"order": 16,
|
|
116
|
+
"advanced": true
|
|
117
|
+
},
|
|
118
|
+
"monitorEnabled": {
|
|
119
|
+
"help": "是否开启工作状态监控上报(默认 false)。开启后,所有 Agent 事件的完整原始数据将实时上报到监控接口。",
|
|
120
|
+
"order": 17,
|
|
121
|
+
"advanced": true
|
|
122
|
+
},
|
|
123
|
+
"accounts": {
|
|
124
|
+
"help": "Accounts(多账户配置)",
|
|
125
|
+
"order": 30,
|
|
126
|
+
"advanced": true
|
|
127
|
+
},
|
|
128
|
+
"accounts.*.enabled": { "order": 301, "help": "开启或关闭" },
|
|
129
|
+
"accounts.*.appId": {
|
|
130
|
+
"help": "推推机器人身份 AppId(你可以推推搜索【推推机器人助手】,和它聊天自助申请推推机器人)",
|
|
131
|
+
"order": 302
|
|
132
|
+
},
|
|
133
|
+
"accounts.*.appSecret": {
|
|
134
|
+
"help": "推推机器人密钥 Secret(推推机器人的 App Secret)",
|
|
135
|
+
"order": 303
|
|
136
|
+
},
|
|
137
|
+
"accounts.*.dmPolicy": {
|
|
138
|
+
"help": "私聊策略(pairing=配对(默认);allowlist=白名单;open=允许所有(不安全);disabled=禁用私聊)",
|
|
139
|
+
"order": 304,
|
|
140
|
+
"advanced": true
|
|
141
|
+
},
|
|
142
|
+
"accounts.*.allowFrom": {
|
|
143
|
+
"help": "私聊白名单-推推域账号(dmPolicy=allowlist 时生效;pairing 下可用于显式放行用户);对群、团队也生效",
|
|
144
|
+
"order": 305,
|
|
145
|
+
"advanced": true
|
|
146
|
+
},
|
|
147
|
+
"accounts.*.groupPolicy": {
|
|
148
|
+
"help": "群聊/团队策略(allowlist=白名单;disabled=禁用)",
|
|
149
|
+
"order": 306,
|
|
150
|
+
"advanced": true
|
|
151
|
+
},
|
|
152
|
+
"accounts.*.requireMention": {
|
|
153
|
+
"help": "群组/团队是否需要 @ 机器人才触发 Agent(默认 true)",
|
|
154
|
+
"order": 307,
|
|
155
|
+
"advanced": true
|
|
156
|
+
},
|
|
157
|
+
"accounts.*.groupAllowFrom": {
|
|
158
|
+
"help": "群组/团队白名单-包含群ID、团队ID或频道ID(仅在 groupPolicy=allowlist 生效)。如果不想所有人使用,可以配置私聊白名单,私聊白名单对群/团队仍然有效",
|
|
159
|
+
"order": 308,
|
|
160
|
+
"advanced": true
|
|
161
|
+
},
|
|
162
|
+
"accounts.*.emojiReaction": {
|
|
163
|
+
"help": "在收到消息后,大模型给出反应结果前,先对原消息发送一个\"收到\"的表情回复。",
|
|
164
|
+
"order": 310,
|
|
165
|
+
"advanced": true
|
|
166
|
+
},
|
|
167
|
+
"accounts.*.monitorEnabled": {
|
|
168
|
+
"help": "是否开启工作状态监控上报(默认 false)。",
|
|
169
|
+
"order": 311,
|
|
170
|
+
"advanced": true
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
183
175
|
}
|
package/package.json
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@qihoo/tuitui-openclaw-channel",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"maintainers": [
|
|
5
|
-
{
|
|
6
|
-
"name": "huzunjie",
|
|
7
|
-
"email": "huzunjie@pyzy.net"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"name": "zhaohuaqiang",
|
|
11
|
-
"email": "zhaohuaqiang@360.cn"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"name": "xiaoshasha",
|
|
15
|
-
"email": "xiaoshasha@360.cn"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
"description": "TuiTui channel plugin for OpenClaw",
|
|
19
|
-
"type": "module",
|
|
20
|
-
"peerDependencies": {
|
|
21
|
-
"openclaw": ">=2026.3.13"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@sinclair/typebox": "^0.34.48",
|
|
25
|
-
"ws": "^8.13.0"
|
|
26
|
-
},
|
|
27
|
-
"openclaw": {
|
|
28
|
-
"extensions": [
|
|
29
|
-
"./index.ts"
|
|
30
|
-
],
|
|
31
|
-
"install": {
|
|
32
|
-
"npmSpec": "@qihoo/tuitui-openclaw-channel",
|
|
33
|
-
"localPath": "extensions/tuitui",
|
|
34
|
-
"defaultChoice": "npm"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@qihoo/tuitui-openclaw-channel",
|
|
3
|
+
"version": "1.0.25",
|
|
4
|
+
"maintainers": [
|
|
5
|
+
{
|
|
6
|
+
"name": "huzunjie",
|
|
7
|
+
"email": "huzunjie@pyzy.net"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "zhaohuaqiang",
|
|
11
|
+
"email": "zhaohuaqiang@360.cn"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "xiaoshasha",
|
|
15
|
+
"email": "xiaoshasha@360.cn"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"description": "TuiTui channel plugin for OpenClaw",
|
|
19
|
+
"type": "module",
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"openclaw": ">=2026.3.13"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@sinclair/typebox": "^0.34.48",
|
|
25
|
+
"ws": "^8.13.0"
|
|
26
|
+
},
|
|
27
|
+
"openclaw": {
|
|
28
|
+
"extensions": [
|
|
29
|
+
"./index.ts"
|
|
30
|
+
],
|
|
31
|
+
"install": {
|
|
32
|
+
"npmSpec": "@qihoo/tuitui-openclaw-channel",
|
|
33
|
+
"localPath": "extensions/tuitui",
|
|
34
|
+
"defaultChoice": "npm"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|