From 5d6326981e5d8e6b62ce2da0496bc7a0f903e55c Mon Sep 17 00:00:00 2001 From: sausheong Date: Tue, 9 Jun 2026 23:58:21 +0800 Subject: [PATCH] =?UTF-8?q?docs(runtime):=20update=20RunTurn=20contract=20?= =?UTF-8?q?=E2=80=94=20it=20now=20does=20KG=20recall/ingest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runtime/runturn.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/runtime/runturn.go b/runtime/runturn.go index 04ed5ae..86ce9fd 100644 --- a/runtime/runturn.go +++ b/runtime/runturn.go @@ -35,9 +35,11 @@ type TurnEmit func(AgentEvent) // session state on replay. It differs from Run by design: it is headless // (live events go only through the emit callback, never an internal channel), // it dispatches tool calls serially (Run parallelizes concurrency-safe -// batches), and it does NOT perform compaction, knowledge-graph recall/ingest, -// streaming-tool kickoff, or the trace/slog emissions that Run's emitToolResult -// produces. Those remain Run's responsibility. +// batches), and it does NOT perform compaction, streaming-tool kickoff, or the +// trace/slog emissions that Run's emitToolResult produces (those remain Run's +// responsibility). It DOES perform bounded-synchronous knowledge-graph recall on +// the first round of an exchange (folding the hint into the system prompt) and +// async knowledge-graph ingest on the completing round. func (r *Runtime) RunTurn(ctx context.Context, userMsg string, images []llm.ImageContent, emit TurnEmit) (TurnResult, error) { if emit == nil { emit = func(AgentEvent) {}