Remove conversation context/recall system from ClaudeTools
Completely removed the database context recall system while preserving database tables for safety. This major cleanup removes 80+ files and 16,831 lines of code. What was removed: - API layer: 4 routers (conversation-contexts, context-snippets, project-states, decision-logs) with 35+ endpoints - Database models: 5 models (ConversationContext, ContextSnippet, DecisionLog, ProjectState, ContextTag) - Services: 4 service layers with business logic - Schemas: 4 Pydantic schema files - Claude Code hooks: 13 hook files (user-prompt-submit, task-complete, sync-contexts, periodic saves) - Scripts: 15+ scripts (import, migration, testing, tombstone checking) - Tests: 5 test files (context recall, compression, diagnostics) - Documentation: 30+ markdown files (guides, architecture, quick starts) - Utilities: context compression, conversation parsing Files modified: - api/main.py: Removed router registrations - api/models/__init__.py: Removed model imports - api/schemas/__init__.py: Removed schema imports - api/services/__init__.py: Removed service imports - .claude/claude.md: Completely rewritten without context references Database tables preserved: - conversation_contexts, context_snippets, context_tags, project_states, decision_logs (5 orphaned tables remain for safety) - Migration created but NOT applied: 20260118_172743_remove_context_system.py - Tables can be dropped later when confirmed not needed New files added: - CONTEXT_SYSTEM_REMOVAL_SUMMARY.md: Detailed removal report - CONTEXT_SYSTEM_REMOVAL_COMPLETE.md: Final status - CONTEXT_EXPORT_RESULTS.md: Export attempt results - scripts/export-tombstoned-contexts.py: Export tool for future use - migrations/versions/20260118_172743_remove_context_system.py Impact: - Reduced from 130 to 95 API endpoints - Reduced from 43 to 38 active database tables - Removed 16,831 lines of code - System fully operational without context recall Reason for removal: - System was not actively used (no tombstoned contexts found) - Reduces codebase complexity - Focuses on core MSP work tracking functionality - Database preserved for safety (can rollback if needed) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
68
deploy_manual.cmd
Normal file
68
deploy_manual.cmd
Normal file
@@ -0,0 +1,68 @@
|
||||
@echo off
|
||||
REM Manual deployment script for recall endpoint fix
|
||||
REM Uses plink/pscp with guru username
|
||||
|
||||
echo ============================================================
|
||||
echo ClaudeTools Recall Endpoint Deployment
|
||||
echo ============================================================
|
||||
echo.
|
||||
|
||||
echo [Step 1] Copying file to RMM server...
|
||||
pscp D:\ClaudeTools\api\routers\conversation_contexts.py guru@172.16.3.30:/tmp/conversation_contexts.py
|
||||
if errorlevel 1 (
|
||||
echo [ERROR] File copy failed
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
echo [OK] File copied successfully
|
||||
echo.
|
||||
|
||||
echo [Step 2] Checking file was copied...
|
||||
plink guru@172.16.3.30 "ls -lh /tmp/conversation_contexts.py"
|
||||
echo.
|
||||
|
||||
echo [Step 3] Moving file to production location...
|
||||
plink guru@172.16.3.30 "sudo mv /tmp/conversation_contexts.py /opt/claudetools/api/routers/conversation_contexts.py"
|
||||
if errorlevel 1 (
|
||||
echo [ERROR] File move failed
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
echo [OK] File moved
|
||||
echo.
|
||||
|
||||
echo [Step 4] Setting correct ownership...
|
||||
plink guru@172.16.3.30 "sudo chown claudetools:claudetools /opt/claudetools/api/routers/conversation_contexts.py"
|
||||
echo [OK] Ownership set
|
||||
echo.
|
||||
|
||||
echo [Step 5] Verifying file has new code...
|
||||
plink guru@172.16.3.30 "grep -c 'search_term.*Query' /opt/claudetools/api/routers/conversation_contexts.py"
|
||||
echo (Should show 1 or more matches if update successful)
|
||||
echo.
|
||||
|
||||
echo [Step 6] Restarting API service...
|
||||
plink guru@172.16.3.30 "sudo systemctl restart claudetools-api"
|
||||
echo [OK] Service restart initiated
|
||||
echo.
|
||||
|
||||
echo [Step 7] Waiting for service to start...
|
||||
timeout /t 5 /nobreak >nul
|
||||
echo.
|
||||
|
||||
echo [Step 8] Checking service status...
|
||||
plink guru@172.16.3.30 "sudo systemctl status claudetools-api --no-pager | head -15"
|
||||
echo.
|
||||
|
||||
echo ============================================================
|
||||
echo Testing API endpoint...
|
||||
echo ============================================================
|
||||
echo.
|
||||
|
||||
python -c "import requests, json; jwt='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJpbXBvcnQtc2NyaXB0Iiwic2NvcGVzIjpbImFkbWluIiwiaW1wb3J0Il0sImV4cCI6MTc3MTI3NTEyOX0.-DJF50tq0MaNwVQBdO7cGYNuO5pQuXte-tTj5DpHi2U'; r=requests.get('http://172.16.3.30:8001/api/conversation-contexts/recall', headers={'Authorization': f'Bearer {jwt}'}, params={'search_term': 'dataforth', 'limit': 2}); data=r.json(); print(f'Status: {r.status_code}'); print(f'Keys: {list(data.keys())}'); print('[SUCCESS]' if 'contexts' in data else '[FAILED - Still old format]'); print(f'Contexts: {len(data.get(\"contexts\", []))}' if 'contexts' in data else '')"
|
||||
|
||||
echo.
|
||||
echo ============================================================
|
||||
echo Deployment Complete
|
||||
echo ============================================================
|
||||
pause
|
||||
Reference in New Issue
Block a user