chore: reset version to 1.0.0 for initial public release

This marks version 1.0.0 as the first public release of the plugin.
Previous versions (1.0.0-3.0.0) were private development iterations.

Changes:
- Reset manifest.json version to 1.0.0
- Reset package.json version to 1.0.0
- Clear versions.json to single entry (1.0.0 -> 0.15.0)
- Rewrite CHANGELOG.md for public release
  - Remove private development history
  - Document all features as part of 1.0.0
  - Add future roadmap section

Git history is preserved to demonstrate:
- Development quality and security practices
- Comprehensive test coverage efforts
- Thoughtful evolution of features

This plugin implements MCP (Model Context Protocol) to expose
Obsidian vault operations via HTTP for AI assistants and other clients.
This commit is contained in:
2025-10-26 07:44:42 -04:00
parent 779b3d6e8c
commit d70ffa6d40
7 changed files with 96 additions and 1904 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,70 +0,0 @@
# Implementation Summary: 100% Tool Coverage
**Date:** 2025-01-20
**Branch:** feature/tools-coverage
**Goal:** Achieve 100% line coverage on note-tools.ts and vault-tools.ts
## Achievement Summary
**All objectives met - Both tools at 100% line coverage**
### Coverage Improvements
| Tool | Before | After | Improvement |
|------|--------|-------|-------------|
| note-tools.ts | 96.01% | **100%** | +3.99% |
| vault-tools.ts | 94.22% | **100%** | +5.78% |
### Test Metrics
**Before:**
- Total tests: 485
- note-tools tests: 66
- vault-tools tests: 72
**After:**
- Total tests: 505 (+20)
- note-tools tests: 74 (+8)
- vault-tools tests: 84 (+12)
### Tasks Completed
1. **Note-Tools Conflict Resolution** - Added 1 test covering lines 238-239
2. **Note-Tools Folder-Not-File Errors** - Added 5 tests covering lines 377, 408, 590, 710, 836
3. **Note-Tools Excalidraw & Frontmatter** - Added 2 tests covering lines 647, 771
4. **Vault-Tools Invalid Path & Glob** - Added 3 tests covering lines 76, 272, 596-597
5. **Vault-Tools Edge Cases** - Added 7 tests covering lines 267, 325, 374, 608, 620, 650
6. **Vault-Tools Defensive Code** - Added 1 test + documented unreachable code (lines 452-456, 524-528, 777)
### Commits
1. `f6ec8d1` - test: add note-tools conflict resolution test
2. `4a17bdc` - test: add note-tools folder-not-file error tests
3. `dca6c34` - test: add note-tools Excalidraw and frontmatter tests
4. `73d4409` - test: add vault-tools invalid path and glob tests
5. `cf84f04` - test: add vault-tools edge case tests
6. `9e2a314` - test: add vault-tools defensive code coverage
### Build Status
**All tests passing:** 505/505
**Build successful:** No type errors
**Coverage goals met:** 100% line coverage on both tools
### Code Quality
**Defensive Code Documentation:**
- Lines 452-456 (vault-tools stat method): Documented as unreachable, added istanbul ignore
- Lines 524-528 (vault-tools exists method): Documented as unreachable, added istanbul ignore
- Analysis shows these are unreachable because all TAbstractFile types are exhaustively handled
**Test Quality:**
- All new tests use existing mock patterns
- Clear, descriptive test names
- Comprehensive error path coverage
- No flaky tests introduced
---
**Status:** ✅ COMPLETE - Ready for merge
**Coverage:** note-tools 100%, vault-tools 100%

View File

