From fe14d1f7e373b5e0623c2c4566ff627c22b7a4a5 Mon Sep 17 00:00:00 2001 From: cflmy Date: Mon, 7 Sep 2026 20:40:24 +0800 Subject: [PATCH] fix(agent): route writeback through lib instead of host_* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ext/** must not call host_*; use writeback.record / 自写回.写回 so the host-boundary gold passes. Co-authored-by: Cursor --- ext/ai/agent.mq.md | 18 +++++++++--------- ext/ai/智能体.mq.md | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ext/ai/agent.mq.md b/ext/ai/agent.mq.md index a64f6c4..c11466d 100644 --- a/ext/ai/agent.mq.md +++ b/ext/ai/agent.mq.md @@ -1463,7 +1463,7 @@ Always append `done` and attach `events` on the result map (process audit even w 1. `trace` *body = > json.stringify value=`events`* - > host_writeback_record value=`body` key="trace" + > writeback.record value=`body` key="trace" 2. * *_ = 1* @@ -1606,9 +1606,9 @@ With `stream=True`, the model call uses SSE; `echo=True` prints delta text to st *body = > json.stringify value=`out`* *st = > json.get value=`out` key="status"* 1. `st` == "ok" - > host_writeback_record value=`body` key="ok" + > writeback.record value=`body` key="ok" 2. * - > host_writeback_record value=`body` key="error" + > writeback.record value=`body` key="error" 2. * *_ = 1* @@ -1711,7 +1711,7 @@ Reuse lookup: exact → alias → canonicalize → optional local n-gram `near` *events = > plan_append_round events=`events` round=1 workbook=`path` exit_code=`code` result=`child_val` stream=`stream` echo=`echo`* 1. `writeback` *body = > json.stringify value=`out`* - > host_writeback_record value=`body` key="ok" + > writeback.record value=`body` key="ok" 2. * *_ = 1* *out = > plan_finish_stream out=`out` events=`events` stream=`stream` trace=`trace` result=`child_val`* @@ -1768,7 +1768,7 @@ Reuse lookup: exact → alias → canonicalize → optional local n-gram `near` *events = > plan_append_round events=`events` round=1 workbook=`path` exit_code=`code` result=`child_val` stream=`stream` echo=`echo`* 1. `writeback` *body = > json.stringify value=`out`* - > host_writeback_record value=`body` key="ok" + > writeback.record value=`body` key="ok" 2. * *_ = 1* *out = > plan_finish_stream out=`out` events=`events` stream=`stream` trace=`trace` result=`child_val`* @@ -1832,7 +1832,7 @@ Reuse lookup: exact → alias → canonicalize → optional local n-gram `near` *events = > plan_append_round events=`events` round=1 workbook=`path` exit_code=`code` result=`child_val` stream=`stream` echo=`echo`* 1. `writeback` *body = > json.stringify value=`out`* - > host_writeback_record value=`body` key="ok" + > writeback.record value=`body` key="ok" 2. * *_ = 1* *out = > plan_finish_stream out=`out` events=`events` stream=`stream` trace=`trace` result=`child_val`* @@ -1910,7 +1910,7 @@ Reuse lookup: exact → alias → canonicalize → optional local n-gram `near` *out = > json.set map=`out` key="cache" value="bypass"* 1. `writeback` *body = > json.stringify value=`out`* - > host_writeback_record value=`body` key="ok" + > writeback.record value=`body` key="ok" 2. * *_ = 1* *out = > plan_finish_stream out=`out` events=`events` stream=`stream` trace=`trace`* @@ -2091,9 +2091,9 @@ Deterministic success stop (loop engineering): when the child already returned a 1. `writeback` *body = > json.stringify value=`out`* 1. `status` == "ok" - > host_writeback_record value=`body` key="ok" + > writeback.record value=`body` key="ok" 2. * - > host_writeback_record value=`body` key="error" + > writeback.record value=`body` key="error" 2. * *_ = 1* diff --git a/ext/ai/智能体.mq.md b/ext/ai/智能体.mq.md index 3ffe531..9b8ee63 100644 --- a/ext/ai/智能体.mq.md +++ b/ext/ai/智能体.mq.md @@ -175,9 +175,9 @@ import json:lib/json.mq.md *body = > json.stringify value=`out`* *st = > json.get value=`out` key="status"* 1. `st` == "ok" - > host_writeback_record value=`body` key="ok" + > 自写回.写回 值=`body` 键="ok" 2. * - > host_writeback_record value=`body` key="error" + > 自写回.写回 值=`body` 键="error" 2. * *_ = 1*