199 Commits

Author SHA1 Message Date
5caa652c84 docs: add tools coverage implementation summary 2025-10-25 22:14:29 -04:00
00deda4347 test: add vault-tools defensive code coverage
- Added test for getFolderWaypoint file read error handling (line 777)
- Documented unreachable defensive code in stat() (lines 452-456)
- Documented unreachable defensive code in exists() (lines 524-528)
- Added istanbul ignore comments for unreachable defensive returns

Analysis:
- Lines 452-456 and 524-528 are unreachable because getAbstractFileByPath
  only returns TFile, TFolder, or null - all cases are handled before
  the defensive fallback code
- Line 777 is now covered by testing file read errors in getFolderWaypoint

Coverage: vault-tools.ts now at 100% statement coverage (99.8% tools overall)
Test count: 84 vault-tools tests, 505 total tests passing
2025-10-25 22:14:29 -04:00
c54c417671 test: add vault-tools edge case tests
- Add test for list() skipping root folder (line 267)
- Add test for list() normalizing aliases from string to array (line 325)
- Add test for list() handling array aliases (line 325)
- Add test for getFolderMetadata() handling folder with mtime (line 374)
- Add test for getFolderMetadata() handling folder without mtime
- Add test for list() on non-root path (line 200)
- Add test for search() stopping at maxResults=1 on file boundary (line 608)
- Add test for search() stopping at maxResults=1 within file (line 620)
- Add test for search() adjusting snippet for long lines (line 650)

Coverage improved from 95.66% to 98.19% for vault-tools.ts
2025-10-25 22:14:29 -04:00
8e1c2b7b98 test: add vault-tools invalid path and glob tests
Added targeted test cases to improve vault-tools.ts coverage:

- Test for listNotes() with invalid vault path (covers line 76)
- Test for list() with glob excludes filtering (covers line 272)
- Test for search() with glob include/exclude patterns (covers lines 596-597)

Coverage improved from 94.22% to 95.66% for vault-tools.ts.
All tests passing (75 tests).
2025-10-25 22:14:29 -04:00
7f49eff6e8 test: add note-tools Excalidraw and frontmatter tests
Add test for read_excalidraw with includeCompressed option to cover
line 647. Add test for update_frontmatter on files without existing
frontmatter to cover line 771.

Coverage for note-tools.ts now at 100% line coverage (99.6% statement,
92.82% branch, 90.9% function).
2025-10-25 22:14:29 -04:00
5f36c22e48 test: add note-tools folder-not-file error tests
Add 5 tests for folder-not-file error cases:
- read_note when path is a folder (line 61-66 in source)
- rename_file when source path is a folder (line 377)
- rename_file when destination path is a folder (line 408)
- read_excalidraw when path is a folder (line 590)
- update_frontmatter when path is a folder (line 710)
- update_sections when path is a folder (line 836)

All tests verify error message uses ErrorMessages.notAFile()
Coverage for note-tools.ts increased to 98%
2025-10-25 22:14:29 -04:00
3082a6d23a test: add note-tools conflict resolution test
Add test case for conflict resolution loop in createNote when multiple
numbered file variants exist. Test verifies the loop correctly increments
counter (lines 238-239) by creating file 3.md when file.md, file 1.md,
and file 2.md already exist.

Coverage improvement: note-tools.ts 96.01% -> 96.81%
Lines 238-239 now covered.
2025-10-25 22:14:29 -04:00
b047e4d7d2 docs: add implementation summary for utils coverage 2025-10-25 22:14:29 -04:00
99e05bbced test: add comprehensive link-utils tests
- Add 46 comprehensive tests for LinkUtils covering all methods
- Test parseWikilinks() with various formats, aliases, headings, paths
- Test resolveLink() with MetadataCache integration and edge cases
- Test findSuggestions() with scoring algorithms and fuzzy matching
- Test getBacklinks() with linked/unlinked mentions and snippet extraction
- Test validateWikilinks() with resolved/unresolved link validation
- Achieve 100% statement, function, and line coverage on link-utils.ts
2025-10-25 22:14:29 -04:00
303b5cf8b8 test: add comprehensive search-utils tests 2025-10-25 22:14:29 -04:00
f9634a7b2a test: add comprehensive waypoint-utils tests
- Test extractWaypointBlock() with valid/invalid waypoints, unclosed blocks, multiple links
- Test hasWaypointMarker() with all marker combinations
- Test isFolderNote() with basename match, waypoint marker, both, neither, file read errors
- Test wouldAffectWaypoint() detecting removal, content changes, acceptable moves
- Test getParentFolderPath() and getBasename() helper methods
- Achieve 100% coverage on waypoint-utils.ts (52 tests)
2025-10-25 22:14:29 -04:00
3360790149 refactor: update VaultTools to pass adapters to utils
Updated VaultTools to use adapters for all utility method calls:
- SearchUtils.searchWaypoints() now receives vault adapter
- WaypointUtils.isFolderNote() now receives vault adapter
- LinkUtils.validateWikilinks() now receives vault and metadata adapters
- LinkUtils.resolveLink() now receives vault and metadata adapters
- LinkUtils.getBacklinks() now receives vault and metadata adapters

