Documentation
¶
Index ¶
- Constants
- type AffectedTestsRequest
- type AffectedTestsResponse
- type AggregateCount
- type AggregateCountsResponse
- type AggregateLimitRequest
- type AggregateNamesResponse
- type AggregateValuesRequest
- type AnalysisState
- type AppliedRelevantContextOptions
- type BlastFile
- type BlastSummary
- type Boundary
- type CallingFile
- type ContextRequest
- type ContextResponse
- type ContextSnapshot
- type DependedOn
- type DerivedOverride
- type DiscoverRequest
- type DiscoverResponse
- type DiscoveryConfig
- type DiscoveryMatch
- type EntitiesRequest
- type EntitiesResponse
- type Entity
- type EntityFilter
- type EntityImpactRequest
- type EntityRequest
- type EntitySelector
- type Evidence
- type FileClassification
- type FileClassificationRequest
- type FileClassificationResponse
- type FileDependencyCount
- type FileDependencyPair
- type FileDependencyRequest
- type FileDependencyResponse
- type FileEntityRequest
- type FileNodesRequest
- type FilesRequest
- type FilesResponse
- type FilteredSubgraphRequest
- type GeneratedFileCountRequest
- type GeneratedFileCountResponse
- type Generation
- type GraphStats
- type GraphStatsResponse
- type HierarchyEntry
- type HierarchyRows
- type ImpactRequest
- type ImpactResponse
- type IndexedFile
- type ModuleAggregationRequest
- type ModuleAggregationResponse
- type ModuleAssignment
- type ModuleDirectory
- type ModuleLink
- type ModulePair
- type ModuleStructureResponse
- type NameSelector
- type NodeMetrics
- type NodeMetricsRequest
- type NodeMetricsResponse
- type Position
- type QualifiedNameRequest
- type QueryEngine
- type RelatedEntities
- type Relationship
- type RelevantContextOptions
- type RelevantContextRequest
- type RelevantContextResponse
- type RepositorySnapshot
- type Scope
- type ScopeRequest
- type SegmentMatch
- type SegmentRequest
- type SegmentResponse
- type SubgraphResponse
- type Symbol
- type TopCallingFilesResponse
- type TopDependedOnResponse
- type TraceRequest
- type TraceResponse
- type TraverseRequest
- type TraverseResponse
- type TypeHierarchyRequest
- type TypeHierarchyResponse
- type TypeRelationsRequest
- type TypeRelationsResponse
- type UnresolvedReference
- type UnresolvedReferencesRequest
- type UnresolvedReferencesResponse
- type Usage
- type UsagesResponse
Constants ¶
const ( AnalysisFreshnessCurrent = "current" AnalysisCoverageNotAssessed = "not_assessed" )
const ( StatusFound = "found" StatusAmbiguous = "ambiguous" StatusNotFound = "not_found" StatusOK = "ok" StatusNoPath = "no_path" )
const ( TypeKnowledgeRecorded = "recorded" TypeKnowledgeUnknown = "unknown" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AffectedTestsRequest ¶
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 AggregateCountsResponse ¶
type AggregateCountsResponse struct {
Counts []AggregateCount `json:"counts"`
Generations []Generation `json:"generations"`
}
type AggregateLimitRequest ¶
type AggregateNamesResponse ¶
type AggregateNamesResponse struct {
Names []string `json:"names"`
Generations []Generation `json:"generations"`
}
type AggregateValuesRequest ¶
type AnalysisState ¶
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 BlastSummary ¶
type CallingFile ¶
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 ¶
ContextSnapshot is internal legacy source-composition state, never public JSON.
type DependedOn ¶
type DerivedOverride ¶ added in v0.6.1
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 EntityFilter ¶
type EntityImpactRequest ¶
type EntityRequest ¶
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 FileClassification ¶
type FileClassificationResponse ¶
type FileClassificationResponse struct {
Files []FileClassification `json:"files"`
Generations []Generation `json:"generations"`
}
type FileDependencyCount ¶
type FileDependencyPair ¶
type FileDependencyRequest ¶
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 FileNodesRequest ¶
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 ModuleAggregationResponse ¶
type ModuleAggregationResponse struct {
Links []ModuleLink `json:"links"`
Pairs []ModulePair `json:"pairs"`
Generations []Generation `json:"generations"`
}
type ModuleAssignment ¶
type ModuleDirectory ¶
type ModuleLink ¶
type ModulePair ¶
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 NodeMetricsRequest ¶
type NodeMetricsResponse ¶
type NodeMetricsResponse struct {
Metrics NodeMetrics `json:"metrics"`
Generations []Generation `json:"generations"`
}
type QualifiedNameRequest ¶
type QueryEngine ¶
type QueryEngine interface {
Context(context.Context, ContextRequest) (ContextResponse, error)
Impact(context.Context, ImpactRequest) (ImpactResponse, error)
Trace(context.Context, TraceRequest) (TraceResponse, error)
}
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 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 SegmentRequest ¶
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 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 TraceResponse ¶
type TraverseRequest ¶
type TraverseResponse ¶
type TypeHierarchyRequest ¶ added in v0.6.1
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 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 UnresolvedReferencesResponse ¶
type UnresolvedReferencesResponse struct {
References []UnresolvedReference `json:"references"`
Generations []Generation `json:"generations"`
}
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"`
}