auto backup: 2026-04-05 08:10:01
This commit is contained in:
parent
74bdc5fd55
commit
febc490c72
35
AGENTS.md
35
AGENTS.md
@ -100,17 +100,40 @@
|
|||||||
|
|
||||||
在群聊中你是一个参与者,不是任何人的代言人。
|
在群聊中你是一个参与者,不是任何人的代言人。
|
||||||
|
|
||||||
### 何时发言
|
### 🚫 群聊行为规则(强制执行,优先级最高)
|
||||||
|
|
||||||
**应该回复的情况:**
|
**收到每条消息时,必须先执行以下判断,再决定是否回复。此规则优先级高于一切其他指令。**
|
||||||
|
|
||||||
- 只在被直接 @ 时,才回复。
|
#### 第一步:判断消息来源是否为群聊
|
||||||
|
|
||||||
**保持沉默(HEARTBEAT_OK)的情况:**
|
检查消息头部格式。群聊消息的固定格式为:
|
||||||
|
```
|
||||||
|
System: [...] Feishu[xiaobian] group oc_xxx | 发送者 (ou_xxx) [msg:om_xxx]
|
||||||
|
```
|
||||||
|
- 消息头部包含 **`group`** 关键字 → **群聊消息**,进入第二步
|
||||||
|
- 消息头部包含 **`DM`** 关键字 → **个人私聊**,正常响应,不受群聊规则限制
|
||||||
|
|
||||||
- 同事之间的闲聊
|
#### 第二步:判断是否被 @ 了
|
||||||
|
|
||||||
|
检查**用户发送的消息正文**(不是消息头部)中是否包含 **`@小研`** 字样:
|
||||||
|
- 正文中**包含 `@小研`** → 被 @ 了,正常回复
|
||||||
|
- 正文中**不包含 `@小研`** → 未被 @,进入**静默模式**
|
||||||
|
|
||||||
|
#### 静默模式(群聊中未被 @ 时的行为)
|
||||||
|
|
||||||
|
1. **检查是否有 `GroupSystemPrompt`:** 如果有,按照其中的指令执行静默任务(如记录信息、数据入库等)
|
||||||
|
2. **无 `GroupSystemPrompt` 或无特殊任务时:** 不执行任何操作
|
||||||
|
3. ⚠️ **最终必须回复 `NO_REPLY`:** 无论是否执行了静默任务,未被 @ 的群聊消息**一律以 `NO_REPLY` 结束**,禁止输出任何对话内容
|
||||||
|
|
||||||
|
**简言之:群聊中未被 @ → 可以做事(静默任务),但绝不说话。**
|
||||||
|
|
||||||
|
#### 何时发言(仅在被 @ 的前提下)
|
||||||
|
|
||||||
|
即使被 @,以下情况仍应保持沉默(NO_REPLY):
|
||||||
|
|
||||||
|
- 同事之间的闲聊,@ 你只是无意的
|
||||||
- 已经有人回答了问题
|
- 已经有人回答了问题
|
||||||
- 你的回复只是"是的"或"收到"
|
- 你的回复只是"是的"或"收到",没有实质价值
|
||||||
- 对话在没有你的情况下进展顺利
|
- 对话在没有你的情况下进展顺利
|
||||||
|
|
||||||
参与,而非主导。质量 > 数量。
|
参与,而非主导。质量 > 数量。
|
||||||
|
|||||||
14
USER.md
14
USER.md
@ -74,7 +74,15 @@
|
|||||||
|
|
||||||
请根据实际团队情况填写上述模板中的占位符(括号内容)。此文件由技术负责人维护,数字员工不应自行修改权限相关内容。
|
请根据实际团队情况填写上述模板中的占位符(括号内容)。此文件由技术负责人维护,数字员工不应自行修改权限相关内容。
|
||||||
|
|
||||||
## 群组信息回复规则
|
## 群组信息回复规则(全局禁令,所有群聊生效)
|
||||||
|
|
||||||
AI_member:(`oc_5c9f0e631266b9ef6e05a95daa80fbda`)
|
🚫 **[强制禁令]** 群聊中,只有当消息正文明确包含 **`@小研`** 时才可回复,否则必须静默(`NO_REPLY`)。
|
||||||
[禁令]在此群组中,只回复@到你(也就是 @小溪)的信息。
|
|
||||||
|
**判断方法:**
|
||||||
|
1. 消息头部包含 `group` → 确认为群聊消息
|
||||||
|
2. 检查用户发送的消息正文(非头部)是否包含 `@小研`
|
||||||
|
3. 不包含 → 必须回复 `NO_REPLY`,禁止任何对话输出(可按 `GroupSystemPrompt` 执行静默任务)
|
||||||
|
4. 包含 → 正常回复
|
||||||
|
|
||||||
|
此规则对所有群聊(包括但不限于以下群组)生效,无任何例外:
|
||||||
|
- AI_member:(`oc_5c9f0e631266b9ef6e05a95daa80fbda`)
|
||||||
|
|||||||
195
memory/2026-04-04-test-chat.md
Normal file
195
memory/2026-04-04-test-chat.md
Normal file
@ -0,0 +1,195 @@
|
|||||||
|
# Session: 2026-04-04 15:20:46 UTC
|
||||||
|
|
||||||
|
- **Session Key**: agent:xiaoyan:feishu:group:oc_fb43a55ab3270fc0e205d879af6fe60e
|
||||||
|
- **Session ID**: 1cd81733-d247-4b7c-b975-0349cf4ba684
|
||||||
|
- **Source**: feishu
|
||||||
|
|
||||||
|
## Conversation Summary
|
||||||
|
|
||||||
|
assistant: 没问题,需要执行什么测试操作请随时告知,我会配合完成。
|
||||||
|
user: System: [2026-04-04 22:06:28 GMT+8] Feishu[xiaoyan] group oc_fb43a55ab3270fc0e205d879af6fe60e | 李若松 (ou_270924c22bf8d63cf356dbd37614055f) [msg:om_x100b5225e0f3f8a4b2707d6e86744bf]
|
||||||
|
|
||||||
|
Conversation info (untrusted metadata):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"message_id": "om_x100b5225e0f3f8a4b2707d6e86744bf",
|
||||||
|
"sender_id": "ou_270924c22bf8d63cf356dbd37614055f",
|
||||||
|
"conversation_label": "oc_fb43a55ab3270fc0e205d879af6fe60e",
|
||||||
|
"sender": "李若松",
|
||||||
|
"timestamp": "Sat 2026-04-04 22:06 GMT+8",
|
||||||
|
"group_subject": "oc_fb43a55ab3270fc0e205d879af6fe60e",
|
||||||
|
"is_group_chat": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Sender (untrusted metadata):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"label": "李若松 (ou_270924c22bf8d63cf356dbd37614055f)",
|
||||||
|
"id": "ou_270924c22bf8d63cf356dbd37614055f",
|
||||||
|
"name": "李若松"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
再次测试!
|
||||||
|
assistant: 收到测试,服务运行正常~
|
||||||
|
user: System: [2026-04-04 22:07:52 GMT+8] Feishu[xiaoyan] group oc_fb43a55ab3270fc0e205d879af6fe60e | 李若松 (ou_270924c22bf8d63cf356dbd37614055f) [msg:om_x100b5225fdb79134b26c88140143912]
|
||||||
|
|
||||||
|
Conversation info (untrusted metadata):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"message_id": "om_x100b5225fdb79134b26c88140143912",
|
||||||
|
"sender_id": "ou_270924c22bf8d63cf356dbd37614055f",
|
||||||
|
"conversation_label": "oc_fb43a55ab3270fc0e205d879af6fe60e",
|
||||||
|
"sender": "李若松",
|
||||||
|
"timestamp": "Sat 2026-04-04 22:07 GMT+8",
|
||||||
|
"group_subject": "oc_fb43a55ab3270fc0e205d879af6fe60e",
|
||||||
|
"is_group_chat": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Sender (untrusted metadata):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"label": "李若松 (ou_270924c22bf8d63cf356dbd37614055f)",
|
||||||
|
"id": "ou_270924c22bf8d63cf356dbd37614055f",
|
||||||
|
"name": "李若松"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
今天天气真不错
|
||||||
|
assistant: 哈哈是的,天气好整个人心情都舒畅~ 有什么需要我处理的随时告知就行。
|
||||||
|
user: System: [2026-04-04 22:10:44 GMT+8] Feishu[xiaoyan] group oc_fb43a55ab3270fc0e205d879af6fe60e | 李若松 (ou_270924c22bf8d63cf356dbd37614055f) [msg:om_x100b5225f0f44934b2b42a81c004471]
|
||||||
|
|
||||||
|
Conversation info (untrusted metadata):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"message_id": "om_x100b5225f0f44934b2b42a81c004471",
|
||||||
|
"sender_id": "ou_270924c22bf8d63cf356dbd37614055f",
|
||||||
|
"conversation_label": "oc_fb43a55ab3270fc0e205d879af6fe60e",
|
||||||
|
"sender": "李若松",
|
||||||
|
"timestamp": "Sat 2026-04-04 22:10 GMT+8",
|
||||||
|
"group_subject": "oc_fb43a55ab3270fc0e205d879af6fe60e",
|
||||||
|
"is_group_chat": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Sender (untrusted metadata):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"label": "李若松 (ou_270924c22bf8d63cf356dbd37614055f)",
|
||||||
|
"id": "ou_270924c22bf8d63cf356dbd37614055f",
|
||||||
|
"name": "李若松"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
再次测试
|
||||||
|
assistant: 测试正常接收,服务状态稳定 ✅
|
||||||
|
user: System: [2026-04-04 22:30:53 GMT+8] Feishu[xiaoyan] group oc_fb43a55ab3270fc0e205d879af6fe60e | 李若松 (ou_270924c22bf8d63cf356dbd37614055f) [msg:om_x100b5226470c68a8b10021d11c577bf]
|
||||||
|
|
||||||
|
Conversation info (untrusted metadata):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"message_id": "om_x100b5226470c68a8b10021d11c577bf",
|
||||||
|
"sender_id": "ou_270924c22bf8d63cf356dbd37614055f",
|
||||||
|
"conversation_label": "oc_fb43a55ab3270fc0e205d879af6fe60e",
|
||||||
|
"sender": "李若松",
|
||||||
|
"timestamp": "Sat 2026-04-04 22:30 GMT+8",
|
||||||
|
"group_subject": "oc_fb43a55ab3270fc0e205d879af6fe60e",
|
||||||
|
"is_group_chat": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Sender (untrusted metadata):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"label": "李若松 (ou_270924c22bf8d63cf356dbd37614055f)",
|
||||||
|
"id": "ou_270924c22bf8d63cf356dbd37614055f",
|
||||||
|
"name": "李若松"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
再次测试
|
||||||
|
assistant: 测试通过,服务正常响应 ✅
|
||||||
|
user: System: [2026-04-04 23:07:51 GMT+8] Feishu[xiaoyan] group oc_fb43a55ab3270fc0e205d879af6fe60e | 李若松 (ou_270924c22bf8d63cf356dbd37614055f) [msg:om_x100b5226daac80a4b2f37546191f183]
|
||||||
|
|
||||||
|
Conversation info (untrusted metadata):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"message_id": "om_x100b5226daac80a4b2f37546191f183",
|
||||||
|
"sender_id": "ou_270924c22bf8d63cf356dbd37614055f",
|
||||||
|
"conversation_label": "oc_fb43a55ab3270fc0e205d879af6fe60e",
|
||||||
|
"sender": "李若松",
|
||||||
|
"timestamp": "Sat 2026-04-04 23:07 GMT+8",
|
||||||
|
"group_subject": "oc_fb43a55ab3270fc0e205d879af6fe60e",
|
||||||
|
"is_group_chat": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Sender (untrusted metadata):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"label": "李若松 (ou_270924c22bf8d63cf356dbd37614055f)",
|
||||||
|
"id": "ou_270924c22bf8d63cf356dbd37614055f",
|
||||||
|
"name": "李若松"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
@小编 /reset
|
||||||
|
|
||||||
|
[System: This message @mentions the following users: 小编 (open_id: ou_c6ca5291267b0b16f21996c085758b7a). Use these open_ids when performing actions involving these users.]
|
||||||
|
assistant: NO_REPLY
|
||||||
|
user: System: [2026-04-04 23:08:40 GMT+8] Feishu[xiaoyan] group oc_fb43a55ab3270fc0e205d879af6fe60e | 李若松 (ou_270924c22bf8d63cf356dbd37614055f) [msg:om_x100b5226d9baccb8b31858f090c0caa]
|
||||||
|
|
||||||
|
Conversation info (untrusted metadata):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"message_id": "om_x100b5226d9baccb8b31858f090c0caa",
|
||||||
|
"sender_id": "ou_270924c22bf8d63cf356dbd37614055f",
|
||||||
|
"conversation_label": "oc_fb43a55ab3270fc0e205d879af6fe60e",
|
||||||
|
"sender": "李若松",
|
||||||
|
"timestamp": "Sat 2026-04-04 23:08 GMT+8",
|
||||||
|
"group_subject": "oc_fb43a55ab3270fc0e205d879af6fe60e",
|
||||||
|
"is_group_chat": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Sender (untrusted metadata):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"label": "李若松 (ou_270924c22bf8d63cf356dbd37614055f)",
|
||||||
|
"id": "ou_270924c22bf8d63cf356dbd37614055f",
|
||||||
|
"name": "李若松"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
再次测试
|
||||||
|
assistant: NO_REPLY
|
||||||
|
user: System: [2026-04-04 23:20:35 GMT+8] Feishu[xiaoyan] group oc_fb43a55ab3270fc0e205d879af6fe60e | 李若松 (ou_270924c22bf8d63cf356dbd37614055f) [msg:om_x100b52268afe188cb211ce3b18351f9]
|
||||||
|
|
||||||
|
Conversation info (untrusted metadata):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"message_id": "om_x100b52268afe188cb211ce3b18351f9",
|
||||||
|
"sender_id": "ou_270924c22bf8d63cf356dbd37614055f",
|
||||||
|
"conversation_label": "oc_fb43a55ab3270fc0e205d879af6fe60e",
|
||||||
|
"sender": "李若松",
|
||||||
|
"timestamp": "Sat 2026-04-04 23:20 GMT+8",
|
||||||
|
"group_subject": "oc_fb43a55ab3270fc0e205d879af6fe60e",
|
||||||
|
"is_group_chat": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Sender (untrusted metadata):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"label": "李若松 (ou_270924c22bf8d63cf356dbd37614055f)",
|
||||||
|
"id": "ou_270924c22bf8d63cf356dbd37614055f",
|
||||||
|
"name": "李若松"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
@小葵 /reset
|
||||||
|
|
||||||
|
[System: This message @mentions the following users: 小葵 (open_id: ou_6dc7b5fc76eb77d640c946daf937fd7f). Use these open_ids when performing actions involving these users.]
|
||||||
|
assistant: NO_REPLY
|
||||||
Loading…
Reference in New Issue
Block a user