Commit Graph

10 Commits

Author SHA1 Message Date
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