@@ -1,308 +0,0 @@
# Troubleshooting Guide
## Plugin Won't Load
### Check Required Files
Ensure these files exist in the plugin directory:
```bash
ls -la /path/to/vault/.obsidian/plugins/obsidian-mcp-server/
```
Required files:
-`main.js` (should be ~846KB)
-`manifest.json`
-`styles.css`
### Check Obsidian Console
1. Open Obsidian
2. Press `Ctrl+Shift+I` (Windows/Linux) or `Cmd+Option+I` (Mac)
3. Go to the **Console** tab
4. Look for errors related to `obsidian-mcp-server`
Common errors:
- **Module not found**: Rebuild the plugin with `npm run build`
- **Syntax error**: Check the build completed successfully
- **Permission error**: Ensure files are readable
### Verify Plugin is Enabled
1. Go to **Settings****Community Plugins**
2. Find **MCP Server** in the list
3. Ensure the toggle is **ON**
4. If not visible, click **Reload** or restart Obsidian
### Check Manifest
Verify `manifest.json` contains:
```json
{
"id": "obsidian-mcp-server",
"name": "MCP Server",
"version": "1.0.0",
"minAppVersion": "0.15.0",
"description": "Exposes Obsidian vault operations via Model Context Protocol (MCP) over HTTP",
"author": "",
"authorUrl": "",
"isDesktopOnly": true
}
```
### Rebuild from Source
If the plugin still won't load:
```bash
cd /path/to/vault/.obsidian/plugins/obsidian-mcp-server
npm install
npm run build
```
Then restart Obsidian.
### Check Obsidian Version
This plugin requires:
- **Minimum Obsidian version**: 0.15.0
- **Desktop only** (not mobile)
Check your version:
1. **Settings****About**
2. Look for "Current version"
### Verify Node.js Built-ins
The plugin uses Node.js modules (http, express). Ensure you're running on desktop Obsidian, not mobile.
## Plugin Loads But Shows No Info
### Check Plugin Description
If the plugin appears in the list but shows no description:
1. Check `manifest.json` has a `description` field
2. Restart Obsidian
3. Try disabling and re-enabling the plugin
### Check for Errors on Load
1. Open Console (`Ctrl+Shift+I`)
2. Disable the plugin
3. Re-enable it
4. Watch for errors in console
## Server Won't Start
### Port Already in Use
**Error**: "Port 3000 is already in use"
**Solution**:
1. Go to **Settings****MCP Server**
2. Change port to something else (e.g., 3001, 3002)
3. Try starting again
Or find and kill the process using port 3000:
```bash
# Linux/Mac
lsof -i :3000
kill -9 <PID>
# Windows
netstat -ano | findstr :3000
taskkill /PID <PID> /F
```
### Module Not Found
**Error**: "Cannot find module 'express'" or similar
**Solution**:
```bash
cd /path/to/vault/.obsidian/plugins/obsidian-mcp-server
npm install
npm run build
```
Restart Obsidian.
### Permission Denied
**Error**: "EACCES" or "Permission denied"
**Solution**:
- Try a different port (above 1024)
- Check firewall settings
- Run Obsidian with appropriate permissions
## Server Starts But Can't Connect
### Check Server is Running
Look at the status bar (bottom of Obsidian):
- Should show: `MCP: Running (3000)`
- If shows: `MCP: Stopped` - server isn't running
### Test Health Endpoint
Open browser or use curl:
```bash
curl http://127.0.0.1:3000/health
```
Should return:
```json
{"status":"ok","timestamp":1234567890}
```
### Check Localhost Binding
The server only binds to `127.0.0.1` (localhost). You cannot connect from:
- Other computers on the network
- External IP addresses
- Public internet
This is by design for security.
### Test MCP Endpoint
```bash
curl -X POST http://127.0.0.1:3000/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"ping"}'
```
Should return:
```json
{"jsonrpc":"2.0","id":1,"result":{}}
```
## Authentication Issues
### Wrong API Key
**Error**: 401 Unauthorized
**Solution**:
- Check API key in settings matches what you're sending
- Ensure format is: `Authorization: Bearer YOUR_API_KEY`
- Try disabling authentication temporarily to test
### CORS Errors
**Error**: "CORS policy" in browser console
**Solution**:
1. Go to **Settings****MCP Server**
2. Ensure "Enable CORS" is **ON**
3. Check "Allowed Origins" includes your origin or `*`
4. Restart server
## Tools Not Working
### Path Errors
**Error**: "Note not found"
**Solution**:
- Use relative paths from vault root
- Example: `folder/note.md` not `/full/path/to/note.md`
- Don't include vault name in path
### Permission Errors
**Error**: "EACCES" or "Permission denied"
**Solution**:
- Check file permissions in vault
- Ensure Obsidian has file system access
- Check vault is not read-only
### Search Returns Nothing
**Issue**: `search_notes` returns no results
**Solution**:
- Check query is not empty
- Search is case-insensitive
- Searches both filename and content
- Try simpler query
## Getting Help
### Collect Debug Information
When reporting issues, include:
1. **Obsidian version**: Settings → About
2. **Plugin version**: Check manifest.json
3. **Operating System**: Windows/Mac/Linux
4. **Error messages**: From console (Ctrl+Shift+I)
5. **Steps to reproduce**: What you did before the error
### Console Logs
Enable detailed logging:
1. Open Console (`Ctrl+Shift+I`)
2. Try the failing operation
3. Copy all red error messages
4. Include in your report
### Test Client Output
Run the test client and include output:
```bash
node test-client.js
```
### Check GitHub Issues
Before creating a new issue:
1. Search existing issues
2. Check if it's already reported
3. See if there's a workaround
## Common Solutions
### "Have you tried turning it off and on again?"
Seriously, this fixes many issues:
1. Stop the server
2. Disable the plugin
3. Restart Obsidian
4. Enable the plugin
5. Start the server
### Clean Reinstall
If all else fails:
```bash
# Backup settings first!
cd /path/to/vault/.obsidian/plugins
rm -rf obsidian-mcp-server
# Re-install plugin
cd obsidian-mcp-server
npm install
npm run build
```
Restart Obsidian.
### Reset Settings
If settings are corrupted:
1. Stop server
2. Disable plugin
3. Delete `/path/to/vault/.obsidian/plugins/obsidian-mcp-server/data.json`
4. Re-enable plugin
5. Reconfigure settings
## Still Having Issues?
1. Check the README.md for documentation
2. Review QUICKSTART.md for setup steps
3. Run the test client to verify server
4. Check Obsidian console for errors
5. Try a clean rebuild
6. Create a GitHub issue with debug info

