Commit Graph

710 Commits

Author SHA1 Message Date
Sven Lito
22f729a150 Merge branch 'main' of https://github.com/BeehiveInnovations/zen-mcp-server 2025-08-12 13:27:29 +07:00
Beehive Innovations
e6213d4ca1 Merge pull request #227 from svnlto/fix/uvx-resource-packaging
fix: uvx resource packaging issues for OpenRouter functionality
2025-08-11 12:31:49 -07:00
Sven Lito
db07fa4651 Apply Black formatting to fix CI formatting check 2025-08-10 22:21:16 +07:00
Sven Lito
673d78be6d Fix failing tests and exclude .zen_venv from linting
- Fix test_resource_loading_success by removing outdated mock targeting non-existent 'files' import
- Simplify resource loading test to validate registry functionality directly
- Add .zen_venv exclusion to ruff and black in code_quality_checks.sh
- All tests now passing (793/793) with clean linting
2025-08-10 22:18:08 +07:00
Sven Lito
5e599b9e7d Complete PR review feedback implementation with clean importlib.resources approach
- Remove redundant path checks between Path("conf/custom_models.json") and Path.cwd() variants
- Implement proper importlib.resources.files('conf') approach for robust packaging
- Create conf/__init__.py to make conf a proper Python package
- Update pyproject.toml to include conf* in package discovery
- Clean up verbose comments and simplify resource loading logic
- Fix test mocking to use correct importlib.resources.files target
- All tests passing (8/8) with proper resource and fallback functionality

Addresses all gemini-code-assist bot feedback from PR #227
2025-08-10 22:13:25 +07:00
Sven Lito
84de9b026f Address PR review feedback: Implement proper importlib.resources approach
Improvements based on gemini-code-assist bot feedback:

1. **Proper importlib.resources implementation:**
   - Use files("providers") / "../conf/custom_models.json" for resource loading
   - Prioritize resource loading over file system paths for packaged environments
   - Maintain backward compatibility with explicit config paths and env variables

2. **Remove redundant path checks:**
   - Eliminated duplicate Path("conf/custom_models.json") and Path.cwd() / "conf/custom_models.json"
   - Streamlined fallback logic to development path + working directory only

3. **Enhanced test coverage:**
   - Mock-based testing of actual fallback scenarios with Path.exists
   - Proper resource loading simulation and failure testing
   - Comprehensive coverage of both resource and file system modes

4. **Robust error handling:**
   - Graceful fallback from resources to file system when resource loading fails
   - Clear logging of which loading method is being used
   - Better error messages indicating resource vs file system loading

The implementation now follows Python packaging best practices using importlib.resources
while maintaining full backward compatibility and robust fallback behavior.

Tested: All 8 test cases pass, resource loading works in development,
file system fallback works when resources fail.
2025-08-10 21:36:40 +07:00
Sven Lito
5565f59a1c Fix uvx resource packaging issues for OpenRouter functionality
Resolves issues #203, #186, #206, #185 where OpenRouter model registry
completely failed to load in uvx installations due to inaccessible
conf/custom_models.json file.

Changes:
- Implement multiple path resolution strategy in OpenRouterModelRegistry
  - Development: Path(__file__).parent.parent / "conf" / "custom_models.json"
  - UVX working dir: Path("conf/custom_models.json")
  - Current working dir: Path.cwd() / "conf" / "custom_models.json"
- Add importlib-resources fallback for Python < 3.9 compatibility
- Add comprehensive test suite for path resolution scenarios
- Ensure graceful handling when config files are missing

The fix restores full OpenRouter functionality (15 models, 62+ aliases)
for users installing via uvx while maintaining backward compatibility
for development and explicit config scenarios.

Tested: All path resolution scenarios pass, OpenRouter models load correctly
2025-08-10 21:27:48 +07:00
Beehive Innovations
123851d50a Merge pull request #222 from svnlto/fix/pip-detection-clean
fix: pip detection inconsistency in non-interactive shells
2025-08-09 12:09:50 -07:00
Sven Lito
ee520825b4 fix: address PR review feedback on test quality
- Remove broken test with unused mock parameter
- Replace placeholder test with actual validation of diagnostic messages
- Remove unused imports (MagicMock, patch)
- Fix whitespace and formatting issues
- Ensure all 6 tests pass with meaningful assertions

Addresses high-priority feedback from PR review comments.
2025-08-08 23:58:19 +07:00
Sven Lito
8c38ef44b5 test: remove empty placeholder test cases
Remove 7 empty test methods that contained only 'pass' statements:
- TestPipDetectionPlatformCompatibility (4 methods)
- TestPipDetectionRegression (3 methods)

