models

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildProgress added in v1.6.0

type BuildProgress struct {
	Type     BuildProgressType
	Platform string // e.g., "linux/amd64", "windows/arm64"
	Asset    string // e.g., "matecommit_version_linux_x86_64.tar.gz"
	Current  int    // Current item being processed
	Total    int    // Total items to process
	Error    error  // Error if Type is BuildProgressError
}

BuildProgress represents a progress update during binary building and uploading

type BuildProgressType added in v1.6.0

type BuildProgressType string

BuildProgressType represents the type of build progress event

const (
	// Build events
	BuildProgressStart    BuildProgressType = "build_start"
	BuildProgressPlatform BuildProgressType = "build_platform"
	BuildProgressComplete BuildProgressType = "build_complete"

	// Upload events
	UploadProgressStart    BuildProgressType = "upload_start"
	UploadProgressAsset    BuildProgressType = "upload_asset"
	UploadProgressComplete BuildProgressType = "upload_complete"

	// Error event
	BuildProgressError BuildProgressType = "error"
)

type ChangeSeverity

type ChangeSeverity string
const (
	MajorChange   ChangeSeverity = "major"
	MinorChange   ChangeSeverity = "minor"
	PatchChange   ChangeSeverity = "patch"
	UnknownChange ChangeSeverity = "unknown"
)

type CodeAnalysis

type CodeAnalysis struct {
	ChangesOverview string
	PrimaryPurpose  string
	TechnicalImpact string
}

type CodeExample

type CodeExample struct {
	Title       string // Example title
	Description string // Short description
	Code        string // Example code
	Language    string // Language (bash, go, etc.)
}

CodeExample represents a code example with description

type Commit

type Commit struct {
	Hash    string
	Author  string
	Email   string
	Date    string
	Message string
}

Commit represents a commit included in the PR.

type CommitInfo

type CommitInfo struct {
	Files         []string
	Diff          string
	TicketInfo    *TicketInfo
	IssueInfo     *Issue
	RecentHistory string
}

type CommitSuggestion

type CommitSuggestion struct {
	CommitTitle          string
	Explanation          string
	Files                []string
	CodeAnalysis         CodeAnalysis
	RequirementsAnalysis RequirementsAnalysis
	Usage                *TokenUsage
}

type Comparison

type Comparison struct {
	Feature string // Feature name
	Before  string // Previous state
	After   string // New state
}

Comparison represents a before/after comparison

type CriteriaStatus

type CriteriaStatus string
const (
	CriteriaFullyMet     CriteriaStatus = "full_met"
	CriteriaPartiallyMet CriteriaStatus = "partially_met"
	CriteriaNotMet       CriteriaStatus = "not_met"
)

type DependencyChange

type DependencyChange struct {
	Name       string               // Package name (e.g.: "github.com/user/repo", "react")
	OldVersion string               // Previous version (empty if Type == DependencyAdded)
	NewVersion string               // New version (empty if Type == DependencyRemoved)
	Type       DependencyChangeType // Change type
	Manager    string               // Manager: "go.mod", "package.json", "Cargo.toml", etc.
	Severity   ChangeSeverity       // Severity: major/minor/patch to detect breaking changes
	IsDirect   bool                 // true = direct dependency, false = dev/indirect
}

DependencyChange represents a change in a project dependency

type DependencyChangeType

type DependencyChangeType string
const (
	DependencyAdded   DependencyChangeType = "added"
	DependencyUpdated DependencyChangeType = "updated"
	DependencyRemoved DependencyChangeType = "removed"
)

type DiffAnalysis

type DiffAnalysis struct {
	// HasGoFiles indicates if the diff includes .go files
	HasGoFiles bool

	// HasTestFiles indicates if the diff includes test files
	HasTestFiles bool

	// HasDocFiles indicates if the diff includes documentation files
	HasDocFiles bool

	// HasConfigFiles indicates if the diff includes configuration files
	HasConfigFiles bool

	// HasUIFiles indicates if the diff includes UI files (CSS, HTML, JSX, etc)
	HasUIFiles bool

	// Keywords contains keywords found in the diff (fix, feat, refactor, etc)
	Keywords map[string]bool
}

