graph

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NodeLabels = []string{
	"File",
	"Tag",
	"Topic",
	"Category",
	"Entity",
	"Directory",
}

NodeLabels defines the node types in our schema

View Source
var RelationshipTypes = []string{
	"HAS_TAG",
	"COVERS_TOPIC",
	"IN_CATEGORY",
	"MENTIONS",
	"REFERENCES",
	"SIMILAR_TO",
	"IN_DIRECTORY",
	"PARENT_OF",
}

RelationshipTypes defines the relationship types in our schema

Functions

This section is empty.

Types

type ActivityHotspot

type ActivityHotspot struct {
	Path              string    `json:"path"`
	ModificationCount int64     `json:"modification_count"`
	LastModified      time.Time `json:"last_modified"`
}

ActivityHotspot represents an area with high modification activity

type Client

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

Client wraps FalkorDB connection and provides graph operations

func NewClient

func NewClient(config ClientConfig, logger *slog.Logger) *Client

NewClient creates a new FalkorDB client

func (*Client) Close

func (c *Client) Close() error

Close closes the FalkorDB connection

func (*Client) Connect

func (c *Client) Connect(ctx context.Context) error

Connect establishes connection to FalkorDB

func (*Client) GetGraphStats

func (c *Client) GetGraphStats(ctx context.Context) (*GraphStats, error)

GetGraphStats retrieves statistics about the graph

func (*Client) Graph

func (c *Client) Graph() *falkordb.Graph

Graph returns the underlying FalkorDB graph for direct access when needed

func (*Client) Health

func (c *Client) Health(ctx context.Context) (*HealthStatus, error)

Health returns health status information

func (*Client) IsConnected

func (c *Client) IsConnected() bool

IsConnected checks if client is connected

func (*Client) Ping

func (c *Client) Ping(ctx context.Context) error

Ping checks connectivity to FalkorDB

func (*Client) Query

func (c *Client) Query(ctx context.Context, query string, params map[string]any) (*QueryResult, error)

Query executes a Cypher query with parameters

type ClientConfig

type ClientConfig struct {
	Host     string
	Port     int
	Database string
	Password string
}

ClientConfig contains FalkorDB connection settings

func DefaultClientConfig

func DefaultClientConfig() ClientConfig

DefaultClientConfig returns default configuration

type Cluster

type Cluster struct {
	ID               string        `json:"id"`
	Name             string        `json:"name"`
	FileCount        int           `json:"file_count"`
	Files            []ClusterFile `json:"files"`
	DominantTags     []string      `json:"dominant_tags"`
	DominantTopics   []string      `json:"dominant_topics"`
	DominantEntities []string      `json:"dominant_entities,omitempty"`
	Categories       []string      `json:"categories"`
}

Cluster represents a group of related files

type ClusterDetection

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

ClusterDetection provides file clustering capabilities

func NewClusterDetection

func NewClusterDetection(client *Client, logger *slog.Logger) *ClusterDetection

NewClusterDetection creates a new ClusterDetection handler

func (*ClusterDetection) DetectCategoryClusters

func (c *ClusterDetection) DetectCategoryClusters(ctx context.Context) ([]Cluster, error)

DetectCategoryClusters finds clusters based on file categories

func (*ClusterDetection) DetectEntityClusters

func (c *ClusterDetection) DetectEntityClusters(ctx context.Context, minSize int) ([]Cluster, error)

DetectEntityClusters finds clusters of files based on shared entities

func (*ClusterDetection) DetectOverlappingClusters

func (c *ClusterDetection) DetectOverlappingClusters(ctx context.Context, limit int) ([]OverlapFile, error)

DetectOverlappingClusters finds files that belong to multiple clusters These are potential integration points or hub files

func (*ClusterDetection) DetectTagClusters

func (c *ClusterDetection) DetectTagClusters(ctx context.Context, minSize int) ([]Cluster, error)

DetectTagClusters finds clusters of files based on shared tags

func (*ClusterDetection) DetectTopicClusters

func (c *ClusterDetection) DetectTopicClusters(ctx context.Context, minSize int) ([]Cluster, error)

DetectTopicClusters finds clusters of files based on shared topics

func (*ClusterDetection) FindFileClusterMembership

func (c *ClusterDetection) FindFileClusterMembership(ctx context.Context, filePath string) (*FileMembership, error)

FindFileClusterMembership returns all clusters a file belongs to

func (*ClusterDetection) GetClusterSummary

func (c *ClusterDetection) GetClusterSummary(ctx context.Context) (*ClusterSummary, error)

GetClusterSummary returns a high-level summary of knowledge clusters

type ClusterFile

type ClusterFile struct {
	Path       string  `json:"path"`
	Name       string  `json:"name"`
	Summary    string  `json:"summary"`
	Category   string  `json:"category"`
	Centrality float64 `json:"centrality"` // How central this file is to the cluster
}

ClusterFile represents a file within a cluster

type ClusterMember

type ClusterMember struct {
	Name            string `json:"name"`
	SharedFileCount int64  `json:"shared_file_count"`
}

ClusterMember represents membership in a cluster

type ClusterSummary

type ClusterSummary struct {
	TopTopics            []TopicStats     `json:"top_topics"`
	TopTags              []TagStats       `json:"top_tags"`
	TopEntities          []EntityStats    `json:"top_entities"`
	CategoryDistribution map[string]int64 `json:"category_distribution"`
}

ClusterSummary provides high-level statistics about knowledge clusters

type CoEditedFile

type CoEditedFile struct {
	Path               string    `json:"path"`
	Name               string    `json:"name"`
	Modified           time.Time `json:"modified"`
	ConnectionStrength int64     `json:"connection_strength"`
}

CoEditedFile represents a file that was edited around the same time

type CoModifiedPair

type CoModifiedPair struct {
	File1Path    string `json:"file1_path"`
	File1Name    string `json:"file1_name"`
	File2Path    string `json:"file2_path"`
	File2Name    string `json:"file2_name"`
	CoModCount   int64  `json:"co_modification_count"`
	LastCoMod    string `json:"last_co_modification"`
	Relationship string `json:"relationship"` // same_topic, same_entity, same_category, etc.
}

CoModifiedPair represents two files frequently modified together

type ConnectedFile

type ConnectedFile struct {
	Path        string `json:"path"`
	Name        string `json:"name"`
	Summary     string `json:"summary"`
	Category    string `json:"category"`
	TagCount    int64  `json:"tag_count"`
	TopicCount  int64  `json:"topic_count"`
	EntityCount int64  `json:"entity_count"`
	TotalConns  int64  `json:"total_connections"`
}

ConnectedFile represents a file with its connection counts

type CoverageStats

type CoverageStats struct {
	TotalFiles          int64   `json:"total_files"`
	FilesWithTags       int64   `json:"files_with_tags"`
	FilesWithTopics     int64   `json:"files_with_topics"`
	FilesWithEntities   int64   `json:"files_with_entities"`
	FilesWithEmbeddings int64   `json:"files_with_embeddings"`
	FullyCoveredFiles   int64   `json:"fully_covered_files"`
	TagCoverage         float64 `json:"tag_coverage_percent"`
	TopicCoverage       float64 `json:"topic_coverage_percent"`
	EntityCoverage      float64 `json:"entity_coverage_percent"`
	EmbeddingCoverage   float64 `json:"embedding_coverage_percent"`
	FullCoverage        float64 `json:"full_coverage_percent"`
}

CoverageStats represents knowledge coverage statistics

type DayActivity

type DayActivity struct {
	Date              string         `json:"date"`
	FileCount         int64          `json:"file_count"`
	CategoryBreakdown map[string]int `json:"category_breakdown"`
}

DayActivity represents modification activity for a single day

type Disambiguation

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

Disambiguation handles entity normalization and merging

func NewDisambiguation

func NewDisambiguation(client *Client, logger *slog.Logger) *Disambiguation

NewDisambiguation creates a new Disambiguation handler

func (*Disambiguation) AddAlias

func (d *Disambiguation) AddAlias(alias, canonical string)

AddAlias adds a custom alias mapping

func (*Disambiguation) FindDuplicateEntities

func (d *Disambiguation) FindDuplicateEntities(ctx context.Context) ([]DuplicateEntity, error)

FindDuplicateEntities finds entities that normalize to the same canonical form

func (*Disambiguation) FindSimilarEntities

func (d *Disambiguation) FindSimilarEntities(ctx context.Context, name string, limit int) ([]SimilarEntity, error)

FindSimilarEntities finds entities similar to the given name Uses prefix matching, substring matching, and alias resolution

func (*Disambiguation) GetCanonicalName

func (d *Disambiguation) GetCanonicalName(name string) string

GetCanonicalName returns the canonical name for an entity, resolving aliases

func (*Disambiguation) GetEntityVariants

func (d *Disambiguation) GetEntityVariants(ctx context.Context, entityName string) ([]EntityVariant, error)

GetEntityVariants returns all variant names for an entity

func (*Disambiguation) MergeEntities

func (d *Disambiguation) MergeEntities(ctx context.Context, sourceEntity, targetEntity string) (int64, error)

MergeEntities merges one entity into another, redirecting all relationships The source entity is deleted after merging

func (*Disambiguation) NormalizeAllEntities

func (d *Disambiguation) NormalizeAllEntities(ctx context.Context) (int64, error)

NormalizeAllEntities applies normalization to all entities in the graph This updates the normalized field and merges entities that become duplicates

func (*Disambiguation) NormalizeEntityName

func (d *Disambiguation) NormalizeEntityName(name string) string

NormalizeEntityName returns the canonical normalized form of an entity name

type DuplicateEntity

type DuplicateEntity struct {
	Entity1    string `json:"entity1"`
	Entity2    string `json:"entity2"`
	Normalized string `json:"normalized"`
	FileCount1 int64  `json:"file_count1"`
	FileCount2 int64  `json:"file_count2"`
}

DuplicateEntity represents a potential duplicate entity pair

type Edges

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

Edges handles edge (relationship) CRUD operations

func NewEdges

func NewEdges(client *Client, logger *slog.Logger) *Edges

NewEdges creates a new Edges handler

func (*Edges) CleanupOrphanedNodes

func (e *Edges) CleanupOrphanedNodes(ctx context.Context) (int64, error)

CleanupOrphanedNodes removes nodes that are no longer connected to any File

func (*Edges) GetFileEntities

func (e *Edges) GetFileEntities(ctx context.Context, filePath string) ([]EntityNode, error)

GetFileEntities returns all entities mentioned in a file

func (*Edges) GetFileReferences

func (e *Edges) GetFileReferences(ctx context.Context, filePath string) ([]Reference, error)

GetFileReferences returns all topics referenced by a file

func (*Edges) GetFileTags

func (e *Edges) GetFileTags(ctx context.Context, filePath string) ([]string, error)

GetFileTags returns all tags for a file

func (*Edges) GetFileTopics

func (e *Edges) GetFileTopics(ctx context.Context, filePath string) ([]string, error)

GetFileTopics returns all topics for a file

func (*Edges) GetFilesMentioningEntity

func (e *Edges) GetFilesMentioningEntity(ctx context.Context, entityName string) ([]FileNode, error)

GetFilesMentioningEntity returns all files mentioning a specific entity

func (*Edges) GetFilesWithTag

func (e *Edges) GetFilesWithTag(ctx context.Context, tagName string) ([]FileNode, error)

GetFilesWithTag returns all files with a specific tag

func (*Edges) GetFilesWithTopic

func (e *Edges) GetFilesWithTopic(ctx context.Context, topicName string) ([]FileNode, error)

GetFilesWithTopic returns all files covering a specific topic

func (*Edges) GetSimilarFiles

func (e *Edges) GetSimilarFiles(ctx context.Context, filePath string, limit int) ([]SimilarFile, error)

GetSimilarFiles returns files similar to the given file

func (*Edges) LinkDirectoryParent

func (e *Edges) LinkDirectoryParent(ctx context.Context, parentDir, childDir string) error

LinkDirectoryParent creates a PARENT_OF relationship between directories

func (*Edges) LinkFileToCategory

func (e *Edges) LinkFileToCategory(ctx context.Context, filePath, categoryName string) error

LinkFileToCategory creates an IN_CATEGORY relationship between File and Category

func (*Edges) LinkFileToDirectory

func (e *Edges) LinkFileToDirectory(ctx context.Context, filePath, dirPath string) error

LinkFileToDirectory creates an IN_DIRECTORY relationship between File and Directory

func (*Edges) LinkFileToEntity

