Documentation
¶
Overview ¶
Package outcome provides structured task outcome parsing and verdict extraction
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractSummary ¶
ExtractSummary extracts a summary from output
func FormatOutcome ¶
FormatOutcome formats an outcome for display
Types ¶
type ChangeInfo ¶
type ChangeInfo struct {
FilesModified int `json:"files_modified"`
LinesAdded int `json:"lines_added"`
LinesDeleted int `json:"lines_deleted"`
CommitHash string `json:"commit_hash,omitempty"`
}
ChangeInfo represents information about code changes made
type Outcome ¶
type Outcome struct {
Verdict Verdict `json:"verdict"`
Reason string `json:"reason,omitempty"`
Summary string `json:"summary,omitempty"`
Details string `json:"details,omitempty"`
Timestamp time.Time `json:"timestamp"`
Metadata map[string]string `json:"metadata,omitempty"`
Blockers []string `json:"blockers,omitempty"` // Blocked-by task IDs
ExitCode int `json:"exit_code,omitempty"`
Changes *ChangeInfo `json:"changes,omitempty"`
TestResults *TestResults `json:"test_results,omitempty"` // Automated test results
}
Outcome represents the complete structured outcome of a task execution
func MergeOutcomes ¶
MergeOutcomes combines multiple outcomes into a single verdict Pass only if all pass, fail if any fail, blocked if any blocked
func ParseOutput ¶
ParseOutput parses output assuming success (exit code 0)
func ParseWithExitCode ¶
ParseWithExitCode is a convenience function that parses output with an exit code
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser parses agent output to extract structured outcomes
type TestResults ¶
type TestResults struct {
Passed int `json:"passed"`
Failed int `json:"failed"`
Skipped int `json:"skipped"`
Total int `json:"total"`
Duration int64 `json:"duration_ms"`
Output string `json:"output,omitempty"`
Error string `json:"error,omitempty"`
RunTests bool `json:"run_tests"` // Whether tests were actually run
Timestamp time.Time `json:"timestamp"`
}
TestResults represents the outcome of automated test execution
type Verdict ¶
type Verdict string
Verdict represents the structured outcome of a task execution
const ( // VerdictPass indicates the task completed successfully VerdictPass Verdict = "pass" // VerdictFail indicates the task failed VerdictFail Verdict = "fail" // VerdictBlocked indicates the task is blocked by dependencies VerdictBlocked Verdict = "blocked" // VerdictUnknown indicates the verdict could not be determined VerdictUnknown Verdict = "unknown" )
func DetermineVerdict ¶
DetermineVerdict quickly determines a verdict from output