Просмотр исходного кода

docs(loop): clarify the /goal steering comment names the step/end session event

The continuation-override comment said "step-end/continuation listeners". With no
agent/step-end emit, the surviving step-boundary listener is the durable step/end
SESSION event, so spell it "step/end session-event/continuation listeners" to avoid
implying a removed agent/* mirror. Comment-only; no behavior change.
Tianyi Cui 2 месяцев назад
Родитель
Сommit
b8d0da9f8c
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      packages/core/agent-loop/src/loop.ts

+ 4 - 4
packages/core/agent-loop/src/loop.ts

@@ -161,7 +161,7 @@ export interface LoopHandle {
  *       drain steering → session('steering/message'); emit agent/steering
  *       drain steering → session('steering/message'); emit agent/steering
  *       session('step/end')                           ⟵ durable step boundary (no agent/* mirror)
  *       session('step/end')                           ⟵ durable step boundary (no agent/* mirror)
  *       cont = waterfall agent/turn-continuation(default = hadToolCalls || steered)
  *       cont = waterfall agent/turn-continuation(default = hadToolCalls || steered)
- *       if !cont && steering arrived from step-end/continuation listeners: cont = true
+ *       if !cont && steering arrived from step/end session-event/continuation listeners: cont = true
  *       if !cont: break
  *       if !cont: break
  *     session('turn/end'); emit agent/turn-end
  *     session('turn/end'); emit agent/turn-end
  *     await ctx.parallel('session/flush', session)    ⟵ durability checkpoint
  *     await ctx.parallel('session/flush', session)    ⟵ durability checkpoint
@@ -461,9 +461,9 @@ async function runTurn(ctx: Context, agent: ReactLoopAgent, handle: LoopHandle,
         break
         break
       }
       }
 
 
-      // Steering from step-end/continuation listeners (the /goal pattern)
-      // demands the model see it — it overrides a negative decision; the
-      // next iteration's drain records it.
+      // Steering from step/end session-event or continuation listeners (the
+      // /goal pattern) demands the model see it — it overrides a negative
+      // decision; the next iteration's drain records it.
       if (!shouldContinue && agent.inbox.hasSteering) shouldContinue = true
       if (!shouldContinue && agent.inbox.hasSteering) shouldContinue = true
 
 
       // A cancel that landed during the continuation window — after the step's
       // A cancel that landed during the continuation window — after the step's