func (e *Edges) LinkFileToEntity(ctx context.Context, filePath, entityName, entityType string) error

LinkFileToEntity creates a MENTIONS relationship between File and Entity

func (*Edges) LinkFileToReference

func (e *Edges) LinkFileToReference(ctx context.Context, filePath, topicName, refType string, confidence float64) error

LinkFileToReference creates a REFERENCES relationship between File and Topic

func (*Edges) LinkFileToTag

func (e *Edges) LinkFileToTag(ctx context.Context, filePath, tagName string) error

LinkFileToTag creates a HAS_TAG relationship between File and Tag

func (*Edges) LinkFileToTopic

func (e *Edges) LinkFileToTopic(ctx context.Context, filePath, topicName string) error

LinkFileToTopic creates a COVERS_TOPIC relationship between File and Topic

func (*Edges) LinkSimilarFiles

func (e *Edges) LinkSimilarFiles(ctx context.Context, filePath1, filePath2 string, score float64) error

LinkSimilarFiles creates a SIMILAR_TO relationship between two files

func (*Edges) LinkTopicParent

func (e *Edges) LinkTopicParent(ctx context.Context, parentTopic, childTopic string) error

LinkTopicParent creates a PARENT_OF relationship between topics

func (*Edges) RemoveFileEdges

func (e *Edges) RemoveFileEdges(ctx context.Context, filePath string) error

RemoveFileEdges removes all edges from a File node

type Entity

type Entity struct {
	Name string `json:"name"`
	Type string `json:"type"` // technology, person, concept, organization
}

Entity represents an extracted entity

type EntityCount

type EntityCount struct {
	Name  string `json:"name"`
	Type  string `json:"type"`
	Count int64  `json:"count"`
}

EntityCount represents an entity with its mention count

type EntityInfo

type EntityInfo struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

EntityInfo represents basic entity information

type EntityNode

type EntityNode struct {
	Name       string `json:"name"`
	Type       string `json:"type"`
	Normalized string `json:"normalized"`
}

EntityNode represents an Entity in the graph

type EntityStats

type EntityStats struct {
	Name      string `json:"name"`
	Type      string `json:"type"`
	FileCount int64  `json:"file_count"`
}

EntityStats represents entity statistics

type EntityVariant

type EntityVariant struct {
	Name       string `json:"name"`
	Type       string `json:"type"`
	Normalized string `json:"normalized"`
	FileCount  int64  `json:"file_count"`
}

EntityVariant represents a variant of an entity name

type ExportSummary

type ExportSummary struct {
	Generated   time.Time        `json:"generated"`
	Root        string           `json:"root"`
	TotalFiles  int64            `json:"total_files"`
	Categories  map[string]int64 `json:"categories"`
	TopTags     []TagCount       `json:"top_tags"`
	TopTopics   []TopicCount     `json:"top_topics"`
	TopEntities []EntityCount    `json:"top_entities"`
	RecentFiles []FileSummary    `json:"recent_files,omitempty"`
}

ExportSummary exports a condensed summary suitable for context windows

type Exporter

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

Exporter handles exporting graph data to various formats

func NewExporter

func NewExporter(manager *Manager, logger *slog.Logger) *Exporter

NewExporter creates a new Exporter

func (*Exporter) GetFileEntry

func (e *Exporter) GetFileEntry(ctx context.Context, path string, relatedLimit int) (*types.FileEntry, error)

GetFileEntry retrieves a single file and returns it as a FileEntry with related files

func (*Exporter) ToGraphIndex

func (e *Exporter) ToGraphIndex(ctx context.Context, memoryRoot string, verbose ...bool) (*types.GraphIndex, error)

ToGraphIndex exports the graph to a types.GraphIndex (new flattened format) This is the new graph-native format with FileEntry instead of nested IndexEntry When verbose is true, includes related files per entry and graph insights

func (*Exporter) ToSummary

func (e *Exporter) ToSummary(ctx context.Context, memoryRoot string, recentDays int, topN int) (*ExportSummary, error)

ToSummary exports a condensed summary of the graph

type FileConnections

type FileConnections struct {
	FilePath string       `json:"file_path"`
	Tags     []string     `json:"tags"`
	Topics   []string     `json:"topics"`
	Entities []EntityInfo `json:"entities"`
	Category string       `json:"category"`
}

FileConnections represents all graph connections for a file

type FileHistory

type FileHistory struct {
	Path          string         `json:"path"`
	LastModified  time.Time      `json:"last_modified"`
	Category      string         `json:"category"`
	CoEditedFiles []CoEditedFile `json:"co_edited_files,omitempty"`
}

FileHistory represents the modification history of a file

type FileMembership

type FileMembership struct {
	FilePath       string          `json:"file_path"`
	TagClusters    []ClusterMember `json:"tag_clusters"`
	TopicClusters  []ClusterMember `json:"topic_clusters"`
	EntityClusters []ClusterMember `json:"entity_clusters"`
}

FileMembership represents which clusters a file belongs to

type FileNode

type FileNode struct {
	Path         string    `json:"path"`
	Hash         string    `json:"hash"`
	Name         string    `json:"name"`
	Type         string    `json:"type"`
	Category     string    `json:"category"`
	Size         int64     `json:"size"`
	Modified     time.Time `json:"modified"`
	Summary      string    `json:"summary,omitempty"`
	DocumentType string    `json:"document_type,omitempty"`
	Confidence   float64   `json:"confidence,omitempty"`
	Embedding    []float32 `json:"embedding,omitempty"`
}

FileNode represents a File node in the graph

func FileNodeFromEntry

func FileNodeFromEntry(entry types.IndexEntry) FileNode

FileNodeFromEntry creates a FileNode from an IndexEntry

type FileSummary

type FileSummary struct {
	Path     string    `json:"path"`
	Name     string    `json:"name"`
	Category string    `json:"category"`
	Modified time.Time `json:"modified"`
	Summary  string    `json:"summary,omitempty"`
}

FileSummary is a condensed file representation

type Gap

type Gap struct {
	Type        string `json:"type"` // topic, entity, tag, category
	Name        string `json:"name"`
	FileCount   int64  `json:"file_count"`
	Description string `json:"description"`
	Severity    string `json:"severity"` // low, medium, high
	Suggestion  string `json:"suggestion"`
}

Gap represents a knowledge gap in the graph

type GapAnalysis

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

