core

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package core contains shared data types used across Fuse subpackages.

Index

Constants

View Source
const (
	LangGo         = astkit.LangGo
	LangTypeScript = astkit.LangTypeScript
	LangTSX        = astkit.LangTSX
	LangJavaScript = astkit.LangJavaScript
	LangPython     = astkit.LangPython
	LangJava       = astkit.LangJava
	LangRust       = astkit.LangRust
	LangJSON       = astkit.LangJSON
	LangYAML       = astkit.LangYAML
	LangTOML       = astkit.LangTOML
	LangUnknown    = astkit.LangUnknown
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditEntry

type AuditEntry struct {
	Timestamp       string           `json:"timestamp"`
	File            string           `json:"file"`
	Language        LanguageKey      `json:"language"`
	Strategy        MergeStrategy    `json:"strategy"`
	ConflictType    ConflictType     `json:"conflictType"`
	Severity        ConflictSeverity `json:"severity"`
	Confidence      float64          `json:"confidence"`
	AutoMerged      bool             `json:"autoMerged"`
	BreakingChanges int              `json:"breakingChanges"`
	PromptFile      string           `json:"promptFile,omitempty"`
}

AuditEntry is one row in `.git/fuse/audit.json`.

type BreakingChange

type BreakingChange struct {
	Kind          string           `json:"kind"`
	Symbol        string           `json:"symbol"`
	AffectedFiles []string         `json:"affectedFiles,omitempty"`
	Severity      ConflictSeverity `json:"severity"`
	Message       string           `json:"message"`
}

BreakingChange is a detected breaking change during merge.

type ConflictSeverity

type ConflictSeverity string

ConflictSeverity is the assessed severity of a conflict.

const (
	SeverityNone     ConflictSeverity = "NONE"
	SeverityLow      ConflictSeverity = "LOW"
	SeverityMedium   ConflictSeverity = "MEDIUM"
	SeverityHigh     ConflictSeverity = "HIGH"
	SeverityCritical ConflictSeverity = "CRITICAL"
)

type ConflictType

type ConflictType string

ConflictType categorizes the nature of a merge conflict.

const (
	ConflictNone            ConflictType = "NONE"
	ConflictIncremental     ConflictType = "INCREMENTAL"
	ConflictStructural      ConflictType = "STRUCTURAL"
	ConflictArchitectural   ConflictType = "ARCHITECTURAL"
	ConflictConfigurational ConflictType = "CONFIGURATIONAL"
	ConflictComplex         ConflictType = "COMPLEX"
)

type ImportStatement

type ImportStatement = astkit.ImportStatement

LineRange, SymbolData, ImportStatement are re-exported from astkit so that Grove and Fuse share a single source of truth for tree-sitter output.

type LanguageKey

type LanguageKey = astkit.LanguageKey

LanguageKey is re-exported from astkit (shared with Grove).

type LineRange

type LineRange = astkit.LineRange

LineRange, SymbolData, ImportStatement are re-exported from astkit so that Grove and Fuse share a single source of truth for tree-sitter output.

type MergeResult

type MergeResult struct {
	FilePath        string           `json:"filePath"`
	Language        LanguageKey      `json:"language"`
	MergedContent   string           `json:"mergedContent"`
	HasConflict     bool             `json:"hasConflict"`
	Confidence      float64          `json:"confidence"`
	ConflictType    ConflictType     `json:"conflictType"`
	Severity        ConflictSeverity `json:"severity"`
	Strategy        MergeStrategy    `json:"strategy"`
	BreakingChanges []BreakingChange `json:"breakingChanges,omitempty"`
	Conflicts       []SymbolConflict `json:"conflicts,omitempty"`
	PromptFile      string           `json:"promptFile,omitempty"`
	AuditEntry      AuditEntry       `json:"auditEntry"`
	Stats           MergeStats       `json:"stats"`
	Diagnostics     []string         `json:"diagnostics,omitempty"`
}

MergeResult is the output of the IntelliMerge pipeline for one file.

type MergeStats

type MergeStats struct {
	SymbolsBase   int   `json:"symbolsBase"`
	SymbolsOurs   int   `json:"symbolsOurs"`
	SymbolsTheirs int   `json:"symbolsTheirs"`
	AutoMerged    int   `json:"autoMerged"`
	Conflicted    int   `json:"conflicted"`
	TimingMs      int64 `json:"timingMs"`
}

MergeStats records counters for one merge.

type MergeStrategy

type MergeStrategy string

MergeStrategy is the selected resolution approach.

const (
	StrategySymbol  MergeStrategy = "symbol"
	StrategyImport  MergeStrategy = "import"
	StrategyConfig  MergeStrategy = "config"
	StrategyLine    MergeStrategy = "line"
	StrategyHandoff MergeStrategy = "handoff"
	StrategyClean   MergeStrategy = "clean" // no changes / identical
)

type SymbolConflict

type SymbolConflict struct {
	Key    string     `json:"key"`
	Base   SymbolData `json:"base"`
	Ours   SymbolData `json:"ours"`
	Theirs SymbolData `json:"theirs"`
}

SymbolConflict records a single symbol where ours and theirs both diverged from base.

type SymbolData

type SymbolData = astkit.Symbol

LineRange, SymbolData, ImportStatement are re-exported from astkit so that Grove and Fuse share a single source of truth for tree-sitter output.

Jump to

Keyboard shortcuts

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