Versions in this module Expand all Collapse all v0 v0.4.0 May 2, 2026 Changes in this version type Agent + func (a *Agent) GetMetrics() SessionMetrics + type SessionMetrics struct + Iterations int + Tokens TokenMetrics + ToolCalls ToolCallMetrics + type TokenMetrics struct + Cached int + Input int + Output int + Thinking int + TotalInput int + TotalOutput int + type ToolCallMetrics struct + ByTool map[string]int + Total int v0.3.0 May 1, 2026 v0.2.0 Apr 27, 2026 Changes in this version type Reporter + ReportTruncated func(maxTokens int) v0.1.0 Apr 20, 2026 Changes in this version type Reporter + ReportEmptyResponseRetry func(attempt int) + ReportExtractionRetry func(attempt int) v0.0.1 Apr 13, 2026 Changes in this version + const AbsoluteMaxIter + const MaxIterationsPerFile + var StructuredReviewSchema = map[string]any + func CalculateMaxIterations(changedFiles int) int + func WriteFileWithDirs(path string, data []byte) error + type Agent struct + func NewAgent(model llm.Model, registry ToolDispatcher, opts ...AgentOption) *Agent + func (a *Agent) ExtractStructuredReview(ctx context.Context, extractionSystemPrompt, rawReview string, ...) (*StructuredReview, error) + func (a *Agent) RunReview(ctx context.Context, systemPrompt, requestText string, ...) (string, error) + type AgentOption func(*Agent) + func WithReporter(r Reporter) AgentOption + func WithStderr(w io.Writer) AgentOption + type Approval struct + Action string + Approved bool + Rationale string + type FileReview struct + Lines string + Path string + Review string + func (fr *FileReview) ParseLines() (int, int, error) + type PRComment struct + Author string + Body string + Date time.Time + ID int64 + IsOutdated bool + IsSelf bool + Line int + Path string + StartLine int + type PRMetadata struct + Author string + Comments []PRComment + CreatedAt time.Time + Description string + IdentifiedTag string + PRNumber int + RepoFullName string + Title string + type Reporter interface + ReportCapReached func(maxIterations int) + ReportExtraction func() + ReportFinalReview func() + ReportIteration func(iter int) + ReportToolCall func(tc llm.ToolCall) + ReportUsage func(usage llm.Usage) + ReportUsageSummary func(usage llm.Usage) + type StructuredReview struct + Approval Approval + FilesReview []FileReview + NonSpecificReview string + RawFreeText string + type ToolDispatcher interface + HandleCall func(tc llm.ToolCall) (string, error) + ToTools func() []llm.ToolDef