diff --git a/.vala_skill_hashes b/.vala_skill_hashes index 8261556..86540c9 100644 --- a/.vala_skill_hashes +++ b/.vala_skill_hashes @@ -1,4 +1,4 @@ logs e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 lark_wiki_operate_as_bot.vala f84c308bcb69280520dadf9458177d9c4af192d60cf409528bd65e13f3e67e0a user-feedback-collector e02a2d4ee3914c393c1c683779c40787128b9163eecccf175531afc19b6d21a9 -vala_git_workspace_backup e157b1d2afd8658df6dce1f75a41d42b2f27c1b349559e0baa6d0a787cc9d81d +vala_git_workspace_backup c2e2cb13f0f7972b7af36ee3e7b7a1dec027420e7f70997bdaaa166ea0c389a7 diff --git a/AGENTS.md b/AGENTS.md index 2c300a2..606c408 100644 --- a/AGENTS.md +++ b/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): + +- 同事之间的闲聊,@ 你只是无意的 - 已经有人回答了问题 -- 你的回复只是"是的"或"收到" +- 你的回复只是"是的"或"收到",没有实质价值 - 对话在没有你的情况下进展顺利 参与,而非主导。质量 > 数量。 diff --git a/USER.md b/USER.md index 53af813..9f39694 100644 --- a/USER.md +++ b/USER.md @@ -73,7 +73,15 @@ 请根据实际团队情况填写上述模板中的占位符(括号内容)。此文件由技术负责人维护,数字员工不应自行修改权限相关内容。 -## 群组信息回复规则 +## 群组信息回复规则(全局禁令,所有群聊生效) -AI_member:(`oc_5c9f0e631266b9ef6e05a95daa80fbda`) -[禁令]在此群组中,只回复@到你(也就是 @小溪)的信息。 +🚫 **[强制禁令]** 群聊中,只有当消息正文明确包含 **`@小葵`** 时才可回复,否则必须静默(`NO_REPLY`)。 + +**判断方法:** +1. 消息头部包含 `group` → 确认为群聊消息 +2. 检查用户发送的消息正文(非头部)是否包含 `@小葵` +3. 不包含 → 必须回复 `NO_REPLY`,禁止任何对话输出(可按 `GroupSystemPrompt` 执行静默任务) +4. 包含 → 正常回复 + +此规则对所有群聊(包括但不限于以下群组)生效,无任何例外: +- AI_member:(`oc_5c9f0e631266b9ef6e05a95daa80fbda`) diff --git a/memory/2026-04-04-request-timed-out-before-a-res.md b/memory/2026-04-04-request-timed-out-before-a-res.md new file mode 100644 index 0000000..568c39b --- /dev/null +++ b/memory/2026-04-04-request-timed-out-before-a-res.md @@ -0,0 +1,193 @@ +# Session: 2026-04-04 15:20:37 UTC + +- **Session Key**: agent:xiaokui:feishu:group:oc_fb43a55ab3270fc0e205d879af6fe60e +- **Session ID**: 3a4d9769-8aa6-4877-8d9a-2e570c889c7f +- **Source**: feishu + +## Conversation Summary + +assistant: NO_REPLY +user: System: [2026-04-04 22:04:46 GMT+8] Feishu[xiaokui] group oc_fb43a55ab3270fc0e205d879af6fe60e | 李若松 (ou_088ee79216826be4a24af44f7268f880) [msg:om_x100b5225e91934a4b3c873978fa11be] + +Conversation info (untrusted metadata): +```json +{ + "message_id": "om_x100b5225e91934a4b3c873978fa11be", + "sender_id": "ou_088ee79216826be4a24af44f7268f880", + "conversation_label": "oc_fb43a55ab3270fc0e205d879af6fe60e", + "sender": "李若松", + "timestamp": "Sat 2026-04-04 22:04 GMT+8", + "group_subject": "oc_fb43a55ab3270fc0e205d879af6fe60e", + "is_group_chat": true +} +``` + +Sender (untrusted metadata): +```json +{ + "label": "李若松 (ou_088ee79216826be4a24af44f7268f880)", + "id": "ou_088ee79216826be4a24af44f7268f880", + "name": "李若松" +} +``` + +有趣 我要做一些测试 +assistant: NO_REPLY +user: System: [2026-04-04 22:06:28 GMT+8] Feishu[xiaokui] group oc_fb43a55ab3270fc0e205d879af6fe60e | 李若松 (ou_088ee79216826be4a24af44f7268f880) [msg:om_x100b5225e0f3f8a4b2707d6e86744bf] + +Conversation info (untrusted metadata): +```json +{ + "message_id": "om_x100b5225e0f3f8a4b2707d6e86744bf", + "sender_id": "ou_088ee79216826be4a24af44f7268f880", + "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_088ee79216826be4a24af44f7268f880)", + "id": "ou_088ee79216826be4a24af44f7268f880", + "name": "李若松" +} +``` + +再次测试! +assistant: NO_REPLY +user: System: [2026-04-04 22:07:52 GMT+8] Feishu[xiaokui] group oc_fb43a55ab3270fc0e205d879af6fe60e | 李若松 (ou_088ee79216826be4a24af44f7268f880) [msg:om_x100b5225fdb79134b26c88140143912] + +Conversation info (untrusted metadata): +```json +{ + "message_id": "om_x100b5225fdb79134b26c88140143912", + "sender_id": "ou_088ee79216826be4a24af44f7268f880", + "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_088ee79216826be4a24af44f7268f880)", + "id": "ou_088ee79216826be4a24af44f7268f880", + "name": "李若松" +} +``` + +今天天气真不错 +assistant: NO_REPLY +user: System: [2026-04-04 22:10:44 GMT+8] Feishu[xiaokui] group oc_fb43a55ab3270fc0e205d879af6fe60e | 李若松 (ou_088ee79216826be4a24af44f7268f880) [msg:om_x100b5225f0f44934b2b42a81c004471] + +Conversation info (untrusted metadata): +```json +{ + "message_id": "om_x100b5225f0f44934b2b42a81c004471", + "sender_id": "ou_088ee79216826be4a24af44f7268f880", + "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_088ee79216826be4a24af44f7268f880)", + "id": "ou_088ee79216826be4a24af44f7268f880", + "name": "李若松" +} +``` + +再次测试 +assistant: NO_REPLY +user: System: [2026-04-04 22:30:53 GMT+8] Feishu[xiaokui] group oc_fb43a55ab3270fc0e205d879af6fe60e | 李若松 (ou_088ee79216826be4a24af44f7268f880) [msg:om_x100b5226470c68a8b10021d11c577bf] + +Conversation info (untrusted metadata): +```json +{ + "message_id": "om_x100b5226470c68a8b10021d11c577bf", + "sender_id": "ou_088ee79216826be4a24af44f7268f880", + "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_088ee79216826be4a24af44f7268f880)", + "id": "ou_088ee79216826be4a24af44f7268f880", + "name": "李若松" +} +``` + +再次测试 +assistant: NO_REPLY +user: System: [2026-04-04 23:07:51 GMT+8] Feishu[xiaokui] group oc_fb43a55ab3270fc0e205d879af6fe60e | 李若松 (ou_088ee79216826be4a24af44f7268f880) [msg:om_x100b5226daac80a4b2f37546191f183] + +Conversation info (untrusted metadata): +```json +{ + "message_id": "om_x100b5226daac80a4b2f37546191f183", + "sender_id": "ou_088ee79216826be4a24af44f7268f880", + "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_088ee79216826be4a24af44f7268f880)", + "id": "ou_088ee79216826be4a24af44f7268f880", + "name": "李若松" +} +``` + +@小编 /reset + +[System: This message @mentions the following users: 小编 (open_id: ou_9fa77801dc0e7b6b0aa4575aef6000fb). Use these open_ids when performing actions involving these users.] +assistant: NO_REPLY +user: System: [2026-04-04 23:08:40 GMT+8] Feishu[xiaokui] group oc_fb43a55ab3270fc0e205d879af6fe60e | 李若松 (ou_088ee79216826be4a24af44f7268f880) [msg:om_x100b5226d9baccb8b31858f090c0caa] + +Conversation info (untrusted metadata): +```json +{ + "message_id": "om_x100b5226d9baccb8b31858f090c0caa", + "sender_id": "ou_088ee79216826be4a24af44f7268f880", + "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_088ee79216826be4a24af44f7268f880)", + "id": "ou_088ee79216826be4a24af44f7268f880", + "name": "李若松" +} +``` + +再次测试 +assistant: NO_REPLY