Add execution control request contracts

This commit is contained in:
2026-11-14 17:36:03 +00:00
parent 0e4f590f5a
commit 2066579e09
7 changed files with 73 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
package domain
import (
"context"
"time"
)
@@ -60,6 +61,9 @@ type CacheControl struct {
// RunRequest represents a request to generate a single artifact.
type RunRequest struct {
OperationTimeout time.Duration
// OnPrepared receives borrowed, read-only internal state.
OnPrepared func(context.Context, *PreparedRun)
CaptureExchange bool
ContinueFrom *Exchange
PromptID string

View File

@@ -39,6 +39,7 @@ var (
ErrPromptRender = errors.New("failed to render prompt")
ErrLLMGenerate = errors.New("failed to generate output")
ErrValidation = errors.New("failed to validate output")
ErrOperationTimeout = errors.New("operation timeout exceeded")
)
// Runner executes the Promptkit core use case.