Help us shape the future of Go! Take the 2026 Go Developer Survey

app

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 25 Imported by: 0

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 CheckResult struct {
	Report       *schema.Report
	PatchDiff    string
	OriginalSpec string
	LineCount    int
	Model        string
}

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

type ContextDocument struct {
	Name string
	Text string
}

type Error

type Error struct {
	Kind ErrorKind
	Err  error
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type ErrorKind

type ErrorKind int
const (
	ErrorInput ErrorKind = iota
	ErrorProvider
	ErrorModelOutput
)

type ProviderFactory

type ProviderFactory func(providerModel string) (llm.Provider, error)

type Source

type Source string
const (
	SourceCLI Source = "cli"
	SourceWeb Source = "web"
)

Jump to

Keyboard shortcuts

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