looprunner

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 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"`
	RosterFile    string              `json:"roster_file,omitempty"`
	Pre           []phaseconfig.Phase `json:"pre"`
	Loop          []phaseconfig.Phase `json:"loop"`
	Post          []phaseconfig.Phase `json:"post"`
}

func LoadLoopConfig

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

func LoadLoopConfigWithRoster added in v0.25.0

func LoadLoopConfigWithRoster(path string, inherited *rosterconfig.Config, fallbackPath string) (*LoopConfig, *rosterconfig.Config, error)

LoadLoopConfigWithRoster loads a loop config and resolves its effective roster. A declared roster file is relative to the loop config, then the inherited loaded roster is used, and finally fallbackPath is used.

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
	Roster       *rosterconfig.Config
}

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