Versions in this module Expand all Collapse all v2 v2.0.0 Oct 9, 2026 Changes in this version + const DefaultNumHashes + const GoResolutionApproximate + const GoResolutionTyped + const WarnApproximateGraph + const WarnDeclarationOnlyType + const WarnDemotedDeclaration + const WarnDemotedGenerated + const WarnDemotedMock + const WarnDemotedTest + const WarnDemotedVendored + const WarnLowConfidence + const WarnViaInterface + const WarnZeroEdge + var ErrIndexBusy = errors.New("the code graph index is being written by another indexer") + var ErrIndexInUse = errors.New("the code graph index files are in use by another process") + func BytesToSeeds(data []byte) ([]uint64, error) + func ComputeBM25Score(queryTokens []string, docTokens map[string]int, docLength int, ...) float64 + func ComputeBandHashes(sig MinHashSignature) []uint64 + func ComputeFusedRanking(jaccardRanks, bm25Ranks map[int64]int) []int64 + func DefaultIndexPath(projectRoot string) string + func DetectLanguage(filename string) string + func DetectProjectLanguage(dir string) string + func DisplayName(sym Symbol) string + func IndexPath(projectRoot string) string + func IndexWriterActive(dbPath string) bool + func IsCppHeader(relPath string, src []byte) bool + func IsIndexableFile(filename string) bool + func JaccardSimilarity(a, b MinHashSignature) float64 + func PathFlagStrings(flags []PathFlag) []string + func QualifiedName(sym Symbol) string + func QualifiedNames(syms []Symbol) []string + func RemoveIndex(ctx context.Context, dbPath string) error + func SeedsToBytes(seeds []uint64) []byte + func ShinglesForSymbol(sym Symbol, source []byte, lang string) []string + func ShouldSkipPath(path string) bool + func SupportedLanguage(ext string) string + type BM25CorpusStats struct + AvgDocLength float64 + NumDocs int + type ChangedRange struct + EndLine int + File string + StartLine int + func ParseGitDiffRanges(workspace string, base string) ([]ChangedRange, error) + type CodeSmell struct + File string + FuncKind string + InEdges int + Kind CodeSmellKind + Line int + Name string + OutEdges int + Reason string + Score float64 + Signature string + Snippet string + type CodeSmellKind string + const SmellEmptyHandler + const SmellHardcoded + const SmellLazyRedirect + const SmellPlaceholder + const SmellStub + const SmellTodoFixme + type DiffSummary struct + EdgesAdded int + EdgesRemoved int + SymbolsAdded int + SymbolsRemoved int + type Edge struct + Kind EdgeKind + SourceID int64 + TargetID int64 + type EdgeKind string + const EdgeCalls + const EdgeImplements + const EdgeReferences + type FileEdge struct + Count int + Source string + Target string + type FileRecord struct + ContentHash string + IndexedAt int64 + Language string + Path string + Resolution string + Size int64 + type FunctionEdgeInfo struct + BaseClasses string + Decorators string + File string + Implements string + InEdges int + Kind string + Line int + Name string + OutEdges int + Resolution string + Signature string + type GenericParser struct + func NewGenericParser(language string) *GenericParser + func (p *GenericParser) ParseFile(path string) (*ParseResult, error) + func (p *GenericParser) ParseSource(path string, data []byte) (*ParseResult, error) + type GitignoreFilter struct + func LoadGitignore(projectRoot string) *GitignoreFilter + func (f *GitignoreFilter) ShouldSkip(relPath string, isDir bool) bool + type GoParser struct + func NewGoParser() *GoParser + func (p *GoParser) ParseFile(path string) (*ParseResult, error) + func (p *GoParser) ParseSource(path string, src []byte) (*ParseResult, error) + type ImpactResult struct + AffectedCallers []ImpactSymbol + DirectlyChanged []ImpactSymbol + Summary ImpactSummary + UncoveredByTests []string + type ImpactSummary struct + CallersAffected int + FilesChanged int + MaxRiskScore float64 + SymbolsChanged int + TestGaps int + type ImpactSymbol struct + File string + Kind SymbolKind + Line int + Name string + RiskScore float64 + type IndexState int + const IndexBuilding + const IndexBuilt + const IndexInterrupted + const IndexMissing + const IndexUpdateUnfinished + const IndexUpdating + type Indexer struct + func NewIndexer(workspace, dbPath string) (*Indexer, error) + func NewIndexerWithStore(store *Store, workspace string) *Indexer + func Rebuild(ctx context.Context, workspace, dbPath string) (idx *Indexer, removed bool, err error) + func (idx *Indexer) AnalyzeChanges(base string) (*ImpactResult, error) + func (idx *Indexer) Build() error + func (idx *Indexer) BuildWithContext(ctx context.Context) error + func (idx *Indexer) Close() error + func (idx *Indexer) FindCodeSmells(kinds []CodeSmellKind, maxResults int, includeTests bool) ([]CodeSmell, error) + func (idx *Indexer) KeywordSearch(query string, limit int) ([]Symbol, error) + func (idx *Indexer) LatestSnapshot() (*Snapshot, error) + func (idx *Indexer) LoadSnapshot(commitSHA string) (*Snapshot, error) + func (idx *Indexer) LookupSymbol(query string) (LookupResult, error) + func (idx *Indexer) PackageGraph() ([]PackageInfo, []PackageEdge, error) + func (idx *Indexer) ProjectSummary() string + func (idx *Indexer) SaveSnapshot(snap *Snapshot) error + func (idx *Indexer) SemanticSearch(query string, topK int) ([]SearchResult, error) + func (idx *Indexer) SemanticSearchWithContext(ctx context.Context, query string, opts SemanticSearchOptions) ([]SearchResult, error) + func (idx *Indexer) SemanticSearchWithOptions(query string, opts SemanticSearchOptions) ([]SearchResult, error) + func (idx *Indexer) State() (IndexState, error) + func (idx *Indexer) Stats() (*StoreStats, error) + func (idx *Indexer) Store() *Store + func (idx *Indexer) TakeSnapshot() (*Snapshot, error) + func (idx *Indexer) Update() error + func (idx *Indexer) UpdateWithContext(ctx context.Context) error + type LookupResult struct + Match MatchKind + Symbols []Symbol + type MatchKind int + const MatchExact + const MatchExactFold + const MatchNone + const MatchPartial + const MatchQualified + type MinHashEntry struct + Signature MinHashSignature + SymbolID int64 + type MinHashSignature []uint64 + type MinHasher struct + func NewMinHasher(numHashes int) *MinHasher + func NewMinHasherFromSeeds(seeds []uint64) *MinHasher + func (m *MinHasher) Seeds() []uint64 + func (m *MinHasher) Signature(shingles []string) MinHashSignature + type MultiLangParser struct + func NewMultiLangParser() *MultiLangParser + func (m *MultiLangParser) Close() + func (m *MultiLangParser) ParseFile(path string) (*ParseResult, error) + func (m *MultiLangParser) ParseSource(path string, data []byte) (*ParseResult, error) + type PackageEdge struct + Count int + Source string + Target string + type PackageInfo struct + FileCount int + Name string + SymbolCount int + type ParseResult struct + Edges []RawEdge + Source []byte + Symbols []Symbol + type PathFlag string + const FlagDeclaration + const FlagGenerated + const FlagMock + const FlagTest + const FlagVendored + func ClassifyPath(path string) []PathFlag + type RawEdge struct + Kind EdgeKind + SelfCall bool + SourceFile string + SourceName string + SourceScope string + TargetName string + type Reranker interface + Rerank func(results []SearchResult, queryTokenCount int) []SearchResult + type SearchResult struct + BM25Score float64 + ConfidenceWarnings []string + EdgeCount int + MatchedTokens []string + PathFlags []string + Similarity float64 + Symbol Symbol + type SemanticSearchOptions struct + ApplyPathFilter bool + DisableRerank bool + MinSimilarity float64 + Reranker Reranker + TopK int + type Snapshot struct + CommitSHA string + EdgeCount int + Edges []string + SymbolCount int + Symbols map[string]string + Timestamp time.Time + type SnapshotDiff struct + AddedEdges []string + AddedSymbols []string + AfterSHA string + BeforeSHA string + RemovedEdges []string + RemovedSymbols []string + Summary DiffSummary + func DiffSnapshots(before, after *Snapshot) *SnapshotDiff + type StopWords struct + ByLang map[string]map[string]bool + Compound map[string]bool + Universal map[string]bool + Version string + func (s *StopWords) Filter(tokens []string, lang string) []string + func (s *StopWords) IsCompound(name string) bool + type Store struct + func NewStore(dbPath string) (*Store, error) + func (s *Store) AddEdge(sourceID, targetID int64, kind EdgeKind) error + func (s *Store) AllEdgeKeys() ([]string, error) + func (s *Store) AllSymbolNamesAndKinds() (map[string]string, error) + func (s *Store) CallerCount(targetName string) int + func (s *Store) CallersOf(targetName string) []Symbol + func (s *Store) Close() error + func (s *Store) DeleteFile(path string) error + func (s *Store) DeleteFileSymbols(file string) error + func (s *Store) DeleteMeta(key string) error + func (s *Store) DeleteMetaIf(key, value string) error + func (s *Store) EdgeCount(name string) int + func (s *Store) FileResolution(path string) string + func (s *Store) FileResolutions() (map[string]string, error) + func (s *Store) FindAllFunctionsWithEdges() ([]FunctionEdgeInfo, error) + func (s *Store) GetAllFiles() ([]FileRecord, error) + func (s *Store) GetAllMinHashes() ([]MinHashEntry, error) + func (s *Store) GetCallableIDByName(name, preferFile string) (int64, bool) + func (s *Store) GetEdgesFrom(sourceID int64) ([]Edge, error) + func (s *Store) GetEdgesTo(targetID int64) ([]Edge, error) + func (s *Store) GetFileGraph() ([]FileEdge, error) + func (s *Store) GetIDFs(tokens []string) (map[string]float64, error) + func (s *Store) GetMeta(key string) ([]byte, error) + func (s *Store) GetMinHash(symbolID int64) (MinHashSignature, error) + func (s *Store) GetPackageGraph() ([]PackageInfo, []PackageEdge, error) + func (s *Store) GetSymbol(id int64) (*Symbol, error) + func (s *Store) GetSymbolIDByNameInFile(name, file string) (int64, bool) + func (s *Store) GetSymbolTokens(symbolID int64) (map[string]int, int, error) + func (s *Store) GetSymbolsByFile(file string) ([]Symbol, error) + func (s *Store) GetSymbolsByPackage(pkg string) ([]Symbol, error) + func (s *Store) GoQualIDs() (map[string]int64, error) + func (s *Store) HasLSHData() bool + func (s *Store) HasTestCoverage(name string) bool + func (s *Store) LatestSnapshot() ([]byte, error) + func (s *Store) LoadSnapshot(commitSHA string) ([]byte, error) + func (s *Store) LookupSymbol(query string) (LookupResult, error) + func (s *Store) QueryLSHCandidates(queryBands []uint64) ([]int64, error) + func (s *Store) RankedSearch(query string, limit int) ([]Symbol, error) + func (s *Store) ReadBM25Stats() (*BM25CorpusStats, error) + func (s *Store) RebuildTokenStats() (*BM25CorpusStats, error) + func (s *Store) ReplaceGoEdges(edges []Edge) error + func (s *Store) ReplaceNonGoEdges(ctx context.Context, edges []Edge, keep []string) error + func (s *Store) RescopeGraph(token string) error + func (s *Store) ResetGraph() error + func (s *Store) SaveSnapshot(commitSHA string, ts time.Time, data []byte) error + func (s *Store) SearchSymbolsByName(query string) ([]Symbol, error) + func (s *Store) SetFileResolutions(res map[string]string) error + func (s *Store) SetGoImplements(impl map[int64]string) error + func (s *Store) SetMeta(key string, value []byte) error + func (s *Store) Stats() (*StoreStats, error) + func (s *Store) SymbolsInLineRange(file string, startLine, endLine int) []Symbol + func (s *Store) UpdateMinHash(symbolID int64, sig MinHashSignature) error + func (s *Store) UpgradeGraph(token string) error + func (s *Store) UpsertFile(f FileRecord) error + func (s *Store) UpsertLSHBands(symbolID int64, bands []uint64) error + func (s *Store) UpsertSymbol(sym Symbol) (int64, error) + func (s *Store) UpsertSymbolTokens(symbolID int64, tokens []string) error + type StoreStats struct + FilesByLang map[string]int + SymbolsByKind map[SymbolKind]int + TotalEdges int + TotalFiles int + TotalSymbols int + type StructuralReranker struct + EdgeDensityWeight float64 + KindBoostFunction float64 + MatchedTokenWeight float64 + ZeroEdgePenalty float64 + func NewStructuralReranker() *StructuralReranker + func (r *StructuralReranker) Rerank(results []SearchResult, queryTokenCount int) []SearchResult + type Symbol struct + BaseClasses string + Decorators string + File string + ID int64 + Implements string + Kind SymbolKind + Line int + Name string + Package string + QualName string + Scope string + Signature string + type SymbolKind string + const SymbolClass + const SymbolConst + const SymbolFunction + const SymbolImport + const SymbolInterface + const SymbolInterfaceMethod + const SymbolMethod + const SymbolStruct + const SymbolType + const SymbolVar + type TSParser struct + func NewTSParser() *TSParser + func (p *TSParser) Close() + func (p *TSParser) ParseFile(path string) (*ParseResult, error) + func (p *TSParser) ParseSource(path string, data []byte) (*ParseResult, error) Other modules containing this package github.com/whykusanagi/celeste-cli