commands

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const LoopProfilesConfigFile = "configs/loop-profiles.json"

Variables

View Source
var LoopProfiles = map[string]LoopProfile{
	"quality": {
		Mode:             "committee",
		RoleConfig:       "configs/skill-quality.roles.json",
		MaxIterations:    1,
		Threshold:        9.0,
		Budget:           1,
		VerboseArtifacts: true,
	},
}

LoopProfiles contains built-in loop profiles.

Functions

func FormatLoopProfile

func FormatLoopProfile(name string, profile LoopProfile) string

func GetLoopProfiles

func GetLoopProfiles(repoRoot string) (map[string]LoopProfile, error)

func OutcomeFromRunResult

func OutcomeFromRunResult(result harnessloop.RunResult) harness.CommandOutcome

func ParseLoopProfilesRepoRoot

func ParseLoopProfilesRepoRoot(args []string) (string, error)

func ResolveLoopRegressionBaselinePath

func ResolveLoopRegressionBaselinePath(repoRoot, profileName, baselinePath string) string

func ResolveRoleConfigPath

func ResolveRoleConfigPath(repoRoot, roleConfig string) string

func ResolveVerboseArtifacts

func ResolveVerboseArtifacts(defaultValue, forceEnable, forceDisable bool) (bool, error)

func UnexpectedLoopArgError

func UnexpectedLoopArgError(arg string) error

Types

type LoopFlags

type LoopFlags struct {
	RepoRoot      string
	Threshold     float64
	MaxIterations int
	Branch        string
	APIURL        string
	Markdown      bool
}

func ParseLoopFlags

func ParseLoopFlags(args []string) (LoopFlags, error)

type LoopHandler

type LoopHandler struct {
	// contains filtered or unexported fields
}

func NewLoopHandler

func NewLoopHandler(runLoop RunLoopFunc) *LoopHandler

func (*LoopHandler) ExecuteLoopAction

func (h *LoopHandler) ExecuteLoopAction(action string, args []string, ctx harness.Context) (harness.CommandOutcome, error)

type LoopLabFlags

type LoopLabFlags struct {
	LoopFlags
	Mode               string
	RoleConfig         string
	Seed               int64
	Budget             int
	RunA               string
	RunB               string
	RunID              string
	Iteration          int
	Format             string
	Out                string
	VerboseArtifacts   bool
	NoVerboseArtifacts bool
}

func ParseLoopLabFlags

func ParseLoopLabFlags(args []string) (LoopLabFlags, error)

type LoopProfile

type LoopProfile struct {
	Mode             string
	RoleConfig       string
	MaxIterations    int
	Threshold        float64
	Budget           int
	VerboseArtifacts bool
}

type LoopProfileFlags

type LoopProfileFlags struct {
	LoopFlags
	RoleConfig         string
	VerboseArtifacts   bool
	NoVerboseArtifacts bool
}

func ParseLoopQualityFlags

func ParseLoopQualityFlags(profile LoopProfile, args []string) (LoopProfileFlags, error)

type LoopRegressionFlags

type LoopRegressionFlags struct {
	Profile       string
	BaselinePath  string
	WriteBaseline bool
}

func ParseLoopRegressionFlags

func ParseLoopRegressionFlags(args []string) (LoopRegressionFlags, []string, error)

type LoopRegressionReport

type LoopRegressionReport struct {
	SchemaVersion   string                        `json:"schema_version"`
	Profile         string                        `json:"profile"`
	BaselinePath    string                        `json:"baseline_path"`
	BaselineWritten bool                          `json:"baseline_written,omitempty"`
	RunID           string                        `json:"run_id,omitempty"`
	Pass            bool                          `json:"pass"`
	DriftCount      int                           `json:"drift_count"`
	Drifts          []harnessloop.RegressionDrift `json:"drifts,omitempty"`
}

type LoopRuntimeFlags

type LoopRuntimeFlags struct {
	Format      string
	SummaryPath string
	NoColor     bool
	DryRun      bool
	Explain     bool
}

func ParseLoopRuntimeFlags

func ParseLoopRuntimeFlags(args []string) (LoopRuntimeFlags, []string, error)

type RunLoopFunc

type RunLoopFunc func(apiURL, action string, cfg harnessloop.Config) (harnessloop.RunResult, error)

Jump to

Keyboard shortcuts

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