11 Commits

Author SHA1 Message Date
c8abde8a88 chore: bump version to 1.1.3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-17 17:38:55 -05:00
57b58a0d22 fix: allow ampersands in filenames while blocking command injection (v1.1.2)
Fixes #2 - Files with & in their names (e.g., 'Research & Development.md')
were being incorrectly sanitized, causing search and file-not-found errors.

Changes:
- Removed & from DANGEROUS_CHARS regex
- Single & is safe in quoted arguments passed to CLI
- Dangerous && patterns still blocked by COMMAND_INJECTION_PATTERNS
- Also allows (), [], {} which are safe in quoted args

Version: 1.1.2

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-14 17:05:18 -05:00
466587d1c5 fix: preserve square brackets and escape quotes in note content (v1.1.1)
- Fix square bracket removal: Remove [] from DANGEROUS_CHARS regex
  * Wikilinks ([[link]]) now work correctly
  * Task checkboxes (- [ ] Task) are properly preserved
  * Brackets are safe because values are quoted and passed as array args

- Fix quote truncation: Escape double quotes in formatParam
  * Content like "Bot QM" no longer truncates
  * Internal quotes escaped as \" before wrapping in parameter quotes
  * Prevents shell from misinterpreting quote boundaries

Bump version: 1.0.0 -> 1.1.1

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-10 00:07:13 -05:00
26d7d37d43 Added more details to manifest 2026-03-22 16:59:16 -05:00
3ef2616e70 fix: add complete input schemas to all link and tag/alias tools
Fixed all remaining tools in links.ts and tags-aliases.ts to properly
expose their input parameters in the tools/list response, matching the
pattern used in file-operations.ts and search.ts.

Links.ts (5 tools):
- obsidian_get_backlinks: Added 5 params (file, path, counts, total, format)
- obsidian_list_outgoing_links: Added 3 params (file, path, total)
- obsidian_list_unresolved_links: Added 4 params (total, counts, verbose, format)
- obsidian_list_deadends: Added 2 params (total, all)
- obsidian_list_orphans: Added 2 params (total, all)

Tags-Aliases.ts (4 tools):
- obsidian_list_tags: Added 7 params (file, path, total, counts, sort, format, active)
- obsidian_search_by_tag: Added 3 params (name required, total, verbose)
  * Renamed from obsidian_get_tag_info for consistency
- obsidian_get_tag_count: Added 1 param (name required)
- obsidian_list_aliases: Added 5 params (file, path, total, verbose, active)

All parameters verified against 'obsidian help <command>' output.

Changes to manifest.json:
- Updated tool name: obsidian_get_tag_info → obsidian_search_by_tag

Before: Empty properties: {} on 9 tools
After: Full parameter schemas with types, descriptions, and required fields

Build:  0 TypeScript errors
Total tools with complete schemas: 28/28 

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 16:28:37 -05:00
b149820a2b feat: implement User Story 3 - Task & Property Management
Implemented task tracking and property management functionality,
completing User Story 3 with 8 new MCP tools.

Task Management Tools (5 tools):
1. obsidian_list_tasks
   - List all tasks in vault or specific file
   - Filter by status (done/todo/custom), file, path
   - Support verbose mode with line numbers
   - Output formats: json, tsv, csv, text
   - Flags: total, active, daily

2. obsidian_toggle_task
   - Toggle task between done/todo states
   - Specify by ref (path:line) or file/path + line
   - Support daily note flag

3. obsidian_mark_task_done
   - Mark task as completed
   - Same targeting options as toggle

4. obsidian_mark_task_todo
   - Mark task as incomplete
   - Same targeting options as toggle

5. obsidian_update_task_status
   - Set custom status character (-, >, !, ?, etc.)
   - Enables custom task workflows

Property Management Tools (3 tools):
6. obsidian_get_property
   - Read single property value from file
   - Required: property name
   - Target by file name or path

7. obsidian_set_property
   - Set or update property on file
   - Required: name, value
   - Optional: type (text, list, number, checkbox, date, datetime)
   - Auto-infers type if not specified

8. obsidian_remove_property
   - Delete property from file
   - Required: property name
   - Target by file name or path

Implementation Details:
- Created src/tools/tasks.ts with 5 task management tools
- Extended src/tools/properties.ts with 3 property tools
- Added Zod schemas for validation (listTasksSchema, taskReferenceSchema,
  propertyReadSchema, propertySetSchema, propertyRemoveSchema)
- All tools use formatParam() for proper parameter quoting
- Complete inputSchema definitions for tools/list exposure
- Command mapping verified via 'obsidian help' for each command

Commands Used:
- obsidian tasks (list)
- obsidian task (manipulate)
- obsidian property:read
- obsidian property:set
- obsidian property:remove

Files Changed:
- src/tools/tasks.ts (new): 5 task management tools
- src/tools/properties.ts: Added registerPropertyManagementTools()
- src/tools/index.ts: Register task and property management tools
- manifest.json: Added 8 new tool descriptions
- specs/001-obsidian-mcp-bundle/tasks.md: Marked T064-T075, T079 complete