DiffAnalysis contains the structured analysis of the diff for label inference.

type FileChange

type FileChange struct {
	Path      string
	Additions int
	Deletions int
}

type FileStatistics

type FileStatistics struct {
	FilesChanged int
	Insertions   int
	Deletions    int
	TopFiles     []FileChange
}

type FormAttributes added in v1.7.0

type FormAttributes struct {
	Label       string   `yaml:"label"`
	Description string   `yaml:"description,omitempty"`
	Placeholder string   `yaml:"placeholder,omitempty"`
	Value       string   `yaml:"value,omitempty"`   // For 'markdown' type elements
	Options     []string `yaml:"options,omitempty"` // For dropdowns
	Multiple    bool     `yaml:"multiple,omitempty"`
}

FormAttributes contains the visual and behavioral attributes of the field.

type FormValidations added in v1.7.0

type FormValidations struct {
	Required bool `yaml:"required,omitempty"`
}

FormValidations defines validation rules.

type GitChange

type GitChange struct {
	Path   string
	Status string
}

type Issue

type Issue struct {
	ID          int
	Number      int
	Title       string
	Description string
	State       string
	Labels      []string
	Author      string
	URL         string
	Criteria    []string
}

type IssueFormItem added in v1.7.0

type IssueFormItem struct {
	Type        string          `yaml:"type"`
	ID          string          `yaml:"id,omitempty"`
	Attributes  FormAttributes  `yaml:"attributes,omitempty"`
	Validations FormValidations `yaml:"validations,omitempty"`
}

IssueFormItem represents an item within a GitHub Issue Form (YAML).

type IssueGenerationRequest

type IssueGenerationRequest struct {
	// Description is the manual description provided by the user (optional)
	Description string

	// Diff contains local git changes (optional)
	Diff string

	// ChangedFiles is the list of modified files (optional)
	ChangedFiles []string

	// Hint is additional context provided by the user to guide generation (optional)
	Hint string

	// Language is the language for content generation (e.g.: "es", "en")
	Language string

	// Template is the project's issue template to guide generation (optional)
	Template *IssueTemplate

	// AvailableLabels is the list of labels available in the repository (optional)
	AvailableLabels []string
}

IssueGenerationRequest contains the information needed to generate an issue. Supports multiple context sources: manual description, git diff, or both.

type IssueGenerationResult

type IssueGenerationResult struct {
	// Title is the generated title for the issue
	Title string

	// Description is the full generated description for the issue
	Description string

	// Labels are the suggested labels for the issue
	Labels []string

	// Assignees are the suggested assignees for the issue
	Assignees []string

	// Usage contains metadata on token usage by the AI
	Usage *TokenUsage
}

IssueGenerationResult contains the result of an issue's content generation.

type IssueTemplate

type IssueTemplate struct {
	// YAML frontmatter metadata
	Name        string   `yaml:"name"`
	About       string   `yaml:"about,omitempty"`
	Description string   `yaml:"description,omitempty"`
	Title       string   `yaml:"title"`
	Labels      []string `yaml:"labels"`
	Assignees   []string `yaml:"assignees,omitempty"`

	// Template content
	// For .md: Markdown string
	// For .yml (GitHub Issue Forms): strict typed list of form items
	Body        []IssueFormItem `yaml:"body,omitempty"`
	BodyContent string          `yaml:"-"` // For backward compatibility with .md

	// Path to the template file
	FilePath string `yaml:"-"`
}

IssueTemplate represents an issue template with its metadata.

func (*IssueTemplate) GetAbout

func (t *IssueTemplate) GetAbout() string

GetAbout returns the template description (uses 'description' or 'about')

type PRData

type PRData struct {
	ID            int
	Title         string
	Creator       string
	Commits       []Commit
	Diff          string
	BranchName    string
	RelatedIssues []Issue
	Description   string
	Labels        []string
}

