transfer

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package transfer provides the transfer rules engine for cross-repository issue routing.

Package transfer provides the VDB-based semantic transfer router.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Embedder added in v0.2.1

type Embedder interface {
	Embed(ctx context.Context, text string) ([]float32, error)
}

Embedder is the subset of ai.Embedder used by VDBRouter.

type IssueInput

type IssueInput struct {
	Title  string
	Body   string
	Labels []string
	Author string
}

IssueInput represents the issue data used for rule matching.

type MatchResult

type MatchResult struct {
	Matched bool
	Rule    *config.TransferRule
	Target  string
	Reason  string
}

MatchResult contains the result of rule matching.

type RuleMatcher

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

RuleMatcher evaluates transfer rules against issues.

func NewRuleMatcher

func NewRuleMatcher(rules []config.TransferRule) *RuleMatcher

NewRuleMatcher creates a new RuleMatcher with the given rules. It filters out disabled rules and sorts by priority (descending).

func (*RuleMatcher) Match

func (m *RuleMatcher) Match(issue *IssueInput) *MatchResult

Match evaluates all rules against the issue and returns the first match. Returns a MatchResult with Matched=false if no rules match.

type VDBMatchResult added in v0.2.1

type VDBMatchResult struct {
	Target        string   // "owner/repo" of the suggested target
	Confidence    float64  // 0.0-1.0 confidence based on repo distribution
	SimilarIssues []string // IDs of similar issues from target repo
	Reasoning     string   // Optional LLM explanation
}

VDBMatchResult contains the result of VDB-based transfer routing.

type VDBRouter added in v0.2.1

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

VDBRouter performs semantic transfer routing using vector similarity search.

func NewVDBRouter added in v0.2.1

func NewVDBRouter(embedder Embedder, store qdrant.VectorStore, collection string, maxResults int) *VDBRouter

NewVDBRouter creates a new VDB router.

func NewVDBRouterFromEmbedder added in v0.2.1

func NewVDBRouterFromEmbedder(embedder *ai.Embedder, store qdrant.VectorStore, collection string, maxResults int) *VDBRouter

NewVDBRouterFromEmbedder is a convenience constructor accepting *ai.Embedder directly.

func (*VDBRouter) SuggestTransfer added in v0.2.1

func (r *VDBRouter) SuggestTransfer(ctx context.Context, issue *IssueInput, currentRepo string, confidenceThreshold float64, minSamples int, maxCandidates int) (*VDBMatchResult, error)

SuggestTransfer embeds the issue and analyses VDB results to propose a target repo. currentRepo is "owner/repo" and is excluded from the candidate set. Returns nil if no confident match is found.

Jump to

Keyboard shortcuts

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