Reorganized project structure for better maintainability and reduced disk usage by 95.9% (11 GB -> 451 MB). Directory Reorganization (85% reduction in root files): - Created docs/ with subdirectories (deployment, testing, database, etc.) - Created infrastructure/vpn-configs/ for VPN scripts - Moved 90+ files from root to organized locations - Archived obsolete documentation (context system, offline mode, zombie debugging) - Moved all test files to tests/ directory - Root directory: 119 files -> 18 files Disk Cleanup (10.55 GB recovered): - Deleted Rust build artifacts: 9.6 GB (target/ directories) - Deleted Python virtual environments: 161 MB (venv/ directories) - Deleted Python cache: 50 KB (__pycache__/) New Structure: - docs/ - All documentation organized by category - docs/archives/ - Obsolete but preserved documentation - infrastructure/ - VPN configs and SSH setup - tests/ - All test files consolidated - logs/ - Ready for future logs Benefits: - Cleaner root directory (18 vs 119 files) - Logical organization of documentation - 95.9% disk space reduction - Faster navigation and discovery - Better portability (build artifacts excluded) Build artifacts can be regenerated: - Rust: cargo build --release (5-15 min per project) - Python: pip install -r requirements.txt (2-3 min) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
63 lines
2.8 KiB
Plaintext
63 lines
2.8 KiB
Plaintext
================================================================================
|
|
COMPLETE DEPLOYMENT - All Modified Files
|
|
================================================================================
|
|
|
|
Files that need to be updated:
|
|
1. api/routers/conversation_contexts.py (DONE - already deployed)
|
|
2. api/services/conversation_context_service.py
|
|
3. api/models/__init__.py
|
|
4. api/models/conversation_context.py
|
|
5. api/models/context_tag.py (NEW file)
|
|
|
|
|
|
STEP 1: Copy files from local machine
|
|
--------------------------------------
|
|
Run these in PowerShell:
|
|
|
|
pscp D:\ClaudeTools\api\services\conversation_context_service.py guru@172.16.3.30:/tmp/conv_service.py
|
|
pscp D:\ClaudeTools\api\models\__init__.py guru@172.16.3.30:/tmp/models_init.py
|
|
pscp D:\ClaudeTools\api\models\conversation_context.py guru@172.16.3.30:/tmp/conversation_context.py
|
|
pscp D:\ClaudeTools\api\models\context_tag.py guru@172.16.3.30:/tmp/context_tag.py
|
|
|
|
|
|
STEP 2: Deploy files on server
|
|
--------------------------------
|
|
Run these in your SSH session (as root):
|
|
|
|
# Move service file
|
|
mv /tmp/conv_service.py /opt/claudetools/api/services/conversation_context_service.py
|
|
|
|
# Move model files
|
|
mv /tmp/models_init.py /opt/claudetools/api/models/__init__.py
|
|
mv /tmp/conversation_context.py /opt/claudetools/api/models/conversation_context.py
|
|
mv /tmp/context_tag.py /opt/claudetools/api/models/context_tag.py
|
|
|
|
# Restart API
|
|
systemctl restart claudetools-api
|
|
|
|
# Check status (should show recent timestamp)
|
|
systemctl status claudetools-api --no-pager | head -15
|
|
|
|
|
|
STEP 3: Test API
|
|
-----------------
|
|
Exit SSH and run in PowerShell:
|
|
|
|
python -c "import requests; r=requests.get('http://172.16.3.30:8001/api/conversation-contexts/recall', headers={'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJpbXBvcnQtc2NyaXB0Iiwic2NvcGVzIjpbImFkbWluIiwiaW1wb3J0Il0sImV4cCI6MTc3MTI3NTEyOX0.-DJF50tq0MaNwVQBdO7cGYNuO5pQuXte-tTj5DpHi2U'}, params={'search_term': 'dataforth', 'limit': 2}); data=r.json(); print('SUCCESS!' if 'contexts' in data else f'Failed: {data.get(\"detail\", list(data.keys()))}'); print(f'Found {len(data.get(\"contexts\", []))} contexts' if 'contexts' in data else '')"
|
|
|
|
Expected: "SUCCESS!" and "Found 2 contexts"
|
|
|
|
|
|
================================================================================
|
|
QUICK COPY-PASTE for Server (after pscp commands):
|
|
================================================================================
|
|
|
|
mv /tmp/conv_service.py /opt/claudetools/api/services/conversation_context_service.py && \
|
|
mv /tmp/models_init.py /opt/claudetools/api/models/__init__.py && \
|
|
mv /tmp/conversation_context.py /opt/claudetools/api/models/conversation_context.py && \
|
|
mv /tmp/context_tag.py /opt/claudetools/api/models/context_tag.py && \
|
|
systemctl restart claudetools-api && \
|
|
systemctl status claudetools-api --no-pager | head -15
|
|
|
|
================================================================================
|