Keep working tests that have actual logic and assertions.
2025-08-08 23:53:48 +07:00
Sven Lito
cce6f7106c style: format test file with black 2025-08-08 23:49:24 +07:00
Sven Lito
7c6ec4a928 fix: resolve pip detection inconsistency in non-interactive shells
- Convert virtual environment Python paths to absolute paths to ensure
  consistency across different shell environments (Git Bash, WSL, etc.)
- Add enhanced diagnostic information when pip detection fails to help
  users troubleshoot path and environment issues
- Improve error messages with specific guidance for different platforms
- Fix black configuration to exclude .zen_venv directory from formatting
- Add comprehensive test suite for pip detection edge cases

Fixes #188
2025-08-08 23:49:24 +07:00
Sven Lito
bbf4afa327 feat: optimize PR Docker build to only run for relevant changes
- Add path filters to only trigger Docker builds for Python/Docker-related changes
- Includes: **.py, requirements*.txt, pyproject.toml, Dockerfile, docker-compose.yml, .dockerignore
- Avoids unnecessary builds for documentation-only or workflow-only PRs
- Saves CI resources and avoids permission issues for irrelevant changes
2025-08-08 17:51:24 +07:00
Sven Lito
a5597bbcde feat: add semantic PR validation workflow
- Validates PR titles against conventional commit standards
- Adds helpful comments when titles don't follow format
- Auto-deletes comments when titles are fixed
- Uses standard GITHUB_TOKEN (no special app setup needed)
- Enforces consistency with semantic-release workflow
2025-08-08 17:48:53 +07:00
Sven Lito
fcaf0d6917 fix: correct pre-commit global exclude pattern and remove redundant excludes
- Remove $ anchor from global exclude pattern to properly exclude files within directories
- Remove redundant exclude properties from black and ruff hooks since global exclude now handles it
- Ensures isort hook also excludes test_simulation_files/ consistently

Addresses reviewer feedback on PR #217
2025-08-08 17:39:25 +07:00
Sven Lito
af3a81543c feat: streamline GitHub Actions workflows and improve contributor experience
- Replace complex auto-version.yml with simple PR Docker build workflow
  - Builds Docker images for all PRs using pr-number-sha tagging
  - Removes redundant versioning logic (semantic-release handles this)
  - Adds automatic PR comments with Docker usage instructions

- Optimize test.yml workflow triggers
  - Remove redundant push triggers on main branch
  - Focus on PR testing only for better developer feedback

- Add docker-release.yml for production releases
  - Triggers on GitHub release publication
  - Multi-platform builds (linux/amd64, linux/arm64)
  - Updates release notes with Docker installation instructions

- Add semantic-release.yml workflow for automated versioning
  - Uses conventional commits for version bumping
  - Automatically generates releases and tags
  - Integrates with Docker workflow via release triggers

- Add pre-commit configuration for automatic code quality
  - Includes ruff (with auto-fix), black, isort
  - Provides faster development workflow option

- Enhance contribution documentation
  - Add pre-commit hook option as recommended approach
  - Keep manual script option for comprehensive testing
  - Improve developer workflow guidance

Fixes #215 (automatic changelog generation)
Addresses #110 (Docker builds automation)
References #107 (improved version tracking)

