Documentation
¶
Index ¶
Constants ¶
View Source
const ( VerifyAuto = "auto" VerifyOff = "off" )
Values of CheckRequest.Verify.
View Source
const ( StructuredOutputAuto = "auto" StructuredOutputOff = "off" )
Values of CheckRequest.StructuredOutput.
View Source
const ( PatchesOn = "on" PatchesOff = "off" )
Values of CheckRequest.Patches.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckRequest ¶
type CheckRequest struct {
Version string
SpecPath string
SpecName string
SpecText string
ContextPaths []string
ContextDocuments []ContextDocument
Profile string
Strict bool
SeverityThreshold string
LLMProvider string
LLMModel string
MaxTokens int
// Effort asks the model for more or less reasoning. Empty leaves the
// provider's default in place.
Effort string
// Verify is "auto" (the default when empty) to give every CRITICAL
// finding the model produced a second look before it decides the
// verdict, or "off" to skip it.
Verify string
// NoCache skips the review cache: the review is neither read from it nor
// stored in it.
NoCache bool
// Patches is "on" (the default when empty) to ask the model for patches
// that correct its findings, or "off" to leave them out and save the
// output tokens they cost. Completion patches are not affected.
Patches string
// StructuredOutput is "auto" (the default when empty) to have the
// provider constrain responses to the review schema where the model
// allows it, or "off" to describe the schema in the prompt only.
StructuredOutput string
Offline bool
Debug bool
Verbose bool
Preflight bool
PreflightMode string
PreflightProfile string
PreflightIgnore []string
Chunking string
ChunkLines int
ChunkOverlap int
ChunkMinLines int
ChunkTokenThreshold int
ChunkConcurrency int
SynthesisLineThreshold int
IncrementalFrom string
IncrementalFromText string
IncrementalBasePath string
IncrementalBaseText string
IncrementalMode string
IncrementalMaxChangeRatio float64
IncrementalMaxRemapFailureRatio float64
IncrementalContextLines int
IncrementalStrictReuse bool
IncrementalReport bool
ConvergenceFrom string
ConvergenceFromText string
ConvergenceMode string
ConvergenceStrict bool
ConvergenceReport bool
CompletionSuggestions bool
CompletionMode string
CompletionTemplate string
CompletionMaxPatches int
CompletionOpenDecisions bool
Source Source
ErrWriter io.Writer
}
type CheckResult ¶
type Checker ¶
type Checker struct {
NewProvider ProviderFactory
// Cache, when set, stores finished reviews and serves an unchanged
// request from them without calling a model.
Cache *cache.Store
}
func NewChecker ¶
func NewChecker() *Checker
NewChecker returns a checker using the real providers and the default review cache. If the cache directory cannot be found, it runs without one.
func (*Checker) Check ¶
func (c *Checker) Check(ctx context.Context, req CheckRequest) (*CheckResult, error)
type ContextDocument ¶
Click to show internal directories.
Click to hide internal directories.