looprunner

package
v0.22.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoopConfig

type LoopConfig struct {
	MaxIterations int                 `json:"max_iterations"`
	Pre           []phaseconfig.Phase `json:"pre"`
	Loop          []phaseconfig.Phase `json:"loop"`
	Post          []phaseconfig.Phase `json:"post"`
}

func LoadLoopConfig

func LoadLoopConfig(path string) (*LoopConfig, error)

func (*LoopConfig) InsertInitialPrompt

func (c *LoopConfig) InsertInitialPrompt(prompt string)

func (*LoopConfig) Validate

func (c *LoopConfig) Validate() error

type NestedResult added in v0.14.0

type NestedResult struct {
	ExitCode   int
	StopReason string
	SessionID  string
	Reason     string
}

type PhaseAttemptResult

type PhaseAttemptResult struct {
	ExitCode      int
	SessionID     string
	StopReason    string
	LoopDirective string
	LoopLabel     string
	BrokerRunID   string
}

type RunOptions

type RunOptions struct {
	WorkDir      string
	RunID        string
	EventSink    phaseconfig.EventWriter
	Config       *LoopConfig
	MaxRetries   int
	Broker       *broker.Broker
	SeedMessage  *broker.AgentMessage // pushed to the attempt's brokerRunID after creation
	PhaseAttempt func(ctx context.Context, phase phaseconfig.Phase, attemptNum int, iteration int, prevSessionID string) (PhaseAttemptResult, error)
	NestedRun    func(ctx context.Context, configPath string, runType string) (NestedResult, error)
	ConfigDir    string
}

type RunResult

type RunResult struct {
	ExitCode   int
	StopReason string
	SessionID  string
	Reason     string
}

func Run

func Run(ctx context.Context, opts RunOptions) (RunResult, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL