Repository navigation
Looper v2.14.175
Looper v2.14.175
This is the patch release v2.14.175, a hotfix line in which each merged change ships at once. It documents one change: #1318 (a Lark bound chat can be opened to everyone in it, and bots that @-mention the bot are answered).
Release Decision
Who should upgrade: Installations that use Lark channels with chat bindings and want a chat open to everyone in it, or want allowlisted bots to be answered. Others need not upgrade, but see Behavior changes: bot messages are no longer dropped.
What this release solves: #1318 adds a per-binding sender policy, removes the drop of bot senders and picks up bot @-mentions in bound group chats.
Breaking changes: No. There is no API removal; the only schema change is an additive column. Behavior changes on purpose (maintainer decision, see Behavior changes): messages from allowlisted bots now reach the Manager. The bridge boundary is unchanged: upgrade to v2.13.165 first if the installation is older.
How to verify: Check the installed version.
looper --version # looper 2.14.175Contributors: Maintainer @foolzzz authored #1318; no community contribution was included in this release.
Upgrading
The bridge boundary is unchanged: an installation older than v2.13.165 must upgrade to v2.13.165 first (upgrade to v2.13.165 first) and be started once; see the Upgrading section of the v2.14.0 release for the steps and rollback. An installation on v2.14.0 to v2.14.174 upgrades directly. The database gains the column manager_chat_bindings.sender_policy (listed or chat, default listed) on the first start; it is additive and existing bindings keep listed.
Behavior changes
Read in the code of #1318:
- Sender policy per binding (
looper/db/chat_bindings.py,looper/agents/channels/chat_routing.py).listed(default) admits the channel's allowlist and the binding's extra senders.chat(Lark only; Telegram is refused) admits everyone in that bound group chat, people and bots, except the channel's own bot. Direct messages always uselisted. Rebinding to another Manager resets the policy tolisted; omitting it on the same Manager keeps it. The binding API and its result carrysender_policy; an audit entry records a change of policy. - Bots are answered (
looper/agents/channels/lark.py). The drop of messages with a bot sender type is removed: a bot passes the same admission as a person. The channel's own messages are ignored (matched by the bot's open id and app id). Extra senders and the allowlist now also accept bot app ids (cli_…). Each bot message logs onelark_bot_messageline with its outcome; repeated refusals of the same bot in a chat are logged once per hour. - Bot @-mentions are polled. Bound group chats are listed every 30 s, including their threads, for messages from bots that @-mention the bot; each is handled once (duplicates are skipped). At most 10 bot-triggered turns per chat per hour are admitted; the rest are dropped with a warning. A poll that fails for a chat retries from the same boundary.
- Replies stay in threads. An answer, status or report to a message that is inside a thread is sent with the reply-in-thread flag (
--reply-in-threadfor the CLI transport,reply_in_threadfor the bot-token transport). - Confirmation for open chats (
looper/agents/http_server.py,looper/agents/v1_domains/chat_bindings.py,managers.py,managers_api.py). Settingchaton a binding whose Manager has all tools asks for a confirmation, also for an operator. Updating a Manager to all tools while chats are open to everyone asks for one too and lists those chats. The write is refused with a conflict if the Manager's permission revision, or the set of open chats, changed since the confirmation.looper confirmnow accepts the operator credential arguments. - Settings page. The chat bindings of a Manager gain a "Who can reach this Manager" selector and the confirmation step; the Manager editor gains the "Confirm all tools" step; the allowlist fields accept
cli_…ids and their help text says that a chat open to everyone is not limited to them. - Model-visible changes: Messages from bots now reach the Manager when admitted, and a message inside a thread now carries
thread_idin itschannel_context. Prompts and tool schemas are unchanged.
Optional Capability Activation & Use
No new optional capability activation is introduced in this release.
Validation
Reported by the pull request: #1318 reports the tests that cover the change (tests/test_lark_bot_intake.py, tests/test_lark_catchup.py, tests/test_lark_history_transport.py, tests/test_lark_content.py, tests/test_lark_rich_bot.py, tests/test_lark_transport.py, tests/test_lark_cli_commands.py, tests/test_api_v1_chat_bindings.py, tests/test_api_v1_chat_bindings_db.py, tests/test_channel_chat_routing_db.py, tests/test_manager_chat_bindings_browser.py and three web component and API tests), automated reviews, and CI before the merge. It does not report a local full suite or the result of the reviews.
CI: CI runs after the release is drafted; its result is not recorded here.
Not tested for this draft: a local full suite, a real Lark group with a second bot and the built wheel. The release documentation gate checks the body only.
中文摘要
本版本是 patch release v2.14.175(热修线,每个合并的改动立即发布),说明一项改动:#1318(Lark 绑定聊天可对群内所有人开放,并回应 @ 本 bot 的其他 bot)。
升级决策
**谁需要升级:**使用 Lark 渠道和聊天绑定、希望让某个聊天对其中所有人开放,或希望已列入允许名单的 bot 得到回应的安装。其他安装无需升级,但请注意行为变化:bot 的消息不再被丢弃。
解决了什么:#1318 为每个绑定增加发送者策略,移除对 bot 发送者的丢弃,并在已绑定的群聊中处理 @ 本 bot 的 bot 消息。
**是否有破坏性变更:**无。没有 API 被移除,唯一的 schema 变更是新增列。行为有意改变(维护者决定,见行为变化):已列入允许名单的 bot 的消息现在会到达 Manager。桥接边界不变:早于 v2.13.165 的安装须先升级到 v2.13.165。
**如何验证:**核对版本为 2.14.175。
**贡献者:**维护者 @foolzzz 提交 #1318;本版本无社区贡献。
looper --version # looper 2.14.175升级
桥接边界不变:早于 v2.13.165 的安装必须先升级到 v2.13.165 并启动一次(upgrade to v2.13.165 first 即先升级到 v2.13.165),步骤与回退见 v2.14.0 发布说明的升级一节。v2.14.0 至 v2.14.174 上的安装可直接升级。数据库在首次启动时新增列 manager_chat_bindings.sender_policy(listed 或 chat,默认 listed);该变更是增量的,现有绑定保持 listed。
行为变化与入口
以下在 #1318 的代码中可见:
- 每个绑定的发送者策略(
looper/db/chat_bindings.py、looper/agents/channels/chat_routing.py)。listed(默认)允许渠道允许名单和该绑定的额外发送者。chat(仅 Lark;Telegram 会被拒绝)允许该已绑定群聊中的所有人(包括人和 bot),渠道自身的 bot 除外。私聊始终使用listed。改绑到其他 Manager 会把策略重置为listed;在同一 Manager 上省略该字段则保持不变。绑定 API 及其结果带有sender_policy;策略变更会写入审计记录。 - 回应 bot(
looper/agents/channels/lark.py)。移除了对 bot 发送者类型消息的丢弃:bot 与人走相同的准入。渠道自身的消息被忽略(按 bot 的 open id 和 app id 匹配)。额外发送者和允许名单现在也接受 bot 的 app id(cli_…)。每条 bot 消息记录一行带结果的lark_bot_message日志;同一聊天中对同一 bot 的重复拒绝每小时只记录一次。 - **轮询 bot 的 @ 提及。**已绑定的群聊每 30 秒列出一次(含其线程),查找 @ 本 bot 的 bot 消息;每条只处理一次(重复的会被跳过)。每个聊天每小时最多准入 10 个由 bot 触发的回合,其余带警告丢弃。某个聊天轮询失败时会从同一边界重试。
- **回复留在线程内。**对线程内消息的回答、状态或报告,会带上线程内回复标志发送(CLI 传输为
--reply-in-thread,bot-token 传输为reply_in_thread)。 - 开放聊天需要确认(
looper/agents/http_server.py、looper/agents/v1_domains/chat_bindings.py、managers.py、managers_api.py)。把其 Manager 拥有全部工具的绑定设为chat需要确认,操作员也不例外。在有聊天对所有人开放时把 Manager 更新为全部工具同样需要确认,并列出这些聊天。如果自确认以来 Manager 的权限版本或开放聊天的集合发生变化,写入会以冲突被拒绝。looper confirm现在接受操作员凭据参数。 - **设置页。**Manager 的聊天绑定新增“Who can reach this Manager”选择器和确认步骤;Manager 编辑器新增“Confirm all tools”步骤;允许名单字段接受
cli_…,其帮助文字说明对所有人开放的聊天不受其限制。 - **面向模型的变化:**被准入的 bot 消息现在会到达 Manager,线程内的消息现在在
channel_context中带有thread_id。提示词和工具 schema 未改变。
可选能力启用与使用
本版本未新增可选能力启用入口。
验证
PR 报告的:#1318 报告了覆盖该改动的测试(tests/test_lark_bot_intake.py、tests/test_lark_catchup.py、tests/test_lark_history_transport.py、tests/test_lark_content.py、tests/test_lark_rich_bot.py、tests/test_lark_transport.py、tests/test_lark_cli_commands.py、tests/test_api_v1_chat_bindings.py、tests/test_api_v1_chat_bindings_db.py、tests/test_channel_chat_routing_db.py、tests/test_manager_chat_bindings_browser.py 和三个 web 组件与 API 测试)、自动评审,以及合并前的 CI。未报告本地完整套件,也未报告评审结果。
**CI:**发布草稿后 CI 会运行,其结果未在此记录。
**本次草稿未测试:**本地完整套件、带第二个 bot 的真实 Lark 群以及构建出的 wheel。发布文档 gate 只检查正文。