Task Progress:
- Completed: 13 of 18 US3 tasks (72%)
- Remaining: T076-T078 (convenience wrappers), T080-T081 (helpers)
- Total project: 83/98 tasks (84.7%)

Build:  0 errors
Validation:  Manifest passes
Tool Count: 20 → 28 tools (+8)

User Story 3 Status: Core implementation complete 
Next: T076-T078 convenience wrappers (optional), Polish phase

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 13:57:31 -05:00
c577c07877 refactor: update search tool to match Obsidian CLI spec
Removed obsidian_search_with_context tool (not in CLI spec)
Updated obsidian_search to use exact CLI parameter names:
- query (required) - Search query text
- path (optional) - Limit search to folder path
- limit (optional) - Max number of files to return
- total (optional) - Return match count instead of file list
- case (optional) - Case sensitive search
- format (optional) - Output format: text or json (default: text)

Changed parameter names to match CLI:
- folder → path
- caseSensitive → case
- Added: total flag for match counts
- Removed: contextLines (not in CLI)

Files updated:
- src/tools/search.ts: Simplified to single search tool
- src/validation/schemas.ts: Updated searchSchema parameters
- manifest.json: Removed search_with_context, updated description
- tasks.md: Marked T048 as REMOVED

Total tools: 20 (was 21)
- User Story 1: 9 tools
- User Story 2: 11 tools (was 12)

Build:  0 errors
Validation:  Manifest passes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 12:26:17 -05:00
a978d70b3f feat: implement User Story 2 - Search and Discovery (P2)
Implemented 12 new MCP tools for search and knowledge graph navigation:

Search Tools (2):
- obsidian_search: Content search with folder filtering and case sensitivity
- obsidian_search_with_context: Search with surrounding context lines

Link Tools (5):
- obsidian_get_backlinks: Show incoming links to a note
- obsidian_get_outgoing_links: Show outgoing links from a note
- obsidian_list_unresolved_links: Find broken wikilinks
- obsidian_list_deadends: Find notes with no outgoing links
- obsidian_list_orphans: Find notes with no incoming links

Tag & Alias Tools (3):
- obsidian_list_tags: List all tags with optional counts
- obsidian_get_tag_info: Detailed tag usage information
- obsidian_list_aliases: List note aliases

Property Discovery Tools (2):
- obsidian_list_properties: List all vault properties
- obsidian_get_property_count: Get property usage counts

New files created:
- src/tools/search.ts (2 tools)
- src/tools/links.ts (5 tools)
- src/tools/tags-aliases.ts (3 tools)
- src/tools/properties.ts (2 tools)

Updated:
- src/tools/index.ts: Register all new tool modules
- src/validation/schemas.ts: Enhanced searchSchema with new parameters
- manifest.json: Added 12 new tools to tools array (21 total)
- tasks.md: Marked T046-T063 complete (18 tasks)

Build:  0 errors
Validation:  Manifest passes
Total tools: 21 (9 US1 + 12 US2)
Tasks complete: 70/167 (41.9%)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 12:08:30 -05:00
edb03263ac feat: add tools list to manifest.json
- Add all 9 file operation tools to manifest tools array
- Each tool includes name and descriptive documentation
- Tools list helps MCP hosts discover available capabilities
- Manifest still passes mcpb validation

Tools listed:
- obsidian_create_note
- obsidian_read_note
- obsidian_append_to_note
- obsidian_prepend_to_note
- obsidian_delete_note
- obsidian_move_note
- obsidian_rename_note
- obsidian_open_note
- obsidian_get_file_info

Task T152 marked complete

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 11:55:20 -05:00
c5e42adac0 fix: correct manifest.json to pass MCPB validation
- Add required 'version' field (1.0.0)
- Change 'author' from string to object with name/url
- Move 'mcp_config' inside 'server' object
- Fix 'user_config' to use proper field-level structure
- Remove invalid 'compatibility' and 'capabilities' top-level fields
- Create bundle icon (512x512 PNG) to satisfy icon requirement
- Remove icon placeholder file

Validation:  mcpb validate passes with warnings only
Tasks: T149 (icon), T158 (validate), T159 (build) marked complete

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 11:33:16 -05:00
622b28e42c feat: implement Obsidian MCP Bundle MVP (Phase 1-3)
- Complete project setup with TypeScript, Jest, MCPB manifest
- Implement foundational infrastructure (CLI executor, logger, error handler)
- Add 9 file operation tools for User Story 1
- Full MCP protocol compliance with stdio transport
- Input validation and sanitization for security
- Comprehensive error handling with actionable messages
- Constitutional compliance: all 6 principles satisfied

MVP includes:
- obsidian_create_note, read, append, prepend, delete, move, rename, open, file_info
- Zod validation schemas for all parameters
- 30s timeout configuration with per-command overrides
- Stderr-only logging with sanitized output
- Graceful shutdown handling

Build:  0 errors, 0 vulnerabilities
Tasks: 48/167 complete (MVP milestone)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 11:21:38 -05:00