service

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const MaxRelevantFileSize = 10000

MaxRelevantFileSize is the maximum size of a single file to include in the prompt context.

View Source
const MaxTotalFileSize = 50000

MaxTotalFileSize is the maximum total size of all relevant files combined.

Variables

View Source
var CopyExcludePatterns = []string{
	".git",
	"node_modules",
	"vendor",
	".evoloop",
}

CopyExcludePatterns defines directories to skip when copying a project.

Functions

func ExtractFilePaths

func ExtractFilePaths(output string, projectRoot string) []string

ExtractFilePaths parses error output to find referenced file paths.

func ReadRelevantFiles

func ReadRelevantFiles(paths []string, projectRoot string) map[string]string

ReadRelevantFiles reads files up to size limits and returns a map of relative path to content.

Types

type ExecutionHistoryQueryService

type ExecutionHistoryQueryService struct {
	// contains filtered or unexported fields
}

ExecutionHistoryQueryService queries execution history.

func NewExecutionHistoryQueryService

func NewExecutionHistoryQueryService(
	issueRepo *repository.ImplementationIssueRepository,
	executionRepo *repository.ExecutionHistoryRepository,
	evaluationRepo *repository.EvaluationReportRepository,
) *ExecutionHistoryQueryService

NewExecutionHistoryQueryService creates a new query service.

func (*ExecutionHistoryQueryService) QueryAll

QueryAll retrieves all history data.

type HistorySummary

type HistorySummary struct {
	Issues      []*domain.ImplementationIssue `json:"issues"`
	Executions  []*domain.ExecutionRecord     `json:"executions"`
	Evaluations []*domain.EvaluationReport    `json:"evaluations"`
}

HistorySummary holds combined history data for display.

type HookExecutor added in v0.2.0

type HookExecutor struct{}

HookExecutor runs post-apply hooks with safety constraints.

func NewHookExecutor added in v0.2.0

func NewHookExecutor() *HookExecutor

NewHookExecutor creates a new HookExecutor.

func (*HookExecutor) Execute added in v0.2.0

func (h *HookExecutor) Execute(hook config.PostApplyHook, executionID string) (*domain.HookExecutionRecord, error)

Execute runs the hook command, enforcing allowlist and timeout. Returns a HookExecutionRecord with captured output, or an error if the command is not allowed.

type ImplementationProposalService

type ImplementationProposalService struct {
	// contains filtered or unexported fields
}

ImplementationProposalService generates patch proposals for issues.

func NewImplementationProposalService

func NewImplementationProposalService(client llm.LanguageModelClient, artifactsPath string) *ImplementationProposalService

NewImplementationProposalService creates a new ImplementationProposalService.

func (*ImplementationProposalService) Propose

Propose generates a patch proposal for the given issue.

type IssueSelector added in v0.2.0

type IssueSelector struct {
	// contains filtered or unexported fields
}

IssueSelector picks the next issue to propose, respecting retry limits and cooldown.

func NewIssueSelector added in v0.2.0

func NewIssueSelector(p *policy.ExecutionPolicy) *IssueSelector

NewIssueSelector creates a new IssueSelector.

func (*IssueSelector) SelectNext added in v0.2.0

SelectNext returns the best candidate issue, or nil if none is eligible. Selection: filter non-proposable, over-max-attempts, and cooldown-blocked issues, then sort by priority ASC, attempt count ASC.

type ProjectInspectionService

type ProjectInspectionService struct{}

ProjectInspectionService inspects a local Git project.

func NewProjectInspectionService

func NewProjectInspectionService() *ProjectInspectionService

NewProjectInspectionService creates a new ProjectInspectionService.

func (*ProjectInspectionService) Inspect

Inspect analyzes the given directory and returns a ProjectContext.

type QualityMetricCollector

type QualityMetricCollector struct{}

QualityMetricCollector runs quality check commands and collects results.

func NewQualityMetricCollector

func NewQualityMetricCollector() *QualityMetricCollector

NewQualityMetricCollector creates a new QualityMetricCollector.

func (*QualityMetricCollector) Collect

Collect runs the configured quality commands and returns a snapshot.

type SelfImprovementAnalysisService

type SelfImprovementAnalysisService struct {
	// contains filtered or unexported fields
}

SelfImprovementAnalysisService generates ImplementationIssues from quality metrics.

func NewSelfImprovementAnalysisService

func NewSelfImprovementAnalysisService(memoryRepo *repository.ImprovementMemoryRepository) *SelfImprovementAnalysisService

NewSelfImprovementAnalysisService creates a new SelfImprovementAnalysisService. memoryRepo can be nil if memory is not available.

func (*SelfImprovementAnalysisService) Analyze

Analyze generates issues from a quality metric snapshot.

type SelfImprovementEvaluationService

type SelfImprovementEvaluationService struct {
	// contains filtered or unexported fields
}

SelfImprovementEvaluationService evaluates a patch proposal.

func NewSelfImprovementEvaluationService

func NewSelfImprovementEvaluationService(p *policy.ExecutionPolicy) *SelfImprovementEvaluationService

NewSelfImprovementEvaluationService creates a new evaluation service.

func (*SelfImprovementEvaluationService) Evaluate

func (s *SelfImprovementEvaluationService) Evaluate(
	record *domain.ExecutionRecord,
	projectCtx *domain.ProjectContext,
	validateCommands []string,
) (*domain.EvaluationReport, error)

Evaluate runs the evaluation pipeline for a given execution record and project context. validateCommands is used only in validate_only mode; pass nil for sandbox mode.

Jump to

Keyboard shortcuts

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