From 6440a17ecee7343219d384d8309c6784842f3c05 Mon Sep 17 00:00:00 2001 From: CBhannnnnnnnnnn <3428143410@qq.com> Date: Thu, 13 Aug 2026 19:28:08 +0800 Subject: [PATCH 1/2] Fix variable name in permission-rule documentation --- .../building-blocks/permission-system/permission-rule.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/versions/2.0.7dev/en/building-blocks/permission-system/permission-rule.mdx b/versions/2.0.7dev/en/building-blocks/permission-system/permission-rule.mdx index 218be72..75747db 100644 --- a/versions/2.0.7dev/en/building-blocks/permission-system/permission-rule.mdx +++ b/versions/2.0.7dev/en/building-blocks/permission-system/permission-rule.mdx @@ -106,15 +106,16 @@ agent = Agent( ) ``` -**At runtime via suggestions**: when the permission system returns ASK, it auto-generates suggested rules from the current call. Pass accepted rules back in `UserConfirmResultEvent.rules`; the agent adds them to the engine automatically: +**At runtime via suggestions**: when the permission system returns ASK, it auto-generates suggested rules from the current call. Pass accepted rules back in `ConfirmResult.rules`; the agent adds them to the engine automatically: ```python -from agentscope.event import UserConfirmResultEvent +from agentscope.event import ConfirmResult # The ASK decision includes suggested_rules generated from the current call. # To accept a suggestion, include it in the result event: -result = UserConfirmResultEvent( +result = ConfirmResult( confirmed=True, + tool_call=tool_call_block, # The tool call being confirmed rules=[suggested_rule], # accepted rules are persisted to the engine ) ``` From 2ad1838425086150e832680b80fb1ae31e2a04f3 Mon Sep 17 00:00:00 2001 From: CBhannnnnnnnnnn <3428143410@qq.com> Date: Thu, 13 Aug 2026 19:35:03 +0800 Subject: [PATCH 2/2] Fix reference to UserConfirmResultEvent in permission-rule.mdx --- .../building-blocks/permission-system/permission-rule.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/versions/2.0.7dev/zh/building-blocks/permission-system/permission-rule.mdx b/versions/2.0.7dev/zh/building-blocks/permission-system/permission-rule.mdx index cecfa3d..6af00bf 100644 --- a/versions/2.0.7dev/zh/building-blocks/permission-system/permission-rule.mdx +++ b/versions/2.0.7dev/zh/building-blocks/permission-system/permission-rule.mdx @@ -106,15 +106,16 @@ agent = Agent( ) ``` -**运行时通过建议规则**:当权限系统返回 ASK 时,会基于本次调用自动生成建议规则。把已接受的规则附在 `UserConfirmResultEvent.rules` 中回传,智能体会自动写入引擎: +**运行时通过建议规则**:当权限系统返回 ASK 时,会基于本次调用自动生成建议规则。把已接受的规则附在 `ConfirmResult.rules` 中回传,智能体会自动写入引擎: ```python -from agentscope.event import UserConfirmResultEvent +from agentscope.event import ConfirmResult # ASK 决策中包含基于本次调用生成的 suggested_rules。 # 接受建议时,把它放入结果事件即可: -result = UserConfirmResultEvent( +result = ConfirmResult( confirmed=True, + tool_call=tool_call_block, # 被确认的原始工具调用对象 rules=[suggested_rule], # 已接受的规则会被持久化进引擎 ) ```