Removed App dependency from VaultTools constructor - now only requires
vault and metadata adapters. Updated factory and all test files accordingly.

All tests passing (336/336).
2025-10-25 22:14:29 -04:00
360f4269f2 refactor: link-utils to use adapters 2025-10-25 22:14:29 -04:00
45f4184b08 refactor: search-utils to use IVaultAdapter 2025-10-25 22:14:29 -04:00
fdf1b4c69b refactor: waypoint-utils to use IVaultAdapter
- Change WaypointUtils.isFolderNote() signature to accept IVaultAdapter
  instead of App
- Update method body to use vault.read() instead of app.vault.read()
- Callers will be updated in next commit
2025-10-25 22:14:29 -04:00
26b8c2bd77 test: add comprehensive frontmatter-utils tests
Add 82 comprehensive tests for frontmatter-utils.ts achieving 96.58% coverage.

Test coverage:
- extractFrontmatter(): All delimiters, line endings, parse errors, edge cases
- extractFrontmatterSummary(): Field extraction, normalization, null handling
- hasFrontmatter(): Quick detection with various formats
- serializeFrontmatter(): All data types, special characters, quoting rules
- parseExcalidrawMetadata(): JSON extraction, compression detection, error handling

Mock parseYaml from obsidian module for isolated testing.

Uncovered lines (253-255, 310) are unreachable defensive code paths.
2025-10-25 22:14:29 -04:00
5023a4dc7e test: add comprehensive glob-utils tests
- Test all glob pattern types: *, **, ?, [abc], {a,b}
- Test edge cases: unclosed brackets, unclosed braces
- Test all public methods: matches(), matchesIncludes(), matchesExcludes(), shouldInclude()
- Test special regex character escaping: . / ( ) + ^ $ | \
- Test complex pattern combinations and real-world scenarios
- Achieve 100% coverage on glob-utils.ts (52 tests)
2025-10-25 22:14:29 -04:00
4ab3897712 Merge branch 'master' of https://git.prettyhefty.com/Bill/obsidian-mcp-plugin 2025-10-25 20:30:22 -04:00
b160c9d37b Set notification manager 2025-10-25 20:30:20 -04:00
ffc97ec4b9 chore: add coverage directory to gitignore 2025-10-20 07:20:13 -04:00
b2c8a95a6e docs: add implementation summary for test coverage achievement
Summary of dependency injection refactoring:
- 96% coverage on NoteTools
- 94% coverage on VaultTools
- 236 tests passing
- Adapter pattern fully implemented
- Factory functions for production usage

Architecture improvements:
- IVaultAdapter, IMetadataCacheAdapter, IFileManagerAdapter interfaces
- Clean separation between business logic and Obsidian API
- Simplified test mocking with adapter pattern
- Type-safe dependency injection throughout
improved-test-coverage
2025-10-20 00:21:58 -04:00
5760ac9b8b test: add comprehensive VaultTools coverage tests
Added extensive test coverage for VaultTools to increase coverage from 54.9% to 93.83%:

getVaultInfo tests:
- Return vault info with total notes and size
- Handle empty vault
- Handle files with missing stat info
- Handle errors gracefully
- Format large file sizes correctly (KB, MB, GB)

search tests:
- Search for literal text
- Search with regex pattern
- Handle invalid regex pattern
- Filter by folder
- Respect maxResults limit
- Handle file read errors gracefully
- Handle case sensitive search
- Extract snippets correctly
- Handle zero-width regex matches
- Handle general search errors