GapAnalysis identifies gaps and areas needing more documentation

func NewGapAnalysis

func NewGapAnalysis(client *Client, logger *slog.Logger) *GapAnalysis

NewGapAnalysis creates a new GapAnalysis handler

func (*GapAnalysis) AnalyzeGaps

func (g *GapAnalysis) AnalyzeGaps(ctx context.Context) (*GapReport, error)

AnalyzeGaps performs a complete gap analysis

func (*GapAnalysis) FindEmptyCategories

func (g *GapAnalysis) FindEmptyCategories(ctx context.Context) ([]Gap, error)

FindEmptyCategories finds categories with no files

func (*GapAnalysis) FindIsolatedFiles

func (g *GapAnalysis) FindIsolatedFiles(ctx context.Context) ([]Gap, error)

FindIsolatedFiles finds files with no semantic connections

func (*GapAnalysis) FindMissingConnections

func (g *GapAnalysis) FindMissingConnections(ctx context.Context, limit int) ([]MissingConnection, error)

FindMissingConnections finds files that should probably be connected based on content similarity

func (*GapAnalysis) FindOrphanedEntities

func (g *GapAnalysis) FindOrphanedEntities(ctx context.Context) ([]Gap, error)

FindOrphanedEntities finds entities with no file mentions

func (*GapAnalysis) FindOrphanedTags

func (g *GapAnalysis) FindOrphanedTags(ctx context.Context) ([]Gap, error)

FindOrphanedTags finds tags that are only associated with one file

func (*GapAnalysis) FindOrphanedTopics

func (g *GapAnalysis) FindOrphanedTopics(ctx context.Context) ([]Gap, error)

FindOrphanedTopics finds topics with no file coverage

func (*GapAnalysis) FindUnderDocumentedEntities

func (g *GapAnalysis) FindUnderDocumentedEntities(ctx context.Context, minFiles int) ([]Gap, error)

FindUnderDocumentedEntities finds entities mentioned in very few files

func (*GapAnalysis) FindUnderDocumentedTopics

func (g *GapAnalysis) FindUnderDocumentedTopics(ctx context.Context, minFiles int) ([]Gap, error)

FindUnderDocumentedTopics finds topics that have fewer than minFiles files

func (*GapAnalysis) GetCoverageStats

func (g *GapAnalysis) GetCoverageStats(ctx context.Context) (*CoverageStats, error)

GetCoverageStats returns statistics about knowledge coverage

type GapReport

type GapReport struct {
	UnderDocumentedTopics   []Gap `json:"under_documented_topics"`
	UnderDocumentedEntities []Gap `json:"under_documented_entities"`
	OrphanedTags            []Gap `json:"orphaned_tags"`
	OrphanedTopics          []Gap `json:"orphaned_topics"`
	OrphanedEntities        []Gap `json:"orphaned_entities"`
	IsolatedFiles           []Gap `json:"isolated_files"`
	EmptyCategories         []Gap `json:"empty_categories"`
	TotalGaps               int   `json:"total_gaps"`
}

GapReport contains the full gap analysis results

type GraphOverview

type GraphOverview struct {
	FileCount            int64            `json:"file_count"`
	TagCount             int64            `json:"tag_count"`
	TopicCount           int64            `json:"topic_count"`
	EntityCount          int64            `json:"entity_count"`
	RelationshipCount    int64            `json:"relationship_count"`
	CategoryDistribution map[string]int64 `json:"category_distribution"`
}

GraphOverview contains high-level graph statistics

type GraphStats

type GraphStats struct {
	NodeCount         int64 `json:"node_count"`
	RelationshipCount int64 `json:"relationship_count"`
	LabelCount        int   `json:"label_count"`
}

GraphStats represents graph statistics

type HealthStatus

type HealthStatus struct {
	Connected bool        `json:"connected"`
	Database  string      `json:"database"`
	Error     string      `json:"error,omitempty"`
	Stats     *GraphStats `json:"stats,omitempty"`
	Timestamp time.Time   `json:"timestamp"`
}

HealthStatus represents the health of the FalkorDB connection

type IndexInfo

type IndexInfo struct {
	Name     string `json:"name"`
	Label    string `json:"label,omitempty"`
	Property string `json:"property,omitempty"`
	Type     string `json:"type,omitempty"`
}

IndexInfo represents information about an index

type Manager

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

Manager orchestrates all graph operations

func NewManager

func NewManager(config ManagerConfig, logger *slog.Logger) *Manager

NewManager creates a new GraphManager

func (*Manager) AnalyzeGaps

func (m *Manager) AnalyzeGaps(ctx context.Context) (*GapReport, error)

AnalyzeGaps performs a complete gap analysis

func (*Manager) Cleanup

func (m *Manager) Cleanup(ctx context.Context) (int64, error)

Cleanup removes orphaned nodes

func (*Manager) ClearGraph

func (m *Manager) ClearGraph(ctx context.Context) error

ClearGraph removes all data from the graph

func (*Manager) Client

func (m *Manager) Client() *Client

Client returns the underlying FalkorDB client

func (*Manager) Close

func (m *Manager) Close() error

Close closes the graph connection

func (*Manager) Clusters

func (m *Manager) Clusters() *ClusterDetection

Clusters returns the ClusterDetection handler for cluster operations

func (*Manager) DetectEntityClusters

func (m *Manager) DetectEntityClusters(ctx context.Context, minSize int) ([]Cluster, error)

DetectEntityClusters finds clusters based on shared entities

func (*Manager) DetectTagClusters

func (m *Manager) DetectTagClusters(ctx context.Context, minSize int) ([]Cluster, error)

DetectTagClusters finds clusters based on shared tags

func (*Manager) DetectTopicClusters

func (m *Manager) DetectTopicClusters(ctx context.Context, minSize int) ([]Cluster, error)

DetectTopicClusters finds clusters based on shared topics

func (*Manager) Disambiguation

func (m *Manager) Disambiguation() *Disambiguation

Disambiguation returns the Disambiguation handler for entity operations

func (*Manager) Edges

func (m *Manager) Edges() *Edges

Edges returns the Edges handler for direct edge operations

func (*Manager) FindCoModifiedFiles

func (m *Manager) FindCoModifiedFiles(ctx context.Context, windowMinutes int, limit int) ([]CoModifiedPair, error)

FindCoModifiedFiles finds files that were modified within the same time window

