From c6a67b52a2144f16d96cf11dff94b90c85e8ef5a Mon Sep 17 00:00:00 2001 From: Zedhugh Chen Date: Sat, 18 Apr 2026 22:33:31 +0800 Subject: [PATCH] =?UTF-8?q?docs(core/policy):=20=E4=B8=BA=E5=87=BD?= =?UTF-8?q?=E6=95=B0=20policy=5Fapply=5Fcommand=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/policy.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/core/policy.h b/src/core/policy.h index 6eef655..2bf4507 100644 --- a/src/core/policy.h +++ b/src/core/policy.h @@ -26,6 +26,17 @@ bool policy_route_event( const event_t *event, command_buffer_t *out ); + +/** + * @brief 将语义命令应用到状态,并累积后端副作用到 plan + * + * @param ctx 策略上下文 + * @param command_buffer 待应用的命令序列 + * @param plan 副作用累积器,记录后端需要执行的操作 + * + * @return true 产生了至少一项后端副作用 + * @return false 无副作用产生 + */ bool policy_apply_command( const policy_context_t *ctx, const command_buffer_t *command_buffer,