PRData contains information extracted from a Pull Request.

type PRSummary

type PRSummary struct {
	Title  string
	Body   string
	Labels []string
	Usage  *TokenUsage
}

PRSummary is the generated summary for the PR, with title, body, and labels.

type ProgressData

type ProgressData struct {
	Issues   []string
	PRNumber int
	Count    int
	Title    string
	Number   int
	IsAuto   bool
	Error    string
}

type ProgressEvent

type ProgressEvent struct {
	Type    ProgressEventType
	Message string
	Data    *ProgressData
}

type ProgressEventType

type ProgressEventType string
const (
	ProgressIssuesDetected  ProgressEventType = "issues_detected"
	ProgressIssuesClosing   ProgressEventType = "issues_closing"
	ProgressBreakingChanges ProgressEventType = "breaking_changes"
	ProgressTestPlan        ProgressEventType = "test_plan_generated"
	ProgressGeneric         ProgressEventType = "generic_info"
)

type PullRequest

type PullRequest struct {
	Number      int
	Title       string
	Description string
	Author      string
	Labels      []string
	URL         string
}

type Release

type Release struct {
	Version         string
	PreviousVersion string
	Title           string
	Summary         string
	Date            time.Time
	Features        []ReleaseItem
	BugFixes        []ReleaseItem
	Breaking        []ReleaseItem
	Documentation   []ReleaseItem
	Improvements    []ReleaseItem
	Other           []ReleaseItem
	AllCommits      []Commit
	VersionBump     VersionBump
	ClosedIssues    []Issue
	MergedPRs       []PullRequest
	Contributors    []string
	NewContributors []string
	Dependencies    []DependencyChange
	FileStats       FileStatistics
}

Release represents a release with all information

type ReleaseItem

type ReleaseItem struct {
	Type        string // feat, fix, docs, etc
	Scope       string
	Description string
	Breaking    bool
	CommitHash  string
	PRNumber    string // if it has an associated PR
}

ReleaseItem represents an item in the changelog

type ReleaseNotes

type ReleaseNotes struct {
	Title           string
	Summary         string
	Highlights      []string
	Sections        []ReleaseNotesSection
	Changelog       string
	Recommended     VersionBump
	QuickStart      string
	Examples        []CodeExample
	BreakingChanges []string
	Comparisons     []Comparison
	Links           map[string]string
	Usage           *TokenUsage
}

ReleaseNotes is the result generated by AI

type ReleaseNotesSection added in v1.7.0

type ReleaseNotesSection struct {
	Title string
	Items []string
}

type RequirementsAnalysis

type RequirementsAnalysis struct {
	CriteriaStatus         CriteriaStatus
	MissingCriteria        []string
	CompletedIndices       []int
	ImprovementSuggestions []string
}

type TemplateMetadata

type TemplateMetadata struct {
	Name     string
	About    string
	FilePath string
}

type TicketInfo

type TicketInfo struct {
	TicketID    string   `json:"ticket_id"`
	TicketTitle string   `json:"ticket_title"`
	TitleDesc   string   `json:"title_desc"`
	Criteria    []string `json:"criteria"`
}

type TokenUsage

type TokenUsage struct {
	InputTokens  int     `json:"input_tokens"`
	OutputTokens int     `json:"output_tokens"`
	TotalTokens  int     `json:"total_tokens"`
	CostUSD      float64 `json:"cost_usd,omitempty"`
	Model        string  `json:"model,omitempty"`
	CacheHit     bool    `json:"cache_hit,omitempty"`
	DurationMs   int64   `json:"duration_ms,omitempty"`
}

type VCSRelease

type VCSRelease struct {
	TagName string
	Name    string
	Body    string
	Draft   bool
	URL     string
}

type VersionBump

type VersionBump string

VersionBump indicates the version bump type

const (
	MajorBump VersionBump = "major"
	MinorBump VersionBump = "minor"
	PatchBump VersionBump = "patch"
	NoBump    VersionBump = "none"
)

Jump to

Keyboard shortcuts

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