package repository import ( "context" "github.com/user/obsidian-mcp-server/internal/domain" ) type GraphNode struct { Path string `json:"path"` Title string `json:"title"` } type GraphEdge struct { From string `json:"from"` To string `json:"to"` } type GraphData struct { Nodes []*GraphNode `json:"nodes"` Edges []*GraphEdge `json:"edges"` } type BacklinkInfo struct { From string `json:"from"` Context string `json:"context"` Line int `json:"line"` } type GraphIndex interface { AddNote(ctx context.Context, note *domain.Note) error RemoveNote(ctx context.Context, path string) error GetBacklinks(ctx context.Context, path string) ([]*BacklinkInfo, error) GetOutlinks(ctx context.Context, path string) ([]string, error) GetConnected(ctx context.Context, path string, depth int) (*GraphData, error) FindBrokenLinks(ctx context.Context, notePath string) ([]string, error) UpdateLinks(ctx context.Context, oldPath, newPath string) error Rebuild(ctx context.Context, notes []*domain.Note) error Clear() error }