Compare commits

..

1 Commits

Author SHA1 Message Date
Soulter
3828ebde18 feat: update permission handling to delegate event context in guarded tools 2026-06-25 16:16:17 +08:00
5 changed files with 8 additions and 35 deletions

View File

@@ -1,4 +1,4 @@
import logging
__version__ = "4.26.1"
__version__ = "4.26.0"
logger = logging.getLogger("astrbot")

View File

@@ -210,8 +210,7 @@ class InternalAgentSubStage(Stage):
await event.send_typing()
except Exception:
logger.warning("send_typing failed", exc_info=True)
if await call_event_hook(event, EventType.OnWaitingLLMRequestEvent):
return
await call_event_hook(event, EventType.OnWaitingLLMRequestEvent)
async with session_lock_manager.acquire_lock(event.unified_msg_origin):
logger.debug("acquired session lock for llm request")

View File

@@ -25,7 +25,7 @@ from tenacity import (
from astrbot.api import logger
from astrbot.api.event import AstrMessageEvent, MessageChain
from astrbot.api.message_components import File, Image, Plain, Record, Video
from astrbot.api.message_components import At, File, Image, Plain, Record, Video
from astrbot.api.platform import AstrBotMessage, PlatformMetadata
from astrbot.core.utils.media_utils import MediaResolver, file_uri_to_path, is_file_uri
@@ -747,6 +747,10 @@ class QQOfficialMessageEvent(AstrMessageEvent):
file_source = file_path
elif i.url:
file_source = i.url
elif isinstance(i, At):
qq_id = getattr(i, "qq", "")
if qq_id and qq_id != "all":
plain_text += f"<@{qq_id}>"
else:
logger.debug(f"qq_official 忽略 {i.type}")
return (

View File

@@ -1,30 +0,0 @@
- [更新日志(简体中文)](#chinese)
- [Changelog(English)](#english)
<a id="chinese"></a>
## What's Changed
### 修复
- 修复插件注册的 LLM Tool 在受保护工具权限处理场景下可能无法正常调用的问题。([#9001](https://github.com/AstrBotDevs/AstrBot/pull/9001))
- 修复等待 LLM 请求事件在获取会话锁前未及时处理停止信号的问题。([#8935](https://github.com/AstrBotDevs/AstrBot/pull/8935))
- 回滚 QQ 官方平台发送消息时保留 At 组件的相关变更,避免引入兼容性问题。([#9004](https://github.com/AstrBotDevs/AstrBot/pull/9004))
### 其他
- 补充 Cloudflare Workers 静态资源相关配置。([commit](https://github.com/AstrBotDevs/AstrBot/commit/44df70d2e), [commit](https://github.com/AstrBotDevs/AstrBot/commit/348fe8172))
<a id="english"></a>
## What's Changed (EN)
### Bug Fixes
- Fixed a case where plugin-registered LLM tools could fail to invoke when guarded tool permission handling was applied. ([#9001](https://github.com/AstrBotDevs/AstrBot/pull/9001))
- Fixed waiting LLM request events so stop signals are checked before acquiring the session lock. ([#8935](https://github.com/AstrBotDevs/AstrBot/pull/8935))
- Reverted the QQ Official platform At component preservation change to avoid compatibility regressions. ([#9004](https://github.com/AstrBotDevs/AstrBot/pull/9004))
### Other
- Added Cloudflare Workers static asset configuration. ([commit](https://github.com/AstrBotDevs/AstrBot/commit/44df70d2e), [commit](https://github.com/AstrBotDevs/AstrBot/commit/348fe8172))

View File

@@ -1,6 +1,6 @@
[project]
name = "AstrBot"
version = "4.26.1"
version = "4.26.0"
description = "Easy-to-use multi-platform LLM chatbot and development framework"
readme = "README.md"
license = { text = "AGPL-3.0-or-later" }