func (*Manager) FindDuplicateEntities

func (m *Manager) FindDuplicateEntities(ctx context.Context) ([]DuplicateEntity, error)

FindDuplicateEntities finds entities that might be duplicates

func (*Manager) FindFileClusterMembership

func (m *Manager) FindFileClusterMembership(ctx context.Context, filePath string) (*FileMembership, error)

FindFileClusterMembership returns which clusters a file belongs to

func (*Manager) FindIsolatedFiles

func (m *Manager) FindIsolatedFiles(ctx context.Context) ([]Gap, error)

FindIsolatedFiles finds files with no semantic connections

func (*Manager) FindMissingConnections

func (m *Manager) FindMissingConnections(ctx context.Context, limit int) ([]MissingConnection, error)

FindMissingConnections finds files that might need to be connected

func (*Manager) FindSimilarEntities

func (m *Manager) FindSimilarEntities(ctx context.Context, name string, limit int) ([]SimilarEntity, error)

FindSimilarEntities finds entities similar to the given name

func (*Manager) GapAnalysis

func (m *Manager) GapAnalysis() *GapAnalysis

GapAnalysis returns the GapAnalysis handler for gap detection

func (*Manager) GetActivityHotspots

func (m *Manager) GetActivityHotspots(ctx context.Context, days int, limit int) ([]ActivityHotspot, error)

GetActivityHotspots finds files or areas with high modification activity

func (*Manager) GetAll

func (m *Manager) GetAll(ctx context.Context) ([]types.IndexEntry, error)

GetAll returns all file entries (similar to index.Manager.GetCurrent)

func (*Manager) GetClusterSummary

func (m *Manager) GetClusterSummary(ctx context.Context) (*ClusterSummary, error)

GetClusterSummary returns high-level statistics about knowledge clusters

func (*Manager) GetCoverageStats

func (m *Manager) GetCoverageStats(ctx context.Context) (*CoverageStats, error)

GetCoverageStats returns knowledge coverage statistics

func (*Manager) GetEntityVariants

func (m *Manager) GetEntityVariants(ctx context.Context, entityName string) ([]EntityVariant, error)

GetEntityVariants returns all variant names for an entity

func (*Manager) GetFile

func (m *Manager) GetFile(ctx context.Context, path string) (*types.IndexEntry, error)

GetFile returns a single file entry

func (*Manager) GetFileConnections

func (m *Manager) GetFileConnections(ctx context.Context, filePath string) (*FileConnections, error)

GetFileConnections returns all connections for a file

func (*Manager) GetFileModificationHistory

func (m *Manager) GetFileModificationHistory(ctx context.Context, filePath string) (*FileHistory, error)

GetFileModificationHistory returns the modification pattern for a specific file

func (*Manager) GetModificationTimeline

func (m *Manager) GetModificationTimeline(ctx context.Context, days int) ([]DayActivity, error)

GetModificationTimeline returns a timeline of modifications grouped by day

func (*Manager) GetRecentFiles

func (m *Manager) GetRecentFiles(ctx context.Context, days int, limit int) ([]SearchResult, error)

GetRecentFiles returns recently modified files

func (*Manager) GetRecentModifications

func (m *Manager) GetRecentModifications(ctx context.Context, since time.Time, limit int) ([]ModificationEvent, error)

GetRecentModifications returns files modified within a time window

func (*Manager) GetRelatedFiles

func (m *Manager) GetRelatedFiles(ctx context.Context, filePath string, limit int) ([]RelatedFile, error)

GetRelatedFiles returns files related to the given file

func (*Manager) GetStaleFiles

func (m *Manager) GetStaleFiles(ctx context.Context, staleDays int, limit int) ([]StaleFile, error)

GetStaleFiles finds files that haven't been modified in a long time

func (*Manager) GetStats

func (m *Manager) GetStats(ctx context.Context) (*Stats, error)

GetStats returns graph statistics

func (*Manager) GetTemporalStats

func (m *Manager) GetTemporalStats(ctx context.Context) (*TemporalStats, error)

GetTemporalStats returns overall temporal statistics

func (*Manager) Health

func (m *Manager) Health(ctx context.Context) (*HealthStatus, error)

Health returns health status

func (*Manager) Initialize

func (m *Manager) Initialize(ctx context.Context) error

Initialize connects to FalkorDB and sets up the schema

func (*Manager) IsConnected

func (m *Manager) IsConnected() bool

IsConnected returns whether the manager is connected

func (*Manager) MergeEntities

func (m *Manager) MergeEntities(ctx context.Context, source, target string) (int64, error)

MergeEntities merges one entity into another

func (*Manager) Nodes

func (m *Manager) Nodes() *Nodes

Nodes returns the Nodes handler for direct node operations

func (*Manager) NormalizeEntities

func (m *Manager) NormalizeEntities(ctx context.Context) (int64, error)

NormalizeEntities runs entity normalization and deduplication across the graph

func (*Manager) Queries

func (m *Manager) Queries() *Queries

Queries returns the Queries handler for direct query operations

func (*Manager) RecommendByContext

func (m *Manager) RecommendByContext(ctx context.Context, contextFiles []string, limit int) ([]Recommendation, error)

RecommendByContext recommends files based on multiple context files

func (*Manager) RecommendRelated

func (m *Manager) RecommendRelated(ctx context.Context, filePath string, limit int) ([]Recommendation, error)

RecommendRelated recommends files related to the given file

func (*Manager) Recommendations

func (m *Manager) Recommendations() *Recommendations

Recommendations returns the Recommendations handler for file recommendations

func (*Manager) RemoveFile

func (m *Manager) RemoveFile(ctx context.Context, path string) error

RemoveFile removes a file from the graph

func (*Manager) Search

func (m *Manager) Search(ctx context.Context, query string, limit int, categoryFilter string) ([]SearchResult, error)

Search performs a combined search across multiple dimensions

func (*Manager) Temporal

func (m *Manager) Temporal() *TemporalTracking

Temporal returns the TemporalTracking handler for temporal analysis

func (*Manager) TopConnectedFiles

func (m *Manager) TopConnectedFiles(ctx context.Context, limit int) ([]ConnectedFile, error)

TopConnectedFiles returns the most connected files in the graph

func (*Manager) UpdateSingle

func (m *Manager) UpdateSingle(ctx context.Context, entry types.IndexEntry, info UpdateInfo) (UpdateResult, error)

