Documentation
¶
Index ¶
- func Register(s *mcp.Server, sc DocumentScanner, graph GraphStore, search ContentSearcher, ...)
- type AddObservationsArgs
- type AddObservationsResult
- type AuditReader
- type ContentSearcher
- type CreateEntitiesArgs
- type CreateEntitiesResult
- type CreateRelationsArgs
- type CreateRelationsResult
- type DeleteEntitiesArgs
- type DeleteObservationsArgs
- type DeleteRelationsArgs
- type DiscoverMCPServersArgs
- type DiscoverMCPServersResult
- type DocAccess
- type DocMetrics
- type DocumentScanner
- type ExportGraphArgs
- type ExportGraphResult
- type FindPathArgs
- type FindPathResult
- type GetAuditSummaryArgs
- type GetAuditSummaryResult
- type GetFileContentArgs
- type GraphAuditLogger
- func (a *GraphAuditLogger) AddObservations(observations []memory.Observation) ([]memory.Observation, error)
- func (a *GraphAuditLogger) CreateEntities(entities []memory.Entity) ([]memory.Entity, error)
- func (a *GraphAuditLogger) CreateRelations(relations []memory.Relation) ([]memory.Relation, error)
- func (a *GraphAuditLogger) DeleteEntities(entityNames []string) error
- func (a *GraphAuditLogger) DeleteObservations(deletions []memory.Observation) error
- func (a *GraphAuditLogger) DeleteRelations(relations []memory.Relation) error
- func (a *GraphAuditLogger) EntityCount() (int64, error)
- func (a *GraphAuditLogger) EntityTypeCounts() (map[string]int64, error)
- func (a *GraphAuditLogger) FindPath(from, to string, maxDepth int) ([]memory.PathEdge, error)
- func (a *GraphAuditLogger) GetIntegrationMap(ctx context.Context, service string, depth int) (memory.IntegrationMap, error)
- func (a *GraphAuditLogger) ListEntities(entityType string) (memory.KnowledgeGraph, error)
- func (a *GraphAuditLogger) ListRelations(relationType, fromEntity string) ([]memory.Relation, error)
- func (a *GraphAuditLogger) OpenNodes(names []string) (memory.KnowledgeGraph, error)
- func (a *GraphAuditLogger) OpenNodesFiltered(names []string, includeArchived bool) (memory.KnowledgeGraph, error)
- func (a *GraphAuditLogger) ReadGraph() (memory.KnowledgeGraph, error)
- func (a *GraphAuditLogger) SearchNodes(query string) (memory.KnowledgeGraph, error)
- func (a *GraphAuditLogger) SearchNodesFiltered(query string, includeArchived bool) (memory.KnowledgeGraph, error)
- func (a *GraphAuditLogger) TraverseGraph(entity, relationType, direction string, maxDepth int) ([]memory.TraverseNode, []memory.TraverseEdge, error)
- func (a *GraphAuditLogger) UpdateEntity(oldName, newName, newType string) error
- type GraphStore
- type IngestURLArgs
- type IngestURLResult
- type IntegrationEdgeJSON
- type IntegrationMapArgs
- type IntegrationMapResult
- type ListEntitiesArgs
- type ListRelationsArgs
- type ListRelationsResult
- type ListReposArgs
- type ListReposResult
- type MCPServerResult
- type OpenNodesArgs
- type QueryAuditLogArgs
- type QueryAuditLogResult
- type RawContentResult
- type ScanStatusArgs
- type ScanStatusResult
- type SearchContentArgs
- type SearchContentResult
- type SearchDocsArgs
- type SearchDocsResult
- type SearchNodesArgs
- type SemanticSearch
- type SemanticSearchArgs
- type SemanticSearchResult
- type SkippedObservation
- type ToolMetrics
- type TraverseGraphArgs
- type TraverseGraphResult
- type TriggerScanArgs
- type TriggerScanResult
- type UpdateEntityArgs
- type UpdateEntityResult
- type UsageStatsArgs
- type UsageStatsResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(s *mcp.Server, sc DocumentScanner, graph GraphStore, search ContentSearcher, semantic SemanticSearch, metrics *ToolMetrics, docMetrics *DocMetrics, cache *memory.ContentCache, readOnly bool, auditReader AuditReader)
Types ¶
type AddObservationsArgs ¶
type AddObservationsArgs struct {
Observations []memory.Observation `json:"observations" jsonschema:"observations to add"`
}
type AddObservationsResult ¶
type AddObservationsResult struct {
Observations []memory.Observation `json:"observations"`
Skipped []SkippedObservation `json:"skipped,omitempty"`
}
type AuditReader ¶ added in v0.1.0
type AuditReader interface {
Query(ctx context.Context, filter memory.AuditFilter) ([]memory.AuditEvent, int64, error)
Summary(ctx context.Context, window time.Duration) (memory.AuditSummary, error)
}
type ContentSearcher ¶
type CreateEntitiesArgs ¶
type CreateEntitiesResult ¶
type CreateEntitiesResult struct {
Entities []memory.Entity `json:"entities"`
Skipped []SkippedObservation `json:"skipped,omitempty"`
}
type CreateRelationsArgs ¶
type CreateRelationsResult ¶
type DeleteEntitiesArgs ¶
type DeleteObservationsArgs ¶
type DeleteObservationsArgs struct {
Deletions []memory.Observation `json:"deletions" jsonschema:"observations to delete"`
}
type DeleteRelationsArgs ¶
type DiscoverMCPServersArgs ¶ added in v0.1.0
type DiscoverMCPServersArgs struct {
Repo string `json:"repo,omitzero" jsonschema:"Filter results to a specific repository name."`
ToolName string `` /* 181-byte string literal not displayed */
Transport string `json:"transport,omitzero" jsonschema:"Filter by transport type: stdio, http, or sse."`
Limit int `json:"limit,omitzero" jsonschema:"Maximum number of servers to return (default 20, max 100)."`
}
type DiscoverMCPServersResult ¶ added in v0.1.0
type DiscoverMCPServersResult struct {
Servers []MCPServerResult `json:"servers"`
Total int `json:"total"`
}
type DocMetrics ¶
type DocMetrics struct {
// contains filtered or unexported fields
}
func NewDocMetrics ¶
func NewDocMetrics() *DocMetrics
func (*DocMetrics) Record ¶
func (d *DocMetrics) Record(repo, path string)
func (*DocMetrics) TopN ¶
func (d *DocMetrics) TopN(n int) []DocAccess
type DocumentScanner ¶
type ExportGraphArgs ¶ added in v0.1.0
type ExportGraphResult ¶ added in v0.1.0
type FindPathArgs ¶
type FindPathResult ¶
type GetAuditSummaryArgs ¶ added in v0.1.0
type GetAuditSummaryArgs struct {
WindowHours int `` /* 135-byte string literal not displayed */
}
type GetAuditSummaryResult ¶ added in v0.1.0
type GetAuditSummaryResult struct {
WindowHours int `json:"window_hours"`
Summary memory.AuditSummary `json:"summary"`
}
type GetFileContentArgs ¶
type GraphAuditLogger ¶
type GraphAuditLogger struct {
// contains filtered or unexported fields
}
func NewGraphAuditLogger ¶
func NewGraphAuditLogger(inner GraphStore, agentFn func() string, store memory.AuditStore) *GraphAuditLogger
func (*GraphAuditLogger) AddObservations ¶
func (a *GraphAuditLogger) AddObservations(observations []memory.Observation) ([]memory.Observation, error)
func (*GraphAuditLogger) CreateEntities ¶
func (*GraphAuditLogger) CreateRelations ¶
func (*GraphAuditLogger) DeleteEntities ¶
func (a *GraphAuditLogger) DeleteEntities(entityNames []string) error
func (*GraphAuditLogger) DeleteObservations ¶
func (a *GraphAuditLogger) DeleteObservations(deletions []memory.Observation) error
func (*GraphAuditLogger) DeleteRelations ¶
func (a *GraphAuditLogger) DeleteRelations(relations []memory.Relation) error
func (*GraphAuditLogger) EntityCount ¶
func (a *GraphAuditLogger) EntityCount() (int64, error)
func (*GraphAuditLogger) EntityTypeCounts ¶
func (a *GraphAuditLogger) EntityTypeCounts() (map[string]int64, error)
func (*GraphAuditLogger) GetIntegrationMap ¶
func (a *GraphAuditLogger) GetIntegrationMap(ctx context.Context, service string, depth int) (memory.IntegrationMap, error)
func (*GraphAuditLogger) ListEntities ¶
func (a *GraphAuditLogger) ListEntities(entityType string) (memory.KnowledgeGraph, error)
func (*GraphAuditLogger) ListRelations ¶
func (a *GraphAuditLogger) ListRelations(relationType, fromEntity string) ([]memory.Relation, error)
func (*GraphAuditLogger) OpenNodes ¶
func (a *GraphAuditLogger) OpenNodes(names []string) (memory.KnowledgeGraph, error)
func (*GraphAuditLogger) OpenNodesFiltered ¶
func (a *GraphAuditLogger) OpenNodesFiltered(names []string, includeArchived bool) (memory.KnowledgeGraph, error)
func (*GraphAuditLogger) ReadGraph ¶
func (a *GraphAuditLogger) ReadGraph() (memory.KnowledgeGraph, error)
func (*GraphAuditLogger) SearchNodes ¶
func (a *GraphAuditLogger) SearchNodes(query string) (memory.KnowledgeGraph, error)
func (*GraphAuditLogger) SearchNodesFiltered ¶
func (a *GraphAuditLogger) SearchNodesFiltered(query string, includeArchived bool) (memory.KnowledgeGraph, error)
func (*GraphAuditLogger) TraverseGraph ¶
func (a *GraphAuditLogger) TraverseGraph(entity, relationType, direction string, maxDepth int) ([]memory.TraverseNode, []memory.TraverseEdge, error)
func (*GraphAuditLogger) UpdateEntity ¶
func (a *GraphAuditLogger) UpdateEntity(oldName, newName, newType string) error
type GraphStore ¶
type GraphStore interface {
CreateEntities(entities []memory.Entity) ([]memory.Entity, error)
CreateRelations(relations []memory.Relation) ([]memory.Relation, error)
AddObservations(observations []memory.Observation) ([]memory.Observation, error)
DeleteEntities(entityNames []string) error
DeleteObservations(deletions []memory.Observation) error
DeleteRelations(relations []memory.Relation) error
ReadGraph() (memory.KnowledgeGraph, error)
SearchNodes(query string) (memory.KnowledgeGraph, error)
SearchNodesFiltered(query string, includeArchived bool) (memory.KnowledgeGraph, error)
OpenNodes(names []string) (memory.KnowledgeGraph, error)
OpenNodesFiltered(names []string, includeArchived bool) (memory.KnowledgeGraph, error)
EntityCount() (int64, error)
EntityTypeCounts() (map[string]int64, error)
TraverseGraph(entity, relationType, direction string, maxDepth int) ([]memory.TraverseNode, []memory.TraverseEdge, error)
GetIntegrationMap(ctx context.Context, service string, depth int) (memory.IntegrationMap, error)
ListEntities(entityType string) (memory.KnowledgeGraph, error)
ListRelations(relationType, fromEntity string) ([]memory.Relation, error)
FindPath(from, to string, maxDepth int) ([]memory.PathEdge, error)
UpdateEntity(oldName, newName, newType string) error
}
type IngestURLArgs ¶ added in v0.1.0
type IngestURLArgs struct {
URL string `json:"url" jsonschema:"required,The full URL to fetch and ingest (must start with http:// or https://)."`
EntityName string `json:"entity_name,omitempty" jsonschema:"Optional name for the graph entity. Defaults to the page title if omitted."`
EntityType string `json:"entity_type,omitempty" jsonschema:"Entity type to assign (e.g. 'api', 'service', 'doc'). Defaults to 'doc'."`
}
type IngestURLResult ¶ added in v0.1.0
type IntegrationEdgeJSON ¶
type IntegrationMapArgs ¶
type IntegrationMapResult ¶
type IntegrationMapResult struct {
Service string `json:"service"`
Publishes []IntegrationEdgeJSON `json:"publishes"`
Subscribes []IntegrationEdgeJSON `json:"subscribes"`
ExposesAPI []IntegrationEdgeJSON `json:"exposes_api"`
ProvidesGRPC []IntegrationEdgeJSON `json:"provides_grpc"`
GRPCDeps []IntegrationEdgeJSON `json:"grpc_deps"`
Calls []IntegrationEdgeJSON `json:"calls"`
Coverage string `` /* 138-byte string literal not displayed */
}
type ListEntitiesArgs ¶
type ListEntitiesArgs struct {
EntityType string `` /* 202-byte string literal not displayed */
}
type ListRelationsArgs ¶
type ListRelationsResult ¶
type ListReposArgs ¶
type ListReposArgs struct {
FileType string `` /* 221-byte string literal not displayed */
}
type ListReposResult ¶
type ListReposResult struct {
Repos []repoSummary `json:"repos" jsonschema:"List of repositories with documentation"`
}
type MCPServerResult ¶ added in v0.1.0
type OpenNodesArgs ¶
type QueryAuditLogArgs ¶ added in v0.1.0
type QueryAuditLogArgs struct {
Agent string `json:"agent,omitempty" jsonschema:"Filter events by agent name (e.g. claude-desktop, indexer-bot)."`
Tool string `json:"tool,omitempty" jsonschema:"Filter events by MCP tool name (e.g. create_entities, delete_entities)."`
Operation string `json:"operation,omitempty" jsonschema:"Filter by operation type: create, delete, update, or add."`
Outcome string `json:"outcome,omitempty" jsonschema:"Filter by outcome: ok or error."`
Since string `json:"since,omitempty" jsonschema:"Return only events after this RFC3339 timestamp (e.g. 2026-04-21T00:00:00Z)."`
Limit int `json:"limit,omitempty" jsonschema:"Maximum events to return (default 50, max 500)."`
}
type QueryAuditLogResult ¶ added in v0.1.0
type QueryAuditLogResult struct {
Events []memory.AuditEvent `json:"events"`
Total int64 `json:"total"`
}
type RawContentResult ¶
type RawContentResult struct {
Content string `json:"content" jsonschema:"The raw text content of the file."`
}
type ScanStatusArgs ¶
type ScanStatusArgs struct{}
type ScanStatusResult ¶
type ScanStatusResult struct {
Scanning bool `json:"scanning"`
LastScanAt time.Time `json:"last_scan_at"`
RepoCount int `json:"repo_count"`
ContentIndexed int64 `json:"content_indexed"`
GraphEntities int64 `json:"graph_entities"`
ContentEnabled bool `json:"content_enabled"`
EntityBreakdown map[string]int64 `json:"entity_breakdown,omitempty"`
SearchMode string `json:"search_mode,omitempty"`
ReadOnly bool `json:"read_only"`
}
type SearchContentArgs ¶
type SearchContentResult ¶
type SearchContentResult struct {
Matches []memory.ContentMatch `json:"matches" jsonschema:"List of files containing the query term, with a snippet showing the matched context."`
}
type SearchDocsArgs ¶
type SearchDocsResult ¶
type SearchNodesArgs ¶
type SemanticSearch ¶
type SemanticSearch interface {
Enabled() bool
SearchDocs(ctx context.Context, query, repo string, topK int) ([]embeddings.DocResult, int, error)
SearchEntities(ctx context.Context, query string, topK int) ([]embeddings.EntityResult, int, error)
ScheduleIndexEntities(names []string)
IndexDocs(ctx context.Context, repo string)
}
type SemanticSearchArgs ¶
type SemanticSearchArgs struct {
Query string `json:"query" jsonschema:"Natural-language search query. Required."`
Target string `` /* 139-byte string literal not displayed */
TopK int `json:"top_k,omitempty" jsonschema:"Maximum number of results per target (default 5, max 20)."`
Repo string `` /* 130-byte string literal not displayed */
}
type SemanticSearchResult ¶
type SemanticSearchResult struct {
ContentResults []embeddings.DocResult `json:"content_results,omitempty"`
EntityResults []embeddings.EntityResult `json:"entity_results,omitempty"`
StaleDocs int `json:"stale_docs"`
StaleEntities int `json:"stale_entities"`
}
type SkippedObservation ¶
type ToolMetrics ¶
type ToolMetrics struct {
// contains filtered or unexported fields
}
func NewToolMetrics ¶
func NewToolMetrics() *ToolMetrics
func (*ToolMetrics) Record ¶
func (m *ToolMetrics) Record(toolName string)
func (*ToolMetrics) Snapshot ¶
func (m *ToolMetrics) Snapshot() map[string]int64
type TraverseGraphArgs ¶
type TraverseGraphResult ¶
type TraverseGraphResult struct {
StartEntity string `json:"start_entity"`
Nodes []memory.TraverseNode `json:"nodes"`
Edges []memory.TraverseEdge `json:"edges"`
TotalFound int `json:"total_found"`
}
type TriggerScanArgs ¶
type TriggerScanArgs struct{}
type TriggerScanResult ¶
type UpdateEntityArgs ¶
type UpdateEntityArgs struct {
Name string `json:"name" jsonschema:"Current name of the entity to update. Must match exactly."`
NewName string `` /* 157-byte string literal not displayed */
NewType string `json:"new_type,omitempty" jsonschema:"New entity type (e.g. 'service', 'team', 'api'). Omit to keep the current type."`
}
type UpdateEntityResult ¶
type UsageStatsArgs ¶
type UsageStatsArgs struct{}
type UsageStatsResult ¶
Source Files
¶
- add_observations.go
- audit.go
- create_entities.go
- create_relations.go
- delete_entities.go
- delete_observations.go
- delete_relations.go
- discover_mcp_servers.go
- export_graph.go
- find_path.go
- get_audit_summary.go
- get_file_content.go
- get_integration_map.go
- get_scan_status.go
- get_usage_stats.go
- graph_guard.go
- ingest_url.go
- list_entities.go
- list_relations.go
- list_repos.go
- metrics.go
- open_nodes.go
- ports.go
- query_audit_log.go
- read_graph.go
- search_content.go
- search_docs.go
- search_nodes.go
- semantic_search.go
- tools.go
- traverse_graph.go
- trigger_scan.go
- update_entity.go
Click to show internal directories.
Click to hide internal directories.