Versions in this module Expand all Collapse all v0 v0.9.3 Sep 6, 2026 v0.9.2 Sep 4, 2026 v0.9.1 Sep 4, 2026 Changes in this version + const EdgeCallReference + func SkipsSidecarPath(project string) (string, error) + func WriteSkips(project string, files []SkippedFile) error + type SkippedFile struct + Detail string + Path string + Reason string + func ReadSkips(project string) ([]SkippedFile, error) type Store + func (s *Store) CountFileHashes(project string) (int, error) + func (s *Store) RewriteProject(ctx context.Context, oldName, newName, newRoot string) error + func (s *Store) SnapshotTo(path string) error v0.9.0 Sep 4, 2026 Changes in this version + const AutoRecoveryEnvVar + const ConfidenceAmbiguous + const ConfidenceExtracted + const ConfidenceInferred + const ConfigAutoIndex + const ConfigAutoIndexLimit + const ConfigGraphPrecisionStatusPrefix + const ConfigGraphPrecisionTierPrefix + const ConfigGraphSCIPPathPrefix + const ConfigMemLimit + const ConfigReportSkipPrefix + const EdgeAnswers + const EdgeAsyncCalls + const EdgeCalls + const EdgeCallsExternal + const EdgeCallsPseudo + const EdgeConfigures + const EdgeContains + const EdgeContainsFile + const EdgeDecorates + const EdgeDefines + const EdgeDefinesField + const EdgeDefinesMeth + const EdgeDependsOn + const EdgeFileChangesWith + const EdgeHTTPCalls + const EdgeHandles + const EdgeImplements + const EdgeImports + const EdgeIndirectCalls + const EdgeInherits + const EdgeMemberOf + const EdgeOverride + const EdgeParameterOf + const EdgePolicyGates + const EdgePublishesTo + const EdgeQueries + const EdgeRaises + const EdgeRationaleFor + const EdgeReads + const EdgeReadsEnv + const EdgeRunsBinary + const EdgeSemanticallySimilarTo + const EdgeSubscribesTo + const EdgeTests + const EdgeTestsFile + const EdgeThrows + const EdgeUsage + const EdgeUsesType + const EdgeWrites + const FormatVersion + const MinSupportedFormatVersion + var EdgeTypes = func() []EdgeTypeInfo { ... }() + var ErrCorruptDatabase = errors.New("corrupt database") + var ErrIndexFormatTooNew = errors.New("index format is newer than this code-graph build") + var ErrIndexFormatUnsupported = errors.New("index format is no longer supported") + func CacheDir() (string, error) + func CanonicalSectionNames() []string + func IsSurfaceableCodeNode(label, filePath string) bool + func KnownEdgeType(t string) bool + func MaxADRLength() int + func Now() string + func OpenPathWithAutoRecovery(dbPath, name string) (*Store, RecoveryEvent, error) + func ParseADRSections(content string) map[string]string + func RenderADR(sections map[string]string) string + func UnmarshalProps(data string) map[string]any + func ValidateADRContent(content string) error + func ValidateADRSectionKeys(sections map[string]string) error + type ADRecord struct + Content string + CreatedAt string + Project string + UpdatedAt string + type ArchitectureInfo struct + Boundaries []CrossPkgBoundary + Clusters []ClusterInfo + EdgeTypes []TypeCount + EntryPoints []EntryPointInfo + FileTree []FileTreeEntry + Hotspots []HotspotFunction + Languages []LanguageCount + Layers []PackageLayer + NodeLabels []LabelCount + Packages []PackageSummary + Routes []RouteInfo + Services []ServiceLink + TotalEdges int + TotalNodes int + type ClusterInfo struct + Cohesion float64 + EdgeTypes []string + ID int + Label string + Members int + Packages []string + TopNodes []string + type ConfigStore struct + func OpenConfig() (*ConfigStore, error) + func OpenConfigInDir(dir string) (*ConfigStore, error) + func (c *ConfigStore) All() (map[string]string, error) + func (c *ConfigStore) Close() error + func (c *ConfigStore) Delete(key string) error + func (c *ConfigStore) Get(key, defaultVal string) string + func (c *ConfigStore) GetBool(key string, defaultVal bool) bool + func (c *ConfigStore) GetInt(key string, defaultVal int) int + func (c *ConfigStore) Set(key, value string) error + type CrossPkgBoundary struct + CallCount int + From string + To string + type Edge struct + ID int64 + Project string + Properties map[string]any + SourceID int64 + TargetID int64 + Type string + func (e *Edge) ConfidenceTier() string + type EdgeEndpoint struct + SourceID int64 + TargetID int64 + Type string + type EdgeInfo struct + Confidence float64 + FromName string + HasConfidence bool + ToName string + Type string + type EdgeTypeInfo struct + Doc string + Family string + Source string + Target string + Type string + type EmbeddingResult struct + FilePath string + Label string + Name string + NodeID int64 + QName string + Score float64 + type EntryPointInfo struct + File string + Name string + QualifiedName string + type FileHash struct + MtimeNs int64 + Project string + RelPath string + SHA256 string + Size int64 + type FileTreeEntry struct + Children int + Path string + Type string + type HotspotFunction struct + FanIn int + Name string + QualifiedName string + type ImpactSummary struct + Critical int + HasCrossService bool + High int + Low int + Medium int + Total int + func BuildImpactSummary(hops []*NodeHop, edges []EdgeInfo) ImpactSummary + type LabelCount struct + Count int + Label string + type LanguageCount struct + FileCount int + Language string + type Node struct + EndLine int + FilePath string + ID int64 + Label string + Name string + Project string + Properties map[string]any + QualifiedName string + StartLine int + type NodeHop struct + Hop int + Node *Node + func DeduplicateHops(hops []*NodeHop) []*NodeHop + type PackageLayer struct + Layer string + Name string + Reason string + type PackageSummary struct + FanIn int + FanOut int + Name string + NodeCount int + type PartialBatchInsertError struct + Dropped int + Total int + func (e *PartialBatchInsertError) Error() string + type Project struct + EnrichmentVersion string + IndexedAt string + Name string + RootPath string + type ProjectInfo struct + DBPath string + Name string + RootPath string + type Querier interface + Exec func(query string, args ...any) (sql.Result, error) + ExecContext func(ctx context.Context, query string, args ...any) (sql.Result, error) + Prepare func(query string) (*sql.Stmt, error) + PrepareContext func(ctx context.Context, query string) (*sql.Stmt, error) + Query func(query string, args ...any) (*sql.Rows, error) + QueryContext func(ctx context.Context, query string, args ...any) (*sql.Rows, error) + QueryRow func(query string, args ...any) *sql.Row + QueryRowContext func(ctx context.Context, query string, args ...any) *sql.Row + type QueryCache struct + func NewQueryCache(maxSize int, ttl time.Duration) *QueryCache + func (c *QueryCache) Get(key string) (any, bool) + func (c *QueryCache) Invalidate() + func (c *QueryCache) Len() int + func (c *QueryCache) Set(key string, result any) + type RecoveryEvent int + const RecoveryBulkWriteCrash + const RecoveryCorruptHeader + const RecoveryNone + const RecoveryOrphanSidecar + func (r RecoveryEvent) String() string + type ReleaseFunc func() + type RiskLevel string + const RiskCritical + const RiskHigh + const RiskLow + const RiskMedium + func HopToRisk(hop int) RiskLevel + type RouteInfo struct + Handler string + Method string + Path string + type SchemaInfo struct + NodeLabels []LabelCount + RelationshipPatterns []string + RelationshipTypes []TypeCount + SampleClassNames []string + SampleFunctionNames []string + SampleQualifiedNames []string + type SearchOutput struct + Results []*SearchResult + Total int + type SearchParams struct + CaseSensitive bool + Direction string + ExcludeEntryPoints bool + ExcludeLabels []string + FilePattern string + IncludeConnected bool + Label string + Limit int + MaxComplexity int + MaxDegree int + MinComplexity int + MinDegree int + NamePattern string + Offset int + Project string + QNPattern string + Relationship string + SortBy string + type SearchResult struct + ConnectedNames []string + InDegree int + Node *Node + OutDegree int + type ServiceLink struct + Count int + From string + To string + Type string + type Store struct + func Open(project string) (*Store, error) + func OpenInDir(dir, project string) (*Store, error) + func OpenMemory() (*Store, error) + func OpenPath(dbPath string) (*Store, error) + func (s *Store) AllEdges(project string) ([]*Edge, error) + func (s *Store) AllNodes(project string) ([]*Node, error) + func (s *Store) BFS(startNodeID int64, direction string, edgeTypes []string, ...) (*TraverseResult, error) + func (s *Store) BFSNodes(startNodeID int64, direction string, edgeTypes []string, ...) (*TraverseResult, error) + func (s *Store) BFSWithMinConfidence(startNodeID int64, direction string, edgeTypes []string, ...) (*TraverseResult, error) + func (s *Store) BeginBulkWrite(ctx context.Context) + func (s *Store) BulkInsertEdges(ctx context.Context, edges []*Edge) error + func (s *Store) BulkInsertNodes(ctx context.Context, nodes []*Node) error + func (s *Store) CallsConfidenceTierStats(project string) (map[string]int, error) + func (s *Store) CallsResolutionStats(project string) (map[string]int, error) + func (s *Store) CallsResolverRuleStats(project string) (map[string]int, error) + func (s *Store) Checkpoint(ctx context.Context) + func (s *Store) Close() error + func (s *Store) CosineSearch(project string, queryVec []float32, limit int) ([]EmbeddingResult, error) + func (s *Store) CountEdges(project string) (int, error) + func (s *Store) CountEdgesByType(project, edgeType string) (int, error) + func (s *Store) CountNodes(project string) (int, error) + func (s *Store) CreateUserIndexes(ctx context.Context) error + func (s *Store) DB() *sql.DB + func (s *Store) DBPath() string + func (s *Store) DeleteADR(project string) error + func (s *Store) DeleteEdgesBetweenFiles(project, edgeType string, srcFiles, tgtFiles []string) (int64, error) + func (s *Store) DeleteEdgesByProject(project string) error + func (s *Store) DeleteEdgesBySourceFile(project, filePath, edgeType string) error + func (s *Store) DeleteEdgesByType(project, edgeType string) error + func (s *Store) DeleteFileHash(project, relPath string) error + func (s *Store) DeleteFileHashes(project string) error + func (s *Store) DeleteNodesByFile(project, filePath string) error + func (s *Store) DeleteNodesByLabel(project, label string) error + func (s *Store) DeleteNodesByProject(project string) error + func (s *Store) DeleteOrphanNodesByLabel(project, label string) error + func (s *Store) DeleteProject(name string) error + func (s *Store) DropUserIndexes(ctx context.Context) error + func (s *Store) EdgeCountsByType(project string) (map[string]int, error) + func (s *Store) EmbeddingCount(project string) (int, error) + func (s *Store) EmbeddingModelCounts(project string) (map[string]int, error) + func (s *Store) EndBulkWrite(ctx context.Context) + func (s *Store) FindArchitectureDocs(project string) ([]string, error) + func (s *Store) FindCallerFilesOfTargetsInFiles(project string, targetFilePaths, edgeTypes []string) ([]string, error) + func (s *Store) FindEdgeEndpointsByTypes(project string, edgeTypes []string) ([]EdgeEndpoint, error) + func (s *Store) FindEdgesBySource(sourceID int64) ([]*Edge, error) + func (s *Store) FindEdgesBySourceAndType(sourceID int64, edgeType string) ([]*Edge, error) + func (s *Store) FindEdgesBySourceIDs(sourceIDs []int64, edgeTypes []string) (map[int64][]*Edge, error) + func (s *Store) FindEdgesByTarget(targetID int64) ([]*Edge, error) + func (s *Store) FindEdgesByTargetAndType(targetID int64, edgeType string) ([]*Edge, error) + func (s *Store) FindEdgesByTargetIDs(targetIDs []int64, edgeTypes []string) (map[int64][]*Edge, error) + func (s *Store) FindEdgesByType(project, edgeType string) ([]*Edge, error) + func (s *Store) FindEdgesByURLPath(project, pathSubstring string) ([]*Edge, error) + func (s *Store) FindNodeByID(id int64) (*Node, error) + func (s *Store) FindNodeByQN(project, qualifiedName string) (*Node, error) + func (s *Store) FindNodeIDsByQNs(project string, qns []string) (map[string]int64, error) + func (s *Store) FindNodeLabelsByQNs(project string, qns []string) (map[string]string, error) + func (s *Store) FindNodeSeedCandidates(project string, exactNameTokens, qnTokens []string) ([]*Node, error) + func (s *Store) FindNodesByFile(project, filePath string) ([]*Node, error) + func (s *Store) FindNodesByFileOverlap(project, fileSuffix string, startLine, endLine int) ([]*Node, error) + func (s *Store) FindNodesByIDs(ids []int64) (map[int64]*Node, error) + func (s *Store) FindNodesByLabel(project, label string) ([]*Node, error) + func (s *Store) FindNodesByName(project, name string) ([]*Node, error) + func (s *Store) FindNodesByProperty(project, label, propKey, propValue string) ([]*Node, error) + func (s *Store) FindNodesByQNSuffix(project, suffix string) ([]*Node, error) + func (s *Store) FindSimilarNodes(project string, nodeID int64, limit int) ([]EmbeddingResult, error) + func (s *Store) FormatVersionOf() (int, error) + func (s *Store) GetADR(project string) (*ADRecord, error) + func (s *Store) GetArchitecture(project string, aspects []string) (*ArchitectureInfo, error) + func (s *Store) GetFileHashes(project string) (map[string]FileHash, error) + func (s *Store) GetIncrementalsSinceFull(project string) (int, error) + func (s *Store) GetIndexIdentity(project string) (*indexidentity.Record, error) + func (s *Store) GetIndexProgress(name string) (phase string, pct int, detail string, err error) + func (s *Store) GetProject(name string) (*Project, error) + func (s *Store) GetSchema(project string) (*SchemaInfo, error) + func (s *Store) IncrementIncrementalsSinceFull(project string) error + func (s *Store) InsertEdge(e *Edge) (int64, error) + func (s *Store) InsertEdgeBatch(edges []*Edge) error + func (s *Store) InvalidateEmbeddingCache() + func (s *Store) IterEmbeddedNodeIDs(project string) ([]int64, error) + func (s *Store) ListFilesForProject(project string) ([]string, error) + func (s *Store) ListProjects() ([]*Project, error) + func (s *Store) LoadNodeIDMap(ctx context.Context, project string) (map[string]int64, error) + func (s *Store) NodeDegree(nodeID int64) (inbound, outbound int) + func (s *Store) NodeNeighborNames(nodeID int64, limit int) (callerNames, calleeNames []string) + func (s *Store) Q() Querier + func (s *Store) ReachableExcluding(startID, targetID int64, direction string, edgeTypes []string, maxDepth int, ...) (bool, error) + func (s *Store) ResetIncrementalsSinceFull(project string) error + func (s *Store) Search(params *SearchParams) (*SearchOutput, error) + func (s *Store) SetEnrichmentVersion(name, version string) error + func (s *Store) SetIndexIdentity(project string, identity *indexidentity.Envelope) error + func (s *Store) SetIndexIdentityState(project, status, reason string) error + func (s *Store) SetIndexProgress(name, phase string, pct int, detail string) error + func (s *Store) SetNodeIntProperty(project, qualifiedName, key string, value int) (int64, error) + func (s *Store) ShortestPath(startID, targetID int64, direction string, edgeTypes []string, maxDepth int) ([]int64, error) + func (s *Store) StoreADR(project, content string) error + func (s *Store) UpdateADRSections(project string, sections map[string]string) (*ADRecord, error) + func (s *Store) UpsertEmbedding(nodeID int64, model string, vec []float32) error + func (s *Store) UpsertEmbeddingBatch(nodeIDs []int64, model string, vecs [][]float32) error + func (s *Store) UpsertFileHash(project, relPath, sha256 string, mtimeNs, size int64) error + func (s *Store) UpsertFileHashBatch(hashes []FileHash) error + func (s *Store) UpsertNode(n *Node) (int64, error) + func (s *Store) UpsertNodeBatch(nodes []*Node) (map[string]int64, error) + func (s *Store) UpsertProject(name, rootPath string) error + func (s *Store) WALSize() int64 + func (s *Store) WithLargeCache(ctx context.Context, fn func() error) error + func (s *Store) WithTransaction(ctx context.Context, fn func(txStore *Store) error) error + type StoreRouter struct + func NewRouter() (*StoreRouter, error) + func NewRouterWithDir(dir string) (*StoreRouter, error) + func (r *StoreRouter) AcquireStore(project string) (*Store, ReleaseFunc, error) + func (r *StoreRouter) AllStores() map[string]*Store + func (r *StoreRouter) CloseAll() + func (r *StoreRouter) DeleteProject(name string) error + func (r *StoreRouter) Dir() string + func (r *StoreRouter) ForProject(name string) (*Store, error) + func (r *StoreRouter) HasProject(name string) bool + func (r *StoreRouter) ListProjects() ([]*ProjectInfo, error) + func (r *StoreRouter) OnDelete(fn func(name string)) + func (r *StoreRouter) StartEvictor(ctx context.Context) + func (r *StoreRouter) UseStore(project string, fn func(*Store) error) error + type TraverseResult struct + Edges []EdgeInfo + Root *Node + Truncated bool + Visited []*NodeHop + type TypeCount struct + Count int + Type string