UpdateSingle updates a single file entry in the graph

func (*Manager) UpdateSingleWithEmbedding

func (m *Manager) UpdateSingleWithEmbedding(ctx context.Context, entry types.IndexEntry, info UpdateInfo, embedding []float32) (UpdateResult, error)

UpdateSingleWithEmbedding updates a single file entry in the graph with an embedding vector

func (*Manager) UpdateSingleWithEntities

func (m *Manager) UpdateSingleWithEntities(ctx context.Context, entry types.IndexEntry, entities []Entity, references []ReferenceInfo) (UpdateResult, error)

UpdateSingleWithEntities updates a file with enhanced semantic analysis including entities

func (*Manager) VectorSearch

func (m *Manager) VectorSearch(ctx context.Context, embedding []float32, limit int) ([]SearchResult, error)

VectorSearch performs vector similarity search

type ManagerConfig

type ManagerConfig struct {
	Client     ClientConfig
	Schema     SchemaConfig
	MemoryRoot string
}

ManagerConfig contains configuration for the GraphManager

func DefaultManagerConfig

func DefaultManagerConfig() ManagerConfig

DefaultManagerConfig returns default manager configuration

type MissingConnection

type MissingConnection struct {
	File1Path     string `json:"file1_path"`
	File1Name     string `json:"file1_name"`
	File2Path     string `json:"file2_path"`
	File2Name     string `json:"file2_name"`
	SharedContext string `json:"shared_context"`
	Reason        string `json:"reason"`
}

MissingConnection represents two files that might need to be connected

type ModificationEvent

type ModificationEvent struct {
	Path     string    `json:"path"`
	Name     string    `json:"name"`
	Modified time.Time `json:"modified"`
	Category string    `json:"category"`
}

ModificationEvent represents a file modification event

type Nodes

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

Nodes handles node CRUD operations

func NewNodes

func NewNodes(client *Client, logger *slog.Logger) *Nodes

NewNodes creates a new Nodes handler

func (*Nodes) CountFiles

func (n *Nodes) CountFiles(ctx context.Context) (int64, error)

CountFiles returns the total number of File nodes

func (*Nodes) DeleteFile

func (n *Nodes) DeleteFile(ctx context.Context, path string) error

DeleteFile removes a File node and all its relationships

func (*Nodes) FileExists

func (n *Nodes) FileExists(ctx context.Context, path string) (bool, error)

FileExists checks if a file exists by path

func (*Nodes) GetCategory

func (n *Nodes) GetCategory(ctx context.Context, name string) (bool, error)

GetCategory retrieves a Category node by name

func (*Nodes) GetFile

func (n *Nodes) GetFile(ctx context.Context, path string) (*FileNode, error)

GetFile retrieves a File node by path or filename If path is absolute, searches by exact path match If path is relative (no leading /), searches by filename

func (*Nodes) GetFileByFilename

func (n *Nodes) GetFileByFilename(ctx context.Context, filename string) (*FileNode, error)

GetFileByFilename retrieves a File node by filename (searches by name field)

func (*Nodes) GetFileByHash

func (n *Nodes) GetFileByHash(ctx context.Context, hash string) (*FileNode, error)

GetFileByHash retrieves a File node by content hash

func (*Nodes) GetOrCreateDirectory

func (n *Nodes) GetOrCreateDirectory(ctx context.Context, path string) error

GetOrCreateDirectory gets or creates a Directory node

func (*Nodes) GetOrCreateEntity

func (n *Nodes) GetOrCreateEntity(ctx context.Context, name, entityType string) error

GetOrCreateEntity gets or creates an Entity node

func (*Nodes) GetOrCreateTag

func (n *Nodes) GetOrCreateTag(ctx context.Context, name string) error

GetOrCreateTag gets or creates a Tag node

func (*Nodes) GetOrCreateTopic

func (n *Nodes) GetOrCreateTopic(ctx context.Context, name string) error

GetOrCreateTopic gets or creates a Topic node

func (*Nodes) ListEntities

func (n *Nodes) ListEntities(ctx context.Context) ([]EntityNode, error)

ListEntities returns all Entity nodes

func (*Nodes) ListFiles

func (n *Nodes) ListFiles(ctx context.Context) ([]FileNode, error)

ListFiles returns all File nodes

func (*Nodes) ListTags

func (n *Nodes) ListTags(ctx context.Context) ([]string, error)

ListTags returns all Tag names

func (*Nodes) ListTopics

func (n *Nodes) ListTopics(ctx context.Context) ([]string, error)

ListTopics returns all Topic names

func (*Nodes) UpsertFile

func (n *Nodes) UpsertFile(ctx context.Context, file FileNode) error

UpsertFile creates or updates a File node

func (*Nodes) UpsertFileWithEmbedding

func (n *Nodes) UpsertFileWithEmbedding(ctx context.Context, file FileNode, embedding []float32) error

UpsertFileWithEmbedding creates or updates a File node including embedding

type OverlapFile

type OverlapFile struct {
	Path        string   `json:"path"`
	Name        string   `json:"name"`
	Summary     string   `json:"summary"`
	Category    string   `json:"category"`
	TagCount    int64    `json:"tag_count"`
	TopicCount  int64    `json:"topic_count"`
	EntityCount int64    `json:"entity_count"`
	Tags        []string `json:"tags"`
	Topics      []string `json:"topics"`
	Entities    []string `json:"entities"`
}

OverlapFile represents a file that spans multiple clusters

type Queries

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

Queries provides common query patterns for the knowledge graph

func NewQueries

func NewQueries(client *Client, logger *slog.Logger) *Queries

NewQueries creates a new Queries handler

func (*Queries) FindFilesWithSharedEntities

func (q *Queries) FindFilesWithSharedEntities(ctx context.Context, filePath string, limit int) ([]SharedEntityFile, error)

FindFilesWithSharedEntities finds files that share entities with the given file

func (*Queries) FullTextSearch

func (q *Queries) FullTextSearch(ctx context.Context, searchText string, limit int) ([]SearchResult, error)

FullTextSearch performs full-text search on file summaries

func (*Queries) GetFileConnections

func (q *Queries) GetFileConnections(ctx context.Context, filePath string) (*FileConnections, error)

GetFileConnections returns all connections for a file

func (*Queries) GetGraphOverview

