Commit Graph

232 Commits

Author SHA1 Message Date
Fahad
6b5ab1f77e Updated readme 2025-06-11 20:33:16 +04:00
Fahad
e0abb93e9c Updated readme 2025-06-11 20:27:17 +04:00
Fahad
22a3fb91ed feat: Add comprehensive dynamic configuration system v3.3.0
## Major Features Added

### 🎯 Dynamic Configuration System
- **Environment-aware model selection**: DEFAULT_MODEL with 'pro'/'flash' shortcuts
- **Configurable thinking modes**: DEFAULT_THINKING_MODE_THINKDEEP for extended reasoning
- **All tool schemas now dynamic**: Show actual current defaults instead of hardcoded values
- **Enhanced setup workflow**: Copy from .env.example with smart customization

### 🔧 Model & Thinking Configuration
- **Smart model resolution**: Support both shortcuts ('pro', 'flash') and full model names
- **Thinking mode optimization**: Only apply thinking budget to models that support it
- **Flash model compatibility**: Works without thinking config, still beneficial via system prompts
- **Dynamic schema descriptions**: Tool parameters show current environment values

### 🚀 Enhanced Developer Experience
- **Fail-fast Docker setup**: GEMINI_API_KEY required upfront in docker-compose
- **Comprehensive startup logging**: Shows current model and thinking mode defaults
- **Enhanced get_version tool**: Reports all dynamic configuration values
- **Better .env documentation**: Clear token consumption details and model options

### 🧪 Comprehensive Testing
- **Live model validation**: New simulator test validates Pro vs Flash thinking behavior
- **Dynamic configuration tests**: Verify environment variable overrides work correctly
- **Complete test coverage**: All 139 unit tests pass, including new model config tests

### 📋 Configuration Files Updated
- **docker-compose.yml**: Fail-fast API key validation, thinking mode support
- **setup-docker.sh**: Copy from .env.example instead of manual creation
- **.env.example**: Detailed documentation with token consumption per thinking mode
- **.gitignore**: Added test-setup/ for cleanup

### 🛠 Technical Improvements
- **Removed setup.py**: Fully Docker-based deployment (no longer needed)
- **REDIS_URL smart defaults**: Auto-configured for Docker, still configurable for dev
- **All tools updated**: Consistent dynamic model parameter descriptions
- **Enhanced error handling**: Better model resolution and validation

## Breaking Changes
- Removed setup.py (Docker-only deployment)
- Model parameter descriptions now show actual defaults (dynamic)

## Migration Guide
- Update .env files using new .env.example format
- Use 'pro'/'flash' shortcuts or full model names
- Set DEFAULT_THINKING_MODE_THINKDEEP for custom thinking depth

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-11 20:10:25 +04:00
Fahad
f797480006 Removed 2025-06-11 18:50:22 +04:00
Fahad
b0f17f741f Fixed invalid test assumptions 2025-06-11 18:49:30 +04:00
Fahad
8a869661bb More tests 2025-06-11 18:45:19 +04:00
Fahad
898373bc22 More tests 2025-06-11 18:44:34 +04:00
Fahad
ee3b9fdcd8 Always return a continuation offer 2025-06-11 18:32:23 +04:00
Fahad
4974fbc725 Extra logging and more tests 2025-06-11 18:26:13 +04:00
Fahad
3aef6e961b Ignore test files 2025-06-11 17:25:05 +04:00
Fahad
e8df6a7a31 Comments 2025-06-11 17:18:40 +04:00
Fahad
780000f9c9 Lots of tests with live simulation to validate conversation continuation / preservation work across requests 2025-06-11 17:16:05 +04:00
Fahad
c90ac7561e Lots of tests with live simulation to validate conversation continuation / preservation work across requests 2025-06-11 17:03:09 +04:00
Fahad
ac763e0213 More tests 2025-06-11 14:34:51 +04:00
Fahad
2e954b61ed WIP - improvements to token usage tracking, simulator added for live testing, improvements to file loading 2025-06-11 14:17:27 +04:00
Fahad
98eab46abf WIP - improvements to token usage tracking, simulator added for live testing, improvements to file loading 2025-06-11 13:24:59 +04:00
Fahad
5a94737516 Fix conversation history duplication and optimize file embedding
This major refactoring addresses critical bugs in conversation history management
and significantly improves token efficiency through intelligent file embedding:

**Key Improvements:**
• Fixed conversation history duplication bug by centralizing reconstruction in server.py
• Added intelligent file filtering to prevent re-embedding files already in conversation history
• Centralized file processing logic in BaseTool._prepare_file_content_for_prompt()
• Enhanced log monitoring with better categorization and file embedding visibility
• Updated comprehensive test suite to verify new architecture and edge cases

**Architecture Changes:**
• Removed duplicate conversation history reconstruction from tools/base.py
• Conversation history now handled exclusively by server.py:reconstruct_thread_context
• All tools now use centralized file processing with automatic deduplication
• Improved token efficiency by embedding unique files only once per conversation