Waypoint tests (searchWaypoints, getFolderWaypoint, isFolderNote):
- Search for waypoints in vault
- Filter waypoints by folder
- Extract waypoint from file
- Detect folder notes
- Handle file not found errors
- Handle general errors

resolveWikilink tests:
- Resolve wikilink successfully
- Provide suggestions for unresolved links
- Handle errors gracefully
- Handle invalid source path

getBacklinks unlinked mentions tests:
- Find unlinked mentions
- Skip files that already have linked backlinks
- Skip target file itself in unlinked mentions
- Not return unlinked mentions when includeUnlinked is false

list edge case tests:
- Handle invalid path
- Handle non-existent folder
- Handle path pointing to file instead of folder
- Handle cursor not found in pagination

validateWikilinks edge case tests:
- Handle invalid path
2025-10-20 00:20:12 -04:00
2e30b81f01 test: comprehensive coverage for NoteTools
Add extensive test suite for note-tools.ts covering all major operations
and error paths. Improves statement coverage from 13.94% to 96.01%.

Tests added:
- readNote: success, errors, frontmatter parsing
- createNote: success, conflict strategies (error/overwrite/rename), parent folder creation
- updateNote: success, errors, waypoint protection
- deleteNote: soft/permanent delete, dry run, version checking
- renameFile: success, errors, version checking, parent folder creation
- readExcalidraw: success, non-Excalidraw files, errors
- updateFrontmatter: success, field removal, version checking
- updateSections: success, invalid ranges, version checking
- Path validation for all methods
- Empty path validation for all methods

Mock enhancements:
- Added modify, delete, trash methods to VaultAdapter mock
- Added parseYaml function to Obsidian mock for frontmatter testing

Coverage improvements for note-tools.ts:
- Statements: 13.94% -> 96.01% (+82.07%)
- Branches: 5.1% -> 88.44% (+83.34%)
- Functions: 27.27% -> 90.9% (+63.63%)
- Lines: 13.94% -> 96.4% (+82.46%)
2025-10-20 00:13:03 -04:00
f5a671e625 refactor: migrate parent-folder-detection tests to mock adapters
Update parent-folder-detection.test.ts to use the new mock adapter
pattern (createMockVaultAdapter, createMockFileManagerAdapter) instead
of manually mocking Obsidian API objects.

Key changes:
- Replace manual vault/app mocks with adapter helpers
- Use createMockTFile and createMockTFolder for consistent fixtures
- Fix mock reference synchronization with getter pattern for App.vault
- Standardize all mock reassignments to use jest.fn() methods
- Update all 14 tests to properly reassign mocks in test setup

This resolves all 7 failing tests and improves test maintainability
by using consistent mock patterns across the test suite.

All tests passing: 14/14 in parent-folder-detection.test.ts
2025-10-20 00:01:48 -04:00
0185ca7d00 refactor: migrate NoteTools to use adapter pattern
Implements Task 10 from the implementation plan:

1. Updated NoteTools constructor to accept IVaultAdapter and IFileManagerAdapter
2. Created note-tools-factory.ts with factory function
3. Migrated all CRUD methods to use adapters:
   - readNote: uses vault.read()
   - createNote: uses vault.create(), vault.delete()
   - createParentFolders: uses vault.createFolder()
   - updateNote: uses vault.read(), vault.modify()
   - deleteNote: uses vault.trash(), vault.delete()
   - renameFile: uses fileManager.renameFile()
   - readExcalidraw: uses vault.read()
   - updateFrontmatter: uses vault.read(), vault.modify()
   - updateSections: uses vault.read(), vault.modify()
4. Extended IVaultAdapter interface with modify(), delete(), and trash() methods
5. Implemented new methods in VaultAdapter
6. Updated ToolRegistry to use factory function
7. Kept app parameter temporarily for PathUtils dependency
8. All methods now use adapters instead of direct Obsidian API calls
9. Code compiles successfully

This change enables 100% test coverage by allowing full mocking of vault operations.
2025-10-19 23:53:48 -04:00
aca4d35944 test: add coverage for VaultTools uncovered paths
Add tests for:
- getBacklinks with snippet options (includeSnippets true/false)
- getBacklinks error handling (file not found, read errors)
- validateWikilinks error paths (file not found, read errors)
- validateWikilinks successful validation with resolved/unresolved links

