enhanced-mcp-tools/test_uv_build.sh
Ryan Malloy 1d199a943d 🛡️ SACRED TRUST: Complete safety framework implementation & validation
 COMPREHENSIVE SAFETY FRAMEWORK:
• Package-level safety notices with SACRED TRUST language
• Server-level LLM safety protocols with specific refusal scenarios
• Class-level safety reminders for AI assistants
• Tool-level destructive operation warnings (🔴 DESTRUCTIVE markers)
• Visual safety system: 🔴🛡️🚨 markers throughout codebase
• Emergency logging infrastructure with proper escalation
• Default-safe operations (dry_run=True for destructive tools)

🔒 DESTRUCTIVE OPERATION PROTECTIONS:
• bulk_rename: LLM safety instructions + dry_run default
• search_and_replace_batch: Comprehensive safety warnings
• All destructive tools require preview before execution
• Clear REFUSE scenarios for AI assistants

📚 COMPREHENSIVE DOCUMENTATION:
• SACRED_TRUST_SAFETY.md: Complete safety philosophy & implementation guide
• IMPLEMENTATION_COMPLETE.md: Project completion status
• EMERGENCY_LOGGING_COMPLETE.md: Logging infrastructure details
• UV_BUILD_GUIDE.md: Modern Python project setup
• Multiple implementation guides and status docs

🔧 PROJECT MODERNIZATION:
• Migrated from setup.py/requirements.txt to pyproject.toml + uv
• Updated dependency management with uv.lock
• Enhanced test suite with comprehensive coverage
• Added examples and demo scripts

 VALIDATION COMPLETE: All SACRED_TRUST_SAFETY.md requirements implemented
🎯 Sacred Trust Status: PROTECTED
🚨 User Safety: PARAMOUNT
🔐 System Integrity: PRESERVED

The human trusts AI assistants to be guardians of their system and data.
This framework ensures that trust is honored through comprehensive safety measures.
2025-06-23 11:58:48 -06:00

79 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
# Quick uv build and test script for Enhanced MCP Tools
set -e # Exit on any error
echo "🚀 Enhanced MCP Tools - uv Build & Test Script"
echo "=============================================="
# Check uv is available
if ! command -v uv &> /dev/null; then
echo "❌ uv is not installed. Install with: pip install uv"
exit 1
fi
echo "✅ uv version: $(uv --version)"
# Clean previous builds
echo "🧹 Cleaning previous builds..."
rm -rf dist/ build/ *.egg-info/
# Build package
echo "📦 Building package with uv..."
uv build
# Check build artifacts
echo "📋 Build artifacts:"
ls -la dist/
# Test installation in clean environment
echo "🧪 Testing installation..."
uv venv test-build --quiet
source test-build/bin/activate
# Install from wheel
echo "📥 Installing from wheel..."
uv pip install dist/*.whl --quiet
# Test imports
echo "🔍 Testing imports..."
python -c "
from enhanced_mcp import create_server, MCPToolServer
from enhanced_mcp.sneller_analytics import SnellerAnalytics
from enhanced_mcp.git_integration import GitIntegration
print('✅ All core imports successful')
"
# Test enhanced dependencies
echo "🚀 Testing enhanced dependencies..."
uv pip install "enhanced-mcp-tools[enhanced]" --find-links dist/ --quiet
python -c "
import aiofiles, watchdog, psutil, requests
print('✅ Enhanced dependencies installed and working')
"
# Test CLI entry point
if command -v enhanced-mcp &> /dev/null; then
echo "✅ enhanced-mcp CLI command available"
else
echo "⚠️ enhanced-mcp CLI command not found (may need PATH update)"
fi
# Cleanup
deactivate
rm -rf test-build/
echo ""
echo "🎉 SUCCESS! Enhanced MCP Tools built and tested successfully with uv"
echo ""
echo "📦 Built artifacts:"
echo " - dist/enhanced_mcp_tools-1.0.0-py3-none-any.whl"
echo " - dist/enhanced_mcp_tools-1.0.0.tar.gz"
echo ""
echo "📥 Install with:"
echo " uv pip install dist/*.whl # Core"
echo " uv pip install dist/*.whl[enhanced] # Enhanced"
echo " uv pip install dist/*.whl[full] # Full"
echo ""