feat: Implement foundation layer with domain entities and repository interfaces

- Add complete domain layer: Note, Vault, WikiLink, Tag, Frontmatter, Graph entities
- Implement repository interfaces for data access abstraction
- Create comprehensive configuration system with YAML and env support
- Add CLI entry point with signal handling and graceful shutdown
- Fix mermaid diagram syntax in design.md (array notation)
- Add CLAUDE.md for development guidance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andrey Epifancev
2025-10-08 10:22:28 +04:00
parent b655c58ba1
commit da289d4a7e
24 changed files with 1840 additions and 7 deletions

View File

@@ -0,0 +1,36 @@
package repository
import (
"context"
"github.com/user/obsidian-mcp-server/internal/domain"
)
type SearchResult struct {
Path string `json:"path"`
Score float64 `json:"score"`
Matches []*SearchMatch `json:"matches"`
}
type SearchMatch struct {
Line int `json:"line"`
Content string `json:"content"`
ContextBefore string `json:"context_before"`
ContextAfter string `json:"context_after"`
}
type SearchQuery struct {
Query string
MaxResults int
CaseSensitive bool
UseRegex bool
ContextLines int
}
type SearchIndex interface {
Index(ctx context.Context, note *domain.Note) error
Remove(ctx context.Context, path string) error
Search(ctx context.Context, query *SearchQuery) ([]*SearchResult, error)
Rebuild(ctx context.Context, notes []*domain.Note) error
Clear() error
}