Improves vault-tools.ts coverage from 35.85% to 54.9% statements.
Adds 7 new tests (27 to 34 total).
2025-10-19 23:48:36 -04:00
886730bf95 refactor: migrate VaultTools link methods to use adapters
Update validateWikilinks, resolveWikilink, and getBacklinks methods
to use IVaultAdapter and IMetadataCacheAdapter instead of direct App access.

- Implemented inline link suggestion finding using vault adapter
- Implemented backlinks retrieval using metadata cache adapter
- Added helper methods: findLinkSuggestions, extractSnippet, escapeRegex
- App parameter still required for waypoint methods (not in scope for this task)
2025-10-19 23:45:13 -04:00
cfb3a50eac refactor: migrate search and getVaultInfo to use adapters
Update search and getVaultInfo methods to use IVaultAdapter
instead of direct App.vault access. Implements inline search
logic using adapters for file reading and markdown file listing.
2025-10-19 23:41:35 -04:00
d91e478ada test: fix list-notes-sorting tests with proper mocks
Use createMockTFolder helper which includes isRoot() method.
Replace old App mocks with createMockVaultAdapter pattern.
Properly mock getRoot() method to return root folder with children.
Fixes TypeError: item.isRoot is not a function.
2025-10-19 23:38:15 -04:00
862c5533e8 test: update vault-tools tests to use mock adapters
Replace complex App object mocks with clean mock adapter pattern.
Simplifies test setup and improves maintainability.

- Created comprehensive tests for VaultTools methods using mock adapters
- Tests cover listNotes, stat, exists, and list (enhanced) functionality
- Includes tests for frontmatter extraction edge cases
- Fixed mock helpers to use proper prototype chains for instanceof checks
- All 27 VaultTools tests passing
2025-10-19 23:34:28 -04:00
25755661f7 refactor: migrate VaultTools to use adapter interfaces
Update VaultTools constructor to accept IVaultAdapter and
IMetadataCacheAdapter. Add factory function for production usage.
Update stat, exists, and createFileMetadataWithFrontmatter methods.
2025-10-19 23:30:03 -04:00
248b3924fe test: add mock adapter factories
Create factory functions for mock adapters to simplify test setup.
Includes helpers for creating mock TFile and TFolder objects.
2025-10-19 23:18:16 -04:00
e369904447 feat: implement concrete adapter classes
Add VaultAdapter, MetadataCacheAdapter, and FileManagerAdapter as
pass-through wrappers for Obsidian API objects.
2025-10-19 23:14:54 -04:00
fc001e541d feat: add adapter interfaces for dependency injection
Create IVaultAdapter, IMetadataCacheAdapter, and IFileManagerAdapter
interfaces to decouple tool classes from Obsidian API dependencies.
2025-10-19 23:10:54 -04:00
395ce64cde chore: add .worktrees/ to .gitignore
Prevent git worktree directories from being tracked in the repository.
2025-10-19 22:55:44 -04:00
b89d0912c2 docs: design document for 100% test coverage via dependency injection
Add comprehensive design for achieving 100% test coverage through
dependency injection refactoring. The design introduces adapter
interfaces to decouple tool classes from Obsidian API dependencies,
enabling cleaner, more maintainable tests.

Key elements:
- IVaultAdapter, IMetadataCacheAdapter, IFileManagerAdapter interfaces
- Factory pattern for production usage
- Phased implementation approach (adapters → VaultTools → NoteTools → integration)
- Mock adapter pattern for simplified test setup
- Coverage strategy organized by feature areas

Goal: Codebase confidence for future refactoring and feature work.
2025-10-19 22:54:08 -04:00
42ed93500c docs: cleanup of documentation 2025-10-19 21:47:30 -04:00
b681327970 feat: Phase 10 - UI Notifications (request-only)
Implement visual feedback for MCP tool calls with configurable notifications.

Features:
- Real-time notifications when tools are called (request only, no completion)
- Tool-specific emoji icons for visual clarity
- Rate limiting (max 10 notifications/second)
- Notification history tracking (last 100 entries)
- Configurable settings: enable/disable, show parameters, duration, console logging
- History modal with filtering and export to clipboard