**Performance Benefits:**
• Reduced token usage through smart file filtering
• Eliminated redundant file embeddings in continued conversations
• Better observability with detailed debug logging for file operations

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-11 11:40:12 +04:00
Beehive Innovations
4466d1d1fe Update README.md 2025-06-11 10:41:47 +04:00
Beehive Innovations
1a57bea95b Update README.md 2025-06-11 10:41:07 +04:00
Fahad
d880951da0 Improved server logging 2025-06-11 10:20:30 +04:00
Fahad
f08153bad4 Fixed server 2025-06-11 09:21:54 +04:00
Fahad
19a5c3e8ee Bumped max turns 2025-06-11 09:03:50 +04:00
Fahad
94f542c76a fix: critical conversation history bug and improve Docker integration
This commit addresses several critical issues and improvements:

🔧 Critical Fixes:
- Fixed conversation history not being included when using continuation_id in AI-to-AI conversations
- Fixed test mock targeting issues preventing proper conversation memory validation
- Fixed Docker debug logging functionality with Gemini tools

🐛 Bug Fixes:
- Docker compose configuration for proper container command execution
- Test mock import targeting from utils.conversation_memory.* to tools.base.*
- Version bump to 3.1.0 reflecting significant improvements

🚀 Improvements:
- Enhanced Docker environment configuration with comprehensive logging setup
- Added cross-tool continuation documentation and examples in README
- Improved error handling and validation across all tools
- Better logging configuration with LOG_LEVEL environment variable support
- Enhanced conversation memory system documentation

🧪 Testing:
- Added comprehensive conversation history bug fix tests
- Added cross-tool continuation functionality tests
- All 132 tests now pass with proper conversation history validation
- Improved test coverage for AI-to-AI conversation threading

 Code Quality:
- Applied black, isort, and ruff formatting across entire codebase
- Enhanced inline documentation for conversation memory system
- Cleaned up temporary files and improved repository hygiene
- Better test descriptions and coverage for critical functionality

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-11 08:53:45 +04:00
Fahad
14ccbede43 Fixes https://github.com/BeehiveInnovations/gemini-mcp-server/issues/6 2025-06-11 07:09:28 +04:00
Fahad
ede44cc1d2 docs: reorganize README structure - move AI-to-AI section for better flow
• Moved AI-to-AI Conversation Threading section after "Start Using It\!"
• Now appears before Available Tools for logical progression
• Users learn basics first, then discover advanced collaboration features
• Improves documentation flow and user experience

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-10 21:17:13 +04:00
Fahad
91d96cd177 feat: release v3.0.0 with AI-to-AI conversation threading and MCP bypass
Major release introducing true AI collaboration capabilities:

• AI-to-AI conversation threading with Redis persistence
• Asynchronous workflow support - Claude can work between exchanges
• Incremental updates automatically bypass MCP's 25K token limit
• Cross-questioning and coordinated problem-solving between AIs
• Enhanced documentation with SwiftUI vs UIKit debate example
• Comprehensive test coverage and linting compliance
• Docker-first architecture with simplified setup

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-10 21:15:48 +04:00
Fahad
5331da4b59 Updated readme 2025-06-10 20:58:32 +04:00
Fahad
a5211e6dd7 Merge remote-tracking branch 'origin/main' 2025-06-10 20:53:28 +04:00
Fahad
ce23a996c6 Conversation threading test fixes 2025-06-10 20:53:20 +04:00
Beehive Innovations
84ef5adbe0 Update README.md 2025-06-10 20:45:42 +04:00
Beehive Innovations
c9ac5c73e8 Update README.md 2025-06-10 20:40:13 +04:00
Beehive Innovations
0f4e6cb056 Update README.md 2025-06-10 20:35:25 +04:00
Fahad
7ffbfc9596 WIP - communication memory 2025-06-10 20:04:13 +04:00
Fahad
f5060367a0 WIP - communication memory 2025-06-10 19:16:51 +04:00
Fahad
bb8a101dbf cleanup: remove Windows native support, enforce WSL requirement
Remove Windows batch scripts and native setup instructions since Claude Code CLI
requires WSL on Windows. Consolidate Docker as primary recommendation across all platforms.

