Commit Graph

12 Commits

Author SHA1 Message Date
olaservo
bbbc0c6381 Fix TypeScript error in filesystem tests by adding missing afterEach import
The afterEach function was used in the test file but not imported from vitest, causing a build failure. This was introduced in PR #2851.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 21:06:25 -07:00
Ola Hungerford
d2eb945c4d Merge pull request #2851 from olaservo/fix-wsl-path-conversion
Resolve filesystem issue where WSL paths are incorrectly converted to Windows format
2025-10-28 18:56:58 -07:00
olaservo
b666e7f246 Migrate sequentialthinking and filesystem servers from Jest to Vitest
- Replace Jest dependencies with Vitest and @vitest/coverage-v8
- Update test scripts to use 'vitest run --coverage'
- Create vitest.config.ts for both servers with node environment and coverage settings
- Update all test files:
  - Change imports from '@jest/globals' to 'vitest'
  - Replace jest.mock() with vi.mock()
  - Replace jest.fn() with vi.fn()
  - Update mock clearing/restoring to use vi methods
- Remove jest.config.cjs files
- All 151 tests passing (24 in sequentialthinking, 127 in filesystem)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 11:21:58 -07:00
olaservo
c9b0135aa5 fix: preserve WSL paths and improve path normalization logic 2025-10-12 19:59:22 -07:00
Finn Andersen
fd886fac9c Support glob pattern in search_files tool (#745)
Co-authored-by: Adam Jones <adamj+git@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Adam Jones <adamj@anthropic.com>
2025-08-23 07:37:53 +01:00
Enrico Ballardini
d381cf1ffd feat(directory_tree): add excludePatterns support & documentation (#623)
- Update documentation with directory_tree declaration
- Add excludePatterns parameter to DirectoryTreeArgsSchema
- Implement pattern exclusion in buildTree function using minimatch
- Pass excludePatterns through recursive calls
- Support both simple and glob patterns for exclusion
- Maintain consistent behavior with search_files implementation

* Add tests and fix implementation

---------

Co-authored-by: Ola Hungerford <olahungerford@gmail.com>
Co-authored-by: Adam Jones <adamj+git@anthropic.com>
Co-authored-by: Adam Jones <adamj@anthropic.com>
2025-08-23 07:19:01 +01:00
Michael Casazza
46368832ef Windows filesystem MCP enhancements (#543)
* fix: comprehensive Windows path handling improvements

- Add path-utils module for consistent path handling
- Handle Windows paths with spaces via proper quoting
- Support Unix-style Windows paths (/c/path)
- Support WSL paths (/mnt/c/path)
- Add comprehensive test coverage
- Fix path normalization for all path formats

Closes #447

* tested locally and working now

* Add filesystem path utils and tests

* Ensure Windows drive letters are capitalized in normalizePath

* adding test for gh pr comment

* pushing jest and windows testing config

* last commit? fixing comments on PR

* Fix bin and bump sdk

* Remove redundant commonjs version of path-utils and import from ts version

* Remove copying cjs file

* Remove copying run-server

* Remove complex args parsing and do other cleanup

* Add missing tools details to Readme

* Move utility functions from index to lib

* Add more tests and handle very small and very large files edge cases

* Finish refactoring and include original security fix comments

* On Windows, also check for drive root

* Check symlink support on restricted Windows environments

* Fix tests

* Bump SDK and package version

* Clean up

---------

Co-authored-by: olaservo <olahungerford@gmail.com>
Co-authored-by: adam jones <adamj+git@anthropic.com>
2025-08-18 18:23:40 +01:00
Nandha Reddy
f8dd74576b feat(filesystem): implement MCP roots protocol for dynamic directory management
- Extract roots processing logic from index.ts into testable roots-utils.ts module and add Test suite
- Update README to recommend MCP roots protocol for dynamic directory management
2025-07-02 09:44:16 +10:00
Jenn Newton
d00c60df9d Address symlink and path prefix issues with allowed directories 2025-06-30 20:04:46 -04:00
Ola Hungerford
78fe5d5e47 Address PR review comments: fix UNC path handling, improve test coverage, remove problematic test files
- Fixed UNC path handling bug in normalizePath function to preserve leading double backslashes
- Added comprehensive test coverage for drive letter capitalization and UNC paths
- Removed file-operations.test.ts and core-functionality.test.ts as they were testing their own code rather than actual server functionality
- All path-utils tests now pass with 100% coverage of the actual utility functions
2025-06-18 07:29:25 -07:00
Ola Hungerford
d55afe1fa4 Add more tests 2025-06-16 17:29:44 -07:00
olaservo
8bdd270abb Add working test config for filesystem 2025-04-13 20:02:08 -07:00