loop

package
v0.1.28 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	RunAttempt(ctx context.Context, attempt int, prompt string) (AttemptResult, error)
}

type AttemptResult

type AttemptResult struct {
	Output   string
	ExitCode int
}

type Collector

type Collector interface {
	Collect(ctx context.Context, attempt int) (EvidenceResult, error)
}

type Decision

type Decision struct {
	Attempt   int       `yaml:"attempt"`
	Prompt    string    `yaml:"prompt,omitempty"`
	Bundle    string    `yaml:"bundle,omitempty"`
	ExitCode  int       `yaml:"exit_code"`
	Decision  string    `yaml:"decision"`
	Reason    string    `yaml:"reason"`
	CreatedAt time.Time `yaml:"created_at"`
}

type EvidenceResult

type EvidenceResult struct {
	PromptPath string
	BundlePath string
	Failure    string
}

type Options

type Options struct {
	Agent         Agent
	Collector     Collector
	InitialPrompt string
	MaxAttempts   int
	Now           func() time.Time
}

type Result

type Result struct {
	Decisions []Decision `yaml:"decisions"`
	Stopped   bool       `yaml:"stopped"`
	Reason    string     `yaml:"reason"`
}

func Run

func Run(ctx context.Context, opts Options) (Result, error)

Jump to

Keyboard shortcuts

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