package repository import ( "context" "github.com/user/obsidian-mcp-server/internal/domain" ) type VaultStructure struct { Name string `json:"name"` Path string `json:"path"` Type string `json:"type"` // "file" or "directory" Children []*VaultStructure `json:"children,omitempty"` } type MostLinkedNote struct { Path string `json:"path"` Count int `json:"count"` } type VaultStats struct { TotalNotes int `json:"total_notes"` TotalWords int `json:"total_words"` TotalLinks int `json:"total_links"` TotalTags int `json:"total_tags"` AvgNoteLength int `json:"avg_note_length"` MostLinked []*MostLinkedNote `json:"most_linked"` OrphanedNotes int `json:"orphaned_notes"` LastIndexed string `json:"last_indexed"` } type VaultRepository interface { GetStats(ctx context.Context) (*VaultStats, error) GetStructure(ctx context.Context, maxDepth int) (*VaultStructure, error) FindOrphaned(ctx context.Context, excludePaths []string) ([]string, error) GetMostLinked(ctx context.Context, limit int) ([]*MostLinkedNote, error) Initialize(ctx context.Context, vault *domain.Vault) error Rebuild(ctx context.Context) error }