Observe claimed prepared executions

This commit is contained in:
2026-09-23 17:15:51 +00:00
parent 0e1ad784d1
commit 63bedf2a97
12 changed files with 279 additions and 11 deletions

View File

@@ -143,8 +143,11 @@ type RunRequest struct {
// Negative values are invalid for Prepare, PrepareExecution, and Run.
// Injected LLMClient implementations remain single-dispatch.
TransientRetries *int
// Observer receives metadata about this Run invocation synchronously. It is
// Observer receives metadata about an execution invocation synchronously. It is
// excluded from JSON and is not invoked by Prepare or PrepareExecution.
// Successful PrepareExecution retains the function for its RunPrepared call;
// Discard or a completed claim clears that reference. The closure itself is
// not copied, so callers must synchronize its shared state.
Observer ExecutionObserver `json:"-"`
}