internal/adapters/cli/review
import "github.com/nilstate/scafld/v2/internal/adapters/cli/review"
Package review selects review providers and pass agendas for the CLI adapter.
Functions
func BuildInput(opts InputOptions, selected Selection) appreview.Input
Source: internal/adapters/cli/review/options.go:27
BuildInput maps CLI selection and flags to the app-layer review input.
func FirstNonEmpty(values ...string) string
Source: internal/adapters/cli/review/options.go:84
FirstNonEmpty returns the first non-blank value.
func ModeFromValue(mode string) corereview.Mode
Source: internal/adapters/cli/review/options.go:54
ModeFromValue resolves the CLI mode value into the provider review mode.
func PositiveInt(value string) int
Source: internal/adapters/cli/review/options.go:63
PositiveInt parses non-negative integer CLI values. Invalid values use the unset value because review budgets are advisory, not gate inputs.
func PositiveOrDefault(value int, fallback int) int
Source: internal/adapters/cli/review/options.go:76
PositiveOrDefault returns fallback when value is unset.
func PrintHelp(w io.Writer)
Source: internal/adapters/cli/review/help.go:9
PrintHelp writes command-specific review help.
func Select(ctx context.Context, opts Options) (Selection, error)
Source: internal/adapters/cli/review/selection.go:55
Select loads config, applies CLI overrides, and returns a review provider.
func SplitScope(value string) []string
Source: internal/adapters/cli/review/scope.go:6
SplitScope parses comma-separated review scope paths.
Types
type InputOptions
Source: internal/adapters/cli/review/options.go:12
InputOptions carries CLI review flags into the app input assembler.
type InputOptions struct {
TaskID string
Mode string
ReviewScope string
MaxFindings string
MinAttackAngles string
ReviewDepth string
ForceReview bool
PrintContext bool
HumanReviewed bool
RepairPacketPath string
Reason string
}Fields
TaskID stringMode stringReviewScope stringMaxFindings stringMinAttackAngles stringReviewDepth stringForceReview boolPrintContext boolHumanReviewed boolRepairPacketPath stringReason string
type Options
Source: internal/adapters/cli/review/selection.go:26
Options configures review-provider selection for the CLI.
type Options struct {
Root string
TaskID string
Provider string
Command string
ProviderBinary string
Model string
DiagnosticsPath string
Progress io.Writer
PrintContext bool
RepairPacketPath string
}Fields
Root stringTaskID stringProvider stringCommand stringProviderBinary stringModel stringDiagnosticsPath stringProgress io.WriterPrintContext boolRepairPacketPath string
type Selection
Source: internal/adapters/cli/review/selection.go:40
Selection is the provider and review agenda chosen for a review run.
type Selection struct {
Provider appreview.Provider
ProviderName string
ProviderModel string
Passes []appreview.Pass
Invariants map[string]string
ContextSections []reviewcontext.Section
ContextMaxBytes int
RequiredContextMaxBytes int
Contract corecontract.Contract
Dossier configadapter.ReviewDossierConfig
EvidenceRoots []string
}Fields
Provider appreview.ProviderProviderName stringProviderModel stringPasses []appreview.PassInvariants map[string]stringContextSections []reviewcontext.SectionContextMaxBytes intRequiredContextMaxBytes intContract corecontract.ContractDossier configadapter.ReviewDossierConfigEvidenceRoots []string
