Documentation
¶
Index ¶
- Variables
- type AffectedTestsRequest
- type AggregateFilesRequest
- type AggregateLimitRequest
- type AggregateModuleRequest
- type AggregateNodeRequest
- type AggregateScopeRequest
- type AggregateUnresolvedRequest
- type AggregateValuesRequest
- type AppliedBuildTaskContextOptions
- type BuildTaskContextOptions
- type BuildTaskContextRequest
- type CapabilitiesResponse
- type CapabilityWorkflow
- type ContentReader
- type EntityAnalysisRequest
- type EntityFileRequest
- type ExploreConfig
- type ExploreFile
- type ExploreRequest
- type ExploreResponse
- type ExploreSelection
- type ExploreUsage
- type FileClassificationsRequest
- type FileDependencyRequest
- type FileInventoryRequest
- type FileInventoryResponse
- type FilteredSubgraphRequest
- type FindRelevantContextRequest
- type GeneratedFileCountRequest
- type InspectEntityRequest
- type InspectFileRequest
- type InspectionBackend
- type InspectionResponse
- type InspectionSource
- type InventoryFile
- type InventoryGroup
- type InventoryTree
- type Limits
- type ListFilesRequest
- type ProjectTokensRequest
- type ProjectTokensResponse
- type QualifiedNameRequest
- type RepositoryStore
- type Service
- func (s *Service) AffectedTests(ctx context.Context, principal authn.Principal, request AffectedTestsRequest) (graphprotocol.AffectedTestsResponse, error)
- func (s *Service) AmbiguousReferencedNames(ctx context.Context, principal authn.Principal, request AggregateValuesRequest) (graphprotocol.AggregateNamesResponse, error)
- func (s *Service) BuildTaskContext(ctx context.Context, principal authn.Principal, ...) (TaskContext, error)
- func (s *Service) CallGraph(ctx context.Context, principal authn.Principal, request EntityAnalysisRequest) (graphprotocol.SubgraphResponse, error)
- func (s *Service) Capabilities(ctx context.Context, p authn.Principal, r api.GraphCapabilitiesRequest) (CapabilitiesResponse, error)
- func (s *Service) CircularDependencies(ctx context.Context, principal authn.Principal, request FileDependencyRequest) (graphprotocol.FileDependencyResponse, error)
- func (s *Service) Context(ctx context.Context, principal authn.Principal, ...) (result api.GraphContextResponse, err error)
- func (s *Service) Discover(ctx context.Context, p authn.Principal, r api.GraphDiscoverRequest) (graphprotocol.DiscoverResponse, error)
- func (s *Service) Explore(ctx context.Context, p authn.Principal, r ExploreRequest) (ExploreResponse, error)
- func (s *Service) ExplorePublic(ctx context.Context, p authn.Principal, r api.GraphExploreRequest) (ExploreResponse, error)
- func (s *Service) ExportedSymbols(ctx context.Context, principal authn.Principal, request EntityFileRequest) (graphprotocol.EntitiesResponse, error)
- func (s *Service) FanIn(ctx context.Context, principal authn.Principal, request AggregateValuesRequest) (graphprotocol.AggregateCountsResponse, error)
- func (s *Service) FanOut(ctx context.Context, principal authn.Principal, request AggregateValuesRequest) (graphprotocol.AggregateCountsResponse, error)
- func (s *Service) FileClassifications(ctx context.Context, p authn.Principal, request FileClassificationsRequest) (graphprotocol.FileClassificationResponse, error)
- func (s *Service) FileDependencies(ctx context.Context, principal authn.Principal, request FileDependencyRequest) (graphprotocol.FileDependencyResponse, error)
- func (s *Service) FileDependencyPairs(ctx context.Context, principal authn.Principal, request FileDependencyRequest) (graphprotocol.FileDependencyResponse, error)
- func (s *Service) FileDependentCounts(ctx context.Context, principal authn.Principal, request FileDependencyRequest) (graphprotocol.FileDependencyResponse, error)
- func (s *Service) FileDependents(ctx context.Context, principal authn.Principal, request FileDependencyRequest) (graphprotocol.FileDependencyResponse, error)
- func (s *Service) FileInventory(ctx context.Context, p authn.Principal, r FileInventoryRequest) (FileInventoryResponse, error)
- func (s *Service) FileNodes(ctx context.Context, principal authn.Principal, request AggregateFilesRequest) (graphprotocol.EntitiesResponse, error)
- func (s *Service) FileReachCounts(ctx context.Context, principal authn.Principal, request FileDependencyRequest) (graphprotocol.FileDependencyResponse, error)
- func (s *Service) FilteredSubgraph(ctx context.Context, principal authn.Principal, ...) (graphprotocol.SubgraphResponse, error)
- func (s *Service) FindByQualifiedName(ctx context.Context, principal authn.Principal, request QualifiedNameRequest) (graphprotocol.EntitiesResponse, error)
- func (s *Service) FindRelevantContext(ctx context.Context, principal authn.Principal, ...) (graphprotocol.RelevantContextResponse, error)
- func (s *Service) GeneratedFileCount(ctx context.Context, p authn.Principal, request GeneratedFileCountRequest) (graphprotocol.GeneratedFileCountResponse, error)
- func (s *Service) GraphStats(ctx context.Context, principal authn.Principal, request AggregateScopeRequest) (graphprotocol.GraphStatsResponse, error)
- func (s *Service) Impact(ctx context.Context, principal authn.Principal, request api.GraphImpactRequest) (result api.GraphImpactResponse, err error)
- func (s *Service) ImpactRadius(ctx context.Context, principal authn.Principal, request EntityAnalysisRequest) (graphprotocol.SubgraphResponse, error)
- func (s *Service) InspectEntity(ctx context.Context, p authn.Principal, r InspectEntityRequest) (InspectionResponse, error)
- func (s *Service) InspectFile(ctx context.Context, p authn.Principal, r InspectFileRequest) (InspectionResponse, error)
- func (s *Service) LanguagesWithExports(ctx context.Context, principal authn.Principal, request AggregateValuesRequest) (graphprotocol.AggregateNamesResponse, error)
- func (s *Service) ListFiles(ctx context.Context, p authn.Principal, r ListFilesRequest) (graphprotocol.FilesResponse, error)
- func (s *Service) ListFilesPublic(ctx context.Context, p authn.Principal, r api.GraphFilesRequest) (graphprotocol.FilesResponse, error)
- func (s *Service) ModuleAggregation(ctx context.Context, principal authn.Principal, request AggregateModuleRequest) (graphprotocol.ModuleAggregationResponse, error)
- func (s *Service) ModuleStructure(ctx context.Context, principal authn.Principal, request AggregateScopeRequest) (graphprotocol.ModuleStructureResponse, error)
- func (s *Service) NodeMetrics(ctx context.Context, principal authn.Principal, request AggregateNodeRequest) (graphprotocol.NodeMetricsResponse, error)
- func (s *Service) ProjectNameTokens(ctx context.Context, p authn.Principal, r ProjectTokensRequest) (ProjectTokensResponse, error)
- func (s *Service) SymbolCallees(ctx context.Context, p authn.Principal, r api.GraphSymbolCallsRequest) (graphprotocol.SymbolResponse, error)
- func (s *Service) SymbolCallers(ctx context.Context, p authn.Principal, r api.GraphSymbolCallsRequest) (graphprotocol.SymbolResponse, error)
- func (s *Service) SymbolImpact(ctx context.Context, p authn.Principal, r api.GraphSymbolImpactRequest) (graphprotocol.SymbolResponse, error)
- func (s *Service) TopCallingFiles(ctx context.Context, principal authn.Principal, request AggregateLimitRequest) (graphprotocol.TopCallingFilesResponse, error)
- func (s *Service) TopDependedOn(ctx context.Context, principal authn.Principal, request AggregateLimitRequest) (graphprotocol.TopDependedOnResponse, error)
- func (s *Service) Trace(ctx context.Context, principal authn.Principal, request api.GraphTraceRequest) (result api.GraphTraceResponse, err error)
- func (s *Service) TypeHierarchy(ctx context.Context, principal authn.Principal, request EntityAnalysisRequest) (graphprotocol.TypeHierarchyResponse, error)
- func (s *Service) TypeRelations(ctx context.Context, principal authn.Principal, request EntityAnalysisRequest) (graphprotocol.TypeRelationsResponse, error)
- func (s *Service) UnresolvedNamesAmong(ctx context.Context, principal authn.Principal, request AggregateValuesRequest) (graphprotocol.AggregateNamesResponse, error)
- func (s *Service) UnresolvedReferencesFrom(ctx context.Context, principal authn.Principal, ...) (graphprotocol.UnresolvedReferencesResponse, error)
- func (s *Service) UnresolvedReferencesInFile(ctx context.Context, principal authn.Principal, ...) (graphprotocol.UnresolvedReferencesResponse, error)
- func (s *Service) Usages(ctx context.Context, principal authn.Principal, request EntityAnalysisRequest) (graphprotocol.UsagesResponse, error)
- type Snapshot
- type SourceSelection
- type TaskCodeBlock
- type TaskContext
- type TaskContextStats
Constants ¶
This section is empty.
Variables ¶
var ( ErrRepositoryNotFound = errors.New("repository_not_found") ErrRepositoryRequired = errors.New("repository_required") ErrInvalidRepositorySelector = errors.New("invalid_repository_selector") ErrBranchNotIndexed = errors.New("branch_not_indexed") // ErrNotIndexed means the repository has no indexed commit yet, so no graph // can exist for it; indexing must finish first. ErrNotIndexed = errors.New("repository_not_indexed") // ErrGraphNotReady means the graph state GraphNest holds for the request is // inconsistent: facts outside the authorized scope, generation metadata // that does not match the selected commit, or a backend without graph // support. Retrying does not help by itself. ErrGraphNotReady = errors.New("graph_not_ready") )
var (
ErrInvalidRequest = errors.New("invalid_graph_request")
)
Functions ¶
This section is empty.
Types ¶
type AffectedTestsRequest ¶
type AggregateFilesRequest ¶
type AggregateFilesRequest struct {
AggregateScopeRequest
Paths []string
}
type AggregateLimitRequest ¶
type AggregateLimitRequest struct {
AggregateScopeRequest
Limit int
}
type AggregateModuleRequest ¶
type AggregateModuleRequest struct {
AggregateScopeRequest
Assignments []graphprotocol.ModuleAssignment
Kinds []string
MinConfidence float64
TopPairsPerLink int
PairKinds []string
}
type AggregateNodeRequest ¶
type AggregateNodeRequest struct {
AggregateScopeRequest
Occurrence string
}
type AggregateScopeRequest ¶
type AggregateScopeRequest struct {
Repo api.GraphRepositorySelector
Branch string
}
type AggregateUnresolvedRequest ¶
type AggregateUnresolvedRequest struct {
AggregateScopeRequest
Occurrence, Path string
Limit *int
}
type AggregateValuesRequest ¶
type AggregateValuesRequest struct {
AggregateScopeRequest
Values []string
}
type AppliedBuildTaskContextOptions ¶
type AppliedBuildTaskContextOptions struct {
graphprotocol.AppliedRelevantContextOptions
MaxCodeBlocks int `json:"max_code_blocks"`
MaxCodeBlockSize int `json:"max_code_block_size"`
IncludeCode bool `json:"include_code"`
}
type BuildTaskContextOptions ¶
type BuildTaskContextOptions 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"`
MaxCodeBlocks *int `json:"max_code_blocks,omitempty"`
MaxCodeBlockSize *int `json:"max_code_block_size,omitempty"`
IncludeCode *bool `json:"include_code,omitempty"`
}
type BuildTaskContextRequest ¶
type BuildTaskContextRequest struct {
Repo api.GraphRepositorySelector
Branch string
Query string
Title string
Description string
Options BuildTaskContextOptions
}
type CapabilitiesResponse ¶ added in v0.5.0
type CapabilitiesResponse struct {
Version int `json:"version"`
QueryArtifactVersions []int `json:"query_artifact_versions"`
UploadArtifactVersions []int `json:"upload_artifact_versions"`
Workflows []CapabilityWorkflow `json:"workflows"`
Status string `json:"status"`
Freshness string `json:"freshness"`
RepositoryID int64 `json:"repository_id"`
Repository string `json:"repository"`
Branch string `json:"branch"`
CurrentIndexedCommit string `json:"current_indexed_commit"`
Generation *graphprotocol.Generation `json:"generation"`
ProducerCapabilities []string `json:"producer_capabilities"`
DiscoveryProjection bool `json:"discovery_projection"`
DiscoveryCoverage string `json:"discovery_coverage"`
}
type CapabilityWorkflow ¶ added in v0.5.0
type ContentReader ¶
type ContentReader interface {
ReadFileAt(context.Context, authn.Principal, api.ReadFileRequest, string) (api.ReadFileResponse, error)
}
type EntityAnalysisRequest ¶
type EntityAnalysisRequest struct {
AggregateScopeRequest
Occurrence string
MaxDepth *int
}
type EntityFileRequest ¶
type EntityFileRequest struct {
AggregateScopeRequest
Path string
}
type ExploreConfig ¶
type ExploreConfig struct {
graphprotocol.DiscoveryConfig
LineNumbers *bool `json:"line_numbers,omitempty"`
Adaptive *bool `json:"adaptive,omitempty"`
Dedup *bool `json:"dedup,omitempty"`
}
type ExploreFile ¶
type ExploreFile struct {
Path string `json:"path"`
Fact *graphv2.File `json:"fact,omitempty"`
Entities []graphprotocol.Entity `json:"entities"`
Pinned bool `json:"pinned"`
Required bool `json:"required"`
Score float64 `json:"score"`
Reservation int `json:"reservation_utf16_units"`
Status string `json:"status"`
Mode string `json:"mode"`
Segments []InspectionSource `json:"segments"`
References []InspectionSource `json:"references,omitempty"`
Selections []ExploreSelection `json:"selections"`
Boundaries []string `json:"boundaries,omitempty"`
}
type ExploreRequest ¶
type ExploreRequest struct {
Repo api.GraphRepositorySelector
Branch, Query, SessionID string
Symbols, Files, RequiredOccurrences []string
Limit, CandidateLimit, MaxFiles, SourceUnits, SourceBytes int
Config ExploreConfig
}
type ExploreResponse ¶
type ExploreResponse struct {
Discovery graphprotocol.DiscoverResponse `json:"discovery"`
Files []ExploreFile `json:"files"`
Relationships []graphprotocol.TraverseResponse `json:"relationships"`
Generations []graphprotocol.Generation `json:"generations"`
CorpusFiles int64 `json:"corpus_files"`
LineNumbers bool `json:"line_numbers"`
Complete bool `json:"complete"`
Boundaries []string `json:"boundaries,omitempty"`
Handoffs []string `json:"handoffs,omitempty"`
Usage ExploreUsage `json:"usage"`
SourceUnitsLimit int `json:"source_utf16_units_limit"`
SourceBytesLimit int `json:"source_bytes_limit"`
FileLimit int `json:"file_limit"`
SessionRestored bool `json:"session_restored,omitempty"`
}
type ExploreSelection ¶
type ExploreUsage ¶
type FileClassificationsRequest ¶
type FileClassificationsRequest struct {
Repo api.GraphRepositorySelector
Branch string
Paths []string
}
type FileDependencyRequest ¶
type FileInventoryRequest ¶
type FileInventoryResponse ¶
type FileInventoryResponse struct {
Format string `json:"format"`
Files []InventoryFile `json:"files,omitempty"`
Tree []*InventoryTree `json:"tree,omitempty"`
Groups []InventoryGroup `json:"groups,omitempty"`
Generations []graphprotocol.Generation `json:"generations"`
NextCursor string `json:"next_cursor,omitempty"`
// TotalFiles counts the entire filtered immutable inventory. The projection
// and group sizes describe only this page; depth can hide additional leaves.
TotalFiles int64 `json:"total_files"`
PageFiles int `json:"page_files"`
VisibleFiles int `json:"visible_files"`
Complete bool `json:"complete"`
Boundaries []string `json:"boundaries,omitempty"`
}
type FilteredSubgraphRequest ¶
type FilteredSubgraphRequest struct {
AggregateScopeRequest
Filter graphprotocol.EntityFilter
IncludeEdges *bool
}
type FindRelevantContextRequest ¶
type FindRelevantContextRequest struct {
Repo api.GraphRepositorySelector
Branch string
Query string
Options graphprotocol.RelevantContextOptions
}
type GeneratedFileCountRequest ¶
type GeneratedFileCountRequest struct {
Repo api.GraphRepositorySelector
Branch string
}
type InspectEntityRequest ¶
type InspectEntityRequest struct {
Repo api.GraphRepositorySelector
Branch string
Selector graphprotocol.EntitySelector
OmitSource bool
SourceBytes int
Limit int
Cursor string
}
type InspectFileRequest ¶
type InspectFileRequest struct {
Repo api.GraphRepositorySelector
Branch, Path, Cursor string
Limit, StartLine, EndLine, SourceBytes int
OmitSource bool
}
type InspectionBackend ¶
type InspectionBackend interface {
Entities(context.Context, graphprotocol.EntitiesRequest) (graphprotocol.EntitiesResponse, error)
Traverse(context.Context, graphprotocol.TraverseRequest) (graphprotocol.TraverseResponse, error)
IndexedFiles(context.Context, graphprotocol.FilesRequest) (graphprotocol.FilesResponse, error)
ValidateGenerations(context.Context, graphprotocol.Scope, []graphprotocol.Generation) error
}
InspectionBackend extends the existing engine without changing legacy wrappers.
type InspectionResponse ¶
type InspectionResponse struct {
Status string `json:"status"`
Entities []graphprotocol.Entity `json:"entities"`
NextCursor string `json:"next_cursor,omitempty"`
File *graphprotocol.IndexedFile `json:"file,omitempty"`
Callers *graphprotocol.TraverseResponse `json:"callers,omitempty"`
Callees *graphprotocol.TraverseResponse `json:"callees,omitempty"`
Structure *graphprotocol.TraverseResponse `json:"structure,omitempty"`
Sources []InspectionSource `json:"sources"`
Generations []graphprotocol.Generation `json:"generations"`
Boundaries []string `json:"boundaries,omitempty"`
Complete bool `json:"complete"`
Coverage string `json:"coverage"`
}
type InspectionSource ¶
type InspectionSource struct {
EntityID string `json:"entity_id,omitempty"`
Path string `json:"path,omitempty"`
Status string `json:"status"`
Precision string `json:"precision,omitempty"`
Content string `json:"content,omitempty"`
IndexedSHA string `json:"indexed_sha,omitempty"`
BlobSHA string `json:"blob_sha,omitempty"`
StartLine int `json:"start_line,omitempty"`
EndLine int `json:"end_line,omitempty"`
Range *graphv2.Location `json:"range,omitempty"`
Selection *SourceSelection `json:"selection,omitempty"`
FileErrors *graphv2.Extension `json:"file_errors,omitempty"`
}
type InventoryFile ¶
type InventoryFile struct {
Path string `json:"path"`
Metadata *graphv2.File `json:"metadata,omitempty"`
}
Metadata is the original producer fact, omitted only by explicit request.
type InventoryGroup ¶
type InventoryGroup struct {
Language string `json:"language"`
Files []InventoryFile `json:"files"`
}
type InventoryTree ¶
type InventoryTree struct {
Name string `json:"name"`
Path string `json:"path"`
File *InventoryFile `json:"file,omitempty"`
Children []*InventoryTree `json:"children,omitempty"`
Truncated bool `json:"truncated,omitempty"`
}
type ListFilesRequest ¶
type ListFilesRequest struct {
Repo api.GraphRepositorySelector
Branch, Directory, Glob, Cursor string
Limit int
}
type ProjectTokensRequest ¶
type ProjectTokensRequest struct {
Repo api.GraphRepositorySelector
Branch string
}
type ProjectTokensResponse ¶
type ProjectTokensResponse struct {
Tokens []string `json:"tokens"`
Generations []graphprotocol.Generation `json:"generations"`
}
type QualifiedNameRequest ¶
type QualifiedNameRequest struct {
AggregateScopeRequest
Pattern string
}
type RepositoryStore ¶
type RepositoryStore interface {
GraphRepositories(context.Context, authn.Principal) ([]repository.Repository, error)
}
type Service ¶
type Service struct {
Store RepositoryStore
Backend graphprotocol.QueryEngine
Files ContentReader
Limits Limits
Observe func(string, string, time.Duration)
// contains filtered or unexported fields
}
func (*Service) AffectedTests ¶
func (s *Service) AffectedTests(ctx context.Context, principal authn.Principal, request AffectedTestsRequest) (graphprotocol.AffectedTestsResponse, error)
func (*Service) AmbiguousReferencedNames ¶
func (s *Service) AmbiguousReferencedNames(ctx context.Context, principal authn.Principal, request AggregateValuesRequest) (graphprotocol.AggregateNamesResponse, error)
func (*Service) BuildTaskContext ¶
func (s *Service) BuildTaskContext(ctx context.Context, principal authn.Principal, request BuildTaskContextRequest) (TaskContext, error)
func (*Service) CallGraph ¶
func (s *Service) CallGraph(ctx context.Context, principal authn.Principal, request EntityAnalysisRequest) (graphprotocol.SubgraphResponse, error)
func (*Service) Capabilities ¶ added in v0.5.0
func (s *Service) Capabilities(ctx context.Context, p authn.Principal, r api.GraphCapabilitiesRequest) (CapabilitiesResponse, error)
func (*Service) CircularDependencies ¶
func (s *Service) CircularDependencies(ctx context.Context, principal authn.Principal, request FileDependencyRequest) (graphprotocol.FileDependencyResponse, error)
func (*Service) Context ¶
func (s *Service) Context(ctx context.Context, principal authn.Principal, request api.GraphContextRequest) (result api.GraphContextResponse, err error)
func (*Service) Discover ¶ added in v0.5.0
func (s *Service) Discover(ctx context.Context, p authn.Principal, r api.GraphDiscoverRequest) (graphprotocol.DiscoverResponse, error)
func (*Service) Explore ¶
func (s *Service) Explore(ctx context.Context, p authn.Principal, r ExploreRequest) (ExploreResponse, error)
Explore composes the existing query and exact-source boundaries in one selected immutable scope. Optional history retains coverage, never authority.
func (*Service) ExplorePublic ¶ added in v0.5.0
func (s *Service) ExplorePublic(ctx context.Context, p authn.Principal, r api.GraphExploreRequest) (ExploreResponse, error)
func (*Service) ExportedSymbols ¶
func (s *Service) ExportedSymbols(ctx context.Context, principal authn.Principal, request EntityFileRequest) (graphprotocol.EntitiesResponse, error)
func (*Service) FanIn ¶
func (s *Service) FanIn(ctx context.Context, principal authn.Principal, request AggregateValuesRequest) (graphprotocol.AggregateCountsResponse, error)
func (*Service) FanOut ¶
func (s *Service) FanOut(ctx context.Context, principal authn.Principal, request AggregateValuesRequest) (graphprotocol.AggregateCountsResponse, error)
func (*Service) FileClassifications ¶
func (s *Service) FileClassifications(ctx context.Context, p authn.Principal, request FileClassificationsRequest) (graphprotocol.FileClassificationResponse, error)
func (*Service) FileDependencies ¶
func (s *Service) FileDependencies(ctx context.Context, principal authn.Principal, request FileDependencyRequest) (graphprotocol.FileDependencyResponse, error)
func (*Service) FileDependencyPairs ¶
func (s *Service) FileDependencyPairs(ctx context.Context, principal authn.Principal, request FileDependencyRequest) (graphprotocol.FileDependencyResponse, error)
func (*Service) FileDependentCounts ¶
func (s *Service) FileDependentCounts(ctx context.Context, principal authn.Principal, request FileDependencyRequest) (graphprotocol.FileDependencyResponse, error)
func (*Service) FileDependents ¶
func (s *Service) FileDependents(ctx context.Context, principal authn.Principal, request FileDependencyRequest) (graphprotocol.FileDependencyResponse, error)
func (*Service) FileInventory ¶
func (s *Service) FileInventory(ctx context.Context, p authn.Principal, r FileInventoryRequest) (FileInventoryResponse, error)
FileInventory is a bounded presentation of indexed files, not source analysis.
func (*Service) FileNodes ¶
func (s *Service) FileNodes(ctx context.Context, principal authn.Principal, request AggregateFilesRequest) (graphprotocol.EntitiesResponse, error)
func (*Service) FileReachCounts ¶
func (s *Service) FileReachCounts(ctx context.Context, principal authn.Principal, request FileDependencyRequest) (graphprotocol.FileDependencyResponse, error)
func (*Service) FilteredSubgraph ¶
func (s *Service) FilteredSubgraph(ctx context.Context, principal authn.Principal, request FilteredSubgraphRequest) (graphprotocol.SubgraphResponse, error)
func (*Service) FindByQualifiedName ¶
func (s *Service) FindByQualifiedName(ctx context.Context, principal authn.Principal, request QualifiedNameRequest) (graphprotocol.EntitiesResponse, error)
func (*Service) FindRelevantContext ¶
func (s *Service) FindRelevantContext(ctx context.Context, principal authn.Principal, request FindRelevantContextRequest) (graphprotocol.RelevantContextResponse, error)
func (*Service) GeneratedFileCount ¶
func (s *Service) GeneratedFileCount(ctx context.Context, p authn.Principal, request GeneratedFileCountRequest) (graphprotocol.GeneratedFileCountResponse, error)
func (*Service) GraphStats ¶
func (s *Service) GraphStats(ctx context.Context, principal authn.Principal, request AggregateScopeRequest) (graphprotocol.GraphStatsResponse, error)
func (*Service) Impact ¶
func (s *Service) Impact(ctx context.Context, principal authn.Principal, request api.GraphImpactRequest) (result api.GraphImpactResponse, err error)
func (*Service) ImpactRadius ¶
func (s *Service) ImpactRadius(ctx context.Context, principal authn.Principal, request EntityAnalysisRequest) (graphprotocol.SubgraphResponse, error)
func (*Service) InspectEntity ¶
func (s *Service) InspectEntity(ctx context.Context, p authn.Principal, r InspectEntityRequest) (InspectionResponse, error)
func (*Service) InspectFile ¶
func (s *Service) InspectFile(ctx context.Context, p authn.Principal, r InspectFileRequest) (InspectionResponse, error)
func (*Service) LanguagesWithExports ¶
func (s *Service) LanguagesWithExports(ctx context.Context, principal authn.Principal, request AggregateValuesRequest) (graphprotocol.AggregateNamesResponse, error)
func (*Service) ListFiles ¶
func (s *Service) ListFiles(ctx context.Context, p authn.Principal, r ListFilesRequest) (graphprotocol.FilesResponse, error)
func (*Service) ListFilesPublic ¶ added in v0.5.0
func (s *Service) ListFilesPublic(ctx context.Context, p authn.Principal, r api.GraphFilesRequest) (graphprotocol.FilesResponse, error)
func (*Service) ModuleAggregation ¶
func (s *Service) ModuleAggregation(ctx context.Context, principal authn.Principal, request AggregateModuleRequest) (graphprotocol.ModuleAggregationResponse, error)
func (*Service) ModuleStructure ¶
func (s *Service) ModuleStructure(ctx context.Context, principal authn.Principal, request AggregateScopeRequest) (graphprotocol.ModuleStructureResponse, error)
func (*Service) NodeMetrics ¶
func (s *Service) NodeMetrics(ctx context.Context, principal authn.Principal, request AggregateNodeRequest) (graphprotocol.NodeMetricsResponse, error)
func (*Service) ProjectNameTokens ¶
func (s *Service) ProjectNameTokens(ctx context.Context, p authn.Principal, r ProjectTokensRequest) (ProjectTokensResponse, error)
ProjectNameTokens returns request-local DiscoveryConfig.ProjectTerms from the selected repository and exact-SHA source, never from artifact metadata or disk. ContentReader already bounds source transfer; only 512 lines / 64 KiB of each manifest may contribute evidence. Truncated/unavailable manifests contribute none.
func (*Service) SymbolCallees ¶ added in v0.7.0
func (s *Service) SymbolCallees(ctx context.Context, p authn.Principal, r api.GraphSymbolCallsRequest) (graphprotocol.SymbolResponse, error)
SymbolCallees is the outgoing counterpart of SymbolCallers.
func (*Service) SymbolCallers ¶ added in v0.7.0
func (s *Service) SymbolCallers(ctx context.Context, p authn.Principal, r api.GraphSymbolCallsRequest) (graphprotocol.SymbolResponse, error)
SymbolCallers lists what calls, imports, instantiates, navigates to, or references each definition of a name.
func (*Service) SymbolImpact ¶ added in v0.7.0
func (s *Service) SymbolImpact(ctx context.Context, p authn.Principal, r api.GraphSymbolImpactRequest) (graphprotocol.SymbolResponse, error)
SymbolImpact is the impact radius of each definition of a name.
func (*Service) TopCallingFiles ¶
func (s *Service) TopCallingFiles(ctx context.Context, principal authn.Principal, request AggregateLimitRequest) (graphprotocol.TopCallingFilesResponse, error)
func (*Service) TopDependedOn ¶
func (s *Service) TopDependedOn(ctx context.Context, principal authn.Principal, request AggregateLimitRequest) (graphprotocol.TopDependedOnResponse, error)
func (*Service) Trace ¶
func (s *Service) Trace(ctx context.Context, principal authn.Principal, request api.GraphTraceRequest) (result api.GraphTraceResponse, err error)
func (*Service) TypeHierarchy ¶ added in v0.6.1
func (s *Service) TypeHierarchy(ctx context.Context, principal authn.Principal, request EntityAnalysisRequest) (graphprotocol.TypeHierarchyResponse, error)
func (*Service) TypeRelations ¶ added in v0.6.1
func (s *Service) TypeRelations(ctx context.Context, principal authn.Principal, request EntityAnalysisRequest) (graphprotocol.TypeRelationsResponse, error)
func (*Service) UnresolvedNamesAmong ¶
func (s *Service) UnresolvedNamesAmong(ctx context.Context, principal authn.Principal, request AggregateValuesRequest) (graphprotocol.AggregateNamesResponse, error)
func (*Service) UnresolvedReferencesFrom ¶
func (s *Service) UnresolvedReferencesFrom(ctx context.Context, principal authn.Principal, request AggregateUnresolvedRequest) (graphprotocol.UnresolvedReferencesResponse, error)
func (*Service) UnresolvedReferencesInFile ¶
func (s *Service) UnresolvedReferencesInFile(ctx context.Context, principal authn.Principal, request AggregateUnresolvedRequest) (graphprotocol.UnresolvedReferencesResponse, error)
func (*Service) Usages ¶
func (s *Service) Usages(ctx context.Context, principal authn.Principal, request EntityAnalysisRequest) (graphprotocol.UsagesResponse, error)
type Snapshot ¶
func ResolveRepository ¶
func ResolveRepository(ctx context.Context, store RepositoryStore, principal authn.Principal, selector api.GraphRepositorySelector, branch string) (Snapshot, error)
type SourceSelection ¶
SourceSelection is an end-exclusive byte range inside the verbatim Content. Range retains the producer's original zero-based UTF-16 coordinates.
type TaskCodeBlock ¶
type TaskCodeBlock struct {
Entity graphprotocol.Entity `json:"entity"`
Path string `json:"path"`
Language string `json:"language,omitempty"`
Range *graphv2.Location `json:"range,omitempty"`
IndexedSHA string `json:"indexed_sha,omitempty"`
BlobSHA string `json:"blob_sha,omitempty"`
StartLine int `json:"start_line,omitempty"`
EndLine int `json:"end_line,omitempty"`
Content string `json:"content,omitempty"`
Status string `json:"status"`
OriginalUTF16Units *int `json:"original_utf16_units,omitempty"`
ReturnedUTF16Units int `json:"returned_utf16_units"`
Truncated bool `json:"truncated"`
Complete bool `json:"complete"`
}
type TaskContext ¶
type TaskContext struct {
Query string `json:"query"`
Summary string `json:"summary"`
Graph graphprotocol.RelevantContextResponse `json:"graph"`
EntryPoints []graphprotocol.DiscoveryMatch `json:"entry_points"`
CodeBlocks []TaskCodeBlock `json:"code_blocks"`
RelatedFiles []string `json:"related_files"`
Stats TaskContextStats `json:"stats"`
Options AppliedBuildTaskContextOptions `json:"options"`
Boundaries []string `json:"boundaries,omitempty"`
Generations []graphprotocol.Generation `json:"generations"`
Complete bool `json:"complete"`
}
type TaskContextStats ¶
type TaskContextStats struct {
NodeCount int `json:"node_count"`
EdgeCount int `json:"edge_count"`
FileCount int `json:"file_count"`
CodeBlockCount int `json:"code_block_count"`
TotalCodeUTF16Units int `json:"total_code_utf16_units"`
SourceReads int `json:"source_reads"`
SourceBytes int `json:"source_bytes"`
}