graphprotocol

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	AnalysisFreshnessCurrent    = "current"
	AnalysisCoverageNotAssessed = "not_assessed"
)
View Source
const (
	StatusFound     = "found"
	StatusAmbiguous = "ambiguous"
	StatusNotFound  = "not_found"
	StatusOK        = "ok"
	StatusNoPath    = "no_path"
)
View Source
const (
	TypeKnowledgeRecorded = "recorded"
	TypeKnowledgeUnknown  = "unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AffectedTestsRequest

type AffectedTestsRequest struct {
	Scope        Scope    `json:"scope"`
	ChangedFiles []string `json:"changed_files"`
	MaxDepth     int      `json:"max_depth,omitempty"`
	TestGlob     string   `json:"test_glob,omitempty"`
	Limit        int      `json:"limit,omitempty"`
}

type AffectedTestsResponse

type AffectedTestsResponse struct {
	ChangedFiles             []string     `json:"changed_files"`
	AffectedTests            []string     `json:"affected_tests"`
	TotalDependentsTraversed int          `json:"total_dependents_traversed"`
	Generations              []Generation `json:"generations"`
	Boundaries               []Boundary   `json:"boundaries,omitempty"`
	Partial                  bool         `json:"partial"`
}

type AggregateCount

type AggregateCount struct {
	ID    string `json:"id"`
	Count int    `json:"count"`
}

type AggregateCountsResponse

type AggregateCountsResponse struct {
	Counts      []AggregateCount `json:"counts"`
	Generations []Generation     `json:"generations"`
}

type AggregateLimitRequest

type AggregateLimitRequest struct {
	Scope Scope `json:"scope"`
	Limit int   `json:"limit"`
}

type AggregateNamesResponse

type AggregateNamesResponse struct {
	Names       []string     `json:"names"`
	Generations []Generation `json:"generations"`
}

type AggregateValuesRequest

type AggregateValuesRequest struct {
	Scope  Scope    `json:"scope"`
	Values []string `json:"values"`
}

type AnalysisState

type AnalysisState struct {
	Freshness  string `json:"freshness"`
	Coverage   string `json:"coverage"`
	Unresolved int    `json:"unresolved"`
	Complete   bool   `json:"complete"`
}

type AppliedRelevantContextOptions

type AppliedRelevantContextOptions struct {
	SearchLimit    int      `json:"search_limit"`
	TraversalDepth int      `json:"traversal_depth"`
	MaxNodes       int      `json:"max_nodes"`
	MinScore       float64  `json:"min_score"`
	EdgeKinds      []string `json:"edge_kinds"`
	NodeKinds      []string `json:"node_kinds"`
	SeedNames      []string `json:"seed_names"`
}

type BlastFile

type BlastFile struct {
	File    string `json:"file"`
	Symbols int    `json:"symbols"`
	Test    bool   `json:"test"`
}

type BlastSummary

type BlastSummary struct {
	Direct     int         `json:"direct"`
	WithinHops int         `json:"within_hops"`
	Hops       int         `json:"hops"`
	Files      int         `json:"files"`
	TestFiles  int         `json:"test_files"`
	Routes     int         `json:"routes"`
	TopFiles   []BlastFile `json:"top_files"`
}

type Boundary

type Boundary struct {
	RepositoryID int64  `json:"repository_id,omitempty"`
	Repository   string `json:"repository,omitempty"`
	Reason       string `json:"reason"`
	Depth        int    `json:"depth,omitempty"`
	Count        int    `json:"count,omitempty"`
}

type CallingFile

type CallingFile struct {
	NodeID   string `json:"node_id"`
	FilePath string `json:"file_path"`
	Calls    int    `json:"calls"`
	Reaches  int    `json:"reaches"`
	Score    int    `json:"score"`
}

type ContextRequest

type ContextRequest struct {
	Scope             Scope    `json:"scope"`
	UID               string   `json:"uid,omitempty"`
	Name              string   `json:"name,omitempty"`
	FilePath          string   `json:"file_path,omitempty"`
	Kind              string   `json:"kind,omitempty"`
	Relations         []string `json:"relations,omitempty"`
	PerCategoryLimit  int      `json:"per_category_limit,omitempty"`
	PerCategoryOffset int      `json:"per_category_offset,omitempty"`
}

type ContextResponse

type ContextResponse struct {
	Snapshots     []ContextSnapshot         `json:"-"`
	Status        string                    `json:"status"`
	Symbol        *Symbol                   `json:"symbol,omitempty"`
	Candidates    []Symbol                  `json:"candidates,omitempty"`
	Incoming      map[string][]Symbol       `json:"incoming,omitempty"`
	Outgoing      map[string][]Symbol       `json:"outgoing,omitempty"`
	IncomingEdges map[string][]Relationship `json:"incoming_edges,omitempty"`
	OutgoingEdges map[string][]Relationship `json:"outgoing_edges,omitempty"`
	Boundaries    []Boundary                `json:"boundaries,omitempty"`
	Commits       map[string]string         `json:"commits"`
}

type ContextSnapshot

type ContextSnapshot struct {
	RepositoryID, UploadID int64
	Commit                 string
}

ContextSnapshot is internal legacy source-composition state, never public JSON.

type DependedOn

type DependedOn struct {
	NodeID     string `json:"node_id"`
	Dependents int    `json:"dependents"`
}

type DerivedOverride added in v0.6.1

type DerivedOverride struct {
	Member             Entity `json:"member"`
	BaseMember         Entity `json:"base_member"`
	BaseType           Entity `json:"base_type"`
	Relation           string `json:"relation"`
	SignatureUncertain bool   `json:"signature_uncertain"`
}

type DiscoverRequest

type DiscoverRequest struct {
	Scope          Scope           `json:"scope"`
	Query          string          `json:"query"`
	Limit          int             `json:"limit,omitempty"`
	CandidateLimit int             `json:"candidate_limit,omitempty"`
	Symbols        []string        `json:"symbols,omitempty"`
	Files          []string        `json:"files,omitempty"`
	Config         DiscoveryConfig `json:"config,omitempty"`
}

type DiscoverResponse

type DiscoverResponse struct {
	Status             string           `json:"status"`
	Confidence         string           `json:"confidence"`
	Matches            []DiscoveryMatch `json:"matches"`
	Generations        []Generation     `json:"generations"`
	CandidateLimit     int              `json:"candidate_limit"`
	CandidatesExamined int              `json:"candidates_examined"`
	CandidateTruncated bool             `json:"candidate_truncated"`
	ResultTruncated    bool             `json:"result_truncated"`
	// Discovery coverage never claims complete source or flow analysis.
	Coverage string `json:"coverage"`
}

type DiscoveryConfig

type DiscoveryConfig struct {
	NoMultiterm  bool     `json:"no_multiterm,omitempty"`
	ProjectTerms []string `json:"project_terms,omitempty"`
	Deprioritize []string `json:"deprioritize,omitempty"`
}

DiscoveryConfig is request-local policy; project terms come from indexed repository manifests, not files from the caller's machine.

type DiscoveryMatch

type DiscoveryMatch struct {
	Entity        Entity        `json:"entity"`
	File          *graphv2.File `json:"file,omitempty"`
	Fuzzy         bool          `json:"fuzzy"`
	EditDistance  int           `json:"edit_distance"`
	Score         float64       `json:"score"`
	Fields        []string      `json:"fields"`
	MatchedTerms  int           `json:"matched_terms"`
	UsageCount    int           `json:"usage_count"`
	Pinned        bool          `json:"pinned"`
	Generated     bool          `json:"generated"`
	Ambient       bool          `json:"ambient"`
	Test          bool          `json:"test"`
	Deprioritized bool          `json:"deprioritized"`
}

type EntitiesRequest

type EntitiesRequest struct {
	Scope    Scope          `json:"scope"`
	Selector EntitySelector `json:"selector"`
	Limit    int            `json:"limit,omitempty"`
	Cursor   string         `json:"cursor,omitempty"`
}

type EntitiesResponse

type EntitiesResponse struct {
	Entities    []Entity       `json:"entities"`
	Analysis    *AnalysisState `json:"analysis,omitempty"`
	Generations []Generation   `json:"generations"`
	NextCursor  string         `json:"next_cursor,omitempty"`
}

type Entity

type Entity struct {
	RepositoryID int64         `json:"repository_id"`
	ID           string        `json:"id"`
	Depth        int           `json:"depth"`
	Fact         *graphv2.Node `json:"fact"`
}

type EntityFilter

type EntityFilter struct {
	Paths    []string `json:"paths,omitempty"`
	Kinds    []string `json:"kinds,omitempty"`
	Exported *bool    `json:"exported,omitempty"`
}

type EntityImpactRequest

type EntityImpactRequest struct {
	Scope      Scope  `json:"scope"`
	Occurrence string `json:"occurrence"`
	MaxDepth   *int   `json:"max_depth,omitempty"`
}

type EntityRequest

type EntityRequest struct {
	Scope      Scope  `json:"scope"`
	Occurrence string `json:"occurrence"`
}

type EntitySelector

type EntitySelector struct {
	NameMatch     *NameSelector `json:"name_match,omitempty"`
	Occurrence    *string       `json:"occurrence,omitempty"`
	Name          *string       `json:"name,omitempty"`
	QualifiedName *string       `json:"qualified_name,omitempty"`
	Path          *string       `json:"path,omitempty"`
	Kind          string        `json:"kind,omitempty"`
}

Entity queries are an internal v2 contract. HTTP/MCP symbol wrappers remain v1. Selectors use producer occurrence identity; optional strings retain presence.

type Evidence

type Evidence struct {
	RepositoryID int64         `json:"repository_id"`
	SourceID     string        `json:"source_id"`
	TargetID     string        `json:"target_id"`
	Fact         *graphv2.Edge `json:"fact"`
}

type FileClassification

type FileClassification struct {
	Path               string `json:"path"`
	Present            bool   `json:"present"`
	PersistedGenerated *bool  `json:"persisted_generated,omitempty"`
	Generated          bool   `json:"generated"`
	Ambient            bool   `json:"ambient"`
}

type FileClassificationRequest

type FileClassificationRequest struct {
	Scope Scope    `json:"scope"`
	Paths []string `json:"paths"`
}

type FileClassificationResponse

type FileClassificationResponse struct {
	Files       []FileClassification `json:"files"`
	Generations []Generation         `json:"generations"`
}

type FileDependencyCount

type FileDependencyCount struct {
	Path       string `json:"path"`
	Dependents int    `json:"dependents,omitempty"`
	Reaches    int    `json:"reaches,omitempty"`
	References int    `json:"references,omitempty"`
}

type FileDependencyPair

type FileDependencyPair struct {
	Source     string `json:"source"`
	Target     string `json:"target"`
	References int    `json:"references"`
}

type FileDependencyRequest

type FileDependencyRequest struct {
	Scope         Scope    `json:"scope"`
	Paths         []string `json:"paths,omitempty"`
	MinConfidence float64  `json:"min_confidence,omitempty"`
	Limit         int      `json:"limit,omitempty"`
}

type FileDependencyResponse

type FileDependencyResponse struct {
	Files       []string              `json:"files,omitempty"`
	Counts      []FileDependencyCount `json:"counts,omitempty"`
	Pairs       []FileDependencyPair  `json:"pairs,omitempty"`
	Cycles      [][]string            `json:"cycles,omitempty"`
	Generations []Generation          `json:"generations"`
	Boundaries  []Boundary            `json:"boundaries,omitempty"`
	Partial     bool                  `json:"partial"`
}

type FileEntityRequest

type FileEntityRequest struct {
	Scope Scope  `json:"scope"`
	Path  string `json:"path"`
}

type FileNodesRequest

type FileNodesRequest struct {
	Scope Scope    `json:"scope"`
	Paths []string `json:"paths"`
}

type FilesRequest

type FilesRequest struct {
	Scope     Scope   `json:"scope"`
	Path      *string `json:"path,omitempty"`
	Directory string  `json:"directory,omitempty"`
	Glob      string  `json:"glob,omitempty"`
	Limit     int     `json:"limit,omitempty"`
	Cursor    string  `json:"cursor,omitempty"`
	// Prefix/Pattern implement the high-level inventory's literal prefix and
	// unanchored wildcard matching. Directory/Glob retain strict path semantics.
	Prefix       *string `json:"prefix,omitempty"`
	Pattern      string  `json:"pattern,omitempty"`
	IncludeCount bool    `json:"include_count,omitempty"`
}

type FilesResponse

type FilesResponse struct {
	Files       []IndexedFile `json:"files"`
	Generations []Generation  `json:"generations"`
	NextCursor  string        `json:"next_cursor,omitempty"`
	TotalFiles  *int64        `json:"total_files,omitempty"`
}

type FilteredSubgraphRequest

type FilteredSubgraphRequest struct {
	Scope        Scope        `json:"scope"`
	Filter       EntityFilter `json:"filter"`
	IncludeEdges *bool        `json:"include_edges,omitempty"`
}

type GeneratedFileCountRequest

type GeneratedFileCountRequest struct {
	Scope Scope `json:"scope"`
}

type GeneratedFileCountResponse

type GeneratedFileCountResponse struct {
	GeneratedFiles int64        `json:"generated_files"`
	TotalFiles     int64        `json:"total_files"`
	Generations    []Generation `json:"generations"`
}

type Generation

type Generation struct {
	Repository      string                   `json:"repository"`
	Publisher       string                   `json:"publisher"`
	RepositoryID    int64                    `json:"repository_id"`
	UploadID        int64                    `json:"generation"`
	Commit          string                   `json:"commit"`
	Producer        *graphv2.Producer        `json:"producer"`
	ContentHash     []byte                   `json:"content_hash"`
	Capabilities    []string                 `json:"capabilities"`
	NodeCount       int                      `json:"node_count"`
	EdgeCount       int                      `json:"edge_count"`
	UnresolvedCount int                      `json:"unresolved_count"`
	DiagnosticCount int                      `json:"diagnostic_count"`
	Metadata        []*graphv2.MetadataEntry `json:"metadata,omitempty"`
	Extensions      []*graphv2.Extension     `json:"extensions,omitempty"`
}

type GraphStats

type GraphStats struct {
	NodeCount       int            `json:"node_count"`
	EdgeCount       int            `json:"edge_count"`
	FileCount       int            `json:"file_count"`
	UnresolvedCount int            `json:"unresolved_count"`
	NodesByKind     map[string]int `json:"nodes_by_kind"`
	EdgesByKind     map[string]int `json:"edges_by_kind"`
	FilesByLanguage map[string]int `json:"files_by_language"`
}

type GraphStatsResponse

type GraphStatsResponse struct {
	Stats       GraphStats   `json:"stats"`
	Generations []Generation `json:"generations"`
}

type HierarchyEntry added in v0.6.1

type HierarchyEntry struct {
	Entity         Entity   `json:"entity"`
	Depth          int      `json:"depth"`
	ParentID       string   `json:"parent_id"`
	Relation       string   `json:"relation"`
	Edge           Evidence `json:"edge"`
	Synthesized    bool     `json:"synthesized"`
	Via            string   `json:"via,omitempty"`
	RegisteredAt   string   `json:"registered_at,omitempty"`
	HiddenSubtypes int      `json:"hidden_subtypes"`
}

type HierarchyRows added in v0.6.1

type HierarchyRows struct {
	Items     []HierarchyEntry `json:"items"`
	Total     int              `json:"total"`
	Shown     int              `json:"shown"`
	Truncated bool             `json:"truncated"`
}

HierarchyRows keeps every bounded query row while stating the viewer cap.

type ImpactRequest

type ImpactRequest struct {
	Scope         Scope    `json:"scope"`
	TargetUID     string   `json:"target_uid"`
	Direction     string   `json:"direction"`
	Relations     []string `json:"relations,omitempty"`
	MinConfidence float64  `json:"min_confidence,omitempty"`
	IncludeTests  bool     `json:"include_tests,omitempty"`
	MaxDepth      int      `json:"max_depth,omitempty"`
	Limit         int      `json:"limit,omitempty"`
	Offset        int      `json:"offset,omitempty"`
	SummaryOnly   bool     `json:"summary_only,omitempty"`
}

type ImpactResponse

type ImpactResponse struct {
	Status     string            `json:"status"`
	Candidates []Symbol          `json:"candidates,omitempty"`
	ByDepth    map[int][]Symbol  `json:"by_depth"`
	Edges      []Relationship    `json:"edges,omitempty"`
	Boundaries []Boundary        `json:"boundaries,omitempty"`
	Commits    map[string]string `json:"commits"`
	Partial    bool              `json:"partial"`
}

type IndexedFile

type IndexedFile struct {
	RepositoryID int64         `json:"repository_id"`
	Fact         *graphv2.File `json:"fact"`
}

type ModuleAggregationRequest

type ModuleAggregationRequest struct {
	Scope           Scope              `json:"scope"`
	Assignments     []ModuleAssignment `json:"assignments"`
	Kinds           []string           `json:"kinds"`
	MinConfidence   float64            `json:"min_confidence"`
	TopPairsPerLink int                `json:"top_pairs_per_link"`
	PairKinds       []string           `json:"pair_kinds"`
}

type ModuleAggregationResponse

type ModuleAggregationResponse struct {
	Links       []ModuleLink `json:"links"`
	Pairs       []ModulePair `json:"pairs"`
	Generations []Generation `json:"generations"`
}

type ModuleAssignment

type ModuleAssignment struct {
	FilePath string `json:"file_path"`
	Module   string `json:"module"`
}

type ModuleDirectory

type ModuleDirectory struct {
	Directory string   `json:"directory"`
	Files     []string `json:"files"`
}
type ModuleLink struct {
	Source    string `json:"source"`
	Target    string `json:"target"`
	Kind      string `json:"kind"`
	Count     int    `json:"count"`
	Declared  int    `json:"declared"`
	Uncertain int    `json:"uncertain"`
}

type ModulePair

type ModulePair struct {
	Source   string `json:"source"`
	Target   string `json:"target"`
	From     string `json:"from"`
	To       string `json:"to"`
	Count    int    `json:"count"`
	Declared int    `json:"declared"`
}

type ModuleStructureResponse

type ModuleStructureResponse struct {
	Modules     []ModuleDirectory `json:"modules"`
	Analysis    *AnalysisState    `json:"analysis,omitempty"`
	Generations []Generation      `json:"generations"`
	Boundaries  []Boundary        `json:"boundaries,omitempty"`
	Partial     bool              `json:"partial"`
}

type NameSelector

type NameSelector struct {
	Mode          string   `json:"mode"` // prefix (case-sensitive) or substring (ASCII folding)
	Value         string   `json:"value"`
	Kinds         []string `json:"kinds,omitempty"`
	ExcludePrefix bool     `json:"exclude_prefix,omitempty"`
}

NameSelector is literal name membership, independent of Discover ranking.

type NodeMetrics

type NodeMetrics struct {
	IncomingEdgeCount int `json:"incoming_edge_count"`
	OutgoingEdgeCount int `json:"outgoing_edge_count"`
	CallCount         int `json:"call_count"`
	CallerCount       int `json:"caller_count"`
	ChildCount        int `json:"child_count"`
	Depth             int `json:"depth"`
}

type NodeMetricsRequest

type NodeMetricsRequest struct {
	Scope      Scope  `json:"scope"`
	Occurrence string `json:"occurrence"`
}

type NodeMetricsResponse

type NodeMetricsResponse struct {
	Metrics     NodeMetrics  `json:"metrics"`
	Generations []Generation `json:"generations"`
}

type Position

type Position struct {
	StartLine      int32 `json:"start_line"`
	StartCharacter int32 `json:"start_character"`
	EndLine        int32 `json:"end_line"`
	EndCharacter   int32 `json:"end_character"`
}

type QualifiedNameRequest

type QualifiedNameRequest struct {
	Scope   Scope  `json:"scope"`
	Pattern string `json:"pattern"`
}

type RelatedEntities added in v0.6.1

type RelatedEntities struct {
	Entity   Entity     `json:"entity"`
	Relation string     `json:"relation"`
	Edges    []Evidence `json:"edges"`
}

RelatedEntities groups repeated edge occurrences without losing evidence.

type Relationship

type Relationship struct {
	SourceRepositoryID int64    `json:"source_repository_id"`
	TargetRepositoryID int64    `json:"target_repository_id"`
	SourceUID          string   `json:"source_uid"`
	TargetUID          string   `json:"target_uid"`
	Kind               string   `json:"kind"`
	Path               string   `json:"path,omitempty"`
	Range              Position `json:"range"`
	Confidence         float64  `json:"confidence"`
	ResolutionReason   string   `json:"resolution_reason,omitempty"`
}

type RelevantContextOptions

type RelevantContextOptions struct {
	SearchLimit    *int      `json:"search_limit,omitempty"`
	TraversalDepth *int      `json:"traversal_depth,omitempty"`
	MaxNodes       *int      `json:"max_nodes,omitempty"`
	MinScore       *float64  `json:"min_score,omitempty"`
	EdgeKinds      []string  `json:"edge_kinds,omitempty"`
	NodeKinds      *[]string `json:"node_kinds,omitempty"`
	SeedNames      *[]string `json:"seed_names,omitempty"`
}

Pointer fields retain the difference between an omitted option and an explicit zero or empty list.

type RelevantContextRequest

type RelevantContextRequest struct {
	Scope   Scope                  `json:"scope"`
	Query   string                 `json:"query"`
	Options RelevantContextOptions `json:"options,omitempty"`
}

type RelevantContextResponse

type RelevantContextResponse struct {
	Status      string                        `json:"status"`
	Confidence  string                        `json:"confidence"`
	EntryPoints []DiscoveryMatch              `json:"entry_points"`
	Nodes       []Entity                      `json:"nodes"`
	Edges       []Evidence                    `json:"edges"`
	Roots       []string                      `json:"roots"`
	Generations []Generation                  `json:"generations"`
	Options     AppliedRelevantContextOptions `json:"options"`
	Boundaries  []Boundary                    `json:"boundaries,omitempty"`
	Partial     bool                          `json:"partial"`
}

RelevantContextResponse is the structured task-level graph result. Facts and evidence are the original producer messages; Roots refer to Entity IDs.

type RepositorySnapshot

type RepositorySnapshot struct {
	ID       int64  `json:"id"`
	GitHubID int64  `json:"github_id"`
	Name     string `json:"name"`
	Branch   string `json:"branch"`
	Commit   string `json:"commit"`
}

type Scope

type Scope struct {
	SelectedRepositoryID int64                `json:"selected_repository_id,omitempty"`
	Repositories         []RepositorySnapshot `json:"repositories"`
}

type ScopeRequest

type ScopeRequest struct {
	Scope Scope `json:"scope"`
}

type SegmentMatch

type SegmentMatch struct {
	Entity       Entity   `json:"entity"`
	MatchedWords []string `json:"matched_words"`
}

type SegmentRequest

type SegmentRequest struct {
	Scope Scope    `json:"scope"`
	Words []string `json:"words"`
	Limit int      `json:"limit,omitempty"`
}

type SegmentResponse

type SegmentResponse struct {
	Matches     []SegmentMatch `json:"matches"`
	Generations []Generation   `json:"generations"`
	Truncated   bool           `json:"truncated"`
}

type SubgraphResponse

type SubgraphResponse struct {
	Status      string         `json:"status"`
	Roots       []string       `json:"roots"`
	Entities    []Entity       `json:"entities"`
	Edges       []Evidence     `json:"edges"`
	Blast       *BlastSummary  `json:"blast,omitempty"`
	Analysis    *AnalysisState `json:"analysis,omitempty"`
	Generations []Generation   `json:"generations"`
	Boundaries  []Boundary     `json:"boundaries,omitempty"`
	Partial     bool           `json:"partial"`
}

type Symbol

type Symbol struct {
	UID          string   `json:"uid"`
	Name         string   `json:"name"`
	Kind         string   `json:"kind"`
	FilePath     string   `json:"file_path"`
	Language     string   `json:"language"`
	Signature    string   `json:"signature,omitempty"`
	RepositoryID int64    `json:"repository_id"`
	Range        Position `json:"range"`
	Test         bool     `json:"test"`
}

type SymbolCallsRequest added in v0.7.0

type SymbolCallsRequest struct {
	Scope     Scope  `json:"scope"`
	Symbol    string `json:"symbol"`
	File      string `json:"file,omitempty"`
	Direction string `json:"direction"`
	Limit     int    `json:"limit,omitempty"`
}

SymbolCallsRequest addresses a symbol by name, the way CodeGraph's callers and callees tools do. Direction is "incoming" (callers) or "outgoing" (callees). File narrows same-named definitions by path or path suffix.

type SymbolDefinition added in v0.7.0

type SymbolDefinition struct {
	Definitions []Entity        `json:"definitions"`
	Related     []SymbolRelated `json:"related,omitempty"`
	Truncated   bool            `json:"truncated,omitempty"`
	// Impact fields; empty for callers and callees.
	Entities []Entity   `json:"entities,omitempty"`
	Edges    []Evidence `json:"edges,omitempty"`
}

SymbolDefinition is one distinct definition: every match sharing a file and qualified name (same-file overloads stay together).

type SymbolImpactRequest added in v0.7.0

type SymbolImpactRequest struct {
	Scope  Scope  `json:"scope"`
	Symbol string `json:"symbol"`
	File   string `json:"file,omitempty"`
	Depth  int    `json:"depth,omitempty"`
}

SymbolImpactRequest is the name-addressed impact radius.

type SymbolRelated added in v0.7.0

type SymbolRelated struct {
	Entity Entity   `json:"entity"`
	Edge   Evidence `json:"edge"`
}

SymbolRelated is one neighbor with the first edge that reached it.

type SymbolResponse added in v0.7.0

type SymbolResponse struct {
	Status      string             `json:"status"`
	FileFilter  string             `json:"file_filter,omitempty"`
	Definitions []SymbolDefinition `json:"definitions"`
	Generations []Generation       `json:"generations"`
	Boundaries  []Boundary         `json:"boundaries,omitempty"`
	Partial     bool               `json:"partial"`
}

SymbolResponse reports status ok or not_found. FileFilter is "matched" when File narrowed the definitions and "unmatched" when no definition matched File, so every definition is returned instead.

type TopCallingFilesResponse

type TopCallingFilesResponse struct {
	Files       []CallingFile `json:"files"`
	Generations []Generation  `json:"generations"`
	Boundaries  []Boundary    `json:"boundaries,omitempty"`
	Partial     bool          `json:"partial"`
}

type TopDependedOnResponse

type TopDependedOnResponse struct {
	Nodes       []DependedOn `json:"nodes"`
	Generations []Generation `json:"generations"`
	Boundaries  []Boundary   `json:"boundaries,omitempty"`
	Partial     bool         `json:"partial"`
}

type TraceRequest

type TraceRequest struct {
	Scope     Scope  `json:"scope"`
	SourceUID string `json:"source_uid"`
	TargetUID string `json:"target_uid"`
	MaxDepth  int    `json:"max_depth,omitempty"`
}

type TraceResponse

type TraceResponse struct {
	Status     string            `json:"status"`
	Candidates []Symbol          `json:"candidates,omitempty"`
	Nodes      []Symbol          `json:"nodes,omitempty"`
	Edges      []Relationship    `json:"edges,omitempty"`
	Boundaries []Boundary        `json:"boundaries,omitempty"`
	Commits    map[string]string `json:"commits"`
}

type TraverseRequest

type TraverseRequest struct {
	Scope         Scope          `json:"scope"`
	Root          EntitySelector `json:"root"`
	Relations     []string       `json:"relations,omitempty"`
	Direction     string         `json:"direction,omitempty"`
	MinConfidence float64        `json:"min_confidence,omitempty"`
	MaxDepth      int            `json:"max_depth,omitempty"`
}

type TraverseResponse

type TraverseResponse struct {
	Status      string       `json:"status"`
	Entities    []Entity     `json:"entities"`
	Edges       []Evidence   `json:"edges"`
	Generations []Generation `json:"generations"`
	Boundaries  []Boundary   `json:"boundaries,omitempty"`
	Partial     bool         `json:"partial"`
}

type TypeHierarchyRequest added in v0.6.1

type TypeHierarchyRequest struct {
	Scope      Scope  `json:"scope"`
	Occurrence string `json:"occurrence"`
}

type TypeHierarchyResponse added in v0.6.1

type TypeHierarchyResponse struct {
	Status             string            `json:"status"`
	Focus              Entity            `json:"focus"`
	Ancestors          HierarchyRows     `json:"ancestors"`
	Descendants        HierarchyRows     `json:"descendants"`
	DirectSubtypes     int               `json:"direct_subtypes"`
	DirectImplementers int               `json:"direct_implementers"`
	Bounded            bool              `json:"bounded"`
	Polymorphic        bool              `json:"polymorphic"`
	DerivedOverrides   []DerivedOverride `json:"derived_overrides,omitempty"`
	Analysis           *AnalysisState    `json:"analysis,omitempty"`
	Generations        []Generation      `json:"generations"`
	Boundaries         []Boundary        `json:"boundaries,omitempty"`
	Partial            bool              `json:"partial"`
}

type TypeRelationsRequest added in v0.6.1

type TypeRelationsRequest struct {
	Scope      Scope  `json:"scope"`
	Occurrence string `json:"occurrence"`
}

type TypeRelationsResponse added in v0.6.1

type TypeRelationsResponse struct {
	Status            string            `json:"status"`
	TypeKnowledge     string            `json:"type_knowledge"`
	Types             []RelatedEntities `json:"types,omitempty"`
	Users             []RelatedEntities `json:"users,omitempty"`
	Returners         []RelatedEntities `json:"returners,omitempty"`
	ReferencedTypes   []RelatedEntities `json:"referenced_types,omitempty"`
	RecordedOverrides []RelatedEntities `json:"recorded_overrides,omitempty"`
	Analysis          *AnalysisState    `json:"analysis,omitempty"`
	Generations       []Generation      `json:"generations"`
	Boundaries        []Boundary        `json:"boundaries,omitempty"`
	Partial           bool              `json:"partial"`
}

type UnresolvedReference

type UnresolvedReference struct {
	RepositoryID int64                        `json:"repository_id"`
	ID           string                       `json:"id"`
	Fact         *graphv2.UnresolvedReference `json:"fact"`
}

type UnresolvedReferencesRequest

type UnresolvedReferencesRequest struct {
	Scope      Scope  `json:"scope"`
	Occurrence string `json:"occurrence,omitempty"`
	Path       string `json:"path,omitempty"`
	Limit      *int   `json:"limit,omitempty"`
}

type UnresolvedReferencesResponse

type UnresolvedReferencesResponse struct {
	References  []UnresolvedReference `json:"references"`
	Generations []Generation          `json:"generations"`
}

type Usage

type Usage struct {
	Entity Entity   `json:"entity"`
	Edge   Evidence `json:"edge"`
}

type UsagesResponse

type UsagesResponse struct {
	Status      string         `json:"status"`
	Usages      []Usage        `json:"usages"`
	Analysis    *AnalysisState `json:"analysis,omitempty"`
	Generations []Generation   `json:"generations"`
	Boundaries  []Boundary     `json:"boundaries,omitempty"`
	Partial     bool           `json:"partial"`
}

Jump to

Keyboard shortcuts

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