Implementation:
- Created NotificationManager with queue-based rate limiting
- Created NotificationHistoryModal for viewing past tool calls
- Integrated into tool call interceptor in ToolRegistry
- Added notification settings UI section
- Added 'View MCP Notification History' command

Benefits:
- Visual feedback for debugging and monitoring
- Transparency into AI agent actions
- Simple on/off toggle, no complex verbosity settings
- Zero performance impact when disabled
- History tracks success/failure/duration for all calls

All 10 phases of the roadmap are now complete\!
2025-10-17 01:11:10 -04:00
6017f879f4 feat: Phase 9 - Linking & Backlinks
Implement three new tools for wikilink validation, resolution, and backlink queries:

New Tools:
- validate_wikilinks: Validate all wikilinks in a note with suggestions for broken links
- resolve_wikilink: Resolve a single wikilink to its target path
- backlinks: Get all backlinks to a note with optional unlinked mentions

New Files:
- src/utils/link-utils.ts: Complete wikilink parsing, resolution, and backlink utilities

Modified Files:
- src/tools/vault-tools.ts: Added 3 new methods for link operations
- src/tools/index.ts: Added 3 tool definitions and handlers
- src/types/mcp-types.ts: Added Phase 9 type definitions
- ROADMAP.md: Marked Phase 9 as complete
- CHANGELOG.md: Added v8.0.0 release notes

Key Features:
- Regex-based wikilink parsing with position tracking
- Uses MetadataCache.getFirstLinkpathDest() for accurate resolution
- Fuzzy matching suggestion engine for broken links
- Efficient backlink detection using MetadataCache.resolvedLinks
- Optional unlinked mentions with word-boundary matching
- Context snippet extraction for each occurrence
2025-10-17 00:52:51 -04:00
99e2ade3ca feat: Phase 8 - Write Operations & Concurrency
Implement safe write operations with concurrency control, partial updates,
conflict resolution, and file rename/move with automatic link updates.

New Tools:
- update_frontmatter: Partial frontmatter updates with concurrency control
- update_sections: Line-based section edits to reduce race conditions
- rename_file: File rename/move with automatic wikilink updates

Enhanced Tools:
- create_note: Added onConflict strategies (error, overwrite, rename)
- delete_note: Added soft delete, dryRun, and concurrency control

Key Features:
- ETag-based optimistic locking via ifMatch parameter
- Version tracking on all write operations
- Conflict resolution strategies
- Link integrity maintenance during file operations
- Safe operations with preview and recovery options

Files Created:
- src/utils/version-utils.ts

Files Modified:
- src/tools/note-tools.ts
- src/utils/frontmatter-utils.ts
- src/tools/index.ts
- src/types/mcp-types.ts
- ROADMAP.md
- CHANGELOG.md

Fixes:
- Fixed rename_file backlinks API issue (not available in Obsidian API)
- Fixed update_frontmatter null-object error when patch is undefined
2025-10-17 00:38:45 -04:00
4e399e00f8 feat: Phase 7 - Waypoint Support
- Add get_folder_waypoint tool to extract waypoint blocks from folder notes
- Add is_folder_note tool to detect folder notes by basename or waypoint markers
- Implement waypoint edit protection in update_note to prevent corruption
- Create waypoint-utils.ts with helper functions for waypoint operations
- Add FolderWaypointResult and FolderNoteResult types
- Update ROADMAP.md and CHANGELOG.md with Phase 7 completion
- All manual tests passing
2025-10-17 00:16:14 -04:00
e6cdd6d90a feat: Phase 6 - Powerful Search with regex and waypoint support
- Add enhanced 'search' tool with regex support, case sensitivity control, and advanced filtering
- Add 'search_waypoints' tool for finding Waypoint plugin markers
- Implement SearchUtils with regex/literal search, snippet extraction, and match highlighting
- Add WaypointResult and WaypointSearchResult types
- Update SearchResult type to include isRegex field
- Remove deprecated search_notes tool (breaking change)
- Support glob filtering (includes/excludes) and folder scoping
- Configurable snippet length and result limiting
- Extract wikilinks from waypoint content