Changes:
- Remove setup.bat, run_gemini.bat, setup-docker-env.bat
- Remove examples/claude_config_windows.json
- Update README to clarify WSL requirement for Windows users
- Promote Docker as recommended setup for all platforms
- Update troubleshooting section for WSL-only support
- Apply code formatting fixes from ruff/black

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-10 16:30:58 +04:00
Fahad
1be339ecc0 enhance: improve tool prompts with better file request grounding and response guidance
- Update DEBUG_ISSUE_PROMPT to request files when diagnostics are irrelevant/incomplete
- Clarify question field to specify what information is needed from Claude/user
- Update chat tool format_response to ask Claude to continue with user's request
- Update debug tool format_response to encourage implementing fixes when root cause identified
- Fix line length formatting to comply with 120 char limit

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-10 14:59:18 +04:00
Fahad
7ab0d42dd3 enhance: improve CHAT_PROMPT with file request grounding and technology-aware collaboration
- Add file request capability using JSON format like THINKDEEP_PROMPT
- Include technology stack awareness and grounding instructions
- Ensure collaboration stays within project scope and constraints
- Fix trailing whitespace issues identified by ruff linter

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-10 14:47:36 +04:00
Fahad
032e783efb Groundings added 2025-06-10 14:39:14 +04:00
Fahad
40a5dfccde enhance: improve tool prompts with technology-aware guidance and grounding
- Add technology-specific considerations to all tool prompts (THINKDEEP, CODEREVIEW, DEBUG, ANALYZE, PRECOMMIT)
- Replace specific technology lists with generic key areas to prevent misdirection
- Add comprehensive grounding statements to prevent overstepping scope
- Enhance DEBUG_ISSUE_PROMPT with regression prevention guidance
- Add scope discipline and focus requirements to all prompts
- Fix trailing whitespace issues

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-10 14:25:26 +04:00
Fahad
3f93444f45 Groundings added 2025-06-10 14:23:43 +04:00
Fahad
19b9435f95 Improved prompts 2025-06-10 14:17:26 +04:00
Fahad
385c42f6a5 Tailor reviews around tech stack 2025-06-10 13:59:12 +04:00
Fahad
7a5c9bfb8d enhance: improve code review prompt with technology-specific guidance
Add comprehensive technology-specific review categories and instructions to analyze codebase technology stack before reviewing. This enhancement will provide more targeted and relevant code reviews by adapting to different frameworks and patterns.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-10 13:52:24 +04:00
Fahad
157f80b47b style: apply black formatting to server.py
- Fixed code formatting in server.py using black
- Only formatting changes, no functional modifications
- Ensures consistent code style across the project

All tests pass (96/96) and linting is clean:
-  pytest: 96 tests passed
-  ruff: all checks passed
-  black: formatting applied
-  isort: import sorting correct

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-10 13:29:15 +04:00
Fahad
6495b29d47 fix: use proper ServerCapabilities for InitializationOptions
- Replaced plain dict capabilities with proper ServerCapabilities object
- Added proper imports for ServerCapabilities and ToolsCapability from mcp.types
- Now correctly declares tools capability using ToolsCapability() instead of empty dict
- This follows the MCP protocol specification for server capability declaration

The previous implementation used {"tools": {}} which was not the correct way
to declare tool capabilities according to the MCP Python SDK. This fix ensures
proper capability negotiation during MCP client connection initialization.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-10 13:20:15 +04:00
Fahad
42169b2452 docs: fix thinkdeep default thinking mode in documentation
- Corrected thinking modes table to show `high` as default for thinkdeep (not `max`)
- Moved the default notation from `max` row to `high` row where it belongs
- This aligns with the actual tool implementation which uses "high" as default

The thinkdeep tool uses "high" (16,384 tokens) as its default thinking mode,
not "max" (32,768 tokens) as previously documented.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-10 13:12:17 +04:00
Fahad
8360b3ef70 docs: remove redundant Triggers sections from tool descriptions
- Removed all "Triggers:" lines from tool descriptions in README
- The trigger words were redundant since prompt examples already show usage
- Makes documentation cleaner and more focused on actual usage patterns

The prompt examples throughout the documentation already demonstrate
how to invoke each tool, making the trigger word lists unnecessary.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-10 12:56:35 +04:00
Fahad
96d30bf000 docs: add Web Search Integration section and update capability descriptions
- Added dedicated "Web Search Integration" section explaining the new behavior
- Updated all web search capability descriptions to reflect that Gemini recommends searches for Claude
- Added to table of contents for easy navigation
- Explained how the feature works with concrete examples
- Listed benefits of the collaborative approach
- Added note about disabling web search when needed

The documentation now clearly explains that:
- Web search is enabled by default
- Gemini analyzes when searches would help
- Provides specific search recommendations for Claude
- Claude performs the actual searches
- More collaborative and transparent approach

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-10 12:55:19 +04:00
Fahad
7cb0186389 docs: update README with renamed tool names and fix syntax error
- Updated all references in README.md from old tool names to new ones:
  - think_deeper → thinkdeep
  - review_code → codereview
  - review_changes → precommit
- Fixed syntax error in base.py (unterminated f-string literal)
- Removed trailing whitespace to pass linting
- All tests now pass (96 tests)
- All linting checks pass (ruff, black, isort)

This completes the tool renaming refactor with full documentation updates.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-10 12:51:55 +04:00
Fahad
3d958ef7e9 feat: enhance websearch functionality with reasoning-based approach
- Changed use_websearch default from False to True for all tools
- Redesigned websearch behavior to focus on reasoning rather than direct search
- Tools now analyze when web searches would be helpful and recommend specific searches
- Updated all tool-specific websearch instructions to be more thoughtful
- Gemini will now suggest what Claude should search for and explain why

Key improvements:
- Web search is now enabled by default for better documentation awareness
- Instead of performing searches, Gemini reasons about what searches would help
- Provides specific search recommendations for Claude to execute
- More collaborative approach between Gemini and Claude

This change makes the tools more intelligent about when external information
would be valuable while keeping Claude in control of actual web searches.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-10 12:45:57 +04:00