View File

@@ -1,167 +0,0 @@
# Utils Coverage Completion Summary
**Date:** 2025-01-20
**Branch:** feature/utils-coverage
**Objective:** Achieve 100% line coverage on all utils modules
## Achievement Summary
**Goal Achieved:** All 4 target utils modules now at 100% line coverage
### Coverage Improvements
| Module | Before | After | Improvement | Method |
|--------|--------|-------|-------------|--------|
| **error-messages.ts** | 82.6% | **100%** | +17.4% | Dead code removal |
| **version-utils.ts** | 88.88% | **100%** | +11.12% | Dead code removal |
| **path-utils.ts** | 98.18% | **100%** | +1.82% | Test addition + code fix |
| **frontmatter-utils.ts** | 96.55% | **98.34%** | +1.79% | Bug fix + test addition |
**Note:** frontmatter-utils.ts lines 301-303 remain uncovered (Buffer.from fallback for environments without atob). This is defensive code unreachable in Jest/Node environments and is acceptable.
### Overall Project Coverage
- **Total Coverage:** 99.71% statements, 94.46% branches, 99% functions, 99.8% lines
- **Test Count:** 505 → **512 tests** (+7 new tests)
- **All Tests:** ✅ 512 passing, 0 failing
- **Build Status:** ✅ Successful
## Work Completed
### Phase 1: Dead Code Removal (3 commits)
**Commit 1:** `896dda0` - Remove dead code from error-messages.ts
- Deleted `permissionDenied()` method (12 lines)
- Deleted `formatError()` method (14 lines)
- Result: 82.6% → 100% coverage
**Commit 2:** `59812e5` - Remove unused createVersionedResponse() method
- Deleted `createVersionedResponse()` method (11 lines)
- Result: 88.88% → 100% coverage
**Commit 3:** `fb82642` - Remove createVersionedResponse() reference from CHANGELOG
- Cleaned up documentation for deleted method
### Phase 2: Test Addition & Bug Fixes (3 commits)
**Commit 4:** `b902ed4` - Achieve 100% coverage on path-utils.ts
- Fixed code ordering bug that made Windows drive validation unreachable
- Reordered validation checks in `isValidVaultPath()`
- Added 3 new tests for `pathExists()` method
- Updated 2 tests to use backslash format for Windows paths
- Result: 98.18% → 100% coverage
**Commit 5:** `e76f316` - Make Pattern 4 reachable in Excalidraw code fence parsing
- Fixed regex bug: Changed `[a-z-]*` to `[a-z-]+` in Pattern 3
- Added test for code fence without language specifier
- Result: Made lines 253-255 reachable and covered
**Commit 6:** `945d59b` - Add decompression failure handling and test coverage
- Added base64 validation before decompression
- Added error logging in catch block
- Added test for decompression failure handling
- Result: Covered lines 318-327
## Technical Details
### Dead Code Identified
1. **ErrorMessages.permissionDenied()** - Never called in codebase
2. **ErrorMessages.formatError()** - Never called in codebase
3. **VersionUtils.createVersionedResponse()** - Never called (only in docs)
**Total Lines Removed:** 37 lines of dead code
### Bugs Fixed
1. **path-utils.ts**: Windows absolute path check was unreachable
- **Issue:** Invalid character check (including `:`) ran before Windows drive letter check
- **Fix:** Reordered validation logic to check absolute paths first
- **Impact:** No behavioral change, but correct code path now executes
2. **frontmatter-utils.ts**: Pattern 4 was unreachable
- **Issue:** Pattern 3 regex `[a-z-]*` (zero or more) matched empty string, preventing Pattern 4 from executing
- **Fix:** Changed to `[a-z-]+` (one or more) to require language specifier
- **Impact:** Pattern 4 now properly handles code fences without language specifiers
### Tests Added
1. **path-utils.test.ts** (+3 tests)
- pathExists() - file exists
- pathExists() - folder exists
- pathExists() - path does not exist
2. **frontmatter-utils.test.ts** (+2 tests)
- Parses Excalidraw with code fence lacking language specifier
- Handles decompression failure gracefully
3. **Updated tests** (2)
- Windows absolute paths now use backslash format
**Total:** +5 new tests, 2 updated tests
## Commit History
```
b902ed4 test: achieve 100% coverage on path-utils.ts
e76f316 fix: Make Pattern 4 reachable in Excalidraw code fence parsing
945d59b test: add decompression failure handling and test coverage
fb82642 docs: remove createVersionedResponse() reference from CHANGELOG
59812e5 test: remove unused createVersionedResponse() method
896dda0 refactor: remove dead code from error-messages.ts
```
## Files Modified
### Source Code
- `src/utils/error-messages.ts` (-28 lines)
- `src/utils/version-utils.ts` (-11 lines)
- `src/utils/path-utils.ts` (+6 lines reordering)
- `src/utils/frontmatter-utils.ts` (+11 lines validation)
### Tests
- `tests/path-utils.test.ts` (+24 lines)
- `tests/frontmatter-utils.test.ts` (+56 lines)
### Documentation
- `CHANGELOG.md` (-1 line)
- `docs/plans/2025-01-20-utils-coverage-completion.md` (created)
## Verification
✅ All 512 tests passing
✅ Build successful (`npm run build`)
✅ Coverage improved across all target modules
✅ No regressions introduced
✅ Code quality maintained
## Success Criteria Met
- ✅ error-messages.ts at 100% line coverage
- ✅ version-utils.ts at 100% line coverage
- ✅ path-utils.ts at 100% line coverage
- ✅ frontmatter-utils.ts at 98.34% line coverage (100% reachable code)
- ✅ All tests passing (512 tests, +7 from baseline)
- ✅ Build succeeds
- ✅ Dead code removed cleanly (37 lines)
- ✅ 2 subtle bugs fixed
- ✅ Work documented
## Key Insights
1. **Dead Code Discovery:** Three utility methods existed that were never called - identifying and removing them improved coverage without adding tests
2. **Unreachable Code Bugs:** Found two subtle bugs where validation logic was unreachable due to code ordering or regex patterns - these weren't functional bugs but prevented proper code coverage
3. **Test-Driven Improvements:** Adding targeted tests not only improved coverage but revealed underlying code quality issues that needed fixing
4. **Defensive Code:** Lines 301-303 in frontmatter-utils.ts represent legitimate defensive code for environments without `atob` - acceptable to leave uncovered in Jest environment
## Next Steps
This work completes the pre-release validation for utils modules. Combined with the previous tools coverage work, the codebase now has:
- **Tools:** 100% line coverage (note-tools.ts, vault-tools.ts)
- **Utils:** 100% line coverage (all reachable code in 7 modules)
- **Overall:** 99.8% line coverage
Ready to merge to master.

View File

@@ -1,7 +1,7 @@
{
"id": "obsidian-mcp-server",
"name": "MCP Server",
"version": "3.0.0",
"version": "1.0.0",
"minAppVersion": "0.15.0",
"description": "Exposes Obsidian vault operations via Model Context Protocol (MCP) over HTTP",
"author": "Bill Ballou",

View File

@@ -1,6 +1,6 @@
{
"name": "obsidian-mcp-server",
"version": "3.0.0",
"version": "1.0.0",
"description": "MCP (Model Context Protocol) server plugin for Obsidian - exposes vault operations via HTTP",
"main": "main.js",
"scripts": {

View File

@@ -1,8 +1,3 @@
{
"1.0.0": "0.15.0",
"1.1.0": "0.15.0",
"1.2.0": "0.15.0",
"2.0.0": "0.15.0",
"2.1.0": "0.15.0",
"3.0.0": "0.15.0"
"1.0.0": "0.15.0"
}