Breaking Changes:
- search_notes tool removed, use 'search' tool instead
2025-10-17 00:02:58 -04:00
7e5a6a8c3c Phase 5 Complete: Advanced Read Operations with Excalidraw Support
- Enhanced read_note tool with frontmatter parsing options
  - parseFrontmatter option to separate frontmatter from content
  - withFrontmatter and withContent options for flexible responses
  - Returns structured ParsedNote JSON when parsing enabled
  - Backward compatible (default behavior unchanged)

- New read_excalidraw tool for Excalidraw file metadata
  - Detects compressed-json format (Excalidraw's actual format)
  - Returns elementCount, hasCompressedData, metadata fields
  - Handles compressed (base64) and uncompressed formats
  - Preview text extraction from Text Elements section
  - Optional full compressed data inclusion

- New frontmatter-utils.ts for YAML parsing
  - Uses Obsidian's built-in parseYaml
  - Extracts and parses frontmatter
  - Handles edge cases (no frontmatter, malformed YAML)
  - Excalidraw metadata parsing with compression detection

- Enhanced type definitions with JSDoc comments
  - ParsedNote interface for structured note data
  - ExcalidrawMetadata interface with detailed field docs
  - Clear documentation of all fields and their purposes

- Comprehensive documentation
  - IMPLEMENTATION_NOTES_PHASE5.md - Implementation details
  - EXCALIDRAW_FIX_SUMMARY.md - Bug fix documentation
  - EXCALIDRAW_TESTING_GUIDE.md - Testing instructions
  - Updated CHANGELOG.md with all changes
  - Updated ROADMAP.md marking Phase 5 complete

- Known limitation documented
  - elementCount returns 0 for compressed files (expected)
  - Decompression would require pako library (not included)
  - hasCompressedData correctly identifies compressed files
  - Preview text still available without decompression
  - Added to roadmap as future enhancement

All manual tests passed. Phase 5 complete and production-ready.
2025-10-16 23:47:19 -04:00
aff7c6bd0a feat: Phase 4 - Enhanced List Operations (v3.0.0)
- Replace list_notes with powerful new list tool
- Add recursive directory traversal
- Implement glob pattern filtering (*, **, ?, [abc], {a,b})
- Add cursor-based pagination for large result sets
- Support frontmatter summary extraction using metadata cache
- Add type filtering (files, directories, any)
- Create GlobUtils for pattern matching
- Add new types: FrontmatterSummary, FileMetadataWithFrontmatter, ListResult
- Update version to 3.0.0 (breaking change)
- Add comprehensive documentation and changelog
- Add Phase 10: UI Notifications to roadmap

BREAKING CHANGE: list_notes tool removed, replaced with list tool.
Migration: Replace list_notes({ path }) with list({ path }).
Response structure now wrapped in ListResult object.
2025-10-16 23:10:31 -04:00
83ac6bedfa feat: Phase 3 - Discovery Endpoints (stat and exists tools)
- Add stat tool for detailed file/folder metadata
- Add exists tool for fast path existence checking
- Add StatResult and ExistsResult type definitions
- Implement stat() and exists() methods in VaultTools
- Register both tools in ToolRegistry with complete schemas
- Update version to 2.1.0
- Update ROADMAP.md to mark Phase 3 complete
- Update CHANGELOG.md with Phase 3 release notes
- Add IMPLEMENTATION_NOTES_PHASE3.md documentation
- Clean up old phase documentation files
2025-10-16 22:59:38 -04:00
9d07ec64e2 Phase 2: API Unification & Typed Results + Phase 2.1 Fixes
Phase 2 - Breaking Changes (v2.0.0):
- Added typed result interfaces (FileMetadata, DirectoryMetadata, VaultInfo, SearchResult, SearchMatch)
- Unified parameter naming: list_notes now uses 'path' parameter (removed 'folder')
- Enhanced tool responses with structured JSON for all tools
- list_notes: Returns array of FileMetadata/DirectoryMetadata with full metadata
- search_notes: Returns SearchResult with line numbers, snippets, and match ranges
- get_vault_info: Returns VaultInfo with comprehensive statistics
- Updated all tool descriptions to document structured responses
- Version bumped to 2.0.0 (breaking changes)

Phase 2.1 - Post-Testing Fixes:
- Fixed root listing to exclude vault root folder itself (handles path '', '/', and isRoot())
- Fixed alphabetical sorting to be case-insensitive for stable ordering
- Improved directory metadata with better timestamp detection and error handling
- Fixed parent folder validation order (check if file before checking existence)
- Updated documentation with root path examples and leading slash warnings
- Added comprehensive test suite for sorting and root listing behavior
- Fixed test mocks to use proper TFile/TFolder instances

Tests: All 64 tests passing
Build: Successful, no errors
2025-10-16 22:49:28 -04:00
d074470d11 Release v1.2.0: Enhanced Authentication & Parent Folder Detection
Phase 1.5 Complete:
- Add automatic API key generation with secure random generation
- Add createParents parameter to create_note tool
- Fix authentication vulnerability (auth enabled without key)
- Add MCP client configuration snippet generator
- Improve UI/UX for authentication management
- Add comprehensive test coverage

Security:
- Fixed critical vulnerability in authentication middleware
- Implement three-layer defense (UI, server start, middleware)
- Cryptographically secure key generation (32 chars)

Features:
- Auto-generate API key when authentication enabled
- Copy/regenerate buttons for API key management
- Recursive parent folder creation for nested paths
- Enhanced error messages with actionable guidance
- Selectable connection information and config snippets

Documentation:
- Updated CHANGELOG.md with v1.2.0 release notes
- Updated ROADMAP.md (Phase 1.5 marked complete)
- Created IMPLEMENTATION_NOTES_AUTH.md
- Created RELEASE_NOTES_v1.2.0.md
2025-10-16 22:11:33 -04:00
7524271eaa Release v1.1.0: Phase 1.1 - Path Normalization & Error Handling
- Add PathUtils for cross-platform path normalization and validation
- Add ErrorMessages with context-aware, actionable error messages
- Update all tool implementations with enhanced path handling
- Improve tool descriptions for AI agents with detailed guidance
- Add Jest testing infrastructure with 43 passing tests
- Add comprehensive documentation (Tool Selection Guide, error improvements)
- Fix cross-platform path issues (Windows backslashes, case sensitivity)
- Fix delete folder error message (clear 'cannot delete folders' message)
- Fix parent folder detection with specific error messages
- All changes backward compatible with v1.0.0

New files:
- src/utils/path-utils.ts - Path normalization utilities
- src/utils/error-messages.ts - Enhanced error messages
- tests/__mocks__/obsidian.ts - Mock Obsidian API
- tests/path-utils.test.ts - 43 unit tests
- tests/README.md - Testing guide
- jest.config.js - Jest configuration
- docs/TOOL_SELECTION_GUIDE.md - Comprehensive tool guide
- docs/ERROR_MESSAGE_IMPROVEMENTS.md - Error message documentation
- docs/TOOL_DESCRIPTION_IMPROVEMENTS.md - AI agent improvements
- PHASE_1.1_IMPLEMENTATION.md - Implementation summary
- RELEASE_NOTES_v1.1.0.md - Release notes

Updated:
- CHANGELOG.md - Add v1.1.0 entry
- ROADMAP.md - Mark Phase 1.1 complete, add Phase 1.5 proposal
- manifest.json - Bump to v1.1.0
- package.json - Bump to v1.1.0, add test scripts
- src/tools/index.ts - Enhanced tool descriptions
- src/tools/note-tools.ts - Use PathUtils and ErrorMessages
- src/tools/vault-tools.ts - Use PathUtils and ErrorMessages
2025-10-16 21:27:23 -04:00
08cc6e9ea6 Release v1.0.0 - Initial Release
🎉 Initial release of Obsidian MCP Server plugin

Core Features:
- MCP server implementation with HTTP transport
- JSON-RPC 2.0 message handling
- Protocol version 2024-11-05 support

MCP Tools:
- read_note, create_note, update_note, delete_note
- search_notes, list_notes, get_vault_info

Server Features:
- Configurable HTTP server (default port: 3000)
- Health check and MCP endpoints
- Auto-start option

Security:
- Origin header validation (DNS rebinding protection)
- Optional Bearer token authentication
- CORS configuration

UI:
- Settings panel with full configuration
- Status bar indicator and ribbon icon
- Start/Stop/Restart commands

Documentation:
- Comprehensive README with examples
- Quick Start Guide and Implementation Summary
- Test client script
2025-10-16 20:52:52 -04:00