func (q *Queries) GetGraphOverview(ctx context.Context) (*GraphOverview, error)

GetGraphOverview returns high-level statistics about the graph

func (*Queries) GetRecentFiles

func (q *Queries) GetRecentFiles(ctx context.Context, days int, limit int) ([]SearchResult, error)

GetRecentFiles returns recently modified files

func (*Queries) GetRelatedFiles

func (q *Queries) GetRelatedFiles(ctx context.Context, filePath string, limit int) ([]RelatedFile, error)

GetRelatedFiles finds files related to a given file through shared tags/topics/entities

func (*Queries) SearchByCategory

func (q *Queries) SearchByCategory(ctx context.Context, category string, limit int) ([]SearchResult, error)

SearchByCategory returns files in a category

func (*Queries) SearchByEntity

func (q *Queries) SearchByEntity(ctx context.Context, entityName string, limit int) ([]SearchResult, error)

SearchByEntity searches files mentioning an entity

func (*Queries) SearchByFilename

func (q *Queries) SearchByFilename(ctx context.Context, pattern string, limit int) ([]SearchResult, error)

SearchByFilename searches files by filename substring

func (*Queries) SearchByTag

func (q *Queries) SearchByTag(ctx context.Context, tagName string, limit int) ([]SearchResult, error)

SearchByTag searches files by tag

func (*Queries) SearchByTopic

func (q *Queries) SearchByTopic(ctx context.Context, topicName string, limit int) ([]SearchResult, error)

SearchByTopic searches files by topic

func (*Queries) VectorSearch

func (q *Queries) VectorSearch(ctx context.Context, embedding []float32, limit int) ([]SearchResult, error)

VectorSearch performs similarity search using embeddings

type QueryResult

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

QueryResult wraps FalkorDB query result for easier access

func (*QueryResult) Empty

func (qr *QueryResult) Empty() bool

Empty returns true if result has no records

func (*QueryResult) Next

func (qr *QueryResult) Next() bool

Next advances to next record

func (*QueryResult) Record

func (qr *QueryResult) Record() *Record

Record returns current record

type Recommendation

type Recommendation struct {
	Path         string   `json:"path"`
	Name         string   `json:"name"`
	Summary      string   `json:"summary"`
	Category     string   `json:"category"`
	Score        float64  `json:"score"`
	Reasons      []string `json:"reasons"`
	SharedTags   []string `json:"shared_tags,omitempty"`
	SharedTopics []string `json:"shared_topics,omitempty"`
	SharedEnts   []string `json:"shared_entities,omitempty"`
}

Recommendation represents a recommended file with explanation

type RecommendationWeights

type RecommendationWeights struct {
	SharedTags     float64 // Weight for shared tags
	SharedTopics   float64 // Weight for shared topics
	SharedEntities float64 // Weight for shared entities
	SameCategory   float64 // Weight for same category
	SameDirectory  float64 // Weight for same directory
	Similarity     float64 // Weight for embedding similarity
}

RecommendationWeights configures the importance of different graph signals

func DefaultRecommendationWeights

func DefaultRecommendationWeights() RecommendationWeights

DefaultRecommendationWeights returns sensible default weights

type Recommendations

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

Recommendations provides file recommendation capabilities

func NewRecommendations

func NewRecommendations(client *Client, logger *slog.Logger) *Recommendations

NewRecommendations creates a new Recommendations handler

func (*Recommendations) RecommendByContext

func (r *Recommendations) RecommendByContext(ctx context.Context, contextFiles []string, limit int) ([]Recommendation, error)

RecommendByContext recommends files based on multiple context files Useful for "what should I read next" given current working context

func (*Recommendations) RecommendRelated

func (r *Recommendations) RecommendRelated(ctx context.Context, filePath string, limit int) ([]Recommendation, error)

RecommendRelated recommends files related to the given file Uses graph proximity with weighted scoring

func (*Recommendations) SetWeights

func (r *Recommendations) SetWeights(weights RecommendationWeights)

SetWeights updates the recommendation weights

func (*Recommendations) TopConnectedFiles

func (r *Recommendations) TopConnectedFiles(ctx context.Context, limit int) ([]ConnectedFile, error)

TopConnectedFiles returns the most connected files in the graph These are files that have the most relationships to other entities

type Record

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

Record wraps FalkorDB record for easier access

func (*Record) Get

func (r *Record) Get(key string) (any, bool)

Get returns value by key name

func (*Record) GetByIndex

func (r *Record) GetByIndex(index int) any

GetByIndex returns value at index

func (*Record) GetFloat64

func (r *Record) GetFloat64(index int, defaultVal float64) float64

GetFloat64 returns float64 value at index, with default fallback

func (*Record) GetInt64

func (r *Record) GetInt64(index int, defaultVal int64) int64

GetInt64 returns int64 value at index, with default fallback

func (*Record) GetString

func (r *Record) GetString(index int, defaultVal string) string

GetString returns string value at index, with default fallback

type Reference

type Reference struct {
	Topic      string  `json:"topic"`
	RefType    string  `json:"ref_type"`
	Confidence float64 `json:"confidence"`
}

Reference represents a reference relationship

type ReferenceInfo

type ReferenceInfo struct {
	Topic      string  `json:"topic"`
	RefType    string  `json:"ref_type"` // requires, extends, related-to
	Confidence float64 `json:"confidence"`
}

ReferenceInfo represents a reference to a topic

type RelatedFile

type RelatedFile struct {
	Path           string `json:"path"`
	Name           string `json:"name"`
	Summary        string `json:"summary"`
	Strength       int64  `json:"strength"`
	ConnectionType string `json:"connection_type"`
}

RelatedFile represents a file related to another

type Schema

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

Schema handles graph schema initialization and management

func NewSchema

func NewSchema(client *Client, config SchemaConfig, logger *slog.Logger) *Schema

NewSchema creates a new Schema manager

func (*Schema) ClearGraph

func (s *Schema) ClearGraph(ctx context.Context) error

ClearGraph removes all nodes and relationships

func (*Schema) DropAllIndexes

func (s *Schema) DropAllIndexes(ctx context.Context) error

DropAllIndexes removes all indexes (useful for schema migration)

func (*Schema) GetIndexes

func (s *Schema) GetIndexes(ctx context.Context) ([]IndexInfo, error)

GetIndexes returns information about existing indexes

func (*Schema) Initialize