This creates a clean, modern CI/CD pipeline that eliminates redundancy
while addressing multiple community requests around changelog generation,
Docker builds, and release automation.
2025-08-08 17:33:51 +07:00
Fahad
e29deb23db Improvements to consensus 2025-08-08 12:59:41 +05:00
Fahad
b212cae5de Fixed labeling 2025-08-08 12:35:30 +05:00
Fahad
1c3dea3a08 Fixed labeling 2025-08-08 12:33:41 +05:00
Fahad
cded4c1251 Merge branch 'refactor-image-validation' 2025-08-08 12:01:28 +05:00
Fahad
9c3bf26b83 Bump version 2025-08-08 11:57:53 +05:00
Fahad
74ec6210f9 Better portability 2025-08-08 11:55:27 +05:00
Beehive Innovations
e67a66f582 Merge pull request #193 from nsp/feat/continue-setup-without-api-keys
feat: Continue Python environment setup even without API keys
2025-08-07 23:29:50 -07:00
Beehive Innovations
d969582473 Merge pull request #179 from GiGiDKR/fix-pr#151
fix: PR#151 - Enhance cross-platform support
2025-08-07 23:21:25 -07:00
Beehive Innovations
a1e0a57d6a Merge pull request #192 from nsp/refactor-image-validation
refactor: Extract image validation to provider base class
2025-08-07 23:19:41 -07:00
Fahad
f9dd55cfd3 Fix linting issues: add missing base64 import and remove unused import
- Add missing base64 import in providers/base.py
- Remove unused base64 import from providers/openai_compatible.py
- All tests now pass (19/19 image validation tests)
- Code quality checks pass 100%
2025-08-08 11:17:50 +05:00
Beehive Innovations
c993942efc Update base.py
removed unused import
2025-08-08 10:13:19 +04:00
Beehive Innovations
f7a079bc35 Merge branch 'main' into refactor-image-validation 2025-08-07 23:12:00 -07:00
Fahad
19ae3c5e9c Fixed tests 2025-08-08 11:11:22 +05:00
Beehive Innovations
28eed993d9 Merge pull request #191 from rwl4/grok4-support
Add configuration for Grok 4.
2025-08-07 23:08:03 -07:00
Beehive Innovations
912cde42d1 Update test_xai_provider.py 2025-08-08 10:06:38 +04:00
Beehive Innovations
8a884c57d6 Merge branch 'main' into grok4-support 2025-08-07 23:04:15 -07:00
Fahad
fcb0fe3ef2 Fix o3-pro model resolution to use o3-pro consistently
- Use o3-pro throughout the codebase instead of o3-pro-2025-06-10
- Update test expectations to match o3-pro model name
- Update cassette to use o3-pro for consistency
- Ensure responses endpoint routing works correctly with o3-pro

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-08 10:52:23 +05:00
Fahad
2fdc8fad72 Resolve merge conflicts in o3-pro response parsing fix
- Use new output_text field format for o3-pro responses
- Update test expectations to use resolved model name o3-pro-2025-06-10
- Keep HTTP transport recorder and PII sanitization improvements
- Preserve both bug fix and recent GPT-5 updates

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-08 10:48:56 +05:00
Fahad
5ef13d1628 GPT 5 nano 2025-08-08 10:43:25 +05:00
Beehive Innovations
bea021a021 Merge pull request #207 from GiGiDKR/fix/workflow-localization-signature-harmonization
fix: harmonize method signatures and add localization support for workflow tools
2025-08-07 22:35:46 -07:00
Beehive Innovations
fc89d79c74 Merge pull request #174 from dpieski/main
fix: WSL script crash when wslvar command unavailable
2025-08-07 22:32:39 -07:00
Beehive Innovations
55bdb72a78 Update run-server.sh
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-08-08 09:32:00 +04:00
Fahad
7761cec1bc Updated config 2025-08-08 10:05:27 +05:00
Fahad
2fa2d5a408 Fixed contamination in consensus https://github.com/BeehiveInnovations/zen-mcp-server/issues/162
Fixed broken test
2025-08-08 10:04:40 +05:00
Fahad
2bbb858d93 Fixed broken test 2025-08-08 09:54:23 +05:00
Fahad
d24987c103 Fixed broken test 2025-08-08 09:46:28 +05:00
Fahad
7f37efcbfe Grok-4 support 2025-08-08 09:39:07 +05:00
Fahad
6e7f07c49d Improved "/zen:continue" prompt instructions to re-use previous model 2025-08-08 09:21:30 +05:00
Fahad
8203baa4ef Ensure continuation id is passed back 2025-08-08 09:01:44 +05:00
Fahad
1a8ec2e12f GPT-5, GPT-5-mini support
Improvements to model name resolution
Improved instructions for multi-step workflows when continuation is available
Improved instructions for chat tool
Improved preferred model resolution, moved code from registry -> each provider
Updated tests
2025-08-08 08:51:34 +05:00
Fahad
9a4791cb06 Updated description 2025-08-08 05:26:45 +05:00
Raymond Lucke
22b22f7518 Merge pull request #1 from energee/grok4-support
Update docs for grok 4
2025-07-25 11:53:51 -07:00
GiGiDKR
d327c90d82 fix: use precise type hint Optional[dict[str, Any]] for arguments parameter
- Update arguments parameter type hint from Optional[dict] to Optional[dict[str, Any]] in workflow_mixin.py
- Ensures consistency with BaseTool and improves static analysis and code clarity
- No functional changes, only type annotation improvement

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-07-25 07:00:22 +02:00
OhMyApps
81551f8452 fix: harmonize method signatures and add localization support for workflow tools
- Add LOCALE-based localization support to all workflow tools
- Harmonize method signatures for prepare_prompt and _prepare_file_content_for_prompt
- Remove obsolete methods and clarify comments
- Ensure consistent behavior between SimpleTool and WorkflowTool
2025-07-25 06:48:44 +02:00