Documentation
¶
Index ¶
- func AllPassed(results []TaskResult) bool
- func CheckCommand(command string, expectedExitCode *int, workspace string) (bool, string)
- func CheckFileContains(workspace, path, pattern string) (bool, string)
- func CheckOutputContains(output string, patterns []string) (bool, string)
- func PrintResults(results []TaskResult)
- type Check
- type Constraints
- type EvalTask
- type FileContainsCheck
- type NegCheck
- type TaskResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllPassed ¶
func AllPassed(results []TaskResult) bool
func CheckCommand ¶
func CheckFileContains ¶
func CheckOutputContains ¶
func PrintResults ¶
func PrintResults(results []TaskResult)
Types ¶
type Check ¶
type Check struct {
Command string `yaml:"command"`
ExitCode *int `yaml:"exit_code"`
OutputContains []string `yaml:"output_contains"`
FileContains []FileContainsCheck `yaml:"file_contains"`
FilesModified []string `yaml:"files_modified"`
}
type Constraints ¶
type Constraints struct {
ForbiddenPaths []string `yaml:"forbidden_paths,omitempty"`
ForbiddenTools []string `yaml:"forbidden_tools,omitempty"`
MaxFilesChanged int `yaml:"max_files_changed,omitempty"`
RequireTestRun bool `yaml:"require_test_run,omitempty"`
RequireUserApproval []string `yaml:"require_user_approval_for,omitempty"`
}
type EvalTask ¶
type EvalTask struct {
ID string `yaml:"id"`
Name string `yaml:"name"`
Description string `yaml:"description"`
Workspace string `yaml:"workspace"`
Prompt string `yaml:"prompt"`
Success []Check `yaml:"success"`
Negative []NegCheck `yaml:"negative,omitempty"`
Constraints *Constraints `yaml:"constraints,omitempty"`
}
func FilterTasks ¶
func ValidateTasks ¶
type FileContainsCheck ¶
type TaskResult ¶
type TaskResult struct {
ID string `yaml:"id"`
Name string `yaml:"name"`
Passed bool `yaml:"passed"`
Failures []string `yaml:"failures,omitempty"`
}
func RunSmokeChecks ¶
func RunSmokeChecks(tasks []EvalTask) []TaskResult
func RunTasks ¶
func RunTasks(binPath string, tasks []EvalTask) []TaskResult
Click to show internal directories.
Click to hide internal directories.