Repository navigation
飞书 /agent:派出任务后等最终回复再收尾、回复里的 @ 只用核实过的成员 - #39
Merged
Merged
Conversation
…roups for AI triage, direct chats no model reads
- A group muted in Feishu (消息免打扰: Chat.isRemind / userSetting.isRemind, both read, a disagreement or a
missing field not known) keeps what does not @ the user out of the Inbox; still archived, an @ sorted as usual,
a state not known as before. Asked in the background, an hour at a time, ten groups a round.
- A group's topics are Inbox items of their own ("<chat>:<root>"): their context, done state, page and reply
that topic's; what is said outside any topic stays the chat's item, its id as before.
- inbox_triage_chats (empty by default): those groups' messages without an @ go to the triage model, muted or not.
- inbox_private_dms (empty by default): those direct chats stay in the Inbox with the rule's tier, no model.
- WeChat: none of it (no topics, no mute state, the settings not in its manifest).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tter, private chats carry no words, topics per group mode - A muted group's thing without an @ is handed over done (read), so an item kept from before ends too; in a muted group the @ stays the thing's last, not the chatter after it; a failed read is "unknown" (the old way) till the next hour; a state is the account's own (owner), the retry clock forgotten at an account switch. - inbox_private_dms: the other person found from the chat's lines too; the item carries no words of it. - Topics: a group in topic mode has a thing per topic (roots without replies too); in an ordinary group a topic's thing is its replies, its root the chat's own (the user's reply in that topic ends both); 300 lines per group, a topic older than the Inbox's days left out, rows by (position, when, seq). - A topic's page pages back and replies through the send tool, which reads "<chat>:<root>" as that topic. - A live reading's placement corrects the thread a history read kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ead across an account switch, topic pages by place - inbox_private_dms: a chat listed by its id is hidden whatever kind the store took it for. - inbox.collect hands over nothing read partly for another account (a sign-in meanwhile). - A muted group's @: its sender is the item's sender tag too. - A topic group's one item from before topics were items of their own is handed over done (inbox_topics_at), once. - A topic page pages by place (position, when, seq): a newer line moves no page; no cap below the whole topic. - The send tool refuses a reply_to of another topic than the topic chat it was given. - A mutes table made without owner (an unreleased build) gains the column. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… yet sent as asked, the old item ended even when replied Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts placement is the live row's alone, as before) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and pictures for /agent, matefeishu_members - A formatted TEXT or POST (bold, italics, lists, quotes, headings, code, links) shows on the thread page as safe Markdown (richmd: every word escaped, http(s) links only, code fenced past its backticks); kept in a table of its own. Commands, @s, the archive, quotes and the models' lines read the plain text as before. - A POST's inline pictures are the message's media (seen, fetched, archived like a picture's), in the order shown. - /agent: the prefix right after a POST's title line is a request; up to four of its pictures (3 MiB each) go with the request to the conversation (images on the start, and on a follow-up's message). - matefeishu_members (read-only): a chat's people and bots (chats.PullChatChattersRequest) with their ids and the names shown there, kept 5 minutes per sign-in; the send tool's at finds a bot's name there. - WeChat: none of it (no such tool, no POST, no Markdown). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…members of the account asked, Markdown with no formula
- /agent: a request's pictures fetched once and kept in the data directory till its start is over, so a resume sends
the same body under its operation; a follow-up handed to the task's Agent carries them too.
- The prefix after a POST's title is looked for in the reading with its code blocks (text_after_mentions), the title
as written; a POST with only code reads as its code's words (it is never dropped from the page).
- A later reading of a POST renews its pictures.
- chat_members: a list read for an account signed out meanwhile is never handed over; group nicknames by number,
displayName never read as an object; 20 pages, a longer list says it is partial. matefeishu_members in agent_tools.
- richmd: "(", ")" and "]" not escaped ("\(" and "\[" open formulas in renderers with math), "$" escaped; a list item's
paragraph and code (indented whole), inline code and its words read once; two bold runs that meet read as one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…@s in the reply only of verified members - agent_task_wait (Feishu): a turn that ends with no answer yet (only progress, or nothing) while the conversation's to-do is still open, or the to-dos cannot be read, is not the request's end: it is done as before (so a follow-up, a stop and the routing see it as ever), but its 🤔 stays and its last words go as its progress message, never as the answer. The answer through the reply tool swaps it for ✅ (and closes the progress); otherwise once no such to-do is left, or agent_task_wait_most went by (_tasks_sweep, every agent_task_recheck), nothing said. - verify_at (Feishu): matefeishu_agent_reply takes at [{id, name}], each checked against the chat's members (matefeishu_members) and written in the text as "@name"; not on progress, not for 自动代答 or 文档代答, never the user; the same words with an @ are another reply. The instructions say the reply answers the one who asked and a typed "@name" is no @. - WeChat: neither (its platform sets neither: its prompt, its tool and an `at` it is given as before). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…res kept when none came, members per session - /agent waiting for its answer: a reply still on its way at the turn's end waits too; the last words edit the progress there is; the 🤔 swapped before the mark comes off; a /stop ends the wait; a waiting run is never pruned; the sweep reads the to-dos once a round. - at: two members of one name refused; their order is no other reply. - Pictures of a request: none fetched is kept too, and a shutdown midway keeps them for the resume; a follow-up's are fetched before its checks, dropped after a resumed hand-on. - The prefix after a POST's title read from its text too when the reading with code has no words; never from a blocked line. - chat_members: a list kept for the session that read it only; a link's words keep their brackets (character references). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…th some), one read of the to-dos a sweep, a title with an @ in front Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, topics and private chats in the Inbox; rich text as Markdown; matefeishu_members; /agent waits for its answer and @s verified members Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
对齐 /agent 的两处行为(第 5、9 项,openlark 的做法,只按任务里的描述自己写,没有看或用 openlark 的代码和提示词),只改飞书;微信不变(两个开关
agent_task_wait、verify_at只在飞书的 Platform 里打开)。叠在 #38 之上。做了什么
progress=true本来就是中途进度(原地更新的一条消息),不算答案;这次补上:一轮结束时如果还没有最终回复(只有进度或什么都没有),而会话还有它派出、没完成的待办(/api/v1/todos里origin是这个会话),或者读不到待办,就不自动收尾:请求照常记为结束(转发、续问、/stop、回复路由都和原来一样),但 🤔 留着、不换 ✅,这一轮最后说的话只作为进度消息发出,不当成答案。_settled只认 done/idle),这里保持。matefeishu_agent_reply新增at: [{id, name}]:每个都要在这个群的成员列表里(matefeishu_members),名字是在这个群里显示的名字或本名,正文里要原样写「@名字」;进度消息、自动代答、文档代答不能带,不能 @ 自己;同样的正文带不同的 @ 算另一条回复。微信的回复工具没有这个参数,传了也照旧忽略。怎么验证的
tests/test_agent_tasks_at.py(14 个),包括微信照旧;test_agent_forward.py里一个用例按新行为更新了断言(待办开着时助手用普通文字答的那句改为作为进度显示,仍只答一次、答在最后问的那条下面)。新用例在 飞书:会话页显示富文本格式、POST 里的 /agent 带标题和图片、新工具 matefeishu_members #38 的代码上失败。没做什么
/stop和最终回复同时到达时的竞态是改动前就有的,不在这次范围。🤖 Generated with Claude Code
已知限制(审查中提出、决定不改)
/stop后,原请求的晚到回复会被拒绝,后台仍可能把它标 ✅。