]> git.giacomolli.uk - onechat/blobdiff - turn.go
Bind external events to permanent agent IDs
[onechat] / turn.go
diff --git a/turn.go b/turn.go
index 01d6b7b61d98d51700308739c71a208f1030f872..4652321ad2105976a595a74154e1310b1f892443 100644 (file)
--- a/turn.go
+++ b/turn.go
@@ -285,10 +285,11 @@ func (l *TurnLoop) Flush(ctx context.Context) error {
        return l.memory.Flush(ctx)
 }
 
        return l.memory.Flush(ctx)
 }
 
-// Run runs a turn each time user messages or reports wait, until ctx ends. It
-// returns the error of a failed log write, which stops the agent. At its start
-// it resumes the subagents that a stop of the daemon cut, and at its end it
-// ends the runs of the subagents and waits for them.
+// Run starts a turn when user messages, reports, or queued external events
+// wait, until ctx ends. It returns the error of a failed log write, which stops
+// the agent. External events enter memory only between chains. At its start it
+// resumes the subagents that a stop of the daemon cut, and at its end it ends
+// the runs of the subagents and waits for them.
 func (l *TurnLoop) Run(ctx context.Context) error {
        defer l.runs.Close()
 
 func (l *TurnLoop) Run(ctx context.Context) error {
        defer l.runs.Close()