func (s *Schema) Initialize(ctx context.Context) error

Initialize creates all necessary schema components

func (*Schema) ValidateSchema

func (s *Schema) ValidateSchema(ctx context.Context) error

ValidateSchema checks that the schema is properly initialized

type SchemaConfig

type SchemaConfig struct {
	// Vector index settings
	EmbeddingDimensions    int    // Default: 1536 for OpenAI text-embedding-3-small
	SimilarityFunction     string // "cosine" or "euclidean", default: "cosine"
	VectorIndexM           int    // HNSW M parameter, default: 16
	VectorIndexEfConstruct int    // HNSW efConstruction, default: 200
}

SchemaConfig contains schema configuration settings

func DefaultSchemaConfig

func DefaultSchemaConfig() SchemaConfig

DefaultSchemaConfig returns default schema configuration

type SearchResult

type SearchResult struct {
	Path         string   `json:"path"`
	Name         string   `json:"name"`
	Type         string   `json:"type"`
	Category     string   `json:"category"`
	Summary      string   `json:"summary"`
	DocumentType string   `json:"document_type"`
	Score        float64  `json:"score,omitempty"`
	MatchType    string   `json:"match_type,omitempty"`
	Tags         []string `json:"tags,omitempty"`
	Topics       []string `json:"topics,omitempty"`
}

SearchResult represents a file search result

type SharedEntityFile

type SharedEntityFile struct {
	Path           string   `json:"path"`
	Name           string   `json:"name"`
	Summary        string   `json:"summary"`
	SharedEntities []string `json:"shared_entities"`
	Strength       int64    `json:"strength"`
}

SharedEntityFile represents a file that shares entities with another

type SimilarEntity

type SimilarEntity struct {
	Name        string  `json:"name"`
	Type        string  `json:"type"`
	Normalized  string  `json:"normalized"`
	FileCount   int64   `json:"file_count"`
	Similarity  float64 `json:"similarity"`
	MatchReason string  `json:"match_reason"`
}

SimilarEntity represents an entity that might be similar to a query

type SimilarFile

type SimilarFile struct {
	Path    string  `json:"path"`
	Name    string  `json:"name"`
	Summary string  `json:"summary"`
	Score   float64 `json:"score"`
}

SimilarFile represents a file with similarity score

type StaleFile

type StaleFile struct {
	Path                  string    `json:"path"`
	Name                  string    `json:"name"`
	Modified              time.Time `json:"modified"`
	Category              string    `json:"category"`
	DaysSinceModification int       `json:"days_since_modification"`
}

StaleFile represents a file that hasn't been modified recently

type Stats

type Stats struct {
	TotalFiles    int64            `json:"total_files"`
	TotalTags     int64            `json:"total_tags"`
	TotalTopics   int64            `json:"total_topics"`
	TotalEntities int64            `json:"total_entities"`
	TotalEdges    int64            `json:"total_edges"`
	Categories    map[string]int64 `json:"categories"`
}

Stats represents graph statistics

type TagCount

type TagCount struct {
	Name  string `json:"name"`
	Count int64  `json:"count"`
}

TagCount represents a tag with its usage count

type TagStats

type TagStats struct {
	Name      string `json:"name"`
	FileCount int64  `json:"file_count"`
}

TagStats represents tag statistics

type TemporalStats

type TemporalStats struct {
	TotalFiles      int64            `json:"total_files"`
	OldestFile      time.Time        `json:"oldest_file"`
	NewestFile      time.Time        `json:"newest_file"`
	ActivityWindows map[string]int64 `json:"activity_windows"`
}

TemporalStats contains overall temporal statistics

type TemporalTracking

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

TemporalTracking provides file modification pattern analysis

func NewTemporalTracking

func NewTemporalTracking(client *Client, logger *slog.Logger) *TemporalTracking

NewTemporalTracking creates a new TemporalTracking handler

func (*TemporalTracking) FindCoModifiedFiles

func (t *TemporalTracking) FindCoModifiedFiles(ctx context.Context, windowMinutes int, limit int) ([]CoModifiedPair, error)

FindCoModifiedFiles finds files that were modified within the same time window windowMinutes defines how close modifications must be to be considered "co-modified"

func (*TemporalTracking) GetActivityHotspots

func (t *TemporalTracking) GetActivityHotspots(ctx context.Context, days int, limit int) ([]ActivityHotspot, error)

GetActivityHotspots finds files or areas with high modification activity

func (*TemporalTracking) GetFileModificationHistory

func (t *TemporalTracking) GetFileModificationHistory(ctx context.Context, filePath string) (*FileHistory, error)

GetFileModificationHistory returns the modification pattern for a specific file

func (*TemporalTracking) GetModificationTimeline

func (t *TemporalTracking) GetModificationTimeline(ctx context.Context, days int) ([]DayActivity, error)

GetModificationTimeline returns a timeline of modifications grouped by day

func (*TemporalTracking) GetRecentModifications

func (t *TemporalTracking) GetRecentModifications(ctx context.Context, since time.Time, limit int) ([]ModificationEvent, error)

GetRecentModifications returns files modified within a time window

func (*TemporalTracking) GetStaleFiles

func (t *TemporalTracking) GetStaleFiles(ctx context.Context, staleDays int, limit int) ([]StaleFile, error)

GetStaleFiles finds files that haven't been modified in a long time

func (*TemporalTracking) GetTemporalStats

func (t *TemporalTracking) GetTemporalStats(ctx context.Context) (*TemporalStats, error)

GetTemporalStats returns overall temporal statistics

type TopicCount

type TopicCount struct {
	Name  string `json:"name"`
	Count int64  `json:"count"`
}

TopicCount represents a topic with its usage count

type TopicStats

type TopicStats struct {
	Name      string `json:"name"`
	FileCount int64  `json:"file_count"`
}

TopicStats represents topic statistics

type UpdateInfo

type UpdateInfo struct {
	WasAnalyzed bool // true if semantic analysis was performed (API call)
	WasCached   bool // true if cached analysis was used
	HadError    bool // true if there was an error processing this file
}

UpdateInfo provides context about the entry being updated

type UpdateResult

type UpdateResult struct {
	Added   bool // true if new entry was added (vs updated)
	Updated bool // true if existing entry was modified
}

UpdateResult contains information about what the update operation did

Jump to

Keyboard shortcuts

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