@core-workspace/infoflow-openclaw-plugin 2026.3.36 → 2026.4.10
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 +56 -22
- package/dist/index.cjs +45821 -0
- package/openclaw.plugin.json +647 -140
- package/package.json +23 -10
- package/CHANGELOG.md +0 -21
- package/docs/architecture-data-flow.md +0 -429
- package/docs/architecture.md +0 -423
- package/docs/dev-guide.md +0 -611
- package/docs/qa-feature-list.md +0 -413
- package/index.ts +0 -53
- package/publish.sh +0 -221
- package/scripts/deploy.sh +0 -34
- package/scripts/npm-tools/README.md +0 -70
- package/scripts/npm-tools/cli.js +0 -262
- package/scripts/npm-tools/package.json +0 -21
- package/skills/infoflow-dev/SKILL.md +0 -88
- package/skills/infoflow-dev/references/api.md +0 -413
- package/src/adapter/inbound/webhook-parser.ts +0 -433
- package/src/adapter/inbound/ws-receiver.ts +0 -268
- package/src/adapter/outbound/reply-dispatcher.ts +0 -274
- package/src/adapter/outbound/target-resolver.ts +0 -109
- package/src/channel/accounts.ts +0 -184
- package/src/channel/channel.ts +0 -365
- package/src/channel/media.ts +0 -373
- package/src/channel/monitor.ts +0 -184
- package/src/channel/outbound.ts +0 -942
- package/src/commands/changelog.ts +0 -53
- package/src/commands/doctor.ts +0 -391
- package/src/commands/logs.ts +0 -212
- package/src/events.ts +0 -62
- package/src/handler/message-handler.ts +0 -796
- package/src/logging.ts +0 -123
- package/src/runtime.ts +0 -14
- package/src/security/dm-policy.ts +0 -80
- package/src/security/group-policy.ts +0 -273
- package/src/tools/actions/index.ts +0 -456
- package/src/tools/hooks/index.ts +0 -82
- package/src/tools/index.ts +0 -277
- package/src/types.ts +0 -293
- package/src/utils/store/message-store.ts +0 -295
- package/src/utils/token-adapter.ts +0 -90
package/openclaw.plugin.json
CHANGED
|
@@ -1,159 +1,666 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "infoflow-openclaw-plugin",
|
|
3
|
-
"channels": [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"default": "webhook",
|
|
20
|
-
"description": "消息接收方式:webhook(HTTP 回调)或 websocket(长连接)"
|
|
21
|
-
},
|
|
22
|
-
"wsGateway": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"description": "WebSocket Gateway 域名(仅 websocket 模式使用)"
|
|
25
|
-
},
|
|
26
|
-
"robotName": { "type": "string" },
|
|
27
|
-
"appAgentId": {
|
|
28
|
-
"type": "number",
|
|
29
|
-
"description": "如流企业后台的应用ID,私聊消息撤回依赖此字段"
|
|
30
|
-
},
|
|
31
|
-
"dmPolicy": { "type": "string", "enum": ["open", "pairing", "allowlist"] },
|
|
32
|
-
"allowFrom": { "type": "array", "items": { "type": "string" } },
|
|
33
|
-
"groupPolicy": { "type": "string", "enum": ["open", "allowlist", "disabled"] },
|
|
34
|
-
"groupAllowFrom": { "type": "array", "items": { "type": "string" } },
|
|
35
|
-
"requireMention": { "type": "boolean" },
|
|
36
|
-
"replyMode": {
|
|
37
|
-
"type": "string",
|
|
38
|
-
"enum": ["ignore", "record", "mention-only", "mention-and-watch", "proactive"],
|
|
39
|
-
"default": "mention-and-watch"
|
|
40
|
-
},
|
|
41
|
-
"groupSessionMode": {
|
|
42
|
-
"type": "string",
|
|
43
|
-
"enum": ["group", "user"],
|
|
44
|
-
"default": "group",
|
|
45
|
-
"description": "群聊会话拆分模式:group=按群拆分,user=按群+人拆分"
|
|
46
|
-
},
|
|
47
|
-
"followUp": { "type": "boolean", "default": true },
|
|
48
|
-
"followUpWindow": { "type": "number", "default": 300 },
|
|
49
|
-
"watchMentions": { "type": "array", "items": { "type": "string" } },
|
|
50
|
-
"watchRegex": { "type": "string" },
|
|
51
|
-
"groups": {
|
|
3
|
+
"channels": [
|
|
4
|
+
"infoflow"
|
|
5
|
+
],
|
|
6
|
+
"skills": [
|
|
7
|
+
"./skills"
|
|
8
|
+
],
|
|
9
|
+
"permissions": {
|
|
10
|
+
"childProcess": {
|
|
11
|
+
"enabled": true,
|
|
12
|
+
"commands": ["openclaw"],
|
|
13
|
+
"justification": "需要调用 openclaw 命令来创建定时任务(infoflow_cron 工具)"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"channelConfigs": {
|
|
17
|
+
"infoflow": {
|
|
18
|
+
"schema": {
|
|
52
19
|
"type": "object",
|
|
53
|
-
"additionalProperties":
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
"groupSessionMode": {
|
|
61
|
-
"type": "string",
|
|
62
|
-
"enum": ["group", "user"],
|
|
63
|
-
"description": "群聊会话拆分模式:group=按群拆分,user=按群+人拆分"
|
|
64
|
-
},
|
|
65
|
-
"watchMentions": { "type": "array", "items": { "type": "string" } },
|
|
66
|
-
"watchRegex": { "type": "string" },
|
|
67
|
-
"followUp": { "type": "boolean" },
|
|
68
|
-
"followUpWindow": { "type": "number" },
|
|
69
|
-
"systemPrompt": { "type": "string" }
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"properties": {
|
|
22
|
+
"enabled": {
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"default": true,
|
|
25
|
+
"description": "是否启用当前 Infoflow 账号"
|
|
70
26
|
},
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
27
|
+
"name": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "账号展示名称,仅用于控制面板区分账号"
|
|
30
|
+
},
|
|
31
|
+
"apiHost": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"default": "https://apiin.im.baidu.com",
|
|
34
|
+
"description": "如流发送 API 域名"
|
|
35
|
+
},
|
|
36
|
+
"connectionMode": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"enum": [
|
|
39
|
+
"webhook",
|
|
40
|
+
"websocket"
|
|
41
|
+
],
|
|
42
|
+
"default": "websocket",
|
|
43
|
+
"description": "消息接收模式,默认 websocket"
|
|
44
|
+
},
|
|
45
|
+
"wsGateway": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"default": "infoflow-open-gateway.weiyun.baidu.com",
|
|
48
|
+
"description": "WebSocket 网关域名,仅 websocket 模式使用"
|
|
49
|
+
},
|
|
50
|
+
"wsConnectDomain": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "WebSocket 连接域名,用于 Phase 2 实际 WS 握手(不填则使用服务端返回的地址,内网环境可配置此项)"
|
|
53
|
+
},
|
|
54
|
+
"robotId": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "无需手动填写,自动发现。如流机器人实际 ID(首次被 @ 时从消息体中提取,用于忽略自身消息)"
|
|
57
|
+
},
|
|
58
|
+
"dashboardUrl": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "Dashboard 访问地址,用于任务深链接"
|
|
61
|
+
},
|
|
62
|
+
"checkToken": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"description": "Webhook 校验 token,仅 webhook 模式必填"
|
|
65
|
+
},
|
|
66
|
+
"encodingAESKey": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"description": "Webhook 加密密钥,仅 webhook 模式必填"
|
|
69
|
+
},
|
|
70
|
+
"appKey": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "如流应用 AppKey"
|
|
73
|
+
},
|
|
74
|
+
"appSecret": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "如流应用 AppSecret"
|
|
77
|
+
},
|
|
78
|
+
"robotName": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"description": "群聊中用于识别 @机器人的显示名"
|
|
81
|
+
},
|
|
82
|
+
"appAgentId": {
|
|
83
|
+
"type": "integer",
|
|
84
|
+
"minimum": 1,
|
|
85
|
+
"description": "如流应用 ID,私聊撤回依赖该字段"
|
|
86
|
+
},
|
|
87
|
+
"dmPolicy": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"enum": [
|
|
90
|
+
"open",
|
|
91
|
+
"pairing",
|
|
92
|
+
"allowlist"
|
|
93
|
+
],
|
|
94
|
+
"default": "open",
|
|
95
|
+
"description": "单聊访问策略"
|
|
96
|
+
},
|
|
97
|
+
"allowFrom": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": {
|
|
100
|
+
"type": "string"
|
|
104
101
|
},
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
"description": "单聊白名单,dmPolicy=allowlist 时生效"
|
|
103
|
+
},
|
|
104
|
+
"groupPolicy": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"enum": [
|
|
107
|
+
"open",
|
|
108
|
+
"allowlist",
|
|
109
|
+
"disabled"
|
|
110
|
+
],
|
|
111
|
+
"default": "open",
|
|
112
|
+
"description": "群聊访问策略"
|
|
113
|
+
},
|
|
114
|
+
"groupAllowFrom": {
|
|
115
|
+
"type": "array",
|
|
116
|
+
"items": {
|
|
117
|
+
"type": "string"
|
|
109
118
|
},
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
"
|
|
114
|
-
"
|
|
119
|
+
"description": "群聊白名单,groupPolicy=allowlist 时生效"
|
|
120
|
+
},
|
|
121
|
+
"requireMention": {
|
|
122
|
+
"type": "boolean",
|
|
123
|
+
"default": true,
|
|
124
|
+
"description": "未显式设置 replyMode 时,是否要求先 @机器人"
|
|
125
|
+
},
|
|
126
|
+
"replyMode": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"enum": [
|
|
129
|
+
"ignore",
|
|
130
|
+
"record",
|
|
131
|
+
"mention-only"
|
|
132
|
+
],
|
|
133
|
+
"description": "群聊回复模式"
|
|
134
|
+
},
|
|
135
|
+
"groupSessionMode": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"enum": [
|
|
138
|
+
"group",
|
|
139
|
+
"user"
|
|
140
|
+
],
|
|
141
|
+
"default": "group",
|
|
142
|
+
"description": "群聊会话拆分模式:group=按群,user=按群+人"
|
|
143
|
+
},
|
|
144
|
+
"followUp": {
|
|
145
|
+
"type": "boolean",
|
|
146
|
+
"default": false,
|
|
147
|
+
"description": "机器人回复后是否允许一段时间内连续追问"
|
|
148
|
+
},
|
|
149
|
+
"followUpWindow": {
|
|
150
|
+
"type": "integer",
|
|
151
|
+
"minimum": 0,
|
|
152
|
+
"default": 300,
|
|
153
|
+
"description": "追问窗口时长(秒)"
|
|
154
|
+
},
|
|
155
|
+
"dmMessageFormat": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"enum": [
|
|
158
|
+
"text",
|
|
159
|
+
"markdown",
|
|
160
|
+
"streaming-card"
|
|
161
|
+
],
|
|
162
|
+
"default": "markdown",
|
|
163
|
+
"description": "单聊回复格式"
|
|
164
|
+
},
|
|
165
|
+
"groupMessageFormat": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"enum": [
|
|
168
|
+
"text",
|
|
169
|
+
"markdown",
|
|
170
|
+
"streaming-card"
|
|
171
|
+
],
|
|
172
|
+
"default": "markdown",
|
|
173
|
+
"description": "群聊回复格式;markdown 和 streaming-card 不支持引用回复"
|
|
174
|
+
},
|
|
175
|
+
"processingHint": {
|
|
176
|
+
"type": "boolean",
|
|
177
|
+
"default": false,
|
|
178
|
+
"description": "处理较慢时先发送一条“收到啦”提示"
|
|
179
|
+
},
|
|
180
|
+
"processingHintDelay": {
|
|
181
|
+
"type": "integer",
|
|
182
|
+
"minimum": 0,
|
|
183
|
+
"default": 1,
|
|
184
|
+
"description": "发送处理中提示前的等待秒数"
|
|
185
|
+
},
|
|
186
|
+
"textChunkLimit": {
|
|
187
|
+
"type": "integer",
|
|
188
|
+
"minimum": 1,
|
|
189
|
+
"default": 1800,
|
|
190
|
+
"description": "长消息拆分的单段字符上限"
|
|
191
|
+
},
|
|
192
|
+
"defaultTo": {
|
|
193
|
+
"type": "string",
|
|
194
|
+
"description": "主动发送或兼容场景的默认目标,例如 alice 或 group:12345"
|
|
195
|
+
},
|
|
196
|
+
"privateDataDir": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"default": "plugins/infoflow-private",
|
|
199
|
+
"description": "插件私有数据目录,相对 OpenClaw stateDir"
|
|
200
|
+
},
|
|
201
|
+
"cronRelay": {
|
|
202
|
+
"type": "object",
|
|
203
|
+
"additionalProperties": false,
|
|
204
|
+
"properties": {
|
|
205
|
+
"enabled": {
|
|
206
|
+
"type": "boolean",
|
|
207
|
+
"default": true,
|
|
208
|
+
"description": "是否把 OpenClaw cron 运行结果转发到如流"
|
|
209
|
+
},
|
|
210
|
+
"includeAlreadyDelivered": {
|
|
211
|
+
"type": "boolean",
|
|
212
|
+
"default": false,
|
|
213
|
+
"description": "是否也转发已由 OpenClaw delivery 投递过的任务"
|
|
214
|
+
},
|
|
215
|
+
"prefix": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"default": "【定时任务】",
|
|
218
|
+
"description": "定时任务转发前缀"
|
|
219
|
+
},
|
|
220
|
+
"pollIntervalMs": {
|
|
221
|
+
"type": "integer",
|
|
222
|
+
"minimum": 500,
|
|
223
|
+
"default": 2000,
|
|
224
|
+
"description": "cron 运行日志轮询间隔(毫秒)"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"defaultAccount": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"description": "多账号模式下的默认账号 ID"
|
|
231
|
+
},
|
|
232
|
+
"groups": {
|
|
233
|
+
"type": "object",
|
|
234
|
+
"additionalProperties": {
|
|
235
|
+
"type": "object",
|
|
236
|
+
"additionalProperties": false,
|
|
237
|
+
"properties": {
|
|
238
|
+
"replyMode": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"enum": [
|
|
241
|
+
"ignore",
|
|
242
|
+
"record",
|
|
243
|
+
"mention-only"
|
|
244
|
+
],
|
|
245
|
+
"description": "群级回复模式覆盖"
|
|
246
|
+
},
|
|
247
|
+
"groupSessionMode": {
|
|
248
|
+
"type": "string",
|
|
249
|
+
"enum": [
|
|
250
|
+
"group",
|
|
251
|
+
"user"
|
|
252
|
+
],
|
|
253
|
+
"default": "group",
|
|
254
|
+
"description": "群聊会话拆分模式:group=按群,user=按群+人"
|
|
255
|
+
},
|
|
256
|
+
"followUp": {
|
|
257
|
+
"type": "boolean",
|
|
258
|
+
"default": false,
|
|
259
|
+
"description": "机器人回复后是否允许一段时间内连续追问"
|
|
260
|
+
},
|
|
261
|
+
"followUpWindow": {
|
|
262
|
+
"type": "integer",
|
|
263
|
+
"minimum": 0,
|
|
264
|
+
"default": 300,
|
|
265
|
+
"description": "追问窗口时长(秒)"
|
|
266
|
+
},
|
|
267
|
+
"systemPrompt": {
|
|
268
|
+
"type": "string",
|
|
269
|
+
"description": "该群专属的附加系统提示词"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"accounts": {
|
|
275
|
+
"type": "object",
|
|
276
|
+
"additionalProperties": {
|
|
115
277
|
"type": "object",
|
|
116
|
-
"additionalProperties":
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
278
|
+
"additionalProperties": false,
|
|
279
|
+
"properties": {
|
|
280
|
+
"enabled": {
|
|
281
|
+
"type": "boolean",
|
|
282
|
+
"default": true,
|
|
283
|
+
"description": "是否启用当前 Infoflow 账号"
|
|
284
|
+
},
|
|
285
|
+
"name": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"description": "账号展示名称,仅用于控制面板区分账号"
|
|
288
|
+
},
|
|
289
|
+
"apiHost": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"default": "https://apiin.im.baidu.com",
|
|
292
|
+
"description": "如流发送 API 域名"
|
|
293
|
+
},
|
|
294
|
+
"connectionMode": {
|
|
295
|
+
"type": "string",
|
|
296
|
+
"enum": [
|
|
297
|
+
"webhook",
|
|
298
|
+
"websocket"
|
|
299
|
+
],
|
|
300
|
+
"default": "websocket",
|
|
301
|
+
"description": "消息接收模式,默认 websocket"
|
|
302
|
+
},
|
|
303
|
+
"wsGateway": {
|
|
304
|
+
"type": "string",
|
|
305
|
+
"default": "infoflow-open-gateway.weiyun.baidu.com",
|
|
306
|
+
"description": "WebSocket 网关域名,仅 websocket 模式使用"
|
|
307
|
+
},
|
|
308
|
+
"wsConnectDomain": {
|
|
309
|
+
"type": "string",
|
|
310
|
+
"description": "WebSocket 连接域名,用于 Phase 2 实际 WS 握手(不填则使用服务端返回的地址,内网环境可配置此项)"
|
|
311
|
+
},
|
|
312
|
+
"robotId": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"description": "无需手动填写,自动发现。如流机器人实际 ID(首次被 @ 时从消息体中提取,用于忽略自身消息)"
|
|
315
|
+
},
|
|
316
|
+
"dashboardUrl": {
|
|
317
|
+
"type": "string",
|
|
318
|
+
"description": "Dashboard 访问地址,用于任务深链接"
|
|
319
|
+
},
|
|
320
|
+
"checkToken": {
|
|
321
|
+
"type": "string",
|
|
322
|
+
"description": "Webhook 校验 token,仅 webhook 模式必填"
|
|
323
|
+
},
|
|
324
|
+
"encodingAESKey": {
|
|
325
|
+
"type": "string",
|
|
326
|
+
"description": "Webhook 加密密钥,仅 webhook 模式必填"
|
|
327
|
+
},
|
|
328
|
+
"appKey": {
|
|
329
|
+
"type": "string",
|
|
330
|
+
"description": "如流应用 AppKey"
|
|
331
|
+
},
|
|
332
|
+
"appSecret": {
|
|
333
|
+
"type": "string",
|
|
334
|
+
"description": "如流应用 AppSecret"
|
|
335
|
+
},
|
|
336
|
+
"robotName": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"description": "群聊中用于识别 @机器人的显示名"
|
|
339
|
+
},
|
|
340
|
+
"appAgentId": {
|
|
341
|
+
"type": "integer",
|
|
342
|
+
"minimum": 1,
|
|
343
|
+
"description": "如流应用 ID,私聊撤回依赖该字段"
|
|
344
|
+
},
|
|
345
|
+
"dmPolicy": {
|
|
346
|
+
"type": "string",
|
|
347
|
+
"enum": [
|
|
348
|
+
"open",
|
|
349
|
+
"pairing",
|
|
350
|
+
"allowlist"
|
|
351
|
+
],
|
|
352
|
+
"default": "open",
|
|
353
|
+
"description": "单聊访问策略"
|
|
354
|
+
},
|
|
355
|
+
"allowFrom": {
|
|
356
|
+
"type": "array",
|
|
357
|
+
"items": {
|
|
358
|
+
"type": "string"
|
|
122
359
|
},
|
|
123
|
-
"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
360
|
+
"description": "单聊白名单,dmPolicy=allowlist 时生效"
|
|
361
|
+
},
|
|
362
|
+
"groupPolicy": {
|
|
363
|
+
"type": "string",
|
|
364
|
+
"enum": [
|
|
365
|
+
"open",
|
|
366
|
+
"allowlist",
|
|
367
|
+
"disabled"
|
|
368
|
+
],
|
|
369
|
+
"default": "open",
|
|
370
|
+
"description": "群聊访问策略"
|
|
371
|
+
},
|
|
372
|
+
"groupAllowFrom": {
|
|
373
|
+
"type": "array",
|
|
374
|
+
"items": {
|
|
375
|
+
"type": "string"
|
|
127
376
|
},
|
|
128
|
-
"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
"
|
|
132
|
-
"
|
|
377
|
+
"description": "群聊白名单,groupPolicy=allowlist 时生效"
|
|
378
|
+
},
|
|
379
|
+
"requireMention": {
|
|
380
|
+
"type": "boolean",
|
|
381
|
+
"default": true,
|
|
382
|
+
"description": "未显式设置 replyMode 时,是否要求先 @机器人"
|
|
383
|
+
},
|
|
384
|
+
"replyMode": {
|
|
385
|
+
"type": "string",
|
|
386
|
+
"enum": [
|
|
387
|
+
"ignore",
|
|
388
|
+
"record",
|
|
389
|
+
"mention-only"
|
|
390
|
+
],
|
|
391
|
+
"description": "群聊回复模式"
|
|
392
|
+
},
|
|
393
|
+
"groupSessionMode": {
|
|
394
|
+
"type": "string",
|
|
395
|
+
"enum": [
|
|
396
|
+
"group",
|
|
397
|
+
"user"
|
|
398
|
+
],
|
|
399
|
+
"default": "group",
|
|
400
|
+
"description": "群聊会话拆分模式:group=按群,user=按群+人"
|
|
401
|
+
},
|
|
402
|
+
"followUp": {
|
|
403
|
+
"type": "boolean",
|
|
404
|
+
"default": false,
|
|
405
|
+
"description": "机器人回复后是否允许一段时间内连续追问"
|
|
406
|
+
},
|
|
407
|
+
"followUpWindow": {
|
|
408
|
+
"type": "integer",
|
|
409
|
+
"minimum": 0,
|
|
410
|
+
"default": 300,
|
|
411
|
+
"description": "追问窗口时长(秒)"
|
|
412
|
+
},
|
|
413
|
+
"dmMessageFormat": {
|
|
414
|
+
"type": "string",
|
|
415
|
+
"enum": [
|
|
416
|
+
"text",
|
|
417
|
+
"markdown",
|
|
418
|
+
"streaming-card"
|
|
419
|
+
],
|
|
420
|
+
"default": "markdown",
|
|
421
|
+
"description": "单聊回复格式"
|
|
422
|
+
},
|
|
423
|
+
"groupMessageFormat": {
|
|
424
|
+
"type": "string",
|
|
425
|
+
"enum": [
|
|
426
|
+
"text",
|
|
427
|
+
"markdown",
|
|
428
|
+
"streaming-card"
|
|
429
|
+
],
|
|
430
|
+
"default": "markdown",
|
|
431
|
+
"description": "群聊回复格式;markdown 和 streaming-card 不支持引用回复"
|
|
432
|
+
},
|
|
433
|
+
"processingHint": {
|
|
434
|
+
"type": "boolean",
|
|
435
|
+
"default": false,
|
|
436
|
+
"description": "处理较慢时先发送一条”收到啦”提示"
|
|
133
437
|
},
|
|
134
|
-
"
|
|
438
|
+
"processingHintDelay": {
|
|
439
|
+
"type": "integer",
|
|
440
|
+
"minimum": 0,
|
|
441
|
+
"default": 1,
|
|
442
|
+
"description": "发送处理中提示前的等待秒数"
|
|
443
|
+
},
|
|
444
|
+
"textChunkLimit": {
|
|
445
|
+
"type": "integer",
|
|
446
|
+
"minimum": 1,
|
|
447
|
+
"default": 1800,
|
|
448
|
+
"description": "长消息拆分的单段字符上限"
|
|
449
|
+
},
|
|
450
|
+
"defaultTo": {
|
|
451
|
+
"type": "string",
|
|
452
|
+
"description": "主动发送或兼容场景的默认目标,例如 alice 或 group:12345"
|
|
453
|
+
},
|
|
454
|
+
"privateDataDir": {
|
|
455
|
+
"type": "string",
|
|
456
|
+
"default": "plugins/infoflow-private",
|
|
457
|
+
"description": "插件私有数据目录,相对 OpenClaw stateDir"
|
|
458
|
+
},
|
|
459
|
+
"cronRelay": {
|
|
460
|
+
"type": "object",
|
|
461
|
+
"additionalProperties": false,
|
|
462
|
+
"properties": {
|
|
463
|
+
"enabled": {
|
|
464
|
+
"type": "boolean",
|
|
465
|
+
"default": true,
|
|
466
|
+
"description": "是否把 OpenClaw cron 运行结果转发到如流"
|
|
467
|
+
},
|
|
468
|
+
"includeAlreadyDelivered": {
|
|
469
|
+
"type": "boolean",
|
|
470
|
+
"default": false,
|
|
471
|
+
"description": "是否也转发已由 OpenClaw delivery 投递过的任务"
|
|
472
|
+
},
|
|
473
|
+
"prefix": {
|
|
474
|
+
"type": "string",
|
|
475
|
+
"default": "【定时任务】",
|
|
476
|
+
"description": "定时任务转发前缀"
|
|
477
|
+
},
|
|
478
|
+
"pollIntervalMs": {
|
|
479
|
+
"type": "integer",
|
|
480
|
+
"minimum": 500,
|
|
481
|
+
"default": 2000,
|
|
482
|
+
"description": "cron 运行日志轮询间隔(毫秒)"
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
135
486
|
}
|
|
136
487
|
}
|
|
137
488
|
}
|
|
138
489
|
}
|
|
139
490
|
},
|
|
140
|
-
"
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"
|
|
155
|
-
|
|
491
|
+
"uiHints": {
|
|
492
|
+
"appKey": {
|
|
493
|
+
"label": "AppKey",
|
|
494
|
+
"help": "如流应用的 AppKey。"
|
|
495
|
+
},
|
|
496
|
+
"appSecret": {
|
|
497
|
+
"label": "AppSecret",
|
|
498
|
+
"help": "如流应用的 AppSecret。",
|
|
499
|
+
"sensitive": true
|
|
500
|
+
},
|
|
501
|
+
"connectionMode": {
|
|
502
|
+
"label": "接收模式",
|
|
503
|
+
"help": "默认 websocket,本地开发无需公网域名。"
|
|
504
|
+
},
|
|
505
|
+
"wsGateway": {
|
|
506
|
+
"label": "WS 网关",
|
|
507
|
+
"help": "仅 websocket 模式使用。",
|
|
508
|
+
"advanced": true
|
|
509
|
+
},
|
|
510
|
+
"apiHost": {
|
|
511
|
+
"label": "API 域名",
|
|
512
|
+
"help": "发送消息使用的 REST API 域名。",
|
|
513
|
+
"advanced": true
|
|
514
|
+
},
|
|
515
|
+
"checkToken": {
|
|
516
|
+
"label": "Webhook Token",
|
|
517
|
+
"help": "仅 webhook 模式需要。",
|
|
518
|
+
"sensitive": true,
|
|
519
|
+
"advanced": true
|
|
520
|
+
},
|
|
521
|
+
"encodingAESKey": {
|
|
522
|
+
"label": "Webhook AES Key",
|
|
523
|
+
"help": "仅 webhook 模式需要。",
|
|
524
|
+
"sensitive": true,
|
|
525
|
+
"advanced": true
|
|
526
|
+
},
|
|
527
|
+
"enabled": {
|
|
528
|
+
"label": "启用通道",
|
|
529
|
+
"help": "关闭后停止该账号的收发。"
|
|
530
|
+
},
|
|
531
|
+
"name": {
|
|
532
|
+
"label": "账号名称",
|
|
533
|
+
"help": "仅用于控制台展示。"
|
|
534
|
+
},
|
|
535
|
+
"robotName": {
|
|
536
|
+
"label": "机器人名称",
|
|
537
|
+
"help": "用于识别群里是否 @到了机器人。"
|
|
538
|
+
},
|
|
539
|
+
"appAgentId": {
|
|
540
|
+
"label": "应用 ID",
|
|
541
|
+
"help": "私聊撤回消息需要该值。"
|
|
542
|
+
},
|
|
543
|
+
"dmPolicy": {
|
|
544
|
+
"label": "单聊策略"
|
|
545
|
+
},
|
|
546
|
+
"allowFrom": {
|
|
547
|
+
"label": "单聊白名单",
|
|
548
|
+
"placeholder": "alice"
|
|
549
|
+
},
|
|
550
|
+
"groupPolicy": {
|
|
551
|
+
"label": "群聊策略"
|
|
552
|
+
},
|
|
553
|
+
"groupAllowFrom": {
|
|
554
|
+
"label": "群聊白名单",
|
|
555
|
+
"placeholder": "12345678"
|
|
556
|
+
},
|
|
557
|
+
"requireMention": {
|
|
558
|
+
"label": "要求先 @机器人",
|
|
559
|
+
"help": "只在未显式设置 replyMode 时作为推导条件。"
|
|
560
|
+
},
|
|
561
|
+
"replyMode": {
|
|
562
|
+
"label": "回复模式",
|
|
563
|
+
"help": "不填则沿用现有兼容推导逻辑。"
|
|
564
|
+
},
|
|
565
|
+
"groupSessionMode": {
|
|
566
|
+
"label": "群聊会话模式",
|
|
567
|
+
"help": "group=整个群共用 session,user=群内每人独立 session。"
|
|
568
|
+
},
|
|
569
|
+
"followUp": {
|
|
570
|
+
"label": "允许追问窗口"
|
|
571
|
+
},
|
|
572
|
+
"followUpWindow": {
|
|
573
|
+
"label": "追问窗口秒数"
|
|
574
|
+
},
|
|
575
|
+
"dmMessageFormat": {
|
|
576
|
+
"label": "单聊消息格式",
|
|
577
|
+
"help": "支持普通文本、Markdown,或如流流式卡片。"
|
|
578
|
+
},
|
|
579
|
+
"groupMessageFormat": {
|
|
580
|
+
"label": "群聊消息格式",
|
|
581
|
+
"help": "支持普通文本、Markdown,或如流流式卡片;markdown 和 streaming-card 不带引用回复。"
|
|
582
|
+
},
|
|
583
|
+
"processingHint": {
|
|
584
|
+
"label": "处理中提示"
|
|
585
|
+
},
|
|
586
|
+
"processingHintDelay": {
|
|
587
|
+
"label": "提示延迟秒数"
|
|
588
|
+
},
|
|
589
|
+
"textChunkLimit": {
|
|
590
|
+
"label": "拆分长度上限",
|
|
591
|
+
"advanced": true
|
|
592
|
+
},
|
|
593
|
+
"defaultTo": {
|
|
594
|
+
"label": "默认目标",
|
|
595
|
+
"help": "仅主动发送和兼容场景使用;infoflow_cron 不依赖该值。",
|
|
596
|
+
"advanced": true,
|
|
597
|
+
"placeholder": "alice 或 group:12345"
|
|
598
|
+
},
|
|
599
|
+
"privateDataDir": {
|
|
600
|
+
"label": "私有数据目录",
|
|
601
|
+
"help": "cron 可观测文件会写到该目录下,例如 cron-relay-status.md 和 cron-relay-state.json。",
|
|
602
|
+
"advanced": true
|
|
603
|
+
},
|
|
604
|
+
"cronRelay.enabled": {
|
|
605
|
+
"label": "启用定时转发",
|
|
606
|
+
"help": "开启后会把状态摘要写入私有数据目录,便于直接查看执行结果。",
|
|
607
|
+
"advanced": true
|
|
608
|
+
},
|
|
609
|
+
"cronRelay.includeAlreadyDelivered": {
|
|
610
|
+
"label": "包含已投递任务",
|
|
611
|
+
"advanced": true
|
|
612
|
+
},
|
|
613
|
+
"cronRelay.prefix": {
|
|
614
|
+
"label": "定时前缀",
|
|
615
|
+
"advanced": true
|
|
616
|
+
},
|
|
617
|
+
"cronRelay.pollIntervalMs": {
|
|
618
|
+
"label": "定时轮询间隔",
|
|
619
|
+
"help": "影响 relay 扫描 cron runs 和刷新状态摘要文件的频率。",
|
|
620
|
+
"advanced": true
|
|
621
|
+
},
|
|
622
|
+
"defaultAccount": {
|
|
623
|
+
"label": "默认账号",
|
|
624
|
+
"advanced": true
|
|
625
|
+
},
|
|
626
|
+
"groups": {
|
|
627
|
+
"label": "群级覆盖",
|
|
628
|
+
"help": "按 groupId 配置群级策略覆盖。",
|
|
629
|
+
"advanced": true,
|
|
630
|
+
"itemTemplate": {
|
|
631
|
+
"replyMode": "mention-only",
|
|
632
|
+
"groupSessionMode": "group",
|
|
633
|
+
"followUp": false,
|
|
634
|
+
"followUpWindow": 300
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
"accounts": {
|
|
638
|
+
"label": "多账号配置",
|
|
639
|
+
"help": "按账号 ID 配置额外机器人。",
|
|
640
|
+
"advanced": true,
|
|
641
|
+
"itemTemplate": {
|
|
642
|
+
"enabled": true,
|
|
643
|
+
"connectionMode": "websocket",
|
|
644
|
+
"apiHost": "https://apiin.im.baidu.com",
|
|
645
|
+
"wsGateway": "infoflow-open-gateway.weiyun.baidu.com",
|
|
646
|
+
"groupSessionMode": "group",
|
|
647
|
+
"followUp": false,
|
|
648
|
+
"followUpWindow": 300,
|
|
649
|
+
"processingHint": false,
|
|
650
|
+
"processingHintDelay": 1,
|
|
651
|
+
"dmMessageFormat": "markdown",
|
|
652
|
+
"groupMessageFormat": "markdown",
|
|
653
|
+
"textChunkLimit": 1800
|
|
654
|
+
}
|
|
655
|
+
}
|
|
156
656
|
}
|
|
157
657
|
}
|
|
658
|
+
},
|
|
659
|
+
"configSchema": {
|
|
660
|
+
"jsonSchema": {
|
|
661
|
+
"type": "object",
|
|
662
|
+
"additionalProperties": false,
|
|
663
|
+
"properties": {}
|
|
664
|
+
}
|
|
158
665
|
}
|
|
159
666
|
}
|