yusyus
596b219599
fix: Resolve remaining 188 linting errors (249 total fixed)
...
Second batch of comprehensive linting fixes:
Unused Arguments/Variables (136 errors):
- ARG002/ARG001 (91 errors): Prefixed unused method/function arguments with '_'
- Interface methods in adaptors (base.py, gemini.py, markdown.py)
- AST analyzer methods maintaining signatures (code_analyzer.py)
- Test fixtures and hooks (conftest.py)
- Added noqa: ARG001/ARG002 for pytest hooks requiring exact names
- F841 (45 errors): Prefixed unused local variables with '_'
- Tuple unpacking where some values aren't needed
- Variables assigned but not referenced
Loop & Boolean Quality (28 errors):
- B007 (18 errors): Prefixed unused loop control variables with '_'
- enumerate() loops where index not used
- for-in loops where loop variable not referenced
- E712 (10 errors): Simplified boolean comparisons
- Changed '== True' to direct boolean check
- Changed '== False' to 'not' expression
- Improved test readability
Code Quality (24 errors):
- SIM201 (4 errors): Already fixed in previous commit
- SIM118 (2 errors): Already fixed in previous commit
- E741 (4 errors): Already fixed in previous commit
- Config manager loop variable fix (1 error)
All Tests Passing:
- test_scraper_features.py: 42 passed
- test_integration.py: 51 passed
- test_architecture_scenarios.py: 11 passed
- test_real_world_fastmcp.py: 19 passed, 1 skipped
Note: Some SIM errors (nested if, multiple with) remain unfixed as they
would require non-trivial refactoring. Focus was on functional correctness.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-01-17 23:02:11 +03:00
Pablo Estevez
c33c6f9073
change max lenght
2026-01-17 17:48:15 +00:00
Pablo Estevez
5ed767ff9a
run ruff
2026-01-17 17:29:21 +00:00
yusyus
62a51c0084
fix: Correct mock patch path for install_skill tests
...
Fixed 4 failing tests in TestPackagingTools that were patching the wrong
module path. The tests were patching:
'skill_seekers.mcp.tools.packaging_tools.fetch_config_tool'
But fetch_config_tool is actually in source_tools, not packaging_tools.
Changed all 4 tests to patch:
'skill_seekers.mcp.tools.source_tools.fetch_config_tool'
Tests now passing:
- test_install_skill_with_config_name ✅
- test_install_skill_with_config_path ✅
- test_install_skill_unlimited ✅
- test_install_skill_no_upload ✅
Result: 81/81 MCP tests passing (was 77/81)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2026-01-12 22:56:37 +03:00
yusyus
a99f71e714
feat(C2.8): Add scrape_codebase MCP tool for local codebase analysis
...
- Add scrape_codebase_tool() to scraping_tools.py (67 lines)
- Register tool in MCP server with @safe_tool_decorator
- Add tool to FastMCP server imports and exports
- Add 2 comprehensive tests for basic and advanced usage
- Update MCP server tool count from 17 to 18 tools
- Tool supports directory analysis with configurable depth
- Features: language filtering, file patterns, API reference generation
Closes #70 - C2.8 MCP Tool Integration complete
Related:
- Builds on C2.7 (codebase_scraper.py CLI tool)
- Uses existing code_analyzer.py infrastructure
- Follows same pattern as scrape_github and scrape_pdf tools
Test coverage:
- test_scrape_codebase_basic: Basic codebase analysis
- test_scrape_codebase_with_options: Advanced options testing
2026-01-01 23:18:04 +03:00
yusyus
9e41094436
feat: v2.4.0 - MCP 2025 upgrade with multi-agent support ( #217 )
...
* feat: v2.4.0 - MCP 2025 upgrade with multi-agent support
Major MCP infrastructure upgrade to 2025 specification with HTTP + stdio
transport and automatic configuration for 5+ AI coding agents.
### 🚀 What's New
**MCP 2025 Specification (SDK v1.25.0)**
- FastMCP framework integration (68% code reduction)
- HTTP + stdio dual transport support
- Multi-agent auto-configuration
- 17 MCP tools (up from 9)
- Improved performance and reliability
**Multi-Agent Support**
- Auto-detects 5 AI coding agents (Claude Code, Cursor, Windsurf, VS Code, IntelliJ)
- Generates correct config for each agent (stdio vs HTTP)
- One-command setup via ./setup_mcp.sh
- HTTP server for concurrent multi-client support
**Architecture Improvements**
- Modular tool organization (tools/ package)
- Graceful degradation for testing
- Backward compatibility maintained
- Comprehensive test coverage (606 tests passing)
### 📦 Changed Files
**Core MCP Server:**
- src/skill_seekers/mcp/server_fastmcp.py (NEW - 300 lines, FastMCP-based)
- src/skill_seekers/mcp/server.py (UPDATED - compatibility shim)
- src/skill_seekers/mcp/agent_detector.py (NEW - multi-agent detection)
**Tool Modules:**
- src/skill_seekers/mcp/tools/config_tools.py (NEW)
- src/skill_seekers/mcp/tools/scraping_tools.py (NEW)
- src/skill_seekers/mcp/tools/packaging_tools.py (NEW)
- src/skill_seekers/mcp/tools/splitting_tools.py (NEW)
- src/skill_seekers/mcp/tools/source_tools.py (NEW)
**Version Updates:**
- pyproject.toml: 2.3.0 → 2.4.0
- src/skill_seekers/cli/main.py: version string updated
- src/skill_seekers/mcp/__init__.py: 2.0.0 → 2.4.0
**Documentation:**
- README.md: Added multi-agent support section
- docs/MCP_SETUP.md: Complete rewrite for MCP 2025
- docs/HTTP_TRANSPORT.md (NEW)
- docs/MULTI_AGENT_SETUP.md (NEW)
- CHANGELOG.md: v2.4.0 entry with migration guide
**Tests:**
- tests/test_mcp_fastmcp.py (NEW - 57 tests)
- tests/test_server_fastmcp_http.py (NEW - HTTP transport tests)
- All existing tests updated and passing (606/606)
### ✅ Test Results
**E2E Testing:**
- Fresh venv installation: ✅
- stdio transport: ✅
- HTTP transport: ✅ (health check, SSE endpoint)
- Agent detection: ✅ (found Claude Code)
- Full test suite: ✅ 606 passed, 152 skipped
**Test Coverage:**
- Core functionality: 100% passing
- Backward compatibility: Verified
- No breaking changes: Confirmed
### 🔄 Migration Path
**Existing Users:**
- Old `python -m skill_seekers.mcp.server` still works
- Existing configs unchanged
- All tools function identically
- Deprecation warnings added (removal in v3.0.0)
**New Users:**
- Use `./setup_mcp.sh` for auto-configuration
- Or manually use `python -m skill_seekers.mcp.server_fastmcp`
- HTTP mode: `--http --port 8000`
### 📊 Metrics
- Lines of code: 2200 → 300 (87% reduction in server.py)
- Tools: 9 → 17 (88% increase)
- Agents supported: 1 → 5 (400% increase)
- Tests: 427 → 606 (42% increase)
- All tests passing: ✅
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
* fix: Add backward compatibility exports to server.py for tests
Re-export tool functions from server.py to maintain backward compatibility
with test_mcp_server.py which imports from the legacy server module.
This fixes CI test failures where tests expected functions like list_tools()
and generate_config_tool() to be importable from skill_seekers.mcp.server.
All tool functions are now re-exported for compatibility while maintaining
the deprecation warning for direct server execution.
* fix: Export run_subprocess_with_streaming and fix tool schemas for backward compatibility
- Add run_subprocess_with_streaming export from scraping_tools
- Fix tool schemas to include properties field (required by tests)
- Resolves 9 failing tests in test_mcp_server.py
* fix: Add call_tool router and fix test patches for modular architecture
- Add call_tool function to server.py for backward compatibility
- Fix test patches to use correct module paths (scraping_tools instead of server)
- Update 7 test decorators to patch the correct function locations
- Resolves remaining CI test failures
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com >
2025-12-26 00:45:48 +03:00